@seedtactics/insight-client 16.8.0 → 16.8.2
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/README.md +23 -29
- package/dist/assets/index-BDPKYaRT.js +388 -0
- package/dist/cell-status/current-status.js +4 -1
- package/dist/cell-status/estimated-cycle-times.js +2 -1
- package/dist/cell-status/inspections.js +1 -1
- package/dist/cell-status/loading.js +1 -1
- package/dist/cell-status/material-summary.js +4 -2
- package/dist/cell-status/names.js +1 -1
- package/dist/cell-status/rebookings.js +3 -1
- package/dist/cell-status/scheduled-jobs.js +1 -1
- package/dist/cell-status/sim-production.js +6 -2
- package/dist/cell-status/station-cycles.js +3 -1
- package/dist/cell-status/tool-replacements.js +21 -7
- package/dist/cell-status/tool-usage.js +7 -2
- package/dist/components/App.d.ts +2 -2
- package/dist/components/App.js +13 -5
- package/dist/components/AxisAndGrid.d.ts +6 -6
- package/dist/components/BarcodeScanning.d.ts +2 -2
- package/dist/components/BarcodeScanning.js +9 -3
- package/dist/components/ChartTooltip.d.ts +2 -2
- package/dist/components/ChooseMode.js +6 -1
- package/dist/components/ChooseOperator.d.ts +1 -1
- package/dist/components/ChooseOperator.js +1 -1
- package/dist/components/ErrorsAndLoading.d.ts +3 -3
- package/dist/components/ErrorsAndLoading.js +1 -1
- package/dist/components/LoadingIcon.d.ts +1 -1
- package/dist/components/LoadingIcon.js +2 -2
- package/dist/components/LogEntry.d.ts +2 -2
- package/dist/components/LogEntry.js +31 -29
- package/dist/components/ManualSerialEntry.d.ts +2 -2
- package/dist/components/ManualSerialEntry.js +1 -1
- package/dist/components/MonthSelect.d.ts +1 -1
- package/dist/components/MonthSelect.js +4 -2
- package/dist/components/Navigation.d.ts +2 -2
- package/dist/components/Navigation.js +2 -2
- package/dist/components/VerboseLogging.d.ts +1 -1
- package/dist/components/analysis/AnalysisSelectToolbar.d.ts +1 -1
- package/dist/components/analysis/BasketCycleCards.d.ts +1 -1
- package/dist/components/analysis/BasketCycleCards.js +2 -2
- package/dist/components/analysis/BufferChart.d.ts +1 -1
- package/dist/components/analysis/BufferChart.js +23 -4
- package/dist/components/analysis/CostPerPiece.d.ts +2 -2
- package/dist/components/analysis/CostPerPiece.js +3 -3
- package/dist/components/analysis/CycleChart.d.ts +1 -1
- package/dist/components/analysis/CycleChart.js +19 -6
- package/dist/components/analysis/DataTable.js +5 -3
- package/dist/components/analysis/EfficiencyPage.d.ts +2 -2
- package/dist/components/analysis/EfficiencyPage.js +1 -1
- package/dist/components/analysis/HeatChart.d.ts +1 -1
- package/dist/components/analysis/HeatChart.js +13 -4
- package/dist/components/analysis/InspectionDataTable.d.ts +1 -1
- package/dist/components/analysis/InspectionDataTable.js +6 -1
- package/dist/components/analysis/InspectionSankey.d.ts +1 -1
- package/dist/components/analysis/InspectionSankey.js +16 -6
- package/dist/components/analysis/PalletCycleCards.d.ts +1 -1
- package/dist/components/analysis/PalletCycleCards.js +5 -3
- package/dist/components/analysis/PartCycleCards.d.ts +2 -2
- package/dist/components/analysis/PartCycleCards.js +16 -6
- package/dist/components/analysis/QualityPage.d.ts +1 -1
- package/dist/components/analysis/ScheduleHistory.d.ts +1 -1
- package/dist/components/analysis/ScheduleHistory.js +2 -2
- package/dist/components/analysis/StationDataTable.d.ts +1 -1
- package/dist/components/analysis/ToolReplacements.d.ts +1 -1
- package/dist/components/analysis/ToolReplacements.js +8 -4
- package/dist/components/operations/AllMaterial.d.ts +1 -1
- package/dist/components/operations/AllMaterial.js +1 -1
- package/dist/components/operations/ChartRangeEdit.d.ts +1 -1
- package/dist/components/operations/ChartRangeEdit.js +14 -5
- package/dist/components/operations/CloseoutReport.js +2 -2
- package/dist/components/operations/CompletedParts.js +3 -3
- package/dist/components/operations/CurrentWorkorders.js +3 -3
- package/dist/components/operations/Dashboard.d.ts +2 -2
- package/dist/components/operations/Dashboard.js +1 -1
- package/dist/components/operations/OEEChart.d.ts +4 -4
- package/dist/components/operations/OEEChart.js +7 -2
- package/dist/components/operations/Outliers.d.ts +1 -1
- package/dist/components/operations/Outliers.js +1 -1
- package/dist/components/operations/Programs.js +10 -5
- package/dist/components/operations/Rebookings.d.ts +1 -1
- package/dist/components/operations/Rebookings.js +4 -2
- package/dist/components/operations/RecentCycleChart.d.ts +1 -1
- package/dist/components/operations/RecentCycleChart.js +3 -3
- package/dist/components/operations/RecentProduction.js +3 -3
- package/dist/components/operations/RecentSchedules.js +6 -4
- package/dist/components/operations/RecentStationCycles.d.ts +1 -1
- package/dist/components/operations/RecentStationCycles.js +2 -2
- package/dist/components/operations/ShiftSettings.d.ts +1 -1
- package/dist/components/operations/SimDayUsage.d.ts +1 -1
- package/dist/components/operations/SimDayUsage.js +1 -1
- package/dist/components/operations/ToolReport.js +21 -10
- package/dist/components/operations/WorkorderGantt.d.ts +1 -1
- package/dist/components/operations/WorkorderGantt.js +1 -1
- package/dist/components/quality/QualityMaterial.d.ts +2 -2
- package/dist/components/quality/QualityMaterial.js +2 -2
- package/dist/components/quality/QualityPaths.d.ts +1 -1
- package/dist/components/quality/RecentFailedInspections.d.ts +1 -1
- package/dist/components/quality/RecentFailedInspections.js +1 -1
- package/dist/components/routes.d.ts +1 -1
- package/dist/components/routes.js +1 -1
- package/dist/components/station-monitor/BulkRawMaterial.d.ts +2 -2
- package/dist/components/station-monitor/BulkRawMaterial.js +12 -6
- package/dist/components/station-monitor/Closeout.js +7 -3
- package/dist/components/station-monitor/CustomStationMonitorDialog.js +1 -1
- package/dist/components/station-monitor/Inspection.js +4 -2
- package/dist/components/station-monitor/InvalidateCycle.d.ts +3 -3
- package/dist/components/station-monitor/InvalidateCycle.js +11 -4
- package/dist/components/station-monitor/JobDetails.js +5 -3
- package/dist/components/station-monitor/LoadStation.d.ts +1 -1
- package/dist/components/station-monitor/LoadStation.js +11 -8
- package/dist/components/station-monitor/Material.d.ts +10 -10
- package/dist/components/station-monitor/Material.js +31 -23
- package/dist/components/station-monitor/Material.test.js +1 -1
- package/dist/components/station-monitor/MoveMaterialArrows.d.ts +2 -2
- package/dist/components/station-monitor/PrintedLabel.d.ts +3 -3
- package/dist/components/station-monitor/PrintedLabel.js +10 -5
- package/dist/components/station-monitor/QuarantineButton.d.ts +1 -1
- package/dist/components/station-monitor/QuarantineButton.js +5 -3
- package/dist/components/station-monitor/Queues.d.ts +2 -2
- package/dist/components/station-monitor/Queues.js +8 -6
- package/dist/components/station-monitor/QueuesAddMaterial.d.ts +3 -3
- package/dist/components/station-monitor/QueuesAddMaterial.js +22 -9
- package/dist/components/station-monitor/SelectInspType.d.ts +2 -2
- package/dist/components/station-monitor/SelectInspType.js +1 -1
- package/dist/components/station-monitor/SelectWorkorder.d.ts +1 -1
- package/dist/components/station-monitor/SelectWorkorder.js +1 -1
- package/dist/components/station-monitor/StationToolbar.d.ts +1 -1
- package/dist/components/station-monitor/StationToolbar.js +13 -3
- package/dist/components/station-monitor/SystemOverview.d.ts +4 -4
- package/dist/components/station-monitor/SystemOverview.js +45 -23
- package/dist/components/station-monitor/Whiteboard.d.ts +1 -1
- package/dist/data/all-material-bins.d.ts +1 -1
- package/dist/data/all-material-bins.js +7 -6
- package/dist/data/chart-times.d.ts +1 -1
- package/dist/data/cost-per-piece.js +3 -1
- package/dist/data/current-cycles.js +3 -3
- package/dist/data/move-arrows.js +3 -1
- package/dist/data/operators.d.ts +1 -1
- package/dist/data/part-summary.js +1 -1
- package/dist/data/results.cycles.js +13 -4
- package/dist/data/tools-programs.d.ts +2 -2
- package/dist/data/tools-programs.js +3 -2
- package/dist/index.html +1 -1
- package/dist/network/api.d.ts +75 -9
- package/dist/network/api.js +626 -379
- package/dist/util/chart-colors.js +12 -1
- package/docs/client-efficiency.md +226 -263
- package/docs/client-engineering.md +27 -28
- package/docs/client-launch.md +32 -33
- package/docs/client-operations.md +50 -53
- package/docs/client-quality.md +39 -43
- package/docs/client-sales.md +36 -40
- package/docs/client-scanners.md +27 -27
- package/docs/client-station-monitor.md +86 -96
- package/docs/client-tools-programs.md +47 -44
- package/docs/improve-fms.md +73 -78
- package/docs/makino.md +21 -25
- package/docs/material-quarantine.md +50 -64
- package/docs/material-tracking.md +162 -195
- package/docs/mazak.md +78 -91
- package/docs/niigata.md +145 -168
- package/docs/operator-procedures.md +72 -76
- package/docs/part-instructions.md +36 -36
- package/docs/security.md +87 -81
- package/docs/server-config.md +36 -45
- package/docs/server-errors.md +21 -22
- package/package.json +27 -26
- package/dist/assets/index-BwbaiELK.js +0 -364
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function PalletCycleChart(): import("react
|
|
1
|
+
export declare function PalletCycleChart(): import("react").JSX.Element;
|
|
@@ -49,7 +49,7 @@ import { LazySeq } from "@seedtactics/immutable-collections";
|
|
|
49
49
|
import { PartIdenticon } from "../station-monitor/Material.js";
|
|
50
50
|
import { materialDialogOpen } from "../../cell-status/material-details.js";
|
|
51
51
|
import { useCallback } from "react";
|
|
52
|
-
const selectedPalletAtom = atomWithDefault((get) =>
|
|
52
|
+
const selectedPalletAtom = atomWithDefault((get) => get(isDemoAtom) ? 3 : undefined);
|
|
53
53
|
const selectedPartAtom = atom(undefined);
|
|
54
54
|
const zoomDateRangeAtom = atom(undefined);
|
|
55
55
|
const yZoomAtom = atom(null);
|
|
@@ -69,7 +69,9 @@ const filteredPoints = atom((get) => {
|
|
|
69
69
|
if (selPart) {
|
|
70
70
|
cyclesForPal = cyclesForPal.filter((c) => c.mats.some((m) => m.part === selPart.part && m.proc === selPart.proc));
|
|
71
71
|
}
|
|
72
|
-
return new Map([
|
|
72
|
+
return new Map([
|
|
73
|
+
[selPal.toString(), Array.from(cyclesForPal)],
|
|
74
|
+
]);
|
|
73
75
|
}
|
|
74
76
|
else if (selPart) {
|
|
75
77
|
// go through all the pallets, filter each by part, and keep those that have any cycles
|
|
@@ -137,7 +139,7 @@ export function PalletCycleChart() {
|
|
|
137
139
|
maxWidth: "calc(100vw - 24px - 24px)",
|
|
138
140
|
}, children: [_jsx(Typography, { variant: "subtitle1", children: "Pallet Cycles" }), _jsx(Box, { sx: {
|
|
139
141
|
flexGrow: 1,
|
|
140
|
-
} }), _jsx(FormControl, { size: "small", children: _jsxs(Select, { autoWidth: true, displayEmpty: true, value: selectedPallet ?? -1, onChange: (e) => setSelectedPallet(e.target.value === -1 ? undefined :
|
|
142
|
+
} }), _jsx(FormControl, { size: "small", children: _jsxs(Select, { autoWidth: true, displayEmpty: true, value: selectedPallet ?? -1, onChange: (e) => setSelectedPallet(e.target.value === -1 ? undefined : e.target.value), children: [_jsx(MenuItem, { value: -1, children: _jsx("em", { children: "Any Pallet" }) }, 0), palletCycles
|
|
141
143
|
.keysToLazySeq()
|
|
142
144
|
.sortBy((x) => x)
|
|
143
145
|
.map((n) => (_jsx(MenuItem, { value: n, children: _jsx("div", { style: { display: "flex", alignItems: "center" }, children: _jsx("span", { style: { marginRight: "1em" }, children: n }) }) }, n)))] }) }), partNames.length > 0 ? (_jsx(FormControl, { size: "small", children: _jsxs(Select, { autoWidth: true, displayEmpty: true, value: selectedPart
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function PartMachineCycleChart(): import("react
|
|
2
|
-
export declare function PartLoadStationCycleChart(): import("react
|
|
1
|
+
export declare function PartMachineCycleChart(): import("react").JSX.Element;
|
|
2
|
+
export declare function PartLoadStationCycleChart(): import("react").JSX.Element;
|
|
@@ -46,7 +46,7 @@ import { filterStationCycles, FilterAnyMachineKey, copyCyclesToClipboard, planne
|
|
|
46
46
|
import { PartIdenticon } from "../station-monitor/Material.js";
|
|
47
47
|
import StationDataTable from "./StationDataTable.js";
|
|
48
48
|
import { useSetTitle, isDemoAtom } from "../routes.js";
|
|
49
|
-
import { last30MaterialSummary, specificMonthMaterialSummary } from "../../cell-status/material-summary.js";
|
|
49
|
+
import { last30MaterialSummary, specificMonthMaterialSummary, } from "../../cell-status/material-summary.js";
|
|
50
50
|
import { last30EstimatedCycleTimes, PartAndStationOperation, specificMonthEstimatedCycleTimes, } from "../../cell-status/estimated-cycle-times.js";
|
|
51
51
|
import { basketDisplayName, last30HasBasketCycles, last30StationCycles, specificMonthHasBasketCycles, specificMonthStationCycles, } from "../../cell-status/station-cycles.js";
|
|
52
52
|
import { LazySeq, OrderedMap } from "@seedtactics/immutable-collections";
|
|
@@ -64,9 +64,9 @@ function isPartCycleChartData(point) {
|
|
|
64
64
|
return "material" in point && Array.isArray(point.material);
|
|
65
65
|
}
|
|
66
66
|
function hasLoadCycleOperations(point) {
|
|
67
|
-
return "operations" in point && (point.operations === undefined || Array.isArray(point.operations));
|
|
67
|
+
return ("operations" in point && (point.operations === undefined || Array.isArray(point.operations)));
|
|
68
68
|
}
|
|
69
|
-
function DisplayDateRange({ range }) {
|
|
69
|
+
function DisplayDateRange({ range, }) {
|
|
70
70
|
const period = useAtomValue(selectedAnalysisPeriod);
|
|
71
71
|
if (!range)
|
|
72
72
|
return null;
|
|
@@ -205,7 +205,9 @@ export function PartMachineCycleChart() {
|
|
|
205
205
|
: -1
|
|
206
206
|
: selectedMachine, style: { marginLeft: "1em" }, onChange: (e) => {
|
|
207
207
|
if (selectedPart) {
|
|
208
|
-
const selectedIdx = typeof e.target.value === "number"
|
|
208
|
+
const selectedIdx = typeof e.target.value === "number"
|
|
209
|
+
? e.target.value
|
|
210
|
+
: Number.parseInt(e.target.value, 10);
|
|
209
211
|
if (!Number.isNaN(selectedIdx)) {
|
|
210
212
|
setSelectedOperation(selectedIdx === -1 ? undefined : points.allMachineOperations[selectedIdx]);
|
|
211
213
|
}
|
|
@@ -331,7 +333,15 @@ export function PartLoadStationCycleChart() {
|
|
|
331
333
|
else {
|
|
332
334
|
return emptyStationCycles(cycles.valuesToLazySeq());
|
|
333
335
|
}
|
|
334
|
-
}, [
|
|
336
|
+
}, [
|
|
337
|
+
selectedPart,
|
|
338
|
+
selectedPallet,
|
|
339
|
+
curOperation,
|
|
340
|
+
selectedLoadStation,
|
|
341
|
+
cycles,
|
|
342
|
+
showGraph,
|
|
343
|
+
carrierFilter,
|
|
344
|
+
]);
|
|
335
345
|
const plannedMinutes = useMemo(() => {
|
|
336
346
|
if (selectedOperation === "LoadOp" || selectedOperation === "UnloadOp") {
|
|
337
347
|
return plannedOperationMinutes(points, true);
|
|
@@ -361,7 +371,7 @@ export function PartLoadStationCycleChart() {
|
|
|
361
371
|
else {
|
|
362
372
|
setSelectedPart(e.target.value === -1 ? undefined : points.allPartAndProcNames[e.target.value]);
|
|
363
373
|
}
|
|
364
|
-
}, children: [_jsx(MenuItem, { value: -1, children: _jsx("em", { children: "Any Part" }) }, 0), points.allPartAndProcNames.map((n, idx) => (_jsx(MenuItem, { value: idx, children: _jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [_jsx(PartIdenticon, { part: n.part, size: 20 }), _jsxs("span", { style: { marginRight: "1em" }, children: [n.part, "-", n.proc] })] }) }, idx)))] }) }), _jsx(FormControl, { size: "small", children: _jsxs(Select, { autoWidth: true, displayEmpty: true, value: selectedOperation, style: { marginLeft: "1em" }, onChange: (e) => setSelectedOperation(e.target.value), children: [_jsx(MenuItem, { value: "LULOccupancy", children: "L/U Occupancy" }), selectedPart ? _jsx(MenuItem, { value: "LoadOp", children: "Load Operation (estimated)" }) : undefined, selectedPart ? _jsx(MenuItem, { value: "UnloadOp", children: "Unload Operation (estimated)" }) : undefined] }) }), _jsx(FormControl, { size: "small", children: _jsxs(Select, { autoWidth: true, displayEmpty: true, value: selectedLoadStation, style: { marginLeft: "1em" }, onChange: (e) => {
|
|
374
|
+
}, children: [_jsx(MenuItem, { value: -1, children: _jsx("em", { children: "Any Part" }) }, 0), points.allPartAndProcNames.map((n, idx) => (_jsx(MenuItem, { value: idx, children: _jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [_jsx(PartIdenticon, { part: n.part, size: 20 }), _jsxs("span", { style: { marginRight: "1em" }, children: [n.part, "-", n.proc] })] }) }, idx)))] }) }), _jsx(FormControl, { size: "small", children: _jsxs(Select, { autoWidth: true, displayEmpty: true, value: selectedOperation, style: { marginLeft: "1em" }, onChange: (e) => setSelectedOperation(e.target.value), children: [_jsx(MenuItem, { value: "LULOccupancy", children: "L/U Occupancy" }), selectedPart ? (_jsx(MenuItem, { value: "LoadOp", children: "Load Operation (estimated)" })) : undefined, selectedPart ? (_jsx(MenuItem, { value: "UnloadOp", children: "Unload Operation (estimated)" })) : undefined] }) }), _jsx(FormControl, { size: "small", children: _jsxs(Select, { autoWidth: true, displayEmpty: true, value: selectedLoadStation, style: { marginLeft: "1em" }, onChange: (e) => {
|
|
365
375
|
setSelectedLoadStation(e.target.value);
|
|
366
376
|
}, children: [_jsx(MenuItem, { value: FilterAnyLoadKey, children: _jsx("em", { children: "Any Station" }) }, -1), points.allLoadStationNames.map((n) => (_jsx(MenuItem, { value: n, children: _jsx("div", { style: { display: "flex", alignItems: "center" }, children: _jsx("span", { style: { marginRight: "1em" }, children: n }) }) }, n)))] }) }), hasBasketCycles ? (_jsx(FormControl, { size: "small", children: _jsxs(Select, { autoWidth: true, displayEmpty: true, value: carrierFilter, style: { marginLeft: "1em" }, onChange: (e) => {
|
|
367
377
|
const carrier = e.target.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function AnalysisQualityPage(): import("react
|
|
1
|
+
export declare function AnalysisQualityPage(): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2022, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
34
34
|
import { useState, useMemo } from "react";
|
|
35
35
|
import { last30Jobs, specificMonthJobs } from "../../cell-status/scheduled-jobs.js";
|
|
36
36
|
import { selectedAnalysisPeriod } from "../../network/load-specific-month.js";
|
|
37
|
-
import { last30MaterialSummary, specificMonthMaterialSummary } from "../../cell-status/material-summary.js";
|
|
37
|
+
import { last30MaterialSummary, specificMonthMaterialSummary, } from "../../cell-status/material-summary.js";
|
|
38
38
|
import { DataTableActions, DataTableHead, useColSort, useTablePage, useTableZoomForPeriod, } from "./DataTable.js";
|
|
39
39
|
import { buildScheduledJobs } from "../../data/results.schedules.js";
|
|
40
40
|
import { LazySeq } from "@seedtactics/immutable-collections";
|
|
@@ -21,5 +21,5 @@ interface StationDataTableProps {
|
|
|
21
21
|
readonly defaultSortDesc?: boolean;
|
|
22
22
|
readonly emptyMessage?: string;
|
|
23
23
|
}
|
|
24
|
-
declare const _default: import("react").MemoExoticComponent<(props: StationDataTableProps) => import("react
|
|
24
|
+
declare const _default: import("react").MemoExoticComponent<(props: StationDataTableProps) => import("react").JSX.Element>;
|
|
25
25
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ToolReplacementPage: import("react").MemoExoticComponent<() => import("react
|
|
1
|
+
export declare const ToolReplacementPage: import("react").MemoExoticComponent<() => import("react").JSX.Element>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2022, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -52,7 +52,11 @@ function tool_replacements_with_station_and_date(zoom, allReplacements, selected
|
|
|
52
52
|
return rsForStat
|
|
53
53
|
.valuesToAscLazySeq()
|
|
54
54
|
.transform((x) => zoomRange ? x.filter((rs) => rs.time >= zoomRange.start && rs.time <= zoomRange.end) : x)
|
|
55
|
-
.flatMap((rs) => rs.replacements.map((replacement) => ({
|
|
55
|
+
.flatMap((rs) => rs.replacements.map((replacement) => ({
|
|
56
|
+
...replacement,
|
|
57
|
+
station: selectedStation,
|
|
58
|
+
time: rs.time,
|
|
59
|
+
})));
|
|
56
60
|
}
|
|
57
61
|
else {
|
|
58
62
|
return allReplacements.toAscLazySeq().flatMap(([station, rsByStat]) => rsByStat
|
|
@@ -130,13 +134,13 @@ const CurZoomContext = createContext({
|
|
|
130
134
|
end: new Date(),
|
|
131
135
|
});
|
|
132
136
|
function ReplacementTooltip({ tooltip }) {
|
|
133
|
-
return (_jsxs(Stack, { spacing: 0.5, children: [_jsxs("div", { children: ["Tool: ", tooltip.r.tool] }), _jsxs("div", { children: ["Pocket: ", tooltip.r.pocket] }), _jsxs("div", { children: ["Time: ", tooltip.r.time.toLocaleString()] }), _jsxs("div", { children: ["Station: ", tooltip.r.station.group, " #", tooltip.r.station.num] }), tooltip.r.type === "ReplaceBeforeCycleStart" ? (_jsxs(_Fragment, { children: [tooltip.r.useAtReplacement !== null ? (_jsxs("div", { children: ["Minutes at replacement: ", decimalFormat.format(tooltip.r.useAtReplacement)] })) : undefined, tooltip.r.cntAtReplacement !== null ? (_jsxs("div", { children: ["Count at replacement: ", decimalFormat.format(tooltip.r.cntAtReplacement)] })) : undefined] })) : (_jsxs(_Fragment, { children: [tooltip.r.totalUseAtBeginningOfCycle !== null ? (_jsxs("div", { children: ["Minutes at beginning of cycle: ", decimalFormat.format(tooltip.r.totalUseAtBeginningOfCycle)] })) : undefined, tooltip.r.totalUseAtEndOfCycle !== null ? (_jsxs("div", { children: ["Minutes at end of cycle: ", decimalFormat.format(tooltip.r.totalUseAtEndOfCycle)] })) : undefined, tooltip.r.totalCntAtBeginningOfCycle !== null ? (_jsxs("div", { children: ["Count at beginning of cycle: ", decimalFormat.format(tooltip.r.totalCntAtBeginningOfCycle)] })) : undefined, tooltip.r.totalCntAtEndOfCycle !== null ? (_jsxs("div", { children: ["Count at end of cycle: ", decimalFormat.format(tooltip.r.totalCntAtEndOfCycle)] })) : undefined] }))] }));
|
|
137
|
+
return (_jsxs(Stack, { spacing: 0.5, children: [_jsxs("div", { children: ["Tool: ", tooltip.r.tool] }), _jsxs("div", { children: ["Pocket: ", tooltip.r.pocket] }), _jsxs("div", { children: ["Time: ", tooltip.r.time.toLocaleString()] }), _jsxs("div", { children: ["Station: ", tooltip.r.station.group, " #", tooltip.r.station.num] }), tooltip.r.type === "ReplaceBeforeCycleStart" ? (_jsxs(_Fragment, { children: [tooltip.r.useAtReplacement !== null ? (_jsxs("div", { children: ["Minutes at replacement: ", decimalFormat.format(tooltip.r.useAtReplacement)] })) : undefined, tooltip.r.cntAtReplacement !== null ? (_jsxs("div", { children: ["Count at replacement: ", decimalFormat.format(tooltip.r.cntAtReplacement)] })) : undefined] })) : (_jsxs(_Fragment, { children: [tooltip.r.totalUseAtBeginningOfCycle !== null ? (_jsxs("div", { children: ["Minutes at beginning of cycle:", " ", decimalFormat.format(tooltip.r.totalUseAtBeginningOfCycle)] })) : undefined, tooltip.r.totalUseAtEndOfCycle !== null ? (_jsxs("div", { children: ["Minutes at end of cycle: ", decimalFormat.format(tooltip.r.totalUseAtEndOfCycle)] })) : undefined, tooltip.r.totalCntAtBeginningOfCycle !== null ? (_jsxs("div", { children: ["Count at beginning of cycle:", " ", decimalFormat.format(tooltip.r.totalCntAtBeginningOfCycle)] })) : undefined, tooltip.r.totalCntAtEndOfCycle !== null ? (_jsxs("div", { children: ["Count at end of cycle: ", decimalFormat.format(tooltip.r.totalCntAtEndOfCycle)] })) : undefined] }))] }));
|
|
134
138
|
}
|
|
135
139
|
function Replacements({ row, tooltip, timeScale, yScale, }) {
|
|
136
140
|
const [t, setTooltip] = useAtom(tooltip);
|
|
137
141
|
return (_jsx("g", { children: row.replacements.map((r, i) => (_jsx("circle", { cx: timeScale(r.time), cy: yScale(replacementToYVal(row, r)), r: r === t?.r ? 4 : 2, onMouseEnter: (e) => setTooltip({ top: 0, left: localPoint(e)?.x ?? 0, r }), fill: "black" }, i))) }));
|
|
138
142
|
}
|
|
139
|
-
const ReplacementGraph = memo(function ReplacementGraph({ row }) {
|
|
143
|
+
const ReplacementGraph = memo(function ReplacementGraph({ row, }) {
|
|
140
144
|
const zoom = useContext(CurZoomContext);
|
|
141
145
|
const tooltip = useMemo(() => atom(null), []);
|
|
142
146
|
const setTooltip = useSetAtom(tooltip);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface AllMaterialProps {
|
|
2
2
|
readonly displaySystemBins: boolean;
|
|
3
3
|
}
|
|
4
|
-
export declare function AllMaterial(props: AllMaterialProps): import("react
|
|
4
|
+
export declare function AllMaterial(props: AllMaterialProps): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Last30ChartRangeAtom } from "../../data/chart-times";
|
|
2
2
|
export declare const Last30ChartRangeToolbar: import("react").MemoExoticComponent<({ chartAtom, }: {
|
|
3
3
|
chartAtom: Last30ChartRangeAtom;
|
|
4
|
-
}) => import("react
|
|
4
|
+
}) => import("react").JSX.Element>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2025, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -44,7 +44,10 @@ function isStartType(value) {
|
|
|
44
44
|
value === "Last30");
|
|
45
45
|
}
|
|
46
46
|
function isEndType(value) {
|
|
47
|
-
return value === "CustomDate" ||
|
|
47
|
+
return (value === "CustomDate" ||
|
|
48
|
+
value === "Now" ||
|
|
49
|
+
value === "EndOfYesterday" ||
|
|
50
|
+
value === "EndOfLastWeek");
|
|
48
51
|
}
|
|
49
52
|
function parseWeekdayStart(value) {
|
|
50
53
|
switch (value) {
|
|
@@ -73,17 +76,23 @@ function RadioLabel({ label, date }) {
|
|
|
73
76
|
}
|
|
74
77
|
function CustomDateLabel({ date, setDate, enabled, }) {
|
|
75
78
|
const last30 = useAtomValue(last30ChartStartTimes("Last30"));
|
|
76
|
-
return (_jsx(TextField, { type: "datetime-local", value: date
|
|
79
|
+
return (_jsx(TextField, { type: "datetime-local", value: date
|
|
80
|
+
? new Date(date.getTime() - date.getTimezoneOffset() * 60000).toISOString().slice(0, 16)
|
|
81
|
+
: "", onChange: (event) => setDate(new Date(event.target.value)), disabled: !enabled, label: "Custom Date", slotProps: {
|
|
77
82
|
inputLabel: { shrink: true },
|
|
78
83
|
htmlInput: {
|
|
79
|
-
min: new Date(last30.getTime() - last30.getTimezoneOffset() * 60000)
|
|
84
|
+
min: new Date(last30.getTime() - last30.getTimezoneOffset() * 60000)
|
|
85
|
+
.toISOString()
|
|
86
|
+
.slice(0, 16),
|
|
80
87
|
},
|
|
81
88
|
} }));
|
|
82
89
|
}
|
|
83
90
|
function RangeStart({ chartAtom }) {
|
|
84
91
|
const [chartRange, setChartRange] = useAtom(chartAtom);
|
|
85
92
|
const dayStart = useAtomValue(last30WeekdayStartMinuteOffset);
|
|
86
|
-
const [customDate, setCustomDate] = useState(chartRange.startType instanceof Date
|
|
93
|
+
const [customDate, setCustomDate] = useState(chartRange.startType instanceof Date
|
|
94
|
+
? chartRange.startType
|
|
95
|
+
: addMinutes(startOfToday(), dayStart));
|
|
87
96
|
function setTy(type) {
|
|
88
97
|
if (type === "CustomDate") {
|
|
89
98
|
setChartRange({ start: customDate ?? new Date() });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2024, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -36,7 +36,7 @@ import { addDays, startOfToday } from "date-fns";
|
|
|
36
36
|
import { Box, IconButton, Stack, Table, TableBody, TableCell, TableHead, TableRow, TableSortLabel, Tooltip, Typography, } from "@mui/material";
|
|
37
37
|
import { Button } from "@mui/material";
|
|
38
38
|
import { MaterialDialog, PartIdenticon } from "../station-monitor/Material.js";
|
|
39
|
-
import { SelectWorkorderDialog, selectWorkorderDialogOpen } from "../station-monitor/SelectWorkorder.js";
|
|
39
|
+
import { SelectWorkorderDialog, selectWorkorderDialogOpen, } from "../station-monitor/SelectWorkorder.js";
|
|
40
40
|
import { materialDialogOpen, materialInDialogInfo, useCompleteCloseout, } from "../../cell-status/material-details.js";
|
|
41
41
|
import { last30MaterialSummary, } from "../../cell-status/material-summary.js";
|
|
42
42
|
import { useSetTitle } from "../routes.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2025, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -36,12 +36,12 @@ import { Box, Button, Stack, TableSortLabel, IconButton, Tooltip, Typography, Ta
|
|
|
36
36
|
import { MaterialDialog, PartIdenticon } from "../station-monitor/Material.js";
|
|
37
37
|
import { FirstPage as FirstPageIcon, KeyboardArrowLeft, KeyboardArrowRight, LastPage as LastPageIcon, KeyboardArrowDown as KeyboardArrowDownIcon, KeyboardArrowUp as KeyboardArrowUpIcon, ImportExport, MoreHoriz, Check, ErrorOutlined, SavedSearch, HelpOutlined, } from "@mui/icons-material";
|
|
38
38
|
import { Collapse } from "@mui/material";
|
|
39
|
-
import { LazySeq, mkCompareByProperties } from "@seedtactics/immutable-collections";
|
|
39
|
+
import { LazySeq, mkCompareByProperties, } from "@seedtactics/immutable-collections";
|
|
40
40
|
import { AppLink, RouteLocation, useSetTitle } from "../routes.js";
|
|
41
41
|
import { materialDialogOpen, materialInDialogInfo, useCompleteCloseout, } from "../../cell-status/material-details.js";
|
|
42
42
|
import copy from "copy-to-clipboard";
|
|
43
43
|
import { useAtomValue, useSetAtom } from "jotai";
|
|
44
|
-
import { SelectWorkorderDialog, selectWorkorderDialogOpen } from "../station-monitor/SelectWorkorder.js";
|
|
44
|
+
import { SelectWorkorderDialog, selectWorkorderDialogOpen, } from "../station-monitor/SelectWorkorder.js";
|
|
45
45
|
import { last30PartSummary, last30PartSummaryRange } from "../../data/part-summary.js";
|
|
46
46
|
import { Last30ChartRangeToolbar } from "./ChartRangeEdit.js";
|
|
47
47
|
const numFormat = new Intl.NumberFormat(undefined, { maximumFractionDigits: 1 });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2023, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -54,7 +54,7 @@ import copy from "copy-to-clipboard";
|
|
|
54
54
|
import { atom, useAtom, useAtomValue, useSetAtom } from "jotai";
|
|
55
55
|
import { atomWithStorage } from "jotai/utils";
|
|
56
56
|
import { WorkorderGantt } from "./WorkorderGantt.js";
|
|
57
|
-
import { SelectWorkorderDialog, selectWorkorderDialogOpen } from "../station-monitor/SelectWorkorder.js";
|
|
57
|
+
import { SelectWorkorderDialog, selectWorkorderDialogOpen, } from "../station-monitor/SelectWorkorder.js";
|
|
58
58
|
import { LogBackend } from "../../network/backend.js";
|
|
59
59
|
const currentWorkorderIdToSearch = atom((get) => {
|
|
60
60
|
const r = get(currentRoute);
|
|
@@ -133,7 +133,7 @@ function isAbnormal(m) {
|
|
|
133
133
|
if (m.closeout === WorkorderSerialCloseout.ClosedOut) {
|
|
134
134
|
return false;
|
|
135
135
|
}
|
|
136
|
-
return m.quarantined || m.inspectionFailed || m.closeout === WorkorderSerialCloseout.CloseOutFailed;
|
|
136
|
+
return (m.quarantined || m.inspectionFailed || m.closeout === WorkorderSerialCloseout.CloseOutFailed);
|
|
137
137
|
}
|
|
138
138
|
function WorkorderRow({ workorder, showSim, }) {
|
|
139
139
|
const [open, setOpen] = useState(false);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function ScrollableDashboard(): import("react
|
|
2
|
-
export default function Dashboard(): import("react
|
|
1
|
+
export declare function ScrollableDashboard(): import("react").JSX.Element;
|
|
2
|
+
export default function Dashboard(): import("react").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OEEBarSeries, OEEType } from "../../data/results.oee.js";
|
|
2
2
|
export declare function OEEChart({ points }: {
|
|
3
3
|
points: ReadonlyArray<OEEBarSeries>;
|
|
4
|
-
}): import("react
|
|
5
|
-
export declare const OEETable: import("react").MemoExoticComponent<({ points }: {
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
export declare const OEETable: import("react").MemoExoticComponent<({ points, }: {
|
|
6
6
|
points: ReadonlyArray<OEEBarSeries>;
|
|
7
|
-
}) => import("react
|
|
7
|
+
}) => import("react").JSX.Element>;
|
|
8
8
|
export declare function StationOEEPage({ ty }: {
|
|
9
9
|
readonly ty: OEEType;
|
|
10
|
-
}): import("react
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -80,7 +80,12 @@ function BarChart({ width, height, points, setTooltip, }) {
|
|
|
80
80
|
}, onMouseLeave: () => setTooltip(null) })] }, i)))] }) }));
|
|
81
81
|
}
|
|
82
82
|
function OEELegend({ station }) {
|
|
83
|
-
return (_jsxs("div", { style: {
|
|
83
|
+
return (_jsxs("div", { style: {
|
|
84
|
+
marginTop: "1em",
|
|
85
|
+
display: "flex",
|
|
86
|
+
flexWrap: "wrap",
|
|
87
|
+
justifyContent: "space-evenly",
|
|
88
|
+
}, children: [_jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [_jsx("div", { style: { width: "14px", height: "14px", backgroundColor: actualOeeColor } }), _jsxs("div", { style: { marginLeft: "1em" }, children: [station, " Actual"] })] }), _jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [_jsx("div", { style: { width: "14px", height: "14px", backgroundColor: plannedOeeColor } }), _jsxs("div", { style: { marginLeft: "1em" }, children: [station, " Planned"] })] })] }));
|
|
84
89
|
}
|
|
85
90
|
function OEETooltip({ tooltip }) {
|
|
86
91
|
return (_jsxs("div", { children: [_jsx("div", { children: tooltip.datum.x }), _jsxs("div", { children: ["Actual Hours: ", tooltip.datum.y?.toFixed(1)] }), _jsxs("div", { children: ["Planned Hours: ", tooltip.datum?.plannedHours?.toFixed(1)] })] }));
|
|
@@ -150,7 +155,7 @@ function dataForTable(series, sortOn) {
|
|
|
150
155
|
.flatMap((e) => e.points)
|
|
151
156
|
.toSortedArray(sortOn);
|
|
152
157
|
}
|
|
153
|
-
export const OEETable = memo(function OEETableF({ points }) {
|
|
158
|
+
export const OEETable = memo(function OEETableF({ points, }) {
|
|
154
159
|
const sort = useColSort(ColumnId.Date, columns);
|
|
155
160
|
return (_jsxs(Table, { children: [_jsx(DataTableHead, { columns: columns, sort: sort, showDetailsCol: false }), _jsx(DataTableBody, { columns: columns, pageData: dataForTable(points, sort.sortOn) })] }));
|
|
156
161
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2020, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -92,7 +92,8 @@ function ProgramRow(props) {
|
|
|
92
92
|
const toolsHaveCnt = props.program.toolUse !== null &&
|
|
93
93
|
props.program.toolUse.tools.length > 0 &&
|
|
94
94
|
LazySeq.of(props.program.toolUse.tools).some((t) => t.cycleUsageCnt > 0);
|
|
95
|
-
return (_jsxs(_Fragment, { children: [_jsxs(ProgramTableRow, { children: [_jsx(TableCell, { children: props.program.toolUse === null ||
|
|
95
|
+
return (_jsxs(_Fragment, { children: [_jsxs(ProgramTableRow, { children: [_jsx(TableCell, { children: props.program.toolUse === null ||
|
|
96
|
+
props.program.toolUse.tools.length === 0 ? undefined : (_jsx(IconButton, { size: "small", onClick: () => setOpen(!open), children: open ? _jsx(KeyboardArrowUpIcon, {}) : _jsx(KeyboardArrowDownIcon, {}) })) }), _jsx(TableCell, { children: programFilename(props.program.programName) }), props.showCellCtrlCol ? (_jsx(TableCell, { children: props.program.cellControllerProgramName })) : undefined, _jsx(TableCell, { children: props.program.partName !== null ? (_jsxs(Box, { sx: {
|
|
96
97
|
display: "flex",
|
|
97
98
|
alignItems: "center",
|
|
98
99
|
}, children: [_jsx(PartIdenticon, { part: props.program.partName, size: 20 }), _jsx("span", { children: props.program.partName })] })) : undefined }), _jsx(TableCell, { children: props.program.comment ?? "" }), props.showRevCol ? (_jsx(TableCell, { children: props.program.revision === null ? "" : props.program.revision.toFixed() })) : undefined, _jsx(TableCell, { align: "right", children: props.program.statisticalCycleTime === null
|
|
@@ -101,11 +102,12 @@ function ProgramRow(props) {
|
|
|
101
102
|
? ""
|
|
102
103
|
: props.program.statisticalCycleTime.MAD_aboveMinutes.toFixed(2) }), _jsx(TableCell, { align: "right", children: props.program.statisticalCycleTime === null
|
|
103
104
|
? ""
|
|
104
|
-
: props.program.statisticalCycleTime.MAD_belowMinutes.toFixed(2) }), _jsx(TableCell, { align: "right", children: props.program.plannedMins === null ? "" : numFormat.format(props.program.plannedMins) }), _jsxs(TableCell, { children: [_jsx(Tooltip, { title: "Load Program Content", children: _jsx(IconButton, { size: "small", onClick: () => setProgramToShowContent(props.program), children: _jsx(CodeIcon, {}) }) }), props.program.revision !== null ? (_jsx(Tooltip, { title: "Revision History", children: _jsx(IconButton, { size: "small", onClick: () => setProgramToShowHistory(props.program), children: _jsx(HistoryIcon, {}) }) })) : undefined] })] }), _jsx(TableRow, { children: _jsx(TableCell, { sx: { pb: "0", pt: "0" }, colSpan: numCols, children: _jsx(Collapse, { in: open, timeout: "auto", unmountOnExit: true, children: _jsx(Box, { sx: { mr: "1em", ml: "3em" }, children: props.program.toolUse === null ||
|
|
105
|
+
: props.program.statisticalCycleTime.MAD_belowMinutes.toFixed(2) }), _jsx(TableCell, { align: "right", children: props.program.plannedMins === null ? "" : numFormat.format(props.program.plannedMins) }), _jsxs(TableCell, { children: [_jsx(Tooltip, { title: "Load Program Content", children: _jsx(IconButton, { size: "small", onClick: () => setProgramToShowContent(props.program), children: _jsx(CodeIcon, {}) }) }), props.program.revision !== null ? (_jsx(Tooltip, { title: "Revision History", children: _jsx(IconButton, { size: "small", onClick: () => setProgramToShowHistory(props.program), children: _jsx(HistoryIcon, {}) }) })) : undefined] })] }), _jsx(TableRow, { children: _jsx(TableCell, { sx: { pb: "0", pt: "0" }, colSpan: numCols, children: _jsx(Collapse, { in: open, timeout: "auto", unmountOnExit: true, children: _jsx(Box, { sx: { mr: "1em", ml: "3em" }, children: props.program.toolUse === null ||
|
|
106
|
+
props.program.toolUse.tools.length === 0 ? undefined : (_jsxs(Table, { size: "small", sx: {
|
|
105
107
|
width: "auto",
|
|
106
108
|
ml: "10em",
|
|
107
109
|
mr: "1em",
|
|
108
|
-
}, children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Tool" }), toolsHaveTime ? _jsx(TableCell, { align: "right", children: "Estimated Usage (min)" }) : undefined, toolsHaveCnt ? (_jsx(TableCell, { align: "right", children: "Estimated Usage (count)" })) : undefined] }) }), _jsx(TableBody, { children: LazySeq.of(props.program.toolUse.tools).map((t, idx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: t.toolName }), toolsHaveTime ? (_jsx(TableCell, { align: "right", children: t.cycleUsageMinutes === 0 ? "" : t.cycleUsageMinutes.toFixed(1) })) : undefined, toolsHaveCnt ? (_jsx(TableCell, { align: "right", children: t.cycleUsageCnt === 0 ? "" : t.cycleUsageCnt.toFixed(1) })) : undefined] }, idx))) })] })) }) }) }) })] }));
|
|
110
|
+
}, children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Tool" }), toolsHaveTime ? (_jsx(TableCell, { align: "right", children: "Estimated Usage (min)" })) : undefined, toolsHaveCnt ? (_jsx(TableCell, { align: "right", children: "Estimated Usage (count)" })) : undefined] }) }), _jsx(TableBody, { children: LazySeq.of(props.program.toolUse.tools).map((t, idx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: t.toolName }), toolsHaveTime ? (_jsx(TableCell, { align: "right", children: t.cycleUsageMinutes === 0 ? "" : t.cycleUsageMinutes.toFixed(1) })) : undefined, toolsHaveCnt ? (_jsx(TableCell, { align: "right", children: t.cycleUsageCnt === 0 ? "" : t.cycleUsageCnt.toFixed(1) })) : undefined] }, idx))) })] })) }) }) }) })] }));
|
|
109
111
|
}
|
|
110
112
|
export function ProgramSummaryTable() {
|
|
111
113
|
const report = useAtomValue(currentProgramReport);
|
|
@@ -317,7 +319,10 @@ export function ProgramHistoryDialog() {
|
|
|
317
319
|
if (page < lastLoadedPage.page) {
|
|
318
320
|
setPage(page + 1);
|
|
319
321
|
}
|
|
320
|
-
else if (lastLoadedPage.hasMore &&
|
|
322
|
+
else if (lastLoadedPage.hasMore &&
|
|
323
|
+
program !== null &&
|
|
324
|
+
revisions !== null &&
|
|
325
|
+
revisions.length > 0) {
|
|
321
326
|
setLoading(true);
|
|
322
327
|
setError(null);
|
|
323
328
|
const rev = revisions[revisions.length - 1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function RebookingsPage(): import("react
|
|
1
|
+
export declare function RebookingsPage(): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2024, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -200,7 +200,9 @@ const NewRebookingDialog = memo(function NewRebookingDialog() {
|
|
|
200
200
|
alignItems: "center",
|
|
201
201
|
}, children: [_jsx(PartIdenticon, { part: option, size: 25 }), option] }) })), filterOptions: (options, params) => {
|
|
202
202
|
const filtered = options.filter((o) => o.toLowerCase().includes(params.inputValue.toLowerCase()));
|
|
203
|
-
return filtered.length === 0 && params.inputValue !== ""
|
|
203
|
+
return filtered.length === 0 && params.inputValue !== ""
|
|
204
|
+
? [params.inputValue]
|
|
205
|
+
: filtered;
|
|
204
206
|
} }), _jsx(TextField, { label: "Quantity", type: "number", value: rebooking.qty && !isNaN(rebooking.qty) ? rebooking.qty : "", onChange: (e) => setRebooking((r) => ({ ...r, qty: parseInt(e.target.value) })) }), _jsx(TextField, { label: "Priority (optional)", type: "number", value: rebooking.priority && !isNaN(rebooking.priority) ? rebooking.priority : "", onChange: (e) => setRebooking((r) => ({ ...r, priority: parseInt(e.target.value) })) }), _jsx(TextField, { label: "Workorder (optional)", value: rebooking.workorder ?? "", onChange: (e) => setRebooking((r) => ({ ...r, workorder: e.target.value })) }), _jsx(TextField, { label: "Notes (optional)", multiline: true, minRows: 2, value: rebooking.notes ?? "", onChange: (e) => setRebooking((r) => ({ ...r, notes: e.target.value })) })] }) }), _jsxs(DialogActions, { children: [_jsxs(Button, { color: "secondary", onClick: create, disabled: !allowCreate || creating, children: [creating ? _jsx(CircularProgress, { size: 24 }) : undefined, "Create"] }), _jsx(Button, { onClick: close, children: "Cancel" })] })] }), _jsx(Tooltip, { title: "Add Rebooking", children: _jsx(Fab, { onClick: () => setOpen(true), sx: { position: "fixed", bottom: "24px", right: "24px" }, color: "primary", children: _jsx(Add, {}) }) })] }));
|
|
205
207
|
});
|
|
206
208
|
const FilterDialog = memo(function UnschFilterDialog() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2022, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -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 { useMemo, useCallback, useState, useRef, useEffect } from "react";
|
|
34
|
+
import { useMemo, useCallback, useState, useRef, useEffect, } from "react";
|
|
35
35
|
import { last30StationCycles } from "../../cell-status/station-cycles.js";
|
|
36
36
|
import { last30EstimatedCycleTimes } from "../../cell-status/estimated-cycle-times.js";
|
|
37
37
|
import { recentCycles } from "../../data/results.cycles.js";
|
|
@@ -205,7 +205,7 @@ function SimSeries({ sim, xScale, yScale, actualPlannedScale, hideTooltipRef, })
|
|
|
205
205
|
function RecentTooltip({ tooltip }) {
|
|
206
206
|
return (_jsx(Stack, { children: tooltip.data.kind === "actual" ? (_jsxs(_Fragment, { children: [tooltip.data.cycle.outlier ? (_jsxs("div", { children: ["Outlier Cycle for ", tooltip.data.cycle.station] })) : (_jsx("div", { children: tooltip.data.cycle.station })), _jsxs("div", { children: ["Start: ", tooltip.data.cycle.startTime.toLocaleString()] }), _jsxs("div", { children: ["End: ", tooltip.data.cycle.endOccupied.toLocaleString()] }), tooltip.data.cycle.endActive !== undefined ? (_jsxs("div", { children: ["Active Minutes:", " ", differenceInMinutes(tooltip.data.cycle.endActive, tooltip.data.cycle.startTime)] })) : undefined, _jsxs("div", { children: ["Occupied Minutes:", " ", differenceInMinutes(tooltip.data.cycle.endOccupied, tooltip.data.cycle.startTime)] }), tooltip.data.cycle.parts.map((p, idx) => (_jsxs("div", { children: ["Part: ", p.part, " ", p.oper] }, idx)))] })) : tooltip.data.kind === "sim" ? (_jsxs(_Fragment, { children: [_jsxs("div", { children: ["Simulation of ", tooltip.data.cycle.station] }), tooltip.data.cycle.parts.map((p, idx) => (_jsxs("div", { children: ["Part: ", p] }, idx))), _jsxs("div", { children: ["Predicted Start: ", tooltip.data.cycle.start.toLocaleString()] }), _jsxs("div", { children: ["Predicted End: ", tooltip.data.cycle.end.toLocaleString()] }), tooltip.data.cycle.plannedDown ? _jsx("div", { children: "Planned Downtime" }) : undefined] })) : (_jsxs(_Fragment, { children: [tooltip.data.cycle.isOutlier ? (_jsxs("div", { children: ["Current Outlier Cycle for ", tooltip.data.cycle.station] })) : (_jsxs("div", { children: ["Current ", tooltip.data.cycle.station] })), _jsxs("div", { children: ["Start: ", tooltip.data.cycle.start.toLocaleString()] }), _jsxs("div", { children: ["Expected End: ", tooltip.data.cycle.expectedEnd.toLocaleString()] }), tooltip.data.cycle.expectedEnd < tooltip.data.now ? (_jsxs("div", { children: ["Cycle Exceeding Expected By", " ", differenceInMinutes(tooltip.data.now, tooltip.data.cycle.expectedEnd), " Minutes"] })) : (_jsxs("div", { children: ["Expected Remaining Minutes:", " ", differenceInMinutes(tooltip.data.cycle.expectedEnd, tooltip.data.now)] })), _jsxs("div", { children: ["Occupied Minutes: ", differenceInMinutes(tooltip.data.now, tooltip.data.cycle.start)] }), tooltip.data.cycle.parts.map((p, idx) => (_jsxs("div", { children: ["Part: ", p.part, " ", p.oper] }, idx)))] })) }));
|
|
207
207
|
}
|
|
208
|
-
function NowLine({ now, xScale, yScale }) {
|
|
208
|
+
function NowLine({ now, xScale, yScale, }) {
|
|
209
209
|
const x = xScale(now);
|
|
210
210
|
const fontSize = 11;
|
|
211
211
|
return (_jsxs("g", { children: [_jsx("line", { x1: x, x2: x, y1: yScale.range()[0], y2: yScale.range()[1] + 8, stroke: "black" }), _jsx("text", { x: x, y: yScale.range()[1] + 8 + fontSize, textAnchor: "middle", fontSize: fontSize, children: "Now" })] }));
|
|
@@ -36,10 +36,10 @@ import { addDays, startOfToday } from "date-fns";
|
|
|
36
36
|
import { useMemo, memo, useState } from "react";
|
|
37
37
|
import { copyTableToClipboard, DataTableBody, DataTableHead, useColSort, } from "../analysis/DataTable.js";
|
|
38
38
|
import { ShiftStart, useShifts } from "./ShiftSettings.js";
|
|
39
|
-
import { SkipPrevious as SkipPrevIcon, SkipNext as SkipNextIcon, ImportExport } from "@mui/icons-material";
|
|
39
|
+
import { SkipPrevious as SkipPrevIcon, SkipNext as SkipNextIcon, ImportExport, } from "@mui/icons-material";
|
|
40
40
|
import { LazySeq, OrderedMap } from "@seedtactics/immutable-collections";
|
|
41
41
|
import { last30SimProduction } from "../../cell-status/sim-production.js";
|
|
42
|
-
import { isLaborCycle, last30StationCycles } from "../../cell-status/station-cycles.js";
|
|
42
|
+
import { isLaborCycle, last30StationCycles, } from "../../cell-status/station-cycles.js";
|
|
43
43
|
import { PartIdenticon } from "../station-monitor/Material.js";
|
|
44
44
|
import { useSetTitle } from "../routes.js";
|
|
45
45
|
import { useAtomValue } from "jotai";
|
|
@@ -91,7 +91,7 @@ function useRows(day) {
|
|
|
91
91
|
.mapValues((p) => ({
|
|
92
92
|
planned: p,
|
|
93
93
|
}))
|
|
94
|
-
.adjust(completedByDay, (plan, comp) =>
|
|
94
|
+
.adjust(completedByDay, (plan, comp) => plan ? { ...plan, completed: comp } : { completed: comp })
|
|
95
95
|
.toAscLazySeq()
|
|
96
96
|
.map(([partName, { planned: plannedCounts, completed: completedCounts }]) => ({
|
|
97
97
|
part: partName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2022, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -73,7 +73,7 @@ function JobsRow(props) {
|
|
|
73
73
|
if (props.showMaterial)
|
|
74
74
|
colCnt += 1;
|
|
75
75
|
const job = props.job;
|
|
76
|
-
return (_jsxs(_Fragment, { children: [_jsxs(JobTableRow, {
|
|
76
|
+
return (_jsxs(_Fragment, { children: [_jsxs(JobTableRow, { $darkRow: props.showDarkRow && job.darkRow, children: [_jsx(TableCell, { children: job.routeStartTime.toLocaleString() }), _jsx(TableCell, { children: _jsxs(Box, { sx: {
|
|
77
77
|
display: "flex",
|
|
78
78
|
alignItems: "center",
|
|
79
79
|
}, children: [_jsx(Box, { sx: { mr: "0.2em" }, children: _jsx(PartIdenticon, { part: job.partName, size: 25 }) }), _jsx("div", { children: _jsx(Typography, { variant: "body2", component: "span", sx: {
|
|
@@ -83,7 +83,7 @@ function JobsRow(props) {
|
|
|
83
83
|
alignItems: "center",
|
|
84
84
|
}, children: [_jsx(Box, { sx: { mr: "0.2em" }, children: _jsx(PartIdenticon, { part: job.casting, size: 25 }) }), _jsx(Typography, { variant: "body2", sx: {
|
|
85
85
|
display: "block",
|
|
86
|
-
}, children: job.casting })] })) : undefined })) : undefined, _jsxs(TableCell, { children: [job.comment, _jsx(Tooltip, { title: "Edit", children: _jsx(IconButton, { size: "small", onClick: () => props.setCurEditNoteJob(job), children: _jsx(EditIcon, {}) }) })] }), _jsx(TableCell, { children: job.inProcJob === null ? "Archived" : "Active" }), _jsx(TableCell, { align: "right", children: job.scheduledQty }), _jsx(TableCell, { align: "right", sx: { backgroundColor: job.decrementedQty > 0 ? "#FF8A65" : undefined }, children: job.decrementedQty }), _jsx(TableCell, { align: "right", children: job.completedQty }), _jsx(TableCell, { align: "right", children: job.inProcessQty }), _jsx(TableCell, { align: "right", children: job.remainingQty }), _jsx(TableCell, { children: _jsx(Tooltip, { title: "Show Details", children: _jsx(IconButton, { size: "small", onClick: () => setOpen(!open), children: open ? _jsx(KeyboardArrowUpIcon, {}) : _jsx(KeyboardArrowDownIcon, {}) }) }) })] }), _jsx(JobDetailRow, {
|
|
86
|
+
}, children: job.casting })] })) : undefined })) : undefined, _jsxs(TableCell, { children: [job.comment, _jsx(Tooltip, { title: "Edit", children: _jsx(IconButton, { size: "small", onClick: () => props.setCurEditNoteJob(job), children: _jsx(EditIcon, {}) }) })] }), _jsx(TableCell, { children: job.inProcJob === null ? "Archived" : "Active" }), _jsx(TableCell, { align: "right", children: job.scheduledQty }), _jsx(TableCell, { align: "right", sx: { backgroundColor: job.decrementedQty > 0 ? "#FF8A65" : undefined }, children: job.decrementedQty }), _jsx(TableCell, { align: "right", children: job.completedQty }), _jsx(TableCell, { align: "right", children: job.inProcessQty }), _jsx(TableCell, { align: "right", children: job.remainingQty }), _jsx(TableCell, { children: _jsx(Tooltip, { title: "Show Details", children: _jsx(IconButton, { size: "small", onClick: () => setOpen(!open), children: open ? _jsx(KeyboardArrowUpIcon, {}) : _jsx(KeyboardArrowDownIcon, {}) }) }) })] }), _jsx(JobDetailRow, { $darkRow: props.showDarkRow && job.darkRow, children: _jsx(TableCell, { sx: { pb: "0", pt: "0" }, colSpan: colCnt, children: _jsx(Collapse, { in: open, timeout: "auto", unmountOnExit: true, children: _jsx(JobDetails, { job: job.inProcJob ? job.inProcJob : job.historicJob, checkAnalysisMonth: false }) }) }) })] }));
|
|
87
87
|
}
|
|
88
88
|
var SortColumn;
|
|
89
89
|
(function (SortColumn) {
|
|
@@ -128,7 +128,9 @@ function sortJobs(jobs, sortBy, order, showArchived) {
|
|
|
128
128
|
sortCol = (j) => j.remainingQty;
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
131
|
-
const toShow = showArchived
|
|
131
|
+
const toShow = showArchived
|
|
132
|
+
? LazySeq.of(jobs)
|
|
133
|
+
: LazySeq.of(jobs).filter((j) => j.inProcJob !== null);
|
|
132
134
|
return toShow.toSortedArray(order === "asc" ? { asc: sortCol } : { desc: sortCol });
|
|
133
135
|
}
|
|
134
136
|
function SortColHeader(props) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* Copyright (c) 2023, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -52,7 +52,7 @@ import { useSetTitle } from "../routes.js";
|
|
|
52
52
|
import { atom, useAtom, useAtomValue, useSetAtom } from "jotai";
|
|
53
53
|
import { fmsInformation } from "../../network/server-settings.js";
|
|
54
54
|
function hasLoadCycleOperations(point) {
|
|
55
|
-
return "operations" in point && (point.operations === undefined || Array.isArray(point.operations));
|
|
55
|
+
return ("operations" in point && (point.operations === undefined || Array.isArray(point.operations)));
|
|
56
56
|
}
|
|
57
57
|
const lulShowGraphAtom = atom(true);
|
|
58
58
|
const machineShowGraphAtom = atom(true);
|
|
@@ -3,4 +3,4 @@ export type ShiftStartAndEnd = {
|
|
|
3
3
|
readonly end: Date;
|
|
4
4
|
};
|
|
5
5
|
export declare function useShifts(day: Date): ReadonlyArray<ShiftStartAndEnd>;
|
|
6
|
-
export declare function ShiftStart(): import("react
|
|
6
|
+
export declare function ShiftStart(): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function SimDayUsagePage(): import("react
|
|
1
|
+
export declare function SimDayUsagePage(): import("react").JSX.Element;
|