@olenbetong/synergi-react 5.3.1 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/styles/styles.css +1 -1
- package/dist/styles/styles.css.map +1 -1
- package/es/charts/CallOffDeliveries/TicketScanDialog.d.ts +7 -0
- package/es/charts/CallOffDeliveries/TicketScanDialog.js +47 -0
- package/es/charts/CallOffDeliveries/chartOptions.d.ts +8 -0
- package/es/charts/CallOffDeliveries/chartOptions.js +138 -0
- package/es/charts/CallOffDeliveries/data.d.ts +35 -0
- package/es/charts/CallOffDeliveries/data.js +30 -0
- package/es/charts/CallOffDeliveries/index.css +1 -0
- package/es/charts/CallOffDeliveries/index.d.ts +24 -0
- package/es/charts/CallOffDeliveries/index.js +115 -0
- package/es/charts/CallOffDeliveries/model.d.ts +37 -0
- package/es/charts/CallOffDeliveries/model.js +59 -0
- package/es/charts/ProductionPlan/PlanValueDialog.d.ts +14 -0
- package/es/charts/ProductionPlan/PlanValueDialog.js +47 -0
- package/es/charts/ProductionPlan/chartOptions.d.ts +20 -0
- package/es/charts/ProductionPlan/chartOptions.js +353 -0
- package/es/charts/ProductionPlan/data.d.ts +105 -0
- package/es/charts/ProductionPlan/data.js +61 -0
- package/es/charts/ProductionPlan/index.css +1 -0
- package/es/charts/ProductionPlan/index.d.ts +31 -0
- package/es/charts/ProductionPlan/index.js +203 -0
- package/es/charts/ProductionPlan/model.d.ts +29 -0
- package/es/charts/ProductionPlan/model.js +65 -0
- package/es/charts/Pumping/chartOptions.d.ts +12 -0
- package/es/charts/Pumping/chartOptions.js +197 -0
- package/es/charts/Pumping/data.d.ts +65 -0
- package/es/charts/Pumping/data.js +20 -0
- package/es/charts/Pumping/index.css +1 -0
- package/es/charts/Pumping/index.d.ts +27 -0
- package/es/charts/Pumping/index.js +124 -0
- package/es/charts/Pumping/model.d.ts +34 -0
- package/es/charts/Pumping/model.js +88 -0
- package/es/charts/UnboundPreview/chartOptions.d.ts +3 -0
- package/es/charts/UnboundPreview/chartOptions.js +126 -0
- package/es/charts/UnboundPreview/index.css +1 -0
- package/es/charts/UnboundPreview/index.d.ts +20 -0
- package/es/charts/UnboundPreview/index.js +55 -0
- package/es/charts/UnboundPreview/model.d.ts +49 -0
- package/es/charts/UnboundPreview/model.js +67 -0
- package/es/charts/VehicleDeliveries/chartOptions.d.ts +13 -0
- package/es/charts/VehicleDeliveries/chartOptions.js +270 -0
- package/es/charts/VehicleDeliveries/data.d.ts +71 -0
- package/es/charts/VehicleDeliveries/data.js +20 -0
- package/es/charts/VehicleDeliveries/deliveryXRange.d.ts +4 -0
- package/es/charts/VehicleDeliveries/deliveryXRange.js +62 -0
- package/es/charts/VehicleDeliveries/index.css +1 -0
- package/es/charts/VehicleDeliveries/index.d.ts +24 -0
- package/es/charts/VehicleDeliveries/index.js +129 -0
- package/es/charts/VehicleDeliveries/model.d.ts +24 -0
- package/es/charts/VehicleDeliveries/model.js +106 -0
- package/es/charts/format.d.ts +12 -0
- package/es/charts/format.js +34 -0
- package/es/charts/index.d.ts +5 -0
- package/es/charts/index.js +5 -0
- package/es/charts/storage.d.ts +5 -0
- package/es/charts/storage.js +35 -0
- package/es/components/ColorCard/index.css +8 -8
- package/es/components/ImageEditor/ImageEditor.d.ts +6 -0
- package/es/components/ImageEditor/ImageEditor.js +6 -2
- package/es/components/ImageEditor/ResponsiveButton.d.ts +2 -1
- package/es/components/ImageEditor/ResponsiveButton.js +3 -3
- package/es/components/ImageEditor/plugins/cropPlugin/CropContext.d.ts +2 -1
- package/es/components/ImageEditor/plugins/cropPlugin/CropContext.js +2 -2
- package/es/components/ImageEditor/plugins/cropPlugin/CropToolbar.js +27 -7
- package/es/components/ImageEditor/types.d.ts +5 -0
- package/es/index.css +1 -1
- package/es/vehicles/VehicleInfoDialog/OutOfServiceForm.d.ts +4 -0
- package/es/vehicles/VehicleInfoDialog/OutOfServiceForm.js +51 -0
- package/es/vehicles/VehicleInfoDialog/data/dsDeliveryTickets.d.ts +99 -0
- package/es/vehicles/VehicleInfoDialog/data/dsDeliveryTickets.js +499 -0
- package/es/vehicles/VehicleInfoDialog/data/dsDriverStatus.d.ts +13 -0
- package/es/vehicles/VehicleInfoDialog/data/dsDriverStatus.js +69 -0
- package/es/vehicles/VehicleInfoDialog/data/dsVehicleInfo.d.ts +33 -0
- package/es/vehicles/VehicleInfoDialog/data/dsVehicleInfo.js +164 -0
- package/es/vehicles/VehicleInfoDialog/data/dsVehicleInfoLog.d.ts +15 -0
- package/es/vehicles/VehicleInfoDialog/data/dsVehicleInfoLog.js +80 -0
- package/es/vehicles/VehicleInfoDialog/formatting.d.ts +13 -0
- package/es/vehicles/VehicleInfoDialog/formatting.js +48 -0
- package/es/vehicles/VehicleInfoDialog/index.css +1 -0
- package/es/vehicles/VehicleInfoDialog/index.d.ts +11 -0
- package/es/vehicles/VehicleInfoDialog/index.js +46 -0
- package/es/vehicles/VehicleInfoDialog/tabs.d.ts +6 -0
- package/es/vehicles/VehicleInfoDialog/tabs.js +85 -0
- package/es/vehicles/index.d.ts +1 -0
- package/es/vehicles/index.js +1 -0
- package/package.json +19 -10
- package/src/charts/CallOffDeliveries/TicketScanDialog.tsx +79 -0
- package/src/charts/CallOffDeliveries/chartOptions.ts +160 -0
- package/src/charts/CallOffDeliveries/data.ts +67 -0
- package/src/charts/CallOffDeliveries/index.scss +51 -0
- package/src/charts/CallOffDeliveries/index.tsx +217 -0
- package/src/charts/CallOffDeliveries/model.test.ts +90 -0
- package/src/charts/CallOffDeliveries/model.ts +87 -0
- package/src/charts/ProductionPlan/PlanValueDialog.tsx +107 -0
- package/src/charts/ProductionPlan/chartOptions.ts +406 -0
- package/src/charts/ProductionPlan/data.ts +170 -0
- package/src/charts/ProductionPlan/index.scss +148 -0
- package/src/charts/ProductionPlan/index.tsx +432 -0
- package/src/charts/ProductionPlan/model.test.ts +132 -0
- package/src/charts/ProductionPlan/model.ts +102 -0
- package/src/charts/Pumping/chartOptions.ts +224 -0
- package/src/charts/Pumping/data.ts +91 -0
- package/src/charts/Pumping/index.scss +42 -0
- package/src/charts/Pumping/index.tsx +222 -0
- package/src/charts/Pumping/model.test.ts +122 -0
- package/src/charts/Pumping/model.ts +104 -0
- package/src/charts/UnboundPreview/chartOptions.ts +137 -0
- package/src/charts/UnboundPreview/index.scss +17 -0
- package/src/charts/UnboundPreview/index.tsx +100 -0
- package/src/charts/UnboundPreview/model.test.ts +129 -0
- package/src/charts/UnboundPreview/model.ts +110 -0
- package/src/charts/VehicleDeliveries/chartOptions.ts +311 -0
- package/src/charts/VehicleDeliveries/data.ts +98 -0
- package/src/charts/VehicleDeliveries/deliveryXRange.ts +80 -0
- package/src/charts/VehicleDeliveries/index.scss +43 -0
- package/src/charts/VehicleDeliveries/index.tsx +262 -0
- package/src/charts/VehicleDeliveries/model.test.ts +117 -0
- package/src/charts/VehicleDeliveries/model.ts +139 -0
- package/src/charts/format.ts +38 -0
- package/src/charts/index.ts +20 -0
- package/src/charts/storage.ts +36 -0
- package/src/components/ColorCard/index.css +8 -8
- package/src/components/ImageEditor/ImageEditor.test.tsx +103 -0
- package/src/components/ImageEditor/ImageEditor.tsx +18 -2
- package/src/components/ImageEditor/ResponsiveButton.tsx +4 -3
- package/src/components/ImageEditor/plugins/cropPlugin/CropContext.tsx +5 -2
- package/src/components/ImageEditor/plugins/cropPlugin/CropToolbar.test.tsx +118 -0
- package/src/components/ImageEditor/plugins/cropPlugin/CropToolbar.tsx +52 -18
- package/src/components/ImageEditor/types.ts +5 -0
- package/src/vehicles/VehicleInfoDialog/OutOfServiceForm.tsx +127 -0
- package/src/vehicles/VehicleInfoDialog/data/dsDeliveryTickets.ts +600 -0
- package/src/vehicles/VehicleInfoDialog/data/dsDriverStatus.ts +84 -0
- package/src/vehicles/VehicleInfoDialog/data/dsVehicleInfo.ts +198 -0
- package/src/vehicles/VehicleInfoDialog/data/dsVehicleInfoLog.ts +97 -0
- package/src/vehicles/VehicleInfoDialog/formatting.test.ts +57 -0
- package/src/vehicles/VehicleInfoDialog/formatting.ts +58 -0
- package/src/vehicles/VehicleInfoDialog/index.scss +131 -0
- package/src/vehicles/VehicleInfoDialog/index.tsx +106 -0
- package/src/vehicles/VehicleInfoDialog/tabs.tsx +188 -0
- package/src/vehicles/index.ts +1 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Button, Dialog, Heading, Textfield } from "@digdir/designsystemet-react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
|
|
4
|
+
import { getLocalizedString } from "../../i18n.js";
|
|
5
|
+
import { type PlanParameter, parsePlanValue } from "./model.js";
|
|
6
|
+
|
|
7
|
+
export type PlanValueDialogProps = {
|
|
8
|
+
parameter: PlanParameter;
|
|
9
|
+
initialValue: string;
|
|
10
|
+
onCancel: () => void;
|
|
11
|
+
onSubmit: (value: number | string) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function getLabel(parameter: PlanParameter) {
|
|
15
|
+
switch (parameter) {
|
|
16
|
+
case "arrival":
|
|
17
|
+
return getLocalizedString("Arrival at the building site (HH:mm)");
|
|
18
|
+
case "interval":
|
|
19
|
+
return getLocalizedString("Interval to the next load (minutes)");
|
|
20
|
+
case "drivetime":
|
|
21
|
+
return getLocalizedString("Driving time to the building site (minutes)");
|
|
22
|
+
case "unloadtime":
|
|
23
|
+
return getLocalizedString("Unloading time (minutes)");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Asks for a new value for one of the planning columns. Mounted only while it is open. */
|
|
28
|
+
export function PlanValueDialog({ parameter, initialValue, onCancel, onSubmit }: PlanValueDialogProps) {
|
|
29
|
+
let [text, setText] = useState(initialValue);
|
|
30
|
+
let [touched, setTouched] = useState(false);
|
|
31
|
+
let value = parsePlanValue(parameter, text);
|
|
32
|
+
let error =
|
|
33
|
+
touched && value === null
|
|
34
|
+
? parameter === "arrival"
|
|
35
|
+
? getLocalizedString("Enter a time of day, such as 07:30")
|
|
36
|
+
: getLocalizedString("Enter a whole number of minutes")
|
|
37
|
+
: undefined;
|
|
38
|
+
|
|
39
|
+
function handleSubmit(event: React.FormEvent) {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
setTouched(true);
|
|
42
|
+
if (value === null) return;
|
|
43
|
+
if (text.trim() === initialValue) {
|
|
44
|
+
onCancel();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
onSubmit(value);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<Dialog open closedby="any" onClose={onCancel} className="ObProductionPlan-dialog">
|
|
53
|
+
<form onSubmit={handleSubmit}>
|
|
54
|
+
<Dialog.Block>
|
|
55
|
+
<Heading level={2} data-size="xs">
|
|
56
|
+
{getLocalizedString("Enter new value")}
|
|
57
|
+
</Heading>
|
|
58
|
+
</Dialog.Block>
|
|
59
|
+
<Dialog.Block>
|
|
60
|
+
<Textfield
|
|
61
|
+
// oxlint-disable-next-line jsx-a11y/no-autofocus -- the field is the only control in the dialog
|
|
62
|
+
autoFocus
|
|
63
|
+
label={getLabel(parameter)}
|
|
64
|
+
value={text}
|
|
65
|
+
error={error}
|
|
66
|
+
inputMode={parameter === "arrival" ? "text" : "numeric"}
|
|
67
|
+
onChange={(event) => setText(event.currentTarget.value)}
|
|
68
|
+
/>
|
|
69
|
+
</Dialog.Block>
|
|
70
|
+
<Dialog.Block className="ObProductionPlan-dialog-actions">
|
|
71
|
+
<Button type="submit">{getLocalizedString("Save")}</Button>
|
|
72
|
+
<Button type="button" variant="secondary" onClick={onCancel}>
|
|
73
|
+
{getLocalizedString("Cancel")}
|
|
74
|
+
</Button>
|
|
75
|
+
</Dialog.Block>
|
|
76
|
+
</form>
|
|
77
|
+
</Dialog>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type ConfirmResetDialogProps = {
|
|
82
|
+
onCancel: () => void;
|
|
83
|
+
onConfirm: () => void;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export function ConfirmResetDialog({ onCancel, onConfirm }: ConfirmResetDialogProps) {
|
|
87
|
+
return (
|
|
88
|
+
<Dialog open closedby="any" onClose={onCancel} className="ObProductionPlan-dialog">
|
|
89
|
+
<Dialog.Block>
|
|
90
|
+
<Heading level={2} data-size="xs">
|
|
91
|
+
{getLocalizedString("Reset the plan?")}
|
|
92
|
+
</Heading>
|
|
93
|
+
</Dialog.Block>
|
|
94
|
+
<Dialog.Block>
|
|
95
|
+
{getLocalizedString("All call-offs will be planned again, and the manual changes made to them will be reset.")}
|
|
96
|
+
</Dialog.Block>
|
|
97
|
+
<Dialog.Block className="ObProductionPlan-dialog-actions">
|
|
98
|
+
<Button data-color="danger" onClick={onConfirm}>
|
|
99
|
+
{getLocalizedString("Reset the plan")}
|
|
100
|
+
</Button>
|
|
101
|
+
<Button variant="secondary" onClick={onCancel}>
|
|
102
|
+
{getLocalizedString("Cancel")}
|
|
103
|
+
</Button>
|
|
104
|
+
</Dialog.Block>
|
|
105
|
+
</Dialog>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import Highcharts from "highcharts";
|
|
2
|
+
|
|
3
|
+
import { getLocalizedString, localize } from "../../i18n.js";
|
|
4
|
+
import type { PlannedDeliveryRecord } from "./data.js";
|
|
5
|
+
import {
|
|
6
|
+
type DeliveryMethod,
|
|
7
|
+
getAxisMax,
|
|
8
|
+
getChartHeight,
|
|
9
|
+
getDeliveryMethod,
|
|
10
|
+
isFirstLoad,
|
|
11
|
+
type PlantPlan,
|
|
12
|
+
} from "./model.js";
|
|
13
|
+
import { formatTime, escapeHtml } from "../format.js";
|
|
14
|
+
|
|
15
|
+
const HOUR = 3600000;
|
|
16
|
+
|
|
17
|
+
/** Room left of the plot for the columns of the delivery chart, the same on all three charts so their time axes line up. */
|
|
18
|
+
export const LABEL_WIDTH = 440;
|
|
19
|
+
const MARGIN_LEFT = LABEL_WIDTH + 20;
|
|
20
|
+
|
|
21
|
+
// Highcharts' old palette, which the colours of the delivery methods were picked from.
|
|
22
|
+
export const METHOD_COLORS: Record<DeliveryMethod, string> = {
|
|
23
|
+
pump: "#7cb5ec",
|
|
24
|
+
telescopic: "#f7a35c",
|
|
25
|
+
conveyor: "#e4d354",
|
|
26
|
+
none: "#91e8e1",
|
|
27
|
+
};
|
|
28
|
+
const VOLUME_COLOR = "#2b908f";
|
|
29
|
+
const VEHICLES_COLOR = "#f45b5b";
|
|
30
|
+
|
|
31
|
+
// Highcharts strips SVG from HTML labels, so the icons are drawn by the stylesheet.
|
|
32
|
+
const REFRESH_ICON = '<span class="ObProductionPlan-icon ObProductionPlan-icon-refresh"></span>';
|
|
33
|
+
const WARNING_ICON = '<span class="ObProductionPlan-icon ObProductionPlan-icon-warning"></span>';
|
|
34
|
+
|
|
35
|
+
export type MovePlannedDelivery = (delivery: PlannedDeliveryRecord, prodTime: Date) => void;
|
|
36
|
+
|
|
37
|
+
export type ChartSettings = {
|
|
38
|
+
date: Date;
|
|
39
|
+
minOffset: number;
|
|
40
|
+
maxOffset: number;
|
|
41
|
+
readOnly: boolean;
|
|
42
|
+
onMove: MovePlannedDelivery;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
function culture() {
|
|
46
|
+
return globalThis.af?.userSession?.culture;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function formatNumber(value: number | null | undefined, decimals: number) {
|
|
50
|
+
if (value == null) return "";
|
|
51
|
+
|
|
52
|
+
return new Intl.NumberFormat(culture(), {
|
|
53
|
+
minimumFractionDigits: decimals,
|
|
54
|
+
maximumFractionDigits: decimals,
|
|
55
|
+
}).format(value);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function barColor(color: string) {
|
|
59
|
+
return Highcharts.color(color).setOpacity(0.8).get("rgba") as string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getTimeAxis(settings: ChartSettings): Highcharts.XAxisOptions {
|
|
63
|
+
let midnight = settings.date.getTime();
|
|
64
|
+
let min = midnight + settings.minOffset * HOUR;
|
|
65
|
+
let max = midnight + settings.maxOffset * HOUR;
|
|
66
|
+
let band = (from: number, to: number) => ({ color: "var(--ds-color-neutral-background-tinted)", from, to });
|
|
67
|
+
let shiftLine = (hour: number) => ({
|
|
68
|
+
color: "var(--ds-color-neutral-border-default)",
|
|
69
|
+
width: 2,
|
|
70
|
+
dashStyle: "Dash" as const,
|
|
71
|
+
value: midnight + hour * HOUR,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
type: "datetime",
|
|
76
|
+
min,
|
|
77
|
+
max,
|
|
78
|
+
dateTimeLabelFormats: { hour: "%H", day: "%d.%m" },
|
|
79
|
+
tickInterval: HOUR,
|
|
80
|
+
minorTickInterval: 0.5 * HOUR,
|
|
81
|
+
plotBands: [band(min - 24 * HOUR, midnight + 6 * HOUR), band(midnight + 18 * HOUR, max + 24 * HOUR)],
|
|
82
|
+
plotLines: [
|
|
83
|
+
shiftLine(9),
|
|
84
|
+
shiftLine(12),
|
|
85
|
+
shiftLine(15),
|
|
86
|
+
{
|
|
87
|
+
color: "#ffcc00",
|
|
88
|
+
width: 2,
|
|
89
|
+
dashStyle: "Dot",
|
|
90
|
+
// The bars are wall clock times carried as UTC, so "now" has to be as well.
|
|
91
|
+
value: Date.now() - new Date().getTimezoneOffset() * 60000,
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function getTitle(text: string): Highcharts.TitleOptions {
|
|
98
|
+
return { text, align: "left", style: { fontSize: "14px", color: "var(--ds-color-neutral-text-default)" } };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function getColumnOptions(settings: ChartSettings, title: string): Highcharts.Options {
|
|
102
|
+
return {
|
|
103
|
+
chart: {
|
|
104
|
+
type: "column",
|
|
105
|
+
backgroundColor: "transparent",
|
|
106
|
+
height: 150,
|
|
107
|
+
marginLeft: MARGIN_LEFT,
|
|
108
|
+
zooming: { type: "x" },
|
|
109
|
+
},
|
|
110
|
+
accessibility: { enabled: false },
|
|
111
|
+
credits: { enabled: false },
|
|
112
|
+
title: getTitle(title),
|
|
113
|
+
legend: { enabled: false },
|
|
114
|
+
xAxis: getTimeAxis(settings),
|
|
115
|
+
plotOptions: {
|
|
116
|
+
series: { animation: false, states: { inactive: { opacity: 1 } } },
|
|
117
|
+
column: { groupPadding: 0, pointPadding: 0, borderWidth: 0 },
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function getVolumeChartOptions(plan: PlantPlan, settings: ChartSettings): Highcharts.Options {
|
|
123
|
+
let base = getColumnOptions(settings, getLocalizedString("Calculated production load:"));
|
|
124
|
+
let data = plan.volume.map((row) => ({
|
|
125
|
+
x: row.CutOff.getTime(),
|
|
126
|
+
y: row.Qty,
|
|
127
|
+
cutOffStart: row.CutOffStart,
|
|
128
|
+
cutOffEnd: row.CutOffEnd,
|
|
129
|
+
}));
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
...base,
|
|
133
|
+
yAxis: {
|
|
134
|
+
title: { text: "" },
|
|
135
|
+
min: 0,
|
|
136
|
+
max: getAxisMax(
|
|
137
|
+
data.map((point) => point.y),
|
|
138
|
+
25,
|
|
139
|
+
),
|
|
140
|
+
tickInterval: 25,
|
|
141
|
+
gridLineColor: "var(--ds-color-neutral-border-subtle)",
|
|
142
|
+
labels: { format: "{value} m³" },
|
|
143
|
+
},
|
|
144
|
+
tooltip: {
|
|
145
|
+
useHTML: true,
|
|
146
|
+
formatter(this: any) {
|
|
147
|
+
let point = this.point;
|
|
148
|
+
return `<div style="font-size:10px">
|
|
149
|
+
<div>${getLocalizedString("Production at")} ${formatTime(point.cutOffStart)}-${formatTime(point.cutOffEnd)}</div>
|
|
150
|
+
<div style="font-size:12px;font-weight:bold">${formatNumber(point.y, 1)} m³ ${getLocalizedString("per 15 min.")}</div>
|
|
151
|
+
<div>~${formatNumber(point.y * 4, 0)} m³ ${getLocalizedString("per hour")}</div>
|
|
152
|
+
</div>`;
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
series: [{ type: "column", name: "Volume", color: barColor(VOLUME_COLOR), data }],
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function getVehiclesChartOptions(plan: PlantPlan, settings: ChartSettings): Highcharts.Options {
|
|
160
|
+
let base = getColumnOptions(settings, getLocalizedString("Number of vehicles:"));
|
|
161
|
+
let data = plan.vehicleCounts.map((row) => ({ x: row.CutOff.getTime(), y: row.VehicleCount }));
|
|
162
|
+
|
|
163
|
+
return {
|
|
164
|
+
...base,
|
|
165
|
+
yAxis: {
|
|
166
|
+
title: { text: "" },
|
|
167
|
+
min: 0,
|
|
168
|
+
max: getAxisMax(
|
|
169
|
+
data.map((point) => point.y),
|
|
170
|
+
10,
|
|
171
|
+
),
|
|
172
|
+
tickInterval: 5,
|
|
173
|
+
gridLineColor: "var(--ds-color-neutral-border-subtle)",
|
|
174
|
+
},
|
|
175
|
+
tooltip: {
|
|
176
|
+
useHTML: true,
|
|
177
|
+
formatter(this: any) {
|
|
178
|
+
return `<div style="font-size:10px">
|
|
179
|
+
<div>${localize`At ${formatTime(this.point.x)}`}</div>
|
|
180
|
+
<div style="font-size:12px;font-weight:bold">${this.point.y} ${getLocalizedString("vehicles")}</div>
|
|
181
|
+
</div>`;
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
series: [{ type: "column", name: "Vehicles", color: barColor(VEHICLES_COLOR), data }],
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function methodText(row: PlannedDeliveryRecord) {
|
|
189
|
+
switch (getDeliveryMethod(row)) {
|
|
190
|
+
case "pump":
|
|
191
|
+
return `${getLocalizedString("Pump")} (${escapeHtml(row.Pump)})`;
|
|
192
|
+
case "telescopic":
|
|
193
|
+
return getLocalizedString("Telescopic chute");
|
|
194
|
+
case "conveyor":
|
|
195
|
+
return getLocalizedString("Conveyor belt vehicle");
|
|
196
|
+
default:
|
|
197
|
+
return getLocalizedString("Not specified");
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function deliveryTooltip(row: PlannedDeliveryRecord) {
|
|
202
|
+
return `<div style="font-size:10px">
|
|
203
|
+
<div>${formatNumber(row.LoadQty, 1)} m³</div>
|
|
204
|
+
<div>${getLocalizedString("Mixing starts at")} ${formatTime(row.ProdDateTime)}</div>
|
|
205
|
+
<div>${getLocalizedString("Produced at")} ${formatTime(row.ProdFinishDateTime)}</div>
|
|
206
|
+
<div>${getLocalizedString("Arrival at")} ${formatTime(row.Arrival)}</div>
|
|
207
|
+
<div>${getLocalizedString("Returns at")} ${formatTime(row.ReturnTime)}</div>
|
|
208
|
+
<div style="color:var(--ds-color-info-text-subtle)">${getLocalizedString("Unloading")}: ${methodText(row)}</div>
|
|
209
|
+
</div>`;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function valueCell(className: string, parameter: string, row: PlannedDeliveryRecord, text: string, readOnly: boolean) {
|
|
213
|
+
let content = readOnly
|
|
214
|
+
? escapeHtml(text)
|
|
215
|
+
: `<a href="#plan-${parameter}-${escapeHtml(row.PrimKey)}">${escapeHtml(text) || " "}</a>`;
|
|
216
|
+
return `<span class="${className}">${content}</span>`;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** The columns left of a load: call-off (on its first load), quantity, and the values the user can change. */
|
|
220
|
+
export function getDeliveryLabel(plan: PlantPlan, index: number, readOnly: boolean) {
|
|
221
|
+
let row = plan.deliveries[index];
|
|
222
|
+
if (!row) return "";
|
|
223
|
+
|
|
224
|
+
let first = isFirstLoad(plan.deliveries, index);
|
|
225
|
+
let visibility = first ? "visible" : "hidden";
|
|
226
|
+
let warning = plan.warnings.get(row.CallOffID);
|
|
227
|
+
let name = `${row.CustomerName ?? ""}/${row.BuildSite ?? ""}`;
|
|
228
|
+
let reset = readOnly
|
|
229
|
+
? ""
|
|
230
|
+
: `<a class="ObProductionPlan-reset" href="#plan-reset-${row.CallOffID}" title="${escapeHtml(
|
|
231
|
+
getLocalizedString("Update planned loads (manual changes are discarded)"),
|
|
232
|
+
)}">${REFRESH_ICON}</a> `;
|
|
233
|
+
let warningIcon = warning
|
|
234
|
+
? `<span class="ObProductionPlan-warning" title="${escapeHtml(warning)}">${WARNING_ICON}</span> `
|
|
235
|
+
: "";
|
|
236
|
+
|
|
237
|
+
return [
|
|
238
|
+
`<div class="ObProductionPlan-row">`,
|
|
239
|
+
`<span class="ObProductionPlan-title" style="visibility:${visibility}">${reset}${warningIcon}<span title="${escapeHtml(
|
|
240
|
+
`${row.CustomerName ?? ""}\n${row.BuildSite ?? ""}`,
|
|
241
|
+
)}">${escapeHtml(name)}</span></span>`,
|
|
242
|
+
`<span class="ObProductionPlan-qty" style="visibility:${visibility}">${formatNumber(row.Qty, 1)} m³</span>`,
|
|
243
|
+
valueCell("ObProductionPlan-arrival", "arrival", row, formatTime(row.Arrival), readOnly),
|
|
244
|
+
valueCell("ObProductionPlan-minutes", "interval", row, String(row.DeliveryInterval ?? ""), readOnly),
|
|
245
|
+
valueCell("ObProductionPlan-minutes", "drivetime", row, String(row.DriveToSiteTime ?? ""), readOnly),
|
|
246
|
+
valueCell("ObProductionPlan-minutes", "unloadtime", row, String(row.UnloadTime ?? ""), readOnly),
|
|
247
|
+
`</div>`,
|
|
248
|
+
].join("");
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function columnHeaders() {
|
|
252
|
+
return [
|
|
253
|
+
`<div class="ObProductionPlan-row ObProductionPlan-headers">`,
|
|
254
|
+
`<span class="ObProductionPlan-title">${getLocalizedString("Customer/building site")}</span>`,
|
|
255
|
+
`<span class="ObProductionPlan-qty">${getLocalizedString("Quantity")}</span>`,
|
|
256
|
+
`<span class="ObProductionPlan-arrival">${getLocalizedString("At site")}</span>`,
|
|
257
|
+
`<span class="ObProductionPlan-minutes">${getLocalizedString("Interval")}</span>`,
|
|
258
|
+
`<span class="ObProductionPlan-minutes">${getLocalizedString("Driving")}</span>`,
|
|
259
|
+
`<span class="ObProductionPlan-minutes">${getLocalizedString("Unloading")}</span>`,
|
|
260
|
+
`</div>`,
|
|
261
|
+
].join("");
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function getDeliveriesChartOptions(plan: PlantPlan, settings: ChartSettings): Highcharts.Options {
|
|
265
|
+
let { readOnly, onMove } = settings;
|
|
266
|
+
let categories = plan.deliveries.map((row) => row.PrimKey);
|
|
267
|
+
let rowsByKey = new Map(plan.deliveries.map((row) => [row.PrimKey, row]));
|
|
268
|
+
let timeAxis = getTimeAxis(settings);
|
|
269
|
+
|
|
270
|
+
let data = plan.deliveries.map((row, index) => ({
|
|
271
|
+
y: index,
|
|
272
|
+
x: row.ProdDateTime.getTime(),
|
|
273
|
+
x2: row.ReturnTime.getTime(),
|
|
274
|
+
primKey: row.PrimKey,
|
|
275
|
+
vehicleNo: row.VehicleNo,
|
|
276
|
+
color: barColor(METHOD_COLORS[getDeliveryMethod(row)]),
|
|
277
|
+
}));
|
|
278
|
+
|
|
279
|
+
return {
|
|
280
|
+
chart: {
|
|
281
|
+
type: "xrange",
|
|
282
|
+
backgroundColor: "transparent",
|
|
283
|
+
zooming: { type: "x" },
|
|
284
|
+
height: getChartHeight(categories.length),
|
|
285
|
+
marginTop: 70,
|
|
286
|
+
marginBottom: 40,
|
|
287
|
+
marginLeft: MARGIN_LEFT,
|
|
288
|
+
},
|
|
289
|
+
accessibility: { enabled: false },
|
|
290
|
+
credits: { enabled: false },
|
|
291
|
+
title: getTitle(getLocalizedString("Planned deliveries:")),
|
|
292
|
+
// Moved left to line up with the axis labels below it.
|
|
293
|
+
subtitle: { useHTML: true, align: "left", x: -5, text: columnHeaders() },
|
|
294
|
+
legend: { enabled: false },
|
|
295
|
+
xAxis: [
|
|
296
|
+
timeAxis,
|
|
297
|
+
{ type: "datetime", linkedTo: 0, opposite: true, dateTimeLabelFormats: { hour: "%H", day: "%d.%m" } },
|
|
298
|
+
],
|
|
299
|
+
yAxis: {
|
|
300
|
+
categories,
|
|
301
|
+
reversed: true,
|
|
302
|
+
min: 0,
|
|
303
|
+
max: categories.length - 1,
|
|
304
|
+
title: { text: "" },
|
|
305
|
+
tickInterval: 1,
|
|
306
|
+
gridLineColor: "var(--ds-color-neutral-border-subtle)",
|
|
307
|
+
labels: {
|
|
308
|
+
useHTML: true,
|
|
309
|
+
step: 1,
|
|
310
|
+
style: { width: LABEL_WIDTH, whiteSpace: "nowrap", textOverflow: "clip" },
|
|
311
|
+
formatter(this: any) {
|
|
312
|
+
return getDeliveryLabel(plan, this.pos, readOnly);
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
tooltip: {
|
|
317
|
+
useHTML: true,
|
|
318
|
+
formatter(this: any) {
|
|
319
|
+
let row = rowsByKey.get(this.point.primKey);
|
|
320
|
+
return row ? deliveryTooltip(row) : false;
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
plotOptions: {
|
|
324
|
+
xrange: {
|
|
325
|
+
animation: false,
|
|
326
|
+
grouping: false,
|
|
327
|
+
groupPadding: 0.05,
|
|
328
|
+
pointPadding: 0,
|
|
329
|
+
borderRadius: 0,
|
|
330
|
+
colorByPoint: false,
|
|
331
|
+
dataLabels: {
|
|
332
|
+
enabled: true,
|
|
333
|
+
// The label runs past the end of a short bar, so it carries its own outline to read on
|
|
334
|
+
// the bar and on the background alike.
|
|
335
|
+
color: "var(--ds-color-neutral-text-default)",
|
|
336
|
+
align: "left",
|
|
337
|
+
y: 2,
|
|
338
|
+
style: {
|
|
339
|
+
fontWeight: "normal",
|
|
340
|
+
fontSize: "10px",
|
|
341
|
+
textOutline: "2px var(--ds-color-neutral-background-default)",
|
|
342
|
+
},
|
|
343
|
+
formatter(this: any) {
|
|
344
|
+
return `${getLocalizedString("Vehicle")} ${this.point.vehicleNo ?? ""}`;
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
dragDrop: {
|
|
348
|
+
draggableX: !readOnly,
|
|
349
|
+
draggableY: false,
|
|
350
|
+
draggableX1: false,
|
|
351
|
+
draggableX2: false,
|
|
352
|
+
dragPrecisionX: 5 * 60 * 1000,
|
|
353
|
+
liveRedraw: true,
|
|
354
|
+
},
|
|
355
|
+
point: {
|
|
356
|
+
events: {
|
|
357
|
+
dragStart(this: any) {
|
|
358
|
+
let row = rowsByKey.get(this.primKey);
|
|
359
|
+
if (!row) return false;
|
|
360
|
+
|
|
361
|
+
let offset = (value: Date | null) => (value ? value.getTime() - this.x : null);
|
|
362
|
+
this.dragOffsets = {
|
|
363
|
+
ProdFinishDateTime: offset(row.ProdFinishDateTime),
|
|
364
|
+
Arrival: offset(row.Arrival),
|
|
365
|
+
UnloadStart: offset(row.UnloadStart),
|
|
366
|
+
UnloadComplete: offset(row.UnloadComplete),
|
|
367
|
+
ReturnTime: offset(row.ReturnTime),
|
|
368
|
+
};
|
|
369
|
+
},
|
|
370
|
+
drag(this: any, event: any) {
|
|
371
|
+
if (!this.dragOffsets || !event.newPoint) return false;
|
|
372
|
+
|
|
373
|
+
// The tooltip follows the bar while it is dragged.
|
|
374
|
+
let row = rowsByKey.get(this.primKey) as PlannedDeliveryRecord;
|
|
375
|
+
let newX: number = event.newPoint.x;
|
|
376
|
+
row.ProdDateTime.setTime(newX);
|
|
377
|
+
for (let key of [
|
|
378
|
+
"ProdFinishDateTime",
|
|
379
|
+
"Arrival",
|
|
380
|
+
"UnloadStart",
|
|
381
|
+
"UnloadComplete",
|
|
382
|
+
"ReturnTime",
|
|
383
|
+
] as const) {
|
|
384
|
+
let offset = this.dragOffsets[key];
|
|
385
|
+
if (offset !== null) row[key]?.setTime(newX + offset);
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
drop(this: any, event: any) {
|
|
389
|
+
if (!this.dragOffsets || !event.newPoint) {
|
|
390
|
+
event.preventDefault?.();
|
|
391
|
+
return false;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
let row = rowsByKey.get(this.primKey) as PlannedDeliveryRecord;
|
|
395
|
+
onMove(row, new Date(event.newPoint.x));
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
series: { states: { inactive: { opacity: 1 } } },
|
|
401
|
+
} as Highcharts.PlotOptions,
|
|
402
|
+
series: [
|
|
403
|
+
{ type: "xrange", name: "Deliveries", data, cursor: readOnly ? undefined : "move" },
|
|
404
|
+
] as unknown as Highcharts.SeriesOptionsType[],
|
|
405
|
+
};
|
|
406
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { ProcedureAPI } from "@olenbetong/appframe-data";
|
|
2
|
+
|
|
3
|
+
export type PlantRecord = {
|
|
4
|
+
PlantID: number;
|
|
5
|
+
Description: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
/** Planned production volume in a quarter of an hour. `CutOff` is the middle of the quarter. */
|
|
9
|
+
export type ProdVolumeRecord = {
|
|
10
|
+
PlantID: number;
|
|
11
|
+
CutOff: Date;
|
|
12
|
+
CutOffStart: Date;
|
|
13
|
+
CutOffEnd: Date;
|
|
14
|
+
Qty: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** Vehicles out on a planned load at `CutOff`, every five minutes. */
|
|
18
|
+
export type VehicleCountRecord = {
|
|
19
|
+
PlantID: number;
|
|
20
|
+
CutOff: Date;
|
|
21
|
+
CutOffStart: Date;
|
|
22
|
+
CutOffEnd: Date;
|
|
23
|
+
VehicleCount: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type PlannedDeliveryRecord = {
|
|
27
|
+
PlantID: number;
|
|
28
|
+
CallOffID: number;
|
|
29
|
+
DeliveryStartDateTime: Date;
|
|
30
|
+
CustomerName: string | null;
|
|
31
|
+
BuildSite: string | null;
|
|
32
|
+
Qty: number;
|
|
33
|
+
Pump: number | null;
|
|
34
|
+
Pumping: boolean | null;
|
|
35
|
+
Telescopic: boolean | null;
|
|
36
|
+
ConveyorBelt: boolean | null;
|
|
37
|
+
VehicleID: number | null;
|
|
38
|
+
VehicleNo: number | null;
|
|
39
|
+
Driver: string | null;
|
|
40
|
+
LoadQty: number;
|
|
41
|
+
DeliveryTicketID: number | null;
|
|
42
|
+
DriveToSiteTime: number | null;
|
|
43
|
+
/** Minutes until the next load of the call-off, null on the last one. */
|
|
44
|
+
DeliveryInterval: number | null;
|
|
45
|
+
UnloadTime: number | null;
|
|
46
|
+
ProdDateTime: Date;
|
|
47
|
+
ProdFinishDateTime: Date | null;
|
|
48
|
+
Arrival: Date | null;
|
|
49
|
+
UnloadStart: Date | null;
|
|
50
|
+
UnloadComplete: Date | null;
|
|
51
|
+
ReturnTime: Date;
|
|
52
|
+
PrimKey: string;
|
|
53
|
+
LoadNo: number;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type CallOffWarningRecord = {
|
|
57
|
+
PlantID: number;
|
|
58
|
+
CallOffID: number;
|
|
59
|
+
WarningType: string;
|
|
60
|
+
WarningText: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type PlantsParams = {
|
|
64
|
+
PlantIDs: [number][];
|
|
65
|
+
Date: Date;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type ProdVolumeResult = {
|
|
69
|
+
Table: ProdVolumeRecord[];
|
|
70
|
+
Table1: PlantRecord[];
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type ProdPlanResult = {
|
|
74
|
+
Table: VehicleCountRecord[];
|
|
75
|
+
Table1: PlannedDeliveryRecord[];
|
|
76
|
+
Table2: Array<{ Unplanned: number }>;
|
|
77
|
+
Table3: PlantRecord[];
|
|
78
|
+
Table4: CallOffWarningRecord[];
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type CreateAutoPlanParams =
|
|
82
|
+
| { PlantID: number; Date: Date; DeleteExisting?: boolean }
|
|
83
|
+
| { CallOffID: number; DeleteExisting?: boolean };
|
|
84
|
+
|
|
85
|
+
export type CreateAutoVehiclesParams = {
|
|
86
|
+
PlantID: number;
|
|
87
|
+
Date: Date;
|
|
88
|
+
ResetExisting?: boolean;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type UpdatePlannedDeliveryParams = {
|
|
92
|
+
PrimKey: string;
|
|
93
|
+
DriveTime?: number | null;
|
|
94
|
+
Interval?: number | null;
|
|
95
|
+
UnloadTime?: number | null;
|
|
96
|
+
/** Wall clock time at the site, HH:mm. */
|
|
97
|
+
Arrival?: string | null;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export type MovePlannedDeliveryParams = {
|
|
101
|
+
PrimKey: string;
|
|
102
|
+
ProdDateTime: Date;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const TIMEOUT = 30000;
|
|
106
|
+
|
|
107
|
+
export const procProdVolume = new ProcedureAPI<PlantsParams, ProdVolumeResult>({
|
|
108
|
+
procedureId: "astp_Plant_CallOffs_Planning_ProdVolumeByQuarter",
|
|
109
|
+
parameters: [
|
|
110
|
+
{ name: "PlantIDs", type: "string", hasDefault: false, required: true },
|
|
111
|
+
{ name: "Date", type: "date", hasDefault: false, required: true },
|
|
112
|
+
{ name: "AddHoursStart", type: "number", hasDefault: true, required: false },
|
|
113
|
+
{ name: "AddHoursEnd", type: "number", hasDefault: true, required: false },
|
|
114
|
+
],
|
|
115
|
+
timeout: TIMEOUT,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export const procProdPlan = new ProcedureAPI<PlantsParams, ProdPlanResult>({
|
|
119
|
+
procedureId: "astp_Plant_CallOffs_Planning_ProdPlan",
|
|
120
|
+
parameters: [
|
|
121
|
+
{ name: "PlantIDs", type: "string", hasDefault: false, required: true },
|
|
122
|
+
{ name: "Date", type: "date", hasDefault: false, required: true },
|
|
123
|
+
],
|
|
124
|
+
timeout: TIMEOUT,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
export const procCreateAutoPlan = new ProcedureAPI<CreateAutoPlanParams, unknown>({
|
|
128
|
+
procedureId: "astp_Plant_CallOffs_Planning_CreateAutoPlan",
|
|
129
|
+
parameters: [
|
|
130
|
+
{ name: "PlantID", type: "number", hasDefault: true, required: false },
|
|
131
|
+
{ name: "Date", type: "date", hasDefault: true, required: false },
|
|
132
|
+
{ name: "CallOffID", type: "number", hasDefault: true, required: false },
|
|
133
|
+
{ name: "DeleteExisting", type: "boolean", hasDefault: true, required: false },
|
|
134
|
+
],
|
|
135
|
+
timeout: TIMEOUT,
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
export const procCreateAutoVehicles = new ProcedureAPI<CreateAutoVehiclesParams, unknown>({
|
|
139
|
+
procedureId: "astp_Plant_CallOffs_Planning_CreateAutoVehicles",
|
|
140
|
+
parameters: [
|
|
141
|
+
{ name: "PlantID", type: "number", hasDefault: false, required: true },
|
|
142
|
+
{ name: "Date", type: "date", hasDefault: false, required: true },
|
|
143
|
+
{ name: "CallOffID", type: "number", hasDefault: true, required: false },
|
|
144
|
+
{ name: "ResetExisting", type: "boolean", hasDefault: true, required: false },
|
|
145
|
+
],
|
|
146
|
+
timeout: TIMEOUT,
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
export const procUpdatePlannedDeliveryParam = new ProcedureAPI<UpdatePlannedDeliveryParams, unknown>({
|
|
150
|
+
procedureId: "astp_Plant_CallOffs_Planning_UpdatePlannedDeliveryParam",
|
|
151
|
+
parameters: [
|
|
152
|
+
{ name: "PrimKey", type: "string", hasDefault: false, required: true },
|
|
153
|
+
{ name: "DriveTime", type: "number", hasDefault: true, required: false },
|
|
154
|
+
{ name: "Interval", type: "number", hasDefault: true, required: false },
|
|
155
|
+
{ name: "UnloadTime", type: "number", hasDefault: true, required: false },
|
|
156
|
+
{ name: "Arrival", type: "string", hasDefault: true, required: false },
|
|
157
|
+
],
|
|
158
|
+
timeout: TIMEOUT,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
/** Moves a planned load in time, keeping its vehicle (the chart only drags along the time axis). */
|
|
162
|
+
export const procMovePlannedDelivery = new ProcedureAPI<MovePlannedDeliveryParams, unknown>({
|
|
163
|
+
procedureId: "astp_Plant_CallOffs_MovePlannedDelivery",
|
|
164
|
+
parameters: [
|
|
165
|
+
{ name: "PrimKey", type: "string", hasDefault: false, required: true },
|
|
166
|
+
{ name: "ProdDateTime", type: "date", hasDefault: false, required: true },
|
|
167
|
+
{ name: "VehicleID", type: "number", hasDefault: true, required: false },
|
|
168
|
+
],
|
|
169
|
+
timeout: TIMEOUT,
|
|
170
|
+
});
|