@burdenoff/microfe-movethewheels 2026.920.3 → 2026.923.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CarbonFootprintPanel.js +1 -1
- package/dist/components/CustomerPicker.js +76 -65
- package/dist/components/DataTable.js +140 -139
- package/dist/components/DocumentsCard.js +14 -8
- package/dist/generated/wspace-types.d.ts +2719 -8
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useAnalytics.js +21 -1
- package/dist/hooks/useCustomers.js +94 -78
- package/dist/hooks/useDebouncedValue.js +11 -0
- package/dist/hooks/useEntityDocuments.js +28 -18
- package/dist/hooks/useEpod.js +24 -17
- package/dist/hooks/useFleet.js +148 -125
- package/dist/hooks/useInventory.js +255 -186
- package/dist/hooks/useMultiModalShipments.js +35 -27
- package/dist/hooks/useOrders.js +139 -134
- package/dist/hooks/useRoutes.js +97 -75
- package/dist/hooks/useTracking.js +100 -88
- package/dist/index.js +6 -6
- package/dist/movethewheels/components/CustomerPicker.d.ts +3 -1
- package/dist/movethewheels/components/DataTable.d.ts +5 -1
- package/dist/movethewheels/hooks/useCustomers.d.ts +0 -1
- package/dist/movethewheels/hooks/useDebouncedValue.d.ts +1 -0
- package/dist/movethewheels/hooks/useEntityDocuments.d.ts +2 -0
- package/dist/movethewheels/hooks/useEpod.d.ts +6 -1
- package/dist/movethewheels/hooks/useFleet.d.ts +49 -5
- package/dist/movethewheels/hooks/useInventory.d.ts +24 -17
- package/dist/movethewheels/hooks/useMultiModalShipments.d.ts +6 -1
- package/dist/movethewheels/hooks/useOrders.d.ts +48 -5
- package/dist/movethewheels/hooks/useRoutes.d.ts +18 -1
- package/dist/movethewheels/hooks/useTracking.d.ts +12 -11
- package/dist/movethewheels/types/index.d.ts +12 -5
- package/dist/pages/CreateOrderPage.js +191 -129
- package/dist/pages/CustomersPage.js +61 -54
- package/dist/pages/DeliveryCapturePage.js +131 -109
- package/dist/pages/DriversPage.js +100 -92
- package/dist/pages/InventoryPage.js +239 -236
- package/dist/pages/MultiModalShipmentPage.js +163 -130
- package/dist/pages/OrderDetailsPage.js +190 -106
- package/dist/pages/OrdersListPage.js +66 -60
- package/dist/pages/ProductDetailsPage.js +241 -200
- package/dist/pages/ProductsPage.js +59 -52
- package/dist/pages/RouteDetailsPage.js +324 -293
- package/dist/pages/RoutesPage.js +55 -48
- package/dist/pages/VehiclesPage.js +63 -56
- package/dist/pages/WarehousesPage.js +60 -53
- package/package.json +1 -1
- package/src/generated/wspace-types.ts +3136 -8
- package/src/movethewheels/components/CarbonFootprintPanel.tsx +0 -1
- package/src/movethewheels/components/CustomerPicker.tsx +14 -0
- package/src/movethewheels/components/DataTable.tsx +34 -18
- package/src/movethewheels/components/DocumentsCard.tsx +6 -1
- package/src/movethewheels/components/maps/leaflet-setup.ts +1 -8
- package/src/movethewheels/hooks/useAnalytics.ts +27 -0
- package/src/movethewheels/hooks/useCustomers.ts +64 -24
- package/src/movethewheels/hooks/useDebouncedValue.ts +12 -0
- package/src/movethewheels/hooks/useEntityDocuments.ts +43 -25
- package/src/movethewheels/hooks/useEpod.ts +14 -7
- package/src/movethewheels/hooks/useFleet.ts +66 -38
- package/src/movethewheels/hooks/useFleetIntelligence.ts +1 -4
- package/src/movethewheels/hooks/useInventory.ts +211 -90
- package/src/movethewheels/hooks/useMultiModalShipments.ts +15 -11
- package/src/movethewheels/hooks/useOrders.ts +48 -14
- package/src/movethewheels/hooks/useRoutes.ts +81 -24
- package/src/movethewheels/hooks/useTracking.ts +130 -98
- package/src/movethewheels/pages/CreateOrderPage.tsx +93 -2
- package/src/movethewheels/pages/CustomersPage.tsx +11 -1
- package/src/movethewheels/pages/DeliveryCapturePage.tsx +31 -1
- package/src/movethewheels/pages/DriversPage.tsx +24 -12
- package/src/movethewheels/pages/InventoryPage.tsx +57 -32
- package/src/movethewheels/pages/MultiModalShipmentPage.tsx +52 -3
- package/src/movethewheels/pages/OrderDetailsPage.tsx +91 -6
- package/src/movethewheels/pages/OrdersListPage.tsx +20 -3
- package/src/movethewheels/pages/ProductDetailsPage.tsx +52 -3
- package/src/movethewheels/pages/ProductsPage.tsx +11 -1
- package/src/movethewheels/pages/RouteDetailsPage.tsx +45 -5
- package/src/movethewheels/pages/RoutesPage.tsx +11 -1
- package/src/movethewheels/pages/VehiclesPage.tsx +19 -2
- package/src/movethewheels/pages/WarehousesPage.tsx +11 -1
- package/src/movethewheels/types/index.ts +12 -5
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { Calculator as e } from "../node_modules/lucide-react/dist/esm/icons/calculator.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { ChevronLeft as t } from "../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
3
|
+
import { ChevronRight as n } from "../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
4
|
+
import { Plane as r } from "../node_modules/lucide-react/dist/esm/icons/plane.js";
|
|
5
|
+
import { Plus as i } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
6
|
+
import { Ship as a } from "../node_modules/lucide-react/dist/esm/icons/ship.js";
|
|
7
|
+
import { TrainFront as o } from "../node_modules/lucide-react/dist/esm/icons/train-front.js";
|
|
6
8
|
import { Trash2 as ee } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
|
|
7
|
-
import { Truck as
|
|
8
|
-
import { Badge as
|
|
9
|
-
import { EmptyState as
|
|
10
|
-
import { FormError as
|
|
11
|
-
import { useMultiModalShipments as
|
|
12
|
-
import { useState as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { EmphasisPanel as
|
|
9
|
+
import { Truck as s } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
|
|
10
|
+
import { Badge as c, Button as l, Card as u, CardContent as d, CardHeader as f, CardTitle as p, Input as m, Label as h, Select as g, SelectContent as _, SelectItem as v, SelectTrigger as y, SelectValue as b, Separator as x } from "../components/ui.js";
|
|
11
|
+
import { EmptyState as te, LoadingState as ne, PageLayout as S, PageSection as C } from "../components/PageLayout.js";
|
|
12
|
+
import { FormError as w } from "../components/FormError.js";
|
|
13
|
+
import { useMultiModalShipments as T } from "../hooks/useMultiModalShipments.js";
|
|
14
|
+
import { useState as E } from "react";
|
|
15
|
+
import { Fragment as re, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
16
|
+
import { EmphasisPanel as ie, PagePurpose as ae } from "@burdenoff/fe-libs/ui";
|
|
15
17
|
//#region src/movethewheels/pages/MultiModalShipmentPage.tsx
|
|
16
18
|
var k = {
|
|
17
|
-
ROAD:
|
|
18
|
-
AIR:
|
|
19
|
-
OCEAN:
|
|
20
|
-
RAIL:
|
|
19
|
+
ROAD: s,
|
|
20
|
+
AIR: r,
|
|
21
|
+
OCEAN: a,
|
|
22
|
+
RAIL: o
|
|
21
23
|
}, A = {
|
|
22
24
|
ROAD: "Road",
|
|
23
25
|
AIR: "Air",
|
|
@@ -43,210 +45,213 @@ function M(e, t) {
|
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
function N() {
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
+
let [r, o] = E(0), { shipments: s, totalShipments: N, hasMore: oe, isLoading: P, error: F, calculateFreightRate: I, planMultiModalShipment: se } = T({
|
|
49
|
+
limit: 10,
|
|
50
|
+
offset: r * 10
|
|
51
|
+
}), [L, R] = E(""), [z, B] = E(""), [V, H] = E(""), [U, W] = E([j()]), [G, K] = E({}), [ce, q] = E({}), [J, Y] = E(!1), [le, X] = E(null), [Z, Q] = E(null), $ = (e, t) => {
|
|
52
|
+
W((n) => n.map((n, r) => r === e ? {
|
|
48
53
|
...n,
|
|
49
54
|
...t
|
|
50
|
-
} : n)),
|
|
55
|
+
} : n)), K((t) => ({
|
|
51
56
|
...t,
|
|
52
57
|
[e]: null
|
|
53
58
|
}));
|
|
54
|
-
},
|
|
55
|
-
|
|
59
|
+
}, ue = () => W((e) => [...e, j()]), de = (e) => {
|
|
60
|
+
W((t) => t.filter((t, n) => n !== e)), K((t) => {
|
|
56
61
|
let n = { ...t };
|
|
57
62
|
return delete n[e], n;
|
|
58
63
|
});
|
|
59
|
-
},
|
|
60
|
-
let t =
|
|
64
|
+
}, fe = async (e) => {
|
|
65
|
+
let t = U[e];
|
|
61
66
|
if (t) {
|
|
62
|
-
|
|
67
|
+
q((t) => ({
|
|
63
68
|
...t,
|
|
64
69
|
[e]: null
|
|
65
70
|
}));
|
|
66
71
|
try {
|
|
67
|
-
let n = await
|
|
68
|
-
|
|
72
|
+
let n = await I(t);
|
|
73
|
+
K((t) => ({
|
|
69
74
|
...t,
|
|
70
75
|
[e]: n
|
|
71
76
|
}));
|
|
72
77
|
} catch (t) {
|
|
73
|
-
|
|
78
|
+
q((n) => ({
|
|
74
79
|
...n,
|
|
75
80
|
[e]: t instanceof Error ? t.message : "Failed to calculate rate"
|
|
76
81
|
}));
|
|
77
82
|
}
|
|
78
83
|
}
|
|
79
|
-
},
|
|
80
|
-
return /* @__PURE__ */
|
|
84
|
+
}, pe = Object.values(G).reduce((e, t) => e + (t?.calculatedCost ?? 0), 0), me = new Set(U.map((e) => e.mode));
|
|
85
|
+
return /* @__PURE__ */ O(S, {
|
|
81
86
|
hero: !0,
|
|
82
87
|
titleAccent: "Multi-Modal Freight",
|
|
83
88
|
title: "Multi-Modal Freight",
|
|
84
89
|
subtitle: "Plan a shipment across road, air, ocean and rail legs with real per-mode rate calculation",
|
|
85
|
-
icon: /* @__PURE__ */
|
|
90
|
+
icon: /* @__PURE__ */ D(a, { size: 24 }),
|
|
86
91
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
icon: /* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ D(ae, {
|
|
93
|
+
icon: /* @__PURE__ */ D(a, { size: 18 }),
|
|
89
94
|
children: "Compose a single shipment from multiple real transport legs — each leg picks its own mode (road/air/ocean/rail) and gets priced with that mode's real pricing driver (air: chargeable weight; ocean: revenue-ton or per-container; rail: tonne-km; road: distance + weight). Calculate a leg's rate before booking, then plan the full multi-leg shipment in one step."
|
|
90
95
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ D(ie, { children: "Live carrier booking/API integration is out of scope for this core (it needs named-carrier partnership agreements) — this plans the shipment and its legs with real calculated costs that your ops team can then execute against your chosen carriers." }),
|
|
97
|
+
/* @__PURE__ */ D(C, {
|
|
93
98
|
title: "Plan a New Multi-Modal Shipment",
|
|
94
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ D(u, { children: /* @__PURE__ */ D(d, { children: /* @__PURE__ */ O("form", {
|
|
95
100
|
onSubmit: async (e) => {
|
|
96
|
-
if (e.preventDefault(), X(null), Q(null), !
|
|
101
|
+
if (e.preventDefault(), X(null), Q(null), !L.trim()) {
|
|
97
102
|
X("Shipment number is required.");
|
|
98
103
|
return;
|
|
99
104
|
}
|
|
100
|
-
if (
|
|
105
|
+
if (U.length === 0) {
|
|
101
106
|
X("Add at least one transport leg.");
|
|
102
107
|
return;
|
|
103
108
|
}
|
|
104
|
-
|
|
109
|
+
Y(!0);
|
|
105
110
|
try {
|
|
106
|
-
let e = await
|
|
107
|
-
shipmentNumber:
|
|
108
|
-
origin: { address:
|
|
109
|
-
destination: { address:
|
|
110
|
-
legs:
|
|
111
|
+
let e = await se({
|
|
112
|
+
shipmentNumber: L.trim(),
|
|
113
|
+
origin: { address: z },
|
|
114
|
+
destination: { address: V },
|
|
115
|
+
legs: U
|
|
111
116
|
});
|
|
112
|
-
Q(`Shipment ${e.shipmentNumber} planned with ${e.legs.length} leg(s).`),
|
|
117
|
+
Q(`Shipment ${e.shipmentNumber} planned with ${e.legs.length} leg(s).`), R(""), B(""), H(""), W([j()]), K({}), o(0);
|
|
113
118
|
} catch (e) {
|
|
114
119
|
X(e instanceof Error ? e.message : "Failed to plan shipment");
|
|
115
120
|
} finally {
|
|
116
|
-
|
|
121
|
+
Y(!1);
|
|
117
122
|
}
|
|
118
123
|
},
|
|
119
124
|
className: "space-y-6 pt-4",
|
|
120
125
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
Z && /* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ D(w, { message: le }),
|
|
127
|
+
Z && /* @__PURE__ */ D("div", {
|
|
123
128
|
className: "rounded-lg border border-status-success-border bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
|
|
124
129
|
children: Z
|
|
125
130
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ O("div", {
|
|
127
132
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
128
133
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, {
|
|
130
135
|
htmlFor: "shipmentNumber",
|
|
131
136
|
children: "Shipment Number"
|
|
132
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ D(m, {
|
|
133
138
|
id: "shipmentNumber",
|
|
134
|
-
value:
|
|
135
|
-
onChange: (e) =>
|
|
139
|
+
value: L,
|
|
140
|
+
onChange: (e) => R(e.target.value),
|
|
136
141
|
placeholder: "SHP-MM-0001",
|
|
137
142
|
required: !0
|
|
138
143
|
})] }),
|
|
139
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, {
|
|
140
145
|
htmlFor: "originAddress",
|
|
141
146
|
children: "Origin"
|
|
142
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ D(m, {
|
|
143
148
|
id: "originAddress",
|
|
144
|
-
value:
|
|
145
|
-
onChange: (e) =>
|
|
149
|
+
value: z,
|
|
150
|
+
onChange: (e) => B(e.target.value),
|
|
146
151
|
placeholder: "Shanghai, CN"
|
|
147
152
|
})] }),
|
|
148
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, {
|
|
149
154
|
htmlFor: "destinationAddress",
|
|
150
155
|
children: "Destination"
|
|
151
|
-
}), /* @__PURE__ */
|
|
156
|
+
}), /* @__PURE__ */ D(m, {
|
|
152
157
|
id: "destinationAddress",
|
|
153
|
-
value:
|
|
154
|
-
onChange: (e) =>
|
|
158
|
+
value: V,
|
|
159
|
+
onChange: (e) => H(e.target.value),
|
|
155
160
|
placeholder: "Los Angeles, US"
|
|
156
161
|
})] })
|
|
157
162
|
]
|
|
158
163
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ D(x, {}),
|
|
165
|
+
/* @__PURE__ */ D("div", {
|
|
161
166
|
className: "space-y-4",
|
|
162
|
-
children:
|
|
163
|
-
let r = k[t.mode], i =
|
|
164
|
-
return /* @__PURE__ */
|
|
167
|
+
children: U.map((t, n) => {
|
|
168
|
+
let r = k[t.mode], i = G[n], a = ce[n];
|
|
169
|
+
return /* @__PURE__ */ O(u, {
|
|
165
170
|
className: "border-border-subtle",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ O(f, {
|
|
167
172
|
className: "flex flex-row items-center justify-between",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ O(p, {
|
|
169
174
|
className: "flex items-center gap-2 text-base",
|
|
170
175
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ D(r, { size: 16 }),
|
|
172
177
|
" Leg ",
|
|
173
178
|
n + 1
|
|
174
179
|
]
|
|
175
|
-
}),
|
|
180
|
+
}), U.length > 1 && /* @__PURE__ */ D(l, {
|
|
176
181
|
type: "button",
|
|
177
182
|
variant: "ghost",
|
|
178
183
|
size: "sm",
|
|
179
|
-
onClick: () =>
|
|
184
|
+
onClick: () => de(n),
|
|
180
185
|
"aria-label": `Remove leg ${n + 1}`,
|
|
181
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ D(ee, { size: 14 })
|
|
182
187
|
})]
|
|
183
|
-
}), /* @__PURE__ */
|
|
188
|
+
}), /* @__PURE__ */ O(d, {
|
|
184
189
|
className: "space-y-4",
|
|
185
190
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ O("div", {
|
|
187
192
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
188
193
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Mode" }), /* @__PURE__ */ O(g, {
|
|
190
195
|
value: t.mode,
|
|
191
196
|
onValueChange: (e) => $(n, { mode: e }),
|
|
192
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ D(y, { children: /* @__PURE__ */ D(b, {}) }), /* @__PURE__ */ D(_, { children: [
|
|
193
198
|
"ROAD",
|
|
194
199
|
"AIR",
|
|
195
200
|
"OCEAN",
|
|
196
201
|
"RAIL"
|
|
197
|
-
].map((e) => /* @__PURE__ */
|
|
202
|
+
].map((e) => /* @__PURE__ */ D(v, {
|
|
198
203
|
value: e,
|
|
199
204
|
children: A[e]
|
|
200
205
|
}, e)) })]
|
|
201
206
|
})] }),
|
|
202
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Leg Origin" }), /* @__PURE__ */ D(m, {
|
|
203
208
|
value: t.origin.address ?? "",
|
|
204
209
|
onChange: (e) => $(n, { origin: { address: e.target.value } }),
|
|
205
210
|
placeholder: "Origin port/airport/terminal"
|
|
206
211
|
})] }),
|
|
207
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Leg Destination" }), /* @__PURE__ */ D(m, {
|
|
208
213
|
value: t.destination.address ?? "",
|
|
209
214
|
onChange: (e) => $(n, { destination: { address: e.target.value } }),
|
|
210
215
|
placeholder: "Destination port/airport/terminal"
|
|
211
216
|
})] })
|
|
212
217
|
]
|
|
213
218
|
}),
|
|
214
|
-
(t.mode === "ROAD" || t.mode === "RAIL") && /* @__PURE__ */
|
|
219
|
+
(t.mode === "ROAD" || t.mode === "RAIL") && /* @__PURE__ */ O("div", {
|
|
215
220
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Distance (km)" }), /* @__PURE__ */ D(m, {
|
|
217
222
|
type: "number",
|
|
218
223
|
min: 0,
|
|
219
224
|
value: t.distanceKm ?? "",
|
|
220
225
|
onChange: (e) => $(n, { distanceKm: Number(e.target.value) || void 0 })
|
|
221
|
-
})] }), /* @__PURE__ */
|
|
226
|
+
})] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Weight (kg)" }), /* @__PURE__ */ D(m, {
|
|
222
227
|
type: "number",
|
|
223
228
|
min: 0,
|
|
224
229
|
value: t.weightKg ?? "",
|
|
225
230
|
onChange: (e) => $(n, { weightKg: Number(e.target.value) || void 0 })
|
|
226
231
|
})] })]
|
|
227
232
|
}),
|
|
228
|
-
t.mode === "AIR" && /* @__PURE__ */
|
|
233
|
+
t.mode === "AIR" && /* @__PURE__ */ O("div", {
|
|
229
234
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-4",
|
|
230
235
|
children: [
|
|
231
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Weight (kg)" }), /* @__PURE__ */ D(m, {
|
|
232
237
|
type: "number",
|
|
233
238
|
min: 0,
|
|
234
239
|
value: t.weightKg ?? "",
|
|
235
240
|
onChange: (e) => $(n, { weightKg: Number(e.target.value) || void 0 })
|
|
236
241
|
})] }),
|
|
237
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Length (cm)" }), /* @__PURE__ */ D(m, {
|
|
238
243
|
type: "number",
|
|
239
244
|
min: 0,
|
|
240
245
|
value: t.lengthCm ?? "",
|
|
241
246
|
onChange: (e) => $(n, { lengthCm: Number(e.target.value) || void 0 })
|
|
242
247
|
})] }),
|
|
243
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Width (cm)" }), /* @__PURE__ */ D(m, {
|
|
244
249
|
type: "number",
|
|
245
250
|
min: 0,
|
|
246
251
|
value: t.widthCm ?? "",
|
|
247
252
|
onChange: (e) => $(n, { widthCm: Number(e.target.value) || void 0 })
|
|
248
253
|
})] }),
|
|
249
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Height (cm)" }), /* @__PURE__ */ D(m, {
|
|
250
255
|
type: "number",
|
|
251
256
|
min: 0,
|
|
252
257
|
value: t.heightCm ?? "",
|
|
@@ -254,62 +259,62 @@ function N() {
|
|
|
254
259
|
})] })
|
|
255
260
|
]
|
|
256
261
|
}),
|
|
257
|
-
t.mode === "OCEAN" && /* @__PURE__ */
|
|
262
|
+
t.mode === "OCEAN" && /* @__PURE__ */ O("div", {
|
|
258
263
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-4",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Container Type" }), /* @__PURE__ */ O(g, {
|
|
260
265
|
value: t.containerType ?? "LCL",
|
|
261
266
|
onValueChange: (e) => $(n, { containerType: e }),
|
|
262
|
-
children: [/* @__PURE__ */
|
|
263
|
-
/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ D(y, { children: /* @__PURE__ */ D(b, {}) }), /* @__PURE__ */ O(_, { children: [
|
|
268
|
+
/* @__PURE__ */ D(v, {
|
|
264
269
|
value: "LCL",
|
|
265
270
|
children: "LCL (shared container)"
|
|
266
271
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ D(v, {
|
|
268
273
|
value: "FCL_20FT",
|
|
269
274
|
children: "FCL 20ft"
|
|
270
275
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ D(v, {
|
|
272
277
|
value: "FCL_40FT",
|
|
273
278
|
children: "FCL 40ft"
|
|
274
279
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ D(v, {
|
|
276
281
|
value: "FCL_40FT_HC",
|
|
277
282
|
children: "FCL 40ft High-Cube"
|
|
278
283
|
})
|
|
279
284
|
] })]
|
|
280
|
-
})] }), (t.containerType ?? "LCL") === "LCL" ? /* @__PURE__ */
|
|
285
|
+
})] }), (t.containerType ?? "LCL") === "LCL" ? /* @__PURE__ */ O(re, { children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Weight (kg)" }), /* @__PURE__ */ D(m, {
|
|
281
286
|
type: "number",
|
|
282
287
|
min: 0,
|
|
283
288
|
value: t.weightKg ?? "",
|
|
284
289
|
onChange: (e) => $(n, { weightKg: Number(e.target.value) || void 0 })
|
|
285
|
-
})] }), /* @__PURE__ */
|
|
290
|
+
})] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Volume (CBM)" }), /* @__PURE__ */ D(m, {
|
|
286
291
|
type: "number",
|
|
287
292
|
min: 0,
|
|
288
293
|
value: t.volumeCbm ?? "",
|
|
289
294
|
onChange: (e) => $(n, { volumeCbm: Number(e.target.value) || void 0 })
|
|
290
|
-
})] })] }) : /* @__PURE__ */
|
|
295
|
+
})] })] }) : /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Container Count" }), /* @__PURE__ */ D(m, {
|
|
291
296
|
type: "number",
|
|
292
297
|
min: 1,
|
|
293
298
|
value: t.containerCount ?? 1,
|
|
294
299
|
onChange: (e) => $(n, { containerCount: Number(e.target.value) || 1 })
|
|
295
300
|
})] })]
|
|
296
301
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ O("div", {
|
|
298
303
|
className: "flex items-center gap-3",
|
|
299
304
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ O(l, {
|
|
301
306
|
type: "button",
|
|
302
307
|
variant: "secondary",
|
|
303
308
|
size: "sm",
|
|
304
|
-
onClick: () => void
|
|
305
|
-
children: [/* @__PURE__ */
|
|
309
|
+
onClick: () => void fe(n),
|
|
310
|
+
children: [/* @__PURE__ */ D(e, {
|
|
306
311
|
size: 14,
|
|
307
312
|
className: "mr-1.5"
|
|
308
313
|
}), " Calculate Rate"]
|
|
309
314
|
}),
|
|
310
|
-
i && /* @__PURE__ */
|
|
315
|
+
i && /* @__PURE__ */ O("span", {
|
|
311
316
|
className: "text-sm font-medium text-text-primary",
|
|
312
|
-
children: [M(i.calculatedCost, i.currency), i.chargeableWeightKg != null && /* @__PURE__ */
|
|
317
|
+
children: [M(i.calculatedCost, i.currency), i.chargeableWeightKg != null && /* @__PURE__ */ O("span", {
|
|
313
318
|
className: "ml-2 text-xs text-text-secondary",
|
|
314
319
|
children: [
|
|
315
320
|
"(",
|
|
@@ -318,17 +323,17 @@ function N() {
|
|
|
318
323
|
]
|
|
319
324
|
})]
|
|
320
325
|
}),
|
|
321
|
-
a && /* @__PURE__ */
|
|
326
|
+
a && /* @__PURE__ */ D("span", {
|
|
322
327
|
className: "text-sm text-status-error-text",
|
|
323
328
|
children: a
|
|
324
329
|
})
|
|
325
330
|
]
|
|
326
331
|
}),
|
|
327
|
-
i && i.breakdown.length > 0 && /* @__PURE__ */
|
|
332
|
+
i && i.breakdown.length > 0 && /* @__PURE__ */ D("ul", {
|
|
328
333
|
className: "space-y-1 rounded-md bg-surface-subtle px-3 py-2 text-xs text-text-secondary",
|
|
329
|
-
children: i.breakdown.map((e) => /* @__PURE__ */
|
|
334
|
+
children: i.breakdown.map((e) => /* @__PURE__ */ O("li", {
|
|
330
335
|
className: "flex justify-between",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
336
|
+
children: [/* @__PURE__ */ D("span", { children: e.label }), /* @__PURE__ */ D("span", { children: M(e.amount, i.currency) })]
|
|
332
337
|
}, e.label))
|
|
333
338
|
})
|
|
334
339
|
]
|
|
@@ -336,72 +341,72 @@ function N() {
|
|
|
336
341
|
}, n);
|
|
337
342
|
})
|
|
338
343
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ O("div", {
|
|
340
345
|
className: "flex items-center justify-between",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ O(l, {
|
|
342
347
|
type: "button",
|
|
343
348
|
variant: "outline",
|
|
344
349
|
size: "sm",
|
|
345
|
-
onClick:
|
|
346
|
-
children: [/* @__PURE__ */
|
|
350
|
+
onClick: ue,
|
|
351
|
+
children: [/* @__PURE__ */ D(i, {
|
|
347
352
|
size: 14,
|
|
348
353
|
className: "mr-1.5"
|
|
349
354
|
}), " Add Leg"]
|
|
350
|
-
}), /* @__PURE__ */
|
|
355
|
+
}), /* @__PURE__ */ O("div", {
|
|
351
356
|
className: "flex items-center gap-3",
|
|
352
|
-
children: [
|
|
357
|
+
children: [me.size > 1 && /* @__PURE__ */ D(c, {
|
|
353
358
|
variant: "secondary",
|
|
354
359
|
children: "Multi-modal"
|
|
355
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ O("span", {
|
|
356
361
|
className: "text-sm text-text-secondary",
|
|
357
362
|
children: [
|
|
358
363
|
"Estimated total:",
|
|
359
364
|
" ",
|
|
360
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ D("strong", { children: M(pe, G[0]?.currency ?? "USD") })
|
|
361
366
|
]
|
|
362
367
|
})]
|
|
363
368
|
})]
|
|
364
369
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ D(l, {
|
|
366
371
|
type: "submit",
|
|
367
|
-
disabled:
|
|
368
|
-
children:
|
|
372
|
+
disabled: J,
|
|
373
|
+
children: J ? "Planning shipment..." : "Plan Shipment"
|
|
369
374
|
})
|
|
370
375
|
]
|
|
371
376
|
}) }) })
|
|
372
377
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ D(C, {
|
|
374
379
|
title: "Planned Multi-Modal Shipments",
|
|
375
|
-
children:
|
|
376
|
-
icon: /* @__PURE__ */
|
|
380
|
+
children: P ? /* @__PURE__ */ D(ne, { message: "Loading multi-modal shipments..." }) : F ? /* @__PURE__ */ D(w, { message: F.message }) : s.length === 0 ? /* @__PURE__ */ D(te, {
|
|
381
|
+
icon: /* @__PURE__ */ D(a, { size: 32 }),
|
|
377
382
|
title: "No multi-modal shipments yet",
|
|
378
383
|
description: "Plan a shipment above to see it here once it spans more than one transport mode."
|
|
379
|
-
}) : /* @__PURE__ */
|
|
384
|
+
}) : /* @__PURE__ */ O("div", {
|
|
380
385
|
className: "space-y-4",
|
|
381
|
-
children:
|
|
386
|
+
children: [s.map((e) => /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ O(f, {
|
|
382
387
|
className: "flex flex-row items-center justify-between",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ D(p, {
|
|
384
389
|
className: "text-base",
|
|
385
390
|
children: e.shipmentNumber
|
|
386
|
-
}), /* @__PURE__ */
|
|
391
|
+
}), /* @__PURE__ */ O("div", {
|
|
387
392
|
className: "flex items-center gap-2",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ D(c, {
|
|
389
394
|
variant: "outline",
|
|
390
395
|
children: e.status
|
|
391
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ D("span", {
|
|
392
397
|
className: "text-sm font-medium",
|
|
393
398
|
children: M(e.totalFreightCost, e.freightCurrency)
|
|
394
399
|
})]
|
|
395
400
|
})]
|
|
396
|
-
}), /* @__PURE__ */
|
|
401
|
+
}), /* @__PURE__ */ D(d, { children: /* @__PURE__ */ D("div", {
|
|
397
402
|
className: "flex flex-wrap gap-2",
|
|
398
403
|
children: e.legs.map((e) => {
|
|
399
404
|
let t = k[e.mode];
|
|
400
|
-
return /* @__PURE__ */
|
|
405
|
+
return /* @__PURE__ */ O(c, {
|
|
401
406
|
variant: "secondary",
|
|
402
407
|
className: "flex items-center gap-1",
|
|
403
408
|
children: [
|
|
404
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ D(t, { size: 12 }),
|
|
405
410
|
" ",
|
|
406
411
|
A[e.mode],
|
|
407
412
|
":",
|
|
@@ -410,7 +415,35 @@ function N() {
|
|
|
410
415
|
]
|
|
411
416
|
}, e.id);
|
|
412
417
|
})
|
|
413
|
-
}) })] }, e.id))
|
|
418
|
+
}) })] }, e.id)), N > 10 && /* @__PURE__ */ O("div", {
|
|
419
|
+
className: "flex items-center justify-between border-t border-border-seam pt-4",
|
|
420
|
+
children: [/* @__PURE__ */ O("span", {
|
|
421
|
+
className: "text-sm text-text-secondary",
|
|
422
|
+
children: [
|
|
423
|
+
"Showing ",
|
|
424
|
+
r * 10 + 1,
|
|
425
|
+
"–",
|
|
426
|
+
Math.min((r + 1) * 10, N),
|
|
427
|
+
" of ",
|
|
428
|
+
N
|
|
429
|
+
]
|
|
430
|
+
}), /* @__PURE__ */ O("div", {
|
|
431
|
+
className: "flex gap-2",
|
|
432
|
+
children: [/* @__PURE__ */ O(l, {
|
|
433
|
+
variant: "outline",
|
|
434
|
+
size: "sm",
|
|
435
|
+
disabled: r === 0 || P,
|
|
436
|
+
onClick: () => o((e) => Math.max(0, e - 1)),
|
|
437
|
+
children: [/* @__PURE__ */ D(t, { size: 16 }), " Previous"]
|
|
438
|
+
}), /* @__PURE__ */ O(l, {
|
|
439
|
+
variant: "outline",
|
|
440
|
+
size: "sm",
|
|
441
|
+
disabled: !oe || P,
|
|
442
|
+
onClick: () => o((e) => e + 1),
|
|
443
|
+
children: ["Next ", /* @__PURE__ */ D(n, { size: 16 })]
|
|
444
|
+
})]
|
|
445
|
+
})]
|
|
446
|
+
})]
|
|
414
447
|
})
|
|
415
448
|
})
|
|
416
449
|
]
|