IO-1747 Add CSR to Visual Board.
This commit is contained in:
@@ -22,7 +22,7 @@ export default function ProductionBoardCard(
|
|||||||
) {
|
) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
let employee_body, employee_prep, employee_refinish; //employee_csr;
|
let employee_body, employee_prep, employee_refinish, employee_csr;
|
||||||
if (card.employee_body) {
|
if (card.employee_body) {
|
||||||
employee_body = bodyshop.employees.find((e) => e.id === card.employee_body);
|
employee_body = bodyshop.employees.find((e) => e.id === card.employee_body);
|
||||||
}
|
}
|
||||||
@@ -34,6 +34,9 @@ export default function ProductionBoardCard(
|
|||||||
(e) => e.id === card.employee_refinish
|
(e) => e.id === card.employee_refinish
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (card.employee_csr) {
|
||||||
|
employee_csr = bodyshop.employees.find((e) => e.id === card.employee_csr);
|
||||||
|
}
|
||||||
// if (card.employee_csr) {
|
// if (card.employee_csr) {
|
||||||
// employee_csr = bodyshop.employees.find((e) => e.id === card.employee_csr);
|
// employee_csr = bodyshop.employees.find((e) => e.id === card.employee_csr);
|
||||||
// }
|
// }
|
||||||
@@ -131,11 +134,11 @@ export default function ProductionBoardCard(
|
|||||||
)} ${employee_refinish.last_name.charAt(0)}`
|
)} ${employee_refinish.last_name.charAt(0)}`
|
||||||
: ""
|
: ""
|
||||||
} ${card.larhrs.aggregate.sum.mod_lb_hrs || "?"}h`}</Col>
|
} ${card.larhrs.aggregate.sum.mod_lb_hrs || "?"}h`}</Col>
|
||||||
{/* <Col span={cardSettings && cardSettings.compact ? 24 : 12}>{`C: ${
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>{`C: ${
|
||||||
employee_csr
|
employee_csr
|
||||||
? `${employee_csr.first_name} ${employee_csr.last_name}`
|
? `${employee_csr.first_name} ${employee_csr.last_name}`
|
||||||
: ""
|
: ""
|
||||||
}`}</Col> */}
|
}`}</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ export const createBoardData = (AllStatuses, Jobs, filter) => {
|
|||||||
include ||
|
include ||
|
||||||
j.employee_body === employeeId ||
|
j.employee_body === employeeId ||
|
||||||
j.employee_prep === employeeId ||
|
j.employee_prep === employeeId ||
|
||||||
|
j.employee_csr === employeeId ||
|
||||||
j.employee_refinish === employeeId;
|
j.employee_refinish === employeeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,9 +77,8 @@ export const createBoardData = (AllStatuses, Jobs, filter) => {
|
|||||||
|
|
||||||
Object.keys(DataGroupedByStatus).map((statusGroupKey) => {
|
Object.keys(DataGroupedByStatus).map((statusGroupKey) => {
|
||||||
try {
|
try {
|
||||||
boardLanes.columns.find(
|
boardLanes.columns.find((l) => l.id === statusGroupKey).cards =
|
||||||
(l) => l.id === statusGroupKey
|
sortByParentId(DataGroupedByStatus[statusGroupKey]);
|
||||||
).cards = sortByParentId(DataGroupedByStatus[statusGroupKey]);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error while creating board card", error);
|
console.log("Error while creating board card", error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user