@seedtactics/insight-client 17.0.3 → 17.0.5

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.
Files changed (93) hide show
  1. package/dist/assets/index-BqTNkPt2.js +366 -0
  2. package/dist/cell-status/alarms.d.ts +16 -0
  3. package/dist/cell-status/alarms.js +71 -0
  4. package/dist/cell-status/loading.js +5 -0
  5. package/dist/cell-status/material-details.d.ts +1 -0
  6. package/dist/cell-status/material-details.js +10 -1
  7. package/dist/components/App.js +0 -1
  8. package/dist/components/Navigation.js +10 -5
  9. package/dist/components/station-monitor/BasketLoadStationWork.js +15 -8
  10. package/dist/components/station-monitor/BulkRawMaterial.js +31 -18
  11. package/dist/components/station-monitor/CancelLoadButton.js +8 -4
  12. package/dist/components/station-monitor/InvalidateCycle.js +23 -18
  13. package/dist/components/station-monitor/LoadStation.js +21 -17
  14. package/dist/components/station-monitor/Material.js +34 -29
  15. package/dist/components/station-monitor/MoveMaterialArrows.js +13 -2
  16. package/dist/components/station-monitor/QuarantineButton.js +12 -4
  17. package/dist/components/station-monitor/QueuesAddMaterial.js +54 -49
  18. package/dist/components/station-monitor/StationToolbar.js +2 -1
  19. package/dist/components/station-monitor/SystemAlarmTooltip.d.ts +6 -0
  20. package/dist/components/station-monitor/SystemAlarmTooltip.js +5 -0
  21. package/dist/fms-insight-api.json +48 -0
  22. package/dist/index.html +1 -1
  23. package/dist/network/api.d.ts +28 -0
  24. package/dist/network/api.js +54 -0
  25. package/dist/network/current-status-session.d.ts +13 -1
  26. package/dist/network/current-status-session.js +15 -0
  27. package/docs/client-efficiency.md +158 -291
  28. package/docs/client-engineering.md +29 -36
  29. package/docs/client-launch.md +35 -34
  30. package/docs/client-operations.md +40 -61
  31. package/docs/client-quality.md +32 -47
  32. package/docs/client-sales.md +22 -39
  33. package/docs/client-scanners.md +21 -27
  34. package/docs/client-station-monitor.md +75 -100
  35. package/docs/client-tools-programs.md +30 -59
  36. package/docs/improve-fms.md +55 -121
  37. package/docs/makino.md +10 -11
  38. package/docs/material-quarantine.md +40 -54
  39. package/docs/material-tracking.md +65 -183
  40. package/docs/mazak.md +31 -49
  41. package/docs/niigata.md +61 -89
  42. package/docs/operator-procedures.md +83 -96
  43. package/docs/part-instructions.md +43 -57
  44. package/docs/screenshots/insight-analysis-pallets.png +0 -0
  45. package/docs/screenshots/insight-analysis-part-completed.png +0 -0
  46. package/docs/screenshots/insight-analysis-sankey.png +0 -0
  47. package/docs/screenshots/insight-analysis-station-oee.png +0 -0
  48. package/docs/screenshots/insight-basket-work.png +0 -0
  49. package/docs/screenshots/insight-buffer-occupancy.png +0 -0
  50. package/docs/screenshots/insight-closeout.png +0 -0
  51. package/docs/screenshots/insight-cost-percentages.png +0 -0
  52. package/docs/screenshots/insight-dashboard.png +0 -0
  53. package/docs/screenshots/insight-inspection.png +0 -0
  54. package/docs/screenshots/insight-load-station-details.png +0 -0
  55. package/docs/screenshots/insight-load-station.png +0 -0
  56. package/docs/screenshots/insight-loadcycle-graph.png +0 -0
  57. package/docs/screenshots/insight-machinecycle-graph.png +0 -0
  58. package/docs/screenshots/insight-machinecycle-table.png +0 -0
  59. package/docs/screenshots/insight-machinecycles.png +0 -0
  60. package/docs/screenshots/insight-machinehours.png +0 -0
  61. package/docs/screenshots/insight-machineoutliers.png +0 -0
  62. package/docs/screenshots/insight-monthly-schedules.png +0 -0
  63. package/docs/screenshots/insight-operations-material.png +0 -0
  64. package/docs/screenshots/insight-operations-overview.png +0 -0
  65. package/docs/screenshots/insight-operations-reports.png +0 -0
  66. package/docs/screenshots/insight-part-cost.png +0 -0
  67. package/docs/screenshots/insight-program-report.png +0 -0
  68. package/docs/screenshots/insight-quality-material-details.png +0 -0
  69. package/docs/screenshots/insight-quality-material.png +0 -0
  70. package/docs/screenshots/insight-quality-sankey.png +0 -0
  71. package/docs/screenshots/insight-quality-similar-paths.png +0 -0
  72. package/docs/screenshots/insight-quarantine.png +0 -0
  73. package/docs/screenshots/insight-queue-details.png +0 -0
  74. package/docs/screenshots/insight-queues-jobs-table.png +0 -0
  75. package/docs/screenshots/insight-queues.png +0 -0
  76. package/docs/screenshots/insight-sim-day-usage.png +0 -0
  77. package/docs/screenshots/insight-system-overview.png +0 -0
  78. package/docs/screenshots/insight-tool-replacements.png +0 -0
  79. package/docs/screenshots/insight-tool-report.png +0 -0
  80. package/docs/screenshots/insight-workorder-gantt.png +0 -0
  81. package/docs/screenshots/insight-workorders.png +0 -0
  82. package/docs/security.md +98 -131
  83. package/docs/server-config.md +39 -22
  84. package/docs/server-errors.md +26 -18
  85. package/package.json +1 -1
  86. package/dist/assets/index-BfycE-BU.js +0 -366
  87. package/docs/screenshots/insight-all-material.png +0 -0
  88. package/docs/screenshots/insight-choose-analysis-month.png +0 -0
  89. package/docs/screenshots/insight-loadstation-small.jpg +0 -0
  90. package/docs/screenshots/insight-quality-quarantine.png +0 -0
  91. package/docs/screenshots/insight-station-system-overview-buttons.png +0 -0
  92. package/docs/screenshots/insight-station-system-overview.png +0 -0
  93. package/docs/screenshots/insight-toolbar-btns.png +0 -0
@@ -0,0 +1,16 @@
1
+ import { AlarmActivity, type ICurrentStatusAlarm, type IInProcessMaterial } from "../network/api.js";
2
+ export interface AlarmContext {
3
+ readonly activity?: AlarmActivity;
4
+ readonly basketId?: number;
5
+ }
6
+ type StatusAlarms = {
7
+ readonly alarmDetails?: ReadonlyArray<Readonly<ICurrentStatusAlarm>> | null;
8
+ readonly material?: ReadonlyArray<Readonly<IInProcessMaterial>>;
9
+ };
10
+ /** Apply the backend's explicit scope and impact; text, codes and missing metadata imply no block. */
11
+ export declare function alarmsBlockingChanges(status: StatusAlarms, context: AlarmContext): ReadonlyArray<Readonly<ICurrentStatusAlarm>>;
12
+ /** Include captured and current source/target scopes without changing the selected operation. */
13
+ export declare function alarmsBlockingMaterialChanges(status: StatusAlarms, material: ReadonlyArray<Readonly<IInProcessMaterial>>): ReadonlyArray<Readonly<ICurrentStatusAlarm>>;
14
+ /** Suspend human transfer cues while retaining read-only observations such as machining/waiting. */
15
+ export declare function materialActionIsSuspended(status: StatusAlarms, material: Readonly<IInProcessMaterial>): boolean;
16
+ export {};
@@ -0,0 +1,71 @@
1
+ import { ActionType, AlarmActivity, AlarmImpact, LocType, } from "../network/api.js";
2
+ function applies(alarm, context) {
3
+ return (alarm.impact === AlarmImpact.SuspendChanges &&
4
+ (alarm.activity == null || alarm.activity === context.activity) &&
5
+ (alarm.basketId == null || alarm.basketId === context.basketId));
6
+ }
7
+ /** Apply the backend's explicit scope and impact; text, codes and missing metadata imply no block. */
8
+ export function alarmsBlockingChanges(status, context) {
9
+ return (status.alarmDetails ?? []).filter((alarm) => applies(alarm, context));
10
+ }
11
+ /** Include captured and current source/target scopes without changing the selected operation. */
12
+ export function alarmsBlockingMaterialChanges(status, material) {
13
+ if (!status.alarmDetails?.length)
14
+ return [];
15
+ const affectedMaterial = material.flatMap((captured) => {
16
+ // Anonymous entries share ID -1, so they cannot be matched to a newer material entry.
17
+ const latest = captured.materialID >= 0
18
+ ? status.material?.find((candidate) => candidate.materialID === captured.materialID)
19
+ : undefined;
20
+ return latest && latest !== captured ? [captured, latest] : [captured];
21
+ });
22
+ const contexts = [
23
+ {},
24
+ ...affectedMaterial.flatMap((mat) => {
25
+ const station = mat.action.type === ActionType.LoadingToBasket ||
26
+ mat.action.type === ActionType.UnloadToInProcess ||
27
+ mat.action.type === ActionType.UnloadToCompletedMaterial;
28
+ return [
29
+ ...(mat.location.type === LocType.InBasket
30
+ ? [
31
+ {
32
+ basketId: mat.location.basketId,
33
+ activity: station ? AlarmActivity.BasketLoadStation : undefined,
34
+ },
35
+ ]
36
+ : []),
37
+ ...(mat.action.type === ActionType.LoadingToBasket
38
+ ? [
39
+ {
40
+ basketId: mat.action.loadToBasketId,
41
+ activity: AlarmActivity.BasketLoadStation,
42
+ },
43
+ ]
44
+ : []),
45
+ ...(mat.action.type === ActionType.Loading && mat.action.loadFromBasketId !== undefined
46
+ ? [
47
+ {
48
+ basketId: mat.action.loadFromBasketId,
49
+ // Without a pallet, this legacy field names the station's destination basket.
50
+ activity: mat.action.loadOntoPalletNum == null
51
+ ? AlarmActivity.BasketLoadStation
52
+ : undefined,
53
+ },
54
+ ]
55
+ : []),
56
+ ...(station && mat.action.unloadToBasketId !== undefined
57
+ ? [{ basketId: mat.action.unloadToBasketId }]
58
+ : []),
59
+ ];
60
+ }),
61
+ ];
62
+ return (status.alarmDetails ?? []).filter((alarm) => contexts.some((context) => applies(alarm, context)));
63
+ }
64
+ /** Suspend human transfer cues while retaining read-only observations such as machining/waiting. */
65
+ export function materialActionIsSuspended(status, material) {
66
+ return ((material.action.type === ActionType.Loading ||
67
+ material.action.type === ActionType.LoadingToBasket ||
68
+ material.action.type === ActionType.UnloadToInProcess ||
69
+ material.action.type === ActionType.UnloadToCompletedMaterial) &&
70
+ alarmsBlockingMaterialChanges(status, [material]).length > 0);
71
+ }
@@ -40,6 +40,7 @@ import * as simUse from "./sim-station-use.js";
40
40
  import * as schJobs from "./scheduled-jobs.js";
41
41
  import * as buffers from "./buffers.js";
42
42
  import * as currentSt from "./current-status.js";
43
+ import { alarmsBlockingMaterialChanges } from "./alarms.js";
43
44
  import * as customSt from "./custom-state.js";
44
45
  import * as insp from "./inspections.js";
45
46
  import * as mats from "./material-summary.js";
@@ -114,6 +115,10 @@ export const onLoadLast30Log = atom(null, (_, set, log) => {
114
115
  // Show queue drops immediately. Recovery must not replace intervening live updates or drags.
115
116
  export const moveQueuedMatInCurrentStatus = atom(null, async (get, set, { operator, ...move }) => {
116
117
  const before = get(currentSt.currentStatus);
118
+ const moving = before.material.filter((mat) => mat.materialID === move.matId);
119
+ const alarms = alarmsBlockingMaterialChanges(before, moving);
120
+ if (alarms.length > 0)
121
+ throw new Error(alarms.map((alarm) => alarm.message).join(" "));
117
122
  set(currentSt.reorderQueuedMatInCurrentStatus, move);
118
123
  const optimistic = get(currentSt.currentStatus);
119
124
  try {
@@ -62,6 +62,7 @@ export interface MaterialToShowInspections {
62
62
  }
63
63
  export declare const materialInDialogInspections: Atom<MaterialToShowInspections>;
64
64
  export declare const possibleWorkordersForMaterialInDialog: Atom<Promise<readonly IActiveWorkorder[]> | readonly IActiveWorkorder[]>;
65
+ export declare function useMaterialBlockingAlarms(): readonly Readonly<import("../network/api.js").ICurrentStatusAlarm>[];
65
66
  export interface ForceInspectionData {
66
67
  readonly mat: MaterialToShowInfo;
67
68
  readonly inspType: string;
@@ -35,7 +35,8 @@ import { LazySeq } from "@seedtactics/immutable-collections";
35
35
  import { LogType, NewInspectionCompleted, NewCloseout, QueuePosition, } from "../network/api.js";
36
36
  import { useCallback, useState } from "react";
37
37
  import { currentStatus } from "./current-status.js";
38
- import { atom, useSetAtom } from "jotai";
38
+ import { atom, useAtomValue, useSetAtom } from "jotai";
39
+ import { alarmsBlockingMaterialChanges } from "./alarms.js";
39
40
  import { unwrap } from "jotai/utils";
40
41
  import { isLogEntryInvalidated } from "../components/LogEntry.js";
41
42
  import { currentRoute, RouteLocation } from "../components/routes.js";
@@ -306,6 +307,14 @@ export const possibleWorkordersForMaterialInDialog = atom((get) => {
306
307
  .filter((w) => w.part === mat.partName)
307
308
  .toSortedArray((w) => w.dueDate.getTime(), (w) => -w.priority));
308
309
  });
310
+ //--------------------------------------------------------------------------------
311
+ // Updates
312
+ //--------------------------------------------------------------------------------
313
+ // Page controls use the same backend-declared scope as dialogs; no local validity estimate.
314
+ export function useMaterialBlockingAlarms() {
315
+ const material = useAtomValue(inProcessMaterialInDialog);
316
+ return alarmsBlockingMaterialChanges(useAtomValue(currentStatus), material ? [material] : []);
317
+ }
309
318
  export function useForceInspection() {
310
319
  const [updating, setUpdating] = useState(false);
311
320
  const setExtraLogEvts = useSetAtom(extraLogEventsFromUpdates);
@@ -547,7 +547,6 @@ const App = memo(function App(props) {
547
547
  case routes.RouteLocation.Quality_Quarantine:
548
548
  page = _jsx(AllMaterial, { displaySystemBins: false });
549
549
  nav1 = QualityTabs;
550
- showAlarms = false;
551
550
  addBasicMaterialDialog = false;
552
551
  break;
553
552
  case routes.RouteLocation.Tools_Dashboard:
@@ -31,9 +31,9 @@ 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 { useTransition } from "react";
34
+ import { useId, useState, useTransition } from "react";
35
35
  import { Notifications, HelpOutlined, ExitToApp } from "@mui/icons-material";
36
- import { Typography, Tooltip, Badge, IconButton, AppBar, Toolbar, Box, List, ListItem, ListItemIcon, ListItemButton, ListItemText, ListSubheader, Paper, Select, MenuItem, FormControl, } from "@mui/material";
36
+ import { Typography, Tooltip, Badge, IconButton, AppBar, Toolbar, Box, List, ListItem, ListItemIcon, ListItemButton, ListItemText, ListSubheader, Paper, Select, MenuItem, FormControl, Button, Dialog, DialogActions, DialogContent, DialogTitle, } from "@mui/material";
37
37
  import { startOfToday, differenceInDays } from "date-fns";
38
38
  import { currentStatus } from "../cell-status/current-status";
39
39
  import { SeedtacticLogo } from "../seedtactics-logo";
@@ -71,9 +71,14 @@ function Brand() {
71
71
  }
72
72
  function Alarms() {
73
73
  const alarms = useAtomValue(currentStatus).alarms;
74
- const hasAlarms = alarms && alarms.length > 0;
75
- const alarmTooltip = hasAlarms ? alarms.join(". ") : "No Alarms";
76
- return (_jsx(Tooltip, { title: alarmTooltip, children: _jsx(Badge, { badgeContent: hasAlarms ? alarms.length : 0, children: _jsx(Notifications, { color: hasAlarms ? "error" : undefined }) }) }));
74
+ const [open, setOpen] = useState(false);
75
+ const titleId = useId();
76
+ const count = alarms.length;
77
+ const alarmLabel = count === 0 ? "No alarms" : `${count} ${count === 1 ? "alarm" : "alarms"}`;
78
+ const alarmTooltip = count === 1 ? alarms[0] : alarmLabel;
79
+ return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { title: alarmTooltip, children: _jsx(IconButton, { "aria-label": alarmLabel, "aria-haspopup": "dialog", color: count > 0 ? "error" : "inherit", size: "large", onClick: () => setOpen(true), children: _jsx(Badge, { badgeContent: count, color: "error", children: _jsx(Notifications, {}) }) }) }), _jsxs(Dialog, { open: open, onClose: () => setOpen(false), "aria-labelledby": titleId, fullWidth: true, maxWidth: "sm", scroll: "paper", children: [_jsx(DialogTitle, { id: titleId, children: "System alarms" }), _jsx(DialogContent, { dividers: true, children: count === 0 ? (_jsx(Typography, { children: "No alarms." })) : (_jsx(List, { disablePadding: true, children: alarms.map((alarm, index) => (_jsx(ListItem, { disableGutters: true, divider: index < count - 1, children: _jsx(ListItemText, { primary: alarm, slotProps: {
80
+ primary: { sx: { whiteSpace: "pre-wrap", overflowWrap: "anywhere" } },
81
+ } }) }, index))) })) }), _jsx(DialogActions, { children: _jsx(Button, { onClick: () => setOpen(false), children: "Close" }) })] })] }));
77
82
  }
78
83
  function HelpButton() {
79
84
  const route = useAtomValue(currentRoute);
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /* Copyright (c) 2026, John Lenz
3
3
 
4
4
  All rights reserved.
@@ -31,8 +31,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
31
  import { useMemo, useState } from "react";
32
32
  import { Alert, Box, Button, Stack, Typography } from "@mui/material";
33
33
  import { LazySeq } from "@seedtactics/immutable-collections";
34
- import { useSetAtom } from "jotai";
34
+ import { useAtomValue, useSetAtom } from "jotai";
35
35
  import { basketSlotLabel } from "../../cell-status/station-cycles.js";
36
+ import { currentStatus } from "../../cell-status/current-status.js";
37
+ import { alarmsBlockingChanges } from "../../cell-status/alarms.js";
36
38
  import * as api from "../../network/api.js";
37
39
  import { serverErrorMessage } from "../../network/api-errors.js";
38
40
  import { JobsBackend } from "../../network/backend.js";
@@ -126,6 +128,10 @@ export function BasketLoadStationWorkflow({ basket, material, fsize, title, elap
126
128
  const refresh = useSetAtom(refreshCurrentStatus);
127
129
  const [refreshError, setRefreshError] = useState();
128
130
  const workState = useMemo(() => stationWork(material, basket), [basket, material]);
131
+ const changesSuspended = alarmsBlockingChanges(useAtomValue(currentStatus), {
132
+ activity: api.AlarmActivity.BasketLoadStation,
133
+ basketId: basket.basketId,
134
+ }).length > 0;
129
135
  const blockedReason = basket.loadStationWork?.confirmationBlockedReason?.trim();
130
136
  const instructionWarning = basket.loadStationWork?.instructionWarning?.trim();
131
137
  const work = workState.type === "active" ? workState.work : undefined;
@@ -170,7 +176,7 @@ export function BasketLoadStationWorkflow({ basket, material, fsize, title, elap
170
176
  }
171
177
  }
172
178
  async function submit() {
173
- if (work === undefined || !work.ready)
179
+ if (work === undefined || !work.ready || changesSuspended)
174
180
  return;
175
181
  const submittedWorkId = work.workId;
176
182
  const pending = {
@@ -193,7 +199,8 @@ export function BasketLoadStationWorkflow({ basket, material, fsize, title, elap
193
199
  }
194
200
  await refreshStatus(submittedWorkId);
195
201
  }
196
- const submissionDisabled = !work?.ready ||
202
+ const submissionDisabled = changesSuspended ||
203
+ !work?.ready ||
197
204
  submissionState === "submitting" ||
198
205
  submissionState === "accepted" ||
199
206
  submissionState === "conflict";
@@ -202,15 +209,15 @@ export function BasketLoadStationWorkflow({ basket, material, fsize, title, elap
202
209
  // together.
203
210
  return (_jsxs("div", { children: [_jsxs(Box, { sx: {
204
211
  display: "grid",
205
- gridTemplateColumns: "1fr auto auto",
212
+ gridTemplateColumns: "minmax(max-content, 1fr) auto auto",
206
213
  alignItems: "center",
207
214
  columnGap: 4,
208
- }, children: [title, _jsx(Box, { children: work ? (_jsx(Button, { variant: "contained", color: "secondary", size: "large", disabled: submissionDisabled, onClick: () => void submit(), children: "Confirm" })) : null }), _jsx(Box, { sx: {
215
+ }, children: [title, _jsx(Box, { role: "group", "aria-label": "Basket confirmation", sx: { display: "flex", alignItems: "center", gap: 2 }, children: work ? (_jsxs(_Fragment, { children: [_jsx(Typography, { color: "error", noWrap: true, sx: { visibility: changesSuspended ? "visible" : "hidden" }, children: "System alarm" }), _jsx(Button, { variant: "contained", color: "secondary", size: "large", disabled: submissionDisabled, onClick: () => void submit(), children: "Confirm" })] })) : null }), _jsx(Box, { sx: {
209
216
  justifySelf: "flex-end",
210
217
  minWidth: "8ch",
211
218
  textAlign: "right",
212
219
  fontVariantNumeric: "tabular-nums",
213
- }, children: elapsed })] }), _jsxs(Stack, { spacing: 2, sx: { ml: "4em", mr: "4em", mt: 2 }, children: [refreshError?.workId === work?.workId && refreshError && (_jsxs(Alert, { severity: "warning", action: _jsx(Button, { onClick: () => void refreshStatus(refreshError.workId), children: "Refresh status" }), children: [refreshError.message, " Refresh current status to review the latest work."] })), work?.confirmEmpty && work.ready && (_jsxs(Typography, { children: ["Confirm basket ", basket.basketId, " is empty."] })), instructionWarning && _jsx(Alert, { severity: "warning", children: instructionWarning }), work && !work.ready && (_jsx(Alert, { severity: "info", children: blockedReason ||
220
+ }, children: elapsed })] }), _jsxs(Stack, { spacing: 2, sx: { ml: "4em", mr: "4em", mt: 2 }, children: [refreshError?.workId === work?.workId && refreshError && (_jsxs(Alert, { severity: "warning", action: _jsx(Button, { onClick: () => void refreshStatus(refreshError.workId), children: "Refresh status" }), children: [refreshError.message, " Refresh current status to review the latest work."] })), work?.confirmEmpty && work.ready && !changesSuspended && (_jsxs(Typography, { children: ["Confirm basket ", basket.basketId, " is empty."] })), instructionWarning && _jsx(Alert, { severity: "warning", children: instructionWarning }), work && !work.ready && (_jsx(Alert, { severity: "info", children: blockedReason ||
214
221
  (work.awaitingSlots.length > 0
215
222
  ? `Waiting for material for slots ${work.awaitingSlots.map(basketSlotLabel).join(", ")}.`
216
223
  : "Basket work is not ready for confirmation.") })), !work && workState.type === "inconsistent" ? (_jsx(Alert, { severity: "warning", children: "Basket work is inconsistent. Wait for refreshed material actions before confirming." })) : null, submissionState === "accepted" ? (_jsx(Alert, { severity: "success", children: "Confirmation accepted. Waiting for refreshed work." })) : submissionState === "conflict" ? (_jsx(Alert, { severity: "warning", children: submissionReason ??
@@ -246,7 +253,7 @@ export function BasketLoadStationWorkflow({ basket, material, fsize, title, elap
246
253
  columnGap: 1,
247
254
  color: "text.secondary",
248
255
  mb: 2,
249
- }, children: [_jsxs(Typography, { variant: "h6", sx: { color: "text.primary" }, children: ["Slot ", basketSlotLabel(slot)] }), target && (_jsxs(Box, { component: "span", sx: { display: "inline-flex", alignItems: "center", gap: 1 }, children: [_jsx(Typography, { component: "span", variant: "body2", color: "inherit", "aria-hidden": true, children: "\u00B7" }), _jsx(Typography, { component: "span", variant: "body2", color: "inherit", children: target })] }))] }), _jsx(Box, { sx: { ml: "4em", mr: "4em" }, children: _jsx(MoveMaterialArrowNode, { kind: {
256
+ }, children: [_jsxs(Typography, { variant: "h6", sx: { color: "text.primary" }, children: ["Slot ", basketSlotLabel(slot)] }), target && (_jsxs(Box, { component: "span", sx: { display: "inline-flex", alignItems: "center", gap: 1 }, children: [_jsx(Typography, { component: "span", variant: "body2", color: "inherit", "aria-hidden": true, children: "\u00B7" }), _jsx(Typography, { component: "span", variant: "body2", color: "inherit", children: changesSuspended ? `Saved target: ${target}` : target })] }))] }), _jsx(Box, { sx: { ml: "4em", mr: "4em" }, children: _jsx(MoveMaterialArrowNode, { kind: {
250
257
  type: MoveMaterialNodeKindType.BasketSlotZone,
251
258
  basketId: basket.basketId,
252
259
  slot,
@@ -42,11 +42,13 @@ import { currentOperator } from "../../data/operators.js";
42
42
  import { PrintedLabel, PrintOnClientButton } from "./PrintedLabel.js";
43
43
  import { fmsInformation } from "../../network/server-settings.js";
44
44
  import { currentStatus } from "../../cell-status/current-status.js";
45
+ import { alarmsBlockingChanges, alarmsBlockingMaterialChanges } from "../../cell-status/alarms.js";
45
46
  import { useAddNewCastingToQueue, usePrintLabel } from "../../cell-status/material-details.js";
46
47
  import { castingNames } from "../../cell-status/names.js";
47
48
  import { atom, useAtom, useAtomValue, useSetAtom } from "jotai";
48
49
  import { JobsBackend } from "../../network/backend.js";
49
50
  import { LogEntries } from "../LogEntry.js";
51
+ import { SystemAlarmTooltip } from "./SystemAlarmTooltip.js";
50
52
  export const bulkAddCastingToQueue = atom(null);
51
53
  const waitingForMaterialAssignmentDialog = atom(null);
52
54
  function WaitingForMaterialDialog() {
@@ -102,6 +104,7 @@ export const BulkAddCastingWithoutSerialDialog = memo(function BulkAddCastingWit
102
104
  const [adding, setAdding] = useState(false);
103
105
  const currentSt = useAtomValue(currentStatus);
104
106
  const historicCastNames = useAtomValue(castingNames);
107
+ const blockingAlarms = alarmsBlockingChanges(currentSt, {});
105
108
  const castings = useMemo(() => LazySeq.ofObject(currentSt.jobs)
106
109
  .flatMap(([, j]) => j.procsAndPaths[0].paths)
107
110
  .filter((p) => p.casting !== undefined && p.casting !== "")
@@ -117,6 +120,8 @@ export const BulkAddCastingWithoutSerialDialog = memo(function BulkAddCastingWit
117
120
  setQty(null);
118
121
  }
119
122
  function add() {
123
+ if (blockingAlarms.length > 0)
124
+ return;
120
125
  if (queue !== null &&
121
126
  selectedCasting !== null &&
122
127
  enteredQty !== null &&
@@ -133,6 +138,8 @@ export const BulkAddCastingWithoutSerialDialog = memo(function BulkAddCastingWit
133
138
  close();
134
139
  }
135
140
  function addAndPrint() {
141
+ if (blockingAlarms.length > 0)
142
+ return;
136
143
  if (queue !== null && selectedCasting !== null && enteredQty !== null && !isNaN(enteredQty)) {
137
144
  setAdding(true);
138
145
  void addNewCasting({
@@ -167,22 +174,26 @@ export const BulkAddCastingWithoutSerialDialog = memo(function BulkAddCastingWit
167
174
  },
168
175
  }, children: castings.map(([casting, jobCnt], idx) => (_jsxs(MenuItem, { value: casting, children: [_jsx(ListItemIcon, { children: _jsx(PartIdenticon, { part: casting }) }), _jsx(ListItemText, { primary: casting, slotProps: { primary: { variant: "h4" } }, secondary: jobCnt === 0
169
176
  ? "Not used by any current jobs"
170
- : `Used by ${jobCnt} current job${jobCnt > 1 ? "s" : ""}` })] }, idx))) }), _jsx(TextField, { fullWidth: true, type: "number", label: "Quantity", disabled: selectedCasting === null, slotProps: { htmlInput: { min: "1" } }, value: enteredQty === null || isNaN(enteredQty) || enteredQty <= 0 ? "" : enteredQty, onChange: (e) => setQty(parseInt(e.target.value)) }), fmsInfo.requireOperatorNamePromptWhenAddingMaterial ? (_jsx(TextField, { fullWidth: true, label: "Operator", value: enteredOperator || "", onChange: (e) => setEnteredOperator(e.target.value) })) : undefined, selectedCasting !== null && queue !== null ? (_jsx(JobsForCasting, { casting: selectedCasting, queue: queue })) : undefined] }) }), _jsxs(DialogActions, { children: [printOnAdd ? (_jsxs(Button, { color: "primary", disabled: adding ||
171
- selectedCasting === null ||
172
- enteredQty === null ||
173
- isNaN(enteredQty) ||
174
- (fmsInfo.requireOperatorNamePromptWhenAddingMaterial &&
175
- (enteredOperator === null || enteredOperator === "")), onClick: addAndPrint, children: [adding ? _jsx(CircularProgress, { size: 10 }) : undefined, "Add ", enteredQty !== null && !isNaN(enteredQty)
176
- ? enteredQty.toString() + " "
177
- : "", "to", " ", queue] })) : (_jsxs(Button, { color: "primary", disabled: selectedCasting === null ||
178
- enteredQty === null ||
179
- isNaN(enteredQty) ||
180
- (fmsInfo.requireOperatorNamePromptWhenAddingMaterial &&
181
- (enteredOperator === null || enteredOperator === "")), onClick: add, children: ["Add ", enteredQty !== null && !isNaN(enteredQty) ? enteredQty.toString() + " " : "", "to", " ", queue] })), _jsx(Button, { color: "primary", disabled: adding && printOnAdd, onClick: close, children: "Cancel" })] })] }), _jsx(WaitingForMaterialDialog, {})] }));
177
+ : `Used by ${jobCnt} current job${jobCnt > 1 ? "s" : ""}` })] }, idx))) }), _jsx(TextField, { fullWidth: true, type: "number", label: "Quantity", disabled: selectedCasting === null, slotProps: { htmlInput: { min: "1" } }, value: enteredQty === null || isNaN(enteredQty) || enteredQty <= 0 ? "" : enteredQty, onChange: (e) => setQty(parseInt(e.target.value)) }), fmsInfo.requireOperatorNamePromptWhenAddingMaterial ? (_jsx(TextField, { fullWidth: true, label: "Operator", value: enteredOperator || "", onChange: (e) => setEnteredOperator(e.target.value) })) : undefined, selectedCasting !== null && queue !== null ? (_jsx(JobsForCasting, { casting: selectedCasting, queue: queue })) : undefined] }) }), _jsxs(DialogActions, { children: [_jsx(SystemAlarmTooltip, { suspended: blockingAlarms.length > 0, children: printOnAdd ? (_jsxs(Button, { color: "primary", disabled: blockingAlarms.length > 0 ||
178
+ adding ||
179
+ selectedCasting === null ||
180
+ enteredQty === null ||
181
+ isNaN(enteredQty) ||
182
+ (fmsInfo.requireOperatorNamePromptWhenAddingMaterial &&
183
+ (enteredOperator === null || enteredOperator === "")), onClick: addAndPrint, children: [adding ? _jsx(CircularProgress, { size: 10 }) : undefined, "Add ", enteredQty !== null && !isNaN(enteredQty)
184
+ ? enteredQty.toString() + " "
185
+ : "", "to", " ", queue] })) : (_jsxs(Button, { color: "primary", disabled: blockingAlarms.length > 0 ||
186
+ selectedCasting === null ||
187
+ enteredQty === null ||
188
+ isNaN(enteredQty) ||
189
+ (fmsInfo.requireOperatorNamePromptWhenAddingMaterial &&
190
+ (enteredOperator === null || enteredOperator === "")), onClick: add, children: ["Add ", enteredQty !== null && !isNaN(enteredQty) ? enteredQty.toString() + " " : "", "to", " ", queue] })) }), _jsx(Button, { color: "primary", disabled: adding && printOnAdd, onClick: close, children: "Cancel" })] })] }), _jsx(WaitingForMaterialDialog, {})] }));
182
191
  });
183
192
  export const MultiMaterialDialog = memo(function MultiMaterialDialog(props) {
184
193
  const fmsInfo = useAtomValue(fmsInformation);
185
- const jobs = useAtomValue(currentStatus).jobs;
194
+ const status = useAtomValue(currentStatus);
195
+ const jobs = status.jobs;
196
+ const blockingAlarms = alarmsBlockingMaterialChanges(status, props.material ?? []);
186
197
  const [printLabel, printingLabel] = usePrintLabel();
187
198
  const [loading, setLoading] = useState(false);
188
199
  const [events, setEvents] = useState([]);
@@ -240,6 +251,8 @@ export const MultiMaterialDialog = memo(function MultiMaterialDialog(props) {
240
251
  setEvents([]);
241
252
  }
242
253
  function remove() {
254
+ if (blockingAlarms.length > 0)
255
+ return;
243
256
  if (showRemove) {
244
257
  if (!isNaN(removeCnt)) {
245
258
  setLoading(true);
@@ -264,9 +277,9 @@ export const MultiMaterialDialog = memo(function MultiMaterialDialog(props) {
264
277
  materialId: props.material[0].materialID,
265
278
  proc: 0,
266
279
  })
267
- : void 0, children: "Print Label" }))) : undefined, _jsx(Button, { color: "primary", onClick: remove, disabled: loading || (showRemove && isNaN(removeCnt)), children: loading && showRemove
268
- ? "Removing..."
269
- : showRemove && !isNaN(removeCnt)
270
- ? `Remove ${removeCnt} material`
271
- : "Remove Material" }), _jsx(Button, { color: "primary", onClick: close, children: "Close" })] })] }));
280
+ : void 0, children: "Print Label" }))) : undefined, _jsx(SystemAlarmTooltip, { suspended: blockingAlarms.length > 0, children: _jsx(Button, { color: "primary", onClick: remove, disabled: blockingAlarms.length > 0 || loading || (showRemove && isNaN(removeCnt)), children: loading && showRemove
281
+ ? "Removing..."
282
+ : showRemove && !isNaN(removeCnt)
283
+ ? `Remove ${removeCnt} material`
284
+ : "Remove Material" }) }), _jsx(Button, { color: "primary", onClick: close, children: "Close" })] })] }));
272
285
  });
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Dialog, DialogActions, DialogContent, DialogTitle, TextField, Tooltip, } from "@mui/material";
2
+ import { Button, Dialog, DialogActions, DialogContent, DialogTitle, TextField, } from "@mui/material";
3
3
  import { useAtomValue, useSetAtom } from "jotai";
4
4
  import { useState } from "react";
5
5
  import { LazySeq } from "@seedtactics/immutable-collections";
@@ -10,6 +10,8 @@ import { JobsBackend } from "../../network/backend.js";
10
10
  import { CancelLoadRequest } from "../../network/api.js";
11
11
  import { apiErrorMessage } from "../../network/api-errors.js";
12
12
  import { canCancelLoad } from "../../data/material-operation-policy.js";
13
+ import { alarmsBlockingMaterialChanges } from "../../cell-status/alarms.js";
14
+ import { SystemAlarmTooltip } from "./SystemAlarmTooltip.js";
13
15
  export function CancelLoadButton({ onClose, ignoreOperator = false, }) {
14
16
  const material = useAtomValue(inProcessMaterialInDialog);
15
17
  const status = useAtomValue(currentStatus);
@@ -32,8 +34,10 @@ export function CancelLoadButton({ onClose, ignoreOperator = false, }) {
32
34
  };
33
35
  if (currentSnapshot === null && snapshot === null)
34
36
  return null;
37
+ const currentAlarms = alarmsBlockingMaterialChanges(status, currentSnapshot?.group ?? []);
38
+ const confirmationAlarms = alarmsBlockingMaterialChanges(status, snapshot?.group ?? []);
35
39
  async function cancelLoad() {
36
- if (snapshot === null)
40
+ if (snapshot === null || confirmationAlarms.length > 0)
37
41
  return;
38
42
  setUpdating(true);
39
43
  setError(null);
@@ -54,12 +58,12 @@ export function CancelLoadButton({ onClose, ignoreOperator = false, }) {
54
58
  setUpdating(false);
55
59
  }
56
60
  }
57
- return (_jsxs(_Fragment, { children: [currentSnapshot ? (_jsx(Tooltip, { title: "Cancel the displayed load instruction", children: _jsx(Button, { color: "primary", disabled: updating, onClick: () => {
61
+ return (_jsxs(_Fragment, { children: [currentSnapshot ? (_jsx(SystemAlarmTooltip, { suspended: currentAlarms.length > 0, title: "Cancel the displayed load instruction", children: _jsx(Button, { color: "primary", disabled: updating || currentAlarms.length > 0, onClick: () => {
58
62
  setSnapshot(currentSnapshot);
59
63
  setReason("");
60
64
  setError(null);
61
65
  setOpen(true);
62
66
  }, children: "Cancel Load" }) })) : null, _jsxs(Dialog, { open: open && snapshot !== null, onClose: () => setOpen(false), children: [_jsx(DialogTitle, { children: "Cancel Load" }), _jsxs(DialogContent, { children: [_jsx("p", { children: "The displayed load instruction will be cancelled and recalculated for:" }), _jsx("ul", { children: snapshot?.group.map((candidate, index) => (_jsx("li", { children: candidate.materialID < 0
63
67
  ? `${candidate.partName} raw material`
64
- : candidate.serial || `Material ID ${candidate.materialID}` }, candidate.materialID >= 0 ? candidate.materialID : `raw-${index}`))) }), _jsx(TextField, { label: "Reason (optional)", value: reason, onChange: (e) => setReason(e.target.value), fullWidth: true, multiline: true }), error ? _jsx("p", { role: "alert", children: error }) : null] }), _jsxs(DialogActions, { children: [_jsx(Button, { color: "primary", disabled: updating, onClick: cancelLoad, children: "Cancel Load" }), _jsx(Button, { color: "secondary", disabled: updating, onClick: () => setOpen(false), children: "Keep Load" })] })] })] }));
68
+ : candidate.serial || `Material ID ${candidate.materialID}` }, candidate.materialID >= 0 ? candidate.materialID : `raw-${index}`))) }), _jsx(TextField, { label: "Reason (optional)", value: reason, onChange: (e) => setReason(e.target.value), fullWidth: true, multiline: true }), error ? _jsx("p", { role: "alert", children: error }) : null] }), _jsxs(DialogActions, { children: [_jsx(SystemAlarmTooltip, { suspended: confirmationAlarms.length > 0, children: _jsx(Button, { color: "primary", disabled: updating || confirmationAlarms.length > 0, onClick: cancelLoad, children: "Cancel Load" }) }), _jsx(Button, { color: "secondary", disabled: updating, onClick: () => setOpen(false), children: "Keep Load" })] })] })] }));
65
69
  }
@@ -38,7 +38,7 @@ import { LocType, LogType } from "../../network/api.js";
38
38
  import { JobsBackend } from "../../network/backend.js";
39
39
  import { HashMap, LazySeq } from "@seedtactics/immutable-collections";
40
40
  import { currentStatus } from "../../cell-status/current-status.js";
41
- import { barcodePotentialNewMaterial, inProcessMaterialInDialog, materialDialogOpen, materialInDialogInfo, materialInDialogLargestUsedProcess, materialInDialogLocalEvents, } from "../../cell-status/material-details.js";
41
+ import { barcodePotentialNewMaterial, inProcessMaterialInDialog, materialDialogOpen, materialInDialogInfo, materialInDialogLargestUsedProcess, materialInDialogLocalEvents, useMaterialBlockingAlarms, } from "../../cell-status/material-details.js";
42
42
  import { currentOperator } from "../../data/operators.js";
43
43
  import { fmsInformation } from "../../network/server-settings.js";
44
44
  import { useAtomValue, useAtomValueRawSync, useSetAtom } from "jotai";
@@ -48,6 +48,7 @@ import { PartIdenticon } from "./Material.js";
48
48
  import { isLogEntryInvalidated } from "../LogEntry.js";
49
49
  import { apiErrorMessage } from "../../network/api-errors.js";
50
50
  import { canInvalidateMaterial } from "../../data/material-operation-policy.js";
51
+ import { SystemAlarmTooltip } from "./SystemAlarmTooltip.js";
51
52
  const invalidatableEventTypes = LazySeq.of([
52
53
  LogType.AddToQueue,
53
54
  LogType.RemoveFromQueue,
@@ -173,6 +174,7 @@ export function InvalidateCycleDialogButton(props) {
173
174
  const lastMat = useAtomValue(materialInDialogLargestUsedProcess);
174
175
  const possibleNew = useAtomValue(barcodePotentialNewMaterial);
175
176
  const setMatToShow = useSetAtom(materialDialogOpen);
177
+ const changesSuspended = useMaterialBlockingAlarms().length > 0;
176
178
  let operator = useAtomValue(currentOperator);
177
179
  if (props.loadStation && !fmsInfo.allowInvalidateMaterialAtLoadStation)
178
180
  return null;
@@ -201,6 +203,8 @@ export function InvalidateCycleDialogButton(props) {
201
203
  });
202
204
  }
203
205
  function invalidateCycle() {
206
+ if (changesSuspended)
207
+ return;
204
208
  if (curMat && (props.st?.process || props.st?.changeRawMat || props.st?.changeJobUnique)) {
205
209
  props.setState({ ...props.st, updating: true });
206
210
  JobsBackend.invalidatePalletCycle(curMat.materialID, operator, props.st?.changeRawMat, props.st?.changeJobUnique, props.st?.process ?? 0)
@@ -226,21 +230,22 @@ export function InvalidateCycleDialogButton(props) {
226
230
  });
227
231
  }
228
232
  }
229
- return (_jsxs(_Fragment, { children: [props.st === null ? (_jsx(Button, { color: "primary", onClick: showInvalidate, children: "Invalidate Cycle" })) : undefined, props.st !== null ? (_jsx(Button, { color: "primary", onClick: invalidateCycle, disabled: props.st.updating ||
230
- (changingAssignment && !allowChange) ||
231
- (!changingAssignment &&
232
- props.st.process !== null &&
233
- props.st.process !== lastMat?.process) ||
234
- (props.st.process === null &&
235
- props.st.changeRawMat === null &&
236
- props.st.changeJobUnique === null), children: props.st.changeJobUnique !== null
237
- ? (lastMat?.process === 1
238
- ? "Invalidate Process 1 and Change to Job "
239
- : "Change to Job ") + props.st.changeJobUnique
240
- : props.st.changeRawMat !== null
241
- ? (lastMat?.process === 1 ? "Invalidate Process 1 and Change to " : "Change to ") +
242
- props.st.changeRawMat
243
- : props.st.process !== null
244
- ? "Invalidate Process " + props.st.process.toString()
245
- : "Invalidate Cycle" })) : undefined] }));
233
+ return (_jsx(SystemAlarmTooltip, { suspended: changesSuspended, children: props.st === null ? (_jsx(Button, { color: "primary", disabled: changesSuspended, onClick: showInvalidate, children: "Invalidate Cycle" })) : (_jsx(Button, { color: "primary", onClick: invalidateCycle, disabled: changesSuspended ||
234
+ props.st.updating ||
235
+ (changingAssignment && !allowChange) ||
236
+ (!changingAssignment &&
237
+ props.st.process !== null &&
238
+ props.st.process !== lastMat?.process) ||
239
+ (props.st.process === null &&
240
+ props.st.changeRawMat === null &&
241
+ props.st.changeJobUnique === null), children: props.st.changeJobUnique !== null
242
+ ? (lastMat?.process === 1
243
+ ? "Invalidate Process 1 and Change to Job "
244
+ : "Change to Job ") + props.st.changeJobUnique
245
+ : props.st.changeRawMat !== null
246
+ ? (lastMat?.process === 1 ? "Invalidate Process 1 and Change to " : "Change to ") +
247
+ props.st.changeRawMat
248
+ : props.st.process !== null
249
+ ? "Invalidate Process " + props.st.process.toString()
250
+ : "Invalidate Cycle" })) }));
246
251
  }
@@ -65,6 +65,7 @@ import { groupInterchangeableMaterial, hideNonLoadingMaterialOnLoadStation, } fr
65
65
  import { basketDisplayName, loadStationDisplayName } from "../../cell-status/station-cycles.js";
66
66
  import { canAddOrMoveMaterialToQueue } from "../../data/material-operation-policy.js";
67
67
  import { BasketLoadStationWorkflow } from "./BasketLoadStationWork.js";
68
+ import { SystemAlarmTooltip } from "./SystemAlarmTooltip.js";
68
69
  function encodeLoadStationRegionIdPart(value) {
69
70
  return encodeURIComponent(value.toString());
70
71
  }
@@ -584,6 +585,7 @@ function AddMatButton({ queues, onClose, toQueue, showAddToQueue, setShowAddToQu
584
585
  const operator = useAtomValue(currentOperator);
585
586
  const [addExistingMat, addingExistingMat] = matDetails.useAddExistingMaterialToQueue();
586
587
  const [addError, setAddError] = useState(null);
588
+ const changesSuspended = matDetails.useMaterialBlockingAlarms().length > 0;
587
589
  if (!existingMat || !canAddOrMoveMaterialToQueue(inProcMat)) {
588
590
  return null;
589
591
  }
@@ -595,25 +597,27 @@ function AddMatButton({ queues, onClose, toQueue, showAddToQueue, setShowAddToQu
595
597
  return null;
596
598
  }
597
599
  if (!showAddToQueue) {
598
- return (_jsx(Button, { color: "primary", onClick: () => setShowAddToQueue(true), children: "Add To Queue" }));
600
+ return (_jsx(SystemAlarmTooltip, { suspended: changesSuspended, children: _jsx(Button, { color: "primary", disabled: changesSuspended, onClick: () => setShowAddToQueue(true), children: "Add To Queue" }) }));
599
601
  }
600
602
  else {
601
- return (_jsxs(_Fragment, { children: [_jsxs(Button, { color: "primary", disabled: toQueue === null || addingExistingMat, onClick: async () => {
602
- setAddError(null);
603
- try {
604
- await addExistingMat({
605
- materialId: existingMat.materialID,
606
- queue: toQueue ?? "",
607
- queuePosition: -1,
608
- operator: operator,
609
- });
610
- setMatToShow(null);
611
- onClose();
612
- }
613
- catch (e) {
614
- setAddError(apiErrorMessage(e));
615
- }
616
- }, children: ["Add To ", toQueue ?? "Queue", " ", lastProcMat ? ` To Run Process ${lastProcMat.process + 1}` : ""] }), addError ? _jsx(Typography, { role: "alert", children: addError }) : null] }));
603
+ return (_jsxs(_Fragment, { children: [_jsx(SystemAlarmTooltip, { suspended: changesSuspended, children: _jsxs(Button, { color: "primary", disabled: changesSuspended || toQueue === null || addingExistingMat, onClick: async () => {
604
+ if (changesSuspended)
605
+ return;
606
+ setAddError(null);
607
+ try {
608
+ await addExistingMat({
609
+ materialId: existingMat.materialID,
610
+ queue: toQueue ?? "",
611
+ queuePosition: -1,
612
+ operator: operator,
613
+ });
614
+ setMatToShow(null);
615
+ onClose();
616
+ }
617
+ catch (e) {
618
+ setAddError(apiErrorMessage(e));
619
+ }
620
+ }, children: ["Add To ", toQueue ?? "Queue", " ", lastProcMat ? ` To Run Process ${lastProcMat.process + 1}` : ""] }) }), addError ? _jsx(Typography, { role: "alert", children: addError }) : null] }));
617
621
  }
618
622
  }
619
623
  function AssignWorkorderButton() {