@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
|
@@ -77,7 +77,10 @@ export const addWorkorderComment = atom(null, (get, set, { workorder, comment })
|
|
|
77
77
|
workorders: st.workorders.map((w) => w.workorderId === workorder
|
|
78
78
|
? new ActiveWorkorder({
|
|
79
79
|
...w,
|
|
80
|
-
comments: [
|
|
80
|
+
comments: [
|
|
81
|
+
...(w.comments ?? []),
|
|
82
|
+
new WorkorderComment({ comment, timeUTC: new Date() }),
|
|
83
|
+
],
|
|
81
84
|
})
|
|
82
85
|
: w),
|
|
83
86
|
};
|
|
@@ -42,7 +42,8 @@ export class PartAndStationOperation {
|
|
|
42
42
|
this.operation = operation;
|
|
43
43
|
}
|
|
44
44
|
static ofLogCycle(c) {
|
|
45
|
-
return new PartAndStationOperation(c.material[0].part, c.loc, (c.type === LogType.LoadUnloadCycle || c.type === LogType.BasketLoadUnload) &&
|
|
45
|
+
return new PartAndStationOperation(c.material[0].part, c.loc, (c.type === LogType.LoadUnloadCycle || c.type === LogType.BasketLoadUnload) &&
|
|
46
|
+
c.material.length > 0
|
|
46
47
|
? c.result + "-" + c.material[0].proc.toString()
|
|
47
48
|
: c.program);
|
|
48
49
|
}
|
|
@@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
32
32
|
*/
|
|
33
33
|
import { hashValues } from "@seedtactics/immutable-collections";
|
|
34
34
|
import { addDays } from "date-fns";
|
|
35
|
-
import { LogType, MaterialProcessActualPath } from "../network/api.js";
|
|
35
|
+
import { LogType, MaterialProcessActualPath, } from "../network/api.js";
|
|
36
36
|
import { LazySeq, HashMap } from "@seedtactics/immutable-collections";
|
|
37
37
|
import { atom } from "jotai";
|
|
38
38
|
export var InspectionLogResultType;
|
|
@@ -93,7 +93,7 @@ export const onLoadLast30Log = atom(null, (_, set, log) => {
|
|
|
93
93
|
set(statCycles.setLast30StationCycles, log);
|
|
94
94
|
set(rebookings.setLast30Rebookings, log);
|
|
95
95
|
const newCntr = LazySeq.of(log).maxBy((x) => x.counter)?.counter ?? null;
|
|
96
|
-
set(lastEventCounterRW, (oldCntr) =>
|
|
96
|
+
set(lastEventCounterRW, (oldCntr) => oldCntr === null ? newCntr : Math.max(oldCntr, newCntr ?? -1));
|
|
97
97
|
});
|
|
98
98
|
export const onLoadCurrentSt = atom(null, (_, set, curSt) => {
|
|
99
99
|
set(currentSt.setCurrentStatus, curSt);
|
|
@@ -30,7 +30,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
30
30
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31
31
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
32
|
*/
|
|
33
|
-
import { LogType } from "../network/api.js";
|
|
33
|
+
import { LogType, } from "../network/api.js";
|
|
34
34
|
import { addDays } from "date-fns";
|
|
35
35
|
import { HashMap, LazySeq, HashSet } from "@seedtactics/immutable-collections";
|
|
36
36
|
import { atom } from "jotai";
|
|
@@ -228,7 +228,9 @@ function process_swap(swap, st) {
|
|
|
228
228
|
else {
|
|
229
229
|
newMat = newMatFromState;
|
|
230
230
|
}
|
|
231
|
-
if (oldMat.jobUnique &&
|
|
231
|
+
if (oldMat.jobUnique &&
|
|
232
|
+
oldMat.jobUnique !== "" &&
|
|
233
|
+
(!newMat.jobUnique || newMat.jobUnique === "")) {
|
|
232
234
|
// Swap newMat from raw material
|
|
233
235
|
const forJob = jobs.get(oldMat.jobUnique);
|
|
234
236
|
if (forJob !== undefined) {
|
|
@@ -31,7 +31,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
31
31
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
32
|
*/
|
|
33
33
|
import { atom } from "jotai";
|
|
34
|
-
import { LogType, QueueRole } from "../network/api.js";
|
|
34
|
+
import { LogType, QueueRole, } from "../network/api.js";
|
|
35
35
|
import { LazySeq } from "@seedtactics/immutable-collections";
|
|
36
36
|
const rawMaterialQueuesRW = atom(new Set());
|
|
37
37
|
export const rawMaterialQueues = rawMaterialQueuesRW;
|
|
@@ -128,7 +128,9 @@ export function useNewRebooking() {
|
|
|
128
128
|
const [loading, setLoading] = useState(false);
|
|
129
129
|
const callback = useCallback((n) => {
|
|
130
130
|
setLoading(true);
|
|
131
|
-
return LogBackend.requestRebooking(n.part, n.qty && !isNaN(n.qty) ? n.qty : 1, n.workorder, n.priority !== undefined && n.priority !== null && !isNaN(n.priority)
|
|
131
|
+
return LogBackend.requestRebooking(n.part, n.qty && !isNaN(n.qty) ? n.qty : 1, n.workorder, n.priority !== undefined && n.priority !== null && !isNaN(n.priority)
|
|
132
|
+
? n.priority
|
|
133
|
+
: undefined, n.notes)
|
|
132
134
|
.then(() => { })
|
|
133
135
|
.catch(console.log)
|
|
134
136
|
.finally(() => setLoading(false));
|
|
@@ -31,7 +31,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
31
31
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
32
|
*/
|
|
33
33
|
import { addDays } from "date-fns";
|
|
34
|
-
import { HistoricJob } from "../network/api.js";
|
|
34
|
+
import { HistoricJob, } from "../network/api.js";
|
|
35
35
|
import { HashMap, HashSet, LazySeq } from "@seedtactics/immutable-collections";
|
|
36
36
|
import { atom } from "jotai";
|
|
37
37
|
import { atomFamily } from "jotai-family";
|
|
@@ -67,7 +67,10 @@ function* jobToPartCompleted(jobs) {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
export const setLast30JobProduction = atom(null, (_, set, history) => {
|
|
70
|
-
set(last30SimProductionRW, (oldProd) => [
|
|
70
|
+
set(last30SimProductionRW, (oldProd) => [
|
|
71
|
+
...oldProd,
|
|
72
|
+
...jobToPartCompleted(Object.values(history.jobs)),
|
|
73
|
+
]);
|
|
71
74
|
});
|
|
72
75
|
export const updateLast30JobProduction = atom(null, (_, set, { evt, now, expire }) => {
|
|
73
76
|
if (evt.newJobs) {
|
|
@@ -77,7 +80,8 @@ export const updateLast30JobProduction = atom(null, (_, set, { evt, now, expire
|
|
|
77
80
|
const expireDate = addDays(now, -30);
|
|
78
81
|
// check if nothing to expire and no new data
|
|
79
82
|
const minProd = LazySeq.of(simProd).minBy((e) => e.completeTime.getTime());
|
|
80
|
-
if ((minProd === undefined || minProd.completeTime >= expireDate) &&
|
|
83
|
+
if ((minProd === undefined || minProd.completeTime >= expireDate) &&
|
|
84
|
+
apiNewJobs.length === 0) {
|
|
81
85
|
return simProd;
|
|
82
86
|
}
|
|
83
87
|
simProd = simProd.filter((e) => e.completeTime >= expireDate);
|
|
@@ -169,7 +169,9 @@ export const setLast30StationCycles = atom(null, (get, set, log) => {
|
|
|
169
169
|
export const updateLast30StationCycles = atom(null, (get, set, { evt, now, expire }) => {
|
|
170
170
|
if (evt.logEntry && evt.logEntry.type === LogType.InvalidateCycle) {
|
|
171
171
|
const cntrs = evt.logEntry.details?.["EditedCounters"];
|
|
172
|
-
const invalidatedCycles = cntrs
|
|
172
|
+
const invalidatedCycles = cntrs
|
|
173
|
+
? new Set(cntrs.split(",").map((i) => parseInt(i)))
|
|
174
|
+
: new Set();
|
|
173
175
|
if (invalidatedCycles.size > 0) {
|
|
174
176
|
set(last30StationCyclesRW, (cycles) => {
|
|
175
177
|
for (const invalid of invalidatedCycles) {
|
|
@@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
32
32
|
*/
|
|
33
33
|
import { addDays } from "date-fns";
|
|
34
34
|
import { LogType } from "../network/api.js";
|
|
35
|
-
import { LazySeq, HashMap, OrderedMap, hashValues } from "@seedtactics/immutable-collections";
|
|
35
|
+
import { LazySeq, HashMap, OrderedMap, hashValues, } from "@seedtactics/immutable-collections";
|
|
36
36
|
import { durationToMinutes } from "../util/parseISODuration.js";
|
|
37
37
|
import { atom } from "jotai";
|
|
38
38
|
export class StationGroupAndNum {
|
|
@@ -47,7 +47,9 @@ export class StationGroupAndNum {
|
|
|
47
47
|
return hashValues(this.group, this.num);
|
|
48
48
|
}
|
|
49
49
|
compare(other) {
|
|
50
|
-
return this.group === other.group
|
|
50
|
+
return this.group === other.group
|
|
51
|
+
? this.num - other.num
|
|
52
|
+
: this.group.localeCompare(other.group);
|
|
51
53
|
}
|
|
52
54
|
toString() {
|
|
53
55
|
return this.group + " #" + this.num.toString();
|
|
@@ -77,7 +79,9 @@ function addReplacementsFromLog(old, e) {
|
|
|
77
79
|
const totalCntAtEnd = use.totalToolUseCountAtEndOfCycle ?? null;
|
|
78
80
|
if ((useDuring || cntDuring) && useDuring === totalUseAtEnd && cntDuring === totalCntAtEnd) {
|
|
79
81
|
// replace before cycle start
|
|
80
|
-
const last = old.recentUse
|
|
82
|
+
const last = old.recentUse
|
|
83
|
+
.get(key)
|
|
84
|
+
?.find((entry) => entry.tool === use.tool && entry.pocket === use.pocket);
|
|
81
85
|
if (last) {
|
|
82
86
|
const lastTotalUse = last.totalToolUseAtEndOfCycle
|
|
83
87
|
? durationToMinutes(last.totalToolUseAtEndOfCycle)
|
|
@@ -106,9 +110,13 @@ function addReplacementsFromLog(old, e) {
|
|
|
106
110
|
tool: use.tool,
|
|
107
111
|
pocket: use.pocket,
|
|
108
112
|
type: "ReplaceInCycle",
|
|
109
|
-
totalUseAtBeginningOfCycle: lifetime !== null && useDuring !== null
|
|
113
|
+
totalUseAtBeginningOfCycle: lifetime !== null && useDuring !== null
|
|
114
|
+
? lifetime - useDuring + (totalUseAtEnd ?? 0)
|
|
115
|
+
: null,
|
|
110
116
|
totalUseAtEndOfCycle: totalUseAtEnd,
|
|
111
|
-
totalCntAtBeginningOfCycle: lifeCnt !== null && cntDuring !== null
|
|
117
|
+
totalCntAtBeginningOfCycle: lifeCnt !== null && cntDuring !== null
|
|
118
|
+
? lifeCnt - cntDuring + (totalCntAtEnd ?? 0)
|
|
119
|
+
: null,
|
|
112
120
|
totalCntAtEndOfCycle: totalCntAtEnd,
|
|
113
121
|
});
|
|
114
122
|
}
|
|
@@ -125,7 +133,10 @@ function addReplacementsFromLog(old, e) {
|
|
|
125
133
|
}
|
|
126
134
|
export const setLast30ToolReplacements = atom(null, (_, set, log) => {
|
|
127
135
|
set(last30ToolReplacementsRW, (oldCycles) => LazySeq.of(log)
|
|
128
|
-
.filter((e) => e.type === LogType.MachineCycle &&
|
|
136
|
+
.filter((e) => e.type === LogType.MachineCycle &&
|
|
137
|
+
!e.startofcycle &&
|
|
138
|
+
!!e.tooluse &&
|
|
139
|
+
e.tooluse.length > 0)
|
|
129
140
|
.fold(oldCycles, addReplacementsFromLog));
|
|
130
141
|
});
|
|
131
142
|
export const updateLastToolReplacements = atom(null, (_, set, { evt, now, expire }) => {
|
|
@@ -150,6 +161,9 @@ export const updateLastToolReplacements = atom(null, (_, set, { evt, now, expire
|
|
|
150
161
|
});
|
|
151
162
|
export const setSpecificMonthToolReplacements = atom(null, (_, set, log) => {
|
|
152
163
|
set(specificMonthToolReplacementsRW, LazySeq.of(log)
|
|
153
|
-
.filter((e) => e.type === LogType.MachineCycle &&
|
|
164
|
+
.filter((e) => e.type === LogType.MachineCycle &&
|
|
165
|
+
!e.startofcycle &&
|
|
166
|
+
!!e.tooluse &&
|
|
167
|
+
e.tooluse.length > 0)
|
|
154
168
|
.fold(emptyReplacementsAndUse, addReplacementsFromLog));
|
|
155
169
|
});
|
|
@@ -39,7 +39,9 @@ import { stat_name_and_num } from "./station-cycles.js";
|
|
|
39
39
|
const last30ToolUseRW = atom(HashMap.empty());
|
|
40
40
|
export const last30ToolUse = last30ToolUseRW;
|
|
41
41
|
function process_tools(cycle, estimatedCycleTimes, toolUsage) {
|
|
42
|
-
if (cycle.tooluse === undefined ||
|
|
42
|
+
if (cycle.tooluse === undefined ||
|
|
43
|
+
cycle.tooluse.length === 0 ||
|
|
44
|
+
cycle.type !== LogType.MachineCycle) {
|
|
43
45
|
return toolUsage;
|
|
44
46
|
}
|
|
45
47
|
const stats = cycle.material.length > 0
|
|
@@ -72,7 +74,10 @@ function process_tools(cycle, estimatedCycleTimes, toolUsage) {
|
|
|
72
74
|
if (old) {
|
|
73
75
|
const n = old.recentCycles.slice(-4);
|
|
74
76
|
n.push({ tools: toolsUsedInCycle });
|
|
75
|
-
return {
|
|
77
|
+
return {
|
|
78
|
+
machines: old.machines.add(stat_name_and_num(cycle.loc, cycle.locnum)),
|
|
79
|
+
recentCycles: n,
|
|
80
|
+
};
|
|
76
81
|
}
|
|
77
82
|
else {
|
|
78
83
|
return {
|
package/dist/components/App.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ChooseModeItem } from "./ChooseMode.js";
|
|
|
3
3
|
import * as serverSettings from "../network/server-settings.js";
|
|
4
4
|
export declare function NavTabs({ children }: {
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
}): import("react
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
7
|
export interface AppProps {
|
|
8
8
|
readonly renderCustomPage?: (custom: ReadonlyArray<string>) => {
|
|
9
9
|
readonly nav: ComponentType | undefined;
|
|
@@ -11,5 +11,5 @@ export interface AppProps {
|
|
|
11
11
|
};
|
|
12
12
|
readonly chooseModes?: (i: serverSettings.FMSInfoAndUser) => ReadonlyArray<ChooseModeItem> | null;
|
|
13
13
|
}
|
|
14
|
-
declare const App: import("react").MemoExoticComponent<(props: AppProps) => import("react
|
|
14
|
+
declare const App: import("react").MemoExoticComponent<(props: AppProps) => import("react").JSX.Element>;
|
|
15
15
|
export default App;
|
package/dist/components/App.js
CHANGED
|
@@ -80,7 +80,7 @@ import { CloseoutReport } from "./operations/CloseoutReport.js";
|
|
|
80
80
|
import { RebookingsPage } from "./operations/Rebookings.js";
|
|
81
81
|
import { RecentCompletedPartsPage } from "./operations/CompletedParts.js";
|
|
82
82
|
import { basketDisplayName } from "../cell-status/station-cycles.js";
|
|
83
|
-
import { last30HasBasketCycleData, specificMonthHasBasketCycleData } from "../cell-status/basket-cycles.js";
|
|
83
|
+
import { last30HasBasketCycleData, specificMonthHasBasketCycleData, } from "../cell-status/basket-cycles.js";
|
|
84
84
|
const OperationsReportsTab = "bms-operations-reports-tab";
|
|
85
85
|
const operationsReports = [
|
|
86
86
|
{ separator: "Load/Unload" },
|
|
@@ -172,7 +172,11 @@ const operationsReports = [
|
|
|
172
172
|
function analysisReports(hasBasketCycles) {
|
|
173
173
|
return [
|
|
174
174
|
{ separator: "Efficiency" },
|
|
175
|
-
{
|
|
175
|
+
{
|
|
176
|
+
name: "Buffers",
|
|
177
|
+
route: { route: routes.RouteLocation.Analysis_Buffers },
|
|
178
|
+
icon: _jsx(BufferIcon, {}),
|
|
179
|
+
},
|
|
176
180
|
{
|
|
177
181
|
name: "Station OEE",
|
|
178
182
|
route: { route: routes.RouteLocation.Analysis_StationOEE },
|
|
@@ -206,7 +210,11 @@ function analysisReports(hasBasketCycles) {
|
|
|
206
210
|
hidden: () => !hasBasketCycles,
|
|
207
211
|
},
|
|
208
212
|
{ separator: "Cell" },
|
|
209
|
-
{
|
|
213
|
+
{
|
|
214
|
+
name: "Quality",
|
|
215
|
+
route: { route: routes.RouteLocation.Analysis_Quality },
|
|
216
|
+
icon: _jsx(BuildIcon, {}),
|
|
217
|
+
},
|
|
210
218
|
{
|
|
211
219
|
name: "Tool Replacements",
|
|
212
220
|
route: { route: routes.RouteLocation.Analysis_ToolReplacements },
|
|
@@ -302,7 +310,7 @@ const App = memo(function App(props) {
|
|
|
302
310
|
else {
|
|
303
311
|
switch (route.route) {
|
|
304
312
|
case routes.RouteLocation.Station_LoadMonitor:
|
|
305
|
-
page = _jsx(LoadStation, { loadNum: route.loadNum, queues: route.queues, completed: route.completed });
|
|
313
|
+
page = (_jsx(LoadStation, { loadNum: route.loadNum, queues: route.queues, completed: route.completed }));
|
|
306
314
|
nav1 = StationToolbar;
|
|
307
315
|
nav2 = StationToolbarOverviewButton;
|
|
308
316
|
showOperator = true;
|
|
@@ -568,7 +576,7 @@ const App = memo(function App(props) {
|
|
|
568
576
|
case routes.RouteLocation.Client_Custom: {
|
|
569
577
|
const customPage = props.renderCustomPage?.(route.custom);
|
|
570
578
|
nav1 = customPage?.nav;
|
|
571
|
-
page = customPage?.page ?? _jsx(ChooseMode, { setRoute: setRoute, modes: props.chooseModes?.(fmsInfo) });
|
|
579
|
+
page = customPage?.page ?? (_jsx(ChooseMode, { setRoute: setRoute, modes: props.chooseModes?.(fmsInfo) }));
|
|
572
580
|
showAlarms = false;
|
|
573
581
|
break;
|
|
574
582
|
}
|
|
@@ -3,12 +3,12 @@ export declare function GridRows({ scale, width, tickOverride, }: {
|
|
|
3
3
|
scale: ScaleLinear<unknown, number> | ScaleTime<unknown, number>;
|
|
4
4
|
width: number;
|
|
5
5
|
tickOverride?: number[];
|
|
6
|
-
}): import("react
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
7
|
export declare function GridCols({ scale, height, tickOverride, }: {
|
|
8
8
|
scale: ScaleLinear<unknown, number> | ScaleTime<unknown, number>;
|
|
9
9
|
height: number;
|
|
10
10
|
tickOverride?: number[];
|
|
11
|
-
}): import("react
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
12
|
export declare function ChartGrid({ xScale, yScale, width, height, rowTickOverride, colTickOverride, }: {
|
|
13
13
|
xScale: ScaleLinear<unknown, number> | ScaleTime<unknown, number>;
|
|
14
14
|
yScale: ScaleLinear<unknown, number> | ScaleTime<unknown, number>;
|
|
@@ -16,7 +16,7 @@ export declare function ChartGrid({ xScale, yScale, width, height, rowTickOverri
|
|
|
16
16
|
height: number;
|
|
17
17
|
rowTickOverride?: number[];
|
|
18
18
|
colTickOverride?: number[];
|
|
19
|
-
}): import("react
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
20
|
type AxisScale<T> = ((val: T) => number | undefined) & {
|
|
21
21
|
domain: () => ReadonlyArray<T>;
|
|
22
22
|
range: () => ReadonlyArray<number>;
|
|
@@ -31,7 +31,7 @@ export declare function AxisBottom<T>({ top, scale, label, fontSize, tickFormat,
|
|
|
31
31
|
fontSize?: number;
|
|
32
32
|
tickFormat?: (val: T) => string;
|
|
33
33
|
tickOverride?: ReadonlyArray<T>;
|
|
34
|
-
}): import("react
|
|
34
|
+
}): import("react").JSX.Element;
|
|
35
35
|
export declare function AxisLeft<T>({ left, scale, label, fontSize, tickFormat, tickOverride, }: {
|
|
36
36
|
left: number;
|
|
37
37
|
scale: AxisScale<T>;
|
|
@@ -39,7 +39,7 @@ export declare function AxisLeft<T>({ left, scale, label, fontSize, tickFormat,
|
|
|
39
39
|
fontSize?: number;
|
|
40
40
|
tickFormat?: (val: T) => string;
|
|
41
41
|
tickOverride?: ReadonlyArray<T>;
|
|
42
|
-
}): import("react
|
|
42
|
+
}): import("react").JSX.Element;
|
|
43
43
|
export declare function AxisTop<T>({ top, scale, label, fontSize, tickFormat, tickOverride, }: {
|
|
44
44
|
top: number;
|
|
45
45
|
scale: AxisScale<T>;
|
|
@@ -47,5 +47,5 @@ export declare function AxisTop<T>({ top, scale, label, fontSize, tickFormat, ti
|
|
|
47
47
|
fontSize?: number;
|
|
48
48
|
tickFormat?: (val: T) => string;
|
|
49
49
|
tickOverride?: ReadonlyArray<T>;
|
|
50
|
-
}): import("react
|
|
50
|
+
}): import("react").JSX.Element;
|
|
51
51
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const BarcodeListener: import("react").MemoExoticComponent<() => null>;
|
|
2
|
-
export declare const QRScanButton: import("react").MemoExoticComponent<() => import("react
|
|
2
|
+
export declare const QRScanButton: import("react").MemoExoticComponent<() => import("react").JSX.Element | null>;
|
|
3
3
|
export declare const scanBarcodeToAddToQueueDialog: import("jotai").PrimitiveAtom<string | null> & {
|
|
4
4
|
init: string | null;
|
|
5
5
|
};
|
|
6
|
-
export declare const AddByBarcodeDialog: import("react").MemoExoticComponent<() => import("react
|
|
6
|
+
export declare const AddByBarcodeDialog: 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.
|
|
@@ -70,7 +70,10 @@ export const BarcodeListener = memo(function BarcodeListener() {
|
|
|
70
70
|
k.stopPropagation();
|
|
71
71
|
k.preventDefault();
|
|
72
72
|
}
|
|
73
|
-
else if (k.key === "*" &&
|
|
73
|
+
else if (k.key === "*" &&
|
|
74
|
+
!scanActive &&
|
|
75
|
+
lastBangTime !== null &&
|
|
76
|
+
Date.now() - lastBangTime < 1000) {
|
|
74
77
|
startDetection();
|
|
75
78
|
k.stopPropagation();
|
|
76
79
|
k.preventDefault();
|
|
@@ -133,7 +136,10 @@ export const AddByBarcodeDialog = memo(function AddByBarcodeDialog() {
|
|
|
133
136
|
const [manual, setManual] = useState("");
|
|
134
137
|
const setBarcode = useSetAtom(materialDialogOpen);
|
|
135
138
|
function onScan(results) {
|
|
136
|
-
if (queue !== null &&
|
|
139
|
+
if (queue !== null &&
|
|
140
|
+
results.length > 0 &&
|
|
141
|
+
results[0].rawValue !== null &&
|
|
142
|
+
results[0].rawValue !== "") {
|
|
137
143
|
setBarcode({ type: "Barcode", barcode: results[0].rawValue, toQueue: queue });
|
|
138
144
|
setQueue(null);
|
|
139
145
|
setManual("");
|
|
@@ -13,7 +13,7 @@ export declare function Tooltip<T>({ chartHeight, chartWidth, atom, TooltipConte
|
|
|
13
13
|
TooltipContent: ComponentType<{
|
|
14
14
|
tooltip: T;
|
|
15
15
|
}>;
|
|
16
|
-
}): import("react
|
|
16
|
+
}): import("react").JSX.Element | null;
|
|
17
17
|
export declare function ChartWithTooltip<T>({ chart, tooltipAtom, TooltipContent, sx, autoHeight, }: {
|
|
18
18
|
chart: ({ width, height }: {
|
|
19
19
|
width: number;
|
|
@@ -25,4 +25,4 @@ export declare function ChartWithTooltip<T>({ chart, tooltipAtom, TooltipContent
|
|
|
25
25
|
}>;
|
|
26
26
|
sx?: SxProps;
|
|
27
27
|
autoHeight?: boolean;
|
|
28
|
-
}): import("react
|
|
28
|
+
}): import("react").JSX.Element;
|
|
@@ -131,6 +131,11 @@ export const defaultChooseModes = [
|
|
|
131
131
|
];
|
|
132
132
|
export function ChooseMode(p) {
|
|
133
133
|
const navList = (_jsx(Paper, { children: _jsx(List, { component: "nav", dense: true, children: (p.modes ?? defaultChooseModes).map((mode, idx) => mode.type === "Subheader" ? (_jsx(ListSubheader, { children: mode.caption }, idx)) : (_jsx(ListItem, { children: _jsxs(ListItemButton, { onClick: () => p.setRoute(mode.route), children: [_jsx(ListItemIcon, { children: mode.icon }), _jsx(ListItemText, { children: mode.label })] }) }, idx))) }) }));
|
|
134
|
-
return (_jsx("main", { style: { display: "flex", justifyContent: "center" }, children: _jsxs("div", { children: [_jsxs("div", { style: { textAlign: "center" }, children: [_jsx(Typography, { variant: "h4", style: { marginTop: "2em" }, children: "Select user and computer location" }), _jsxs(Typography, { variant: "caption", style: {
|
|
134
|
+
return (_jsx("main", { style: { display: "flex", justifyContent: "center" }, children: _jsxs("div", { children: [_jsxs("div", { style: { textAlign: "center" }, children: [_jsx(Typography, { variant: "h4", style: { marginTop: "2em" }, children: "Select user and computer location" }), _jsxs(Typography, { variant: "caption", style: {
|
|
135
|
+
marginBottom: "2em",
|
|
136
|
+
maxWidth: "30em",
|
|
137
|
+
marginLeft: "auto",
|
|
138
|
+
marginRight: "auto",
|
|
139
|
+
}, children: ["We recommend that after selecting one of the following modes, you bookmark the page and visit it directly.", _jsx("a", { href: "https://fms-insight.seedtactics.com/docs/client-dashboard.html", children: "Learn More" })] })] }), navList] }) }));
|
|
135
140
|
}
|
|
136
141
|
export default ChooseMode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OperatorSelect: import("react").MemoExoticComponent<() => import("react
|
|
1
|
+
export declare const OperatorSelect: import("react").MemoExoticComponent<() => import("react").JSX.Element>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { FallbackProps } from "react-error-boundary";
|
|
3
|
-
export declare function Loading(): import("react
|
|
4
|
-
export declare function DisplayError({ error }: FallbackProps): import("react
|
|
3
|
+
export declare function Loading(): import("react").JSX.Element;
|
|
4
|
+
export declare function DisplayError({ error }: FallbackProps): import("react").JSX.Element;
|
|
5
5
|
export declare function DisplayLoadingAndError(props: {
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
fallback?: ReactNode;
|
|
8
|
-
}): import("react
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LoadingIcon: import("react").MemoExoticComponent<() => import("react
|
|
1
|
+
export declare const LoadingIcon: 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) 2018, John Lenz
|
|
3
3
|
|
|
4
4
|
All rights reserved.
|
|
@@ -36,7 +36,7 @@ import { Button, CircularProgress, Dialog, DialogActions, DialogContent, DialogT
|
|
|
36
36
|
import { Error as ErrorIcon } from "@mui/icons-material";
|
|
37
37
|
import { Tooltip } from "@mui/material";
|
|
38
38
|
import { errorLoadingLast30, websocketReconnecting } from "../network/websocket.js";
|
|
39
|
-
import { errorLoadingSpecificMonthData, loadingSpecificMonthData } from "../network/load-specific-month.js";
|
|
39
|
+
import { errorLoadingSpecificMonthData, loadingSpecificMonthData, } from "../network/load-specific-month.js";
|
|
40
40
|
import { useAtomValue } from "jotai";
|
|
41
41
|
export const LoadingIcon = memo(function LoadingIcon() {
|
|
42
42
|
const websocketLoading = useAtomValue(websocketReconnecting);
|
|
@@ -6,10 +6,10 @@ export interface LogEntryProps {
|
|
|
6
6
|
readonly highlightProcsGreaterOrEqualTo?: number;
|
|
7
7
|
}
|
|
8
8
|
export declare function isLogEntryInvalidated(e: api.ILogEntry): boolean;
|
|
9
|
-
export declare const LogEntry: import("react").MemoExoticComponent<(props: LogEntryProps) => import("react
|
|
9
|
+
export declare const LogEntry: import("react").MemoExoticComponent<(props: LogEntryProps) => import("react").JSX.Element>;
|
|
10
10
|
export interface LogEntriesProps {
|
|
11
11
|
entries: Iterable<Readonly<api.ILogEntry>>;
|
|
12
12
|
copyToClipboard?: boolean;
|
|
13
13
|
highlightProcsGreaterOrEqualTo?: number;
|
|
14
14
|
}
|
|
15
|
-
export declare const LogEntries: import("react").MemoExoticComponent<(props: LogEntriesProps) => import("react
|
|
15
|
+
export declare const LogEntries: import("react").MemoExoticComponent<(props: LogEntriesProps) => import("react").JSX.Element>;
|