@burdenoff/microfe-movethewheels 2026.625.1 → 2026.626.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/{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,309 @@
|
|
|
1
|
+
import { F as e, I as t, L as n, P as r, R as i, d as a, f as o, i as s, l as c, u as l } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as u } from "./DataTable-CD9ZhpLB.js";
|
|
3
|
+
import { t as d } from "./download-Dpa9vqoG.js";
|
|
4
|
+
import { t as f } from "./filter-Da5OZaHI.js";
|
|
5
|
+
import { t as p } from "./package-BE7U0wQE.js";
|
|
6
|
+
import { t as m } from "./plus-Dl1rLeJR.js";
|
|
7
|
+
import { t as h } from "./refresh-cw-CWfERAit.js";
|
|
8
|
+
import { r as g } from "./graphqlClient-CdJyR_ed.js";
|
|
9
|
+
import { r as _ } from "./useOrders-D_3_hGMp.js";
|
|
10
|
+
import { i as v, n as y, r as b } from "./StatusBadge-CijYQXtb.js";
|
|
11
|
+
import { n as x, r as S } from "./formatters-_vJlC-47.js";
|
|
12
|
+
import { t as C } from "./navigation-BgnOfsVd.js";
|
|
13
|
+
import { useState as w } from "react";
|
|
14
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
15
|
+
import { CTAOverflowMenu as D, EmphasisPanel as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
+
//#region src/movethewheels/pages/OrdersListPage.tsx
|
|
18
|
+
function j() {
|
|
19
|
+
let { t: j } = A(), M = (e, t) => {
|
|
20
|
+
let n = j(e);
|
|
21
|
+
return n === e ? t : n;
|
|
22
|
+
}, { basePath: N, navigate: P } = g(), [F, I] = w("all"), [L, R] = w("all"), { orders: z, totalOrders: B, isLoading: V, refetch: H } = _({
|
|
23
|
+
filters: {
|
|
24
|
+
status: F === "all" ? void 0 : F,
|
|
25
|
+
orderType: L === "all" ? void 0 : L
|
|
26
|
+
},
|
|
27
|
+
limit: 50
|
|
28
|
+
}), U = (e) => {
|
|
29
|
+
P && P(C(N, e));
|
|
30
|
+
}, W = [
|
|
31
|
+
{
|
|
32
|
+
id: "orderNumber",
|
|
33
|
+
header: M("movethewheels.orders.table.orderNumber", "Order #"),
|
|
34
|
+
accessorKey: "orderNumber",
|
|
35
|
+
sortable: !0,
|
|
36
|
+
className: "min-w-[100px] whitespace-nowrap",
|
|
37
|
+
cell: (e) => /* @__PURE__ */ T("span", {
|
|
38
|
+
className: "font-medium text-primary",
|
|
39
|
+
children: e.orderNumber
|
|
40
|
+
})
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "customer",
|
|
44
|
+
header: M("movethewheels.orders.table.customer", "Customer"),
|
|
45
|
+
className: "min-w-[180px] max-w-[220px]",
|
|
46
|
+
cell: (e) => /* @__PURE__ */ E("div", {
|
|
47
|
+
className: "min-w-0",
|
|
48
|
+
children: [/* @__PURE__ */ T("p", {
|
|
49
|
+
className: "font-medium truncate",
|
|
50
|
+
children: e.customerInfo.name
|
|
51
|
+
}), /* @__PURE__ */ T("p", {
|
|
52
|
+
className: "text-sm text-text-secondary truncate",
|
|
53
|
+
children: e.customerInfo.email
|
|
54
|
+
})]
|
|
55
|
+
})
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "status",
|
|
59
|
+
header: M("movethewheels.orders.table.status", "Status"),
|
|
60
|
+
accessorKey: "status",
|
|
61
|
+
sortable: !0,
|
|
62
|
+
className: "min-w-[130px] whitespace-nowrap",
|
|
63
|
+
cell: (e) => /* @__PURE__ */ T(b, {
|
|
64
|
+
status: e.status,
|
|
65
|
+
type: "order"
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "type",
|
|
70
|
+
header: M("movethewheels.orders.table.type", "Type"),
|
|
71
|
+
accessorKey: "orderType",
|
|
72
|
+
className: "min-w-[70px] whitespace-nowrap",
|
|
73
|
+
cell: (e) => /* @__PURE__ */ T(v, { type: e.orderType })
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "priority",
|
|
77
|
+
header: M("movethewheels.orders.table.priority", "Priority"),
|
|
78
|
+
accessorKey: "priority",
|
|
79
|
+
sortable: !0,
|
|
80
|
+
className: "min-w-[90px] whitespace-nowrap",
|
|
81
|
+
cell: (e) => /* @__PURE__ */ T(y, { priority: e.priority })
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "items",
|
|
85
|
+
header: M("movethewheels.orders.table.items", "Items"),
|
|
86
|
+
className: "min-w-[80px] whitespace-nowrap",
|
|
87
|
+
cell: (e) => /* @__PURE__ */ E(c, {
|
|
88
|
+
variant: "secondary",
|
|
89
|
+
children: [
|
|
90
|
+
e.items.length,
|
|
91
|
+
" ",
|
|
92
|
+
M("movethewheels.orders.table.itemsSuffix", "items")
|
|
93
|
+
]
|
|
94
|
+
})
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "total",
|
|
98
|
+
header: M("movethewheels.orders.table.total", "Total"),
|
|
99
|
+
accessorKey: "pricing",
|
|
100
|
+
sortable: !0,
|
|
101
|
+
className: "min-w-[100px] whitespace-nowrap text-right",
|
|
102
|
+
cell: (e) => /* @__PURE__ */ T("span", {
|
|
103
|
+
className: "font-medium",
|
|
104
|
+
children: x(e.pricing.total)
|
|
105
|
+
})
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "scheduledDelivery",
|
|
109
|
+
header: M("movethewheels.orders.table.deliveryDate", "Delivery Date"),
|
|
110
|
+
accessorKey: "scheduledDelivery",
|
|
111
|
+
sortable: !0,
|
|
112
|
+
className: "min-w-[110px] whitespace-nowrap",
|
|
113
|
+
cell: (e) => e.scheduledDelivery ? S(e.scheduledDelivery) : "-"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "createdAt",
|
|
117
|
+
header: M("movethewheels.orders.table.created", "Created"),
|
|
118
|
+
accessorKey: "createdAt",
|
|
119
|
+
sortable: !0,
|
|
120
|
+
className: "min-w-[100px] whitespace-nowrap",
|
|
121
|
+
cell: (e) => S(e.createdAt, "relative")
|
|
122
|
+
}
|
|
123
|
+
], G = [
|
|
124
|
+
{
|
|
125
|
+
value: "all",
|
|
126
|
+
label: M("movethewheels.orders.filters.allStatuses", "All Statuses")
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
value: "pending",
|
|
130
|
+
label: M("movethewheels.orders.status.pending", "Pending")
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
value: "confirmed",
|
|
134
|
+
label: M("movethewheels.orders.status.confirmed", "Confirmed")
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
value: "assigned",
|
|
138
|
+
label: M("movethewheels.orders.status.assigned", "Assigned")
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
value: "picked_up",
|
|
142
|
+
label: M("movethewheels.orders.status.pickedUp", "Picked Up")
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
value: "in_transit",
|
|
146
|
+
label: M("movethewheels.orders.status.inTransit", "In Transit")
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
value: "out_for_delivery",
|
|
150
|
+
label: M("movethewheels.orders.status.outForDelivery", "Out for Delivery")
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
value: "delivered",
|
|
154
|
+
label: M("movethewheels.orders.status.delivered", "Delivered")
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
value: "cancelled",
|
|
158
|
+
label: M("movethewheels.orders.status.cancelled", "Cancelled")
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
value: "failed",
|
|
162
|
+
label: M("movethewheels.orders.status.failed", "Failed")
|
|
163
|
+
}
|
|
164
|
+
];
|
|
165
|
+
return /* @__PURE__ */ E(s, {
|
|
166
|
+
title: M("movethewheels.orders.title", "Orders"),
|
|
167
|
+
subtitle: `${B} ${M("movethewheels.orders.subtitle", "total orders")}`,
|
|
168
|
+
icon: /* @__PURE__ */ T(p, { size: 24 }),
|
|
169
|
+
headerActions: /* @__PURE__ */ T(D, {
|
|
170
|
+
primary: {
|
|
171
|
+
label: M("movethewheels.orders.actions.newOrder", "New Order"),
|
|
172
|
+
icon: /* @__PURE__ */ T(m, { size: 16 }),
|
|
173
|
+
onSelect: () => U("orders/new")
|
|
174
|
+
},
|
|
175
|
+
actions: [{
|
|
176
|
+
label: M("movethewheels.orders.actions.refresh", "Refresh"),
|
|
177
|
+
icon: /* @__PURE__ */ T(h, { size: 16 }),
|
|
178
|
+
onSelect: () => H()
|
|
179
|
+
}, {
|
|
180
|
+
label: M("movethewheels.orders.actions.export", "Export"),
|
|
181
|
+
icon: /* @__PURE__ */ T(d, { size: 16 }),
|
|
182
|
+
onSelect: () => {}
|
|
183
|
+
}]
|
|
184
|
+
}),
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ T(k, {
|
|
187
|
+
icon: /* @__PURE__ */ T(p, { size: 18 }),
|
|
188
|
+
children: M("movethewheels.orders.purpose", "Every delivery job lives here — B2B and B2C orders, their status, priority and value. Use this list to find an order, filter by status or type, and open one to assign a driver, track it, or update fulfilment.")
|
|
189
|
+
}),
|
|
190
|
+
/* @__PURE__ */ E(O, { children: [/* @__PURE__ */ T("p", {
|
|
191
|
+
className: "text-sm font-medium text-text-secondary",
|
|
192
|
+
children: M("movethewheels.orders.glance.title", "Pipeline at a glance")
|
|
193
|
+
}), /* @__PURE__ */ E("div", {
|
|
194
|
+
className: "mt-3 grid grid-cols-2 sm:grid-cols-4 gap-4",
|
|
195
|
+
children: [
|
|
196
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
197
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
198
|
+
children: B
|
|
199
|
+
}), /* @__PURE__ */ T("p", {
|
|
200
|
+
className: "text-xs text-text-secondary",
|
|
201
|
+
children: M("movethewheels.orders.glance.total", "Total orders")
|
|
202
|
+
})] }),
|
|
203
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
204
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
205
|
+
children: z.filter((e) => e.status === "pending").length
|
|
206
|
+
}), /* @__PURE__ */ T("p", {
|
|
207
|
+
className: "text-xs text-text-secondary",
|
|
208
|
+
children: M("movethewheels.orders.glance.pending", "Pending")
|
|
209
|
+
})] }),
|
|
210
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
211
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
212
|
+
children: z.filter((e) => e.status === "in_transit" || e.status === "out_for_delivery").length
|
|
213
|
+
}), /* @__PURE__ */ T("p", {
|
|
214
|
+
className: "text-xs text-text-secondary",
|
|
215
|
+
children: M("movethewheels.orders.glance.inTransit", "In transit")
|
|
216
|
+
})] }),
|
|
217
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
218
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
219
|
+
children: z.filter((e) => e.status === "delivered").length
|
|
220
|
+
}), /* @__PURE__ */ T("p", {
|
|
221
|
+
className: "text-xs text-text-secondary",
|
|
222
|
+
children: M("movethewheels.orders.glance.delivered", "Delivered")
|
|
223
|
+
})] })
|
|
224
|
+
]
|
|
225
|
+
})] }),
|
|
226
|
+
/* @__PURE__ */ T(a, { children: /* @__PURE__ */ T(o, {
|
|
227
|
+
className: "p-4",
|
|
228
|
+
children: /* @__PURE__ */ E("div", {
|
|
229
|
+
className: "flex flex-wrap items-center gap-4",
|
|
230
|
+
children: [
|
|
231
|
+
/* @__PURE__ */ E("div", {
|
|
232
|
+
className: "flex items-center gap-2",
|
|
233
|
+
children: [/* @__PURE__ */ T(f, {
|
|
234
|
+
size: 16,
|
|
235
|
+
className: "text-text-secondary"
|
|
236
|
+
}), /* @__PURE__ */ T("span", {
|
|
237
|
+
className: "text-sm font-medium",
|
|
238
|
+
children: M("movethewheels.orders.filters.label", "Filters:")
|
|
239
|
+
})]
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ E(r, {
|
|
242
|
+
value: F,
|
|
243
|
+
onValueChange: (e) => I(e),
|
|
244
|
+
children: [/* @__PURE__ */ T(n, {
|
|
245
|
+
className: "w-[180px]",
|
|
246
|
+
children: /* @__PURE__ */ T(i, { placeholder: M("movethewheels.orders.filters.status", "Status") })
|
|
247
|
+
}), /* @__PURE__ */ T(e, { children: G.map((e) => /* @__PURE__ */ T(t, {
|
|
248
|
+
value: e.value,
|
|
249
|
+
children: e.label
|
|
250
|
+
}, e.value)) })]
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ E(r, {
|
|
253
|
+
value: L,
|
|
254
|
+
onValueChange: (e) => R(e),
|
|
255
|
+
children: [/* @__PURE__ */ T(n, {
|
|
256
|
+
className: "w-[150px]",
|
|
257
|
+
children: /* @__PURE__ */ T(i, { placeholder: M("movethewheels.orders.filters.type", "Type") })
|
|
258
|
+
}), /* @__PURE__ */ E(e, { children: [
|
|
259
|
+
/* @__PURE__ */ T(t, {
|
|
260
|
+
value: "all",
|
|
261
|
+
children: M("movethewheels.orders.filters.allTypes", "All Types")
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ T(t, {
|
|
264
|
+
value: "b2b",
|
|
265
|
+
children: "B2B"
|
|
266
|
+
}),
|
|
267
|
+
/* @__PURE__ */ T(t, {
|
|
268
|
+
value: "b2c",
|
|
269
|
+
children: "B2C"
|
|
270
|
+
})
|
|
271
|
+
] })]
|
|
272
|
+
}),
|
|
273
|
+
(F !== "all" || L !== "all") && /* @__PURE__ */ T(l, {
|
|
274
|
+
variant: "ghost",
|
|
275
|
+
size: "sm",
|
|
276
|
+
onClick: () => {
|
|
277
|
+
I("all"), R("all");
|
|
278
|
+
},
|
|
279
|
+
children: M("movethewheels.orders.filters.clear", "Clear filters")
|
|
280
|
+
})
|
|
281
|
+
]
|
|
282
|
+
})
|
|
283
|
+
}) }),
|
|
284
|
+
/* @__PURE__ */ T(u, {
|
|
285
|
+
columns: W,
|
|
286
|
+
data: z,
|
|
287
|
+
isLoading: V,
|
|
288
|
+
searchable: !0,
|
|
289
|
+
searchPlaceholder: M("movethewheels.orders.searchPlaceholder", "Search orders..."),
|
|
290
|
+
searchFields: ["orderNumber", "customerInfo"],
|
|
291
|
+
onRowClick: (e) => U(`orders/${e.id}`),
|
|
292
|
+
getRowId: (e) => e.id,
|
|
293
|
+
emptyMessage: M("movethewheels.orders.empty", "No orders found"),
|
|
294
|
+
emptyIllustration: "empty-data",
|
|
295
|
+
emptyTitle: M("movethewheels.orders.emptyTitle", "No orders yet"),
|
|
296
|
+
emptyDescription: M("movethewheels.orders.emptyDescription", "Create your first order to start moving shipments through the pipeline."),
|
|
297
|
+
emptyAction: /* @__PURE__ */ E(l, {
|
|
298
|
+
onClick: () => U("orders/new"),
|
|
299
|
+
children: [/* @__PURE__ */ T(m, {
|
|
300
|
+
size: 16,
|
|
301
|
+
className: "mr-1.5"
|
|
302
|
+
}), M("movethewheels.orders.actions.newOrder", "New Order")]
|
|
303
|
+
})
|
|
304
|
+
})
|
|
305
|
+
]
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
//#endregion
|
|
309
|
+
export { j as default };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { d as e, f as t, g as n, h as r, i, it as a, l as o, n as s, r as c, u as l } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as u } from "./arrow-left-CBpZKkpq.js";
|
|
3
|
+
import { t as d } from "./box-CAaiElsb.js";
|
|
4
|
+
import { t as f } from "./dollar-sign-IB4O0wuQ.js";
|
|
5
|
+
import { t as p } from "./package-BE7U0wQE.js";
|
|
6
|
+
import { t as m } from "./square-pen-hLIbFQFV.js";
|
|
7
|
+
import { r as h } from "./graphqlClient-CdJyR_ed.js";
|
|
8
|
+
import { r as g } from "./useInventory-Dwn18FPz.js";
|
|
9
|
+
import { n as _ } from "./formatters-_vJlC-47.js";
|
|
10
|
+
import { t as v } from "./navigation-BgnOfsVd.js";
|
|
11
|
+
import { useParams as y } from "react-router-dom";
|
|
12
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
13
|
+
import { EmphasisPanel as S, NextSteps as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
//#region node_modules/lucide-react/dist/esm/icons/tag.js
|
|
15
|
+
var T = a("Tag", [["path", {
|
|
16
|
+
d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
|
|
17
|
+
key: "vktsd0"
|
|
18
|
+
}], ["circle", {
|
|
19
|
+
cx: "7.5",
|
|
20
|
+
cy: "7.5",
|
|
21
|
+
r: ".5",
|
|
22
|
+
fill: "currentColor",
|
|
23
|
+
key: "kqv944"
|
|
24
|
+
}]]);
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/movethewheels/pages/ProductDetailsPage.tsx
|
|
27
|
+
function E() {
|
|
28
|
+
let { productId: a } = y(), { basePath: E, navigate: D } = h(), { product: O, isLoading: k, error: A, refetch: j } = g(a), M = () => D?.(v(E, "inventory/products")), N = (e) => D?.(v(E, e));
|
|
29
|
+
return k ? /* @__PURE__ */ b(c, { message: "Loading product details..." }) : A || !O ? /* @__PURE__ */ b(s, {
|
|
30
|
+
title: "Product not found",
|
|
31
|
+
onRetry: j
|
|
32
|
+
}) : /* @__PURE__ */ x(i, {
|
|
33
|
+
title: O.name,
|
|
34
|
+
subtitle: `SKU: ${O.sku}`,
|
|
35
|
+
icon: /* @__PURE__ */ b(p, { size: 24 }),
|
|
36
|
+
headerActions: /* @__PURE__ */ x("div", {
|
|
37
|
+
className: "flex gap-2",
|
|
38
|
+
children: [/* @__PURE__ */ x(l, {
|
|
39
|
+
variant: "outline",
|
|
40
|
+
onClick: M,
|
|
41
|
+
children: [/* @__PURE__ */ b(u, { size: 16 }), " Back"]
|
|
42
|
+
}), /* @__PURE__ */ x(l, { children: [/* @__PURE__ */ b(m, { size: 16 }), " Edit"] })]
|
|
43
|
+
}),
|
|
44
|
+
headerContent: /* @__PURE__ */ x("div", {
|
|
45
|
+
className: "flex gap-2",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ b(o, {
|
|
48
|
+
variant: "outline",
|
|
49
|
+
children: O.category
|
|
50
|
+
}),
|
|
51
|
+
O.brand && /* @__PURE__ */ b(o, {
|
|
52
|
+
variant: "secondary",
|
|
53
|
+
children: O.brand
|
|
54
|
+
}),
|
|
55
|
+
O.fragile && /* @__PURE__ */ b(o, {
|
|
56
|
+
variant: "destructive",
|
|
57
|
+
children: "Fragile"
|
|
58
|
+
}),
|
|
59
|
+
O.hazardous && /* @__PURE__ */ b(o, {
|
|
60
|
+
variant: "destructive",
|
|
61
|
+
children: "Hazardous"
|
|
62
|
+
}),
|
|
63
|
+
O.temperatureControlled && /* @__PURE__ */ b(o, {
|
|
64
|
+
variant: "secondary",
|
|
65
|
+
children: "Temp Controlled"
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}),
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ b(w, {
|
|
71
|
+
icon: /* @__PURE__ */ b(p, { size: 18 }),
|
|
72
|
+
children: "The catalog record for this item — its dimensions, weight, value and handling flags. These drive how it's packed, priced and routed, so keep them accurate before adding the product to an order or stocking it in a warehouse."
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ b(C, {
|
|
75
|
+
storageKey: "movethewheels-product-details",
|
|
76
|
+
steps: [{
|
|
77
|
+
id: "order",
|
|
78
|
+
label: "Add this product to an order",
|
|
79
|
+
description: "Include it on a new delivery.",
|
|
80
|
+
icon: /* @__PURE__ */ b(p, { size: 16 }),
|
|
81
|
+
onClick: () => N("orders/new")
|
|
82
|
+
}, {
|
|
83
|
+
id: "edit",
|
|
84
|
+
label: "Edit product details",
|
|
85
|
+
description: "Update dimensions, value or handling flags.",
|
|
86
|
+
icon: /* @__PURE__ */ b(T, { size: 16 }),
|
|
87
|
+
onClick: () => {}
|
|
88
|
+
}]
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ x("div", {
|
|
91
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
92
|
+
children: [/* @__PURE__ */ x("div", {
|
|
93
|
+
className: "lg:col-span-2 space-y-6",
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ x(e, { children: [/* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(n, { children: "Description" }) }), /* @__PURE__ */ b(t, { children: /* @__PURE__ */ b("p", { children: O.description }) })] }),
|
|
96
|
+
/* @__PURE__ */ x(e, { children: [/* @__PURE__ */ b(r, { children: /* @__PURE__ */ x(n, {
|
|
97
|
+
className: "flex items-center gap-2",
|
|
98
|
+
children: [/* @__PURE__ */ b(d, { size: 18 }), " Dimensions & Weight"]
|
|
99
|
+
}) }), /* @__PURE__ */ b(t, { children: /* @__PURE__ */ x("div", {
|
|
100
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
103
|
+
className: "text-sm text-text-secondary",
|
|
104
|
+
children: "Length"
|
|
105
|
+
}), /* @__PURE__ */ x("p", {
|
|
106
|
+
className: "text-2xl font-bold",
|
|
107
|
+
children: [O.dimensions.length, /* @__PURE__ */ x("span", {
|
|
108
|
+
className: "text-sm font-normal",
|
|
109
|
+
children: [" ", O.dimensions.unit]
|
|
110
|
+
})]
|
|
111
|
+
})] }),
|
|
112
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
113
|
+
className: "text-sm text-text-secondary",
|
|
114
|
+
children: "Width"
|
|
115
|
+
}), /* @__PURE__ */ x("p", {
|
|
116
|
+
className: "text-2xl font-bold",
|
|
117
|
+
children: [O.dimensions.width, /* @__PURE__ */ x("span", {
|
|
118
|
+
className: "text-sm font-normal",
|
|
119
|
+
children: [" ", O.dimensions.unit]
|
|
120
|
+
})]
|
|
121
|
+
})] }),
|
|
122
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
123
|
+
className: "text-sm text-text-secondary",
|
|
124
|
+
children: "Height"
|
|
125
|
+
}), /* @__PURE__ */ x("p", {
|
|
126
|
+
className: "text-2xl font-bold",
|
|
127
|
+
children: [O.dimensions.height, /* @__PURE__ */ x("span", {
|
|
128
|
+
className: "text-sm font-normal",
|
|
129
|
+
children: [" ", O.dimensions.unit]
|
|
130
|
+
})]
|
|
131
|
+
})] }),
|
|
132
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
133
|
+
className: "text-sm text-text-secondary",
|
|
134
|
+
children: "Weight"
|
|
135
|
+
}), /* @__PURE__ */ x("p", {
|
|
136
|
+
className: "text-2xl font-bold",
|
|
137
|
+
children: [O.weight, /* @__PURE__ */ b("span", {
|
|
138
|
+
className: "text-sm font-normal",
|
|
139
|
+
children: " kg"
|
|
140
|
+
})]
|
|
141
|
+
})] })
|
|
142
|
+
]
|
|
143
|
+
}) })] }),
|
|
144
|
+
O.attributes.length > 0 && /* @__PURE__ */ x(e, { children: [/* @__PURE__ */ b(r, { children: /* @__PURE__ */ x(n, {
|
|
145
|
+
className: "flex items-center gap-2",
|
|
146
|
+
children: [/* @__PURE__ */ b(T, { size: 18 }), " Attributes"]
|
|
147
|
+
}) }), /* @__PURE__ */ b(t, { children: /* @__PURE__ */ b("div", {
|
|
148
|
+
className: "grid grid-cols-2 md:grid-cols-3 gap-4",
|
|
149
|
+
children: O.attributes.map((e, t) => /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
150
|
+
className: "text-sm text-text-secondary",
|
|
151
|
+
children: e.name
|
|
152
|
+
}), /* @__PURE__ */ b("p", {
|
|
153
|
+
className: "font-medium",
|
|
154
|
+
children: e.value
|
|
155
|
+
})] }, t))
|
|
156
|
+
}) })] })
|
|
157
|
+
]
|
|
158
|
+
}), /* @__PURE__ */ x("div", {
|
|
159
|
+
className: "space-y-6",
|
|
160
|
+
children: [/* @__PURE__ */ x(S, { children: [
|
|
161
|
+
/* @__PURE__ */ x("h2", {
|
|
162
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-3",
|
|
163
|
+
children: [/* @__PURE__ */ b(f, { size: 18 }), " Pricing"]
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ b("p", {
|
|
166
|
+
className: "text-3xl font-bold",
|
|
167
|
+
children: _(O.value)
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ b("p", {
|
|
170
|
+
className: "text-sm text-text-secondary",
|
|
171
|
+
children: "Unit price"
|
|
172
|
+
})
|
|
173
|
+
] }), /* @__PURE__ */ x(e, { children: [/* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(n, { children: "Identifiers" }) }), /* @__PURE__ */ x(t, {
|
|
174
|
+
className: "space-y-3",
|
|
175
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
176
|
+
className: "text-sm text-text-secondary",
|
|
177
|
+
children: "SKU"
|
|
178
|
+
}), /* @__PURE__ */ b("p", {
|
|
179
|
+
className: "font-mono",
|
|
180
|
+
children: O.sku
|
|
181
|
+
})] }), O.barcode && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
182
|
+
className: "text-sm text-text-secondary",
|
|
183
|
+
children: "Barcode"
|
|
184
|
+
}), /* @__PURE__ */ b("p", {
|
|
185
|
+
className: "font-mono",
|
|
186
|
+
children: O.barcode
|
|
187
|
+
})] })]
|
|
188
|
+
})] })]
|
|
189
|
+
})]
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
export { E as default };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { i as e, l as t } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as n } from "./DataTable-CD9ZhpLB.js";
|
|
3
|
+
import { t as r } from "./download-Dpa9vqoG.js";
|
|
4
|
+
import { t as i } from "./package-BE7U0wQE.js";
|
|
5
|
+
import { t as a } from "./plus-Dl1rLeJR.js";
|
|
6
|
+
import { t as o } from "./refresh-cw-CWfERAit.js";
|
|
7
|
+
import { r as s } from "./graphqlClient-CdJyR_ed.js";
|
|
8
|
+
import { i as c } from "./useInventory-Dwn18FPz.js";
|
|
9
|
+
import { n as l } from "./formatters-_vJlC-47.js";
|
|
10
|
+
import { t as u } from "./navigation-BgnOfsVd.js";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { CTAOverflowMenu as p, EmphasisPanel as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
//#region src/movethewheels/pages/ProductsPage.tsx
|
|
14
|
+
function g() {
|
|
15
|
+
let { basePath: g, navigate: _ } = s(), { products: v, totalProducts: y, isLoading: b, refetch: x } = c(), S = (e) => _?.(u(g, e));
|
|
16
|
+
return /* @__PURE__ */ f(e, {
|
|
17
|
+
title: "Products",
|
|
18
|
+
subtitle: `${y} products`,
|
|
19
|
+
icon: /* @__PURE__ */ d(i, { size: 24 }),
|
|
20
|
+
headerActions: /* @__PURE__ */ d(p, {
|
|
21
|
+
primary: {
|
|
22
|
+
label: "Add Product",
|
|
23
|
+
icon: /* @__PURE__ */ d(a, { size: 16 }),
|
|
24
|
+
onSelect: () => {}
|
|
25
|
+
},
|
|
26
|
+
actions: [{
|
|
27
|
+
label: "Refresh",
|
|
28
|
+
icon: /* @__PURE__ */ d(o, { size: 16 }),
|
|
29
|
+
onSelect: () => x()
|
|
30
|
+
}, {
|
|
31
|
+
label: "Export",
|
|
32
|
+
icon: /* @__PURE__ */ d(r, { size: 16 }),
|
|
33
|
+
onSelect: () => {}
|
|
34
|
+
}]
|
|
35
|
+
}),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ d(h, {
|
|
38
|
+
icon: /* @__PURE__ */ d(i, { size: 18 }),
|
|
39
|
+
children: "The catalog of items you ship. Each product's dimensions, weight, value and handling flags (fragile, hazardous, temperature-controlled) drive how it's packed, priced and routed — keep them accurate so shipments are quoted and handled correctly."
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ f(m, { children: [/* @__PURE__ */ d("p", {
|
|
42
|
+
className: "text-sm font-medium text-text-secondary",
|
|
43
|
+
children: "Catalog at a glance"
|
|
44
|
+
}), /* @__PURE__ */ f("div", {
|
|
45
|
+
className: "mt-3 grid grid-cols-3 gap-4",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
48
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
49
|
+
children: y
|
|
50
|
+
}), /* @__PURE__ */ d("p", {
|
|
51
|
+
className: "text-xs text-text-secondary",
|
|
52
|
+
children: "Total products"
|
|
53
|
+
})] }),
|
|
54
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
55
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
56
|
+
children: v.filter((e) => e.fragile || e.hazardous).length
|
|
57
|
+
}), /* @__PURE__ */ d("p", {
|
|
58
|
+
className: "text-xs text-text-secondary",
|
|
59
|
+
children: "Special handling"
|
|
60
|
+
})] }),
|
|
61
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
62
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
63
|
+
children: v.filter((e) => e.temperatureControlled).length
|
|
64
|
+
}), /* @__PURE__ */ d("p", {
|
|
65
|
+
className: "text-xs text-text-secondary",
|
|
66
|
+
children: "Temp-controlled"
|
|
67
|
+
})] })
|
|
68
|
+
]
|
|
69
|
+
})] }),
|
|
70
|
+
/* @__PURE__ */ d(n, {
|
|
71
|
+
columns: [
|
|
72
|
+
{
|
|
73
|
+
id: "sku",
|
|
74
|
+
header: "SKU",
|
|
75
|
+
accessorKey: "sku",
|
|
76
|
+
sortable: !0,
|
|
77
|
+
cell: (e) => /* @__PURE__ */ d("span", {
|
|
78
|
+
className: "font-mono",
|
|
79
|
+
children: e.sku
|
|
80
|
+
})
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "name",
|
|
84
|
+
header: "Product Name",
|
|
85
|
+
accessorKey: "name",
|
|
86
|
+
sortable: !0,
|
|
87
|
+
cell: (e) => /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
88
|
+
className: "font-medium",
|
|
89
|
+
children: e.name
|
|
90
|
+
}), /* @__PURE__ */ d("p", {
|
|
91
|
+
className: "text-sm text-text-secondary line-clamp-1",
|
|
92
|
+
children: e.description
|
|
93
|
+
})] })
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "category",
|
|
97
|
+
header: "Category",
|
|
98
|
+
accessorKey: "category",
|
|
99
|
+
sortable: !0,
|
|
100
|
+
cell: (e) => /* @__PURE__ */ d(t, {
|
|
101
|
+
variant: "outline",
|
|
102
|
+
children: e.category
|
|
103
|
+
})
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "dimensions",
|
|
107
|
+
header: "Dimensions",
|
|
108
|
+
cell: (e) => `${e.dimensions.length}x${e.dimensions.width}x${e.dimensions.height} ${e.dimensions.unit}`
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "weight",
|
|
112
|
+
header: "Weight",
|
|
113
|
+
accessorKey: "weight",
|
|
114
|
+
sortable: !0,
|
|
115
|
+
cell: (e) => `${e.weight} kg`
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "value",
|
|
119
|
+
header: "Value",
|
|
120
|
+
accessorKey: "value",
|
|
121
|
+
sortable: !0,
|
|
122
|
+
cell: (e) => /* @__PURE__ */ d("span", {
|
|
123
|
+
className: "font-medium",
|
|
124
|
+
children: l(e.value)
|
|
125
|
+
})
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "flags",
|
|
129
|
+
header: "Flags",
|
|
130
|
+
cell: (e) => /* @__PURE__ */ f("div", {
|
|
131
|
+
className: "flex gap-1",
|
|
132
|
+
children: [
|
|
133
|
+
e.fragile && /* @__PURE__ */ d(t, {
|
|
134
|
+
variant: "destructive",
|
|
135
|
+
className: "text-xs",
|
|
136
|
+
children: "Fragile"
|
|
137
|
+
}),
|
|
138
|
+
e.hazardous && /* @__PURE__ */ d(t, {
|
|
139
|
+
variant: "destructive",
|
|
140
|
+
className: "text-xs",
|
|
141
|
+
children: "Hazardous"
|
|
142
|
+
}),
|
|
143
|
+
e.temperatureControlled && /* @__PURE__ */ d(t, {
|
|
144
|
+
variant: "secondary",
|
|
145
|
+
className: "text-xs",
|
|
146
|
+
children: "Temp Control"
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
})
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
data: v,
|
|
153
|
+
isLoading: b,
|
|
154
|
+
searchable: !0,
|
|
155
|
+
searchPlaceholder: "Search products...",
|
|
156
|
+
searchFields: [
|
|
157
|
+
"name",
|
|
158
|
+
"sku",
|
|
159
|
+
"category"
|
|
160
|
+
],
|
|
161
|
+
onRowClick: (e) => S(`inventory/products/${e.id}`),
|
|
162
|
+
getRowId: (e) => e.id,
|
|
163
|
+
emptyIllustration: "empty-files",
|
|
164
|
+
emptyTitle: "No products yet",
|
|
165
|
+
emptyDescription: "Add products to your catalog so they can be added to orders and stocked in warehouses."
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
export { g as default };
|