@seedtactics/insight-client 17.0.1-beta.2 → 17.0.1-beta.4
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-C6zSEXCX.js +3 -0
- package/dist/assets/index-C6EBFHuW.js +388 -0
- package/dist/components/LogEntry.js +0 -71
- package/dist/components/log-entry-container-name.d.ts +2 -2
- package/dist/components/log-entry-container-name.js +1 -7
- package/dist/components/operations/CompletedParts.js +10 -10
- package/dist/components/operations/Programs.js +24 -17
- package/dist/components/operations/Rebookings.js +1 -1
- package/dist/components/quality/RecentFailedInspections.js +1 -1
- package/dist/components/routes.js +1 -2
- package/dist/components/station-monitor/BasketMovementArrival.d.ts +4 -2
- package/dist/components/station-monitor/BasketMovementArrival.js +23 -33
- package/dist/components/station-monitor/BulkRawMaterial.js +25 -14
- package/dist/components/station-monitor/InvalidateCycle.js +1 -1
- package/dist/components/station-monitor/LoadStation.js +33 -13
- package/dist/components/station-monitor/Material.js +28 -28
- package/dist/components/station-monitor/PrintedLabel.js +2 -2
- package/dist/components/station-monitor/QuarantineButton.js +4 -4
- package/dist/components/station-monitor/SystemOverview.js +31 -27
- package/dist/data/all-material-bins.js +15 -11
- package/dist/data/current-cycles.js +6 -3
- package/dist/data/inspection-sankey.js +1 -1
- package/dist/data/results.completed-parts.js +1 -1
- package/dist/data/results.cycles.js +1 -1
- package/dist/data/results.schedules.js +1 -1
- package/dist/index.html +1 -1
- package/dist/network/api.d.ts +7 -18
- package/dist/network/api.js +2 -25
- package/package.json +20 -20
- package/dist/assets/ProgramHighlight-DPTeZ8Si.js +0 -3
- package/dist/assets/index-C4HZdhRu.js +0 -388
|
@@ -31,7 +31,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
31
31
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
32
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
33
|
*/
|
|
34
|
-
import { PureComponent,
|
|
34
|
+
import { PureComponent, memo, useState, Suspense, } from "react";
|
|
35
35
|
import * as jdenticon from "jdenticon";
|
|
36
36
|
import { Typography, Badge, Box, ButtonBase, Button, Tooltip, Avatar, Paper, CircularProgress, TextField, Dialog, DialogActions, DialogContent, DialogTitle, keyframes, styled, } from "@mui/material";
|
|
37
37
|
import TimeAgo from "react-timeago";
|
|
@@ -338,54 +338,54 @@ export function WorkorderFromBarcode() {
|
|
|
338
338
|
const comments = currentSt.workorders?.find((w) => w.workorderId === workorderId)?.comments ?? [];
|
|
339
339
|
return (_jsxs("div", { style: { marginTop: "1em", marginLeft: "1em" }, children: [_jsxs("p", { children: ["Workorder: ", workorderId] }), _jsx("ul", { children: comments.map((c, idx) => (_jsx("li", { children: c.comment }, idx))) })] }));
|
|
340
340
|
}
|
|
341
|
-
const MatCard =
|
|
341
|
+
const MatCard = function MatCard({ mat, inProcMat, fsize, focusInspectionType, isDragOverlay, isActiveDrag, shake, dragRootProps, showDragHandle, setDragHandleRef, dragHandleProps, displayJob, hideEmptySerial, showRawMaterial, showJobComment, displayActionForSinglePallet, hideAvatar, hideWarningIcon, ref, }) {
|
|
342
342
|
const setMatToShow = useSetAtom(matDetails.materialDialogOpen);
|
|
343
|
-
const completed =
|
|
343
|
+
const completed = mat.completedInspections || {};
|
|
344
344
|
let completedMsg;
|
|
345
|
-
if (
|
|
346
|
-
completedMsg = (_jsxs(MatCardDetail, { fsize:
|
|
345
|
+
if (focusInspectionType && completed[focusInspectionType]) {
|
|
346
|
+
completedMsg = (_jsxs(MatCardDetail, { fsize: fsize, children: [_jsx("span", { children: "Inspection completed " }), _jsx(TimeAgo, { date: completed[focusInspectionType].time })] }));
|
|
347
347
|
}
|
|
348
|
-
else if (
|
|
349
|
-
completedMsg = (_jsxs(MatCardDetail, { fsize:
|
|
348
|
+
else if (focusInspectionType && mat.last_unload_time) {
|
|
349
|
+
completedMsg = (_jsxs(MatCardDetail, { fsize: fsize, children: [_jsx("span", { children: "Unloaded " }), _jsx(TimeAgo, { date: mat.last_unload_time })] }));
|
|
350
350
|
}
|
|
351
|
-
else if (
|
|
352
|
-
completedMsg = (_jsxs(MatCardDetail, { fsize:
|
|
351
|
+
else if (mat.closeout_completed) {
|
|
352
|
+
completedMsg = (_jsxs(MatCardDetail, { fsize: fsize, children: [_jsxs("span", { children: [mat.closeout_failed ? "Failed " : "", "Closed Out "] }), _jsx(TimeAgo, { date: mat.closeout_completed })] }));
|
|
353
353
|
}
|
|
354
354
|
return (_jsxs(Paper, { ref: ref, elevation: 4, sx: {
|
|
355
355
|
display: "flex",
|
|
356
356
|
minWidth: "10em",
|
|
357
357
|
padding: "8px",
|
|
358
|
-
margin:
|
|
359
|
-
opacity:
|
|
360
|
-
animation:
|
|
358
|
+
margin: isDragOverlay ? undefined : "8px",
|
|
359
|
+
opacity: isActiveDrag ? 0.2 : 1,
|
|
360
|
+
animation: shake ? shakeHorizAnimation : undefined,
|
|
361
361
|
"&:hover": {
|
|
362
362
|
animationPlayState: "paused",
|
|
363
363
|
},
|
|
364
|
-
}, onAnimationIteration: shakeAnimationIteration, ...
|
|
364
|
+
}, onAnimationIteration: shakeAnimationIteration, ...dragRootProps, children: [showDragHandle ? (_jsx("div", { ref: setDragHandleRef, role: "button", tabIndex: 0, style: {
|
|
365
365
|
display: "flex",
|
|
366
366
|
flexDirection: "column",
|
|
367
367
|
justifyContent: "center",
|
|
368
|
-
cursor:
|
|
368
|
+
cursor: isDragOverlay ? "grabbing" : "grab",
|
|
369
369
|
touchAction: "none",
|
|
370
|
-
}, ...
|
|
371
|
-
? { type: "InProcMat", inproc:
|
|
372
|
-
: { type: "MatSummary", summary:
|
|
370
|
+
}, ...dragHandleProps, children: _jsx(DragIndicator, { fontSize: "large", color: "action" }) })) : undefined, _jsx(ButtonBase, { focusRipple: true, sx: { width: "100%" }, onClick: () => setMatToShow(inProcMat
|
|
371
|
+
? { type: "InProcMat", inproc: inProcMat }
|
|
372
|
+
: { type: "MatSummary", summary: mat }), children: _jsxs(Box, { sx: {
|
|
373
373
|
display: "flex",
|
|
374
374
|
textAlign: "left",
|
|
375
375
|
alignItems: "center",
|
|
376
376
|
width: "100%",
|
|
377
|
-
}, children: [_jsx(PartIdenticon, { part:
|
|
377
|
+
}, children: [_jsx(PartIdenticon, { part: mat.partName }), _jsxs(Box, { sx: {
|
|
378
378
|
marginLeft: "8px",
|
|
379
379
|
flexGrow: 1,
|
|
380
380
|
minWidth: 0,
|
|
381
|
-
}, children: [_jsx(MatCardHeader, { fsize:
|
|
382
|
-
? "Assigned to " +
|
|
383
|
-
: "Unassigned material" })) : undefined, !
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
381
|
+
}, children: [_jsx(MatCardHeader, { fsize: fsize, children: mat.partName }), displayJob ? (_jsx(MatCardDetail, { fsize: fsize, children: mat.jobUnique && mat.jobUnique !== ""
|
|
382
|
+
? "Assigned to " + mat.jobUnique
|
|
383
|
+
: "Unassigned material" })) : undefined, !hideEmptySerial || mat.serial ? (_jsxs(MatCardDetail, { fsize: fsize, children: ["Serial: ", mat.serial ? mat.serial : "none"] })) : undefined, mat.workorderId === undefined ||
|
|
384
|
+
mat.workorderId === "" ||
|
|
385
|
+
mat.workorderId === mat.serial ? undefined : (_jsxs(MatCardDetail, { fsize: fsize, children: ["Workorder: ", mat.workorderId] })), mat.jobUnique !== undefined &&
|
|
386
|
+
showRawMaterial &&
|
|
387
|
+
inProcMat &&
|
|
388
|
+
inProcMat.process === 0 ? (_jsx(JobRawMaterial, { fsize: fsize, mat: inProcMat })) : undefined, showJobComment && mat.jobUnique && mat.jobUnique !== "" ? (_jsx(RebookingNoteElipsis, { fsize: fsize, uniq: mat.jobUnique })) : undefined, inProcMat ? (_jsx(MaterialAction, { mat: inProcMat, displayActionForSinglePallet: displayActionForSinglePallet, fsize: fsize })) : undefined, inProcMat?.problem ? (_jsx(MatCardDetail, { fsize: fsize, children: _jsxs(Typography, { variant: "body2", color: "error", sx: { fontWeight: "bold" }, children: ["\u26A0 ", inProcMat.problem] }) })) : undefined, completedMsg] }), _jsxs(Box, { sx: {
|
|
389
389
|
marginLeft: "4px",
|
|
390
390
|
display: "flex",
|
|
391
391
|
flexDirection: "column",
|
|
@@ -393,8 +393,8 @@ const MatCard = forwardRef(function MatCard(props, ref) {
|
|
|
393
393
|
alignItems: "flex-end",
|
|
394
394
|
alignSelf: "start",
|
|
395
395
|
flexShrink: 0,
|
|
396
|
-
}, children: [
|
|
397
|
-
}
|
|
396
|
+
}, children: [mat.serial && mat.serial.length >= 1 && !hideAvatar ? (_jsx("div", { children: _jsx(Avatar, { style: { width: "30px", height: "30px" }, children: mat.serial.slice(-1) }) })) : undefined, hideWarningIcon ? undefined : (_jsx("div", { children: _jsx(Warning, { mat: mat }) }))] })] }) })] }));
|
|
397
|
+
};
|
|
398
398
|
export const MatSummary = memo(MatCard);
|
|
399
399
|
export const InProcMaterial = memo(function InProcMaterial(props) {
|
|
400
400
|
return (_jsx(MatCard, { mat: inproc_mat_to_summary(props.mat), inProcMat: props.mat, displayActionForSinglePallet: props.displayActionForSinglePallet, fsize: props.fsize, hideAvatar: props.hideAvatar, displayJob: props.displayJob, showDragHandle: props.showHandle, hideEmptySerial: props.hideEmptySerial, showRawMaterial: props.showRawMaterial, showJobComment: props.showJobComment, shake: props.shake }));
|
|
@@ -89,7 +89,7 @@ function OneJobPerPage(props) {
|
|
|
89
89
|
serial2: mats[mats.length - 1]?.serial,
|
|
90
90
|
},
|
|
91
91
|
])
|
|
92
|
-
.toSortedArray(([
|
|
92
|
+
.toSortedArray(([, p]) => p.part), [props.material, allJobs]);
|
|
93
93
|
if (!props.material || props.material.length === 0) {
|
|
94
94
|
return _jsx("div", {});
|
|
95
95
|
}
|
|
@@ -105,7 +105,7 @@ function CombinedToOnePage(props) {
|
|
|
105
105
|
.filter((m) => m.jobUnique !== null && m.jobUnique !== undefined && m.jobUnique !== "")
|
|
106
106
|
.groupBy((m) => m.jobUnique)
|
|
107
107
|
.map(([k, mats]) => [k, { length: mats.length, part: mats[0]?.partName ?? "" }])
|
|
108
|
-
.toSortedArray(([
|
|
108
|
+
.toSortedArray(([, p]) => p.part), [props.material]);
|
|
109
109
|
const allJobs = useAtomValue(currentStatus).jobs;
|
|
110
110
|
const notes = useMemo(() => LazySeq.of(props.material || [])
|
|
111
111
|
.collect((m) => (m.jobUnique ? allJobs[m.jobUnique]?.comment : undefined))
|
|
@@ -62,7 +62,7 @@ function useQuarantineMaterial() {
|
|
|
62
62
|
return null;
|
|
63
63
|
const quarantineQueue = fmsInfo.quarantineQueue?.length ? fmsInfo.quarantineQueue : null;
|
|
64
64
|
const activeQueues = LazySeq.ofObject(curSt.jobs)
|
|
65
|
-
.flatMap(([
|
|
65
|
+
.flatMap(([, job]) => job.procsAndPaths)
|
|
66
66
|
.flatMap((proc) => proc.paths)
|
|
67
67
|
.flatMap((path) => {
|
|
68
68
|
const q = [];
|
|
@@ -74,11 +74,11 @@ function useQuarantineMaterial() {
|
|
|
74
74
|
})
|
|
75
75
|
.concat(LazySeq.ofObject(curSt.queues)
|
|
76
76
|
.filter(([, info]) => info.role === QueueRole.RawMaterial || info.role === QueueRole.InProcessTransfer)
|
|
77
|
-
.map(([qname
|
|
77
|
+
.map(([qname]) => qname))
|
|
78
78
|
.toRSet((x) => x);
|
|
79
79
|
const quarantineQueues = LazySeq.ofObject(curSt.queues)
|
|
80
|
-
.filter(([qname
|
|
81
|
-
.toRSet(([qname
|
|
80
|
+
.filter(([qname]) => !activeQueues.has(qname))
|
|
81
|
+
.toRSet(([qname]) => qname);
|
|
82
82
|
// If in a quarantine queue, allow removal from system
|
|
83
83
|
if (inProcMat.location.type === LocType.InQueue &&
|
|
84
84
|
inProcMat.location.currentQueue &&
|
|
@@ -68,8 +68,8 @@ function useCellOverview() {
|
|
|
68
68
|
m.action.loadToBasketId !== undefined))
|
|
69
69
|
.toRLookup((m) => m.location.basketId ?? m.action.loadToBasketId ?? 0);
|
|
70
70
|
let loads = LazySeq.ofObject(currentSt.pallets)
|
|
71
|
-
.filter(([
|
|
72
|
-
.toOrderedMap(([
|
|
71
|
+
.filter(([, p]) => p.currentPalletLocation.loc === PalletLocationEnum.LoadUnload)
|
|
72
|
+
.toOrderedMap(([, p]) => [
|
|
73
73
|
p.currentPalletLocation.num,
|
|
74
74
|
{
|
|
75
75
|
lulNum: p.currentPalletLocation.num,
|
|
@@ -82,7 +82,7 @@ function useCellOverview() {
|
|
|
82
82
|
let machines = LazySeq.ofObject(currentSt.pallets)
|
|
83
83
|
.filter(([, p]) => p.currentPalletLocation.loc === PalletLocationEnum.Machine ||
|
|
84
84
|
p.currentPalletLocation.loc === PalletLocationEnum.MachineQueue)
|
|
85
|
-
.map(([
|
|
85
|
+
.map(([, p]) => p)
|
|
86
86
|
.groupBy((p) => p.currentPalletLocation.group, (p) => p.currentPalletLocation.num)
|
|
87
87
|
.toLookupOrderedMap(([[statGroup, _statNum], _pals]) => statGroup, ([[_statGroup, statNum], _pals]) => statNum, ([[statGroup, statNum], pals]) => {
|
|
88
88
|
const worktable = pals.find((p) => p.currentPalletLocation.loc === PalletLocationEnum.Machine);
|
|
@@ -117,9 +117,9 @@ function useCellOverview() {
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
const stockerPals = LazySeq.ofObject(currentSt.pallets)
|
|
120
|
-
.filter(([
|
|
120
|
+
.filter(([, p]) => p.currentPalletLocation.loc === PalletLocationEnum.Buffer ||
|
|
121
121
|
p.currentPalletLocation.loc === PalletLocationEnum.Cart)
|
|
122
|
-
.collect(([
|
|
122
|
+
.collect(([, p]) => {
|
|
123
123
|
const mats = matByPal.get(p.palletNum);
|
|
124
124
|
if (!mats || mats.length === 0)
|
|
125
125
|
return null;
|
|
@@ -134,7 +134,7 @@ function useCellOverview() {
|
|
|
134
134
|
const allProcs = jobs
|
|
135
135
|
.valuesToLazySeq()
|
|
136
136
|
.filter((j) => j.routeEndUTC > cutoff)
|
|
137
|
-
.concat(LazySeq.ofObject(currentSt.jobs).map(([
|
|
137
|
+
.concat(LazySeq.ofObject(currentSt.jobs).map(([, j]) => j))
|
|
138
138
|
.flatMap((j) => j.procsAndPaths)
|
|
139
139
|
.toRArray();
|
|
140
140
|
for (const proc of allProcs) {
|
|
@@ -246,13 +246,18 @@ function useCellOverview() {
|
|
|
246
246
|
let storageEmpty = 0;
|
|
247
247
|
let storageFilled = 0;
|
|
248
248
|
for (const basket of LazySeq.ofObject(currentSt.baskets ?? {})
|
|
249
|
-
.map(([
|
|
249
|
+
.map(([, b]) => b)
|
|
250
250
|
.sortBy((b) => b.basketId)) {
|
|
251
251
|
const basketWithMaterial = {
|
|
252
252
|
basket,
|
|
253
253
|
mats: matByBasket.get(basket.basketId) ?? [],
|
|
254
254
|
};
|
|
255
|
-
|
|
255
|
+
const position = basket.position;
|
|
256
|
+
if (position === undefined) {
|
|
257
|
+
floatingBaskets.set(basket.basketId, basketWithMaterial);
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
switch (position.location) {
|
|
256
261
|
case BasketLocationEnum.Storage:
|
|
257
262
|
if (basketWithMaterial.mats.length > 0) {
|
|
258
263
|
storageFilled += 1;
|
|
@@ -263,14 +268,12 @@ function useCellOverview() {
|
|
|
263
268
|
break;
|
|
264
269
|
case BasketLocationEnum.LoadUnload:
|
|
265
270
|
case BasketLocationEnum.LoadStationStaging: {
|
|
266
|
-
const loadNum =
|
|
271
|
+
const loadNum = position.locationNum;
|
|
267
272
|
if (loadNum === null) {
|
|
268
273
|
floatingBaskets.set(basket.basketId, basketWithMaterial);
|
|
269
274
|
break;
|
|
270
275
|
}
|
|
271
|
-
const byLoad =
|
|
272
|
-
? activeBaskets
|
|
273
|
-
: stagedBaskets;
|
|
276
|
+
const byLoad = position.location === BasketLocationEnum.LoadUnload ? activeBaskets : stagedBaskets;
|
|
274
277
|
const prev = byLoad.get(loadNum) ?? [];
|
|
275
278
|
prev.push(basketWithMaterial);
|
|
276
279
|
byLoad.set(loadNum, prev);
|
|
@@ -281,8 +284,6 @@ function useCellOverview() {
|
|
|
281
284
|
break;
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
|
-
let maxNumStagingRows = 0;
|
|
285
|
-
let maxNumSourceRows = 0;
|
|
286
287
|
loads = loads.mapValues((load) => {
|
|
287
288
|
const sourceRows = new Map();
|
|
288
289
|
const sourceMats = LazySeq.of(load.pal?.mats ?? load.basket?.mats ?? [])
|
|
@@ -320,7 +321,7 @@ function useCellOverview() {
|
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
const currentBasket = LazySeq.of(activeBaskets.get(load.lulNum) ?? [])
|
|
323
|
-
.sortBy((b) => b.basket.position
|
|
324
|
+
.sortBy((b) => b.basket.position?.locationNum ?? 0)
|
|
324
325
|
.toRArray();
|
|
325
326
|
// Extras beyond the first active basket at this station fall back to floating
|
|
326
327
|
for (const extra of currentBasket.slice(1)) {
|
|
@@ -331,14 +332,12 @@ function useCellOverview() {
|
|
|
331
332
|
.toRArray());
|
|
332
333
|
const staging = LazySeq.of(stagedBaskets.get(load.lulNum) ?? [])
|
|
333
334
|
.filter((basket) => !loadingFromBasketIds.has(basket.basket.basketId))
|
|
334
|
-
.sortBy((b) => b.basket.position
|
|
335
|
+
.sortBy((b) => b.basket.position?.locationNum ?? 0)
|
|
335
336
|
.toRArray();
|
|
336
|
-
maxNumStagingRows = Math.max(maxNumStagingRows, staging.length);
|
|
337
337
|
const sources = LazySeq.of(sourceRows)
|
|
338
338
|
.map(([key, row]) => ({ key, label: row.label, mats: row.mats }))
|
|
339
339
|
.sortBy((row) => row.label)
|
|
340
340
|
.toRArray();
|
|
341
|
-
maxNumSourceRows = Math.max(maxNumSourceRows, sources.length);
|
|
342
341
|
return {
|
|
343
342
|
...load,
|
|
344
343
|
basket: currentBasket[0] ?? null,
|
|
@@ -354,15 +353,20 @@ function useCellOverview() {
|
|
|
354
353
|
storageBaskets: storageEmpty + storageFilled > 0 ? { empty: storageEmpty, filled: storageFilled } : null,
|
|
355
354
|
machineAtLoad: machAtLoad.valuesToAscLazySeq().toRArray(),
|
|
356
355
|
maxNumFacesOnPallet,
|
|
357
|
-
maxNumStagingRows
|
|
358
|
-
|
|
356
|
+
maxNumStagingRows: loads
|
|
357
|
+
.valuesToAscLazySeq()
|
|
358
|
+
.map((l) => l.staging.length)
|
|
359
|
+
.maxBy((l) => l) ?? 0,
|
|
360
|
+
maxNumSourceRows: loads
|
|
361
|
+
.valuesToAscLazySeq()
|
|
362
|
+
.map((l) => l.sources.length)
|
|
363
|
+
.maxBy((l) => l) ?? 0,
|
|
359
364
|
};
|
|
360
365
|
}
|
|
361
366
|
function MaterialIcon({ mats }) {
|
|
362
367
|
const [open, setOpen] = useState(false);
|
|
363
368
|
const closeTimeout = useRef(null);
|
|
364
|
-
const
|
|
365
|
-
const [menuOpen, setMenuOpen] = useState(false);
|
|
369
|
+
const [menuAnchorEl, setMenuAnchorEl] = useState(null);
|
|
366
370
|
const setMatToShow = useSetAtom(materialDialogOpen);
|
|
367
371
|
const curSt = useAtomValue(currentStatus);
|
|
368
372
|
function enter() {
|
|
@@ -378,12 +382,12 @@ function MaterialIcon({ mats }) {
|
|
|
378
382
|
closeTimeout.current = null;
|
|
379
383
|
}, 200);
|
|
380
384
|
}
|
|
381
|
-
function click() {
|
|
385
|
+
function click(evt) {
|
|
382
386
|
if (mats.length === 1) {
|
|
383
387
|
setMatToShow({ type: "MatDetails", details: mats[0] });
|
|
384
388
|
}
|
|
385
389
|
else {
|
|
386
|
-
|
|
390
|
+
setMenuAnchorEl(evt.currentTarget);
|
|
387
391
|
}
|
|
388
392
|
}
|
|
389
393
|
function faceName(pallet, faceNum) {
|
|
@@ -399,7 +403,7 @@ function MaterialIcon({ mats }) {
|
|
|
399
403
|
zIndex: open ? 10 : 0,
|
|
400
404
|
width: "max-content",
|
|
401
405
|
height: "max-content",
|
|
402
|
-
}, children: _jsx(Badge, { badgeContent: mats.length > 1 ? mats.length : 0, color: "secondary", children: _jsx(ButtonBase, { focusRipple: true, onClick: click,
|
|
406
|
+
}, children: _jsx(Badge, { badgeContent: mats.length > 1 ? mats.length : 0, color: "secondary", children: _jsx(ButtonBase, { focusRipple: true, onClick: click, children: _jsx(Collapse, { orientation: "horizontal", in: open, collapsedSize: CollapsedIconSize, children: _jsxs(Box, { sx: {
|
|
403
407
|
display: "flex",
|
|
404
408
|
}, children: [_jsx(PartIdenticon, { part: mats[0].partName, size: CollapsedIconSize }), _jsx(Box, { sx: {
|
|
405
409
|
marginLeft: "10px",
|
|
@@ -409,8 +413,8 @@ function MaterialIcon({ mats }) {
|
|
|
409
413
|
}, children: _jsx(Collapse, { in: open, collapsedSize: CollapsedIconSize, children: _jsxs(Stack, { direction: "column", sx: {
|
|
410
414
|
marginBottom: "0.2em",
|
|
411
415
|
}, children: [_jsxs(Typography, { variant: "h6", children: [mats[0].partName, "-", mats[0].process] }), _jsx("div", { children: _jsx("small", { children: faceName(mats[0].location.palletNum, mats[0].location.face) ??
|
|
412
|
-
faceName(mats[0].action.loadOntoPalletNum, mats[0].action.loadOntoFace) }) }), LazySeq.of(mats).collect((mat) => mat.serial ? (_jsx("div", { children: _jsxs("small", { children: ["Serial: ", mat.serial] }) }, mat.materialID)) : undefined), _jsx("div", { children: _jsx(MaterialAction, { mat: mats[0] }) })] }) }) })] }) }) }) }) }), _jsx(Menu, { anchorEl:
|
|
413
|
-
|
|
416
|
+
faceName(mats[0].action.loadOntoPalletNum, mats[0].action.loadOntoFace) }) }), LazySeq.of(mats).collect((mat) => mat.serial ? (_jsx("div", { children: _jsxs("small", { children: ["Serial: ", mat.serial] }) }, mat.materialID)) : undefined), _jsx("div", { children: _jsx(MaterialAction, { mat: mats[0] }) })] }) }) })] }) }) }) }) }), _jsx(Menu, { anchorEl: menuAnchorEl, open: Boolean(menuAnchorEl), onClose: () => setMenuAnchorEl(null), anchorOrigin: { vertical: "top", horizontal: "left" }, children: LazySeq.of(mats).map((mat, idx) => (_jsx(MenuItem, { onClick: () => {
|
|
417
|
+
setMenuAnchorEl(null);
|
|
414
418
|
setMatToShow({ type: "MatDetails", details: mat });
|
|
415
419
|
}, children: mat.serial && mat.serial !== "" ? mat.serial : (idx + 1).toString() }, mat.materialID))) })] }));
|
|
416
420
|
}
|
|
@@ -62,15 +62,18 @@ export var MaterialBinType;
|
|
|
62
62
|
MaterialBinType["QuarantineQueues"] = "Bin_Quarantine";
|
|
63
63
|
})(MaterialBinType || (MaterialBinType = {}));
|
|
64
64
|
function basketLocation(st) {
|
|
65
|
+
const position = st.position;
|
|
66
|
+
if (position === undefined)
|
|
67
|
+
return "Unknown";
|
|
65
68
|
let loc;
|
|
66
|
-
if (
|
|
67
|
-
loc =
|
|
69
|
+
if (position.locationTitle && position.locationTitle.length > 0) {
|
|
70
|
+
loc = position.locationTitle;
|
|
68
71
|
}
|
|
69
72
|
else {
|
|
70
|
-
loc =
|
|
73
|
+
loc = position.location + " " + position.locationNum.toString();
|
|
71
74
|
}
|
|
72
|
-
if (
|
|
73
|
-
loc += `-${
|
|
75
|
+
if (position.zone) {
|
|
76
|
+
loc += `-${position.zone}`;
|
|
74
77
|
}
|
|
75
78
|
return loc;
|
|
76
79
|
}
|
|
@@ -128,8 +131,9 @@ export function selectAllMaterialIntoBins(curSt, curBinOrder) {
|
|
|
128
131
|
}
|
|
129
132
|
case api.ActionType.LoadingToBasket: {
|
|
130
133
|
const basket = curSt.baskets?.[mat.action.loadToBasketId ?? 0];
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
const position = basket?.position;
|
|
135
|
+
if (position?.location === api.BasketLocationEnum.LoadUnload) {
|
|
136
|
+
addToMap(loadStations, position.locationNum, mat);
|
|
133
137
|
}
|
|
134
138
|
else {
|
|
135
139
|
addToMap(queues, "Free Material", mat);
|
|
@@ -149,7 +153,7 @@ export function selectAllMaterialIntoBins(curSt, curBinOrder) {
|
|
|
149
153
|
}
|
|
150
154
|
}
|
|
151
155
|
const activeQueues = LazySeq.ofObject(curSt.jobs)
|
|
152
|
-
.flatMap(([
|
|
156
|
+
.flatMap(([, job]) => job.procsAndPaths)
|
|
153
157
|
.flatMap((proc) => proc.paths)
|
|
154
158
|
.flatMap((path) => {
|
|
155
159
|
const q = [];
|
|
@@ -162,11 +166,11 @@ export function selectAllMaterialIntoBins(curSt, curBinOrder) {
|
|
|
162
166
|
.concat(LazySeq.ofObject(curSt.queues)
|
|
163
167
|
.filter(([, info]) => info.role === api.QueueRole.RawMaterial ||
|
|
164
168
|
info.role === api.QueueRole.InProcessTransfer)
|
|
165
|
-
.map(([qname
|
|
169
|
+
.map(([qname]) => qname))
|
|
166
170
|
.toRSet((x) => x);
|
|
167
171
|
const quarantineQueues = LazySeq.ofObject(curSt.queues)
|
|
168
|
-
.filter(([qname
|
|
169
|
-
.toRSet(([qname
|
|
172
|
+
.filter(([qname]) => !activeQueues.has(qname))
|
|
173
|
+
.toRSet(([qname]) => qname);
|
|
170
174
|
const bins = curBinOrder.filter((b) => b === LoadStationBinId ||
|
|
171
175
|
b === PalletsBinId ||
|
|
172
176
|
b === ActiveQueuesBinId ||
|
|
@@ -39,9 +39,12 @@ import { durationToMinutes, durationToSeconds } from "../util/parseISODuration.j
|
|
|
39
39
|
function basketsAtLoad(currentSt) {
|
|
40
40
|
return LazySeq.ofObject(currentSt.baskets ?? {})
|
|
41
41
|
.collect(([, basket]) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return
|
|
42
|
+
const position = basket.position;
|
|
43
|
+
if (position === undefined)
|
|
44
|
+
return null;
|
|
45
|
+
if (position.location === BasketLocationEnum.LoadUnload ||
|
|
46
|
+
position.location === BasketLocationEnum.LoadStationStaging) {
|
|
47
|
+
return [basket.basketId, { group: "L/U", num: position.locationNum }];
|
|
45
48
|
}
|
|
46
49
|
return null;
|
|
47
50
|
})
|
|
@@ -129,7 +129,7 @@ export function inspectionDataToSankey(d) {
|
|
|
129
129
|
}))
|
|
130
130
|
.toMutableArray();
|
|
131
131
|
// create a map from NodeR to index
|
|
132
|
-
const nodesToIdx = nodes.toHashMap((n) => [n.node, n.idx], (i1
|
|
132
|
+
const nodesToIdx = nodes.toHashMap((n) => [n.node, n.idx], (i1) => i1);
|
|
133
133
|
// create the sankey links to return by counting Edges between nodes
|
|
134
134
|
const sankeyLinks = edges
|
|
135
135
|
.toHashMap((e) => [e, 1], (c1, c2) => c1 + c2)
|
|
@@ -97,7 +97,7 @@ export function binCyclesByDayAndPart(cycles, matsById, start, end) {
|
|
|
97
97
|
.toHashMap((p) => [new MatIdAndProcess(p.matId, p.proc), p.active], (a1, a2) => a1 + a2);
|
|
98
98
|
return LazySeq.of(matsById)
|
|
99
99
|
.flatMap(([matId, details]) => LazySeq.ofObject(details.unloaded_processes ?? {})
|
|
100
|
-
.filter(([
|
|
100
|
+
.filter(([, unloadTime]) => unloadTime >= start && unloadTime <= end)
|
|
101
101
|
.map(([proc, unloadTime]) => ({
|
|
102
102
|
day: startOfDay(unloadTime),
|
|
103
103
|
part: details.partName + "-" + proc,
|
|
@@ -304,7 +304,7 @@ export function buildCycleTable(cycles, matsById, startD, endD, hideMedian, load
|
|
|
304
304
|
}
|
|
305
305
|
table += "</tr></thead>\n<tbody>\n";
|
|
306
306
|
const filteredCycles = LazySeq.of(cycles.data)
|
|
307
|
-
.flatMap(([
|
|
307
|
+
.flatMap(([, c]) => c)
|
|
308
308
|
.filter((p) => (!startD || p.endTime >= startD) && (!endD || p.endTime < endD))
|
|
309
309
|
.toSortedArray((a) => a.endTime.getTime());
|
|
310
310
|
for (const cycle of filteredCycles) {
|
|
@@ -34,7 +34,7 @@ import copy from "copy-to-clipboard";
|
|
|
34
34
|
import { LazySeq } from "@seedtactics/immutable-collections";
|
|
35
35
|
export function buildScheduledJobs(zoom, matIds, schJobs, currentSt) {
|
|
36
36
|
const completedMats = LazySeq.of(matIds)
|
|
37
|
-
.flatMap(([matId, summary]) => LazySeq.ofObject(summary.unloaded_processes ?? {}).map(([proc
|
|
37
|
+
.flatMap(([matId, summary]) => LazySeq.ofObject(summary.unloaded_processes ?? {}).map(([proc]) => ({
|
|
38
38
|
matId: matId,
|
|
39
39
|
proc: parseInt(proc),
|
|
40
40
|
uniq: summary.jobUnique,
|
package/dist/index.html
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
</style>
|
|
46
|
-
<script type="module" crossorigin src="/assets/index-
|
|
46
|
+
<script type="module" crossorigin src="/assets/index-C6EBFHuW.js"></script>
|
|
47
47
|
<link rel="stylesheet" crossorigin href="/assets/index-DXfAwuj-.css">
|
|
48
48
|
</head>
|
|
49
49
|
<body>
|
package/dist/network/api.d.ts
CHANGED
|
@@ -223,8 +223,6 @@ export declare class LogEntry implements ILogEntry {
|
|
|
223
223
|
loc: string;
|
|
224
224
|
locnum: number;
|
|
225
225
|
pal: number;
|
|
226
|
-
basketContentEpisodeId?: string | undefined;
|
|
227
|
-
basketCycleEndContentEpisodeIds?: string[] | undefined;
|
|
228
226
|
program: string;
|
|
229
227
|
result: string;
|
|
230
228
|
elapsed: string;
|
|
@@ -247,8 +245,6 @@ export interface ILogEntry {
|
|
|
247
245
|
loc: string;
|
|
248
246
|
locnum: number;
|
|
249
247
|
pal: number;
|
|
250
|
-
basketContentEpisodeId?: string | undefined;
|
|
251
|
-
basketCycleEndContentEpisodeIds?: string[] | undefined;
|
|
252
248
|
program: string;
|
|
253
249
|
result: string;
|
|
254
250
|
elapsed: string;
|
|
@@ -306,14 +302,7 @@ export declare enum LogType {
|
|
|
306
302
|
Rebooking = "Rebooking",
|
|
307
303
|
CancelRebooking = "CancelRebooking",
|
|
308
304
|
BasketLoadUnload = "BasketLoadUnload",
|
|
309
|
-
BasketCycle = "BasketCycle"
|
|
310
|
-
BasketInLocation = "BasketInLocation",
|
|
311
|
-
BasketContentSnapshot = "BasketContentSnapshot",
|
|
312
|
-
BasketRegionSurvey = "BasketRegionSurvey",
|
|
313
|
-
BasketMisload = "BasketMisload",
|
|
314
|
-
BasketMisloadResolution = "BasketMisloadResolution",
|
|
315
|
-
BasketObservation = "BasketObservation",
|
|
316
|
-
BasketObservationCorrection = "BasketObservationCorrection"
|
|
305
|
+
BasketCycle = "BasketCycle"
|
|
317
306
|
}
|
|
318
307
|
export declare class ToolUse implements IToolUse {
|
|
319
308
|
tool: string;
|
|
@@ -1071,7 +1060,7 @@ export declare enum WorkorderSerialCloseout {
|
|
|
1071
1060
|
}
|
|
1072
1061
|
export declare class BasketStatus implements IBasketStatus {
|
|
1073
1062
|
basketId: number;
|
|
1074
|
-
position
|
|
1063
|
+
position?: BasketPosition | undefined;
|
|
1075
1064
|
emptySlots?: number[];
|
|
1076
1065
|
unknownSlots?: number[];
|
|
1077
1066
|
constructor(data?: IBasketStatus);
|
|
@@ -1081,7 +1070,7 @@ export declare class BasketStatus implements IBasketStatus {
|
|
|
1081
1070
|
}
|
|
1082
1071
|
export interface IBasketStatus {
|
|
1083
1072
|
basketId: number;
|
|
1084
|
-
position
|
|
1073
|
+
position?: BasketPosition | undefined;
|
|
1085
1074
|
emptySlots?: number[];
|
|
1086
1075
|
unknownSlots?: number[];
|
|
1087
1076
|
}
|
|
@@ -1109,8 +1098,8 @@ export declare enum BasketLocationEnum {
|
|
|
1109
1098
|
}
|
|
1110
1099
|
export declare class BasketMoveInstruction implements IBasketMoveInstruction {
|
|
1111
1100
|
instructionId: string;
|
|
1112
|
-
basketId
|
|
1113
|
-
source
|
|
1101
|
+
basketId: number;
|
|
1102
|
+
source?: BasketPosition | undefined;
|
|
1114
1103
|
destination: BasketPosition;
|
|
1115
1104
|
reason: BasketMoveReason;
|
|
1116
1105
|
displayText: string;
|
|
@@ -1122,8 +1111,8 @@ export declare class BasketMoveInstruction implements IBasketMoveInstruction {
|
|
|
1122
1111
|
}
|
|
1123
1112
|
export interface IBasketMoveInstruction {
|
|
1124
1113
|
instructionId: string;
|
|
1125
|
-
basketId
|
|
1126
|
-
source
|
|
1114
|
+
basketId: number;
|
|
1115
|
+
source?: BasketPosition | undefined;
|
|
1127
1116
|
destination: BasketPosition;
|
|
1128
1117
|
reason: BasketMoveReason;
|
|
1129
1118
|
displayText: string;
|
package/dist/network/api.js
CHANGED
|
@@ -2517,12 +2517,6 @@ export class LogEntry {
|
|
|
2517
2517
|
this.loc = _data["loc"];
|
|
2518
2518
|
this.locnum = _data["locnum"];
|
|
2519
2519
|
this.pal = _data["pal"];
|
|
2520
|
-
this.basketContentEpisodeId = _data["basketContentEpisodeId"];
|
|
2521
|
-
if (Array.isArray(_data["basketCycleEndContentEpisodeIds"])) {
|
|
2522
|
-
this.basketCycleEndContentEpisodeIds = [];
|
|
2523
|
-
for (let item of _data["basketCycleEndContentEpisodeIds"])
|
|
2524
|
-
this.basketCycleEndContentEpisodeIds.push(item);
|
|
2525
|
-
}
|
|
2526
2520
|
this.program = _data["program"];
|
|
2527
2521
|
this.result = _data["result"];
|
|
2528
2522
|
this.elapsed = _data["elapsed"];
|
|
@@ -2561,12 +2555,6 @@ export class LogEntry {
|
|
|
2561
2555
|
data["loc"] = this.loc;
|
|
2562
2556
|
data["locnum"] = this.locnum;
|
|
2563
2557
|
data["pal"] = this.pal;
|
|
2564
|
-
data["basketContentEpisodeId"] = this.basketContentEpisodeId;
|
|
2565
|
-
if (Array.isArray(this.basketCycleEndContentEpisodeIds)) {
|
|
2566
|
-
data["basketCycleEndContentEpisodeIds"] = [];
|
|
2567
|
-
for (let item of this.basketCycleEndContentEpisodeIds)
|
|
2568
|
-
data["basketCycleEndContentEpisodeIds"].push(item);
|
|
2569
|
-
}
|
|
2570
2558
|
data["program"] = this.program;
|
|
2571
2559
|
data["result"] = this.result;
|
|
2572
2560
|
data["elapsed"] = this.elapsed;
|
|
@@ -2652,13 +2640,6 @@ export var LogType;
|
|
|
2652
2640
|
LogType["CancelRebooking"] = "CancelRebooking";
|
|
2653
2641
|
LogType["BasketLoadUnload"] = "BasketLoadUnload";
|
|
2654
2642
|
LogType["BasketCycle"] = "BasketCycle";
|
|
2655
|
-
LogType["BasketInLocation"] = "BasketInLocation";
|
|
2656
|
-
LogType["BasketContentSnapshot"] = "BasketContentSnapshot";
|
|
2657
|
-
LogType["BasketRegionSurvey"] = "BasketRegionSurvey";
|
|
2658
|
-
LogType["BasketMisload"] = "BasketMisload";
|
|
2659
|
-
LogType["BasketMisloadResolution"] = "BasketMisloadResolution";
|
|
2660
|
-
LogType["BasketObservation"] = "BasketObservation";
|
|
2661
|
-
LogType["BasketObservationCorrection"] = "BasketObservationCorrection";
|
|
2662
2643
|
})(LogType || (LogType = {}));
|
|
2663
2644
|
export class ToolUse {
|
|
2664
2645
|
constructor(data) {
|
|
@@ -4427,16 +4408,13 @@ export class BasketStatus {
|
|
|
4427
4408
|
this[property] = data[property];
|
|
4428
4409
|
}
|
|
4429
4410
|
}
|
|
4430
|
-
if (!data) {
|
|
4431
|
-
this.position = new BasketPosition();
|
|
4432
|
-
}
|
|
4433
4411
|
}
|
|
4434
4412
|
init(_data) {
|
|
4435
4413
|
if (_data) {
|
|
4436
4414
|
this.basketId = _data["BasketId"];
|
|
4437
4415
|
this.position = _data["Position"]
|
|
4438
4416
|
? BasketPosition.fromJS(_data["Position"])
|
|
4439
|
-
:
|
|
4417
|
+
: undefined;
|
|
4440
4418
|
if (Array.isArray(_data["EmptySlots"])) {
|
|
4441
4419
|
this.emptySlots = [];
|
|
4442
4420
|
for (let item of _data["EmptySlots"])
|
|
@@ -4520,7 +4498,6 @@ export class BasketMoveInstruction {
|
|
|
4520
4498
|
}
|
|
4521
4499
|
}
|
|
4522
4500
|
if (!data) {
|
|
4523
|
-
this.source = new BasketPosition();
|
|
4524
4501
|
this.destination = new BasketPosition();
|
|
4525
4502
|
}
|
|
4526
4503
|
}
|
|
@@ -4528,7 +4505,7 @@ export class BasketMoveInstruction {
|
|
|
4528
4505
|
if (_data) {
|
|
4529
4506
|
this.instructionId = _data["InstructionId"];
|
|
4530
4507
|
this.basketId = _data["BasketId"];
|
|
4531
|
-
this.source = _data["Source"] ? BasketPosition.fromJS(_data["Source"]) :
|
|
4508
|
+
this.source = _data["Source"] ? BasketPosition.fromJS(_data["Source"]) : undefined;
|
|
4532
4509
|
this.destination = _data["Destination"]
|
|
4533
4510
|
? BasketPosition.fromJS(_data["Destination"])
|
|
4534
4511
|
: new BasketPosition();
|