diff --git a/_reference/productionBoardNotes.md b/_reference/productionBoardNotes.md index 31bf2b4dc..96ea0d46f 100644 --- a/_reference/productionBoardNotes.md +++ b/_reference/productionBoardNotes.md @@ -31,3 +31,11 @@ These allow users to turn fields on or off, turning them all off will show the card in the most minimal form + +### Statistics + +- The statistics section allows users to see accumulations of both jobs on the board, and jobs in production. +- you can click a statistic to turn it on and off, and drag and drop the statistics to rearrange them + +### Filters +- Allows you to set, and persist filters for estimators and insurance companies diff --git a/client/src/App/App.styles.scss b/client/src/App/App.styles.scss index dd79912c1..d1d2ffed5 100644 --- a/client/src/App/App.styles.scss +++ b/client/src/App/App.styles.scss @@ -161,3 +161,15 @@ .rowWithColor > td { background-color: var(--bgColor) !important; } + +.muted-button { + color: grey; + border: none; + background: none; + cursor: pointer; + font-size: 16px; /* Adjust as needed */ +} + +.muted-button:hover { + color: darkgrey; +} diff --git a/client/src/components/production-board-kanban/production-board-kanban-card.component.jsx b/client/src/components/production-board-kanban/production-board-kanban-card.component.jsx index e3fe39ff8..798f7f7ec 100644 --- a/client/src/components/production-board-kanban/production-board-kanban-card.component.jsx +++ b/client/src/components/production-board-kanban/production-board-kanban-card.component.jsx @@ -360,14 +360,7 @@ export default function ProductionBoardCard({ technician, card, bodyshop, cardSe const headerContent = (
- + {metadata?.suspended && } {metadata?.iouparent && ( ({ ) }); -const ProductionListColumnAlert = ({ record, insertAuditTrail }) => { +const ProductionListColumnAlert = ({ id, productionVars, refetch, insertAuditTrail }) => { const [updateAlert] = useMutation(UPDATE_JOB); + const { t } = useTranslation(); const handleAlertToggle = useCallback(() => { logImEXEvent("production_toggle_alert"); - const newAlertState = !!record.production_vars?.alert ? !record.production_vars.alert : true; + const newAlertState = !!productionVars?.alert ? !productionVars?.alert : true; + const finalProductionVars = { + ...productionVars, + alert: newAlertState + }; updateAlert({ variables: { - jobId: record.id, + jobId: id, job: { - production_vars: { - ...record.production_vars, - alert: newAlertState - } + production_vars: finalProductionVars } } }).catch((err) => { @@ -45,17 +48,26 @@ const ProductionListColumnAlert = ({ record, insertAuditTrail }) => { }); insertAuditTrail({ - jobid: record.id, + jobid: id, operation: AuditTrailMapping.alertToggle(newAlertState), type: "alertToggle" }); - if (record.refetch) record.refetch(); - }, [updateAlert, insertAuditTrail, record]); + if (refetch) refetch(); + }, [updateAlert, insertAuditTrail, id, productionVars, refetch]); - if (!record.production_vars?.alert) return null; - - return