@burdenoff/microfe-movethewheels 2026.1102.2 → 2026.1107.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/dist/MoveTheWheelsRoot.js +148 -140
- package/dist/MoveTheWheelsRoutes.js +29 -25
- package/dist/generated/tracking-quality-operations.d.ts +467 -1
- package/dist/generated/wspace-types.d.ts +9779 -330
- package/dist/movethewheels/pages/ReportsPage.d.ts +1 -0
- package/dist/movethewheels/utils/reports.d.ts +132 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-chart-column-increasing.js +26 -0
- package/dist/pages/ReportsPage.js +721 -0
- package/dist/utils/reports.js +202 -0
- package/package.json +3 -2
- package/src/generated/tracking-quality-operations.ts +569 -1
- package/src/generated/wspace-types.ts +11263 -380
- package/src/movethewheels/MoveTheWheelsRoot.tsx +8 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
- package/src/movethewheels/pages/ReportsPage.tsx +999 -0
- package/src/movethewheels/utils/reports.ts +419 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
var e = 1e3, t = [
|
|
2
|
+
{
|
|
3
|
+
value: "OPERATIONS",
|
|
4
|
+
label: "Operations",
|
|
5
|
+
description: "Shipments booked in the period: status, lanes, on-time delivery and freight cost."
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
value: "FINANCE",
|
|
9
|
+
label: "Finance",
|
|
10
|
+
description: "Order revenue, delivered and outstanding amounts, and freight cost, per currency."
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
value: "FLEET",
|
|
14
|
+
label: "Fleet",
|
|
15
|
+
description: "Every vehicle with its orders, completed routes, distance, fuel cost and CO2e."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: "CUSTOMERS",
|
|
19
|
+
label: "Customers",
|
|
20
|
+
description: "Every customer with their orders, deliveries and revenue in the period."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: "INVENTORY",
|
|
24
|
+
label: "Inventory",
|
|
25
|
+
description: "Every stock line with its levels, value and movements in the period."
|
|
26
|
+
}
|
|
27
|
+
], n = [
|
|
28
|
+
{
|
|
29
|
+
value: "NONE",
|
|
30
|
+
label: "Only when I generate it"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: "DAILY",
|
|
34
|
+
label: "Every day"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: "WEEKLY",
|
|
38
|
+
label: "Every week"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: "MONTHLY",
|
|
42
|
+
label: "Every month"
|
|
43
|
+
}
|
|
44
|
+
], r = [
|
|
45
|
+
"Monday",
|
|
46
|
+
"Tuesday",
|
|
47
|
+
"Wednesday",
|
|
48
|
+
"Thursday",
|
|
49
|
+
"Friday",
|
|
50
|
+
"Saturday",
|
|
51
|
+
"Sunday"
|
|
52
|
+
], i = "\n id\n reportId\n reportType\n trigger\n status\n periodStart\n periodEnd\n rowCount\n truncated\n error\n durationMs\n startedAt\n finishedAt\n", a = `
|
|
53
|
+
id
|
|
54
|
+
name
|
|
55
|
+
description
|
|
56
|
+
type
|
|
57
|
+
periodDays
|
|
58
|
+
frequency
|
|
59
|
+
runHour
|
|
60
|
+
runWeekday
|
|
61
|
+
runMonthDay
|
|
62
|
+
timezone
|
|
63
|
+
isActive
|
|
64
|
+
nextRunAt
|
|
65
|
+
lastGeneratedAt
|
|
66
|
+
lastRunStatus
|
|
67
|
+
lastError
|
|
68
|
+
updatedAt
|
|
69
|
+
latestRun {
|
|
70
|
+
${i}
|
|
71
|
+
}
|
|
72
|
+
`, o = `
|
|
73
|
+
query MtwReports($pagination: PaginationInput) {
|
|
74
|
+
mtwReports(pagination: $pagination) {
|
|
75
|
+
${a}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
`, s = `
|
|
79
|
+
query MtwReportRuns($reportId: ID!, $pagination: PaginationInput) {
|
|
80
|
+
mtwReportRuns(reportId: $reportId, pagination: $pagination) {
|
|
81
|
+
${i}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
`, c = `
|
|
85
|
+
query MtwReportRun($id: ID!, $rows: PaginationInput) {
|
|
86
|
+
mtwReportRun(id: $id) {
|
|
87
|
+
${i}
|
|
88
|
+
metrics {
|
|
89
|
+
key
|
|
90
|
+
label
|
|
91
|
+
value
|
|
92
|
+
kind
|
|
93
|
+
currency
|
|
94
|
+
}
|
|
95
|
+
columns {
|
|
96
|
+
key
|
|
97
|
+
label
|
|
98
|
+
kind
|
|
99
|
+
}
|
|
100
|
+
rows(pagination: $rows)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
`, l = "\n query MtwReportRunExport($runId: ID!, $format: MtwReportFormat!) {\n mtwReportRunExport(runId: $runId, format: $format) {\n filename\n contentType\n content\n rowCount\n truncated\n }\n }\n", u = `
|
|
104
|
+
mutation CreateMtwReport($input: MtwCreateReportInput!) {
|
|
105
|
+
createMtwReport(input: $input) {
|
|
106
|
+
${a}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`, d = `
|
|
110
|
+
mutation UpdateMtwReport($id: ID!, $input: MtwUpdateReportInput!) {
|
|
111
|
+
updateMtwReport(id: $id, input: $input) {
|
|
112
|
+
${a}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`, f = "\n mutation DeleteMtwReport($id: ID!) {\n deleteMtwReport(id: $id)\n }\n", p = `
|
|
116
|
+
mutation GenerateMtwReport($id: ID!) {
|
|
117
|
+
generateMtwReport(id: $id) {
|
|
118
|
+
${i}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
`;
|
|
122
|
+
function m(e) {
|
|
123
|
+
return {
|
|
124
|
+
name: "",
|
|
125
|
+
type: "OPERATIONS",
|
|
126
|
+
description: "",
|
|
127
|
+
periodDays: 30,
|
|
128
|
+
frequency: "NONE",
|
|
129
|
+
runHour: 6,
|
|
130
|
+
runWeekday: 1,
|
|
131
|
+
runMonthDay: 1,
|
|
132
|
+
timezone: e,
|
|
133
|
+
isActive: !0
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function h(e) {
|
|
137
|
+
return {
|
|
138
|
+
name: e.name,
|
|
139
|
+
type: e.type,
|
|
140
|
+
description: e.description ?? "",
|
|
141
|
+
periodDays: e.periodDays,
|
|
142
|
+
frequency: e.frequency,
|
|
143
|
+
runHour: e.runHour,
|
|
144
|
+
runWeekday: e.runWeekday,
|
|
145
|
+
runMonthDay: e.runMonthDay,
|
|
146
|
+
timezone: e.timezone,
|
|
147
|
+
isActive: e.isActive
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function g(e) {
|
|
151
|
+
return e === "DAILY" ? 1 : e === "WEEKLY" ? 7 : 30;
|
|
152
|
+
}
|
|
153
|
+
function _(t) {
|
|
154
|
+
let n = t.name.trim();
|
|
155
|
+
return n ? n.length > 120 ? "The name can be at most 120 characters." : t.description.trim().length > 1e3 ? `The description can be at most ${e} characters.` : !Number.isInteger(t.periodDays) || t.periodDays < 1 || t.periodDays > 366 ? "The period must be a whole number of days from 1 to 366." : null : "Give the report a name.";
|
|
156
|
+
}
|
|
157
|
+
function v(e) {
|
|
158
|
+
return {
|
|
159
|
+
name: e.name.trim(),
|
|
160
|
+
type: e.type,
|
|
161
|
+
description: e.description.trim(),
|
|
162
|
+
periodDays: e.periodDays,
|
|
163
|
+
frequency: e.frequency,
|
|
164
|
+
runHour: e.runHour,
|
|
165
|
+
runWeekday: e.runWeekday,
|
|
166
|
+
runMonthDay: e.runMonthDay,
|
|
167
|
+
timezone: e.timezone,
|
|
168
|
+
isActive: e.isActive
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function y(e) {
|
|
172
|
+
return t.find((t) => t.value === e)?.label ?? e;
|
|
173
|
+
}
|
|
174
|
+
function b(e) {
|
|
175
|
+
return `${String(e).padStart(2, "0")}:00`;
|
|
176
|
+
}
|
|
177
|
+
function x(e) {
|
|
178
|
+
return `${e}${e % 10 == 1 && e !== 11 ? "st" : e % 10 == 2 && e !== 12 ? "nd" : e % 10 == 3 && e !== 13 ? "rd" : "th"}`;
|
|
179
|
+
}
|
|
180
|
+
function S(e) {
|
|
181
|
+
if (e.frequency === "NONE") return "On demand";
|
|
182
|
+
let t = e.timezone.replace(/_/g, " "), n = `at ${b(e.runHour)} (${t})`, i;
|
|
183
|
+
return i = e.frequency === "DAILY" ? `Every day ${n}` : e.frequency === "WEEKLY" ? `Every ${r[e.runWeekday - 1] ?? "week"} ${n}` : `On the ${x(e.runMonthDay)} of every month ${n}`, e.isActive ? i : `Paused · ${i}`;
|
|
184
|
+
}
|
|
185
|
+
function C(e, t) {
|
|
186
|
+
if (e.value === null || e.value === void 0) return "—";
|
|
187
|
+
switch (e.kind) {
|
|
188
|
+
case "PERCENT": return `${(e.value * 100).toFixed(1)}%`;
|
|
189
|
+
case "CURRENCY": return t.currency(e.value, e.currency ?? void 0);
|
|
190
|
+
case "DISTANCE": return t.distance(e.value);
|
|
191
|
+
case "WEIGHT": return t.weight(e.value);
|
|
192
|
+
default: return e.value.toLocaleString();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function w(e) {
|
|
196
|
+
return e.kind === "CURRENCY" && e.currency ? `${e.label} (${e.currency})` : e.label;
|
|
197
|
+
}
|
|
198
|
+
function T(e, t, n) {
|
|
199
|
+
return e == null || e === "" ? "—" : t.kind === "BOOLEAN" || typeof e == "boolean" ? e ? "Yes" : "No" : t.kind === "DATE" && typeof e == "string" ? n(e) : typeof e == "number" ? e.toLocaleString() : String(e);
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
export { u as CREATE_MTW_REPORT_MUTATION, f as DELETE_MTW_REPORT_MUTATION, n as FREQUENCY_OPTIONS, p as GENERATE_MTW_REPORT_MUTATION, o as MTW_REPORTS_QUERY, s as MTW_REPORT_RUNS_QUERY, l as MTW_REPORT_RUN_EXPORT_QUERY, c as MTW_REPORT_RUN_QUERY, t as REPORT_TYPE_OPTIONS, d as UPDATE_MTW_REPORT_MUTATION, r as WEEKDAY_LABELS, T as formatCell, C as formatMetric, w as metricLabel, m as newReportInput, _ as reportInputError, h as reportToInput, y as reportTypeLabel, S as scheduleSummary, g as suggestedPeriodDays, v as toServiceInput };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-movethewheels",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1107.2",
|
|
4
4
|
"description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
38
38
|
"type:check": "bash scripts/build-limits.sh tsc --noEmit",
|
|
39
39
|
"validate:schema-drift": "graphql-schema-drift",
|
|
40
|
-
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run codegen && bun run validate:schema-drift && bun run lint:sanity && bun run format && bun run type:check && bun run verify:live-logistics-contract && bun run verify:empty-reuse-retry && bun run verify:empty-reuse-recovery && bun run verify:trip-utilization-input && bun run verify:trip-draft-context && bun run verify:stock-binding-input && bun run verify:stock-observation-input && bun run verify:pending-pick-input && bun run verify:pick-review-ack && bun run verify:driver-license-expiry && bun run verify:tracking-alerts && bun run verify:freight-input && bun run verify:freight-recovery && bun run verify:freight-commercial && bun run verify:freight-invoice && bun run verify:procedure-input && bun run verify:consolidation && bun run verify:multimodal-single-attempt && bun run verify:workspace-predispatch && bun run verify:tracking-quality-outcomes && bun run verify:shipment-status-authority && bun run verify:free-time-permissions && bun run verify:core-codegen && bun run verify:order-vehicle-hold && bun run verify:pallet-preview && bun run verify:entity-export && bun run verify:entity-import && bun run verify:module-settings && bun run verify:carrier-integrations && bun run verify:driver-day && bun run verify:customer-notifications && bun run verify:consumed-fuel-preview && bun run build && bun run build-storybook'",
|
|
40
|
+
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run codegen && bun run validate:schema-drift && bun run lint:sanity && bun run format && bun run type:check && bun run verify:live-logistics-contract && bun run verify:empty-reuse-retry && bun run verify:empty-reuse-recovery && bun run verify:trip-utilization-input && bun run verify:trip-draft-context && bun run verify:stock-binding-input && bun run verify:stock-observation-input && bun run verify:pending-pick-input && bun run verify:pick-review-ack && bun run verify:driver-license-expiry && bun run verify:tracking-alerts && bun run verify:freight-input && bun run verify:freight-recovery && bun run verify:freight-commercial && bun run verify:freight-invoice && bun run verify:procedure-input && bun run verify:consolidation && bun run verify:multimodal-single-attempt && bun run verify:workspace-predispatch && bun run verify:tracking-quality-outcomes && bun run verify:shipment-status-authority && bun run verify:free-time-permissions && bun run verify:core-codegen && bun run verify:order-vehicle-hold && bun run verify:pallet-preview && bun run verify:entity-export && bun run verify:entity-import && bun run verify:module-settings && bun run verify:reports && bun run verify:carrier-integrations && bun run verify:driver-day && bun run verify:customer-notifications && bun run verify:consumed-fuel-preview && bun run build && bun run build-storybook'",
|
|
41
41
|
"storybook": "storybook dev -p 6006",
|
|
42
42
|
"build-storybook": "storybook build",
|
|
43
43
|
"test:storybook": "vitest run --project=storybook",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"verify:driver-day": "bun test scripts/verify-driver-day.test.ts && bun scripts/verify-acknowledged-pending-delivery.mjs",
|
|
79
79
|
"verify:carrier-integrations": "bun test scripts/check-carrier-integrations.test.ts",
|
|
80
80
|
"verify:customer-notifications": "bun test scripts/check-customer-notifications.test.ts",
|
|
81
|
+
"verify:reports": "bun test scripts/check-reports.test.ts",
|
|
81
82
|
"verify:pallet-preview": "bun test scripts/check-pallet-preview.test.ts && bun scripts/verify-pallet-preview-hook.mjs",
|
|
82
83
|
"verify:consumed-fuel-preview": "bun test scripts/check-consumed-fuel-preview.test.ts && bun scripts/verify-consumed-fuel-preview-hook.mjs && bun scripts/verify-consumed-fuel-preview-component.mjs"
|
|
83
84
|
},
|