IO-2154 Add expected jobsin production count.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project version="1.2" be_version="2.7.1">
|
<babeledit_project be_version="2.7.1" version="1.2">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
@@ -736,6 +736,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>expectedjobs</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>expectedprodhrs</name>
|
<name>expectedprodhrs</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ 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 {
|
import {
|
||||||
Legend, PolarAngleAxis,
|
Legend,
|
||||||
|
PolarAngleAxis,
|
||||||
PolarGrid,
|
PolarGrid,
|
||||||
PolarRadiusAxis,
|
PolarRadiusAxis,
|
||||||
Radar, RadarChart,
|
Radar,
|
||||||
Tooltip
|
RadarChart,
|
||||||
|
Tooltip,
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
@@ -20,6 +22,10 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export function ScheduleCalendarHeaderGraph({ bodyshop, loadData }) {
|
export function ScheduleCalendarHeaderGraph({ bodyshop, loadData }) {
|
||||||
|
console.log(
|
||||||
|
"🚀 ~ file: schedule-calendar-header-graph.component.js:23 ~ ScheduleCalendarHeaderGraph ~ loadData",
|
||||||
|
loadData
|
||||||
|
);
|
||||||
const { ssbuckets } = bodyshop;
|
const { ssbuckets } = bodyshop;
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const data = useMemo(() => {
|
const data = useMemo(() => {
|
||||||
@@ -44,6 +50,8 @@ export function ScheduleCalendarHeaderGraph({ bodyshop, loadData }) {
|
|||||||
<Space>
|
<Space>
|
||||||
{t("appointments.labels.expectedprodhrs")}
|
{t("appointments.labels.expectedprodhrs")}
|
||||||
<strong>{loadData?.expectedHours?.toFixed(1)}</strong>
|
<strong>{loadData?.expectedHours?.toFixed(1)}</strong>
|
||||||
|
{t("appointments.labels.expectedjobs")}
|
||||||
|
<strong>{loadData?.expectedJobCount}</strong>
|
||||||
</Space>
|
</Space>
|
||||||
<RadarChart
|
<RadarChart
|
||||||
// cx={300}
|
// cx={300}
|
||||||
|
|||||||
@@ -154,6 +154,10 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
load[current].jobsIn || [],
|
load[current].jobsIn || [],
|
||||||
load[current].jobsOut || []
|
load[current].jobsOut || []
|
||||||
);
|
);
|
||||||
|
load[current].expectedJobCount =
|
||||||
|
prodJobs.length +
|
||||||
|
(load[current].jobsIn || []).length -
|
||||||
|
(load[current].jobsOut || []).length;
|
||||||
load[current].expectedHours =
|
load[current].expectedHours =
|
||||||
load.productionHours +
|
load.productionHours +
|
||||||
(load[current].hoursIn || 0) -
|
(load[current].hoursIn || 0) -
|
||||||
@@ -165,6 +169,10 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
load[current].jobsIn || [],
|
load[current].jobsIn || [],
|
||||||
load[current].jobsOut || []
|
load[current].jobsOut || []
|
||||||
);
|
);
|
||||||
|
load[current].expectedJobCount =
|
||||||
|
load[prev].expectedJobCount +
|
||||||
|
(load[current].jobsIn || []).length -
|
||||||
|
(load[current].jobsOut || []).length;
|
||||||
load[current].expectedHours =
|
load[current].expectedHours =
|
||||||
load[prev].expectedHours +
|
load[prev].expectedHours +
|
||||||
(load[current].hoursIn || 0) -
|
(load[current].hoursIn || 0) -
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
"cancelledappointment": "Canceled appointment for: ",
|
"cancelledappointment": "Canceled appointment for: ",
|
||||||
"completingjobs": "Completing Jobs",
|
"completingjobs": "Completing Jobs",
|
||||||
"dataconsistency": "{{ro_number}} has a data consistency issue. It has been excluded for scheduling purposes. CODE: {{code}}.",
|
"dataconsistency": "{{ro_number}} has a data consistency issue. It has been excluded for scheduling purposes. CODE: {{code}}.",
|
||||||
|
"expectedjobs": "Expected Jobs in Production: ",
|
||||||
"expectedprodhrs": "Expected Production Hours:",
|
"expectedprodhrs": "Expected Production Hours:",
|
||||||
"history": "History",
|
"history": "History",
|
||||||
"inproduction": "Jobs In Production",
|
"inproduction": "Jobs In Production",
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
"cancelledappointment": "Cita cancelada para:",
|
"cancelledappointment": "Cita cancelada para:",
|
||||||
"completingjobs": "",
|
"completingjobs": "",
|
||||||
"dataconsistency": "",
|
"dataconsistency": "",
|
||||||
|
"expectedjobs": "",
|
||||||
"expectedprodhrs": "",
|
"expectedprodhrs": "",
|
||||||
"history": "",
|
"history": "",
|
||||||
"inproduction": "",
|
"inproduction": "",
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
"cancelledappointment": "Rendez-vous annulé pour:",
|
"cancelledappointment": "Rendez-vous annulé pour:",
|
||||||
"completingjobs": "",
|
"completingjobs": "",
|
||||||
"dataconsistency": "",
|
"dataconsistency": "",
|
||||||
|
"expectedjobs": "",
|
||||||
"expectedprodhrs": "",
|
"expectedprodhrs": "",
|
||||||
"history": "",
|
"history": "",
|
||||||
"inproduction": "",
|
"inproduction": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user