Resolved issues on time ticket modal IO-563

This commit is contained in:
Patrick Fic
2021-02-04 18:15:00 -08:00
parent 9993d76709
commit ef03a6cd42
5 changed files with 13 additions and 16 deletions

View File

@@ -21,7 +21,6 @@ export function LaborAllocationsTable({
adjustments,
}) {
const { t } = useTranslation();
const [totals, setTotals] = useState([]);
useEffect(() => {
if (!!joblines && !!timetickets && !!bodyshop);
@@ -33,7 +32,8 @@ export function LaborAllocationsTable({
adjustments
)
);
}, [joblines, timetickets, bodyshop, adjustments]);
if (!jobId) setTotals([]);
}, [joblines, timetickets, bodyshop, adjustments, jobId]);
return (
<div>

View File

@@ -6,7 +6,7 @@ export const CalculateAllocationsTotals = (
) => {
const jobCodes = joblines.map((item) => item.mod_lbr_ty);
//.filter((value, index, self) => self.indexOf(value) === index && !!value);
const ticketCodes = timetickets.map((item) => item.cieca_code);
const ticketCodes = timetickets.map((item) => item.ciecacode);
//.filter((value, index, self) => self.indexOf(value) === index && !!value);
const allCodes = [...jobCodes, ...ticketCodes].filter(
(value, index, self) => self.indexOf(value) === index && !!value