@burdenoff/microfe-movethewheels 2026.625.1 → 2026.626.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/{AIAssistantPage-CNyoKtID.js → AIAssistantPage-AvsMbunM.js} +35 -29
- package/dist/{AnalyticsPage-Ck615ox7.js → AnalyticsPage-CCLfHgQZ.js} +36 -25
- package/dist/CreateOrderPage-CjlnEtk3.js +510 -0
- package/dist/CustomerDetailsPage-I6cdDHUi.js +265 -0
- package/dist/CustomersPage-CGGfD4ki.js +163 -0
- package/dist/{DashboardPage-DTmyuC11.js → DashboardPage-D2HRqwg9.js} +93 -89
- package/dist/DataTable-CD9ZhpLB.js +249 -0
- package/dist/DriverDetailsPage-rg_pGNuP.js +330 -0
- package/dist/DriversPage-DKiynISH.js +167 -0
- package/dist/FinancePage-Vg8WPs38.js +158 -0
- package/dist/{FleetPage-DCfOmBa2.js → FleetPage-DddXt8r8.js} +109 -71
- package/dist/ImportExportPage-BW6qO3kc.js +248 -0
- package/dist/{InventoryPage-BW0QXWuf.js → InventoryPage-rMGuaJN-.js} +74 -70
- package/dist/LiveTrackingPage-DQ1q4Id3.js +375 -0
- package/dist/MarketplacePage-DKrXAv62.js +219 -0
- package/dist/OrderDetailsPage-CFASgsYX.js +431 -0
- package/dist/OrdersListPage-BHeT8S5o.js +309 -0
- package/dist/ProductDetailsPage-CFGcbaHo.js +195 -0
- package/dist/ProductsPage--xEpbQ8A.js +171 -0
- package/dist/{ReportsPage-Df3hciPy.js → ReportsPage-Bb7_90rK.js} +53 -45
- package/dist/RouteDetailsPage-CVtDVb1N.js +282 -0
- package/dist/RoutesPage-s57PtgcQ.js +163 -0
- package/dist/SettingsPage-BYNCBOpN.js +298 -0
- package/dist/{TrackingPage-CU0Vk4mx.js → TrackingPage-CcRc_dva.js} +77 -72
- package/dist/VehicleDetailsPage-3YDMPsPs.js +220 -0
- package/dist/VehiclesPage-UlxPWP9K.js +167 -0
- package/dist/WarehouseDetailsPage-Db7KeN-d.js +238 -0
- package/dist/WarehousesPage-CuTO-OPp.js +164 -0
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/src/movethewheels/components/DataTable.tsx +37 -2
- package/src/movethewheels/components/MetricCard.tsx +3 -1
- package/src/movethewheels/pages/AIAssistantPage.tsx +11 -3
- package/src/movethewheels/pages/AnalyticsPage.tsx +31 -25
- package/src/movethewheels/pages/CreateOrderPage.tsx +56 -17
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +63 -38
- package/src/movethewheels/pages/CustomersPage.tsx +40 -2
- package/src/movethewheels/pages/DashboardPage.tsx +8 -1
- package/src/movethewheels/pages/DriverDetailsPage.tsx +57 -26
- package/src/movethewheels/pages/DriversPage.tsx +37 -1
- package/src/movethewheels/pages/FinancePage.tsx +45 -41
- package/src/movethewheels/pages/FleetPage.tsx +68 -25
- package/src/movethewheels/pages/ImportExportPage.tsx +46 -29
- package/src/movethewheels/pages/InventoryPage.tsx +20 -23
- package/src/movethewheels/pages/LiveTrackingPage.tsx +58 -20
- package/src/movethewheels/pages/MarketplacePage.tsx +37 -3
- package/src/movethewheels/pages/OrderDetailsPage.tsx +74 -46
- package/src/movethewheels/pages/OrdersListPage.tsx +62 -1
- package/src/movethewheels/pages/ProductDetailsPage.tsx +36 -11
- package/src/movethewheels/pages/ProductsPage.tsx +33 -1
- package/src/movethewheels/pages/ReportsPage.tsx +23 -19
- package/src/movethewheels/pages/RouteDetailsPage.tsx +71 -31
- package/src/movethewheels/pages/RoutesPage.tsx +41 -5
- package/src/movethewheels/pages/SettingsPage.tsx +68 -26
- package/src/movethewheels/pages/TrackingPage.tsx +50 -47
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +49 -24
- package/src/movethewheels/pages/VehiclesPage.tsx +33 -1
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +55 -30
- package/src/movethewheels/pages/WarehousesPage.tsx +42 -4
- package/dist/CreateOrderPage-C9Vb57Yn.js +0 -471
- package/dist/CustomerDetailsPage-BVkHRZvi.js +0 -239
- package/dist/CustomersPage-DhQg-6h_.js +0 -118
- package/dist/DataTable-CfWvFw5B.js +0 -239
- package/dist/DriverDetailsPage-DaaCQ-2O.js +0 -297
- package/dist/DriversPage-D0RMBB_t.js +0 -129
- package/dist/FinancePage-BUXqW1IM.js +0 -154
- package/dist/ImportExportPage-BM1BoRcE.js +0 -232
- package/dist/LiveTrackingPage-DqcGXdkw.js +0 -332
- package/dist/MarketplacePage-DFqsxNYU.js +0 -192
- package/dist/OrderDetailsPage-Dx1m3cVA.js +0 -398
- package/dist/OrdersListPage-DHYBGrWf.js +0 -256
- package/dist/ProductDetailsPage-DOXO90kb.js +0 -168
- package/dist/ProductsPage-RLMTwWN0.js +0 -133
- package/dist/RouteDetailsPage-xzFDeR-X.js +0 -240
- package/dist/RoutesPage-DDFy1QVi.js +0 -118
- package/dist/SettingsPage-JH_-UPbf.js +0 -247
- package/dist/VehicleDetailsPage-P4xDttKw.js +0 -194
- package/dist/VehiclesPage-tJZ64QKV.js +0 -129
- package/dist/WarehouseDetailsPage-Bt_w2Yf7.js +0 -215
- package/dist/WarehousesPage-HsPpEFeG.js +0 -126
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { J as e, N as t, X as n, Z as r, d as i, f as a, g as o, h as s, i as c, it as l, l as u, t as d, u as f } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as p } from "./map-pin-BSaf5IDL.js";
|
|
3
|
+
import { t as m } from "./map-_Per4sT9.js";
|
|
4
|
+
import { t as h } from "./package-BE7U0wQE.js";
|
|
5
|
+
import { t as g } from "./refresh-cw-CWfERAit.js";
|
|
6
|
+
import { t as _ } from "./truck-CtDjNFbi.js";
|
|
7
|
+
import { r as v } from "./graphqlClient-CdJyR_ed.js";
|
|
8
|
+
import { o as y, r as b } from "./useTracking-De2KIUNu.js";
|
|
9
|
+
import { r as x, t as S } from "./MetricCard-B7yMyvMX.js";
|
|
10
|
+
import { r as C } from "./StatusBadge-CijYQXtb.js";
|
|
11
|
+
import { r as w } from "./formatters-_vJlC-47.js";
|
|
12
|
+
import { t as T } from "./navigation-BgnOfsVd.js";
|
|
13
|
+
import { useState as E } from "react";
|
|
14
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
15
|
+
import { EmphasisPanel as k, NextSteps as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
//#region node_modules/lucide-react/dist/esm/icons/list.js
|
|
17
|
+
var M = l("List", [
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M3 12h.01",
|
|
20
|
+
key: "nlz23k"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M3 18h.01",
|
|
24
|
+
key: "1tta3j"
|
|
25
|
+
}],
|
|
26
|
+
["path", {
|
|
27
|
+
d: "M3 6h.01",
|
|
28
|
+
key: "1rqtza"
|
|
29
|
+
}],
|
|
30
|
+
["path", {
|
|
31
|
+
d: "M8 12h13",
|
|
32
|
+
key: "1za7za"
|
|
33
|
+
}],
|
|
34
|
+
["path", {
|
|
35
|
+
d: "M8 18h13",
|
|
36
|
+
key: "1lx6n3"
|
|
37
|
+
}],
|
|
38
|
+
["path", {
|
|
39
|
+
d: "M8 6h13",
|
|
40
|
+
key: "ik3vkj"
|
|
41
|
+
}]
|
|
42
|
+
]);
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/movethewheels/pages/LiveTrackingPage.tsx
|
|
45
|
+
function N() {
|
|
46
|
+
let { basePath: l, navigate: N } = v(), { activeDeliveries: P, isLoading: F, refetch: I } = b(), { unacknowledgedAlerts: L } = y(), [R, z] = E("map"), [B, V] = E(null), H = (e) => {
|
|
47
|
+
N && N(T(l, e));
|
|
48
|
+
}, U = B ? P.find((e) => e.order?.id === B) : null;
|
|
49
|
+
return /* @__PURE__ */ O(c, {
|
|
50
|
+
title: "Live Tracking",
|
|
51
|
+
subtitle: `${P.length} active deliveries`,
|
|
52
|
+
icon: /* @__PURE__ */ D(p, { size: 24 }),
|
|
53
|
+
headerActions: /* @__PURE__ */ O("div", {
|
|
54
|
+
className: "flex gap-2",
|
|
55
|
+
children: [/* @__PURE__ */ O(f, {
|
|
56
|
+
variant: "outline",
|
|
57
|
+
onClick: I,
|
|
58
|
+
disabled: F,
|
|
59
|
+
children: [/* @__PURE__ */ D(g, {
|
|
60
|
+
size: 16,
|
|
61
|
+
className: F ? "animate-spin" : ""
|
|
62
|
+
}), "Refresh"]
|
|
63
|
+
}), /* @__PURE__ */ D(e, {
|
|
64
|
+
value: R,
|
|
65
|
+
onValueChange: (e) => z(e),
|
|
66
|
+
children: /* @__PURE__ */ O(n, { children: [/* @__PURE__ */ D(r, {
|
|
67
|
+
value: "map",
|
|
68
|
+
children: /* @__PURE__ */ D(m, { size: 16 })
|
|
69
|
+
}), /* @__PURE__ */ D(r, {
|
|
70
|
+
value: "list",
|
|
71
|
+
children: /* @__PURE__ */ D(M, { size: 16 })
|
|
72
|
+
})] })
|
|
73
|
+
})]
|
|
74
|
+
}),
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ D(j, {
|
|
77
|
+
icon: /* @__PURE__ */ D(p, { size: 18 }),
|
|
78
|
+
children: "A real-time operations board for every delivery currently on the road. Watch where drivers are, which orders are out for delivery, and react to alerts — switch to the map for a bird's-eye view or the list to drill into a single shipment."
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ D(A, {
|
|
81
|
+
storageKey: "movethewheels-live-tracking",
|
|
82
|
+
steps: [
|
|
83
|
+
{
|
|
84
|
+
id: "select",
|
|
85
|
+
label: "Open a delivery",
|
|
86
|
+
description: "Switch to the list and pick a shipment to see full details.",
|
|
87
|
+
icon: /* @__PURE__ */ D(M, { size: 16 }),
|
|
88
|
+
onClick: () => z("list")
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "alerts",
|
|
92
|
+
label: "Clear outstanding alerts",
|
|
93
|
+
description: "Review delays and exceptions that need attention.",
|
|
94
|
+
icon: /* @__PURE__ */ D(_, { size: 16 }),
|
|
95
|
+
done: L.length === 0,
|
|
96
|
+
onClick: () => z("list")
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "new-order",
|
|
100
|
+
label: "Create another order",
|
|
101
|
+
description: "Add a new delivery to the pipeline.",
|
|
102
|
+
icon: /* @__PURE__ */ D(h, { size: 16 }),
|
|
103
|
+
onClick: () => H("orders/new")
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ O(x, {
|
|
108
|
+
columns: 4,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ D(S, {
|
|
111
|
+
size: "sm",
|
|
112
|
+
label: "Active Deliveries",
|
|
113
|
+
value: P.length,
|
|
114
|
+
icon: /* @__PURE__ */ D(_, { size: 18 })
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ D(S, {
|
|
117
|
+
size: "sm",
|
|
118
|
+
label: "In Transit",
|
|
119
|
+
value: P.filter((e) => e.order?.status === "in_transit").length,
|
|
120
|
+
icon: /* @__PURE__ */ D(h, { size: 18 })
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ D(S, {
|
|
123
|
+
size: "sm",
|
|
124
|
+
label: "Out for Delivery",
|
|
125
|
+
value: P.filter((e) => e.order?.status === "out_for_delivery").length,
|
|
126
|
+
icon: /* @__PURE__ */ D(p, { size: 18 })
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ D(S, {
|
|
129
|
+
size: "sm",
|
|
130
|
+
label: "Alerts",
|
|
131
|
+
value: L.length,
|
|
132
|
+
changeType: L.length > 0 ? "negative" : "neutral"
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ O("div", {
|
|
137
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
138
|
+
children: [/* @__PURE__ */ D("div", {
|
|
139
|
+
className: "lg:col-span-2",
|
|
140
|
+
children: R === "map" ? /* @__PURE__ */ D(i, {
|
|
141
|
+
className: "h-[600px]",
|
|
142
|
+
children: /* @__PURE__ */ D(a, {
|
|
143
|
+
className: "p-0 h-full",
|
|
144
|
+
children: /* @__PURE__ */ D("div", {
|
|
145
|
+
className: "w-full h-full bg-bg-sunken rounded-lg flex items-center justify-center",
|
|
146
|
+
children: /* @__PURE__ */ O("div", {
|
|
147
|
+
className: "text-center text-text-secondary",
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ D(p, {
|
|
150
|
+
size: 64,
|
|
151
|
+
className: "mx-auto mb-4 opacity-50"
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ D("p", {
|
|
154
|
+
className: "text-lg font-medium",
|
|
155
|
+
children: "Map View"
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ O("p", {
|
|
158
|
+
className: "text-sm",
|
|
159
|
+
children: [
|
|
160
|
+
"Interactive map showing ",
|
|
161
|
+
P.length,
|
|
162
|
+
" active deliveries"
|
|
163
|
+
]
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ D("p", {
|
|
166
|
+
className: "text-xs mt-2",
|
|
167
|
+
children: "(Map integration with Mapbox/Google Maps would go here)"
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
})
|
|
171
|
+
})
|
|
172
|
+
})
|
|
173
|
+
}) : /* @__PURE__ */ O(i, { children: [/* @__PURE__ */ D(s, { children: /* @__PURE__ */ D(o, { children: "Active Deliveries" }) }), /* @__PURE__ */ D(a, {
|
|
174
|
+
className: "p-0",
|
|
175
|
+
children: /* @__PURE__ */ D(t, {
|
|
176
|
+
className: "h-[550px]",
|
|
177
|
+
children: /* @__PURE__ */ O("div", {
|
|
178
|
+
className: "divide-y",
|
|
179
|
+
children: [P.map((e) => e.order ? /* @__PURE__ */ D("div", {
|
|
180
|
+
className: `p-4 hover:bg-bg-sunken/50 cursor-pointer transition-colors ${B === e.order.id ? "bg-bg-sunken/50" : ""}`,
|
|
181
|
+
onClick: () => V(e.order.id),
|
|
182
|
+
children: /* @__PURE__ */ O("div", {
|
|
183
|
+
className: "flex items-start justify-between",
|
|
184
|
+
children: [/* @__PURE__ */ O("div", { children: [
|
|
185
|
+
/* @__PURE__ */ O("div", {
|
|
186
|
+
className: "flex items-center gap-2 mb-1",
|
|
187
|
+
children: [/* @__PURE__ */ D("span", {
|
|
188
|
+
className: "font-medium",
|
|
189
|
+
children: e.order.orderNumber
|
|
190
|
+
}), /* @__PURE__ */ D(C, {
|
|
191
|
+
status: e.order.status,
|
|
192
|
+
type: "order",
|
|
193
|
+
size: "sm"
|
|
194
|
+
})]
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ D("p", {
|
|
197
|
+
className: "text-sm text-text-secondary",
|
|
198
|
+
children: e.order.customerInfo.name
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ O("p", {
|
|
201
|
+
className: "text-sm text-text-secondary",
|
|
202
|
+
children: [e.driver?.fullName || "Unassigned", e.vehicle && ` - ${e.vehicle.vehicleNumber}`]
|
|
203
|
+
})
|
|
204
|
+
] }), /* @__PURE__ */ O("div", {
|
|
205
|
+
className: "text-right",
|
|
206
|
+
children: [/* @__PURE__ */ O("p", {
|
|
207
|
+
className: "text-sm font-medium",
|
|
208
|
+
children: [
|
|
209
|
+
"ETA:",
|
|
210
|
+
" ",
|
|
211
|
+
e.estimatedArrival ? w(e.estimatedArrival, "time") : "N/A"
|
|
212
|
+
]
|
|
213
|
+
}), /* @__PURE__ */ D("p", {
|
|
214
|
+
className: "text-xs text-text-secondary",
|
|
215
|
+
children: e.tracking?.currentLocation.address || "Location updating..."
|
|
216
|
+
})]
|
|
217
|
+
})]
|
|
218
|
+
})
|
|
219
|
+
}, e.order.id) : null), P.length === 0 && /* @__PURE__ */ D(d, {
|
|
220
|
+
illustration: "empty-sessions",
|
|
221
|
+
title: "No active deliveries",
|
|
222
|
+
description: "When orders are dispatched they'll appear here in real time."
|
|
223
|
+
})]
|
|
224
|
+
})
|
|
225
|
+
})
|
|
226
|
+
})] })
|
|
227
|
+
}), /* @__PURE__ */ O("div", {
|
|
228
|
+
className: "space-y-6",
|
|
229
|
+
children: [
|
|
230
|
+
U ? /* @__PURE__ */ O(k, {
|
|
231
|
+
className: "space-y-4",
|
|
232
|
+
children: [/* @__PURE__ */ O("div", {
|
|
233
|
+
className: "flex items-center justify-between",
|
|
234
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
235
|
+
className: "text-base font-semibold text-text-primary",
|
|
236
|
+
children: "Delivery Details"
|
|
237
|
+
}), /* @__PURE__ */ D(f, {
|
|
238
|
+
variant: "ghost",
|
|
239
|
+
size: "sm",
|
|
240
|
+
onClick: () => V(null),
|
|
241
|
+
children: "Clear"
|
|
242
|
+
})]
|
|
243
|
+
}), /* @__PURE__ */ O("div", {
|
|
244
|
+
className: "space-y-4",
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
247
|
+
className: "text-sm text-text-secondary",
|
|
248
|
+
children: "Order"
|
|
249
|
+
}), /* @__PURE__ */ D("p", {
|
|
250
|
+
className: "font-medium",
|
|
251
|
+
children: U.order?.orderNumber ?? "-"
|
|
252
|
+
})] }),
|
|
253
|
+
/* @__PURE__ */ O("div", { children: [
|
|
254
|
+
/* @__PURE__ */ D("p", {
|
|
255
|
+
className: "text-sm text-text-secondary",
|
|
256
|
+
children: "Customer"
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ D("p", {
|
|
259
|
+
className: "font-medium",
|
|
260
|
+
children: U.order?.customerInfo.name ?? "-"
|
|
261
|
+
}),
|
|
262
|
+
/* @__PURE__ */ D("p", {
|
|
263
|
+
className: "text-sm text-text-secondary",
|
|
264
|
+
children: U.order?.customerInfo.phone ?? "-"
|
|
265
|
+
})
|
|
266
|
+
] }),
|
|
267
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
268
|
+
className: "text-sm text-text-secondary",
|
|
269
|
+
children: "Driver"
|
|
270
|
+
}), /* @__PURE__ */ D("p", {
|
|
271
|
+
className: "font-medium",
|
|
272
|
+
children: U.driver?.fullName || "Unassigned"
|
|
273
|
+
})] }),
|
|
274
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
275
|
+
className: "text-sm text-text-secondary",
|
|
276
|
+
children: "Vehicle"
|
|
277
|
+
}), /* @__PURE__ */ D("p", {
|
|
278
|
+
className: "font-medium",
|
|
279
|
+
children: U.vehicle ? `${U.vehicle.vehicleNumber} - ${U.vehicle.make} ${U.vehicle.model}` : "Not assigned"
|
|
280
|
+
})] }),
|
|
281
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
282
|
+
className: "text-sm text-text-secondary",
|
|
283
|
+
children: "Current Location"
|
|
284
|
+
}), /* @__PURE__ */ D("p", {
|
|
285
|
+
className: "text-sm",
|
|
286
|
+
children: U.tracking?.currentLocation.address || "Updating..."
|
|
287
|
+
})] }),
|
|
288
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
289
|
+
className: "text-sm text-text-secondary",
|
|
290
|
+
children: "Estimated Arrival"
|
|
291
|
+
}), /* @__PURE__ */ D("p", {
|
|
292
|
+
className: "font-medium",
|
|
293
|
+
children: U.estimatedArrival ? w(U.estimatedArrival, "full") : "Calculating..."
|
|
294
|
+
})] }),
|
|
295
|
+
/* @__PURE__ */ O("div", {
|
|
296
|
+
className: "pt-2 space-y-2",
|
|
297
|
+
children: [/* @__PURE__ */ D(f, {
|
|
298
|
+
className: "w-full",
|
|
299
|
+
onClick: () => U.order && H(`orders/${U.order.id}`),
|
|
300
|
+
disabled: !U.order,
|
|
301
|
+
children: "View Order"
|
|
302
|
+
}), /* @__PURE__ */ D(f, {
|
|
303
|
+
variant: "outline",
|
|
304
|
+
className: "w-full",
|
|
305
|
+
onClick: () => U.order && H(`tracking?order=${U.order.id}`),
|
|
306
|
+
disabled: !U.order,
|
|
307
|
+
children: "Track Details"
|
|
308
|
+
})]
|
|
309
|
+
})
|
|
310
|
+
]
|
|
311
|
+
})]
|
|
312
|
+
}) : /* @__PURE__ */ D(i, { children: /* @__PURE__ */ D(a, {
|
|
313
|
+
className: "p-6",
|
|
314
|
+
children: /* @__PURE__ */ D(d, {
|
|
315
|
+
illustration: "empty-generic",
|
|
316
|
+
title: "No delivery selected",
|
|
317
|
+
description: "Pick a delivery from the list to see its driver, vehicle, ETA and live location."
|
|
318
|
+
})
|
|
319
|
+
}) }),
|
|
320
|
+
/* @__PURE__ */ O(i, { children: [/* @__PURE__ */ D(s, { children: /* @__PURE__ */ O(o, {
|
|
321
|
+
className: "flex items-center gap-2",
|
|
322
|
+
children: ["Alerts", L.length > 0 && /* @__PURE__ */ D(u, {
|
|
323
|
+
variant: "destructive",
|
|
324
|
+
children: L.length
|
|
325
|
+
})]
|
|
326
|
+
}) }), /* @__PURE__ */ D(a, { children: L.length > 0 ? /* @__PURE__ */ D("div", {
|
|
327
|
+
className: "space-y-3",
|
|
328
|
+
children: L.slice(0, 5).map((e) => /* @__PURE__ */ O("div", {
|
|
329
|
+
className: `p-3 rounded-lg text-sm ${e.severity === "critical" || e.severity === "high" ? "bg-red-50 dark:bg-red-900/20" : "bg-yellow-50 dark:bg-yellow-900/20"}`,
|
|
330
|
+
children: [/* @__PURE__ */ D("p", {
|
|
331
|
+
className: "font-medium",
|
|
332
|
+
children: e.message
|
|
333
|
+
}), /* @__PURE__ */ D("p", {
|
|
334
|
+
className: "text-xs text-text-secondary mt-1",
|
|
335
|
+
children: w(e.timestamp, "relative")
|
|
336
|
+
})]
|
|
337
|
+
}, e.id))
|
|
338
|
+
}) : /* @__PURE__ */ D("div", {
|
|
339
|
+
className: "text-center text-text-secondary py-4",
|
|
340
|
+
children: /* @__PURE__ */ D("p", {
|
|
341
|
+
className: "text-sm",
|
|
342
|
+
children: "No active alerts"
|
|
343
|
+
})
|
|
344
|
+
}) })] }),
|
|
345
|
+
/* @__PURE__ */ O(i, { children: [/* @__PURE__ */ D(s, { children: /* @__PURE__ */ D(o, { children: "Quick Actions" }) }), /* @__PURE__ */ O(a, {
|
|
346
|
+
className: "space-y-2",
|
|
347
|
+
children: [
|
|
348
|
+
/* @__PURE__ */ O(f, {
|
|
349
|
+
variant: "outline",
|
|
350
|
+
className: "w-full",
|
|
351
|
+
onClick: () => H("orders/new"),
|
|
352
|
+
children: [/* @__PURE__ */ D(h, { size: 16 }), "Create Order"]
|
|
353
|
+
}),
|
|
354
|
+
/* @__PURE__ */ O(f, {
|
|
355
|
+
variant: "outline",
|
|
356
|
+
className: "w-full",
|
|
357
|
+
onClick: () => H("routes"),
|
|
358
|
+
children: [/* @__PURE__ */ D(p, { size: 16 }), "Manage Routes"]
|
|
359
|
+
}),
|
|
360
|
+
/* @__PURE__ */ O(f, {
|
|
361
|
+
variant: "outline",
|
|
362
|
+
className: "w-full",
|
|
363
|
+
onClick: () => H("fleet"),
|
|
364
|
+
children: [/* @__PURE__ */ D(_, { size: 16 }), "Fleet Status"]
|
|
365
|
+
})
|
|
366
|
+
]
|
|
367
|
+
})] })
|
|
368
|
+
]
|
|
369
|
+
})]
|
|
370
|
+
})
|
|
371
|
+
]
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
//#endregion
|
|
375
|
+
export { N as default };
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { A as e, d as t, f as n, g as r, h as i, i as a, l as o, u as s } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as c } from "./clock-BjkdnddD.js";
|
|
3
|
+
import { t as l } from "./filter-Da5OZaHI.js";
|
|
4
|
+
import { t as u } from "./map-pin-BSaf5IDL.js";
|
|
5
|
+
import { t as d } from "./search-OxoIiL_C.js";
|
|
6
|
+
import { t as f } from "./star-YsVV3MNQ.js";
|
|
7
|
+
import { t as p } from "./store-RCBl7HB-.js";
|
|
8
|
+
import { r as m, t as h } from "./graphqlClient-CdJyR_ed.js";
|
|
9
|
+
import { n as g } from "./formatters-_vJlC-47.js";
|
|
10
|
+
import { useCallback as _, useEffect as v, useMemo as y, useState as b } from "react";
|
|
11
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
12
|
+
import { EmphasisPanel as C, IllustratedEmptyState as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
//#region src/movethewheels/pages/MarketplacePage.tsx
|
|
14
|
+
var E = "\n query ListServiceProviders($filter: ServiceProviderFilterInput, $pagination: PaginationInput) {\n serviceProviders(filter: $filter, pagination: $pagination) {\n id\n name\n type\n description\n rating\n isVerified\n isActive\n services\n contactInfo\n }\n }\n", D = "\n query ListServiceOfferings($filter: ServiceOfferingFilterInput, $pagination: PaginationInput) {\n serviceOfferings(filter: $filter, pagination: $pagination) {\n id\n providerId\n name\n description\n category\n price\n currency\n availability\n provider {\n id\n name\n type\n rating\n }\n }\n }\n";
|
|
15
|
+
function O() {
|
|
16
|
+
let { apiGatewayUrl: O, authToken: k, workspaceToken: A, workspaceId: j, tenantId: M, currentUser: N } = m(), [P, F] = b([]), [I, L] = b([]), [R, z] = b(""), B = y(() => ({
|
|
17
|
+
apiGatewayUrl: O,
|
|
18
|
+
authToken: k,
|
|
19
|
+
workspaceToken: A,
|
|
20
|
+
workspaceId: j,
|
|
21
|
+
tenantId: M,
|
|
22
|
+
actorId: N?.id
|
|
23
|
+
}), [
|
|
24
|
+
O,
|
|
25
|
+
k,
|
|
26
|
+
A,
|
|
27
|
+
j,
|
|
28
|
+
M,
|
|
29
|
+
N?.id
|
|
30
|
+
]), V = _(async () => {
|
|
31
|
+
let [e, t] = await Promise.all([h(B, E, { pagination: {
|
|
32
|
+
limit: 200,
|
|
33
|
+
offset: 0
|
|
34
|
+
} }), h(B, D, { pagination: {
|
|
35
|
+
limit: 200,
|
|
36
|
+
offset: 0
|
|
37
|
+
} })]);
|
|
38
|
+
F(e.serviceProviders), L(t.serviceOfferings);
|
|
39
|
+
}, [B]);
|
|
40
|
+
v(() => {
|
|
41
|
+
V();
|
|
42
|
+
}, [V]);
|
|
43
|
+
let H = y(() => {
|
|
44
|
+
let e = R.trim().toLowerCase();
|
|
45
|
+
return e ? P.filter((t) => t.name.toLowerCase().includes(e) || (t.description ?? "").toLowerCase().includes(e) || t.type.toLowerCase().includes(e)) : P;
|
|
46
|
+
}, [P, R]), U = y(() => {
|
|
47
|
+
let e = R.trim().toLowerCase();
|
|
48
|
+
return e ? I.filter((t) => t.name.toLowerCase().includes(e) || (t.description ?? "").toLowerCase().includes(e) || (t.category ?? "").toLowerCase().includes(e)) : I;
|
|
49
|
+
}, [I, R]);
|
|
50
|
+
return /* @__PURE__ */ S(a, {
|
|
51
|
+
title: "Marketplace",
|
|
52
|
+
subtitle: "Find logistics service providers",
|
|
53
|
+
icon: /* @__PURE__ */ x(p, { size: 24 }),
|
|
54
|
+
headerActions: /* @__PURE__ */ S(s, {
|
|
55
|
+
variant: "outline",
|
|
56
|
+
children: [/* @__PURE__ */ x(l, { size: 16 }), " Filters"]
|
|
57
|
+
}),
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ x(T, {
|
|
60
|
+
icon: /* @__PURE__ */ x(p, { size: 18 }),
|
|
61
|
+
children: "Don't own every leg of the journey? Find vetted third-party logistics providers and service offerings here — compare ratings, verification status and pricing, then engage a partner to cover routes, warehousing or specialised handling you can't do in-house."
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ x(t, { children: /* @__PURE__ */ x(n, {
|
|
64
|
+
className: "p-4",
|
|
65
|
+
children: /* @__PURE__ */ S("div", {
|
|
66
|
+
className: "relative",
|
|
67
|
+
children: [/* @__PURE__ */ x(d, {
|
|
68
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
|
|
69
|
+
size: 20
|
|
70
|
+
}), /* @__PURE__ */ x(e, {
|
|
71
|
+
placeholder: "Search services, providers, locations...",
|
|
72
|
+
className: "pl-10",
|
|
73
|
+
value: R,
|
|
74
|
+
onChange: (e) => z(e.target.value)
|
|
75
|
+
})]
|
|
76
|
+
})
|
|
77
|
+
}) }),
|
|
78
|
+
/* @__PURE__ */ S("div", {
|
|
79
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
80
|
+
children: [/* @__PURE__ */ S("div", {
|
|
81
|
+
className: "lg:col-span-2 space-y-4",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ S("h3", {
|
|
84
|
+
className: "font-semibold",
|
|
85
|
+
children: [
|
|
86
|
+
"Service Providers (",
|
|
87
|
+
H.length,
|
|
88
|
+
")"
|
|
89
|
+
]
|
|
90
|
+
}),
|
|
91
|
+
H.length === 0 && /* @__PURE__ */ x(t, { children: /* @__PURE__ */ x(n, {
|
|
92
|
+
className: "p-0",
|
|
93
|
+
children: /* @__PURE__ */ x(w, {
|
|
94
|
+
illustration: R.trim() ? "empty-search" : "empty-people",
|
|
95
|
+
title: R.trim() ? "No providers match your search" : "No providers yet",
|
|
96
|
+
description: R.trim() ? "Try a different search term to find logistics partners." : "Verified logistics service providers will appear here as they join the marketplace."
|
|
97
|
+
})
|
|
98
|
+
}) }),
|
|
99
|
+
H.map((e) => /* @__PURE__ */ x(t, {
|
|
100
|
+
className: "hover:shadow-md transition-shadow cursor-pointer",
|
|
101
|
+
children: /* @__PURE__ */ x(n, {
|
|
102
|
+
className: "p-6",
|
|
103
|
+
children: /* @__PURE__ */ S("div", {
|
|
104
|
+
className: "flex items-start justify-between",
|
|
105
|
+
children: [/* @__PURE__ */ S("div", { children: [
|
|
106
|
+
/* @__PURE__ */ S("div", {
|
|
107
|
+
className: "flex items-center gap-2",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ x("h4", {
|
|
110
|
+
className: "font-semibold text-lg",
|
|
111
|
+
children: e.name
|
|
112
|
+
}),
|
|
113
|
+
e.isVerified && /* @__PURE__ */ x(o, {
|
|
114
|
+
variant: "default",
|
|
115
|
+
children: "Verified"
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ x(o, {
|
|
118
|
+
variant: e.isActive ? "default" : "secondary",
|
|
119
|
+
children: e.isActive ? "active" : "inactive"
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ x("p", {
|
|
124
|
+
className: "text-text-secondary mt-1",
|
|
125
|
+
children: e.description
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ S("div", {
|
|
128
|
+
className: "flex items-center gap-4 mt-3 text-sm text-text-secondary",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ S("span", {
|
|
131
|
+
className: "flex items-center gap-1",
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ x(f, {
|
|
134
|
+
size: 14,
|
|
135
|
+
className: "text-yellow-500 fill-yellow-500"
|
|
136
|
+
}),
|
|
137
|
+
" ",
|
|
138
|
+
e.rating ?? 0
|
|
139
|
+
]
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ S("span", {
|
|
142
|
+
className: "flex items-center gap-1",
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ x(u, { size: 14 }),
|
|
145
|
+
" ",
|
|
146
|
+
e.type
|
|
147
|
+
]
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ S("span", {
|
|
150
|
+
className: "flex items-center gap-1",
|
|
151
|
+
children: [/* @__PURE__ */ x(c, { size: 14 }), " Listed"]
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
})
|
|
155
|
+
] }), /* @__PURE__ */ S("div", {
|
|
156
|
+
className: "text-right",
|
|
157
|
+
children: [/* @__PURE__ */ x("p", {
|
|
158
|
+
className: "text-sm text-text-secondary",
|
|
159
|
+
children: "Services"
|
|
160
|
+
}), /* @__PURE__ */ x("p", {
|
|
161
|
+
className: "text-lg font-bold",
|
|
162
|
+
children: Array.isArray(e.services) ? e.services.length : 0
|
|
163
|
+
})]
|
|
164
|
+
})]
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
}, e.id))
|
|
168
|
+
]
|
|
169
|
+
}), /* @__PURE__ */ S(C, {
|
|
170
|
+
className: "space-y-4",
|
|
171
|
+
children: [
|
|
172
|
+
/* @__PURE__ */ x("h3", {
|
|
173
|
+
className: "text-base font-semibold text-text-primary",
|
|
174
|
+
children: "Popular Services"
|
|
175
|
+
}),
|
|
176
|
+
U.length === 0 && /* @__PURE__ */ x(w, {
|
|
177
|
+
illustration: R.trim() ? "empty-search" : "empty-generic",
|
|
178
|
+
title: R.trim() ? "No matching services" : "No services listed yet",
|
|
179
|
+
description: R.trim() ? "Adjust your search to discover service offerings." : "Service offerings from providers will be listed here."
|
|
180
|
+
}),
|
|
181
|
+
U.map((e) => /* @__PURE__ */ S(t, { children: [/* @__PURE__ */ x(i, { children: /* @__PURE__ */ x(r, {
|
|
182
|
+
className: "text-base",
|
|
183
|
+
children: e.name
|
|
184
|
+
}) }), /* @__PURE__ */ S(n, { children: [
|
|
185
|
+
/* @__PURE__ */ x("p", {
|
|
186
|
+
className: "text-sm text-text-secondary mb-3",
|
|
187
|
+
children: e.description
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ S("div", {
|
|
190
|
+
className: "flex flex-wrap gap-1 mb-3",
|
|
191
|
+
children: [/* @__PURE__ */ x(o, {
|
|
192
|
+
variant: "outline",
|
|
193
|
+
className: "text-xs",
|
|
194
|
+
children: e.category ?? "general"
|
|
195
|
+
}), /* @__PURE__ */ x(o, {
|
|
196
|
+
variant: "outline",
|
|
197
|
+
className: "text-xs",
|
|
198
|
+
children: e.provider?.name ?? "provider"
|
|
199
|
+
})]
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ S("div", {
|
|
202
|
+
className: "flex items-center justify-between",
|
|
203
|
+
children: [/* @__PURE__ */ x("span", {
|
|
204
|
+
className: "font-bold",
|
|
205
|
+
children: g(e.price)
|
|
206
|
+
}), /* @__PURE__ */ x("span", {
|
|
207
|
+
className: "text-sm text-text-secondary",
|
|
208
|
+
children: e.currency
|
|
209
|
+
})]
|
|
210
|
+
})
|
|
211
|
+
] })] }, e.id))
|
|
212
|
+
]
|
|
213
|
+
})]
|
|
214
|
+
})
|
|
215
|
+
]
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
export { O as default };
|