Merged in hotfix/2024-10-31-Database-Issues (pull request #1877)
Hotfix/2024 10 31 Database Issues into master-AIO - IO-3012 IO-3009 IO-3014
This commit is contained in:
@@ -45,7 +45,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh
|
|||||||
if (fcmToken) {
|
if (fcmToken) {
|
||||||
setpollInterval(0);
|
setpollInterval(0);
|
||||||
} else {
|
} else {
|
||||||
setpollInterval(60000);
|
setpollInterval(90000);
|
||||||
}
|
}
|
||||||
}, [fcmToken]);
|
}, [fcmToken]);
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import { DatePicker } from "antd";
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React, { useCallback, useState } from "react";
|
import React, { useCallback, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import dayjs from "../../utils/day";
|
import { connect } from "react-redux";
|
||||||
import { fuzzyMatchDate } from "./formats.js";
|
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors.js";
|
import { selectBodyshop } from "../../redux/user/user.selectors.js";
|
||||||
import { connect } from "react-redux";
|
import dayjs from "../../utils/day";
|
||||||
|
import { fuzzyMatchDate } from "./formats.js";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop
|
bodyshop: selectBodyshop
|
||||||
@@ -28,7 +28,6 @@ const DateTimePicker = ({
|
|||||||
|
|
||||||
const handleChange = useCallback(
|
const handleChange = useCallback(
|
||||||
(newDate) => {
|
(newDate) => {
|
||||||
if (!newDate) return;
|
|
||||||
if (onChange) {
|
if (onChange) {
|
||||||
onChange(bodyshop?.timezone ? dayjs(newDate).tz(bodyshop.timezone, true) : newDate);
|
onChange(bodyshop?.timezone ? dayjs(newDate).tz(bodyshop.timezone, true) : newDate);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import ScoreboardChart from "../scoreboard-chart/scoreboard-chart.component";
|
|||||||
import ScoreboardLastDays from "../scoreboard-last-days/scoreboard-last-days.component";
|
import ScoreboardLastDays from "../scoreboard-last-days/scoreboard-last-days.component";
|
||||||
import ScoreboardTargetsTable from "../scoreboard-targets-table/scoreboard-targets-table.component";
|
import ScoreboardTargetsTable from "../scoreboard-targets-table/scoreboard-targets-table.component";
|
||||||
|
|
||||||
|
import { useApolloClient, useQuery } from "@apollo/client";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { GET_BLOCKED_DAYS, QUERY_SCOREBOARD } from "../../graphql/scoreboard.queries";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import { useApolloClient, useQuery } from "@apollo/client";
|
|
||||||
import { GET_BLOCKED_DAYS, QUERY_SCOREBOARD } from "../../graphql/scoreboard.queries";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -26,7 +26,7 @@ export function ScoreboardDisplayComponent({ bodyshop }) {
|
|||||||
start: dayjs().startOf("month"),
|
start: dayjs().startOf("month"),
|
||||||
end: dayjs().endOf("month")
|
end: dayjs().endOf("month")
|
||||||
},
|
},
|
||||||
pollInterval: 60000
|
pollInterval: 60000*5
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data } = scoreboardSubscription;
|
const { data } = scoreboardSubscription;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { useQuery } from "@apollo/client";
|
import { useQuery } from "@apollo/client";
|
||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import dayjs from "../../utils/day";
|
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import dayjs from "../../utils/day";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||||
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
||||||
@@ -86,7 +86,7 @@ export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
|||||||
},
|
},
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
pollInterval: 60000,
|
pollInterval: 60000*5,
|
||||||
skip: !fixedPeriods
|
skip: !fixedPeriods
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { useQuery } from "@apollo/client";
|
import { useQuery } from "@apollo/client";
|
||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import dayjs from "../../utils/day";
|
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
||||||
|
import dayjs from "../../utils/day";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||||
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
||||||
@@ -68,7 +68,7 @@ export default function ScoreboardTimeTickets() {
|
|||||||
},
|
},
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
pollInterval: 60000,
|
pollInterval: 60000*5,
|
||||||
skip: !fixedPeriods
|
skip: !fixedPeriods
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export function TimeTicketList({
|
|||||||
extra
|
extra
|
||||||
}) {
|
}) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: { columnKey: 'date', order: 'descend' },
|
||||||
filteredInfo: { text: "" }
|
filteredInfo: { text: "" }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { gql } from "@apollo/client";
|
|||||||
|
|
||||||
export const QUERY_TICKETS_BY_JOBID = gql`
|
export const QUERY_TICKETS_BY_JOBID = gql`
|
||||||
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
|
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
|
||||||
timetickets(where: { jobid: { _eq: $jobid } }, order_by: { date: desc_nulls_first }) {
|
timetickets(where: { jobid: { _eq: $jobid } }) {
|
||||||
actualhrs
|
actualhrs
|
||||||
cost_center
|
cost_center
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -26,7 +26,7 @@ export const QUERY_TICKETS_BY_JOBID = gql`
|
|||||||
|
|
||||||
export const QUERY_TIME_TICKETS_IN_RANGE = gql`
|
export const QUERY_TIME_TICKETS_IN_RANGE = gql`
|
||||||
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
|
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
|
||||||
timetickets(where: { date: { _gte: $start, _lte: $end } }, order_by: { date: desc_nulls_first }) {
|
timetickets(where: { date: { _gte: $start, _lte: $end } }) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
clockoff
|
clockoff
|
||||||
@@ -69,7 +69,6 @@ export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
|
|||||||
) {
|
) {
|
||||||
timetickets(
|
timetickets(
|
||||||
where: { date: { _gte: $start, _lte: $end }, employeeid: { _eq: $employeeid } }
|
where: { date: { _gte: $start, _lte: $end }, employeeid: { _eq: $employeeid } }
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -101,7 +100,6 @@ export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
|
|||||||
}
|
}
|
||||||
fixedperiod: timetickets(
|
fixedperiod: timetickets(
|
||||||
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, employeeid: { _eq: $employeeid } }
|
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, employeeid: { _eq: $employeeid } }
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -145,7 +143,6 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
|
|||||||
) {
|
) {
|
||||||
timetickets(
|
timetickets(
|
||||||
where: { date: { _gte: $start, _lte: $end }, cost_center: { _neq: "timetickets.labels.shift" } }
|
where: { date: { _gte: $start, _lte: $end }, cost_center: { _neq: "timetickets.labels.shift" } }
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -180,7 +177,6 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
|
|||||||
}
|
}
|
||||||
fixedperiod: timetickets(
|
fixedperiod: timetickets(
|
||||||
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, cost_center: { _neq: "timetickets.labels.shift" } }
|
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, cost_center: { _neq: "timetickets.labels.shift" } }
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
ciecacode
|
ciecacode
|
||||||
@@ -335,7 +331,6 @@ export const UPDATE_TIME_TICKETS = gql`
|
|||||||
export const QUERY_ACTIVE_TIME_TICKETS = gql`
|
export const QUERY_ACTIVE_TIME_TICKETS = gql`
|
||||||
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
|
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
|
||||||
timetickets(
|
timetickets(
|
||||||
order_by: { date: desc_nulls_first }
|
|
||||||
where: {
|
where: {
|
||||||
_and: {
|
_and: {
|
||||||
clockoff: { _is_null: true }
|
clockoff: { _is_null: true }
|
||||||
|
|||||||
Reference in New Issue
Block a user