@seedtactics/insight-client 16.7.2 → 16.8.1
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-BGjv3-QV.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 +8 -2
- 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/ErrorsAndLoading.d.ts +3 -3
- package/dist/components/LoadingIcon.d.ts +1 -1
- package/dist/components/LoadingIcon.js +1 -1
- package/dist/components/LogEntry.d.ts +2 -2
- package/dist/components/LogEntry.js +10 -8
- package/dist/components/ManualSerialEntry.d.ts +2 -2
- package/dist/components/MonthSelect.d.ts +1 -1
- package/dist/components/MonthSelect.js +3 -1
- package/dist/components/Navigation.d.ts +2 -2
- package/dist/components/Navigation.js +1 -1
- 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 +1 -1
- 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 +2 -2
- package/dist/components/analysis/CycleChart.d.ts +1 -1
- package/dist/components/analysis/CycleChart.js +17 -4
- package/dist/components/analysis/DataTable.js +4 -2
- 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 +12 -3
- 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 +1 -1
- package/dist/components/analysis/StationDataTable.d.ts +1 -1
- package/dist/components/analysis/ToolReplacements.d.ts +1 -1
- package/dist/components/analysis/ToolReplacements.js +7 -3
- package/dist/components/operations/AllMaterial.d.ts +1 -1
- package/dist/components/operations/ChartRangeEdit.d.ts +1 -1
- package/dist/components/operations/ChartRangeEdit.js +13 -4
- package/dist/components/operations/CloseoutReport.js +1 -1
- package/dist/components/operations/CompletedParts.js +2 -2
- package/dist/components/operations/CurrentWorkorders.js +2 -2
- package/dist/components/operations/Dashboard.d.ts +2 -2
- 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/Programs.js +9 -4
- package/dist/components/operations/Rebookings.d.ts +1 -1
- package/dist/components/operations/Rebookings.js +3 -1
- package/dist/components/operations/RecentCycleChart.d.ts +1 -1
- package/dist/components/operations/RecentCycleChart.js +2 -2
- package/dist/components/operations/RecentProduction.js +3 -3
- package/dist/components/operations/RecentSchedules.js +3 -1
- package/dist/components/operations/RecentStationCycles.d.ts +1 -1
- package/dist/components/operations/RecentStationCycles.js +1 -1
- package/dist/components/operations/ShiftSettings.d.ts +1 -1
- package/dist/components/operations/SimDayUsage.d.ts +1 -1
- package/dist/components/operations/ToolReport.js +17 -6
- package/dist/components/operations/WorkorderGantt.d.ts +1 -1
- package/dist/components/quality/QualityMaterial.d.ts +2 -2
- package/dist/components/quality/QualityMaterial.js +1 -1
- package/dist/components/quality/QualityPaths.d.ts +1 -1
- package/dist/components/quality/RecentFailedInspections.d.ts +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 +11 -5
- package/dist/components/station-monitor/Closeout.js +6 -2
- package/dist/components/station-monitor/Inspection.js +3 -1
- package/dist/components/station-monitor/InvalidateCycle.d.ts +3 -3
- package/dist/components/station-monitor/InvalidateCycle.js +10 -3
- package/dist/components/station-monitor/JobDetails.js +4 -2
- package/dist/components/station-monitor/LoadStation.d.ts +1 -1
- package/dist/components/station-monitor/LoadStation.js +6 -3
- package/dist/components/station-monitor/Material.d.ts +10 -10
- package/dist/components/station-monitor/Material.js +28 -20
- 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 +9 -4
- package/dist/components/station-monitor/QuarantineButton.d.ts +1 -1
- package/dist/components/station-monitor/QuarantineButton.js +4 -2
- package/dist/components/station-monitor/Queues.d.ts +2 -2
- package/dist/components/station-monitor/Queues.js +6 -4
- package/dist/components/station-monitor/QueuesAddMaterial.d.ts +3 -3
- package/dist/components/station-monitor/QueuesAddMaterial.js +20 -7
- package/dist/components/station-monitor/SelectInspType.d.ts +2 -2
- package/dist/components/station-monitor/SelectWorkorder.d.ts +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 +36 -16
- package/dist/components/station-monitor/Whiteboard.d.ts +1 -1
- package/dist/data/all-material-bins.js +2 -1
- package/dist/data/cost-per-piece.js +3 -1
- package/dist/data/move-arrows.js +3 -1
- package/dist/data/part-summary.js +1 -1
- package/dist/data/results.cycles.js +13 -4
- package/dist/data/tools-programs.js +3 -2
- package/dist/index.html +1 -1
- package/dist/network/api.d.ts +18 -0
- package/dist/network/api.js +502 -371
- 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 +25 -24
- package/dist/assets/index-BwbaiELK.js +0 -364
|
@@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
34
34
|
import { memo, useState, useMemo, useRef, useCallback } from "react";
|
|
35
35
|
import { addDays, startOfToday, addMonths } from "date-fns";
|
|
36
36
|
import { curveCatmullRom, line } from "d3-shape";
|
|
37
|
-
import { buildBufferChart } from "../../data/results.bufferchart.js";
|
|
37
|
+
import { buildBufferChart, } from "../../data/results.bufferchart.js";
|
|
38
38
|
import { seriesColor } from "../../util/chart-colors.js";
|
|
39
39
|
import { rawMaterialQueues } from "../../cell-status/names.js";
|
|
40
40
|
import { selectedAnalysisPeriod } from "../../network/load-specific-month.js";
|
|
@@ -114,15 +114,34 @@ const BufferChart = memo(function BufferChart(props) {
|
|
|
114
114
|
const [disabledBuffers, setDisabledBuffers] = useState(HashSet.empty());
|
|
115
115
|
const defaultDateRangeStart = defaultDateRange[0];
|
|
116
116
|
const defaultDateRangeEnd = defaultDateRange[1];
|
|
117
|
-
const series = useMemo(() => buildBufferChart(defaultDateRangeStart, defaultDateRangeEnd, props.movingAverageDistanceInHours, rawMatQueues, entries.valuesToLazySeq()), [
|
|
117
|
+
const series = useMemo(() => buildBufferChart(defaultDateRangeStart, defaultDateRangeEnd, props.movingAverageDistanceInHours, rawMatQueues, entries.valuesToLazySeq()), [
|
|
118
|
+
defaultDateRangeStart,
|
|
119
|
+
defaultDateRangeEnd,
|
|
120
|
+
entries,
|
|
121
|
+
props.movingAverageDistanceInHours,
|
|
122
|
+
rawMatQueues,
|
|
123
|
+
]);
|
|
118
124
|
const { width, height, ref: chartRef, } = useResizeDetector({
|
|
119
125
|
refreshMode: "debounce",
|
|
120
126
|
refreshRate: 100,
|
|
121
127
|
});
|
|
122
128
|
return (_jsxs("div", { children: [_jsx(Box, { ref: chartRef, sx: {
|
|
123
|
-
height: {
|
|
129
|
+
height: {
|
|
130
|
+
xs: "calc(100vh - 350px)",
|
|
131
|
+
md: "calc(100vh - 285px)",
|
|
132
|
+
xl: "calc(100vh - 220px)",
|
|
133
|
+
},
|
|
124
134
|
overflow: "hidden",
|
|
125
|
-
}, children: width && height && width > 0 && height > 0 && (_jsx(BufferChartSVG, { width: width, height: height, series: series, disabled: disabledBuffers })) }), _jsx("div", { style: {
|
|
135
|
+
}, children: width && height && width > 0 && height > 0 && (_jsx(BufferChartSVG, { width: width, height: height, series: series, disabled: disabledBuffers })) }), _jsx("div", { style: {
|
|
136
|
+
marginTop: "1em",
|
|
137
|
+
display: "flex",
|
|
138
|
+
flexWrap: "wrap",
|
|
139
|
+
justifyContent: "space-around",
|
|
140
|
+
}, children: series.map((s, idx) => (_jsx(ToggleButton, { selected: !disabledBuffers.has(s.label), value: s.label, onChange: () => setDisabledBuffers((db) => (db.has(s.label) ? db.delete(s.label) : db.add(s.label))), children: _jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [_jsx("div", { style: {
|
|
141
|
+
width: "14px",
|
|
142
|
+
height: "14px",
|
|
143
|
+
backgroundColor: seriesColor(idx, series.length),
|
|
144
|
+
} }), _jsx("div", { style: { marginLeft: "1em" }, children: s.label })] }) }, s.label))) })] }));
|
|
126
145
|
});
|
|
127
146
|
// https://github.com/mui-org/material-ui/issues/20191
|
|
128
147
|
// oxlint-disable-next-line typescript/no-explicit-any
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function CostBreakdownPage(): import("react
|
|
2
|
-
export declare const CostPerPiecePage: import("react").MemoExoticComponent<() => import("react
|
|
1
|
+
export declare function CostBreakdownPage(): import("react").JSX.Element;
|
|
2
|
+
export declare const CostPerPiecePage: import("react").MemoExoticComponent<() => import("react").JSX.Element>;
|
|
@@ -48,8 +48,8 @@ import { Tooltip } from "@mui/material";
|
|
|
48
48
|
import { IconButton } from "@mui/material";
|
|
49
49
|
import { PartIdenticon } from "../station-monitor/Material.js";
|
|
50
50
|
import { Typography } from "@mui/material";
|
|
51
|
-
import { last30MaterialSummary, specificMonthMaterialSummary } from "../../cell-status/material-summary.js";
|
|
52
|
-
import { last30StationCycles, specificMonthStationCycles } from "../../cell-status/station-cycles.js";
|
|
51
|
+
import { last30MaterialSummary, specificMonthMaterialSummary, } from "../../cell-status/material-summary.js";
|
|
52
|
+
import { last30StationCycles, specificMonthStationCycles, } from "../../cell-status/station-cycles.js";
|
|
53
53
|
import { useSetTitle } from "../routes.js";
|
|
54
54
|
import { atom, useAtom, useAtomValue } from "jotai";
|
|
55
55
|
import { atomWithStorage } from "jotai/utils";
|
|
@@ -39,4 +39,4 @@ export interface YZoomRange {
|
|
|
39
39
|
readonly y_low: number;
|
|
40
40
|
readonly y_high: number;
|
|
41
41
|
}
|
|
42
|
-
export declare const CycleChart: import("react").MemoExoticComponent<(props: CycleChartProps) => import("react
|
|
42
|
+
export declare const CycleChart: import("react").MemoExoticComponent<(props: CycleChartProps) => import("react").JSX.Element>;
|
|
@@ -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, memo, useState, useCallback } from "react";
|
|
34
|
+
import { useMemo, memo, useState, useCallback, } from "react";
|
|
35
35
|
import { Dialog, DialogContent, DialogActions, TextField, IconButton, Button, styled, ToggleButton, Stack, } from "@mui/material";
|
|
36
36
|
import { ZoomIn } from "@mui/icons-material";
|
|
37
37
|
import { seriesColor } from "../../util/chart-colors.js";
|
|
@@ -172,7 +172,12 @@ const AllPointsSeries = memo(function AllPointsSeries({ series, xScale, yScale,
|
|
|
172
172
|
.map((s) => (_jsx(SingleSeries, { points: s.points, seriesName: s.name, color: s.color, xScale: xScale, yScale: yScale, showTooltip: showTooltip }, s.name))) }));
|
|
173
173
|
});
|
|
174
174
|
const Legend = memo(function Legend({ series, disabledSeries, adjustDisabled, }) {
|
|
175
|
-
return (_jsx("div", { style: {
|
|
175
|
+
return (_jsx("div", { style: {
|
|
176
|
+
marginTop: "1em",
|
|
177
|
+
display: "flex",
|
|
178
|
+
flexWrap: "wrap",
|
|
179
|
+
justifyContent: "space-around",
|
|
180
|
+
}, children: series.map((s) => (_jsx(ToggleButton, { selected: !disabledSeries.has(s.name), value: s, onChange: () => adjustDisabled((b) => (b.has(s.name) ? b.delete(s.name) : b.add(s.name))), children: _jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [_jsx("div", { style: { width: "14px", height: "14px", backgroundColor: s.color } }), _jsx("div", { style: { marginLeft: "1em" }, children: s.name })] }) }, s.name))) }));
|
|
176
181
|
});
|
|
177
182
|
const NoPointerEvents = styled("g", { shouldForwardProp: (prop) => prop.toString()[0] !== "$" })(({ $noPtrEvents }) => $noPtrEvents
|
|
178
183
|
? {
|
|
@@ -210,7 +215,9 @@ const ChartMouseEvents = memo(function ChartMouseEvents({ setYZoom, setXZoom, se
|
|
|
210
215
|
const y2 = yScale.invert(p.y - marginTop);
|
|
211
216
|
setYZoom(y1 < y2 ? { y_low: y1, y_high: y2 } : { y_low: y2, y_high: y1 });
|
|
212
217
|
setXZoom?.({
|
|
213
|
-
zoom: time1.getTime() < time2.getTime()
|
|
218
|
+
zoom: time1.getTime() < time2.getTime()
|
|
219
|
+
? { start: time1, end: time2 }
|
|
220
|
+
: { start: time2, end: time1 },
|
|
214
221
|
});
|
|
215
222
|
}
|
|
216
223
|
}
|
|
@@ -277,5 +284,11 @@ export const CycleChart = memo(function CycleChart(props) {
|
|
|
277
284
|
setTooltip(null);
|
|
278
285
|
setHighlightStart(null);
|
|
279
286
|
}, [setTooltip, setHighlightStart]);
|
|
280
|
-
return (_jsxs("div", { onPointerLeave: pointerLeave, children: [_jsx(ChartWithTooltip, { sx: {
|
|
287
|
+
return (_jsxs("div", { onPointerLeave: pointerLeave, children: [_jsx(ChartWithTooltip, { sx: {
|
|
288
|
+
height: {
|
|
289
|
+
xs: "calc(100vh - 320px)",
|
|
290
|
+
md: "calc(100vh - 280px)",
|
|
291
|
+
xl: "calc(100vh - 220px)",
|
|
292
|
+
},
|
|
293
|
+
}, tooltipAtom: tooltipAtom, TooltipContent: ({ tooltip }) => (_jsx(CycleChartTooltip, { tooltip: tooltip, seriesLabel: props.series_label, extraTooltip: props.extra_tooltip })), chart: ({ width, height }) => (_jsx(CycleChartSvg, { ...props, containerHeight: height, containerWidth: width, series: series, median: median, yZoom: props.yZoom, setYZoom: props.setYZoom, highlightStart: highlightStart, setHighlightStart: setHighlightStart, showTooltip: setTooltip, disabledSeries: disabledSeries })) }), _jsxs("div", { style: { display: "flex", flexWrap: "wrap" }, children: [_jsx("div", { style: { color: "#6b6b76" }, children: "Click on a point for details" }), _jsx("div", { style: { flexGrow: 1 } }), _jsx(ChartZoomButtons, { set_date_zoom_range: props.set_date_zoom_range, current_date_zoom: props.current_date_zoom, yZoom: props.yZoom, setYZoom: props.setYZoom, median: median })] }), _jsx(Legend, { series: series, disabledSeries: disabledSeries, adjustDisabled: setDisabled })] }));
|
|
281
294
|
});
|
|
@@ -86,7 +86,9 @@ function SelectDateRange(props) {
|
|
|
86
86
|
const start = props.zoom.current_date_zoom
|
|
87
87
|
? props.zoom.current_date_zoom.start
|
|
88
88
|
: props.zoom.default_date_range[0];
|
|
89
|
-
const end = addDays(props.zoom.current_date_zoom
|
|
89
|
+
const end = addDays(props.zoom.current_date_zoom
|
|
90
|
+
? props.zoom.current_date_zoom.end
|
|
91
|
+
: props.zoom.default_date_range[1], -1);
|
|
90
92
|
function onChange(d) {
|
|
91
93
|
props.zoom.set_date_zoom_range({
|
|
92
94
|
start: d[0],
|
|
@@ -99,7 +101,7 @@ function SelectDateRange(props) {
|
|
|
99
101
|
onChange([value[0], value[1]]);
|
|
100
102
|
}
|
|
101
103
|
};
|
|
102
|
-
return (_jsxs(_Fragment, { children: [_jsxs("span", { children: [dateFormat.format(props.zoom.current_date_zoom?.start ?? props.zoom.default_date_range[0]), "
|
|
104
|
+
return (_jsxs(_Fragment, { children: [_jsxs("span", { children: [dateFormat.format(props.zoom.current_date_zoom?.start ?? props.zoom.default_date_range[0]), " ", "- ", dateFormat.format(props.zoom.current_date_zoom?.end ?? props.zoom.default_date_range[1])] }), _jsx(Tooltip, { title: "Zoom To Date Range", children: _jsx(IconButton, { onClick: () => setOpen(true), size: "large", children: _jsx(ZoomInIcon, {}) }) }), _jsx(Tooltip, { title: "Reset Date Range", children: _jsx(IconButton, { onClick: () => props.zoom.set_date_zoom_range(undefined), size: "large", children: _jsx(ZoomOutIcon, {}) }) }), _jsxs(Dialog, { open: open, onClose: () => setOpen(false), children: [_jsxs(DialogTitle, { children: ["Select Date Range ", monthFormat.format(props.zoom.default_date_range[0])] }), _jsx(DialogContent, { children: _jsx(StyledCalendar, { minDate: props.zoom.default_date_range[0], maxDate: props.zoom.default_date_range[1], calendarType: "gregory", selectRange: true, showNavigation: false, showNeighboringMonth: false, value: [start, end], onChange: matchingOnChange }) }), _jsx(DialogActions, { children: _jsx(Button, { onClick: () => setOpen(false), children: "Close" }) })] })] }));
|
|
103
105
|
}
|
|
104
106
|
export const DataTableActions = memo(function DataTableActions({ zoom, tpage, count, }) {
|
|
105
107
|
let zoomCtrl;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function StationOeeHeatmap(): import("react
|
|
2
|
-
export declare function CompletedCountHeatmap(): import("react
|
|
1
|
+
export declare function StationOeeHeatmap(): import("react").JSX.Element;
|
|
2
|
+
export declare function CompletedCountHeatmap(): import("react").JSX.Element;
|
|
@@ -37,7 +37,7 @@ import { selectedAnalysisPeriod } from "../../network/load-specific-month.js";
|
|
|
37
37
|
import { SelectableHeatChart } from "./HeatChart.js";
|
|
38
38
|
import { binSimStationUseByDayAndStat, copyOeeHeatmapToClipboard, binActiveCyclesByDayAndStat, binOccupiedCyclesByDayAndStat, binDowntimeToDayAndStat, } from "../../data/results.oee.js";
|
|
39
39
|
import { binCyclesByDayAndPart, binSimProductionByDayAndPart, copyCompletedPartsHeatmapToClipboard, } from "../../data/results.completed-parts.js";
|
|
40
|
-
import { last30SimStationUse, specificMonthSimStationUse } from "../../cell-status/sim-station-use.js";
|
|
40
|
+
import { last30SimStationUse, specificMonthSimStationUse, } from "../../cell-status/sim-station-use.js";
|
|
41
41
|
import { last30SimProduction, specificMonthSimProduction, } from "../../cell-status/sim-production.js";
|
|
42
42
|
import { last30MaterialSummary, specificMonthMaterialSummary, } from "../../cell-status/material-summary.js";
|
|
43
43
|
import { last30StationCycles, specificMonthStationCycles, } from "../../cell-status/station-cycles.js";
|
|
@@ -19,4 +19,4 @@ export interface SelectableHeatCardProps<T extends string> {
|
|
|
19
19
|
readonly options: ReadonlyArray<T>;
|
|
20
20
|
}
|
|
21
21
|
export type SelectableHeatChartProps<T extends string> = HeatChartProps & SelectableHeatCardProps<T>;
|
|
22
|
-
export declare function SelectableHeatChart<T extends string>(props: SelectableHeatChartProps<T>): import("react
|
|
22
|
+
export declare function SelectableHeatChart<T extends string>(props: SelectableHeatChartProps<T>): import("react").JSX.Element;
|
|
@@ -33,7 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
33
33
|
*/
|
|
34
34
|
import { useMemo, memo, useRef, useCallback } from "react";
|
|
35
35
|
import { addDays } from "date-fns";
|
|
36
|
-
import { Select, MenuItem, Tooltip, IconButton, Stack, Box, Typography, FormControl } from "@mui/material";
|
|
36
|
+
import { Select, MenuItem, Tooltip, IconButton, Stack, Box, Typography, FormControl, } from "@mui/material";
|
|
37
37
|
import { ImportExport } from "@mui/icons-material";
|
|
38
38
|
import { scaleBand, scaleLinear } from "d3-scale";
|
|
39
39
|
import { LazySeq } from "@seedtactics/immutable-collections";
|
|
@@ -51,7 +51,9 @@ const marginRight = 2;
|
|
|
51
51
|
const color1 = "#E8F5E9";
|
|
52
52
|
const color2 = "#1B5E20";
|
|
53
53
|
function useScales({ yType, dateRange, containerWidth, points, }) {
|
|
54
|
-
const width = containerWidth === null || containerWidth === undefined || containerWidth === 0
|
|
54
|
+
const width = containerWidth === null || containerWidth === undefined || containerWidth === 0
|
|
55
|
+
? 400
|
|
56
|
+
: containerWidth;
|
|
55
57
|
const maxStatLen = useMemo(() => LazySeq.of(points)
|
|
56
58
|
.map((p) => p.y)
|
|
57
59
|
.distinct()
|
|
@@ -98,7 +100,14 @@ function useScales({ yType, dateRange, containerWidth, points, }) {
|
|
|
98
100
|
}
|
|
99
101
|
return { yScale: nextBandScale, height: nextChartHeight, colorScale: nextFillScale };
|
|
100
102
|
}, [points, yType]);
|
|
101
|
-
return {
|
|
103
|
+
return {
|
|
104
|
+
height: chartHeight,
|
|
105
|
+
width,
|
|
106
|
+
xScale,
|
|
107
|
+
yScale: bandScale,
|
|
108
|
+
colorScale: fillScale,
|
|
109
|
+
marginLeft,
|
|
110
|
+
};
|
|
102
111
|
}
|
|
103
112
|
const HeatAxis = memo(function HeatAxis({ xScale, yScale }) {
|
|
104
113
|
return (_jsxs(_Fragment, { children: [_jsx(AxisBottom, { scale: xScale, top: yScale.range()[1], tickFormat: (d) => d.toLocaleDateString(undefined, { month: "short", day: "numeric" }) }), _jsx(AxisLeft, { scale: yScale, left: xScale.range()[0] })] }));
|
|
@@ -6,5 +6,5 @@ export interface InspectionDataTableProps {
|
|
|
6
6
|
readonly extendDateRange?: (numDays: number) => void;
|
|
7
7
|
readonly hideOpenDetailColumn?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: import("react").MemoExoticComponent<(props: InspectionDataTableProps) => import("react
|
|
9
|
+
declare const _default: import("react").MemoExoticComponent<(props: InspectionDataTableProps) => import("react").JSX.Element>;
|
|
10
10
|
export default _default;
|
|
@@ -143,6 +143,11 @@ export default memo(function InspDataTable(props) {
|
|
|
143
143
|
serial: row.serial,
|
|
144
144
|
workorderId: row.workorder,
|
|
145
145
|
},
|
|
146
|
-
}) })] }), _jsx(DataTableActions, { tpage: {
|
|
146
|
+
}) })] }), _jsx(DataTableActions, { tpage: {
|
|
147
|
+
page,
|
|
148
|
+
rowsPerPage,
|
|
149
|
+
setPage: (p) => setPages(pages.set(path, p)),
|
|
150
|
+
setRowsPerPage,
|
|
151
|
+
}, count: points.material.length, zoom: tzoom.zoom })] }) })] }, path));
|
|
147
152
|
}) }));
|
|
148
153
|
});
|
|
@@ -9,4 +9,4 @@ export interface InspectionSankeyProps {
|
|
|
9
9
|
readonly extendDateRange?: (numDays: number) => void;
|
|
10
10
|
readonly hideOpenDetailColumn?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare function InspectionSankey(props: InspectionSankeyProps): import("react
|
|
12
|
+
export declare function InspectionSankey(props: InspectionSankeyProps): import("react").JSX.Element;
|
|
@@ -68,7 +68,10 @@ function LinkDisplay({ link, path, strokeWidth, setTooltip, }) {
|
|
|
68
68
|
return (_jsx("path", { d: path, stroke: over ? green[600] : green[300], strokeWidth: strokeWidth, opacity: 0.2, fill: "none", onMouseMove: pointerOver, onMouseLeave: pointerOut }));
|
|
69
69
|
}
|
|
70
70
|
function NodeDisplay({ node }) {
|
|
71
|
-
if (node.x1 === undefined ||
|
|
71
|
+
if (node.x1 === undefined ||
|
|
72
|
+
node.x0 === undefined ||
|
|
73
|
+
node.y1 === undefined ||
|
|
74
|
+
node.y0 === undefined)
|
|
72
75
|
return null;
|
|
73
76
|
return (_jsxs("g", { transform: `translate(${node.x0}, ${node.y0})`, children: [_jsx("rect", { width: node.x1 - node.x0, height: node.y1 - node.y0, fill: green[800], opacity: 0.8, stroke: "none" }), _jsx("text", { x: 18, y: (node.y1 - node.y0) / 2, children: node.name })] }));
|
|
74
77
|
}
|
|
@@ -89,7 +92,9 @@ const SankeyDisplay = memo(function InspectionSankeyDiagram({ data, setTooltip,
|
|
|
89
92
|
const layout = generator({ nodes: sankeyData.nodes, links: sankeyData.links });
|
|
90
93
|
return {
|
|
91
94
|
nodes: layout.nodes,
|
|
92
|
-
links: layout.links.flatMap((link) => typeof link.source === "object" &&
|
|
95
|
+
links: layout.links.flatMap((link) => typeof link.source === "object" &&
|
|
96
|
+
typeof link.target === "object" &&
|
|
97
|
+
link.width !== undefined
|
|
93
98
|
? [{ ...link, source: link.source, target: link.target, width: link.width }]
|
|
94
99
|
: []),
|
|
95
100
|
};
|
|
@@ -106,11 +111,15 @@ const InspectionDiagram = memo(function InspectionDiagram({ data, }) {
|
|
|
106
111
|
const tooltipAtom = useMemo(() => atom(null), []);
|
|
107
112
|
const setTooltip = useSetAtom(tooltipAtom);
|
|
108
113
|
return (_jsx("div", { style: { position: "relative" }, children: _jsx(ChartWithTooltip, { sx: {
|
|
109
|
-
height: {
|
|
114
|
+
height: {
|
|
115
|
+
xs: "calc(100vh - 230px)",
|
|
116
|
+
md: "calc(100vh - 182px)",
|
|
117
|
+
xl: "calc(100vh - 130px)",
|
|
118
|
+
},
|
|
110
119
|
width: "100%",
|
|
111
120
|
}, chart: ({ height, width }) => (_jsx(SankeyDisplay, { data: data, setTooltip: setTooltip, parentHeight: height, parentWidth: width })), tooltipAtom: tooltipAtom, TooltipContent: LinkTooltip }) }));
|
|
112
121
|
});
|
|
113
|
-
const selectedPartAtom = atomWithDefault((get) =>
|
|
122
|
+
const selectedPartAtom = atomWithDefault((get) => get(isDemoAtom) ? "aaa" : undefined);
|
|
114
123
|
const selectedInspTypeAtom = atomWithDefault((get) => get(isDemoAtom) ? "CMM" : undefined);
|
|
115
124
|
const showTableAtom = atom(false);
|
|
116
125
|
export function InspectionSankey(props) {
|
|
@@ -121,8 +130,9 @@ export function InspectionSankey(props) {
|
|
|
121
130
|
const selectedPart = props.restrictToPart || curPart;
|
|
122
131
|
if (selectedPart && selectedInspectType) {
|
|
123
132
|
curData =
|
|
124
|
-
props.inspectionlogs
|
|
125
|
-
|
|
133
|
+
props.inspectionlogs
|
|
134
|
+
.get(new PartAndInspType(selectedPart, selectedInspectType))
|
|
135
|
+
?.valuesToLazySeq() ?? [];
|
|
126
136
|
}
|
|
127
137
|
const parts = props.inspectionlogs
|
|
128
138
|
.keysToLazySeq()
|
|
@@ -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;
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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() });
|
|
@@ -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";
|
|
@@ -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 });
|
|
@@ -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;
|