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
|
||||
@@ -736,6 +736,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</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>
|
||||
<name>expectedprodhrs</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -4,11 +4,13 @@ import React, { useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import {
|
||||
Legend, PolarAngleAxis,
|
||||
Legend,
|
||||
PolarAngleAxis,
|
||||
PolarGrid,
|
||||
PolarRadiusAxis,
|
||||
Radar, RadarChart,
|
||||
Tooltip
|
||||
Radar,
|
||||
RadarChart,
|
||||
Tooltip,
|
||||
} from "recharts";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
@@ -20,6 +22,10 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function ScheduleCalendarHeaderGraph({ bodyshop, loadData }) {
|
||||
console.log(
|
||||
"🚀 ~ file: schedule-calendar-header-graph.component.js:23 ~ ScheduleCalendarHeaderGraph ~ loadData",
|
||||
loadData
|
||||
);
|
||||
const { ssbuckets } = bodyshop;
|
||||
const { t } = useTranslation();
|
||||
const data = useMemo(() => {
|
||||
@@ -44,6 +50,8 @@ export function ScheduleCalendarHeaderGraph({ bodyshop, loadData }) {
|
||||
<Space>
|
||||
{t("appointments.labels.expectedprodhrs")}
|
||||
<strong>{loadData?.expectedHours?.toFixed(1)}</strong>
|
||||
{t("appointments.labels.expectedjobs")}
|
||||
<strong>{loadData?.expectedJobCount}</strong>
|
||||
</Space>
|
||||
<RadarChart
|
||||
// cx={300}
|
||||
|
||||
@@ -154,6 +154,10 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
load[current].jobsIn || [],
|
||||
load[current].jobsOut || []
|
||||
);
|
||||
load[current].expectedJobCount =
|
||||
prodJobs.length +
|
||||
(load[current].jobsIn || []).length -
|
||||
(load[current].jobsOut || []).length;
|
||||
load[current].expectedHours =
|
||||
load.productionHours +
|
||||
(load[current].hoursIn || 0) -
|
||||
@@ -165,6 +169,10 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
load[current].jobsIn || [],
|
||||
load[current].jobsOut || []
|
||||
);
|
||||
load[current].expectedJobCount =
|
||||
load[prev].expectedJobCount +
|
||||
(load[current].jobsIn || []).length -
|
||||
(load[current].jobsOut || []).length;
|
||||
load[current].expectedHours =
|
||||
load[prev].expectedHours +
|
||||
(load[current].hoursIn || 0) -
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"cancelledappointment": "Canceled appointment for: ",
|
||||
"completingjobs": "Completing Jobs",
|
||||
"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:",
|
||||
"history": "History",
|
||||
"inproduction": "Jobs In Production",
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"cancelledappointment": "Cita cancelada para:",
|
||||
"completingjobs": "",
|
||||
"dataconsistency": "",
|
||||
"expectedjobs": "",
|
||||
"expectedprodhrs": "",
|
||||
"history": "",
|
||||
"inproduction": "",
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"cancelledappointment": "Rendez-vous annulé pour:",
|
||||
"completingjobs": "",
|
||||
"dataconsistency": "",
|
||||
"expectedjobs": "",
|
||||
"expectedprodhrs": "",
|
||||
"history": "",
|
||||
"inproduction": "",
|
||||
|
||||
Reference in New Issue
Block a user