@seedtactics/insight-client 16.5.2 → 16.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ProgramHighlight-DPTeZ8Si.js +3 -0
- package/dist/assets/index-bPAFn3jp.js +364 -0
- package/dist/cell-status/basket-cycles.d.ts +21 -0
- package/dist/cell-status/basket-cycles.js +80 -0
- package/dist/cell-status/current-status.js +11 -3
- package/dist/cell-status/estimated-cycle-times.js +8 -4
- package/dist/cell-status/inspections.js +2 -2
- package/dist/cell-status/loading.js +4 -0
- package/dist/cell-status/material-details.d.ts +12 -4
- package/dist/cell-status/material-details.js +24 -13
- package/dist/cell-status/rebookings.js +15 -17
- package/dist/cell-status/scheduled-jobs.d.ts +1 -1
- package/dist/cell-status/scheduled-jobs.js +10 -3
- package/dist/cell-status/sim-production.js +3 -3
- package/dist/cell-status/sim-station-use.d.ts +1 -0
- package/dist/cell-status/sim-station-use.js +14 -8
- package/dist/cell-status/station-cycles.d.ts +29 -2
- package/dist/cell-status/station-cycles.js +81 -11
- package/dist/cell-status/tool-replacements.js +1 -1
- package/dist/cell-status/tool-usage.js +1 -1
- package/dist/components/App.js +101 -66
- package/dist/components/BarcodeScanning.js +12 -2
- package/dist/components/ErrorsAndLoading.js +10 -1
- package/dist/components/LogEntry.d.ts +0 -1
- package/dist/components/LogEntry.js +50 -26
- package/dist/components/Navigation.js +30 -4
- package/dist/components/analysis/AnalysisSelectToolbar.js +5 -1
- package/dist/components/analysis/BasketCycleCards.d.ts +1 -0
- package/dist/components/analysis/BasketCycleCards.js +145 -0
- package/dist/components/analysis/BufferChart.js +10 -4
- package/dist/components/analysis/CostPerPiece.js +28 -8
- package/dist/components/analysis/CycleChart.js +1 -1
- package/dist/components/analysis/DataTable.js +6 -4
- package/dist/components/analysis/HeatChart.js +27 -14
- package/dist/components/analysis/InspectionSankey.js +17 -6
- package/dist/components/analysis/PalletCycleCards.js +15 -4
- package/dist/components/analysis/PartCycleCards.js +62 -18
- package/dist/components/analysis/StationDataTable.js +14 -11
- package/dist/components/analysis/ToolReplacements.js +16 -10
- package/dist/components/log-entry-queue-filter.d.ts +2 -0
- package/dist/components/log-entry-queue-filter.js +21 -0
- package/dist/components/operations/AllMaterial.js +26 -10
- package/dist/components/operations/ChartRangeEdit.js +82 -4
- package/dist/components/operations/CloseoutReport.js +13 -4
- package/dist/components/operations/CompletedParts.js +23 -11
- package/dist/components/operations/CurrentWorkorders.js +31 -9
- package/dist/components/operations/OEEChart.js +8 -2
- package/dist/components/operations/Outliers.js +18 -7
- package/dist/components/operations/ProgramHighlight.js +4 -6
- package/dist/components/operations/Programs.js +9 -3
- package/dist/components/operations/Rebookings.js +8 -4
- package/dist/components/operations/RecentCycleChart.js +5 -3
- package/dist/components/operations/RecentProduction.js +30 -13
- package/dist/components/operations/RecentSchedules.js +6 -2
- package/dist/components/operations/RecentStationCycles.js +38 -11
- package/dist/components/operations/ShiftSettings.js +3 -3
- package/dist/components/operations/SimDayUsage.js +27 -4
- package/dist/components/operations/ToolReport.js +5 -1
- package/dist/components/operations/WorkorderGantt.js +22 -2
- package/dist/components/quality/QualityMaterial.js +11 -8
- package/dist/components/quality/RecentFailedInspections.js +3 -1
- package/dist/components/routes.d.ts +3 -0
- package/dist/components/routes.js +2 -0
- package/dist/components/station-monitor/BulkRawMaterial.js +11 -7
- package/dist/components/station-monitor/Closeout.js +14 -2
- package/dist/components/station-monitor/CustomStationMonitorDialog.js +1 -1
- package/dist/components/station-monitor/Inspection.js +23 -11
- package/dist/components/station-monitor/InvalidateCycle.js +3 -3
- package/dist/components/station-monitor/JobDetails.js +15 -2
- package/dist/components/station-monitor/LoadStation.js +274 -31
- package/dist/components/station-monitor/Material.js +71 -11
- package/dist/components/station-monitor/MoveMaterialArrows.js +4 -4
- package/dist/components/station-monitor/QuarantineButton.js +11 -0
- package/dist/components/station-monitor/Queues.js +28 -9
- package/dist/components/station-monitor/QueuesAddMaterial.js +8 -6
- package/dist/components/station-monitor/SelectInspType.js +1 -1
- package/dist/components/station-monitor/SelectWorkorder.js +1 -1
- package/dist/components/station-monitor/StationToolbar.js +17 -5
- package/dist/components/station-monitor/SystemOverview.d.ts +19 -1
- package/dist/components/station-monitor/SystemOverview.js +439 -20
- package/dist/components/station-monitor/Whiteboard.js +15 -7
- package/dist/data/all-material-bins.d.ts +7 -0
- package/dist/data/all-material-bins.js +47 -1
- package/dist/data/cost-per-piece.js +11 -8
- package/dist/data/current-cycles.d.ts +1 -1
- package/dist/data/current-cycles.js +62 -17
- package/dist/data/move-arrows.d.ts +5 -1
- package/dist/data/move-arrows.js +54 -4
- package/dist/data/part-summary.js +13 -13
- package/dist/data/path-lookup.js +6 -23
- package/dist/data/queue-material.d.ts +1 -1
- package/dist/data/queue-material.js +18 -17
- package/dist/data/results.completed-parts.js +4 -3
- package/dist/data/results.cycles.d.ts +15 -6
- package/dist/data/results.cycles.js +51 -30
- package/dist/data/results.inspection.js +11 -6
- package/dist/data/results.oee.js +8 -8
- package/dist/data/results.schedules.js +2 -11
- package/dist/data/tools-programs.js +5 -6
- package/dist/index.html +1 -1
- package/dist/network/api.d.ts +22 -4
- package/dist/network/api.js +40 -5
- package/dist/network/backend-mock.js +15 -8
- package/dist/network/backend.js +3 -3
- package/dist/network/websocket.js +15 -15
- package/dist/util/chart-helpers.d.ts +1 -1
- package/dist/util/chart-helpers.js +14 -8
- package/package.json +29 -31
- package/dist/assets/ProgramHighlight-LvRM40Qr.js +0 -3
- package/dist/assets/index-gAFi3Oss.js +0 -364
|
@@ -126,6 +126,17 @@ function useQuarantineMaterial(ignoreOperator) {
|
|
|
126
126
|
type = "Scrap";
|
|
127
127
|
}
|
|
128
128
|
break;
|
|
129
|
+
case LocType.InBasket:
|
|
130
|
+
if (inProcMat.action.type === ActionType.Loading && !fmsInfo.allowQuarantineToCancelLoad) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
else if (inProcMat.action.type === ActionType.Loading) {
|
|
134
|
+
type = "CancelLoad";
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
type = "Scrap";
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
129
140
|
case LocType.Free:
|
|
130
141
|
type = "Scrap";
|
|
131
142
|
break;
|
|
@@ -94,10 +94,14 @@ function RawMaterialJobRow(props) {
|
|
|
94
94
|
return (_jsxs(_Fragment, { children: [_jsxs(JobTableRow, { "$noBorderBottom": true, "$highlightedRow": highlRow, "$noncompletedRow": j.remainingToStart - j.assignedRaw > 0, children: [_jsx(TableCell, { children: _jsxs(Box, { sx: {
|
|
95
95
|
display: "flex",
|
|
96
96
|
alignItems: "center",
|
|
97
|
-
}, children: [_jsx(Box, { sx: { mr: "0.2em" }, children: _jsx(PartIdenticon, { part: j.job.partName, size: 25 }) }), _jsx("div", { children: _jsx(Typography, { variant: "body2", component: "span",
|
|
97
|
+
}, children: [_jsx(Box, { sx: { mr: "0.2em" }, children: _jsx(PartIdenticon, { part: j.job.partName, size: 25 }) }), _jsx("div", { children: _jsx(Typography, { variant: "body2", component: "span", sx: {
|
|
98
|
+
display: "block",
|
|
99
|
+
}, children: j.job.unique }) })] }) }), _jsx(TableCell, { children: j.startingTime ? j.startingTime.toLocaleString() : "" }), _jsx(TableCell, { children: j.rawMatName === j.job.partName ? (j.rawMatName) : (_jsxs(Box, { sx: {
|
|
98
100
|
display: "flex",
|
|
99
101
|
alignItems: "center",
|
|
100
|
-
}, children: [_jsx(Box, { sx: { mr: "0.2em" }, children: _jsx(PartIdenticon, { part: j.rawMatName, size: 25 }) }), _jsx(Typography, { variant: "body2",
|
|
102
|
+
}, children: [_jsx(Box, { sx: { mr: "0.2em" }, children: _jsx(PartIdenticon, { part: j.rawMatName, size: 25 }) }), _jsx(Typography, { variant: "body2", sx: {
|
|
103
|
+
display: "block",
|
|
104
|
+
}, children: j.rawMatName })] })) }), _jsxs(TableCell, { children: [j.job.comment, _jsx(Tooltip, { title: "Edit", children: _jsx(IconButton, { size: "small", onClick: () => props.editNote(j.job), children: _jsx(EditIcon, {}) }) })] }), _jsxs(TableCell, { align: "right", children: [j.job.cycles ?? 0, allowEditQty ? (_jsx(Tooltip, { title: "Edit", children: _jsx(IconButton, { size: "small", onClick: () => props.editQty(j), children: _jsx(EditIcon, {}) }) })) : undefined] }), _jsx(TableCell, { align: "right", children: j.remainingToStart }), _jsx(TableCell, { align: "right", children: j.assignedRaw }), _jsx(TableCell, { align: "right", children: _jsx(Tooltip, { title: j.remainingToStart > 0 || j.assignedRaw > 0 ? `${j.remainingToStart} - ${j.assignedRaw}` : "", children: _jsx("span", { children: Math.max(j.remainingToStart - j.assignedRaw, 0) }) }) }), _jsx(TableCell, { align: "right", children: j.availableUnassigned }), _jsx(TableCell, { children: _jsx(Tooltip, { title: "Show Details", children: _jsx(IconButton, { size: "small", onClick: () => setOpen(!open), children: open ? _jsx(KeyboardArrowUpIcon, {}) : _jsx(KeyboardArrowDownIcon, {}) }) }) })] }), _jsx(JobTableRow, { "$highlightedRow": highlRow, "$noncompletedRow": j.remainingToStart - j.assignedRaw > 0, children: _jsx(TableCell, { sx: { pb: "0", pt: "0" }, colSpan: 10, children: _jsx(Collapse, { in: open, timeout: "auto", unmountOnExit: true, children: _jsx(JobDetails, { job: j.job, checkAnalysisMonth: false }) }) }) })] }));
|
|
101
105
|
}
|
|
102
106
|
function RawMaterialJobTable(props) {
|
|
103
107
|
const currentSt = useAtomValue(currentStatus);
|
|
@@ -111,7 +115,9 @@ const RawMaterialWorkorderRow = memo(function RawMaterialWorkorderRow({ workorde
|
|
|
111
115
|
return (_jsxs(TableRow, { children: [_jsx(TableCell, { children: workorder.workorderId }), _jsx(TableCell, { children: _jsxs(Box, { sx: {
|
|
112
116
|
display: "flex",
|
|
113
117
|
alignItems: "center",
|
|
114
|
-
}, children: [_jsx(Box, { sx: { mr: "0.2em" }, children: _jsx(PartIdenticon, { part: workorder.part, size: 25 }) }), _jsx(Typography, { variant: "body2",
|
|
118
|
+
}, children: [_jsx(Box, { sx: { mr: "0.2em" }, children: _jsx(PartIdenticon, { part: workorder.part, size: 25 }) }), _jsx(Typography, { variant: "body2", sx: {
|
|
119
|
+
display: "block",
|
|
120
|
+
}, children: workorder.part })] }) }), _jsxs(TableCell, { children: [workorder.comments && workorder.comments.length > 0
|
|
115
121
|
? workorder.comments[workorder.comments.length - 1].comment
|
|
116
122
|
: "", _jsx(Tooltip, { title: "Edit", children: _jsx(IconButton, { size: "small", onClick: () => setDialog(workorder), children: _jsx(EditIcon, {}) }) })] }), _jsx(TableCell, { children: workorder.dueDate.toLocaleDateString() }), _jsx(TableCell, { children: workorder.priority }), _jsx(TableCell, { children: workorder.plannedQuantity }), _jsx(TableCell, { children: workorder.completedQuantity }), _jsx(TableCell, { children: inProc }), _jsx(TableCell, { children: Math.max(0, workorder.plannedQuantity - workorder.completedQuantity - inProc) })] }));
|
|
117
123
|
});
|
|
@@ -178,10 +184,12 @@ const EditJobPlanQtyDialog = memo(function EditJobPlanQtyProps(props) {
|
|
|
178
184
|
setRunning(false);
|
|
179
185
|
}
|
|
180
186
|
}
|
|
181
|
-
return (_jsx(Dialog, { open: allowEditQtyUrl != null && props.job !== null, onClose: close, children: props.job !== null ? (_jsxs(_Fragment, { children: [_jsx(DialogTitle, { children: _jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [_jsx("div", { children: _jsx(PartIdenticon, { part: props.job.job.partName, size: 40 }) }), _jsxs("div", { style: { marginLeft: "1em", flexGrow: 1 }, children: ["Edit Planned Quantity For ", props.job.job.unique] })] }) }), _jsxs(DialogContent, { children: [_jsxs("p", { children: [props.job.job.cycles, " currently planned, ", props.job.remainingToStart, " remaining to start"] }), _jsx(TextField, { variant: "outlined", fullWidth: true, autoFocus: true,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
187
|
+
return (_jsx(Dialog, { open: allowEditQtyUrl != null && props.job !== null, onClose: close, children: props.job !== null ? (_jsxs(_Fragment, { children: [_jsx(DialogTitle, { children: _jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [_jsx("div", { children: _jsx(PartIdenticon, { part: props.job.job.partName, size: 40 }) }), _jsxs("div", { style: { marginLeft: "1em", flexGrow: 1 }, children: ["Edit Planned Quantity For ", props.job.job.unique] })] }) }), _jsxs(DialogContent, { children: [_jsxs("p", { children: [props.job.job.cycles, " currently planned, ", props.job.remainingToStart, " remaining to start"] }), _jsx(TextField, { variant: "outlined", fullWidth: true, autoFocus: true, type: "number", value: newQty === null ? "" : newQty, onChange: (e) => setNewQty(parseInt(e.target.value)), slotProps: {
|
|
188
|
+
htmlInput: {
|
|
189
|
+
style: { textAlign: "right" },
|
|
190
|
+
min: (props.job.job.cycles ?? 0) - props.job.remainingToStart,
|
|
191
|
+
},
|
|
192
|
+
} })] }), _jsxs(DialogActions, { children: [_jsxs(Button, { color: "primary", disabled: running || newQty === null || isNaN(newQty), onClick: () => void setQty(), children: [running ? _jsx(CircularProgress, { size: 10 }) : undefined, "Set Quantity"] }), _jsx(Button, { color: "primary", disabled: running, onClick: close, children: "Cancel" })] })] })) : undefined }));
|
|
185
193
|
});
|
|
186
194
|
const workorderCommentDialogAtom = atom(null);
|
|
187
195
|
function WorkorderCommentDialog() {
|
|
@@ -295,8 +303,19 @@ export const Queues = (props) => {
|
|
|
295
303
|
return (_jsxs(Box, { sx: {
|
|
296
304
|
padding: "8px",
|
|
297
305
|
width: "100%",
|
|
298
|
-
}, children: [data.map((region, idx) => (_jsx("div", { style: idx < data.length - 1 ? { borderBottom: "1px solid black" } : undefined, children: _jsx(SortableRegion, { matIds: region.material.map((m) => m.materialID), direction: "rect", queueName: region.label, renderDragOverlay: (mat) => (_jsx(DragOverlayInProcMaterial, { mat: mat, hideEmptySerial: true, displayJob: hasJobs && region.rawMaterialQueue, fsize: "normal" })), children: _jsxs(Box, {
|
|
299
|
-
|
|
306
|
+
}, children: [data.map((region, idx) => (_jsx("div", { style: idx < data.length - 1 ? { borderBottom: "1px solid black" } : undefined, children: _jsx(SortableRegion, { matIds: region.material.map((m) => m.materialID), direction: "rect", queueName: region.label, renderDragOverlay: (mat) => (_jsx(DragOverlayInProcMaterial, { mat: mat, hideEmptySerial: true, displayJob: hasJobs && region.rawMaterialQueue, fsize: "normal" })), children: _jsxs(Box, { sx: {
|
|
307
|
+
minHeight: "134px",
|
|
308
|
+
}, children: [_jsxs(Box, { sx: {
|
|
309
|
+
display: "flex",
|
|
310
|
+
margin: "4px",
|
|
311
|
+
}, children: [_jsx(Typography, { variant: "h4", sx: {
|
|
312
|
+
flexGrow: 1,
|
|
313
|
+
}, children: region.label }), region.free ? undefined : (_jsx(AddMaterialButtons, { label: region.label, rawMatQueue: region.rawMaterialQueue, inProcQueue: region.inProcQueue }))] }), _jsxs(Box, { sx: {
|
|
314
|
+
justifyContent: "flex-start",
|
|
315
|
+
display: "flex",
|
|
316
|
+
flexWrap: "wrap",
|
|
317
|
+
}, children: [region.material.map((m, matIdx) => (_jsx(SortableInProcMaterial, { mat: m, hideEmptySerial: true, fsize: "normal", displayJob: hasJobs && region.rawMaterialQueue }, matIdx))), region.groupedRawMat && region.groupedRawMat.length > 0
|
|
318
|
+
? region.groupedRawMat.map((matGroup, groupIdx) => matGroup.material.length === 1 ? (_jsx(InProcMaterial, { mat: matGroup.material[0], hideEmptySerial: true, fsize: "normal", displayJob: hasJobs && region.rawMaterialQueue }, groupIdx)) : (_jsx(MultiMaterial, { partOrCasting: matGroup.partOrCasting, assignedJobUnique: matGroup.assignedJobUnique, material: matGroup.material, fsize: "normal", onOpen: () => setMultiMaterialDialog(matGroup.material) }, idx)))
|
|
300
319
|
: undefined, region.rawMaterialQueue ? (hasJobs ? (_jsx(RawMaterialJobTable, { queue: region.label, editNote: setChangeNoteForJob, editQty: setEditQtyForJob })) : (_jsx(RawMaterialWorkorderTable, {}))) : undefined] })] }) }) }, idx))), _jsx(QueuedMaterialDialog, { queueNames: props.queues }), _jsx(AddBySerialDialog, {}), _jsx(AddByBarcodeDialog, {}), _jsx(BulkAddCastingWithoutSerialDialog, {}), _jsx(EditNoteDialog, { job: changeNoteForJob, closeDialog: closeChangeNoteDialog }), _jsx(EditJobPlanQtyDialog, { job: editQtyForJob, closeDialog: closeEditJobQtyDialog }), _jsx(WorkorderCommentDialog, {}), _jsx(MultiMaterialDialog, { material: multiMaterialDialog, closeDialog: closeMultiMatDialog, operator: operator })] }));
|
|
301
320
|
};
|
|
302
321
|
export default function QueuesPage(props) {
|
|
@@ -68,7 +68,9 @@ const ExpandMore = styled(ExpandMoreIcon, { shouldForwardProp: (prop) => prop.to
|
|
|
68
68
|
}),
|
|
69
69
|
}));
|
|
70
70
|
function SelectRawMaterial({ newMaterialTy, setNewMaterialTy, castings, indent, }) {
|
|
71
|
-
return (_jsx(List, { sx: indent ? (theme) => ({ pl: theme.spacing(4) }) : undefined, children: castings.map((casting) => (_jsx(ListItem, { children: _jsxs(ListItemButton, { selected: newMaterialTy?.kind === "RawMat" && newMaterialTy?.rawMatName === casting.casting, onClick: () => setNewMaterialTy({ kind: "RawMat", rawMatName: casting.casting }), children: [_jsx(ListItemIcon, { children: _jsx(PartIdenticon, { part: casting.casting }) }), _jsx(ListItemText, { primary: casting.casting,
|
|
71
|
+
return (_jsx(List, { sx: indent ? (theme) => ({ pl: theme.spacing(4) }) : undefined, children: castings.map((casting) => (_jsx(ListItem, { children: _jsxs(ListItemButton, { selected: newMaterialTy?.kind === "RawMat" && newMaterialTy?.rawMatName === casting.casting, onClick: () => setNewMaterialTy({ kind: "RawMat", rawMatName: casting.casting }), children: [_jsx(ListItemIcon, { children: _jsx(PartIdenticon, { part: casting.casting }) }), _jsx(ListItemText, { primary: casting.casting, secondary: casting.message ?? undefined, slotProps: {
|
|
72
|
+
primary: { variant: "h4" },
|
|
73
|
+
} })] }) }, casting.casting))) }));
|
|
72
74
|
}
|
|
73
75
|
function SelectJob({ newMaterialTy, setNewMaterialTy, curCollapse, setCurCollapse, indent, jobs, }) {
|
|
74
76
|
return (_jsx(List, { sx: indent ? (theme) => ({ pl: theme.spacing(4) }) : undefined, children: jobs.map((j, idx) => j.machinedProcs.length === 1 ? (_jsx("div", { children: _jsx(ListItem, { children: _jsxs(ListItemButton, { alignItems: "flex-start", selected: newMaterialTy?.kind === "JobAndProc" &&
|
|
@@ -86,14 +88,14 @@ function SelectJob({ newMaterialTy, setNewMaterialTy, curCollapse, setCurCollaps
|
|
|
86
88
|
setCurCollapse(curCollapse && curCollapse.kind === "Job" && curCollapse.unique === j.jobUnique
|
|
87
89
|
? null
|
|
88
90
|
: { kind: "Job", unique: j.jobUnique });
|
|
89
|
-
}, children: [_jsx(ListItemIcon, { children: _jsx(ExpandMore, { "$expandedOpen": curCollapse !== null && curCollapse.kind === "Job" && curCollapse.unique === j.jobUnique }) }), j.job ? (_jsx(ListItemIcon, { children: _jsx(PartIdenticon, { part: j.job.partName }) })) : undefined, _jsx(ListItemText, { primary: (j.job?.partName ?? "") + " (" + j.jobUnique + ")", slotProps: { primary: { variant: "h4" } }, secondary: j.job?.routeStartUTC.toLocaleDateString() })] }) }), _jsx(Collapse, { in: curCollapse !== null && curCollapse.kind === "Job" && curCollapse.unique === j.jobUnique, timeout: "auto", children: j.machinedProcs.map((p,
|
|
91
|
+
}, children: [_jsx(ListItemIcon, { children: _jsx(ExpandMore, { "$expandedOpen": curCollapse !== null && curCollapse.kind === "Job" && curCollapse.unique === j.jobUnique }) }), j.job ? (_jsx(ListItemIcon, { children: _jsx(PartIdenticon, { part: j.job.partName }) })) : undefined, _jsx(ListItemText, { primary: (j.job?.partName ?? "") + " (" + j.jobUnique + ")", slotProps: { primary: { variant: "h4" } }, secondary: j.job?.routeStartUTC.toLocaleDateString() })] }) }), _jsx(Collapse, { in: curCollapse !== null && curCollapse.kind === "Job" && curCollapse.unique === j.jobUnique, timeout: "auto", children: j.machinedProcs.map((p, procIdx) => (_jsx("div", { children: _jsx(ListItem, { sx: (theme) => ({ pl: theme.spacing(indent ? 8 : 4) }), children: _jsx(ListItemButton, { selected: newMaterialTy?.kind === "JobAndProc" &&
|
|
90
92
|
newMaterialTy?.jobUnique === j.jobUnique &&
|
|
91
93
|
newMaterialTy?.last_proc === p.lastProc, onClick: () => setNewMaterialTy({
|
|
92
94
|
kind: "JobAndProc",
|
|
93
95
|
jobUnique: j.jobUnique,
|
|
94
96
|
last_proc: p.lastProc,
|
|
95
97
|
workorder: j.workorder,
|
|
96
|
-
}), children: _jsx(ListItemText, { primary: p.lastProc === 0 ? "Raw Material" : "Last machined process " + p.lastProc.toString(), secondary: p.details }) }) }) },
|
|
98
|
+
}), children: _jsx(ListItemText, { primary: p.lastProc === 0 ? "Raw Material" : "Last machined process " + p.lastProc.toString(), secondary: p.details }) }) }) }, procIdx))) })] }, idx))) }));
|
|
97
99
|
}
|
|
98
100
|
function SelectRawMatAndJob({ newMaterialTy, options, setNewMaterialTy, curCollapse, setCurCollapse, }) {
|
|
99
101
|
return (_jsxs(List, { children: [_jsx(ListItem, { children: _jsxs(ListItemButton, { onClick: () => {
|
|
@@ -207,9 +209,9 @@ export function AddToQueueButton({ st: { enteredOperator, newMaterialTy, toQueue
|
|
|
207
209
|
(enteredOperator === null || enteredOperator === "")
|
|
208
210
|
? "Please enter an operator name"
|
|
209
211
|
: "", children: _jsx("span", { children: _jsx(Button, { color: "primary", disabled: toQueue === null ||
|
|
210
|
-
addingExistingMat
|
|
211
|
-
addingNewMat
|
|
212
|
-
addingNewCasting
|
|
212
|
+
addingExistingMat ||
|
|
213
|
+
addingNewMat ||
|
|
214
|
+
addingNewCasting ||
|
|
213
215
|
(existingMat === null && newMaterialTy === null) ||
|
|
214
216
|
(fmsInfo.requireOperatorNamePromptWhenAddingMaterial &&
|
|
215
217
|
(enteredOperator === null || enteredOperator === "")), onClick: () => {
|
|
@@ -89,7 +89,7 @@ export function SignalInspectionButton() {
|
|
|
89
89
|
export const SelectInspTypeDialog = memo(function SelectInspTypeDialog() {
|
|
90
90
|
const [dialogOpen, setDialogOpen] = useAtom(selectInspTypeDialogOpen);
|
|
91
91
|
let body;
|
|
92
|
-
if (dialogOpen
|
|
92
|
+
if (!dialogOpen) {
|
|
93
93
|
body = _jsx("p", { children: "None" });
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
@@ -90,7 +90,7 @@ function WorkorderList() {
|
|
|
90
90
|
export const SelectWorkorderDialog = memo(function SelectWorkorderDialog() {
|
|
91
91
|
const [workDialogOpen, setWorkDialogOpen] = useAtom(selectWorkorderDialogOpen);
|
|
92
92
|
let body;
|
|
93
|
-
if (workDialogOpen
|
|
93
|
+
if (!workDialogOpen) {
|
|
94
94
|
body = _jsx("p", { children: "None" });
|
|
95
95
|
}
|
|
96
96
|
else {
|
|
@@ -42,6 +42,7 @@ import { LazySeq } from "@seedtactics/immutable-collections";
|
|
|
42
42
|
import { SystemOverviewDialogButton } from "./SystemOverview.js";
|
|
43
43
|
import { useAtom, useAtomValue } from "jotai";
|
|
44
44
|
import { hideNonLoadingMaterialOnLoadStation } from "../../data/queue-material.js";
|
|
45
|
+
import { fmsInformation } from "../../network/server-settings.js";
|
|
45
46
|
const toolbarStyle = {
|
|
46
47
|
display: "flex",
|
|
47
48
|
backgroundColor: "#E0E0E0",
|
|
@@ -66,6 +67,9 @@ var StationMonitorType;
|
|
|
66
67
|
StationMonitorType["Queues"] = "Queues";
|
|
67
68
|
StationMonitorType["AllMaterial"] = "AllMaterial";
|
|
68
69
|
})(StationMonitorType || (StationMonitorType = {}));
|
|
70
|
+
function multiSelectValue(value) {
|
|
71
|
+
return typeof value === "string" ? value.split(",") : value;
|
|
72
|
+
}
|
|
69
73
|
function HideNonLoadingCheckbox() {
|
|
70
74
|
const [hide, setHide] = useAtom(hideNonLoadingMaterialOnLoadStation);
|
|
71
75
|
return (_jsx(FormControlLabel, { control: _jsx(Checkbox, { size: "small", checked: hide, onChange: (e) => setHide(e.target.checked) }), label: "Hide Non-Loading Material", sx: { pl: 2, pr: 2 } }));
|
|
@@ -73,7 +77,8 @@ function HideNonLoadingCheckbox() {
|
|
|
73
77
|
export function StationToolbar() {
|
|
74
78
|
const [route, setRoute] = useAtom(currentRoute);
|
|
75
79
|
const inspTypes = useAtomValue(last30InspectionTypes);
|
|
76
|
-
const queueNames = Object.keys(useAtomValue(currentStatus).queues).
|
|
80
|
+
const queueNames = LazySeq.of(Object.keys(useAtomValue(currentStatus).queues)).toSortedArray((x) => x);
|
|
81
|
+
const fmsInfo = useAtomValue(fmsInformation);
|
|
77
82
|
const theme = useTheme();
|
|
78
83
|
const full = useMediaQuery(theme.breakpoints.down("md"));
|
|
79
84
|
function setLoadNumber(valStr) {
|
|
@@ -150,7 +155,9 @@ export function StationToolbar() {
|
|
|
150
155
|
curType = StationMonitorType.AllMaterial;
|
|
151
156
|
break;
|
|
152
157
|
}
|
|
153
|
-
return (_jsxs(Box, { component: "nav", sx: full ? toolbarStyle : inHeaderStyle, children: [curType === StationMonitorType.LoadUnload ? (
|
|
158
|
+
return (_jsxs(Box, { component: "nav", sx: full ? toolbarStyle : inHeaderStyle, children: [curType === StationMonitorType.LoadUnload ? (fmsInfo.loadStationNames && Object.keys(fmsInfo.loadStationNames).length > 0 ? (_jsx(Select, { value: loadNum, onChange: (e) => setLoadNumber(e.target.value.toString()), variant: "standard", style: { marginLeft: "1em", minWidth: "8em" }, children: LazySeq.of(Object.entries(fmsInfo.loadStationNames))
|
|
159
|
+
.sortBy(([key]) => parseInt(key))
|
|
160
|
+
.map(([stationNum, name]) => (_jsx(MenuItem, { value: parseInt(stationNum), children: name }, stationNum))) }, "loadnumselect")) : (_jsx(Input, { type: "number", placeholder: "Load Station Number", value: loadNum, onChange: (e) => setLoadNumber(e.target.value), style: { width: "3em", marginLeft: "1em" } }, "loadnumselect"))) : undefined, curType === StationMonitorType.Inspection ? (_jsxs(Select, { value: curInspType || allInspSym, onChange: (e) => setInspType(e.target.value), variant: "standard", style: { marginLeft: "1em" }, children: [_jsx(MenuItem, { value: allInspSym, children: _jsx("em", { children: "All" }) }, allInspSym), LazySeq.of(inspTypes)
|
|
154
161
|
.sortBy((x) => x)
|
|
155
162
|
.map((ty) => (_jsx(MenuItem, { value: ty, children: ty }, ty)))] }, "inspselect")) : undefined, curType === StationMonitorType.LoadUnload ? (_jsxs(FormControl, { style: { marginLeft: "1em" }, children: [currentQueues.length === 0 ? (_jsx("label", { style: {
|
|
156
163
|
position: "absolute",
|
|
@@ -158,16 +165,21 @@ export function StationToolbar() {
|
|
|
158
165
|
left: 0,
|
|
159
166
|
color: "rgba(0,0,0,0.54)",
|
|
160
167
|
fontSize: "0.9rem",
|
|
161
|
-
}, children: "Display queue(s)" })) : undefined, _jsxs(Select, { multiple: true, displayEmpty: true, variant: "standard", value: currentQueues, inputProps: { id: "queueselect" }, style: { minWidth: "10em", marginTop: "0" }, onChange: (e) => setLoadQueues(e.target.value), children: [queueNames.map((q, idx) => (_jsx(MenuItem, { value: q, children: q }, idx))), _jsx(MenuItem, { value: completedSym, children: _jsx("i", { children: "Completed" }) }), _jsx(Divider, {}), _jsx(HideNonLoadingCheckbox, {})] })] })) : undefined, curType === StationMonitorType.Queues ? (_jsxs(FormControl, { style: { marginLeft: "1em", minWidth: "10em" }, children: [currentQueues.length === 0 ? (_jsx("label", { style: {
|
|
168
|
+
}, children: "Display queue(s)" })) : undefined, _jsxs(Select, { multiple: true, displayEmpty: true, variant: "standard", value: currentQueues, inputProps: { id: "queueselect" }, style: { minWidth: "10em", marginTop: "0" }, onChange: (e) => setLoadQueues(multiSelectValue(e.target.value)), children: [queueNames.map((q, idx) => (_jsx(MenuItem, { value: q, children: q }, idx))), _jsx(MenuItem, { value: completedSym, children: _jsx("i", { children: "Completed" }) }), _jsx(Divider, {}), _jsx(HideNonLoadingCheckbox, {})] })] })) : undefined, curType === StationMonitorType.Queues ? (_jsxs(FormControl, { style: { marginLeft: "1em", minWidth: "10em" }, children: [currentQueues.length === 0 ? (_jsx("label", { style: {
|
|
162
169
|
position: "absolute",
|
|
163
170
|
top: "10px",
|
|
164
171
|
left: 0,
|
|
165
172
|
color: "rgba(0,0,0,0.54)",
|
|
166
173
|
fontSize: "0.9rem",
|
|
167
|
-
}, children: "Select queue(s)" })) : undefined, _jsx(Select, { multiple: true, displayEmpty: true, variant: "standard", value: currentQueues, inputProps: { id: "queueselect" }, style: { marginTop: "0" }, onChange: (e) => setStandaloneQueues(e.target.value), children: queueNames.map((q, idx) => (_jsx(MenuItem, { value: q, children: q }, idx))) })] })) : undefined] }));
|
|
174
|
+
}, children: "Select queue(s)" })) : undefined, _jsx(Select, { multiple: true, displayEmpty: true, variant: "standard", value: currentQueues, inputProps: { id: "queueselect" }, style: { marginTop: "0" }, onChange: (e) => setStandaloneQueues(multiSelectValue(e.target.value)), children: queueNames.map((q, idx) => (_jsx(MenuItem, { value: q, children: q }, idx))) })] })) : undefined] }));
|
|
168
175
|
}
|
|
169
176
|
export function StationToolbarOverviewButton() {
|
|
170
177
|
const theme = useTheme();
|
|
171
178
|
const full = useMediaQuery(theme.breakpoints.down("md"));
|
|
172
|
-
return (_jsx(Box, {
|
|
179
|
+
return (_jsx(Box, { sx: {
|
|
180
|
+
display: "flex",
|
|
181
|
+
alignItems: "center",
|
|
182
|
+
height: "100%",
|
|
183
|
+
bgcolor: full ? "#E0E0E0" : undefined,
|
|
184
|
+
}, children: _jsx(SystemOverviewDialogButton, { full: full }) }));
|
|
173
185
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { IInProcessMaterial, IPalletStatus } from "../../network/api.js";
|
|
1
|
+
import { IBasketStatus, IInProcessMaterial, IPalletStatus } from "../../network/api.js";
|
|
2
2
|
import { OrderedMap } from "@seedtactics/immutable-collections";
|
|
3
3
|
type PalletAndMaterial = {
|
|
4
4
|
readonly pallet: Readonly<IPalletStatus>;
|
|
5
5
|
readonly mats: ReadonlyArray<Readonly<IInProcessMaterial>>;
|
|
6
6
|
};
|
|
7
|
+
type BasketAndMaterial = {
|
|
8
|
+
readonly basket: Readonly<IBasketStatus>;
|
|
9
|
+
readonly mats: ReadonlyArray<Readonly<IInProcessMaterial>>;
|
|
10
|
+
};
|
|
7
11
|
type MachineStatus = {
|
|
8
12
|
readonly name: string;
|
|
9
13
|
readonly inbound: PalletAndMaterial | null;
|
|
@@ -13,6 +17,13 @@ type MachineStatus = {
|
|
|
13
17
|
type LoadStatus = {
|
|
14
18
|
readonly lulNum: number;
|
|
15
19
|
readonly pal: PalletAndMaterial | null;
|
|
20
|
+
readonly basket: BasketAndMaterial | null;
|
|
21
|
+
readonly staging: ReadonlyArray<BasketAndMaterial>;
|
|
22
|
+
readonly sources: ReadonlyArray<{
|
|
23
|
+
readonly key: string;
|
|
24
|
+
readonly label: string;
|
|
25
|
+
readonly mats: ReadonlyArray<Readonly<IInProcessMaterial>>;
|
|
26
|
+
}>;
|
|
16
27
|
};
|
|
17
28
|
type MachineAtLoadStatus = {
|
|
18
29
|
readonly lulNum: number;
|
|
@@ -29,8 +40,15 @@ type CellOverview = {
|
|
|
29
40
|
readonly machines: OrderedMap<string, ReadonlyArray<MachineStatus>>;
|
|
30
41
|
readonly loads: ReadonlyArray<LoadStatus>;
|
|
31
42
|
readonly stockerPals: ReadonlyArray<PalletAndMaterial>;
|
|
43
|
+
readonly floatingBaskets: ReadonlyArray<BasketAndMaterial>;
|
|
44
|
+
readonly storageBaskets: {
|
|
45
|
+
readonly empty: number;
|
|
46
|
+
readonly filled: number;
|
|
47
|
+
} | null;
|
|
32
48
|
readonly machineAtLoad: ReadonlyArray<MachineAtLoadStatus>;
|
|
33
49
|
readonly maxNumFacesOnPallet: number;
|
|
50
|
+
readonly maxNumStagingRows: number;
|
|
51
|
+
readonly maxNumSourceRows: number;
|
|
34
52
|
};
|
|
35
53
|
export declare function formatSeconds(totalSeconds: number): string;
|
|
36
54
|
export declare const SystemOverview: import("react").MemoExoticComponent<({ overview }: {
|