@burdenoff/microfe-movethewheels 2026.626.2 → 2026.703.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-AvsMbunM.js → AIAssistantPage-C3ovZ0Fh.js} +100 -73
- package/dist/AnalyticsPage-O8SpY-V4.js +215 -0
- package/dist/{CreateOrderPage-CjlnEtk3.js → CreateOrderPage-CB1_-_mN.js} +33 -35
- package/dist/{CustomerDetailsPage-I6cdDHUi.js → CustomerDetailsPage-BaeKEI1D.js} +42 -44
- package/dist/{CustomersPage-CGGfD4ki.js → CustomersPage-DRaLuHMC.js} +26 -28
- package/dist/{DashboardPage-D2HRqwg9.js → DashboardPage-DPjhNfKB.js} +85 -83
- package/dist/{DataTable-CD9ZhpLB.js → DataTable-DmciIKKM.js} +3 -3
- package/dist/{DriverDetailsPage-rg_pGNuP.js → DriverDetailsPage-CSSQTOzn.js} +52 -54
- package/dist/{DriversPage-DKiynISH.js → DriversPage-C2Bk0w4Q.js} +24 -26
- package/dist/{FinancePage-Vg8WPs38.js → FinancePage-lmp0Sdsw.js} +9 -9
- package/dist/FleetPage-DZn5pIqd.js +365 -0
- package/dist/ImportExportPage-BIUJZc7O.js +290 -0
- package/dist/InventoryPage-Cxh1zYJd.js +253 -0
- package/dist/{LiveTrackingPage-DQ1q4Id3.js → LiveTrackingPage-BY1yAkIt.js} +60 -56
- package/dist/MarketplacePage-RMuL17EA.js +247 -0
- package/dist/{MetricCard-B7yMyvMX.js → MetricCard-7aYgzZHK.js} +1 -1
- package/dist/{OrderDetailsPage-CFASgsYX.js → OrderDetailsPage-C2Mf4KSy.js} +83 -85
- package/dist/{OrdersListPage-BHeT8S5o.js → OrdersListPage-BrPBtnhp.js} +31 -33
- package/dist/{PageLayout-D3N8MCTm.js → PageLayout-D4LDHJJq.js} +483 -422
- package/dist/{ProductDetailsPage-CFGcbaHo.js → ProductDetailsPage-CezzzZcj.js} +27 -29
- package/dist/{ProductsPage--xEpbQ8A.js → ProductsPage-I5DilIoY.js} +21 -23
- package/dist/ReportsPage-BDXNmUng.js +284 -0
- package/dist/RouteDetailsPage-BcomL20M.js +263 -0
- package/dist/RoutesPage-lqX9ylHP.js +144 -0
- package/dist/SettingsPage-CQVIOaNs.js +421 -0
- package/dist/StatusBadge-NpTeHVlw.js +152 -0
- package/dist/{TrackingPage-CcRc_dva.js → TrackingPage-BXrjz7V8.js} +59 -61
- package/dist/{VehicleDetailsPage-3YDMPsPs.js → VehicleDetailsPage-DZjLcJgr.js} +40 -42
- package/dist/{VehiclesPage-UlxPWP9K.js → VehiclesPage-6W39XT5W.js} +19 -21
- package/dist/{WarehouseDetailsPage-Db7KeN-d.js → WarehouseDetailsPage-C10pgRGW.js} +38 -40
- package/dist/{WarehousesPage-CuTO-OPp.js → WarehousesPage-CHvBqNaQ.js} +15 -17
- package/dist/{arrow-left-CBpZKkpq.js → arrow-left-n48Y-Wis.js} +1 -1
- package/dist/{box-CAaiElsb.js → box-D9Pal4HM.js} +1 -1
- package/dist/{chart-column-D1Ym15-S.js → chart-column-BFIJysDR.js} +1 -1
- package/dist/{chevron-right-BIFGi0UA.js → chevron-right-EMIIyyJ1.js} +1 -1
- package/dist/{circle-alert-DjmNo5_L.js → circle-alert-iY24lSlp.js} +1 -1
- package/dist/{circle-check-big-CjuPVo3_.js → circle-check-big-w0TrLKMF.js} +1 -1
- package/dist/{clock-BjkdnddD.js → clock-DJZtdl8u.js} +1 -1
- package/dist/{dollar-sign-IB4O0wuQ.js → dollar-sign-CgKQRz_e.js} +1 -1
- package/dist/{download-Dpa9vqoG.js → download-DRXxoiQR.js} +1 -1
- package/dist/{file-text-C8Uioy11.js → file-text-DWWY6_f5.js} +1 -1
- package/dist/{filter-Da5OZaHI.js → filter-DloLC2eE.js} +1 -1
- package/dist/index.js +119 -111
- package/dist/{map-_Per4sT9.js → map-CkJaULb2.js} +1 -1
- package/dist/{map-pin-BSaf5IDL.js → map-pin-BGiCvyCs.js} +1 -1
- package/dist/{navigation-DaTbrhw2.js → navigation-D36prnAn.js} +1 -1
- package/dist/{package-BE7U0wQE.js → package-BChUzpJS.js} +1 -1
- package/dist/{phone-DV4StZiA.js → phone-Ac9s3mo_.js} +1 -1
- package/dist/{plus-Dl1rLeJR.js → plus-Z76q-FZm.js} +1 -1
- package/dist/{refresh-cw-CWfERAit.js → refresh-cw-DKt6f5T6.js} +1 -1
- package/dist/{save-XH8vydOn.js → save-CojywNhG.js} +1 -1
- package/dist/{search-OxoIiL_C.js → search-CDGefqb3.js} +1 -1
- package/dist/{square-pen-hLIbFQFV.js → square-pen-CopE9GmB.js} +1 -1
- package/dist/{star-YsVV3MNQ.js → star-nHlLjDKR.js} +1 -1
- package/dist/{store-RCBl7HB-.js → store-BR9Voi5E.js} +1 -1
- package/dist/{trending-up-C-85AwGT.js → trending-up-B7W-GL6P.js} +1 -1
- package/dist/{triangle-alert-BOhfGgmh.js → triangle-alert-BonHFFNz.js} +1 -1
- package/dist/{truck-CtDjNFbi.js → truck-DrlfSpRC.js} +1 -1
- package/dist/{useAnalytics-ph7eTIK6.js → useAnalytics-CgdzUfY_.js} +40 -40
- package/dist/useAssistant-D4v3oxD3.js +84 -0
- package/dist/{useCustomers-bS3a4ytk.js → useCustomers-QrlozybF.js} +24 -24
- package/dist/{useFleet-BdETplNE.js → useFleet-DiAC-IiH.js} +70 -67
- package/dist/useImportExport-BLMnAKCC.js +55 -0
- package/dist/{useInventory-Dwn18FPz.js → useInventory-DKoks37x.js} +33 -33
- package/dist/{useOrders-D_3_hGMp.js → useOrders-D3UZVy8Y.js} +42 -42
- package/dist/useReports-Puq4DCH9.js +78 -0
- package/dist/{useRoutes-v4aBaS-E.js → useRoutes-Do57LvRb.js} +31 -31
- package/dist/useSettings-CkDH_-gM.js +81 -0
- package/dist/{useTracking-De2KIUNu.js → useTracking-GJify4HN.js} +22 -22
- package/dist/{user-Dz5TJZFs.js → user-CjSoudeu.js} +1 -1
- package/dist/{users-g2N0eL-Z.js → users-BAM4gHTn.js} +1 -1
- package/dist/{warehouse-D3WWDeTX.js → warehouse-C7MSr47B.js} +1 -1
- package/dist/{wrench-CmxY1n4I.js → wrench-CANXWxF-.js} +1 -1
- package/package.json +1 -1
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +27 -3
- package/src/movethewheels/components/StatusBadge.tsx +18 -37
- package/src/movethewheels/constants/index.ts +67 -26
- package/src/movethewheels/hooks/index.ts +12 -0
- package/src/movethewheels/hooks/useAnalytics.ts +20 -6
- package/src/movethewheels/hooks/useAssistant.ts +74 -0
- package/src/movethewheels/hooks/useFleet.ts +63 -59
- package/src/movethewheels/hooks/useImportExport.ts +101 -0
- package/src/movethewheels/hooks/useReports.ts +158 -0
- package/src/movethewheels/hooks/useSettings.ts +120 -0
- package/src/movethewheels/pages/AIAssistantPage.tsx +53 -15
- package/src/movethewheels/pages/AnalyticsPage.tsx +67 -64
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/CustomersPage.tsx +1 -1
- package/src/movethewheels/pages/DashboardPage.tsx +42 -22
- package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/DriversPage.tsx +1 -1
- package/src/movethewheels/pages/FleetPage.tsx +96 -38
- package/src/movethewheels/pages/ImportExportPage.tsx +174 -68
- package/src/movethewheels/pages/InventoryPage.tsx +66 -28
- package/src/movethewheels/pages/LiveTrackingPage.tsx +12 -3
- package/src/movethewheels/pages/MarketplacePage.tsx +87 -45
- package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -2
- package/src/movethewheels/pages/ReportsPage.tsx +194 -90
- package/src/movethewheels/pages/RouteDetailsPage.tsx +5 -11
- package/src/movethewheels/pages/RoutesPage.tsx +4 -9
- package/src/movethewheels/pages/SettingsPage.tsx +234 -56
- package/src/movethewheels/pages/TrackingPage.tsx +6 -6
- package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +7 -6
- package/src/movethewheels/store/movethewheelsStore.ts +1 -1
- package/dist/AnalyticsPage-CCLfHgQZ.js +0 -212
- package/dist/FleetPage-DddXt8r8.js +0 -332
- package/dist/ImportExportPage-BW6qO3kc.js +0 -248
- package/dist/InventoryPage-rMGuaJN-.js +0 -222
- package/dist/MarketplacePage-DKrXAv62.js +0 -219
- package/dist/ReportsPage-Bb7_90rK.js +0 -235
- package/dist/RouteDetailsPage-CVtDVb1N.js +0 -282
- package/dist/RoutesPage-s57PtgcQ.js +0 -163
- package/dist/SettingsPage-BYNCBOpN.js +0 -298
- package/dist/StatusBadge-CijYQXtb.js +0 -209
- package/dist/graphqlClient-CdJyR_ed.js +0 -55
- package/dist/navigation-BgnOfsVd.js +0 -6
- package/dist/route-Dp9JiN_E.js +0 -51
- package/dist/settings-3Rw5NwFF.js +0 -28
- package/src/movethewheels/constants/mockData.ts +0 -1342
- /package/dist/{formatters-_vJlC-47.js → formatters-DhKZ-eA1.js} +0 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { M as e, a as t, ct as n, d as r, f as i, i as a, l as o, ot as s, u as c } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as l } from "./chevron-right-EMIIyyJ1.js";
|
|
3
|
+
import { t as u } from "./package-BChUzpJS.js";
|
|
4
|
+
import { t as d } from "./plus-Z76q-FZm.js";
|
|
5
|
+
import { t as f } from "./triangle-alert-BonHFFNz.js";
|
|
6
|
+
import { t as p } from "./warehouse-C7MSr47B.js";
|
|
7
|
+
import { n as m, t as h } from "./useInventory-DKoks37x.js";
|
|
8
|
+
import { n as g, r as _, t as v } from "./MetricCard-7aYgzZHK.js";
|
|
9
|
+
import { n as y } from "./formatters-DhKZ-eA1.js";
|
|
10
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
11
|
+
import { CTAOverflowMenu as S, EmphasisPanel as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { useI18n as T } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
|
+
//#region src/movethewheels/pages/InventoryPage.tsx
|
|
14
|
+
function E() {
|
|
15
|
+
let { t: E } = T(), D = (e, t) => {
|
|
16
|
+
let n = E(e);
|
|
17
|
+
return n === e ? t : n;
|
|
18
|
+
}, { basePath: O, navigate: k } = s(), { inventory: A, products: j, warehouses: M, isLoading: N, error: P, refetch: F } = h(), { stats: I } = m(), L = (e) => k?.(n(O, e)), R = (e, t) => {
|
|
19
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
20
|
+
}, z = A.filter((e) => e.availableQuantity <= e.reorderLevel);
|
|
21
|
+
return /* @__PURE__ */ x(a, {
|
|
22
|
+
title: D("movethewheels.inventory.title", "Inventory"),
|
|
23
|
+
subtitle: D("movethewheels.inventory.subtitle", "Manage your products and warehouses"),
|
|
24
|
+
icon: /* @__PURE__ */ b(u, { size: 24 }),
|
|
25
|
+
headerActions: /* @__PURE__ */ b(S, {
|
|
26
|
+
primary: {
|
|
27
|
+
label: D("movethewheels.inventory.actions.addProduct", "Add Product"),
|
|
28
|
+
icon: /* @__PURE__ */ b(d, { size: 16 }),
|
|
29
|
+
onSelect: () => {}
|
|
30
|
+
},
|
|
31
|
+
actions: [{
|
|
32
|
+
label: D("movethewheels.inventory.actions.products", "Products"),
|
|
33
|
+
onSelect: () => L("inventory/products")
|
|
34
|
+
}, {
|
|
35
|
+
label: D("movethewheels.inventory.actions.warehouses", "Warehouses"),
|
|
36
|
+
onSelect: () => L("inventory/warehouses")
|
|
37
|
+
}]
|
|
38
|
+
}),
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ b(w, {
|
|
41
|
+
icon: /* @__PURE__ */ b(u, { size: 18 }),
|
|
42
|
+
children: D("movethewheels.inventory.purpose", "A real-time view of what you have and where. Track stock value and quantities across warehouses, catch low-stock items before they run out, and drill into products or warehouses to manage what you can promise on an order.")
|
|
43
|
+
}),
|
|
44
|
+
P && !N ? /* @__PURE__ */ b(r, {
|
|
45
|
+
className: "border-status-error-border",
|
|
46
|
+
children: /* @__PURE__ */ x(i, {
|
|
47
|
+
className: "p-6 text-center space-y-3",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ b("p", {
|
|
50
|
+
className: "text-status-error-text font-medium",
|
|
51
|
+
children: D("movethewheels.inventory.error.title", "Couldn't load inventory")
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ b("p", {
|
|
54
|
+
className: "text-sm text-text-secondary",
|
|
55
|
+
children: P.message
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ b(c, {
|
|
58
|
+
variant: "outline",
|
|
59
|
+
onClick: F,
|
|
60
|
+
children: D("movethewheels.inventory.error.retry", "Retry")
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
})
|
|
64
|
+
}) : N ? /* @__PURE__ */ b(_, {
|
|
65
|
+
columns: 4,
|
|
66
|
+
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ b(g, {}, t))
|
|
67
|
+
}) : /* @__PURE__ */ x(_, {
|
|
68
|
+
columns: 4,
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ b(v, {
|
|
71
|
+
label: D("movethewheels.inventory.metrics.totalProducts", "Total Products"),
|
|
72
|
+
value: I.totalProducts,
|
|
73
|
+
icon: /* @__PURE__ */ b(u, { size: 20 }),
|
|
74
|
+
onClick: () => L("inventory/products")
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ b(v, {
|
|
77
|
+
label: D("movethewheels.inventory.metrics.totalItems", "Total Items"),
|
|
78
|
+
value: I.totalItems.toLocaleString(),
|
|
79
|
+
icon: /* @__PURE__ */ b(u, { size: 20 })
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ b(v, {
|
|
82
|
+
label: D("movethewheels.inventory.metrics.inventoryValue", "Inventory Value"),
|
|
83
|
+
value: y(I.totalValue),
|
|
84
|
+
icon: /* @__PURE__ */ b(u, { size: 20 })
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ b(v, {
|
|
87
|
+
label: D("movethewheels.inventory.metrics.warehouses", "Warehouses"),
|
|
88
|
+
value: I.totalWarehouses,
|
|
89
|
+
icon: /* @__PURE__ */ b(p, { size: 20 }),
|
|
90
|
+
onClick: () => L("inventory/warehouses")
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
}),
|
|
94
|
+
z.length > 0 && /* @__PURE__ */ x(C, {
|
|
95
|
+
className: "space-y-4",
|
|
96
|
+
children: [/* @__PURE__ */ x("h2", {
|
|
97
|
+
className: "flex items-center gap-2 text-base font-semibold text-status-warning-text",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ b(f, { size: 18 }),
|
|
100
|
+
D("movethewheels.inventory.lowStock.title", "Low Stock Alert"),
|
|
101
|
+
" (",
|
|
102
|
+
z.length,
|
|
103
|
+
" ",
|
|
104
|
+
D("movethewheels.inventory.lowStock.items", "items"),
|
|
105
|
+
")"
|
|
106
|
+
]
|
|
107
|
+
}), /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b("div", {
|
|
108
|
+
className: "space-y-3",
|
|
109
|
+
children: z.slice(0, 5).map((e) => {
|
|
110
|
+
let t = j.find((t) => t.id === e.productId);
|
|
111
|
+
return /* @__PURE__ */ x("div", {
|
|
112
|
+
className: "flex items-center justify-between p-3 bg-status-warning-bg/10 rounded-lg",
|
|
113
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
114
|
+
className: "font-medium",
|
|
115
|
+
children: t?.name || D("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product")
|
|
116
|
+
}), /* @__PURE__ */ x("p", {
|
|
117
|
+
className: "text-sm text-text-secondary",
|
|
118
|
+
children: [
|
|
119
|
+
D("movethewheels.inventory.lowStock.sku", "SKU:"),
|
|
120
|
+
" ",
|
|
121
|
+
t?.sku
|
|
122
|
+
]
|
|
123
|
+
})] }), /* @__PURE__ */ x("div", {
|
|
124
|
+
className: "text-right",
|
|
125
|
+
children: [/* @__PURE__ */ x("p", {
|
|
126
|
+
className: "font-medium text-status-warning-text",
|
|
127
|
+
children: [
|
|
128
|
+
e.availableQuantity,
|
|
129
|
+
" ",
|
|
130
|
+
D("movethewheels.inventory.lowStock.left", "left")
|
|
131
|
+
]
|
|
132
|
+
}), /* @__PURE__ */ x("p", {
|
|
133
|
+
className: "text-sm text-text-secondary",
|
|
134
|
+
children: [
|
|
135
|
+
D("movethewheels.inventory.lowStock.reorderAt", "Reorder at:"),
|
|
136
|
+
" ",
|
|
137
|
+
e.reorderLevel
|
|
138
|
+
]
|
|
139
|
+
})]
|
|
140
|
+
})]
|
|
141
|
+
}, e.id);
|
|
142
|
+
})
|
|
143
|
+
}) })]
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ x("div", {
|
|
146
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
147
|
+
children: [/* @__PURE__ */ b(t, {
|
|
148
|
+
title: D("movethewheels.inventory.warehouses.title", "Warehouses"),
|
|
149
|
+
actions: /* @__PURE__ */ x(c, {
|
|
150
|
+
variant: "ghost",
|
|
151
|
+
size: "sm",
|
|
152
|
+
onClick: () => L("inventory/warehouses"),
|
|
153
|
+
children: [
|
|
154
|
+
D("movethewheels.inventory.common.viewAll", "View all"),
|
|
155
|
+
" ",
|
|
156
|
+
/* @__PURE__ */ b(l, { size: 16 })
|
|
157
|
+
]
|
|
158
|
+
}),
|
|
159
|
+
children: /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(i, {
|
|
160
|
+
className: "p-0",
|
|
161
|
+
children: /* @__PURE__ */ b("div", {
|
|
162
|
+
className: "divide-y",
|
|
163
|
+
children: M.map((t) => /* @__PURE__ */ b("div", {
|
|
164
|
+
role: "button",
|
|
165
|
+
tabIndex: 0,
|
|
166
|
+
"aria-label": `View warehouse ${t.name}`,
|
|
167
|
+
className: "p-4 hover:bg-bg-sunken/50 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
|
|
168
|
+
onClick: () => L(`inventory/warehouses/${t.id}`),
|
|
169
|
+
onKeyDown: (e) => R(e, () => L(`inventory/warehouses/${t.id}`)),
|
|
170
|
+
children: /* @__PURE__ */ x("div", {
|
|
171
|
+
className: "flex items-center justify-between",
|
|
172
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
173
|
+
className: "font-medium",
|
|
174
|
+
children: t.name
|
|
175
|
+
}), /* @__PURE__ */ x("p", {
|
|
176
|
+
className: "text-sm text-text-secondary",
|
|
177
|
+
children: [
|
|
178
|
+
t.address.city,
|
|
179
|
+
", ",
|
|
180
|
+
t.address.state
|
|
181
|
+
]
|
|
182
|
+
})] }), /* @__PURE__ */ x("div", {
|
|
183
|
+
className: "text-right",
|
|
184
|
+
children: [/* @__PURE__ */ b(o, {
|
|
185
|
+
variant: t.isActive ? "default" : "secondary",
|
|
186
|
+
children: t.isActive ? D("movethewheels.inventory.warehouses.active", "Active") : D("movethewheels.inventory.warehouses.inactive", "Inactive")
|
|
187
|
+
}), /* @__PURE__ */ x("div", {
|
|
188
|
+
className: "mt-2",
|
|
189
|
+
children: [/* @__PURE__ */ b("p", {
|
|
190
|
+
className: "text-xs text-text-secondary",
|
|
191
|
+
children: D("movethewheels.inventory.warehouses.utilization", "Utilization")
|
|
192
|
+
}), /* @__PURE__ */ b(e, {
|
|
193
|
+
value: t.capacity.usedSpace / t.capacity.totalSpace * 100,
|
|
194
|
+
className: "w-24 h-2"
|
|
195
|
+
})]
|
|
196
|
+
})]
|
|
197
|
+
})]
|
|
198
|
+
})
|
|
199
|
+
}, t.id))
|
|
200
|
+
})
|
|
201
|
+
}) })
|
|
202
|
+
}), /* @__PURE__ */ b(t, {
|
|
203
|
+
title: D("movethewheels.inventory.products.title", "Recent Products"),
|
|
204
|
+
actions: /* @__PURE__ */ x(c, {
|
|
205
|
+
variant: "ghost",
|
|
206
|
+
size: "sm",
|
|
207
|
+
onClick: () => L("inventory/products"),
|
|
208
|
+
children: [
|
|
209
|
+
D("movethewheels.inventory.common.viewAll", "View all"),
|
|
210
|
+
" ",
|
|
211
|
+
/* @__PURE__ */ b(l, { size: 16 })
|
|
212
|
+
]
|
|
213
|
+
}),
|
|
214
|
+
children: /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(i, {
|
|
215
|
+
className: "p-0",
|
|
216
|
+
children: /* @__PURE__ */ b("div", {
|
|
217
|
+
className: "divide-y",
|
|
218
|
+
children: j.slice(0, 5).map((e) => /* @__PURE__ */ b("div", {
|
|
219
|
+
role: "button",
|
|
220
|
+
tabIndex: 0,
|
|
221
|
+
"aria-label": `View product ${e.name}`,
|
|
222
|
+
className: "p-4 hover:bg-bg-sunken/50 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
|
|
223
|
+
onClick: () => L(`inventory/products/${e.id}`),
|
|
224
|
+
onKeyDown: (t) => R(t, () => L(`inventory/products/${e.id}`)),
|
|
225
|
+
children: /* @__PURE__ */ x("div", {
|
|
226
|
+
className: "flex items-center justify-between",
|
|
227
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
228
|
+
className: "font-medium",
|
|
229
|
+
children: e.name
|
|
230
|
+
}), /* @__PURE__ */ b("p", {
|
|
231
|
+
className: "text-sm text-text-secondary",
|
|
232
|
+
children: e.sku
|
|
233
|
+
})] }), /* @__PURE__ */ x("div", {
|
|
234
|
+
className: "text-right",
|
|
235
|
+
children: [/* @__PURE__ */ b("p", {
|
|
236
|
+
className: "font-medium",
|
|
237
|
+
children: y(e.value)
|
|
238
|
+
}), /* @__PURE__ */ b(o, {
|
|
239
|
+
variant: "outline",
|
|
240
|
+
children: e.category
|
|
241
|
+
})]
|
|
242
|
+
})]
|
|
243
|
+
})
|
|
244
|
+
}, e.id))
|
|
245
|
+
})
|
|
246
|
+
}) })
|
|
247
|
+
})]
|
|
248
|
+
})
|
|
249
|
+
]
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
//#endregion
|
|
253
|
+
export { E as default };
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { J as e, N as t, X as n, Z as r,
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { r as
|
|
8
|
-
import {
|
|
9
|
-
import { r as
|
|
10
|
-
import { r as
|
|
11
|
-
import { r as w } from "./formatters-_vJlC-47.js";
|
|
12
|
-
import { t as T } from "./navigation-BgnOfsVd.js";
|
|
1
|
+
import { J as e, N as t, X as n, Z as r, ct as i, d as a, f as o, g as s, h as c, i as l, l as u, lt as d, ot as f, t as p, u as m } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as h } from "./map-pin-BGiCvyCs.js";
|
|
3
|
+
import { t as g } from "./map-CkJaULb2.js";
|
|
4
|
+
import { t as _ } from "./package-BChUzpJS.js";
|
|
5
|
+
import { t as v } from "./refresh-cw-DKt6f5T6.js";
|
|
6
|
+
import { t as y } from "./truck-DrlfSpRC.js";
|
|
7
|
+
import { o as b, r as x } from "./useTracking-GJify4HN.js";
|
|
8
|
+
import { r as S, t as C } from "./MetricCard-7aYgzZHK.js";
|
|
9
|
+
import { r as w } from "./StatusBadge-NpTeHVlw.js";
|
|
10
|
+
import { r as T } from "./formatters-DhKZ-eA1.js";
|
|
13
11
|
import { useState as E } from "react";
|
|
14
12
|
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
15
13
|
import { EmphasisPanel as k, NextSteps as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
|
|
16
14
|
//#region node_modules/lucide-react/dist/esm/icons/list.js
|
|
17
|
-
var M =
|
|
15
|
+
var M = d("List", [
|
|
18
16
|
["path", {
|
|
19
17
|
d: "M3 12h.01",
|
|
20
18
|
key: "nlz23k"
|
|
@@ -43,20 +41,20 @@ var M = l("List", [
|
|
|
43
41
|
//#endregion
|
|
44
42
|
//#region src/movethewheels/pages/LiveTrackingPage.tsx
|
|
45
43
|
function N() {
|
|
46
|
-
let { basePath:
|
|
47
|
-
N && N(
|
|
44
|
+
let { basePath: d, navigate: N } = f(), { activeDeliveries: P, isLoading: F, refetch: I } = x(), { unacknowledgedAlerts: L } = b(), [R, z] = E("map"), [B, V] = E(null), H = (e) => {
|
|
45
|
+
N && N(i(d, e));
|
|
48
46
|
}, U = B ? P.find((e) => e.order?.id === B) : null;
|
|
49
|
-
return /* @__PURE__ */ O(
|
|
47
|
+
return /* @__PURE__ */ O(l, {
|
|
50
48
|
title: "Live Tracking",
|
|
51
49
|
subtitle: `${P.length} active deliveries`,
|
|
52
|
-
icon: /* @__PURE__ */ D(
|
|
50
|
+
icon: /* @__PURE__ */ D(h, { size: 24 }),
|
|
53
51
|
headerActions: /* @__PURE__ */ O("div", {
|
|
54
52
|
className: "flex gap-2",
|
|
55
|
-
children: [/* @__PURE__ */ O(
|
|
53
|
+
children: [/* @__PURE__ */ O(m, {
|
|
56
54
|
variant: "outline",
|
|
57
55
|
onClick: I,
|
|
58
56
|
disabled: F,
|
|
59
|
-
children: [/* @__PURE__ */ D(
|
|
57
|
+
children: [/* @__PURE__ */ D(v, {
|
|
60
58
|
size: 16,
|
|
61
59
|
className: F ? "animate-spin" : ""
|
|
62
60
|
}), "Refresh"]
|
|
@@ -65,7 +63,7 @@ function N() {
|
|
|
65
63
|
onValueChange: (e) => z(e),
|
|
66
64
|
children: /* @__PURE__ */ O(n, { children: [/* @__PURE__ */ D(r, {
|
|
67
65
|
value: "map",
|
|
68
|
-
children: /* @__PURE__ */ D(
|
|
66
|
+
children: /* @__PURE__ */ D(g, { size: 16 })
|
|
69
67
|
}), /* @__PURE__ */ D(r, {
|
|
70
68
|
value: "list",
|
|
71
69
|
children: /* @__PURE__ */ D(M, { size: 16 })
|
|
@@ -74,7 +72,7 @@ function N() {
|
|
|
74
72
|
}),
|
|
75
73
|
children: [
|
|
76
74
|
/* @__PURE__ */ D(j, {
|
|
77
|
-
icon: /* @__PURE__ */ D(
|
|
75
|
+
icon: /* @__PURE__ */ D(h, { size: 18 }),
|
|
78
76
|
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
77
|
}),
|
|
80
78
|
/* @__PURE__ */ D(A, {
|
|
@@ -91,7 +89,7 @@ function N() {
|
|
|
91
89
|
id: "alerts",
|
|
92
90
|
label: "Clear outstanding alerts",
|
|
93
91
|
description: "Review delays and exceptions that need attention.",
|
|
94
|
-
icon: /* @__PURE__ */ D(
|
|
92
|
+
icon: /* @__PURE__ */ D(y, { size: 16 }),
|
|
95
93
|
done: L.length === 0,
|
|
96
94
|
onClick: () => z("list")
|
|
97
95
|
},
|
|
@@ -99,33 +97,33 @@ function N() {
|
|
|
99
97
|
id: "new-order",
|
|
100
98
|
label: "Create another order",
|
|
101
99
|
description: "Add a new delivery to the pipeline.",
|
|
102
|
-
icon: /* @__PURE__ */ D(
|
|
100
|
+
icon: /* @__PURE__ */ D(_, { size: 16 }),
|
|
103
101
|
onClick: () => H("orders/new")
|
|
104
102
|
}
|
|
105
103
|
]
|
|
106
104
|
}),
|
|
107
|
-
/* @__PURE__ */ O(
|
|
105
|
+
/* @__PURE__ */ O(S, {
|
|
108
106
|
columns: 4,
|
|
109
107
|
children: [
|
|
110
|
-
/* @__PURE__ */ D(
|
|
108
|
+
/* @__PURE__ */ D(C, {
|
|
111
109
|
size: "sm",
|
|
112
110
|
label: "Active Deliveries",
|
|
113
111
|
value: P.length,
|
|
114
|
-
icon: /* @__PURE__ */ D(
|
|
112
|
+
icon: /* @__PURE__ */ D(y, { size: 18 })
|
|
115
113
|
}),
|
|
116
|
-
/* @__PURE__ */ D(
|
|
114
|
+
/* @__PURE__ */ D(C, {
|
|
117
115
|
size: "sm",
|
|
118
116
|
label: "In Transit",
|
|
119
117
|
value: P.filter((e) => e.order?.status === "in_transit").length,
|
|
120
|
-
icon: /* @__PURE__ */ D(
|
|
118
|
+
icon: /* @__PURE__ */ D(_, { size: 18 })
|
|
121
119
|
}),
|
|
122
|
-
/* @__PURE__ */ D(
|
|
120
|
+
/* @__PURE__ */ D(C, {
|
|
123
121
|
size: "sm",
|
|
124
122
|
label: "Out for Delivery",
|
|
125
123
|
value: P.filter((e) => e.order?.status === "out_for_delivery").length,
|
|
126
|
-
icon: /* @__PURE__ */ D(
|
|
124
|
+
icon: /* @__PURE__ */ D(h, { size: 18 })
|
|
127
125
|
}),
|
|
128
|
-
/* @__PURE__ */ D(
|
|
126
|
+
/* @__PURE__ */ D(C, {
|
|
129
127
|
size: "sm",
|
|
130
128
|
label: "Alerts",
|
|
131
129
|
value: L.length,
|
|
@@ -137,16 +135,16 @@ function N() {
|
|
|
137
135
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
138
136
|
children: [/* @__PURE__ */ D("div", {
|
|
139
137
|
className: "lg:col-span-2",
|
|
140
|
-
children: R === "map" ? /* @__PURE__ */ D(
|
|
138
|
+
children: R === "map" ? /* @__PURE__ */ D(a, {
|
|
141
139
|
className: "h-[600px]",
|
|
142
|
-
children: /* @__PURE__ */ D(
|
|
140
|
+
children: /* @__PURE__ */ D(o, {
|
|
143
141
|
className: "p-0 h-full",
|
|
144
142
|
children: /* @__PURE__ */ D("div", {
|
|
145
143
|
className: "w-full h-full bg-bg-sunken rounded-lg flex items-center justify-center",
|
|
146
144
|
children: /* @__PURE__ */ O("div", {
|
|
147
145
|
className: "text-center text-text-secondary",
|
|
148
146
|
children: [
|
|
149
|
-
/* @__PURE__ */ D(
|
|
147
|
+
/* @__PURE__ */ D(h, {
|
|
150
148
|
size: 64,
|
|
151
149
|
className: "mx-auto mb-4 opacity-50"
|
|
152
150
|
}),
|
|
@@ -170,15 +168,21 @@ function N() {
|
|
|
170
168
|
})
|
|
171
169
|
})
|
|
172
170
|
})
|
|
173
|
-
}) : /* @__PURE__ */ O(
|
|
171
|
+
}) : /* @__PURE__ */ O(a, { children: [/* @__PURE__ */ D(c, { children: /* @__PURE__ */ D(s, { children: "Active Deliveries" }) }), /* @__PURE__ */ D(o, {
|
|
174
172
|
className: "p-0",
|
|
175
173
|
children: /* @__PURE__ */ D(t, {
|
|
176
174
|
className: "h-[550px]",
|
|
177
175
|
children: /* @__PURE__ */ O("div", {
|
|
178
176
|
className: "divide-y",
|
|
179
177
|
children: [P.map((e) => e.order ? /* @__PURE__ */ D("div", {
|
|
180
|
-
|
|
178
|
+
role: "button",
|
|
179
|
+
tabIndex: 0,
|
|
180
|
+
"aria-label": `Select delivery ${e.order.orderNumber}`,
|
|
181
|
+
className: `p-4 hover:bg-bg-sunken/50 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg ${B === e.order.id ? "bg-bg-sunken/50" : ""}`,
|
|
181
182
|
onClick: () => V(e.order.id),
|
|
183
|
+
onKeyDown: (t) => {
|
|
184
|
+
(t.key === "Enter" || t.key === " ") && e.order && (t.preventDefault(), V(e.order.id));
|
|
185
|
+
},
|
|
182
186
|
children: /* @__PURE__ */ O("div", {
|
|
183
187
|
className: "flex items-start justify-between",
|
|
184
188
|
children: [/* @__PURE__ */ O("div", { children: [
|
|
@@ -187,7 +191,7 @@ function N() {
|
|
|
187
191
|
children: [/* @__PURE__ */ D("span", {
|
|
188
192
|
className: "font-medium",
|
|
189
193
|
children: e.order.orderNumber
|
|
190
|
-
}), /* @__PURE__ */ D(
|
|
194
|
+
}), /* @__PURE__ */ D(w, {
|
|
191
195
|
status: e.order.status,
|
|
192
196
|
type: "order",
|
|
193
197
|
size: "sm"
|
|
@@ -208,7 +212,7 @@ function N() {
|
|
|
208
212
|
children: [
|
|
209
213
|
"ETA:",
|
|
210
214
|
" ",
|
|
211
|
-
e.estimatedArrival ?
|
|
215
|
+
e.estimatedArrival ? T(e.estimatedArrival, "time") : "N/A"
|
|
212
216
|
]
|
|
213
217
|
}), /* @__PURE__ */ D("p", {
|
|
214
218
|
className: "text-xs text-text-secondary",
|
|
@@ -216,7 +220,7 @@ function N() {
|
|
|
216
220
|
})]
|
|
217
221
|
})]
|
|
218
222
|
})
|
|
219
|
-
}, e.order.id) : null), P.length === 0 && /* @__PURE__ */ D(
|
|
223
|
+
}, e.order.id) : null), P.length === 0 && /* @__PURE__ */ D(p, {
|
|
220
224
|
illustration: "empty-sessions",
|
|
221
225
|
title: "No active deliveries",
|
|
222
226
|
description: "When orders are dispatched they'll appear here in real time."
|
|
@@ -234,7 +238,7 @@ function N() {
|
|
|
234
238
|
children: [/* @__PURE__ */ D("h2", {
|
|
235
239
|
className: "text-base font-semibold text-text-primary",
|
|
236
240
|
children: "Delivery Details"
|
|
237
|
-
}), /* @__PURE__ */ D(
|
|
241
|
+
}), /* @__PURE__ */ D(m, {
|
|
238
242
|
variant: "ghost",
|
|
239
243
|
size: "sm",
|
|
240
244
|
onClick: () => V(null),
|
|
@@ -290,16 +294,16 @@ function N() {
|
|
|
290
294
|
children: "Estimated Arrival"
|
|
291
295
|
}), /* @__PURE__ */ D("p", {
|
|
292
296
|
className: "font-medium",
|
|
293
|
-
children: U.estimatedArrival ?
|
|
297
|
+
children: U.estimatedArrival ? T(U.estimatedArrival, "full") : "Calculating..."
|
|
294
298
|
})] }),
|
|
295
299
|
/* @__PURE__ */ O("div", {
|
|
296
300
|
className: "pt-2 space-y-2",
|
|
297
|
-
children: [/* @__PURE__ */ D(
|
|
301
|
+
children: [/* @__PURE__ */ D(m, {
|
|
298
302
|
className: "w-full",
|
|
299
303
|
onClick: () => U.order && H(`orders/${U.order.id}`),
|
|
300
304
|
disabled: !U.order,
|
|
301
305
|
children: "View Order"
|
|
302
|
-
}), /* @__PURE__ */ D(
|
|
306
|
+
}), /* @__PURE__ */ D(m, {
|
|
303
307
|
variant: "outline",
|
|
304
308
|
className: "w-full",
|
|
305
309
|
onClick: () => U.order && H(`tracking?order=${U.order.id}`),
|
|
@@ -309,30 +313,30 @@ function N() {
|
|
|
309
313
|
})
|
|
310
314
|
]
|
|
311
315
|
})]
|
|
312
|
-
}) : /* @__PURE__ */ D(
|
|
316
|
+
}) : /* @__PURE__ */ D(a, { children: /* @__PURE__ */ D(o, {
|
|
313
317
|
className: "p-6",
|
|
314
|
-
children: /* @__PURE__ */ D(
|
|
318
|
+
children: /* @__PURE__ */ D(p, {
|
|
315
319
|
illustration: "empty-generic",
|
|
316
320
|
title: "No delivery selected",
|
|
317
321
|
description: "Pick a delivery from the list to see its driver, vehicle, ETA and live location."
|
|
318
322
|
})
|
|
319
323
|
}) }),
|
|
320
|
-
/* @__PURE__ */ O(
|
|
324
|
+
/* @__PURE__ */ O(a, { children: [/* @__PURE__ */ D(c, { children: /* @__PURE__ */ O(s, {
|
|
321
325
|
className: "flex items-center gap-2",
|
|
322
326
|
children: ["Alerts", L.length > 0 && /* @__PURE__ */ D(u, {
|
|
323
327
|
variant: "destructive",
|
|
324
328
|
children: L.length
|
|
325
329
|
})]
|
|
326
|
-
}) }), /* @__PURE__ */ D(
|
|
330
|
+
}) }), /* @__PURE__ */ D(o, { children: L.length > 0 ? /* @__PURE__ */ D("div", {
|
|
327
331
|
className: "space-y-3",
|
|
328
332
|
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-
|
|
333
|
+
className: `p-3 rounded-lg text-sm ${e.severity === "critical" || e.severity === "high" ? "bg-status-error-bg-subtle" : "bg-status-warning-bg-subtle"}`,
|
|
330
334
|
children: [/* @__PURE__ */ D("p", {
|
|
331
335
|
className: "font-medium",
|
|
332
336
|
children: e.message
|
|
333
337
|
}), /* @__PURE__ */ D("p", {
|
|
334
338
|
className: "text-xs text-text-secondary mt-1",
|
|
335
|
-
children:
|
|
339
|
+
children: T(e.timestamp, "relative")
|
|
336
340
|
})]
|
|
337
341
|
}, e.id))
|
|
338
342
|
}) : /* @__PURE__ */ D("div", {
|
|
@@ -342,26 +346,26 @@ function N() {
|
|
|
342
346
|
children: "No active alerts"
|
|
343
347
|
})
|
|
344
348
|
}) })] }),
|
|
345
|
-
/* @__PURE__ */ O(
|
|
349
|
+
/* @__PURE__ */ O(a, { children: [/* @__PURE__ */ D(c, { children: /* @__PURE__ */ D(s, { children: "Quick Actions" }) }), /* @__PURE__ */ O(o, {
|
|
346
350
|
className: "space-y-2",
|
|
347
351
|
children: [
|
|
348
|
-
/* @__PURE__ */ O(
|
|
352
|
+
/* @__PURE__ */ O(m, {
|
|
349
353
|
variant: "outline",
|
|
350
354
|
className: "w-full",
|
|
351
355
|
onClick: () => H("orders/new"),
|
|
352
|
-
children: [/* @__PURE__ */ D(
|
|
356
|
+
children: [/* @__PURE__ */ D(_, { size: 16 }), "Create Order"]
|
|
353
357
|
}),
|
|
354
|
-
/* @__PURE__ */ O(
|
|
358
|
+
/* @__PURE__ */ O(m, {
|
|
355
359
|
variant: "outline",
|
|
356
360
|
className: "w-full",
|
|
357
361
|
onClick: () => H("routes"),
|
|
358
|
-
children: [/* @__PURE__ */ D(
|
|
362
|
+
children: [/* @__PURE__ */ D(h, { size: 16 }), "Manage Routes"]
|
|
359
363
|
}),
|
|
360
|
-
/* @__PURE__ */ O(
|
|
364
|
+
/* @__PURE__ */ O(m, {
|
|
361
365
|
variant: "outline",
|
|
362
366
|
className: "w-full",
|
|
363
367
|
onClick: () => H("fleet"),
|
|
364
|
-
children: [/* @__PURE__ */ D(
|
|
368
|
+
children: [/* @__PURE__ */ D(y, { size: 16 }), "Fleet Status"]
|
|
365
369
|
})
|
|
366
370
|
]
|
|
367
371
|
})] })
|