@burdenoff/microfe-movethewheels 2026.1031.3 → 2026.1031.5

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.
Files changed (63) hide show
  1. package/dist/MoveTheWheelsRoot.js +136 -127
  2. package/dist/MoveTheWheelsRoutes.js +143 -135
  3. package/dist/components/DocumentsCard.js +11 -11
  4. package/dist/components/ProofOfDeliveryCard.js +13 -13
  5. package/dist/components/ShipmentRiskDialog.js +24 -24
  6. package/dist/components/ShippingQuoteResults.js +46 -46
  7. package/dist/components/TrackingAlertList.js +17 -17
  8. package/dist/generated/tracking-quality-operations.d.ts +56 -0
  9. package/dist/hooks/useOrderDispatch.js +17 -17
  10. package/dist/movethewheels/pages/SettingsPage.d.ts +1 -0
  11. package/dist/movethewheels/providers/ModuleSettingsProvider.d.ts +17 -0
  12. package/dist/movethewheels/utils/formatters.d.ts +23 -3
  13. package/dist/movethewheels/utils/moduleSettings.d.ts +52 -0
  14. package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +11 -0
  15. package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +14 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +22 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +11 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
  19. package/dist/pages/AnalyticsPage.js +27 -27
  20. package/dist/pages/CreateOrderPage.js +340 -317
  21. package/dist/pages/CustomerDetailsPage.js +246 -246
  22. package/dist/pages/CustomersPage.js +19 -19
  23. package/dist/pages/DashboardPage.js +24 -24
  24. package/dist/pages/DeliveryCapturePage.js +74 -74
  25. package/dist/pages/DriverDetailsPage.js +337 -337
  26. package/dist/pages/DriversPage.js +26 -26
  27. package/dist/pages/FinancePage.js +26 -26
  28. package/dist/pages/InventoryPage.js +28 -28
  29. package/dist/pages/LiveTrackingPage.js +108 -108
  30. package/dist/pages/MarketplacePage.js +44 -44
  31. package/dist/pages/OrderDetailsPage.js +306 -306
  32. package/dist/pages/OrdersListPage.js +27 -27
  33. package/dist/pages/ProductDetailsPage.js +89 -89
  34. package/dist/pages/ProductsPage.js +73 -73
  35. package/dist/pages/RouteDetailsPage.js +282 -285
  36. package/dist/pages/RoutesPage.js +78 -78
  37. package/dist/pages/SettingsPage.js +459 -0
  38. package/dist/pages/TrackingPage.js +41 -41
  39. package/dist/pages/VehicleDetailsPage.js +207 -207
  40. package/dist/pages/VehiclesPage.js +17 -16
  41. package/dist/pages/WarehouseDetailsPage.js +132 -132
  42. package/dist/providers/ModuleSettingsProvider.js +74 -0
  43. package/dist/utils/formatters.js +53 -26
  44. package/dist/utils/moduleSettings.js +132 -0
  45. package/package.json +3 -2
  46. package/src/generated/tracking-quality-operations.ts +62 -0
  47. package/src/movethewheels/MoveTheWheelsRoot.tsx +18 -5
  48. package/src/movethewheels/MoveTheWheelsRoutes.tsx +19 -4
  49. package/src/movethewheels/pages/CreateOrderPage.tsx +38 -6
  50. package/src/movethewheels/pages/ProductsPage.tsx +2 -2
  51. package/src/movethewheels/pages/RouteDetailsPage.tsx +3 -6
  52. package/src/movethewheels/pages/RoutesPage.tsx +2 -2
  53. package/src/movethewheels/pages/SettingsPage.tsx +516 -0
  54. package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -2
  55. package/src/movethewheels/pages/VehiclesPage.tsx +2 -1
  56. package/src/movethewheels/providers/ModuleSettingsProvider.tsx +133 -0
  57. package/src/movethewheels/utils/formatters.ts +69 -10
  58. package/src/movethewheels/utils/moduleSettings.ts +224 -0
  59. package/dist/movethewheels/pages/AIAssistantPage.d.ts +0 -22
  60. package/dist/node_modules/lucide-react/dist/esm/icons/message-circle.js +0 -8
  61. package/dist/node_modules/lucide-react/dist/esm/icons/wallet.js +0 -11
  62. package/dist/pages/AIAssistantPage.js +0 -81
  63. package/src/movethewheels/pages/AIAssistantPage.tsx +0 -123
@@ -1,6 +1,6 @@
1
- import { formatSlip as e, riskSignalLabel as t } from "../utils/trackingAlerts.js";
2
- import { Badge as n, Button as r, Dialog as i, DialogContent as a, DialogDescription as o, DialogHeader as s, DialogTitle as c, Skeleton as l, Textarea as u } from "./ui.js";
3
- import { formatDateTime as d } from "../utils/formatters.js";
1
+ import { formatDateTime as e } from "../utils/formatters.js";
2
+ import { formatSlip as t, riskSignalLabel as n } from "../utils/trackingAlerts.js";
3
+ import { Badge as r, Button as i, Dialog as a, DialogContent as o, DialogDescription as s, DialogHeader as c, DialogTitle as l, Skeleton as u, Textarea as d } from "./ui.js";
4
4
  import { useShipmentRisk as f } from "../hooks/useShipmentRisk.js";
5
5
  import { useEffect as p, useState as m } from "react";
6
6
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
@@ -44,8 +44,8 @@ var _ = {
44
44
  fallback: "Reassign the vehicle on this order"
45
45
  }
46
46
  };
47
- function y(t, n) {
48
- return t.ratio === null ? t.minutes !== null && t.minutes > 0 ? e(t.minutes) : null : `${Math.round(t.ratio * 100)}% ${n("movethewheels.risk.lateRate", "late recently")}`;
47
+ function y(e, n) {
48
+ return e.ratio === null ? e.minutes !== null && e.minutes > 0 ? t(e.minutes) : null : `${Math.round(e.ratio * 100)}% ${n("movethewheels.risk.lateRate", "late recently")}`;
49
49
  }
50
50
  function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, onOpenOrder: T, onChanged: E }) {
51
51
  let { forecast: D, shipment: O, isLoading: k, error: A, refetch: j, repromise: M, recordTrackingUpdate: N } = f(S ? b : void 0), [P, F] = m(null), [I, L] = m(null), [R, z] = m(!1), [B, V] = m("");
@@ -62,17 +62,17 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
62
62
  z(!1);
63
63
  }
64
64
  }, U = D?.predictedDeliveryLatest ?? D?.predictedDeliveryEarliest, W = O?.deliveryJobId ?? null;
65
- return /* @__PURE__ */ h(i, {
65
+ return /* @__PURE__ */ h(a, {
66
66
  open: S,
67
67
  onOpenChange: C,
68
- children: /* @__PURE__ */ g(a, {
68
+ children: /* @__PURE__ */ g(o, {
69
69
  className: "max-w-lg",
70
70
  children: [
71
- /* @__PURE__ */ g(s, { children: [/* @__PURE__ */ g(c, { children: [w("movethewheels.risk.title", "Delivery risk"), x ? ` · ${x}` : ""] }), /* @__PURE__ */ h(o, { children: w("movethewheels.risk.description", "Forecast from this shipment’s legs, route, tracking, vehicle and carrier history.") })] }),
71
+ /* @__PURE__ */ g(c, { children: [/* @__PURE__ */ g(l, { children: [w("movethewheels.risk.title", "Delivery risk"), x ? ` · ${x}` : ""] }), /* @__PURE__ */ h(s, { children: w("movethewheels.risk.description", "Forecast from this shipment’s legs, route, tracking, vehicle and carrier history.") })] }),
72
72
  k && !D && /* @__PURE__ */ g("div", {
73
73
  className: "space-y-2",
74
74
  "aria-busy": "true",
75
- children: [/* @__PURE__ */ h(l, { className: "h-6 w-1/2" }), /* @__PURE__ */ h(l, { className: "h-16 w-full" })]
75
+ children: [/* @__PURE__ */ h(u, { className: "h-6 w-1/2" }), /* @__PURE__ */ h(u, { className: "h-16 w-full" })]
76
76
  }),
77
77
  A && !k && /* @__PURE__ */ g("div", {
78
78
  role: "alert",
@@ -80,7 +80,7 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
80
80
  children: [/* @__PURE__ */ h("p", {
81
81
  className: "text-status-error-text",
82
82
  children: A.message
83
- }), /* @__PURE__ */ h(r, {
83
+ }), /* @__PURE__ */ h(i, {
84
84
  size: "sm",
85
85
  variant: "outline",
86
86
  onClick: j,
@@ -94,7 +94,7 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
94
94
  /* @__PURE__ */ g("div", {
95
95
  className: "flex flex-wrap items-center gap-2",
96
96
  children: [
97
- /* @__PURE__ */ h(n, {
97
+ /* @__PURE__ */ h(r, {
98
98
  variant: D.riskLevel === "HIGH" ? "destructive" : "secondary",
99
99
  children: w(_[D.riskLevel].key, _[D.riskLevel].fallback)
100
100
  }),
@@ -110,7 +110,7 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
110
110
  })
111
111
  ]
112
112
  }),
113
- D.breached && /* @__PURE__ */ h(n, {
113
+ D.breached && /* @__PURE__ */ h(r, {
114
114
  variant: "destructive",
115
115
  children: w("movethewheels.risk.breached", "Promise missed")
116
116
  })
@@ -121,14 +121,14 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
121
121
  children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
122
122
  className: "text-xs text-text-secondary",
123
123
  children: w("movethewheels.alerts.promised", "Promised")
124
- }), /* @__PURE__ */ h("dd", { children: D.promisedDelivery ? d(D.promisedDelivery) : w("movethewheels.risk.noPromise", "No promised time") })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
124
+ }), /* @__PURE__ */ h("dd", { children: D.promisedDelivery ? e(D.promisedDelivery) : w("movethewheels.risk.noPromise", "No promised time") })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
125
125
  className: "text-xs text-text-secondary",
126
126
  children: w("movethewheels.risk.window", "Predicted window")
127
- }), /* @__PURE__ */ g("dd", { children: [D.predictedDeliveryEarliest ? `${d(D.predictedDeliveryEarliest)}${D.predictedDeliveryLatest && D.predictedDeliveryLatest !== D.predictedDeliveryEarliest ? ` – ${d(D.predictedDeliveryLatest)}` : ""}` : w("movethewheels.risk.noPrediction", "Not enough data to predict"), D.predictedSlipMinutes > 0 && /* @__PURE__ */ g("span", {
127
+ }), /* @__PURE__ */ g("dd", { children: [D.predictedDeliveryEarliest ? `${e(D.predictedDeliveryEarliest)}${D.predictedDeliveryLatest && D.predictedDeliveryLatest !== D.predictedDeliveryEarliest ? ` – ${e(D.predictedDeliveryLatest)}` : ""}` : w("movethewheels.risk.noPrediction", "Not enough data to predict"), D.predictedSlipMinutes > 0 && /* @__PURE__ */ g("span", {
128
128
  className: "ml-1 text-status-error-text",
129
129
  children: [
130
130
  "(+",
131
- e(D.predictedSlipMinutes),
131
+ t(D.predictedSlipMinutes),
132
132
  ")"
133
133
  ]
134
134
  })] })] })]
@@ -139,12 +139,12 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
139
139
  }), D.signals.length > 0 ? /* @__PURE__ */ h("ul", {
140
140
  className: "space-y-1",
141
141
  children: D.signals.map((e) => {
142
- let n = y(e, w);
142
+ let t = y(e, w);
143
143
  return /* @__PURE__ */ g("li", {
144
144
  className: "flex items-center justify-between rounded border border-border-primary px-2 py-1",
145
- children: [/* @__PURE__ */ g("span", { children: [t(e.code, w), n && /* @__PURE__ */ g("span", {
145
+ children: [/* @__PURE__ */ g("span", { children: [n(e.code, w), t && /* @__PURE__ */ g("span", {
146
146
  className: "ml-1 text-text-secondary",
147
- children: ["· ", n]
147
+ children: ["· ", t]
148
148
  })] }), /* @__PURE__ */ g("span", {
149
149
  className: "text-xs text-text-secondary",
150
150
  children: ["+", e.weight]
@@ -166,7 +166,7 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
166
166
  className: "font-medium",
167
167
  children: w(v[D.recommendedAction].key, v[D.recommendedAction].fallback)
168
168
  }),
169
- D.recommendedAction === "REPROMISE_DELIVERY" && U && /* @__PURE__ */ g(r, {
169
+ D.recommendedAction === "REPROMISE_DELIVERY" && U && /* @__PURE__ */ g(i, {
170
170
  size: "sm",
171
171
  className: "mt-2",
172
172
  disabled: R,
@@ -174,25 +174,25 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
174
174
  children: [
175
175
  w("movethewheels.risk.repromiseTo", "Re-promise to"),
176
176
  " ",
177
- d(U)
177
+ e(U)
178
178
  ]
179
179
  }),
180
180
  D.recommendedAction === "REQUEST_TRACKING_UPDATE" && /* @__PURE__ */ g("div", {
181
181
  className: "mt-2 space-y-2",
182
- children: [/* @__PURE__ */ h(u, {
182
+ children: [/* @__PURE__ */ h(d, {
183
183
  value: B,
184
184
  onChange: (e) => V(e.target.value),
185
185
  maxLength: 500,
186
186
  "aria-label": w("movethewheels.risk.updateDetails", "Tracking update"),
187
187
  placeholder: w("movethewheels.risk.updatePlaceholder", "What did the driver or carrier report?")
188
- }), /* @__PURE__ */ h(r, {
188
+ }), /* @__PURE__ */ h(i, {
189
189
  size: "sm",
190
190
  disabled: R || B.trim().length === 0,
191
191
  onClick: () => void H(() => N(B.trim()), w("movethewheels.risk.updateRecorded", "Tracking update recorded")),
192
192
  children: w("movethewheels.risk.recordUpdate", "Record tracking update")
193
193
  })]
194
194
  }),
195
- D.recommendedAction === "REASSIGN_VEHICLE" && W && /* @__PURE__ */ h(r, {
195
+ D.recommendedAction === "REASSIGN_VEHICLE" && W && /* @__PURE__ */ h(i, {
196
196
  size: "sm",
197
197
  className: "mt-2",
198
198
  onClick: () => T(W),
@@ -215,7 +215,7 @@ function b({ shipmentId: b, shipmentNumber: x, open: S, onOpenChange: C, t: w, o
215
215
  children: [
216
216
  w("movethewheels.risk.evaluated", "Evaluated"),
217
217
  " ",
218
- d(D.evaluatedAt)
218
+ e(D.evaluatedAt)
219
219
  ]
220
220
  })
221
221
  ]
@@ -1,8 +1,8 @@
1
1
  import { TriangleAlert as e } from "../node_modules/lucide-react/dist/esm/icons/triangle-alert.js";
2
2
  import { Truck as t } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
3
- import { Card as n, CardContent as r, CardHeader as i, CardTitle as a, Table as o, TableBody as s, TableCell as c, TableHead as l, TableHeader as u, TableRow as d } from "./ui.js";
4
- import { StatusBadge as f } from "./StatusBadge.js";
5
- import { formatCurrency as p } from "../utils/formatters.js";
3
+ import { formatCurrency as n } from "../utils/formatters.js";
4
+ import { Card as r, CardContent as i, CardHeader as a, CardTitle as o, Table as s, TableBody as c, TableCell as l, TableHead as u, TableHeader as d, TableRow as f } from "./ui.js";
5
+ import { StatusBadge as p } from "./StatusBadge.js";
6
6
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
7
7
  //#region src/movethewheels/components/ShippingQuoteResults.tsx
8
8
  var _ = {
@@ -22,19 +22,19 @@ function b(e, t) {
22
22
  }
23
23
  function x({ quote: e, t }) {
24
24
  return /* @__PURE__ */ g(m, { children: [
25
- e.isCheapest && /* @__PURE__ */ h(f, {
25
+ e.isCheapest && /* @__PURE__ */ h(p, {
26
26
  status: t("movethewheels.shipping.results.cheapest", "Cheapest"),
27
27
  customColors: _,
28
28
  size: "sm",
29
29
  showDot: !1
30
30
  }),
31
- e.isFastest && /* @__PURE__ */ h(f, {
31
+ e.isFastest && /* @__PURE__ */ h(p, {
32
32
  status: t("movethewheels.shipping.results.fastest", "Fastest"),
33
33
  customColors: v,
34
34
  size: "sm",
35
35
  showDot: !1
36
36
  }),
37
- e.isRecommended && /* @__PURE__ */ h(f, {
37
+ e.isRecommended && /* @__PURE__ */ h(p, {
38
38
  status: t("movethewheels.shipping.results.recommended", "Recommended"),
39
39
  customColors: v,
40
40
  size: "sm",
@@ -42,52 +42,52 @@ function x({ quote: e, t }) {
42
42
  })
43
43
  ] });
44
44
  }
45
- function S({ estimate: e, t: o }) {
46
- let s = e.savingsVsCheapestCourier;
47
- return /* @__PURE__ */ g(n, { children: [/* @__PURE__ */ h(i, { children: /* @__PURE__ */ g(a, {
45
+ function S({ estimate: e, t: s }) {
46
+ let c = e.savingsVsCheapestCourier;
47
+ return /* @__PURE__ */ g(r, { children: [/* @__PURE__ */ h(a, { children: /* @__PURE__ */ g(o, {
48
48
  className: "flex items-center gap-2",
49
49
  children: [
50
50
  /* @__PURE__ */ h(t, {
51
51
  size: 18,
52
52
  "aria-hidden": "true"
53
53
  }),
54
- o("movethewheels.shipping.ownFleet.title", "Your own vehicle"),
55
- /* @__PURE__ */ h(f, {
56
- status: o("movethewheels.shipping.ownFleet.estimate", "Your estimate"),
54
+ s("movethewheels.shipping.ownFleet.title", "Your own vehicle"),
55
+ /* @__PURE__ */ h(p, {
56
+ status: s("movethewheels.shipping.ownFleet.estimate", "Your estimate"),
57
57
  customColors: v,
58
58
  size: "sm",
59
59
  showDot: !1
60
60
  })
61
61
  ]
62
- }) }), /* @__PURE__ */ g(r, {
62
+ }) }), /* @__PURE__ */ g(i, {
63
63
  className: "space-y-2",
64
64
  children: [
65
65
  /* @__PURE__ */ h("p", {
66
66
  className: "text-2xl font-semibold",
67
- children: p(e.cost, e.currency)
67
+ children: n(e.cost, e.currency)
68
68
  }),
69
69
  /* @__PURE__ */ g("p", {
70
70
  className: "text-sm text-text-secondary",
71
71
  children: [
72
72
  e.distanceKm,
73
73
  " km × ",
74
- p(e.costPerKm, e.currency),
74
+ n(e.costPerKm, e.currency),
75
75
  "/km",
76
- e.fixedCost > 0 && ` + ${p(e.fixedCost, e.currency)}`
76
+ e.fixedCost > 0 && ` + ${n(e.fixedCost, e.currency)}`
77
77
  ]
78
78
  }),
79
- s !== null && /* @__PURE__ */ h("p", {
79
+ c !== null && /* @__PURE__ */ h("p", {
80
80
  className: `text-sm font-medium ${e.isCheaperThanCouriers ? "text-status-success-text" : "text-status-warning-text"}`,
81
- children: e.isCheaperThanCouriers ? `${o("movethewheels.shipping.ownFleet.cheaper", "Your own vehicle is cheaper than the cheapest courier by")} ${p(s, e.currency)}` : s === 0 ? o("movethewheels.shipping.ownFleet.same", "Same cost as the cheapest courier") : `${o("movethewheels.shipping.ownFleet.dearer", "The cheapest courier is cheaper by")} ${p(-s, e.currency)}`
81
+ children: e.isCheaperThanCouriers ? `${s("movethewheels.shipping.ownFleet.cheaper", "Your own vehicle is cheaper than the cheapest courier by")} ${n(c, e.currency)}` : c === 0 ? s("movethewheels.shipping.ownFleet.same", "Same cost as the cheapest courier") : `${s("movethewheels.shipping.ownFleet.dearer", "The cheapest courier is cheaper by")} ${n(-c, e.currency)}`
82
82
  }),
83
83
  /* @__PURE__ */ h("p", {
84
84
  className: "text-xs text-text-secondary",
85
- children: o("movethewheels.shipping.ownFleet.note", "Based only on the distance and cost per km you entered — not a quote.")
85
+ children: s("movethewheels.shipping.ownFleet.note", "Based only on the distance and cost per km you entered — not a quote.")
86
86
  })
87
87
  ]
88
88
  })] });
89
89
  }
90
- function C({ result: t, t: f }) {
90
+ function C({ result: t, t: p }) {
91
91
  let _ = t.providers.filter((e) => !e.ok);
92
92
  return /* @__PURE__ */ g("div", {
93
93
  className: "space-y-4",
@@ -103,29 +103,29 @@ function C({ result: t, t: f }) {
103
103
  }, t.provider)),
104
104
  t.ownFleet && /* @__PURE__ */ h(S, {
105
105
  estimate: t.ownFleet,
106
- t: f
106
+ t: p
107
107
  }),
108
- /* @__PURE__ */ g(n, { children: [/* @__PURE__ */ g(i, { children: [/* @__PURE__ */ g(a, { children: [
109
- f("movethewheels.shipping.results.title", "Courier options"),
108
+ /* @__PURE__ */ g(r, { children: [/* @__PURE__ */ g(a, { children: [/* @__PURE__ */ g(o, { children: [
109
+ p("movethewheels.shipping.results.title", "Courier options"),
110
110
  " (",
111
111
  t.quotes.length,
112
112
  ")"
113
113
  ] }), /* @__PURE__ */ g("p", {
114
114
  className: "text-sm text-text-secondary",
115
115
  children: [
116
- f("movethewheels.shipping.results.chargeableWeight", "Charged on"),
116
+ p("movethewheels.shipping.results.chargeableWeight", "Charged on"),
117
117
  " ",
118
118
  t.chargeableWeightKg,
119
119
  " kg"
120
120
  ]
121
- })] }), /* @__PURE__ */ h(r, {
121
+ })] }), /* @__PURE__ */ h(i, {
122
122
  className: "p-0",
123
123
  children: t.quotes.length === 0 ? /* @__PURE__ */ h("p", {
124
124
  className: "px-6 pb-6 text-sm text-text-secondary",
125
- children: _.length > 0 ? f("movethewheels.shipping.results.allFailed", "No rates could be fetched — see the message above.") : f("movethewheels.shipping.results.noServiceable", "No courier serves this pincode pair.")
125
+ children: _.length > 0 ? p("movethewheels.shipping.results.allFailed", "No rates could be fetched — see the message above.") : p("movethewheels.shipping.results.noServiceable", "No courier serves this pincode pair.")
126
126
  }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("ul", {
127
127
  className: "divide-y md:hidden",
128
- "aria-label": f("movethewheels.shipping.results.title", "Courier options"),
128
+ "aria-label": p("movethewheels.shipping.results.title", "Courier options"),
129
129
  children: t.quotes.map((e) => /* @__PURE__ */ g("li", {
130
130
  className: "space-y-2 px-4 py-4",
131
131
  children: [
@@ -136,21 +136,21 @@ function C({ result: t, t: f }) {
136
136
  children: e.courierName
137
137
  }), /* @__PURE__ */ h("span", {
138
138
  className: "shrink-0 text-lg font-semibold",
139
- children: p(e.price, e.currency)
139
+ children: n(e.price, e.currency)
140
140
  })]
141
141
  }),
142
142
  /* @__PURE__ */ h("div", {
143
143
  className: "flex flex-wrap items-center gap-2",
144
144
  children: /* @__PURE__ */ h(x, {
145
145
  quote: e,
146
- t: f
146
+ t: p
147
147
  })
148
148
  }),
149
149
  /* @__PURE__ */ h("p", {
150
150
  className: "text-sm text-text-secondary",
151
151
  children: [
152
- b(e, f),
153
- y(e, f),
152
+ b(e, p),
153
+ y(e, p),
154
154
  e.rating === null ? null : `${e.rating.toFixed(1)} ★`
155
155
  ].filter((e) => e !== "—" && e !== null).join(" · ")
156
156
  })
@@ -158,32 +158,32 @@ function C({ result: t, t: f }) {
158
158
  }, `${e.provider}:${e.courierId}`))
159
159
  }), /* @__PURE__ */ h("div", {
160
160
  className: "hidden md:block",
161
- children: /* @__PURE__ */ g(o, { children: [/* @__PURE__ */ h(u, { children: /* @__PURE__ */ g(d, { children: [
162
- /* @__PURE__ */ h(l, { children: f("movethewheels.shipping.results.courier", "Courier") }),
163
- /* @__PURE__ */ h(l, { children: f("movethewheels.shipping.results.mode", "Mode") }),
164
- /* @__PURE__ */ h(l, { children: f("movethewheels.shipping.results.transit", "Estimated delivery") }),
165
- /* @__PURE__ */ h(l, { children: f("movethewheels.shipping.results.rating", "Rating") }),
166
- /* @__PURE__ */ h(l, {
161
+ children: /* @__PURE__ */ g(s, { children: [/* @__PURE__ */ h(d, { children: /* @__PURE__ */ g(f, { children: [
162
+ /* @__PURE__ */ h(u, { children: p("movethewheels.shipping.results.courier", "Courier") }),
163
+ /* @__PURE__ */ h(u, { children: p("movethewheels.shipping.results.mode", "Mode") }),
164
+ /* @__PURE__ */ h(u, { children: p("movethewheels.shipping.results.transit", "Estimated delivery") }),
165
+ /* @__PURE__ */ h(u, { children: p("movethewheels.shipping.results.rating", "Rating") }),
166
+ /* @__PURE__ */ h(u, {
167
167
  className: "text-right",
168
- children: f("movethewheels.shipping.results.price", "Price")
168
+ children: p("movethewheels.shipping.results.price", "Price")
169
169
  })
170
- ] }) }), /* @__PURE__ */ h(s, { children: t.quotes.map((e) => /* @__PURE__ */ g(d, { children: [
171
- /* @__PURE__ */ h(c, { children: /* @__PURE__ */ g("div", {
170
+ ] }) }), /* @__PURE__ */ h(c, { children: t.quotes.map((e) => /* @__PURE__ */ g(f, { children: [
171
+ /* @__PURE__ */ h(l, { children: /* @__PURE__ */ g("div", {
172
172
  className: "flex flex-wrap items-center gap-2",
173
173
  children: [/* @__PURE__ */ h("span", {
174
174
  className: "font-medium",
175
175
  children: e.courierName
176
176
  }), /* @__PURE__ */ h(x, {
177
177
  quote: e,
178
- t: f
178
+ t: p
179
179
  })]
180
180
  }) }),
181
- /* @__PURE__ */ h(c, { children: b(e, f) }),
182
- /* @__PURE__ */ h(c, { children: y(e, f) }),
183
- /* @__PURE__ */ h(c, { children: e.rating === null ? "—" : e.rating.toFixed(1) }),
184
- /* @__PURE__ */ h(c, {
181
+ /* @__PURE__ */ h(l, { children: b(e, p) }),
182
+ /* @__PURE__ */ h(l, { children: y(e, p) }),
183
+ /* @__PURE__ */ h(l, { children: e.rating === null ? "—" : e.rating.toFixed(1) }),
184
+ /* @__PURE__ */ h(l, {
185
185
  className: "text-right font-medium",
186
- children: p(e.price, e.currency)
186
+ children: n(e.price, e.currency)
187
187
  })
188
188
  ] }, `${e.provider}:${e.courierId}`)) })] })
189
189
  })] })
@@ -1,9 +1,9 @@
1
1
  import { CircleCheck as e } from "../node_modules/lucide-react/dist/esm/icons/circle-check.js";
2
2
  import { Clock as t } from "../node_modules/lucide-react/dist/esm/icons/clock.js";
3
3
  import { Gauge as n } from "../node_modules/lucide-react/dist/esm/icons/gauge.js";
4
- import { formatSlip as r, predictedSlipMinutes as i, riskSignalLabel as a } from "../utils/trackingAlerts.js";
5
- import { Badge as o, Button as s } from "./ui.js";
6
- import { formatDateTime as c } from "../utils/formatters.js";
4
+ import { formatDateTime as r } from "../utils/formatters.js";
5
+ import { formatSlip as i, predictedSlipMinutes as a, riskSignalLabel as o } from "../utils/trackingAlerts.js";
6
+ import { Badge as s, Button as c } from "./ui.js";
7
7
  import { ShipmentRiskDialog as l } from "./ShipmentRiskDialog.js";
8
8
  import { useState as u } from "react";
9
9
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
@@ -16,14 +16,14 @@ var m = {
16
16
  };
17
17
  function h({ alert: e, t }) {
18
18
  let n = e.severity === "high" || e.severity === "critical", r = e.kind === "AT_RISK" ? t("movethewheels.alerts.kind.atRisk", "At risk") : t("movethewheels.alerts.kind.delayed", "Delayed");
19
- return /* @__PURE__ */ p(o, {
19
+ return /* @__PURE__ */ p(s, {
20
20
  variant: n ? "destructive" : "secondary",
21
21
  className: "shrink-0",
22
22
  children: [r, e.kind === "AT_RISK" && typeof e.riskScore == "number" ? ` · ${e.riskScore}` : ""]
23
23
  });
24
24
  }
25
- function g({ alert: e, t: a }) {
26
- let o = i(e);
25
+ function g({ alert: e, t: o }) {
26
+ let s = a(e);
27
27
  return !e.promisedDelivery && !e.predictedDelivery ? null : /* @__PURE__ */ p("dl", {
28
28
  className: "mt-2 grid grid-cols-1 gap-x-4 gap-y-1 text-xs text-text-secondary sm:grid-cols-2",
29
29
  children: [e.promisedDelivery && /* @__PURE__ */ p("div", {
@@ -33,10 +33,10 @@ function g({ alert: e, t: a }) {
33
33
  size: 12,
34
34
  "aria-hidden": "true"
35
35
  }),
36
- /* @__PURE__ */ p("dt", { children: [a("movethewheels.alerts.promised", "Promised"), ":"] }),
36
+ /* @__PURE__ */ p("dt", { children: [o("movethewheels.alerts.promised", "Promised"), ":"] }),
37
37
  /* @__PURE__ */ f("dd", {
38
38
  className: "text-text-primary",
39
- children: c(e.promisedDelivery)
39
+ children: r(e.promisedDelivery)
40
40
  })
41
41
  ]
42
42
  }), e.predictedDelivery && /* @__PURE__ */ p("div", {
@@ -46,14 +46,14 @@ function g({ alert: e, t: a }) {
46
46
  size: 12,
47
47
  "aria-hidden": "true"
48
48
  }),
49
- /* @__PURE__ */ p("dt", { children: [a("movethewheels.alerts.predicted", "Predicted"), ":"] }),
49
+ /* @__PURE__ */ p("dt", { children: [o("movethewheels.alerts.predicted", "Predicted"), ":"] }),
50
50
  /* @__PURE__ */ p("dd", {
51
51
  className: "text-text-primary",
52
- children: [c(e.predictedDelivery), o !== null && /* @__PURE__ */ p("span", {
52
+ children: [r(e.predictedDelivery), s !== null && /* @__PURE__ */ p("span", {
53
53
  className: "ml-1 text-status-error-text",
54
54
  children: [
55
55
  "(+",
56
- r(o),
56
+ i(s),
57
57
  ")"
58
58
  ]
59
59
  })]
@@ -62,7 +62,7 @@ function g({ alert: e, t: a }) {
62
62
  })]
63
63
  });
64
64
  }
65
- function _({ alerts: t, limit: n, t: r, onAcknowledge: i, onOpenOrder: o, onChanged: c }) {
65
+ function _({ alerts: t, limit: n, t: r, onAcknowledge: i, onOpenOrder: a, onChanged: s }) {
66
66
  let [_, v] = u(null), [y, b] = u(null), [x, S] = u(null), C = async (e) => {
67
67
  v(e), b(null);
68
68
  try {
@@ -106,17 +106,17 @@ function _({ alerts: t, limit: n, t: r, onAcknowledge: i, onOpenOrder: o, onChan
106
106
  "aria-label": r("movethewheels.alerts.signals", "Risk signals"),
107
107
  children: t.signals.map((e) => /* @__PURE__ */ f("li", {
108
108
  className: "rounded-full border border-border-primary bg-surface-primary px-2 py-0.5 text-xs text-text-secondary",
109
- children: a(e, r)
109
+ children: o(e, r)
110
110
  }, e))
111
111
  }),
112
112
  /* @__PURE__ */ p("div", {
113
113
  className: "mt-3 flex flex-wrap gap-2",
114
- children: [t.shipmentId && /* @__PURE__ */ f(s, {
114
+ children: [t.shipmentId && /* @__PURE__ */ f(c, {
115
115
  size: "sm",
116
116
  variant: "outline",
117
117
  onClick: () => S(t),
118
118
  children: r("movethewheels.alerts.viewRisk", "View risk")
119
- }), t.shipmentId && t.kind && /* @__PURE__ */ p(s, {
119
+ }), t.shipmentId && t.kind && /* @__PURE__ */ p(c, {
120
120
  size: "sm",
121
121
  variant: "ghost",
122
122
  disabled: _ === t.id,
@@ -139,9 +139,9 @@ function _({ alerts: t, limit: n, t: r, onAcknowledge: i, onOpenOrder: o, onChan
139
139
  },
140
140
  t: r,
141
141
  onOpenOrder: (e) => {
142
- S(null), o(e);
142
+ S(null), a(e);
143
143
  },
144
- onChanged: c
144
+ onChanged: s
145
145
  })
146
146
  ] });
147
147
  }
@@ -1073,6 +1073,12 @@ export type MtwDemandForecastVariance = {
1073
1073
  scopeType: DemandForecastScope;
1074
1074
  volumeVariance: Scalars['Int']['output'];
1075
1075
  };
1076
+ /** Unit MoveTheWheels shows distances in. */
1077
+ export type MtwDistanceUnit =
1078
+ /** Kilometres */
1079
+ 'KM'
1080
+ /** Miles */
1081
+ | 'MI';
1076
1082
  export type MtwDriver = {
1077
1083
  __typename?: 'MtwDriver';
1078
1084
  baseSalary?: Maybe<Scalars['Float']['output']>;
@@ -2246,6 +2252,30 @@ export type MtwMarketplaceStats = {
2246
2252
  providers: Scalars['Int']['output'];
2247
2253
  verifiedProviders: Scalars['Int']['output'];
2248
2254
  };
2255
+ /**
2256
+ * Workspace operational defaults for MoveTheWheels (BOFF-10488): how amounts,
2257
+ * distances, weights and times are shown, and what new orders start from.
2258
+ * Company profile, notifications, two-factor authentication and integrations
2259
+ * are platform settings and are not part of this type.
2260
+ */
2261
+ export type MtwModuleSettings = {
2262
+ __typename?: 'MtwModuleSettings';
2263
+ /** ISO 4217 code amounts without their own currency are shown in. */
2264
+ defaultCurrency: Scalars['String']['output'];
2265
+ /** Hours from now a new order's suggested delivery time falls (1 to 720). */
2266
+ defaultDeliveryWindowHours: Scalars['Int']['output'];
2267
+ /** Priority a new order starts with. */
2268
+ defaultOrderPriority: DeliveryPriority;
2269
+ distanceUnit: MtwDistanceUnit;
2270
+ /** False until the workspace saves its settings; the values are then the platform defaults. */
2271
+ isCustomized: Scalars['Boolean']['output'];
2272
+ /** IANA time zone dates and times are shown in. Null shows each viewer their own local time. */
2273
+ timezone?: Maybe<Scalars['String']['output']>;
2274
+ updatedAt?: Maybe<Scalars['DateTime']['output']>;
2275
+ updatedBy?: Maybe<Scalars['ID']['output']>;
2276
+ weightUnit: MtwWeightUnit;
2277
+ workspaceId: Scalars['ID']['output'];
2278
+ };
2249
2279
  export type MtwMoveReviewSource = {
2250
2280
  __typename?: 'MtwMoveReviewSource';
2251
2281
  reference: Scalars['String']['output'];
@@ -3745,6 +3775,12 @@ export type MtwWarehouseStats = {
3745
3775
  avgUtilization: Scalars['Float']['output'];
3746
3776
  total: Scalars['Int']['output'];
3747
3777
  };
3778
+ /** Unit MoveTheWheels shows weights in. */
3779
+ export type MtwWeightUnit =
3780
+ /** Kilograms */
3781
+ 'KG'
3782
+ /** Pounds */
3783
+ | 'LB';
3748
3784
  export type Mutation = {
3749
3785
  __typename?: 'Mutation';
3750
3786
  _empty?: Maybe<Scalars['String']['output']>;
@@ -3851,6 +3887,8 @@ export type Mutation = {
3851
3887
  updateDriverStatus: MtwDriver;
3852
3888
  updateIntegration: MtwIntegration;
3853
3889
  updateInventoryItem: MtwInventoryItem;
3890
+ /** Save the workspace's MoveTheWheels operational defaults. Every field is validated. */
3891
+ updateMtwModuleSettings: MtwModuleSettings;
3854
3892
  updateRoute: MtwRoute;
3855
3893
  updateServiceOffering: MtwServiceOffering;
3856
3894
  updateServiceProvider: MtwServiceProvider;
@@ -4150,6 +4188,9 @@ export type MutationUpdateInventoryItemArgs = {
4150
4188
  id: Scalars['ID']['input'];
4151
4189
  input: UpdateInventoryItemInput;
4152
4190
  };
4191
+ export type MutationUpdateMtwModuleSettingsArgs = {
4192
+ input: UpdateMtwModuleSettingsInput;
4193
+ };
4153
4194
  export type MutationUpdateRouteArgs = {
4154
4195
  id: Scalars['ID']['input'];
4155
4196
  input: UpdateRouteInput;
@@ -4352,6 +4393,8 @@ export type Query = {
4352
4393
  * entity create permission.
4353
4394
  */
4354
4395
  mtwImportSpec: Array<MtwImportEntitySpec>;
4396
+ /** The workspace's MoveTheWheels operational defaults; platform defaults when none were saved. */
4397
+ mtwModuleSettings: MtwModuleSettings;
4355
4398
  mtwPalletGeometryPreview: MtwPalletGeometryPreview;
4356
4399
  mtwPickPreparation: MtwPickPreparation;
4357
4400
  mtwPickReview: MtwPickReview;
@@ -5289,6 +5332,19 @@ export type UpdateInventoryItemInput = {
5289
5332
  safetyStock?: InputMaybe<Scalars['Int']['input']>;
5290
5333
  unitCost?: InputMaybe<Scalars['Float']['input']>;
5291
5334
  };
5335
+ /**
5336
+ * Changes to the workspace's MoveTheWheels defaults. Omitted fields keep their
5337
+ * current value. `timezone: null` (or an empty string) clears the time zone so
5338
+ * each viewer sees their own local time.
5339
+ */
5340
+ export type UpdateMtwModuleSettingsInput = {
5341
+ defaultCurrency?: InputMaybe<Scalars['String']['input']>;
5342
+ defaultDeliveryWindowHours?: InputMaybe<Scalars['Int']['input']>;
5343
+ defaultOrderPriority?: InputMaybe<DeliveryPriority>;
5344
+ distanceUnit?: InputMaybe<MtwDistanceUnit>;
5345
+ timezone?: InputMaybe<Scalars['String']['input']>;
5346
+ weightUnit?: InputMaybe<MtwWeightUnit>;
5347
+ };
5292
5348
  export type UpdateRouteInput = {
5293
5349
  actualDistance?: InputMaybe<Scalars['Float']['input']>;
5294
5350
  actualDuration?: InputMaybe<Scalars['Float']['input']>;