@burdenoff/microfe-movethewheels 2026.703.3 → 2026.703.5
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-C3cPsWt-.js → AIAssistantPage-D2gaEL1U.js} +16 -15
- package/dist/AnalyticsPage-DZMlEoBi.js +194 -0
- package/dist/CreateOrderPage-CWHx8yys.js +490 -0
- package/dist/CustomerDetailsPage-nR4oZ_ju.js +615 -0
- package/dist/CustomersPage-Bbvwvn8k.js +205 -0
- package/dist/DashboardPage-DrEhNf7N.js +542 -0
- package/dist/DataTable-CqMUD4er.js +340 -0
- package/dist/DocumentsCard-edDkgnJj.js +169 -0
- package/dist/DriverDetailsPage-whEMOWs9.js +490 -0
- package/dist/DriversPage-CHF2ZEzd.js +221 -0
- package/dist/FinancePage-Dn9GrW-1.js +175 -0
- package/dist/{FleetPage-DqkFi3s3.js → FleetPage-CrtGPy-p.js} +36 -35
- package/dist/{FormError-BlOjnXOq.js → FormError-BKcb_wT-.js} +1 -1
- package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-WYdwZomZ.js} +52 -72
- package/dist/InventoryPage-l5A1f753.js +259 -0
- package/dist/LiveTrackingPage-DhEaNKZ4.js +429 -0
- package/dist/MarketplacePage-B9RYOb1Y.js +426 -0
- package/dist/MetricCard-y3bWHKUQ.js +191 -0
- package/dist/Notice-DOO-tjpV.js +46 -0
- package/dist/OrderDetailsPage-CwYHwk1K.js +584 -0
- package/dist/OrdersListPage-DhZJoQeI.js +386 -0
- package/dist/{PageLayout-D4LDHJJq.js → PageLayout-BniRJaQ6.js} +1 -1
- package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-1Gm9JKy0.js} +56 -56
- package/dist/ProductsPage-C8sn-1tN.js +186 -0
- package/dist/ReportsPage-D1tb0dcz.js +377 -0
- package/dist/RouteDetailsPage-CkMyR9b_.js +610 -0
- package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-QkENzsE5.js} +58 -47
- package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-DV3_tU_X.js} +16 -38
- package/dist/Sparkline-K2RMJ58u.js +16729 -0
- package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-BNHXYvZx.js} +7 -7
- package/dist/TrackingPage-BZrg4RCu.js +368 -0
- package/dist/VehicleDetailsPage-D-8XPZ2G.js +393 -0
- package/dist/VehiclesPage-D5BELbtM.js +184 -0
- package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-Cmg-8Frn.js} +70 -70
- package/dist/WarehousesPage-C1Y1M867.js +182 -0
- package/dist/{arrow-left-n48Y-Wis.js → arrow-left-ClW4Isj7.js} +1 -1
- package/dist/arrow-right-CmKOmIkh.js +11 -0
- package/dist/arrow-up-BJijRLAZ.js +17 -0
- package/dist/{box-D9Pal4HM.js → box-BT3NsRQP.js} +1 -1
- package/dist/boxes-B_OGvQiW.js +54 -0
- package/dist/{chart-column-BFIJysDR.js → chart-column-DQTTdUPk.js} +1 -1
- package/dist/charts-Tj_PPTfA.js +2018 -0
- package/dist/chevron-left-B1rZyWWb.js +8 -0
- package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-BIcwUJZq.js} +1 -1
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{circle-alert-iY24lSlp.js → circle-alert-CNkuDNc6.js} +1 -1
- package/dist/circle-check-Cs1OVjtV.js +13 -0
- package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-C-p4eNwn.js} +1 -1
- package/dist/{clock-DJZtdl8u.js → clock-dRGG4rkF.js} +1 -1
- package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-B6RoYHHz.js} +1 -1
- package/dist/{download-DRXxoiQR.js → download-DP04iWTd.js} +1 -1
- package/dist/{file-text-DWWY6_f5.js → file-text-BuDx4hZp.js} +1 -1
- package/dist/{filter-DloLC2eE.js → filter-BD483_8g.js} +1 -1
- package/dist/{wrench-CANXWxF-.js → fuel-DLH1ag04.js} +3 -6
- package/dist/index.css +2 -0
- package/dist/index.js +150 -172
- package/dist/{map-CkJaULb2.js → map-DNQn9fyY.js} +1 -1
- package/dist/{map-pin-BGiCvyCs.js → map-pin-CqN1bbT1.js} +1 -1
- package/dist/mapMarkers-NCV9MRKR.js +28 -0
- package/dist/maps-yzLqiK_C.js +5070 -0
- package/dist/{navigation-D36prnAn.js → navigation-CgGUt2tR.js} +1 -1
- package/dist/{package-BChUzpJS.js → package-DmRF7iQD.js} +1 -1
- package/dist/{phone-Ac9s3mo_.js → phone-Cl32EXKW.js} +1 -1
- package/dist/{plus-Z76q-FZm.js → plus-DlANgOFx.js} +1 -1
- package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-rW59D4b7.js} +1 -1
- package/dist/route-CWjPrtAN.js +22 -0
- package/dist/{save-CojywNhG.js → save-UDlog7hg.js} +1 -1
- package/dist/{search-CDGefqb3.js → search-DNIG5Ck7.js} +1 -1
- package/dist/{square-pen-CopE9GmB.js → square-pen-BcfB3Grd.js} +1 -1
- package/dist/{star-nHlLjDKR.js → star-CVZHFwDx.js} +1 -1
- package/dist/{store-BR9Voi5E.js → store-bwnmCK9f.js} +1 -1
- package/dist/{trash-2-BKhar6Hs.js → trash-2-B80G12d4.js} +1 -1
- package/dist/{trending-up-Dohgd4t_.js → trending-up-CH4R4KOa.js} +1 -1
- package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-CmS8AUU6.js} +1 -1
- package/dist/{truck-C0v_hbLR.js → truck-9rLDncav.js} +1 -1
- package/dist/upload-DanJY1Vo.js +21 -0
- package/dist/{useAssistant-D4v3oxD3.js → useAssistant-CnEwkTLm.js} +11 -28
- package/dist/{useCustomers-BmTNGxiI.js → useCustomers-ChJao1ET.js} +30 -27
- package/dist/{useFleet-DKqXZ16m.js → useFleet-g5Yri0G8.js} +82 -70
- package/dist/{useImportExport-DHr-SWSw.js → useImportExport-MYwIT3rE.js} +1 -1
- package/dist/{useInventory-DkyiVY_A.js → useInventory-BSOn-R1c.js} +84 -39
- package/dist/{useOrders-Cfk1GLiq.js → useOrders-BSiqo61w.js} +59 -48
- package/dist/{useReports-CTqZr-AB.js → useReports-fWESfsF9.js} +41 -35
- package/dist/{useRoutes-BQWO607N.js → useRoutes-zD8Yp323.js} +50 -42
- package/dist/{useSettings-CkDH_-gM.js → useSettings-B1lsWeZ1.js} +6 -6
- package/dist/{useTracking-B-va1kO3.js → useTracking-BKG0I2ln.js} +3 -3
- package/dist/{user-jyFU3lXk.js → user-DU51el3m.js} +1 -1
- package/dist/user-check-IMhk-qkX.js +20 -0
- package/dist/{users-DZ-ilS6B.js → users-B8KhJBGg.js} +1 -1
- package/dist/{warehouse-6m5kXMLu.js → warehouse-CcMMioeY.js} +1 -1
- package/dist/wrench-Dg-sgH2e.js +8 -0
- package/dist/x-C4ObLVEa.js +11 -0
- package/package.json +5 -1
- package/src/movethewheels/components/DataTable.tsx +252 -84
- package/src/movethewheels/components/DocumentsCard.tsx +102 -0
- package/src/movethewheels/components/GlassPanel.tsx +71 -0
- package/src/movethewheels/components/MetricCard.tsx +171 -73
- package/src/movethewheels/components/Notice.tsx +61 -0
- package/src/movethewheels/components/StatusBadge.tsx +7 -6
- package/src/movethewheels/components/charts/ChartShell.tsx +78 -0
- package/src/movethewheels/components/charts/Sparkline.tsx +85 -0
- package/src/movethewheels/components/charts/StatusDonut.tsx +115 -0
- package/src/movethewheels/components/charts/TrendChart.tsx +179 -0
- package/src/movethewheels/components/charts/VolumeBar.tsx +97 -0
- package/src/movethewheels/components/charts/chartTokens.ts +43 -0
- package/src/movethewheels/components/charts/index.ts +9 -0
- package/src/movethewheels/components/index.ts +51 -1
- package/src/movethewheels/components/maps/LogisticsMap.tsx +94 -0
- package/src/movethewheels/components/maps/MapCanvas.tsx +118 -0
- package/src/movethewheels/components/maps/RouteMap.tsx +71 -0
- package/src/movethewheels/components/maps/TrackingMap.tsx +102 -0
- package/src/movethewheels/components/maps/index.ts +16 -0
- package/src/movethewheels/components/maps/leaflet-setup.ts +124 -0
- package/src/movethewheels/components/maps/map-markers.css +121 -0
- package/src/movethewheels/hooks/index.ts +9 -0
- package/src/movethewheels/hooks/useAnalytics.ts +109 -4
- package/src/movethewheels/hooks/useCustomers.ts +11 -4
- package/src/movethewheels/hooks/useEntityDocuments.ts +132 -0
- package/src/movethewheels/hooks/useFleet.ts +26 -7
- package/src/movethewheels/hooks/useInventory.ts +70 -7
- package/src/movethewheels/hooks/useOrders.ts +32 -2
- package/src/movethewheels/hooks/useReports.ts +14 -4
- package/src/movethewheels/hooks/useRoutes.ts +20 -3
- package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
- package/src/movethewheels/pages/CreateOrderPage.tsx +48 -20
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
- package/src/movethewheels/pages/CustomersPage.tsx +53 -28
- package/src/movethewheels/pages/DashboardPage.tsx +238 -12
- package/src/movethewheels/pages/DriverDetailsPage.tsx +17 -31
- package/src/movethewheels/pages/DriversPage.tsx +59 -31
- package/src/movethewheels/pages/FinancePage.tsx +103 -82
- package/src/movethewheels/pages/InventoryPage.tsx +15 -3
- package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
- package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
- package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
- package/src/movethewheels/pages/OrdersListPage.tsx +118 -47
- package/src/movethewheels/pages/ProductsPage.tsx +52 -28
- package/src/movethewheels/pages/ReportsPage.tsx +88 -4
- package/src/movethewheels/pages/RouteDetailsPage.tsx +119 -19
- package/src/movethewheels/pages/RoutesPage.tsx +22 -6
- package/src/movethewheels/pages/SettingsPage.tsx +5 -21
- package/src/movethewheels/pages/TrackingPage.tsx +76 -6
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -34
- package/src/movethewheels/pages/VehiclesPage.tsx +58 -27
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/WarehousesPage.tsx +47 -36
- package/src/movethewheels/types/index.ts +9 -1
- package/src/movethewheels/utils/download.ts +62 -0
- package/src/movethewheels/utils/mapMarkers.ts +58 -0
- package/dist/AnalyticsPage-Dz6g2MvK.js +0 -215
- package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
- package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
- package/dist/CustomersPage-BKxMS1AV.js +0 -161
- package/dist/DashboardPage-BVjQi0EB.js +0 -387
- package/dist/DataTable-DmciIKKM.js +0 -249
- package/dist/DriverDetailsPage-CN3WQ0B9.js +0 -507
- package/dist/DriversPage-CH9rjQC-.js +0 -165
- package/dist/FinancePage-DEDykSOP.js +0 -158
- package/dist/InventoryPage-e0ze63iX.js +0 -253
- package/dist/LiveTrackingPage-DCX-K-LR.js +0 -379
- package/dist/MarketplacePage-CIQ97_zp.js +0 -247
- package/dist/MetricCard-BY0QrMD4.js +0 -146
- package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
- package/dist/OrdersListPage-Cn90P1Xx.js +0 -307
- package/dist/ProductsPage-QJfHHpqB.js +0 -169
- package/dist/ReportsPage-Zp53q3_8.js +0 -284
- package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
- package/dist/TrackingPage-W-jtdM3Y.js +0 -325
- package/dist/VehicleDetailsPage-Bceo5oz3.js +0 -410
- package/dist/VehiclesPage-ApKThYeG.js +0 -165
- package/dist/WarehousesPage-DCbXXXWE.js +0 -162
- package/dist/useAnalytics-DS8n0xgg.js +0 -297
- /package/dist/{formatters-CF2S2l1m.js → formatters-FWJDwTFv.js} +0 -0
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
import { A as e, F as t, I as n, L as r, M as i, P as a, R as o, ct as s, d as c, f as l, g as u, h as d, i as f, j as p, l as m, n as h, ot as g, r as _, u as v } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as y } from "./arrow-left-n48Y-Wis.js";
|
|
3
|
-
import { t as b } from "./file-text-DWWY6_f5.js";
|
|
4
|
-
import { n as x, t as S } from "./wrench-CANXWxF-.js";
|
|
5
|
-
import { t as C } from "./map-pin-BGiCvyCs.js";
|
|
6
|
-
import { t as w } from "./save-CojywNhG.js";
|
|
7
|
-
import { t as T } from "./square-pen-CopE9GmB.js";
|
|
8
|
-
import { t as E } from "./truck-C0v_hbLR.js";
|
|
9
|
-
import { a as D, r as O } from "./useFleet-DKqXZ16m.js";
|
|
10
|
-
import { a as k, r as A } from "./StatusBadge-BZurYHMy.js";
|
|
11
|
-
import { r as j } from "./formatters-CF2S2l1m.js";
|
|
12
|
-
import { t as M } from "./FormError-BlOjnXOq.js";
|
|
13
|
-
import { useState as N } from "react";
|
|
14
|
-
import { useParams as P } from "react-router-dom";
|
|
15
|
-
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
16
|
-
import { EmphasisPanel as L, NextSteps as R, PagePurpose as z } from "@burdenoff/fe-libs/ui";
|
|
17
|
-
//#region src/movethewheels/pages/VehicleDetailsPage.tsx
|
|
18
|
-
var B = [
|
|
19
|
-
{
|
|
20
|
-
value: "TRUCK",
|
|
21
|
-
label: "Truck"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
value: "VAN",
|
|
25
|
-
label: "Van"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
value: "MOTORCYCLE",
|
|
29
|
-
label: "Motorcycle"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
value: "BICYCLE",
|
|
33
|
-
label: "Bicycle"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
value: "FLATBED",
|
|
37
|
-
label: "Flatbed"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
value: "REFRIGERATED",
|
|
41
|
-
label: "Refrigerated"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
value: "SEMI_TRAILER",
|
|
45
|
-
label: "Semi-Trailer"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
value: "DRONE",
|
|
49
|
-
label: "Drone"
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
function V() {
|
|
53
|
-
let { basePath: i, navigate: c } = g(), { createVehicle: l } = O(), [u, d] = N({
|
|
54
|
-
vehicleNumber: "",
|
|
55
|
-
type: "VAN",
|
|
56
|
-
make: "",
|
|
57
|
-
model: "",
|
|
58
|
-
licensePlate: ""
|
|
59
|
-
}), [m, h] = N(!1), [_, b] = N(null), x = () => c?.(s(i, "fleet/vehicles")), S = async (e) => {
|
|
60
|
-
if (e.preventDefault(), !u.vehicleNumber.trim()) {
|
|
61
|
-
b("Vehicle number is required.");
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
h(!0), b(null);
|
|
65
|
-
try {
|
|
66
|
-
let e = await l({
|
|
67
|
-
vehicleNumber: u.vehicleNumber.trim(),
|
|
68
|
-
type: u.type,
|
|
69
|
-
make: u.make.trim() || void 0,
|
|
70
|
-
model: u.model.trim() || void 0,
|
|
71
|
-
licensePlate: u.licensePlate.trim() || void 0
|
|
72
|
-
});
|
|
73
|
-
c?.(s(i, `fleet/vehicles/${e.id}`));
|
|
74
|
-
} catch (e) {
|
|
75
|
-
console.error("Failed to create vehicle:", e), b(e instanceof Error ? e.message : "Failed to create vehicle. Please try again."), h(!1);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
return /* @__PURE__ */ I(f, {
|
|
79
|
-
title: "Add Vehicle",
|
|
80
|
-
subtitle: "Register a new vehicle in your fleet",
|
|
81
|
-
icon: /* @__PURE__ */ F(E, { size: 24 }),
|
|
82
|
-
headerActions: /* @__PURE__ */ I("div", {
|
|
83
|
-
className: "flex gap-2",
|
|
84
|
-
children: [/* @__PURE__ */ I(v, {
|
|
85
|
-
variant: "outline",
|
|
86
|
-
onClick: x,
|
|
87
|
-
disabled: m,
|
|
88
|
-
children: [/* @__PURE__ */ F(y, { size: 16 }), " Cancel"]
|
|
89
|
-
}), /* @__PURE__ */ I(v, {
|
|
90
|
-
onClick: S,
|
|
91
|
-
disabled: m,
|
|
92
|
-
children: [
|
|
93
|
-
/* @__PURE__ */ F(w, { size: 16 }),
|
|
94
|
-
" ",
|
|
95
|
-
m ? "Saving..." : "Add Vehicle"
|
|
96
|
-
]
|
|
97
|
-
})]
|
|
98
|
-
}),
|
|
99
|
-
children: [/* @__PURE__ */ F(z, {
|
|
100
|
-
icon: /* @__PURE__ */ F(E, { size: 18 }),
|
|
101
|
-
children: "Add a vehicle so it can be assigned to deliveries and routes. Give it a fleet number and type to start — make, model and plate help identify it on the road."
|
|
102
|
-
}), /* @__PURE__ */ I("form", {
|
|
103
|
-
onSubmit: S,
|
|
104
|
-
className: "max-w-2xl space-y-6",
|
|
105
|
-
children: [/* @__PURE__ */ F(M, { message: _ }), /* @__PURE__ */ I(L, { children: [/* @__PURE__ */ F("h2", {
|
|
106
|
-
className: "text-base font-semibold text-text-primary mb-4",
|
|
107
|
-
children: "Vehicle Details"
|
|
108
|
-
}), /* @__PURE__ */ I("div", {
|
|
109
|
-
className: "space-y-4",
|
|
110
|
-
children: [/* @__PURE__ */ I("div", {
|
|
111
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
112
|
-
children: [/* @__PURE__ */ I("div", {
|
|
113
|
-
className: "space-y-2",
|
|
114
|
-
children: [/* @__PURE__ */ I(p, {
|
|
115
|
-
htmlFor: "vehicleNumber",
|
|
116
|
-
children: ["Vehicle Number ", /* @__PURE__ */ F("span", {
|
|
117
|
-
className: "text-status-error-text",
|
|
118
|
-
children: "*"
|
|
119
|
-
})]
|
|
120
|
-
}), /* @__PURE__ */ F(e, {
|
|
121
|
-
id: "vehicleNumber",
|
|
122
|
-
value: u.vehicleNumber,
|
|
123
|
-
onChange: (e) => d((t) => ({
|
|
124
|
-
...t,
|
|
125
|
-
vehicleNumber: e.target.value
|
|
126
|
-
})),
|
|
127
|
-
placeholder: "MTW-001",
|
|
128
|
-
required: !0
|
|
129
|
-
})]
|
|
130
|
-
}), /* @__PURE__ */ I("div", {
|
|
131
|
-
className: "space-y-2",
|
|
132
|
-
children: [/* @__PURE__ */ I(p, {
|
|
133
|
-
htmlFor: "type",
|
|
134
|
-
children: ["Type ", /* @__PURE__ */ F("span", {
|
|
135
|
-
className: "text-status-error-text",
|
|
136
|
-
children: "*"
|
|
137
|
-
})]
|
|
138
|
-
}), /* @__PURE__ */ I(a, {
|
|
139
|
-
value: u.type,
|
|
140
|
-
onValueChange: (e) => d((t) => ({
|
|
141
|
-
...t,
|
|
142
|
-
type: e
|
|
143
|
-
})),
|
|
144
|
-
children: [/* @__PURE__ */ F(r, {
|
|
145
|
-
id: "type",
|
|
146
|
-
children: /* @__PURE__ */ F(o, {})
|
|
147
|
-
}), /* @__PURE__ */ F(t, { children: B.map((e) => /* @__PURE__ */ F(n, {
|
|
148
|
-
value: e.value,
|
|
149
|
-
children: e.label
|
|
150
|
-
}, e.value)) })]
|
|
151
|
-
})]
|
|
152
|
-
})]
|
|
153
|
-
}), /* @__PURE__ */ I("div", {
|
|
154
|
-
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
155
|
-
children: [
|
|
156
|
-
/* @__PURE__ */ I("div", {
|
|
157
|
-
className: "space-y-2",
|
|
158
|
-
children: [/* @__PURE__ */ F(p, {
|
|
159
|
-
htmlFor: "make",
|
|
160
|
-
children: "Make"
|
|
161
|
-
}), /* @__PURE__ */ F(e, {
|
|
162
|
-
id: "make",
|
|
163
|
-
value: u.make,
|
|
164
|
-
onChange: (e) => d((t) => ({
|
|
165
|
-
...t,
|
|
166
|
-
make: e.target.value
|
|
167
|
-
})),
|
|
168
|
-
placeholder: "Ford"
|
|
169
|
-
})]
|
|
170
|
-
}),
|
|
171
|
-
/* @__PURE__ */ I("div", {
|
|
172
|
-
className: "space-y-2",
|
|
173
|
-
children: [/* @__PURE__ */ F(p, {
|
|
174
|
-
htmlFor: "model",
|
|
175
|
-
children: "Model"
|
|
176
|
-
}), /* @__PURE__ */ F(e, {
|
|
177
|
-
id: "model",
|
|
178
|
-
value: u.model,
|
|
179
|
-
onChange: (e) => d((t) => ({
|
|
180
|
-
...t,
|
|
181
|
-
model: e.target.value
|
|
182
|
-
})),
|
|
183
|
-
placeholder: "Transit"
|
|
184
|
-
})]
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ I("div", {
|
|
187
|
-
className: "space-y-2",
|
|
188
|
-
children: [/* @__PURE__ */ F(p, {
|
|
189
|
-
htmlFor: "licensePlate",
|
|
190
|
-
children: "License Plate"
|
|
191
|
-
}), /* @__PURE__ */ F(e, {
|
|
192
|
-
id: "licensePlate",
|
|
193
|
-
value: u.licensePlate,
|
|
194
|
-
onChange: (e) => d((t) => ({
|
|
195
|
-
...t,
|
|
196
|
-
licensePlate: e.target.value
|
|
197
|
-
})),
|
|
198
|
-
placeholder: "ABC-1234"
|
|
199
|
-
})]
|
|
200
|
-
})
|
|
201
|
-
]
|
|
202
|
-
})]
|
|
203
|
-
})] })]
|
|
204
|
-
})]
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
function H() {
|
|
208
|
-
let { vehicleId: e } = P(), { basePath: t, navigate: n } = g(), { vehicle: r, isLoading: a, error: o, refetch: p } = D(e), w = () => n?.(s(t, "fleet/vehicles")), O = (e) => n?.(s(t, e));
|
|
209
|
-
return e ? a ? /* @__PURE__ */ F(_, { message: "Loading vehicle details..." }) : o || !r ? /* @__PURE__ */ F(h, {
|
|
210
|
-
title: "Vehicle not found",
|
|
211
|
-
onRetry: p
|
|
212
|
-
}) : /* @__PURE__ */ I(f, {
|
|
213
|
-
title: r.vehicleNumber,
|
|
214
|
-
subtitle: `${r.make} ${r.model} (${r.year})`,
|
|
215
|
-
icon: /* @__PURE__ */ F(E, { size: 24 }),
|
|
216
|
-
headerActions: /* @__PURE__ */ I("div", {
|
|
217
|
-
className: "flex gap-2",
|
|
218
|
-
children: [/* @__PURE__ */ I(v, {
|
|
219
|
-
variant: "outline",
|
|
220
|
-
onClick: w,
|
|
221
|
-
children: [/* @__PURE__ */ F(y, { size: 16 }), " Back"]
|
|
222
|
-
}), /* @__PURE__ */ I(v, { children: [/* @__PURE__ */ F(T, { size: 16 }), " Edit"] })]
|
|
223
|
-
}),
|
|
224
|
-
headerContent: /* @__PURE__ */ I("div", {
|
|
225
|
-
className: "flex gap-2",
|
|
226
|
-
children: [/* @__PURE__ */ F(A, {
|
|
227
|
-
status: r.status,
|
|
228
|
-
type: "vehicle"
|
|
229
|
-
}), /* @__PURE__ */ F(k, { type: r.type })]
|
|
230
|
-
}),
|
|
231
|
-
children: [
|
|
232
|
-
/* @__PURE__ */ F(z, {
|
|
233
|
-
icon: /* @__PURE__ */ F(E, { size: 18 }),
|
|
234
|
-
children: "The full record for this vehicle — specs, capacity, fuel and mileage, maintenance schedule and current location. Use it to confirm a vehicle is fuelled, serviced and the right size before dispatching it on a delivery."
|
|
235
|
-
}),
|
|
236
|
-
/* @__PURE__ */ F(R, {
|
|
237
|
-
storageKey: "movethewheels-vehicle-details",
|
|
238
|
-
steps: [{
|
|
239
|
-
id: "assign",
|
|
240
|
-
label: "Assign to a delivery",
|
|
241
|
-
description: "Put this vehicle on an order that fits its capacity.",
|
|
242
|
-
icon: /* @__PURE__ */ F(C, { size: 16 }),
|
|
243
|
-
onClick: () => O("orders")
|
|
244
|
-
}, {
|
|
245
|
-
id: "maintenance",
|
|
246
|
-
label: "Schedule maintenance",
|
|
247
|
-
description: "Keep it road-ready and compliant.",
|
|
248
|
-
icon: /* @__PURE__ */ F(S, { size: 16 }),
|
|
249
|
-
onClick: () => {}
|
|
250
|
-
}]
|
|
251
|
-
}),
|
|
252
|
-
/* @__PURE__ */ I("div", {
|
|
253
|
-
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
254
|
-
children: [/* @__PURE__ */ I("div", {
|
|
255
|
-
className: "lg:col-span-2 space-y-6",
|
|
256
|
-
children: [
|
|
257
|
-
/* @__PURE__ */ I(L, { children: [/* @__PURE__ */ F("h2", {
|
|
258
|
-
className: "text-base font-semibold text-text-primary mb-4",
|
|
259
|
-
children: "Vehicle Information"
|
|
260
|
-
}), /* @__PURE__ */ I("div", {
|
|
261
|
-
className: "grid grid-cols-2 md:grid-cols-4 gap-6",
|
|
262
|
-
children: [
|
|
263
|
-
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
264
|
-
className: "text-sm text-text-secondary",
|
|
265
|
-
children: "Type"
|
|
266
|
-
}), /* @__PURE__ */ F("p", {
|
|
267
|
-
className: "font-medium capitalize",
|
|
268
|
-
children: r.type
|
|
269
|
-
})] }),
|
|
270
|
-
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
271
|
-
className: "text-sm text-text-secondary",
|
|
272
|
-
children: "Make"
|
|
273
|
-
}), /* @__PURE__ */ F("p", {
|
|
274
|
-
className: "font-medium",
|
|
275
|
-
children: r.make
|
|
276
|
-
})] }),
|
|
277
|
-
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
278
|
-
className: "text-sm text-text-secondary",
|
|
279
|
-
children: "Model"
|
|
280
|
-
}), /* @__PURE__ */ F("p", {
|
|
281
|
-
className: "font-medium",
|
|
282
|
-
children: r.model
|
|
283
|
-
})] }),
|
|
284
|
-
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
285
|
-
className: "text-sm text-text-secondary",
|
|
286
|
-
children: "Year"
|
|
287
|
-
}), /* @__PURE__ */ F("p", {
|
|
288
|
-
className: "font-medium",
|
|
289
|
-
children: r.year
|
|
290
|
-
})] })
|
|
291
|
-
]
|
|
292
|
-
})] }),
|
|
293
|
-
/* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ F(u, { children: "Capacity" }) }), /* @__PURE__ */ F(l, { children: /* @__PURE__ */ I("div", {
|
|
294
|
-
className: "grid grid-cols-3 gap-6",
|
|
295
|
-
children: [
|
|
296
|
-
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
297
|
-
className: "text-sm text-text-secondary",
|
|
298
|
-
children: "Weight"
|
|
299
|
-
}), /* @__PURE__ */ I("p", {
|
|
300
|
-
className: "text-2xl font-bold",
|
|
301
|
-
children: [r.capacity.weight, /* @__PURE__ */ F("span", {
|
|
302
|
-
className: "text-sm font-normal",
|
|
303
|
-
children: " kg"
|
|
304
|
-
})]
|
|
305
|
-
})] }),
|
|
306
|
-
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
307
|
-
className: "text-sm text-text-secondary",
|
|
308
|
-
children: "Volume"
|
|
309
|
-
}), /* @__PURE__ */ I("p", {
|
|
310
|
-
className: "text-2xl font-bold",
|
|
311
|
-
children: [r.capacity.volume, /* @__PURE__ */ F("span", {
|
|
312
|
-
className: "text-sm font-normal",
|
|
313
|
-
children: " m³"
|
|
314
|
-
})]
|
|
315
|
-
})] }),
|
|
316
|
-
r.capacity.pallets && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
317
|
-
className: "text-sm text-text-secondary",
|
|
318
|
-
children: "Pallets"
|
|
319
|
-
}), /* @__PURE__ */ F("p", {
|
|
320
|
-
className: "text-2xl font-bold",
|
|
321
|
-
children: r.capacity.pallets
|
|
322
|
-
})] })
|
|
323
|
-
]
|
|
324
|
-
}) })] }),
|
|
325
|
-
/* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ I(u, {
|
|
326
|
-
className: "flex items-center gap-2",
|
|
327
|
-
children: [/* @__PURE__ */ F(b, { size: 18 }), " Documents"]
|
|
328
|
-
}) }), /* @__PURE__ */ F(l, { children: r.documents.length > 0 ? /* @__PURE__ */ F("div", {
|
|
329
|
-
className: "space-y-3",
|
|
330
|
-
children: r.documents.map((e) => /* @__PURE__ */ I("div", {
|
|
331
|
-
className: "flex items-center justify-between p-3 border rounded-lg",
|
|
332
|
-
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
333
|
-
className: "font-medium capitalize",
|
|
334
|
-
children: e.type.replace("_", " ")
|
|
335
|
-
}), /* @__PURE__ */ I("p", {
|
|
336
|
-
className: "text-sm text-text-secondary",
|
|
337
|
-
children: ["Expires: ", j(e.expiryDate)]
|
|
338
|
-
})] }), /* @__PURE__ */ F(m, {
|
|
339
|
-
variant: e.verified ? "default" : "secondary",
|
|
340
|
-
children: e.verified ? "Verified" : "Pending"
|
|
341
|
-
})]
|
|
342
|
-
}, e.id))
|
|
343
|
-
}) : /* @__PURE__ */ F("p", {
|
|
344
|
-
className: "text-text-secondary text-center py-4",
|
|
345
|
-
children: "No documents uploaded"
|
|
346
|
-
}) })] })
|
|
347
|
-
]
|
|
348
|
-
}), /* @__PURE__ */ I("div", {
|
|
349
|
-
className: "space-y-6",
|
|
350
|
-
children: [
|
|
351
|
-
/* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ I(u, {
|
|
352
|
-
className: "flex items-center gap-2",
|
|
353
|
-
children: [/* @__PURE__ */ F(x, { size: 18 }), " Fuel & Mileage"]
|
|
354
|
-
}) }), /* @__PURE__ */ I(l, {
|
|
355
|
-
className: "space-y-4",
|
|
356
|
-
children: [r.fuelLevel !== void 0 && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("div", {
|
|
357
|
-
className: "flex justify-between text-sm mb-2",
|
|
358
|
-
children: [/* @__PURE__ */ F("span", { children: "Fuel Level" }), /* @__PURE__ */ I("span", { children: [r.fuelLevel, "%"] })]
|
|
359
|
-
}), /* @__PURE__ */ F(i, { value: r.fuelLevel })] }), r.mileage !== void 0 && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
360
|
-
className: "text-sm text-text-secondary",
|
|
361
|
-
children: "Total Mileage"
|
|
362
|
-
}), /* @__PURE__ */ I("p", {
|
|
363
|
-
className: "text-2xl font-bold",
|
|
364
|
-
children: [
|
|
365
|
-
r.mileage.toLocaleString(),
|
|
366
|
-
" ",
|
|
367
|
-
/* @__PURE__ */ F("span", {
|
|
368
|
-
className: "text-sm font-normal",
|
|
369
|
-
children: "miles"
|
|
370
|
-
})
|
|
371
|
-
]
|
|
372
|
-
})] })]
|
|
373
|
-
})] }),
|
|
374
|
-
/* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ I(u, {
|
|
375
|
-
className: "flex items-center gap-2",
|
|
376
|
-
children: [/* @__PURE__ */ F(S, { size: 18 }), " Maintenance"]
|
|
377
|
-
}) }), /* @__PURE__ */ I(l, {
|
|
378
|
-
className: "space-y-3",
|
|
379
|
-
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
380
|
-
className: "text-sm text-text-secondary",
|
|
381
|
-
children: "Last Maintenance"
|
|
382
|
-
}), /* @__PURE__ */ F("p", {
|
|
383
|
-
className: "font-medium",
|
|
384
|
-
children: r.lastMaintenance ? j(r.lastMaintenance) : "N/A"
|
|
385
|
-
})] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
386
|
-
className: "text-sm text-text-secondary",
|
|
387
|
-
children: "Next Scheduled"
|
|
388
|
-
}), /* @__PURE__ */ F("p", {
|
|
389
|
-
className: "font-medium",
|
|
390
|
-
children: r.nextMaintenance ? j(r.nextMaintenance) : "N/A"
|
|
391
|
-
})] })]
|
|
392
|
-
})] }),
|
|
393
|
-
r.currentLocation && /* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ I(u, {
|
|
394
|
-
className: "flex items-center gap-2",
|
|
395
|
-
children: [/* @__PURE__ */ F(C, { size: 18 }), " Current Location"]
|
|
396
|
-
}) }), /* @__PURE__ */ I(l, { children: [/* @__PURE__ */ F("p", {
|
|
397
|
-
className: "text-sm",
|
|
398
|
-
children: r.currentLocation.address || "Location updating..."
|
|
399
|
-
}), /* @__PURE__ */ I("p", {
|
|
400
|
-
className: "text-xs text-text-secondary mt-1",
|
|
401
|
-
children: ["Updated ", j(r.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
|
|
402
|
-
})] })] })
|
|
403
|
-
]
|
|
404
|
-
})]
|
|
405
|
-
})
|
|
406
|
-
]
|
|
407
|
-
}) : /* @__PURE__ */ F(V, {});
|
|
408
|
-
}
|
|
409
|
-
//#endregion
|
|
410
|
-
export { H as default };
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { M as e, ct as t, i as n, ot as r } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as i } from "./DataTable-DmciIKKM.js";
|
|
3
|
-
import { t as a } from "./download-DRXxoiQR.js";
|
|
4
|
-
import { t as o } from "./plus-Z76q-FZm.js";
|
|
5
|
-
import { t as s } from "./refresh-cw-DKt6f5T6.js";
|
|
6
|
-
import { t as c } from "./truck-C0v_hbLR.js";
|
|
7
|
-
import { o as l } from "./useFleet-DKqXZ16m.js";
|
|
8
|
-
import { a as u, r as d } from "./StatusBadge-BZurYHMy.js";
|
|
9
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
-
import { CTAOverflowMenu as m, EmphasisPanel as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
11
|
-
//#region src/movethewheels/pages/VehiclesPage.tsx
|
|
12
|
-
function _() {
|
|
13
|
-
let { basePath: _, navigate: v } = r(), { vehicles: y, totalVehicles: b, isLoading: x, refetch: S } = l(), C = (e) => {
|
|
14
|
-
v && v(t(_, e));
|
|
15
|
-
};
|
|
16
|
-
return /* @__PURE__ */ p(n, {
|
|
17
|
-
title: "Vehicles",
|
|
18
|
-
subtitle: `${b} vehicles in fleet`,
|
|
19
|
-
icon: /* @__PURE__ */ f(c, { size: 24 }),
|
|
20
|
-
headerActions: /* @__PURE__ */ f(m, {
|
|
21
|
-
primary: {
|
|
22
|
-
label: "Add Vehicle",
|
|
23
|
-
icon: /* @__PURE__ */ f(o, { size: 16 }),
|
|
24
|
-
onSelect: () => C("fleet/vehicles/new")
|
|
25
|
-
},
|
|
26
|
-
actions: [{
|
|
27
|
-
label: "Refresh",
|
|
28
|
-
icon: /* @__PURE__ */ f(s, { size: 16 }),
|
|
29
|
-
onSelect: () => S()
|
|
30
|
-
}, {
|
|
31
|
-
label: "Export",
|
|
32
|
-
icon: /* @__PURE__ */ f(a, { size: 16 }),
|
|
33
|
-
onSelect: () => C("import-export")
|
|
34
|
-
}]
|
|
35
|
-
}),
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ f(g, {
|
|
38
|
-
icon: /* @__PURE__ */ f(c, { size: 18 }),
|
|
39
|
-
children: "Every truck, van and bike in your fleet. Monitor capacity, fuel level, mileage and maintenance status here so you always know which vehicles are road-ready before dispatching an order."
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f("p", {
|
|
42
|
-
className: "text-sm font-medium text-text-secondary",
|
|
43
|
-
children: "Fleet at a glance"
|
|
44
|
-
}), /* @__PURE__ */ p("div", {
|
|
45
|
-
className: "mt-3 grid grid-cols-3 gap-4",
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
48
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
49
|
-
children: b
|
|
50
|
-
}), /* @__PURE__ */ f("p", {
|
|
51
|
-
className: "text-xs text-text-secondary",
|
|
52
|
-
children: "Total vehicles"
|
|
53
|
-
})] }),
|
|
54
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
55
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
56
|
-
children: y.filter((e) => e.status === "available").length
|
|
57
|
-
}), /* @__PURE__ */ f("p", {
|
|
58
|
-
className: "text-xs text-text-secondary",
|
|
59
|
-
children: "Available now"
|
|
60
|
-
})] }),
|
|
61
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
62
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
63
|
-
children: y.filter((e) => e.status === "maintenance").length
|
|
64
|
-
}), /* @__PURE__ */ f("p", {
|
|
65
|
-
className: "text-xs text-text-secondary",
|
|
66
|
-
children: "In maintenance"
|
|
67
|
-
})] })
|
|
68
|
-
]
|
|
69
|
-
})] }),
|
|
70
|
-
/* @__PURE__ */ f(i, {
|
|
71
|
-
columns: [
|
|
72
|
-
{
|
|
73
|
-
id: "vehicleNumber",
|
|
74
|
-
header: "Vehicle #",
|
|
75
|
-
accessorKey: "vehicleNumber",
|
|
76
|
-
sortable: !0,
|
|
77
|
-
cell: (e) => /* @__PURE__ */ f("span", {
|
|
78
|
-
className: "font-medium",
|
|
79
|
-
children: e.vehicleNumber
|
|
80
|
-
})
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
id: "type",
|
|
84
|
-
header: "Type",
|
|
85
|
-
accessorKey: "type",
|
|
86
|
-
cell: (e) => /* @__PURE__ */ f(u, { type: e.type })
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
id: "details",
|
|
90
|
-
header: "Vehicle",
|
|
91
|
-
cell: (e) => /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", {
|
|
92
|
-
className: "font-medium",
|
|
93
|
-
children: [
|
|
94
|
-
e.make,
|
|
95
|
-
" ",
|
|
96
|
-
e.model
|
|
97
|
-
]
|
|
98
|
-
}), /* @__PURE__ */ f("p", {
|
|
99
|
-
className: "text-sm text-text-secondary",
|
|
100
|
-
children: e.year
|
|
101
|
-
})] })
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
id: "status",
|
|
105
|
-
header: "Status",
|
|
106
|
-
accessorKey: "status",
|
|
107
|
-
sortable: !0,
|
|
108
|
-
cell: (e) => /* @__PURE__ */ f(d, {
|
|
109
|
-
status: e.status,
|
|
110
|
-
type: "vehicle"
|
|
111
|
-
})
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: "capacity",
|
|
115
|
-
header: "Capacity",
|
|
116
|
-
cell: (e) => /* @__PURE__ */ p("div", {
|
|
117
|
-
className: "text-sm",
|
|
118
|
-
children: [/* @__PURE__ */ p("p", { children: [e.capacity.weight, " kg"] }), /* @__PURE__ */ p("p", {
|
|
119
|
-
className: "text-text-secondary",
|
|
120
|
-
children: [e.capacity.volume, " m³"]
|
|
121
|
-
})]
|
|
122
|
-
})
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
id: "fuel",
|
|
126
|
-
header: "Fuel Level",
|
|
127
|
-
cell: (t) => t.fuelLevel === void 0 ? "-" : /* @__PURE__ */ p("div", {
|
|
128
|
-
className: "flex items-center gap-2",
|
|
129
|
-
children: [/* @__PURE__ */ f(e, {
|
|
130
|
-
value: t.fuelLevel,
|
|
131
|
-
className: "w-16 h-2"
|
|
132
|
-
}), /* @__PURE__ */ p("span", {
|
|
133
|
-
className: "text-sm",
|
|
134
|
-
children: [t.fuelLevel, "%"]
|
|
135
|
-
})]
|
|
136
|
-
})
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: "mileage",
|
|
140
|
-
header: "Mileage",
|
|
141
|
-
accessorKey: "mileage",
|
|
142
|
-
sortable: !0,
|
|
143
|
-
cell: (e) => e.mileage ? `${e.mileage.toLocaleString()} mi` : "-"
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
data: y,
|
|
147
|
-
isLoading: x,
|
|
148
|
-
searchable: !0,
|
|
149
|
-
searchPlaceholder: "Search vehicles...",
|
|
150
|
-
searchFields: [
|
|
151
|
-
"vehicleNumber",
|
|
152
|
-
"make",
|
|
153
|
-
"model"
|
|
154
|
-
],
|
|
155
|
-
onRowClick: (e) => C(`fleet/vehicles/${e.id}`),
|
|
156
|
-
getRowId: (e) => e.id,
|
|
157
|
-
emptyIllustration: "empty-data",
|
|
158
|
-
emptyTitle: "No vehicles yet",
|
|
159
|
-
emptyDescription: "Add vehicles to your fleet to start assigning them to deliveries."
|
|
160
|
-
})
|
|
161
|
-
]
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
//#endregion
|
|
165
|
-
export { _ as default };
|