Merged in feature/IO-2625-BPT-Hrs-in-Employee-Assignment (pull request #1339)
IO-2625 B/P/T Hrs Display in Employee Assignment Block Approved-by: Dave Richer
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
|||||||
PauseCircleOutlined,
|
PauseCircleOutlined,
|
||||||
WarningFilled,
|
WarningFilled,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { Card, Col, Row, Space, Tag, Tooltip } from "antd";
|
import { Card, Col, Divider, Row, Space, Tag, Tooltip } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -62,6 +62,13 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
|||||||
${job.v_make_desc || ""}
|
${job.v_make_desc || ""}
|
||||||
${job.v_model_desc || ""}`.trim();
|
${job.v_model_desc || ""}`.trim();
|
||||||
|
|
||||||
|
const bodyHrs = job.joblines
|
||||||
|
.filter((j) => j.mod_lbr_ty !== "LAR")
|
||||||
|
.reduce((acc, val) => acc + val.mod_lb_hrs, 0);
|
||||||
|
const refinishHrs = job.joblines
|
||||||
|
.filter((line) => line.mod_lbr_ty === "LAR")
|
||||||
|
.reduce((acc, val) => acc + val.mod_lb_hrs, 0);
|
||||||
|
|
||||||
const ownerTitle = OwnerNameDisplayFunction(job).trim();
|
const ownerTitle = OwnerNameDisplayFunction(job).trim();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -299,6 +306,11 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
|||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<JobEmployeeAssignments job={job} />
|
<JobEmployeeAssignments job={job} />
|
||||||
|
<Divider style={{ margin: ".5rem" }} />
|
||||||
|
<DataLabel label={t("jobs.labels.labor_hrs")}>
|
||||||
|
{bodyHrs.toFixed(1)} / {refinishHrs.toFixed(1)} /{" "}
|
||||||
|
{(bodyHrs + refinishHrs).toFixed(1)}
|
||||||
|
</DataLabel>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -1823,6 +1823,7 @@
|
|||||||
"job": "Job Details",
|
"job": "Job Details",
|
||||||
"jobcosting": "Job Costing",
|
"jobcosting": "Job Costing",
|
||||||
"jobtotals": "Job Totals",
|
"jobtotals": "Job Totals",
|
||||||
|
"labor_hrs": "B/P/T Hrs",
|
||||||
"labor_rates_subtotal": "Labor Rates Subtotal",
|
"labor_rates_subtotal": "Labor Rates Subtotal",
|
||||||
"laborallocations": "Labor Allocations",
|
"laborallocations": "Labor Allocations",
|
||||||
"labortotals": "Labor Totals",
|
"labortotals": "Labor Totals",
|
||||||
|
|||||||
@@ -1823,6 +1823,7 @@
|
|||||||
"job": "",
|
"job": "",
|
||||||
"jobcosting": "",
|
"jobcosting": "",
|
||||||
"jobtotals": "",
|
"jobtotals": "",
|
||||||
|
"labor_hrs": "",
|
||||||
"labor_rates_subtotal": "",
|
"labor_rates_subtotal": "",
|
||||||
"laborallocations": "",
|
"laborallocations": "",
|
||||||
"labortotals": "",
|
"labortotals": "",
|
||||||
|
|||||||
@@ -1823,6 +1823,7 @@
|
|||||||
"job": "",
|
"job": "",
|
||||||
"jobcosting": "",
|
"jobcosting": "",
|
||||||
"jobtotals": "",
|
"jobtotals": "",
|
||||||
|
"labor_hrs": "",
|
||||||
"labor_rates_subtotal": "",
|
"labor_rates_subtotal": "",
|
||||||
"laborallocations": "",
|
"laborallocations": "",
|
||||||
"labortotals": "",
|
"labortotals": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user