@burdenoff/microfe-movethewheels 2026.510.105
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/README.md +82 -0
- package/dist/AIAssistantPage-hD0VYJdH.js +210 -0
- package/dist/AnalyticsPage-DHTHCUtr.js +201 -0
- package/dist/CreateOrderPage-Cprg4Y9V.js +471 -0
- package/dist/CustomerDetailsPage-DNDEw7IW.js +239 -0
- package/dist/CustomersPage-CDjjeCEL.js +119 -0
- package/dist/DashboardPage-8iTPXRAG.js +374 -0
- package/dist/DataTable-CRIKfdIN.js +239 -0
- package/dist/DriverDetailsPage-CRyRCno7.js +297 -0
- package/dist/DriversPage-16O8fVmf.js +127 -0
- package/dist/FinancePage-BYUxK5dR.js +154 -0
- package/dist/FleetPage-CHYETCWT.js +293 -0
- package/dist/ImportExportPage-C3MKKxfc.js +232 -0
- package/dist/InventoryPage--822AxZM.js +223 -0
- package/dist/LiveTrackingPage-Dp3rTJDr.js +332 -0
- package/dist/MarketplacePage-DjEqudfM.js +192 -0
- package/dist/MetricCard-GTbxAk1a.js +135 -0
- package/dist/OrderDetailsPage-BIuYG0ub.js +398 -0
- package/dist/OrdersListPage-CW5V0Uvh.js +257 -0
- package/dist/PageLayout-B7b0vl0R.js +1894 -0
- package/dist/ProductDetailsPage-Q3X7AT-7.js +168 -0
- package/dist/ProductsPage-CUj9JpnW.js +131 -0
- package/dist/ReportsPage-DblO5CdJ.js +227 -0
- package/dist/RouteDetailsPage-CLctgk6A.js +240 -0
- package/dist/RoutesPage-8hrv6RWT.js +116 -0
- package/dist/SettingsPage-BJ5BQeqn.js +247 -0
- package/dist/StatusBadge-BrrwraIA.js +206 -0
- package/dist/TrackingPage-BGqHDh-w.js +322 -0
- package/dist/VehicleDetailsPage-XnDH4iQR.js +194 -0
- package/dist/VehiclesPage-Cs4XxHkA.js +127 -0
- package/dist/WarehouseDetailsPage-GemdMvr_.js +215 -0
- package/dist/WarehousesPage-QTiuDuXy.js +121 -0
- package/dist/arrow-left-6CiLhqVp.js +11 -0
- package/dist/box-BunB_4UH.js +18 -0
- package/dist/chart-column-DWwVEVQ-.js +22 -0
- package/dist/chevron-right-DhZVf20o.js +8 -0
- package/dist/circle-alert-D5f6RZxt.js +26 -0
- package/dist/circle-check-big-D-JMHcTe.js +11 -0
- package/dist/clock-CvwBKbQP.js +13 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/dollar-sign-CP9qeU5d.js +14 -0
- package/dist/download-CIuG04pJ.js +21 -0
- package/dist/file-text-Dd_thxkn.js +26 -0
- package/dist/filter-DyRMX9CU.js +8 -0
- package/dist/formatters-_vJlC-47.js +50 -0
- package/dist/generated/global-operations.d.ts +1 -0
- package/dist/generated/global-types.d.ts +20715 -0
- package/dist/generated/wspace-operations.d.ts +3704 -0
- package/dist/generated/wspace-types.d.ts +53362 -0
- package/dist/graphqlClient-CdJyR_ed.js +55 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +772 -0
- package/dist/map-BqH1cBJi.js +18 -0
- package/dist/map-pin-CFBOmh-A.js +13 -0
- package/dist/movethewheels/MoveTheWheelsRoot.d.ts +25 -0
- package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +7 -0
- package/dist/movethewheels/components/DataTable.d.ts +32 -0
- package/dist/movethewheels/components/MetricCard.d.ts +43 -0
- package/dist/movethewheels/components/PageLayout.d.ts +68 -0
- package/dist/movethewheels/components/StatusBadge.d.ts +49 -0
- package/dist/movethewheels/components/index.d.ts +10 -0
- package/dist/movethewheels/components/ui.d.ts +22 -0
- package/dist/movethewheels/constants/index.d.ts +24 -0
- package/dist/movethewheels/constants/mockData.d.ts +33 -0
- package/dist/movethewheels/hooks/index.d.ts +12 -0
- package/dist/movethewheels/hooks/useAnalytics.d.ts +118 -0
- package/dist/movethewheels/hooks/useCustomers.d.ts +37 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +71 -0
- package/dist/movethewheels/hooks/useInventory.d.ts +60 -0
- package/dist/movethewheels/hooks/useOrders.d.ts +47 -0
- package/dist/movethewheels/hooks/useRoutes.d.ts +41 -0
- package/dist/movethewheels/hooks/useTracking.d.ts +69 -0
- package/dist/movethewheels/index.d.ts +30 -0
- package/dist/movethewheels/pages/AIAssistantPage.d.ts +4 -0
- package/dist/movethewheels/pages/AnalyticsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CreateOrderPage.d.ts +6 -0
- package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CustomersPage.d.ts +4 -0
- package/dist/movethewheels/pages/DashboardPage.d.ts +6 -0
- package/dist/movethewheels/pages/DriverDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/DriversPage.d.ts +4 -0
- package/dist/movethewheels/pages/FinancePage.d.ts +4 -0
- package/dist/movethewheels/pages/FleetPage.d.ts +6 -0
- package/dist/movethewheels/pages/ImportExportPage.d.ts +4 -0
- package/dist/movethewheels/pages/InventoryPage.d.ts +4 -0
- package/dist/movethewheels/pages/LiveTrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/MarketplacePage.d.ts +4 -0
- package/dist/movethewheels/pages/OrderDetailsPage.d.ts +6 -0
- package/dist/movethewheels/pages/OrdersListPage.d.ts +6 -0
- package/dist/movethewheels/pages/ProductDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ProductsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ReportsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RouteDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RoutesPage.d.ts +4 -0
- package/dist/movethewheels/pages/SettingsPage.d.ts +4 -0
- package/dist/movethewheels/pages/TrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/VehiclesPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehousesPage.d.ts +4 -0
- package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +16 -0
- package/dist/movethewheels/store/movethewheelsStore.d.ts +73 -0
- package/dist/movethewheels/types/index.d.ts +655 -0
- package/dist/movethewheels/utils/cn.d.ts +6 -0
- package/dist/movethewheels/utils/formatters.d.ts +60 -0
- package/dist/movethewheels/utils/graphqlClient.d.ts +11 -0
- package/dist/movethewheels/utils/index.d.ts +7 -0
- package/dist/movethewheels/utils/navigation.d.ts +23 -0
- package/dist/navigation-BgnOfsVd.js +6 -0
- package/dist/navigation-C2fY_aS9.js +8 -0
- package/dist/package-DVZbDRcV.js +22 -0
- package/dist/phone-KdwpVmC4.js +18 -0
- package/dist/plus-Bl7uX6Ji.js +11 -0
- package/dist/refresh-cw-BYjl3K-8.js +22 -0
- package/dist/route-Ce_poKFi.js +51 -0
- package/dist/save-C-qDVat-.js +18 -0
- package/dist/search-5pdn5eOO.js +13 -0
- package/dist/settings-C4kIDsYg.js +28 -0
- package/dist/square-pen-BwQ67vLE.js +11 -0
- package/dist/star-BlVsC3Ad.js +8 -0
- package/dist/store-DTmQT5M0.js +26 -0
- package/dist/trending-up-C1faflCI.js +11 -0
- package/dist/triangle-alert-CUoVAA4L.js +18 -0
- package/dist/truck-BmDAzu05.js +30 -0
- package/dist/useAnalytics-ph7eTIK6.js +297 -0
- package/dist/useCustomers-bS3a4ytk.js +186 -0
- package/dist/useFleet-BdETplNE.js +398 -0
- package/dist/useInventory-Dwn18FPz.js +323 -0
- package/dist/useOrders-D_3_hGMp.js +324 -0
- package/dist/useRoutes-v4aBaS-E.js +224 -0
- package/dist/useTracking-De2KIUNu.js +261 -0
- package/dist/user-BplzDrLP.js +13 -0
- package/dist/users-i-igmsP4.js +24 -0
- package/dist/warehouse-DewG0PXh.js +25 -0
- package/dist/wrench-CoSDEIC7.js +31 -0
- package/package.json +107 -0
- package/src/dev/main.tsx +110 -0
- package/src/dev/styles.css +139 -0
- package/src/generated/global-operations.ts +2 -0
- package/src/generated/global-types.ts +24048 -0
- package/src/generated/wspace-operations.ts +3734 -0
- package/src/generated/wspace-types.ts +60715 -0
- package/src/index.ts +4 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +258 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +119 -0
- package/src/movethewheels/components/DataTable.tsx +367 -0
- package/src/movethewheels/components/MetricCard.tsx +180 -0
- package/src/movethewheels/components/PageLayout.tsx +234 -0
- package/src/movethewheels/components/StatusBadge.tsx +243 -0
- package/src/movethewheels/components/index.ts +26 -0
- package/src/movethewheels/components/ui.tsx +124 -0
- package/src/movethewheels/constants/index.ts +65 -0
- package/src/movethewheels/constants/mockData.ts +1342 -0
- package/src/movethewheels/hooks/index.ts +55 -0
- package/src/movethewheels/hooks/useAnalytics.ts +476 -0
- package/src/movethewheels/hooks/useCustomers.ts +359 -0
- package/src/movethewheels/hooks/useFleet.ts +778 -0
- package/src/movethewheels/hooks/useInventory.ts +632 -0
- package/src/movethewheels/hooks/useOrders.ts +703 -0
- package/src/movethewheels/hooks/useRoutes.ts +453 -0
- package/src/movethewheels/hooks/useTracking.ts +505 -0
- package/src/movethewheels/index.ts +68 -0
- package/src/movethewheels/pages/AIAssistantPage.tsx +160 -0
- package/src/movethewheels/pages/AnalyticsPage.tsx +190 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +454 -0
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +207 -0
- package/src/movethewheels/pages/CustomersPage.tsx +115 -0
- package/src/movethewheels/pages/DashboardPage.tsx +414 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +261 -0
- package/src/movethewheels/pages/DriversPage.tsx +118 -0
- package/src/movethewheels/pages/FinancePage.tsx +141 -0
- package/src/movethewheels/pages/FleetPage.tsx +289 -0
- package/src/movethewheels/pages/ImportExportPage.tsx +165 -0
- package/src/movethewheels/pages/InventoryPage.tsx +212 -0
- package/src/movethewheels/pages/LiveTrackingPage.tsx +325 -0
- package/src/movethewheels/pages/MarketplacePage.tsx +235 -0
- package/src/movethewheels/pages/OrderDetailsPage.tsx +387 -0
- package/src/movethewheels/pages/OrdersListPage.tsx +241 -0
- package/src/movethewheels/pages/ProductDetailsPage.tsx +155 -0
- package/src/movethewheels/pages/ProductsPage.tsx +124 -0
- package/src/movethewheels/pages/ReportsPage.tsx +164 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +245 -0
- package/src/movethewheels/pages/RoutesPage.tsx +104 -0
- package/src/movethewheels/pages/SettingsPage.tsx +242 -0
- package/src/movethewheels/pages/TrackingPage.tsx +419 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +218 -0
- package/src/movethewheels/pages/VehiclesPage.tsx +124 -0
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +216 -0
- package/src/movethewheels/pages/WarehousesPage.tsx +122 -0
- package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +66 -0
- package/src/movethewheels/store/movethewheelsStore.ts +136 -0
- package/src/movethewheels/types/index.ts +744 -0
- package/src/movethewheels/utils/cn.ts +9 -0
- package/src/movethewheels/utils/formatters.ts +215 -0
- package/src/movethewheels/utils/graphqlClient.ts +63 -0
- package/src/movethewheels/utils/index.ts +8 -0
- package/src/movethewheels/utils/navigation.ts +70 -0
- package/src/operations/global/.gitkeep +0 -0
- package/src/operations/wspace/movethewheels/fragments/core.graphql +191 -0
- package/src/operations/wspace/movethewheels/mutations/entities.graphql +87 -0
- package/src/operations/wspace/movethewheels/mutations/logistics.graphql +86 -0
- package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +81 -0
- package/src/operations/wspace/movethewheels/mutations/orders.graphql +21 -0
- package/src/operations/wspace/movethewheels/queries/dashboard.graphql +61 -0
- package/src/operations/wspace/movethewheels/queries/entities.graphql +83 -0
- package/src/operations/wspace/movethewheels/queries/logistics.graphql +84 -0
- package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +40 -0
- package/src/operations/wspace/movethewheels/queries/orders.graphql +43 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { M as e, a as t, d as n, f as r, g as i, h as a, i as o, l as s, u as c } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as l } from "./chevron-right-DhZVf20o.js";
|
|
3
|
+
import { t as u } from "./package-DVZbDRcV.js";
|
|
4
|
+
import { t as d } from "./plus-Bl7uX6Ji.js";
|
|
5
|
+
import { t as f } from "./triangle-alert-CUoVAA4L.js";
|
|
6
|
+
import { t as p } from "./warehouse-DewG0PXh.js";
|
|
7
|
+
import { r as m } from "./graphqlClient-CdJyR_ed.js";
|
|
8
|
+
import { n as h, t as g } from "./useInventory-Dwn18FPz.js";
|
|
9
|
+
import { r as _, t as v } from "./MetricCard-GTbxAk1a.js";
|
|
10
|
+
import { n as y } from "./formatters-_vJlC-47.js";
|
|
11
|
+
import { t as b } from "./navigation-BgnOfsVd.js";
|
|
12
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
13
|
+
import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
//#region src/movethewheels/pages/InventoryPage.tsx
|
|
15
|
+
function w() {
|
|
16
|
+
let { t: w } = C(), T = (e, t) => {
|
|
17
|
+
let n = w(e);
|
|
18
|
+
return n === e ? t : n;
|
|
19
|
+
}, { basePath: E, navigate: D } = m(), { inventory: O, products: k, warehouses: A } = g(), { stats: j } = h(), M = (e) => D?.(b(E, e)), N = O.filter((e) => e.availableQuantity <= e.reorderLevel);
|
|
20
|
+
return /* @__PURE__ */ S(o, {
|
|
21
|
+
title: T("movethewheels.inventory.title", "Inventory"),
|
|
22
|
+
subtitle: T("movethewheels.inventory.subtitle", "Manage your products and warehouses"),
|
|
23
|
+
icon: /* @__PURE__ */ x(u, { size: 24 }),
|
|
24
|
+
headerActions: /* @__PURE__ */ S("div", {
|
|
25
|
+
className: "flex gap-2",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ x(c, {
|
|
28
|
+
variant: "outline",
|
|
29
|
+
onClick: () => M("inventory/products"),
|
|
30
|
+
children: T("movethewheels.inventory.actions.products", "Products")
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ x(c, {
|
|
33
|
+
variant: "outline",
|
|
34
|
+
onClick: () => M("inventory/warehouses"),
|
|
35
|
+
children: T("movethewheels.inventory.actions.warehouses", "Warehouses")
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ S(c, { children: [
|
|
38
|
+
/* @__PURE__ */ x(d, { size: 16 }),
|
|
39
|
+
" ",
|
|
40
|
+
T("movethewheels.inventory.actions.addProduct", "Add Product")
|
|
41
|
+
] })
|
|
42
|
+
]
|
|
43
|
+
}),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ S(_, {
|
|
46
|
+
columns: 4,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ x(v, {
|
|
49
|
+
label: T("movethewheels.inventory.metrics.totalProducts", "Total Products"),
|
|
50
|
+
value: j.totalProducts,
|
|
51
|
+
icon: /* @__PURE__ */ x(u, { size: 20 }),
|
|
52
|
+
onClick: () => M("inventory/products")
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ x(v, {
|
|
55
|
+
label: T("movethewheels.inventory.metrics.totalItems", "Total Items"),
|
|
56
|
+
value: j.totalItems.toLocaleString(),
|
|
57
|
+
icon: /* @__PURE__ */ x(u, { size: 20 })
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ x(v, {
|
|
60
|
+
label: T("movethewheels.inventory.metrics.inventoryValue", "Inventory Value"),
|
|
61
|
+
value: y(j.totalValue),
|
|
62
|
+
icon: /* @__PURE__ */ x(u, { size: 20 })
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ x(v, {
|
|
65
|
+
label: T("movethewheels.inventory.metrics.warehouses", "Warehouses"),
|
|
66
|
+
value: j.totalWarehouses,
|
|
67
|
+
icon: /* @__PURE__ */ x(p, { size: 20 }),
|
|
68
|
+
onClick: () => M("inventory/warehouses")
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
}),
|
|
72
|
+
N.length > 0 && /* @__PURE__ */ S(n, {
|
|
73
|
+
className: "border-yellow-200",
|
|
74
|
+
children: [/* @__PURE__ */ x(a, { children: /* @__PURE__ */ S(i, {
|
|
75
|
+
className: "flex items-center gap-2 text-yellow-600",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ x(f, { size: 18 }),
|
|
78
|
+
T("movethewheels.inventory.lowStock.title", "Low Stock Alert"),
|
|
79
|
+
" (",
|
|
80
|
+
N.length,
|
|
81
|
+
" ",
|
|
82
|
+
T("movethewheels.inventory.lowStock.items", "items"),
|
|
83
|
+
")"
|
|
84
|
+
]
|
|
85
|
+
}) }), /* @__PURE__ */ x(r, { children: /* @__PURE__ */ x("div", {
|
|
86
|
+
className: "space-y-3",
|
|
87
|
+
children: N.slice(0, 5).map((e) => {
|
|
88
|
+
let t = k.find((t) => t.id === e.productId);
|
|
89
|
+
return /* @__PURE__ */ S("div", {
|
|
90
|
+
className: "flex items-center justify-between p-3 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg",
|
|
91
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
92
|
+
className: "font-medium",
|
|
93
|
+
children: t?.name || T("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product")
|
|
94
|
+
}), /* @__PURE__ */ S("p", {
|
|
95
|
+
className: "text-sm text-muted-foreground",
|
|
96
|
+
children: [
|
|
97
|
+
T("movethewheels.inventory.lowStock.sku", "SKU:"),
|
|
98
|
+
" ",
|
|
99
|
+
t?.sku
|
|
100
|
+
]
|
|
101
|
+
})] }), /* @__PURE__ */ S("div", {
|
|
102
|
+
className: "text-right",
|
|
103
|
+
children: [/* @__PURE__ */ S("p", {
|
|
104
|
+
className: "font-medium text-yellow-600",
|
|
105
|
+
children: [
|
|
106
|
+
e.availableQuantity,
|
|
107
|
+
" ",
|
|
108
|
+
T("movethewheels.inventory.lowStock.left", "left")
|
|
109
|
+
]
|
|
110
|
+
}), /* @__PURE__ */ S("p", {
|
|
111
|
+
className: "text-sm text-muted-foreground",
|
|
112
|
+
children: [
|
|
113
|
+
T("movethewheels.inventory.lowStock.reorderAt", "Reorder at:"),
|
|
114
|
+
" ",
|
|
115
|
+
e.reorderLevel
|
|
116
|
+
]
|
|
117
|
+
})]
|
|
118
|
+
})]
|
|
119
|
+
}, e.id);
|
|
120
|
+
})
|
|
121
|
+
}) })]
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ S("div", {
|
|
124
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
125
|
+
children: [/* @__PURE__ */ x(t, {
|
|
126
|
+
title: T("movethewheels.inventory.warehouses.title", "Warehouses"),
|
|
127
|
+
actions: /* @__PURE__ */ S(c, {
|
|
128
|
+
variant: "ghost",
|
|
129
|
+
size: "sm",
|
|
130
|
+
onClick: () => M("inventory/warehouses"),
|
|
131
|
+
children: [
|
|
132
|
+
T("movethewheels.inventory.common.viewAll", "View all"),
|
|
133
|
+
" ",
|
|
134
|
+
/* @__PURE__ */ x(l, { size: 16 })
|
|
135
|
+
]
|
|
136
|
+
}),
|
|
137
|
+
children: /* @__PURE__ */ x(n, { children: /* @__PURE__ */ x(r, {
|
|
138
|
+
className: "p-0",
|
|
139
|
+
children: /* @__PURE__ */ x("div", {
|
|
140
|
+
className: "divide-y",
|
|
141
|
+
children: A.map((t) => /* @__PURE__ */ x("div", {
|
|
142
|
+
className: "p-4 hover:bg-muted/50 cursor-pointer",
|
|
143
|
+
onClick: () => M(`inventory/warehouses/${t.id}`),
|
|
144
|
+
children: /* @__PURE__ */ S("div", {
|
|
145
|
+
className: "flex items-center justify-between",
|
|
146
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
147
|
+
className: "font-medium",
|
|
148
|
+
children: t.name
|
|
149
|
+
}), /* @__PURE__ */ S("p", {
|
|
150
|
+
className: "text-sm text-muted-foreground",
|
|
151
|
+
children: [
|
|
152
|
+
t.address.city,
|
|
153
|
+
", ",
|
|
154
|
+
t.address.state
|
|
155
|
+
]
|
|
156
|
+
})] }), /* @__PURE__ */ S("div", {
|
|
157
|
+
className: "text-right",
|
|
158
|
+
children: [/* @__PURE__ */ x(s, {
|
|
159
|
+
variant: t.isActive ? "default" : "secondary",
|
|
160
|
+
children: t.isActive ? T("movethewheels.inventory.warehouses.active", "Active") : T("movethewheels.inventory.warehouses.inactive", "Inactive")
|
|
161
|
+
}), /* @__PURE__ */ S("div", {
|
|
162
|
+
className: "mt-2",
|
|
163
|
+
children: [/* @__PURE__ */ x("p", {
|
|
164
|
+
className: "text-xs text-muted-foreground",
|
|
165
|
+
children: T("movethewheels.inventory.warehouses.utilization", "Utilization")
|
|
166
|
+
}), /* @__PURE__ */ x(e, {
|
|
167
|
+
value: t.capacity.usedSpace / t.capacity.totalSpace * 100,
|
|
168
|
+
className: "w-24 h-2"
|
|
169
|
+
})]
|
|
170
|
+
})]
|
|
171
|
+
})]
|
|
172
|
+
})
|
|
173
|
+
}, t.id))
|
|
174
|
+
})
|
|
175
|
+
}) })
|
|
176
|
+
}), /* @__PURE__ */ x(t, {
|
|
177
|
+
title: T("movethewheels.inventory.products.title", "Recent Products"),
|
|
178
|
+
actions: /* @__PURE__ */ S(c, {
|
|
179
|
+
variant: "ghost",
|
|
180
|
+
size: "sm",
|
|
181
|
+
onClick: () => M("inventory/products"),
|
|
182
|
+
children: [
|
|
183
|
+
T("movethewheels.inventory.common.viewAll", "View all"),
|
|
184
|
+
" ",
|
|
185
|
+
/* @__PURE__ */ x(l, { size: 16 })
|
|
186
|
+
]
|
|
187
|
+
}),
|
|
188
|
+
children: /* @__PURE__ */ x(n, { children: /* @__PURE__ */ x(r, {
|
|
189
|
+
className: "p-0",
|
|
190
|
+
children: /* @__PURE__ */ x("div", {
|
|
191
|
+
className: "divide-y",
|
|
192
|
+
children: k.slice(0, 5).map((e) => /* @__PURE__ */ x("div", {
|
|
193
|
+
className: "p-4 hover:bg-muted/50 cursor-pointer",
|
|
194
|
+
onClick: () => M(`inventory/products/${e.id}`),
|
|
195
|
+
children: /* @__PURE__ */ S("div", {
|
|
196
|
+
className: "flex items-center justify-between",
|
|
197
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
198
|
+
className: "font-medium",
|
|
199
|
+
children: e.name
|
|
200
|
+
}), /* @__PURE__ */ x("p", {
|
|
201
|
+
className: "text-sm text-muted-foreground",
|
|
202
|
+
children: e.sku
|
|
203
|
+
})] }), /* @__PURE__ */ S("div", {
|
|
204
|
+
className: "text-right",
|
|
205
|
+
children: [/* @__PURE__ */ x("p", {
|
|
206
|
+
className: "font-medium",
|
|
207
|
+
children: y(e.value)
|
|
208
|
+
}), /* @__PURE__ */ x(s, {
|
|
209
|
+
variant: "outline",
|
|
210
|
+
children: e.category
|
|
211
|
+
})]
|
|
212
|
+
})]
|
|
213
|
+
})
|
|
214
|
+
}, e.id))
|
|
215
|
+
})
|
|
216
|
+
}) })
|
|
217
|
+
})]
|
|
218
|
+
})
|
|
219
|
+
]
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
export { w as default };
|
|
@@ -0,0 +1,332 @@
|
|
|
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, u as d } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as f } from "./map-pin-CFBOmh-A.js";
|
|
3
|
+
import { t as p } from "./map-BqH1cBJi.js";
|
|
4
|
+
import { t as m } from "./package-DVZbDRcV.js";
|
|
5
|
+
import { t as h } from "./refresh-cw-BYjl3K-8.js";
|
|
6
|
+
import { t as g } from "./truck-BmDAzu05.js";
|
|
7
|
+
import { r as _ } from "./graphqlClient-CdJyR_ed.js";
|
|
8
|
+
import { o as v, r as y } from "./useTracking-De2KIUNu.js";
|
|
9
|
+
import { r as b, t as x } from "./MetricCard-GTbxAk1a.js";
|
|
10
|
+
import { r as S } from "./StatusBadge-BrrwraIA.js";
|
|
11
|
+
import { r as C } from "./formatters-_vJlC-47.js";
|
|
12
|
+
import { t as w } from "./navigation-BgnOfsVd.js";
|
|
13
|
+
import { useState as T } from "react";
|
|
14
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
15
|
+
//#region node_modules/lucide-react/dist/esm/icons/list.js
|
|
16
|
+
var O = l("List", [
|
|
17
|
+
["path", {
|
|
18
|
+
d: "M3 12h.01",
|
|
19
|
+
key: "nlz23k"
|
|
20
|
+
}],
|
|
21
|
+
["path", {
|
|
22
|
+
d: "M3 18h.01",
|
|
23
|
+
key: "1tta3j"
|
|
24
|
+
}],
|
|
25
|
+
["path", {
|
|
26
|
+
d: "M3 6h.01",
|
|
27
|
+
key: "1rqtza"
|
|
28
|
+
}],
|
|
29
|
+
["path", {
|
|
30
|
+
d: "M8 12h13",
|
|
31
|
+
key: "1za7za"
|
|
32
|
+
}],
|
|
33
|
+
["path", {
|
|
34
|
+
d: "M8 18h13",
|
|
35
|
+
key: "1lx6n3"
|
|
36
|
+
}],
|
|
37
|
+
["path", {
|
|
38
|
+
d: "M8 6h13",
|
|
39
|
+
key: "ik3vkj"
|
|
40
|
+
}]
|
|
41
|
+
]);
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/movethewheels/pages/LiveTrackingPage.tsx
|
|
44
|
+
function k() {
|
|
45
|
+
let { basePath: l, navigate: k } = _(), { activeDeliveries: A, isLoading: j, refetch: M } = y(), { unacknowledgedAlerts: N } = v(), [P, F] = T("map"), [I, L] = T(null), R = (e) => {
|
|
46
|
+
k && k(w(l, e));
|
|
47
|
+
}, z = I ? A.find((e) => e.order?.id === I) : null;
|
|
48
|
+
return /* @__PURE__ */ D(c, {
|
|
49
|
+
title: "Live Tracking",
|
|
50
|
+
subtitle: `${A.length} active deliveries`,
|
|
51
|
+
icon: /* @__PURE__ */ E(f, { size: 24 }),
|
|
52
|
+
headerActions: /* @__PURE__ */ D("div", {
|
|
53
|
+
className: "flex gap-2",
|
|
54
|
+
children: [/* @__PURE__ */ D(d, {
|
|
55
|
+
variant: "outline",
|
|
56
|
+
onClick: M,
|
|
57
|
+
disabled: j,
|
|
58
|
+
children: [/* @__PURE__ */ E(h, {
|
|
59
|
+
size: 16,
|
|
60
|
+
className: j ? "animate-spin" : ""
|
|
61
|
+
}), "Refresh"]
|
|
62
|
+
}), /* @__PURE__ */ E(e, {
|
|
63
|
+
value: P,
|
|
64
|
+
onValueChange: (e) => F(e),
|
|
65
|
+
children: /* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(r, {
|
|
66
|
+
value: "map",
|
|
67
|
+
children: /* @__PURE__ */ E(p, { size: 16 })
|
|
68
|
+
}), /* @__PURE__ */ E(r, {
|
|
69
|
+
value: "list",
|
|
70
|
+
children: /* @__PURE__ */ E(O, { size: 16 })
|
|
71
|
+
})] })
|
|
72
|
+
})]
|
|
73
|
+
}),
|
|
74
|
+
children: [/* @__PURE__ */ D(b, {
|
|
75
|
+
columns: 4,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ E(x, {
|
|
78
|
+
size: "sm",
|
|
79
|
+
label: "Active Deliveries",
|
|
80
|
+
value: A.length,
|
|
81
|
+
icon: /* @__PURE__ */ E(g, { size: 18 })
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ E(x, {
|
|
84
|
+
size: "sm",
|
|
85
|
+
label: "In Transit",
|
|
86
|
+
value: A.filter((e) => e.order?.status === "in_transit").length,
|
|
87
|
+
icon: /* @__PURE__ */ E(m, { size: 18 })
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ E(x, {
|
|
90
|
+
size: "sm",
|
|
91
|
+
label: "Out for Delivery",
|
|
92
|
+
value: A.filter((e) => e.order?.status === "out_for_delivery").length,
|
|
93
|
+
icon: /* @__PURE__ */ E(f, { size: 18 })
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ E(x, {
|
|
96
|
+
size: "sm",
|
|
97
|
+
label: "Alerts",
|
|
98
|
+
value: N.length,
|
|
99
|
+
changeType: N.length > 0 ? "negative" : "neutral"
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
}), /* @__PURE__ */ D("div", {
|
|
103
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
104
|
+
children: [/* @__PURE__ */ E("div", {
|
|
105
|
+
className: "lg:col-span-2",
|
|
106
|
+
children: P === "map" ? /* @__PURE__ */ E(i, {
|
|
107
|
+
className: "h-[600px]",
|
|
108
|
+
children: /* @__PURE__ */ E(a, {
|
|
109
|
+
className: "p-0 h-full",
|
|
110
|
+
children: /* @__PURE__ */ E("div", {
|
|
111
|
+
className: "w-full h-full bg-muted rounded-lg flex items-center justify-center",
|
|
112
|
+
children: /* @__PURE__ */ D("div", {
|
|
113
|
+
className: "text-center text-muted-foreground",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ E(f, {
|
|
116
|
+
size: 64,
|
|
117
|
+
className: "mx-auto mb-4 opacity-50"
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ E("p", {
|
|
120
|
+
className: "text-lg font-medium",
|
|
121
|
+
children: "Map View"
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ D("p", {
|
|
124
|
+
className: "text-sm",
|
|
125
|
+
children: [
|
|
126
|
+
"Interactive map showing ",
|
|
127
|
+
A.length,
|
|
128
|
+
" active deliveries"
|
|
129
|
+
]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ E("p", {
|
|
132
|
+
className: "text-xs mt-2",
|
|
133
|
+
children: "(Map integration with Mapbox/Google Maps would go here)"
|
|
134
|
+
})
|
|
135
|
+
]
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
}) : /* @__PURE__ */ D(i, { children: [/* @__PURE__ */ E(s, { children: /* @__PURE__ */ E(o, { children: "Active Deliveries" }) }), /* @__PURE__ */ E(a, {
|
|
140
|
+
className: "p-0",
|
|
141
|
+
children: /* @__PURE__ */ E(t, {
|
|
142
|
+
className: "h-[550px]",
|
|
143
|
+
children: /* @__PURE__ */ D("div", {
|
|
144
|
+
className: "divide-y",
|
|
145
|
+
children: [A.map((e) => e.order ? /* @__PURE__ */ E("div", {
|
|
146
|
+
className: `p-4 hover:bg-muted/50 cursor-pointer transition-colors ${I === e.order.id ? "bg-muted/50" : ""}`,
|
|
147
|
+
onClick: () => L(e.order.id),
|
|
148
|
+
children: /* @__PURE__ */ D("div", {
|
|
149
|
+
className: "flex items-start justify-between",
|
|
150
|
+
children: [/* @__PURE__ */ D("div", { children: [
|
|
151
|
+
/* @__PURE__ */ D("div", {
|
|
152
|
+
className: "flex items-center gap-2 mb-1",
|
|
153
|
+
children: [/* @__PURE__ */ E("span", {
|
|
154
|
+
className: "font-medium",
|
|
155
|
+
children: e.order.orderNumber
|
|
156
|
+
}), /* @__PURE__ */ E(S, {
|
|
157
|
+
status: e.order.status,
|
|
158
|
+
type: "order",
|
|
159
|
+
size: "sm"
|
|
160
|
+
})]
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ E("p", {
|
|
163
|
+
className: "text-sm text-muted-foreground",
|
|
164
|
+
children: e.order.customerInfo.name
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ D("p", {
|
|
167
|
+
className: "text-sm text-muted-foreground",
|
|
168
|
+
children: [e.driver?.fullName || "Unassigned", e.vehicle && ` - ${e.vehicle.vehicleNumber}`]
|
|
169
|
+
})
|
|
170
|
+
] }), /* @__PURE__ */ D("div", {
|
|
171
|
+
className: "text-right",
|
|
172
|
+
children: [/* @__PURE__ */ D("p", {
|
|
173
|
+
className: "text-sm font-medium",
|
|
174
|
+
children: [
|
|
175
|
+
"ETA:",
|
|
176
|
+
" ",
|
|
177
|
+
e.estimatedArrival ? C(e.estimatedArrival, "time") : "N/A"
|
|
178
|
+
]
|
|
179
|
+
}), /* @__PURE__ */ E("p", {
|
|
180
|
+
className: "text-xs text-muted-foreground",
|
|
181
|
+
children: e.tracking?.currentLocation.address || "Location updating..."
|
|
182
|
+
})]
|
|
183
|
+
})]
|
|
184
|
+
})
|
|
185
|
+
}, e.order.id) : null), A.length === 0 && /* @__PURE__ */ E("div", {
|
|
186
|
+
className: "p-8 text-center text-muted-foreground",
|
|
187
|
+
children: "No active deliveries"
|
|
188
|
+
})]
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
})] })
|
|
192
|
+
}), /* @__PURE__ */ D("div", {
|
|
193
|
+
className: "space-y-6",
|
|
194
|
+
children: [
|
|
195
|
+
z ? /* @__PURE__ */ D(i, { children: [/* @__PURE__ */ E(s, { children: /* @__PURE__ */ D("div", {
|
|
196
|
+
className: "flex items-center justify-between",
|
|
197
|
+
children: [/* @__PURE__ */ E(o, { children: "Delivery Details" }), /* @__PURE__ */ E(d, {
|
|
198
|
+
variant: "ghost",
|
|
199
|
+
size: "sm",
|
|
200
|
+
onClick: () => L(null),
|
|
201
|
+
children: "Clear"
|
|
202
|
+
})]
|
|
203
|
+
}) }), /* @__PURE__ */ D(a, {
|
|
204
|
+
className: "space-y-4",
|
|
205
|
+
children: [
|
|
206
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
207
|
+
className: "text-sm text-muted-foreground",
|
|
208
|
+
children: "Order"
|
|
209
|
+
}), /* @__PURE__ */ E("p", {
|
|
210
|
+
className: "font-medium",
|
|
211
|
+
children: z.order?.orderNumber ?? "-"
|
|
212
|
+
})] }),
|
|
213
|
+
/* @__PURE__ */ D("div", { children: [
|
|
214
|
+
/* @__PURE__ */ E("p", {
|
|
215
|
+
className: "text-sm text-muted-foreground",
|
|
216
|
+
children: "Customer"
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ E("p", {
|
|
219
|
+
className: "font-medium",
|
|
220
|
+
children: z.order?.customerInfo.name ?? "-"
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ E("p", {
|
|
223
|
+
className: "text-sm text-muted-foreground",
|
|
224
|
+
children: z.order?.customerInfo.phone ?? "-"
|
|
225
|
+
})
|
|
226
|
+
] }),
|
|
227
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
228
|
+
className: "text-sm text-muted-foreground",
|
|
229
|
+
children: "Driver"
|
|
230
|
+
}), /* @__PURE__ */ E("p", {
|
|
231
|
+
className: "font-medium",
|
|
232
|
+
children: z.driver?.fullName || "Unassigned"
|
|
233
|
+
})] }),
|
|
234
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
235
|
+
className: "text-sm text-muted-foreground",
|
|
236
|
+
children: "Vehicle"
|
|
237
|
+
}), /* @__PURE__ */ E("p", {
|
|
238
|
+
className: "font-medium",
|
|
239
|
+
children: z.vehicle ? `${z.vehicle.vehicleNumber} - ${z.vehicle.make} ${z.vehicle.model}` : "Not assigned"
|
|
240
|
+
})] }),
|
|
241
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
242
|
+
className: "text-sm text-muted-foreground",
|
|
243
|
+
children: "Current Location"
|
|
244
|
+
}), /* @__PURE__ */ E("p", {
|
|
245
|
+
className: "text-sm",
|
|
246
|
+
children: z.tracking?.currentLocation.address || "Updating..."
|
|
247
|
+
})] }),
|
|
248
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
249
|
+
className: "text-sm text-muted-foreground",
|
|
250
|
+
children: "Estimated Arrival"
|
|
251
|
+
}), /* @__PURE__ */ E("p", {
|
|
252
|
+
className: "font-medium",
|
|
253
|
+
children: z.estimatedArrival ? C(z.estimatedArrival, "full") : "Calculating..."
|
|
254
|
+
})] }),
|
|
255
|
+
/* @__PURE__ */ D("div", {
|
|
256
|
+
className: "pt-2 space-y-2",
|
|
257
|
+
children: [/* @__PURE__ */ E(d, {
|
|
258
|
+
className: "w-full",
|
|
259
|
+
onClick: () => z.order && R(`orders/${z.order.id}`),
|
|
260
|
+
disabled: !z.order,
|
|
261
|
+
children: "View Order"
|
|
262
|
+
}), /* @__PURE__ */ E(d, {
|
|
263
|
+
variant: "outline",
|
|
264
|
+
className: "w-full",
|
|
265
|
+
onClick: () => z.order && R(`tracking?order=${z.order.id}`),
|
|
266
|
+
disabled: !z.order,
|
|
267
|
+
children: "Track Details"
|
|
268
|
+
})]
|
|
269
|
+
})
|
|
270
|
+
]
|
|
271
|
+
})] }) : /* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(a, {
|
|
272
|
+
className: "p-8 text-center text-muted-foreground",
|
|
273
|
+
children: [/* @__PURE__ */ E(f, {
|
|
274
|
+
size: 32,
|
|
275
|
+
className: "mx-auto mb-2 opacity-50"
|
|
276
|
+
}), /* @__PURE__ */ E("p", { children: "Select a delivery to see details" })]
|
|
277
|
+
}) }),
|
|
278
|
+
/* @__PURE__ */ D(i, { children: [/* @__PURE__ */ E(s, { children: /* @__PURE__ */ D(o, {
|
|
279
|
+
className: "flex items-center gap-2",
|
|
280
|
+
children: ["Alerts", N.length > 0 && /* @__PURE__ */ E(u, {
|
|
281
|
+
variant: "destructive",
|
|
282
|
+
children: N.length
|
|
283
|
+
})]
|
|
284
|
+
}) }), /* @__PURE__ */ E(a, { children: N.length > 0 ? /* @__PURE__ */ E("div", {
|
|
285
|
+
className: "space-y-3",
|
|
286
|
+
children: N.slice(0, 5).map((e) => /* @__PURE__ */ D("div", {
|
|
287
|
+
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"}`,
|
|
288
|
+
children: [/* @__PURE__ */ E("p", {
|
|
289
|
+
className: "font-medium",
|
|
290
|
+
children: e.message
|
|
291
|
+
}), /* @__PURE__ */ E("p", {
|
|
292
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
293
|
+
children: C(e.timestamp, "relative")
|
|
294
|
+
})]
|
|
295
|
+
}, e.id))
|
|
296
|
+
}) : /* @__PURE__ */ E("div", {
|
|
297
|
+
className: "text-center text-muted-foreground py-4",
|
|
298
|
+
children: /* @__PURE__ */ E("p", {
|
|
299
|
+
className: "text-sm",
|
|
300
|
+
children: "No active alerts"
|
|
301
|
+
})
|
|
302
|
+
}) })] }),
|
|
303
|
+
/* @__PURE__ */ D(i, { children: [/* @__PURE__ */ E(s, { children: /* @__PURE__ */ E(o, { children: "Quick Actions" }) }), /* @__PURE__ */ D(a, {
|
|
304
|
+
className: "space-y-2",
|
|
305
|
+
children: [
|
|
306
|
+
/* @__PURE__ */ D(d, {
|
|
307
|
+
variant: "outline",
|
|
308
|
+
className: "w-full",
|
|
309
|
+
onClick: () => R("orders/new"),
|
|
310
|
+
children: [/* @__PURE__ */ E(m, { size: 16 }), "Create Order"]
|
|
311
|
+
}),
|
|
312
|
+
/* @__PURE__ */ D(d, {
|
|
313
|
+
variant: "outline",
|
|
314
|
+
className: "w-full",
|
|
315
|
+
onClick: () => R("routes"),
|
|
316
|
+
children: [/* @__PURE__ */ E(f, { size: 16 }), "Manage Routes"]
|
|
317
|
+
}),
|
|
318
|
+
/* @__PURE__ */ D(d, {
|
|
319
|
+
variant: "outline",
|
|
320
|
+
className: "w-full",
|
|
321
|
+
onClick: () => R("fleet"),
|
|
322
|
+
children: [/* @__PURE__ */ E(g, { size: 16 }), "Fleet Status"]
|
|
323
|
+
})
|
|
324
|
+
]
|
|
325
|
+
})] })
|
|
326
|
+
]
|
|
327
|
+
})]
|
|
328
|
+
})]
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
//#endregion
|
|
332
|
+
export { k as default };
|