IO-1491 Simplify production query to use ignore employee relationships and match locally.

This commit is contained in:
Patrick Fic
2021-11-10 16:54:02 -08:00
parent 89af6d23e8
commit f6fe8be7c4
6 changed files with 52 additions and 65 deletions

View File

@@ -131,14 +131,14 @@ export function ProductionBoardKanbanComponent({
}
};
const totalHrs = data
.reduce(
(acc, val) =>
acc +
(val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0) +
(val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
0
)
.toFixed(1);
.reduce(
(acc, val) =>
acc +
(val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0) +
(val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
0
)
.toFixed(1);
return (
<div>
<IndefiniteLoading loading={isMoving} />
@@ -167,7 +167,7 @@ export function ProductionBoardKanbanComponent({
<Board
children={boardLanes}
disableCardDrag={isMoving}
renderCard={(card) => ProductionBoardCard(technician, card)}
renderCard={(card) => ProductionBoardCard(technician, card, bodyshop)}
onCardDragEnd={handleDragEnd}
/>
</div>