@burdenoff/microfe-movethewheels 2026.703.4 → 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-3YOnHO9Y.js → AIAssistantPage-D2gaEL1U.js} +16 -15
- package/dist/AnalyticsPage-DZMlEoBi.js +194 -0
- package/dist/{CreateOrderPage-DRAgGo9i.js → CreateOrderPage-CWHx8yys.js} +40 -40
- package/dist/{CustomerDetailsPage-BCeMmOFe.js → CustomerDetailsPage-nR4oZ_ju.js} +71 -71
- package/dist/CustomersPage-Bbvwvn8k.js +205 -0
- package/dist/DashboardPage-DrEhNf7N.js +542 -0
- package/dist/{DataTable-XvUcTjwi.js → DataTable-CqMUD4er.js} +31 -31
- package/dist/{DocumentsCard-U2lSe-cn.js → DocumentsCard-edDkgnJj.js} +25 -25
- package/dist/{DriverDetailsPage-BQrYd_Lp.js → DriverDetailsPage-whEMOWs9.js} +64 -64
- package/dist/DriversPage-CHF2ZEzd.js +221 -0
- package/dist/FinancePage-Dn9GrW-1.js +175 -0
- package/dist/{FleetPage-3ZHsB-TN.js → FleetPage-CrtGPy-p.js} +22 -22
- package/dist/{FormError-cuLV2jVD.js → FormError-BKcb_wT-.js} +1 -1
- package/dist/{ImportExportPage-C6f7DqhM.js → ImportExportPage-WYdwZomZ.js} +12 -12
- package/dist/InventoryPage-l5A1f753.js +259 -0
- package/dist/LiveTrackingPage-DhEaNKZ4.js +429 -0
- package/dist/{MarketplacePage-Bh_2ns4v.js → MarketplacePage-B9RYOb1Y.js} +116 -116
- package/dist/MetricCard-y3bWHKUQ.js +191 -0
- package/dist/{Notice-CSoDYKw9.js → Notice-DOO-tjpV.js} +2 -2
- package/dist/{OrderDetailsPage-zCj0lW0j.js → OrderDetailsPage-CwYHwk1K.js} +58 -58
- package/dist/OrdersListPage-DhZJoQeI.js +386 -0
- package/dist/{PageLayout-D4LDHJJq.js → PageLayout-BniRJaQ6.js} +1 -1
- package/dist/{ProductDetailsPage-wsxAQkA0.js → ProductDetailsPage-1Gm9JKy0.js} +55 -55
- package/dist/ProductsPage-C8sn-1tN.js +186 -0
- package/dist/ReportsPage-D1tb0dcz.js +377 -0
- package/dist/{RouteDetailsPage-DyMJE9AS.js → RouteDetailsPage-CkMyR9b_.js} +208 -181
- package/dist/{RoutesPage-Dtc669yc.js → RoutesPage-QkENzsE5.js} +12 -12
- package/dist/{SettingsPage-CpH9xhQg.js → SettingsPage-DV3_tU_X.js} +15 -15
- package/dist/Sparkline-K2RMJ58u.js +16729 -0
- package/dist/{StatusBadge-C87mDpDP.js → StatusBadge-BNHXYvZx.js} +7 -7
- package/dist/TrackingPage-BZrg4RCu.js +368 -0
- package/dist/{VehicleDetailsPage-DldYNsYV.js → VehicleDetailsPage-D-8XPZ2G.js} +53 -53
- package/dist/VehiclesPage-D5BELbtM.js +184 -0
- package/dist/{WarehouseDetailsPage-CMG7or6G.js → WarehouseDetailsPage-Cmg-8Frn.js} +64 -64
- package/dist/WarehousesPage-C1Y1M867.js +182 -0
- package/dist/{arrow-left-n48Y-Wis.js → arrow-left-ClW4Isj7.js} +1 -1
- package/dist/{arrow-right-Q3XQpTPR.js → arrow-right-CmKOmIkh.js} +1 -1
- package/dist/{arrow-up-xNF1zJUG.js → arrow-up-BJijRLAZ.js} +1 -1
- package/dist/{box-Eu05PXDh.js → box-BT3NsRQP.js} +1 -1
- package/dist/boxes-B_OGvQiW.js +54 -0
- package/dist/{chart-column-ouzgxIv_.js → chart-column-DQTTdUPk.js} +1 -1
- package/dist/charts-Tj_PPTfA.js +2018 -0
- package/dist/{chevron-left-B2_r0Elx.js → chevron-left-B1rZyWWb.js} +1 -1
- package/dist/{chevron-right-eV4LjaSi.js → chevron-right-BIcwUJZq.js} +1 -1
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{circle-alert-Bzh2DBSF.js → circle-alert-CNkuDNc6.js} +1 -1
- package/dist/circle-check-Cs1OVjtV.js +13 -0
- package/dist/{circle-check-big-CGMSpQmD.js → circle-check-big-C-p4eNwn.js} +1 -1
- package/dist/{clock-Bl3ptexL.js → clock-dRGG4rkF.js} +1 -1
- package/dist/{dollar-sign-CAVU95SO.js → dollar-sign-B6RoYHHz.js} +1 -1
- package/dist/{download-C5NbvVDc.js → download-DP04iWTd.js} +1 -1
- package/dist/{file-text-D-1uvLZG.js → file-text-BuDx4hZp.js} +1 -1
- package/dist/{filter-DUfUg6BO.js → filter-BD483_8g.js} +1 -1
- package/dist/{fuel-B6_lnKDs.js → fuel-DLH1ag04.js} +1 -1
- package/dist/index.css +2 -0
- package/dist/index.js +214 -225
- package/dist/{map-C-M-FQLR.js → map-DNQn9fyY.js} +1 -1
- package/dist/{map-pin-Dznl5l40.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-BJSJl-VG.js → navigation-CgGUt2tR.js} +1 -1
- package/dist/{package-CcRttV2N.js → package-DmRF7iQD.js} +1 -1
- package/dist/{phone-DVSZHt_j.js → phone-Cl32EXKW.js} +1 -1
- package/dist/{plus-C_XZDwBz.js → plus-DlANgOFx.js} +1 -1
- package/dist/{refresh-cw-CfgN67l3.js → refresh-cw-rW59D4b7.js} +1 -1
- package/dist/route-CWjPrtAN.js +22 -0
- package/dist/{save-DJE8Fpdv.js → save-UDlog7hg.js} +1 -1
- package/dist/{search-D_VyGcZT.js → search-DNIG5Ck7.js} +1 -1
- package/dist/{square-pen-D-6JYrVQ.js → square-pen-BcfB3Grd.js} +1 -1
- package/dist/{star-BpRlUZuU.js → star-CVZHFwDx.js} +1 -1
- package/dist/{store-B-8HMuyZ.js → store-bwnmCK9f.js} +1 -1
- package/dist/{trash-2-8vmv-XV_.js → trash-2-B80G12d4.js} +1 -1
- package/dist/{trending-up-Dz6PqPRj.js → trending-up-CH4R4KOa.js} +1 -1
- package/dist/{triangle-alert-D7Y3J_4z.js → triangle-alert-CmS8AUU6.js} +1 -1
- package/dist/{truck-D-y2IDzv.js → truck-9rLDncav.js} +1 -1
- package/dist/{upload-CHZofOqb.js → upload-DanJY1Vo.js} +1 -1
- package/dist/{useAssistant-DVW4QgQb.js → useAssistant-CnEwkTLm.js} +11 -28
- package/dist/{useCustomers-BPW4__PR.js → useCustomers-ChJao1ET.js} +1 -1
- package/dist/{useFleet-ChBkxAd6.js → useFleet-g5Yri0G8.js} +1 -1
- package/dist/{useImportExport-DrPDHEDK.js → useImportExport-MYwIT3rE.js} +1 -1
- package/dist/{useInventory-CAAVMRp6.js → useInventory-BSOn-R1c.js} +1 -1
- package/dist/{useOrders-B465S2nt.js → useOrders-BSiqo61w.js} +1 -1
- package/dist/{useReports-jQ3GpNOm.js → useReports-fWESfsF9.js} +1 -1
- package/dist/{useRoutes-hS3d5-xr.js → useRoutes-zD8Yp323.js} +1 -1
- package/dist/{useSettings-BB8X2RLh.js → useSettings-B1lsWeZ1.js} +6 -6
- package/dist/{useTracking-RjGz9PZG.js → useTracking-BKG0I2ln.js} +3 -3
- package/dist/{user-DzfTn4dE.js → user-DU51el3m.js} +1 -1
- package/dist/{user-check-BEKRCi7v.js → user-check-IMhk-qkX.js} +1 -1
- package/dist/{users-CCrq-w0C.js → users-B8KhJBGg.js} +1 -1
- package/dist/{warehouse-CaqfmMKh.js → warehouse-CcMMioeY.js} +1 -1
- package/dist/{wrench-q_rgJfaP.js → wrench-Dg-sgH2e.js} +1 -1
- package/dist/{x-tMeDMcCw.js → x-C4ObLVEa.js} +1 -1
- package/package.json +5 -1
- package/src/movethewheels/components/GlassPanel.tsx +71 -0
- package/src/movethewheels/components/MetricCard.tsx +171 -73
- 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 +44 -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/useAnalytics.ts +14 -4
- package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
- package/src/movethewheels/pages/CreateOrderPage.tsx +4 -4
- package/src/movethewheels/pages/CustomersPage.tsx +29 -20
- package/src/movethewheels/pages/DashboardPage.tsx +238 -12
- package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/DriversPage.tsx +35 -24
- package/src/movethewheels/pages/FinancePage.tsx +68 -30
- package/src/movethewheels/pages/InventoryPage.tsx +15 -3
- package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
- package/src/movethewheels/pages/OrdersListPage.tsx +46 -38
- package/src/movethewheels/pages/ProductsPage.tsx +28 -24
- package/src/movethewheels/pages/ReportsPage.tsx +23 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +46 -7
- package/src/movethewheels/pages/SettingsPage.tsx +2 -2
- package/src/movethewheels/pages/TrackingPage.tsx +76 -6
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/VehiclesPage.tsx +34 -24
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/WarehousesPage.tsx +28 -22
- package/src/movethewheels/types/index.ts +1 -1
- package/src/movethewheels/utils/mapMarkers.ts +58 -0
- package/dist/AnalyticsPage-CMpI1070.js +0 -215
- package/dist/CustomersPage-CaNBMXmM.js +0 -172
- package/dist/DashboardPage-DIKlXde3.js +0 -387
- package/dist/DriversPage-PYmdFiby.js +0 -176
- package/dist/FinancePage-Cwh9Bw4M.js +0 -136
- package/dist/InventoryPage-DpiqVu1v.js +0 -253
- package/dist/LiveTrackingPage-FAzzlVnX.js +0 -379
- package/dist/MetricCard-CVBVpu7o.js +0 -146
- package/dist/OrdersListPage-CAMsuUck.js +0 -384
- package/dist/ProductsPage-DC5qDLfz.js +0 -180
- package/dist/ReportsPage-BwUJ37eO.js +0 -356
- package/dist/TrackingPage-DaNEFG_h.js +0 -325
- package/dist/VehiclesPage-BFw13iMt.js +0 -176
- package/dist/WarehousesPage-Wkytnt86.js +0 -173
- package/dist/useAnalytics-D7HW2XRb.js +0 -347
- /package/dist/{formatters-BQr-aR5W.js → formatters-FWJDwTFv.js} +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { i as e, lt as t, o as n, s as r, st as i, ut as a } from "./PageLayout-BniRJaQ6.js";
|
|
2
|
+
import { t as o } from "./DataTable-CqMUD4er.js";
|
|
3
|
+
import { t as s } from "./download-DP04iWTd.js";
|
|
4
|
+
import { t as c } from "./plus-DlANgOFx.js";
|
|
5
|
+
import { t as l } from "./refresh-cw-rW59D4b7.js";
|
|
6
|
+
import { t as u } from "./star-CVZHFwDx.js";
|
|
7
|
+
import { t as d } from "./user-check-IMhk-qkX.js";
|
|
8
|
+
import { t as f } from "./users-B8KhJBGg.js";
|
|
9
|
+
import { i as p, n as m } from "./useFleet-g5Yri0G8.js";
|
|
10
|
+
import { r as h, t as g } from "./MetricCard-y3bWHKUQ.js";
|
|
11
|
+
import { r as _ } from "./StatusBadge-BNHXYvZx.js";
|
|
12
|
+
import { r as v } from "./formatters-FWJDwTFv.js";
|
|
13
|
+
import { useState as y } from "react";
|
|
14
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
15
|
+
import { CTAOverflowMenu as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
//#region node_modules/lucide-react/dist/esm/icons/coffee.js
|
|
17
|
+
var w = a("Coffee", [
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M10 2v2",
|
|
20
|
+
key: "7u0qdc"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M14 2v2",
|
|
24
|
+
key: "6buw04"
|
|
25
|
+
}],
|
|
26
|
+
["path", {
|
|
27
|
+
d: "M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",
|
|
28
|
+
key: "pwadti"
|
|
29
|
+
}],
|
|
30
|
+
["path", {
|
|
31
|
+
d: "M6 2v2",
|
|
32
|
+
key: "colzsn"
|
|
33
|
+
}]
|
|
34
|
+
]), T = a("UserMinus", [
|
|
35
|
+
["path", {
|
|
36
|
+
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
37
|
+
key: "1yyitq"
|
|
38
|
+
}],
|
|
39
|
+
["circle", {
|
|
40
|
+
cx: "9",
|
|
41
|
+
cy: "7",
|
|
42
|
+
r: "4",
|
|
43
|
+
key: "nufk8"
|
|
44
|
+
}],
|
|
45
|
+
["line", {
|
|
46
|
+
x1: "22",
|
|
47
|
+
x2: "16",
|
|
48
|
+
y1: "11",
|
|
49
|
+
y2: "11",
|
|
50
|
+
key: "1shjgl"
|
|
51
|
+
}]
|
|
52
|
+
]);
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/movethewheels/pages/DriversPage.tsx
|
|
55
|
+
function E() {
|
|
56
|
+
let { basePath: a, navigate: E } = i(), [D, O] = y(0), [k, A] = y(25), { drivers: j, isLoading: M, refetch: N } = m({
|
|
57
|
+
limit: k,
|
|
58
|
+
offset: D * k
|
|
59
|
+
}), { stats: P } = p(), F = P.totalDrivers, I = (e) => E?.(t(a, e));
|
|
60
|
+
return /* @__PURE__ */ x(e, {
|
|
61
|
+
title: "Drivers",
|
|
62
|
+
subtitle: `${F} drivers`,
|
|
63
|
+
icon: /* @__PURE__ */ b(f, { size: 24 }),
|
|
64
|
+
headerActions: /* @__PURE__ */ b(S, {
|
|
65
|
+
primary: {
|
|
66
|
+
label: "Add Driver",
|
|
67
|
+
icon: /* @__PURE__ */ b(c, { size: 16 }),
|
|
68
|
+
onSelect: () => I("fleet/drivers/new")
|
|
69
|
+
},
|
|
70
|
+
actions: [{
|
|
71
|
+
label: "Refresh",
|
|
72
|
+
icon: /* @__PURE__ */ b(l, { size: 16 }),
|
|
73
|
+
onSelect: () => N()
|
|
74
|
+
}, {
|
|
75
|
+
label: "Export",
|
|
76
|
+
icon: /* @__PURE__ */ b(s, { size: 16 }),
|
|
77
|
+
onSelect: () => I("import-export")
|
|
78
|
+
}]
|
|
79
|
+
}),
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ b(C, {
|
|
82
|
+
icon: /* @__PURE__ */ b(f, { size: 18 }),
|
|
83
|
+
children: "Your delivery workforce. Track each driver's availability, performance rating, completed deliveries and license status here — open a driver to review their history before assigning them to an order or route."
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
86
|
+
className: "mb-3 text-sm font-medium text-text-secondary",
|
|
87
|
+
children: "Workforce at a glance"
|
|
88
|
+
}), /* @__PURE__ */ x(h, {
|
|
89
|
+
columns: 4,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ b(g, {
|
|
92
|
+
label: "On duty",
|
|
93
|
+
value: P.driversByStatus.available + P.driversByStatus.busy,
|
|
94
|
+
icon: /* @__PURE__ */ b(d, { size: 20 }),
|
|
95
|
+
accent: "success",
|
|
96
|
+
subtitle: "Available or delivering"
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ b(g, {
|
|
99
|
+
label: "On break",
|
|
100
|
+
value: P.driversByStatus.on_break,
|
|
101
|
+
icon: /* @__PURE__ */ b(w, { size: 20 }),
|
|
102
|
+
accent: "warning"
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ b(g, {
|
|
105
|
+
label: "Off duty",
|
|
106
|
+
value: P.driversByStatus.offline,
|
|
107
|
+
icon: /* @__PURE__ */ b(T, { size: 20 }),
|
|
108
|
+
accent: "neutral"
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ b(g, {
|
|
111
|
+
label: "Avg rating",
|
|
112
|
+
value: P.avgDriverRating > 0 ? P.avgDriverRating.toFixed(1) : "—",
|
|
113
|
+
icon: /* @__PURE__ */ b(u, { size: 20 }),
|
|
114
|
+
accent: "brand",
|
|
115
|
+
subtitle: `${F} drivers`
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
})] }),
|
|
119
|
+
/* @__PURE__ */ b(o, {
|
|
120
|
+
columns: [
|
|
121
|
+
{
|
|
122
|
+
id: "driver",
|
|
123
|
+
header: "Driver",
|
|
124
|
+
cell: (e) => /* @__PURE__ */ x("div", {
|
|
125
|
+
className: "flex items-center gap-3",
|
|
126
|
+
children: [/* @__PURE__ */ b(n, { children: /* @__PURE__ */ b(r, { children: e.fullName.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
127
|
+
className: "font-medium",
|
|
128
|
+
children: e.fullName
|
|
129
|
+
}), /* @__PURE__ */ b("p", {
|
|
130
|
+
className: "text-sm text-text-secondary",
|
|
131
|
+
children: e.employeeId
|
|
132
|
+
})] })]
|
|
133
|
+
})
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "status",
|
|
137
|
+
header: "Status",
|
|
138
|
+
accessorKey: "status",
|
|
139
|
+
sortable: !0,
|
|
140
|
+
cell: (e) => /* @__PURE__ */ b(_, {
|
|
141
|
+
status: e.status,
|
|
142
|
+
type: "driver"
|
|
143
|
+
})
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "rating",
|
|
147
|
+
header: "Rating",
|
|
148
|
+
cell: (e) => /* @__PURE__ */ x("div", {
|
|
149
|
+
className: "flex items-center gap-1",
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ b(u, {
|
|
152
|
+
size: 14,
|
|
153
|
+
className: "text-status-warning-text fill-current"
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ b("span", {
|
|
156
|
+
className: "font-medium",
|
|
157
|
+
children: e.ratings.overall.toFixed(1)
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ x("span", {
|
|
160
|
+
className: "text-text-secondary text-sm",
|
|
161
|
+
children: [
|
|
162
|
+
"(",
|
|
163
|
+
e.ratings.totalRatings,
|
|
164
|
+
")"
|
|
165
|
+
]
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
})
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: "deliveries",
|
|
172
|
+
header: "Deliveries",
|
|
173
|
+
accessorKey: "completedOrders",
|
|
174
|
+
sortable: !0,
|
|
175
|
+
cell: (e) => /* @__PURE__ */ b("span", {
|
|
176
|
+
className: "font-medium",
|
|
177
|
+
children: e.completedOrders.toLocaleString()
|
|
178
|
+
})
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: "license",
|
|
182
|
+
header: "License",
|
|
183
|
+
cell: (e) => /* @__PURE__ */ x("div", {
|
|
184
|
+
className: "text-sm",
|
|
185
|
+
children: [/* @__PURE__ */ b("p", { children: e.licenseType }), /* @__PURE__ */ x("p", {
|
|
186
|
+
className: "text-text-secondary",
|
|
187
|
+
children: ["Exp: ", v(e.licenseExpiry, "short")]
|
|
188
|
+
})]
|
|
189
|
+
})
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: "joined",
|
|
193
|
+
header: "Join Date",
|
|
194
|
+
accessorKey: "joinDate",
|
|
195
|
+
sortable: !0,
|
|
196
|
+
cell: (e) => v(e.joinDate, "short")
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
data: j,
|
|
200
|
+
isLoading: M,
|
|
201
|
+
searchable: !0,
|
|
202
|
+
searchPlaceholder: "Search drivers...",
|
|
203
|
+
searchFields: ["fullName", "employeeId"],
|
|
204
|
+
onRowClick: (e) => I(`fleet/drivers/${e.id}`),
|
|
205
|
+
getRowId: (e) => e.id,
|
|
206
|
+
pageIndex: D,
|
|
207
|
+
pageSize: k,
|
|
208
|
+
onPageChange: O,
|
|
209
|
+
onPageSizeChange: (e) => {
|
|
210
|
+
A(e), O(0);
|
|
211
|
+
},
|
|
212
|
+
totalItems: F,
|
|
213
|
+
emptyIllustration: "empty-people",
|
|
214
|
+
emptyTitle: "No drivers yet",
|
|
215
|
+
emptyDescription: "Add drivers to start assigning deliveries and routes."
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
export { E as default };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { d as e, f as t, g as n, h as r, i, st as a, u as o, ut as s } from "./PageLayout-BniRJaQ6.js";
|
|
2
|
+
import { t as c } from "./arrow-right-CmKOmIkh.js";
|
|
3
|
+
import { t as l } from "./dollar-sign-B6RoYHHz.js";
|
|
4
|
+
import { t as u } from "./file-text-BuDx4hZp.js";
|
|
5
|
+
import { t as d } from "./fuel-DLH1ag04.js";
|
|
6
|
+
import { t as f } from "./trending-up-CH4R4KOa.js";
|
|
7
|
+
import { c as p, n as m, o as h, r as g } from "./charts-Tj_PPTfA.js";
|
|
8
|
+
import { n as _ } from "./Sparkline-K2RMJ58u.js";
|
|
9
|
+
import { r as v, t as y } from "./MetricCard-y3bWHKUQ.js";
|
|
10
|
+
import { n as b } from "./formatters-FWJDwTFv.js";
|
|
11
|
+
import { useMemo as x } from "react";
|
|
12
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
13
|
+
import { EmphasisPanel as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
//#region node_modules/lucide-react/dist/esm/icons/credit-card.js
|
|
15
|
+
var E = s("CreditCard", [["rect", {
|
|
16
|
+
width: "20",
|
|
17
|
+
height: "14",
|
|
18
|
+
x: "2",
|
|
19
|
+
y: "5",
|
|
20
|
+
rx: "2",
|
|
21
|
+
key: "ynyp8z"
|
|
22
|
+
}], ["line", {
|
|
23
|
+
x1: "2",
|
|
24
|
+
x2: "22",
|
|
25
|
+
y1: "10",
|
|
26
|
+
y2: "10",
|
|
27
|
+
key: "1b3vmo"
|
|
28
|
+
}]]);
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/movethewheels/pages/FinancePage.tsx
|
|
31
|
+
function D() {
|
|
32
|
+
let { analytics: s } = h(), { metrics: D } = p(), { navigate: O } = a(), k = () => O("/billing"), A = x(() => s.trends.revenue.map((e) => ({
|
|
33
|
+
month: e.month,
|
|
34
|
+
revenue: e.revenue
|
|
35
|
+
})), [s.trends.revenue]), j = x(() => [
|
|
36
|
+
{
|
|
37
|
+
label: "Total revenue",
|
|
38
|
+
amount: D.totalRevenue
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: "Collected",
|
|
42
|
+
amount: D.deliveredRevenue
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: "Fuel cost",
|
|
46
|
+
amount: D.fuelCost
|
|
47
|
+
}
|
|
48
|
+
], [
|
|
49
|
+
D.totalRevenue,
|
|
50
|
+
D.deliveredRevenue,
|
|
51
|
+
D.fuelCost
|
|
52
|
+
]), M = j.some((e) => e.amount > 0);
|
|
53
|
+
return /* @__PURE__ */ C(i, {
|
|
54
|
+
title: "Finance",
|
|
55
|
+
subtitle: "Financial overview and reports",
|
|
56
|
+
icon: /* @__PURE__ */ S(l, { size: 24 }),
|
|
57
|
+
headerActions: /* @__PURE__ */ C(o, {
|
|
58
|
+
variant: "outline",
|
|
59
|
+
onClick: k,
|
|
60
|
+
children: [/* @__PURE__ */ S(u, { size: 16 }), " Invoices & Billing"]
|
|
61
|
+
}),
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ S(T, {
|
|
64
|
+
icon: /* @__PURE__ */ S(l, { size: 18 }),
|
|
65
|
+
children: "Follow the money behind your deliveries. See total revenue, how much has already been collected on delivered orders, fuel cost and how many invoices are still open — then head to Billing to raise and settle invoices."
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ C(v, {
|
|
68
|
+
columns: 4,
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ S(y, {
|
|
71
|
+
treatment: "glass",
|
|
72
|
+
glow: !0,
|
|
73
|
+
label: "Total Revenue",
|
|
74
|
+
value: b(D.totalRevenue),
|
|
75
|
+
icon: /* @__PURE__ */ S(l, { size: 20 }),
|
|
76
|
+
accent: "success"
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ S(y, {
|
|
79
|
+
label: "Collected (Delivered)",
|
|
80
|
+
value: b(D.deliveredRevenue),
|
|
81
|
+
icon: /* @__PURE__ */ S(f, { size: 20 }),
|
|
82
|
+
accent: "brand"
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ S(y, {
|
|
85
|
+
label: "Fuel Cost",
|
|
86
|
+
value: b(D.fuelCost),
|
|
87
|
+
icon: /* @__PURE__ */ S(d, { size: 20 }),
|
|
88
|
+
accent: "warning"
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ S(y, {
|
|
91
|
+
label: "Open Invoices",
|
|
92
|
+
value: String(D.openInvoices),
|
|
93
|
+
icon: /* @__PURE__ */ S(E, { size: 20 }),
|
|
94
|
+
accent: "blue"
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ C("div", {
|
|
99
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
100
|
+
children: [/* @__PURE__ */ C(e, {
|
|
101
|
+
className: "lg:col-span-2",
|
|
102
|
+
children: [/* @__PURE__ */ S(r, { children: /* @__PURE__ */ S(n, { children: "Revenue trend" }) }), /* @__PURE__ */ S(t, { children: /* @__PURE__ */ S(g, {
|
|
103
|
+
xKey: "month",
|
|
104
|
+
variant: "area",
|
|
105
|
+
height: 280,
|
|
106
|
+
showLegend: !1,
|
|
107
|
+
data: A,
|
|
108
|
+
series: [{
|
|
109
|
+
dataKey: "revenue",
|
|
110
|
+
name: "Revenue",
|
|
111
|
+
color: _.brandBlue
|
|
112
|
+
}],
|
|
113
|
+
valueFormatter: (e) => b(Number(e)),
|
|
114
|
+
emptyMessage: "No revenue recorded yet. Revenue appears here as orders are delivered."
|
|
115
|
+
}) })]
|
|
116
|
+
}), /* @__PURE__ */ C(w, {
|
|
117
|
+
className: "space-y-4",
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ S("h2", {
|
|
120
|
+
className: "text-base font-semibold text-text-primary",
|
|
121
|
+
children: "Invoices & Settlement"
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ S("p", {
|
|
124
|
+
className: "text-sm text-text-secondary",
|
|
125
|
+
children: "Invoicing, payments and settlement run through the platform Billing module — the single source of truth for what's been billed and paid. MoveTheWheels doesn't keep its own invoice ledger."
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ C("div", {
|
|
128
|
+
className: "flex items-center justify-between p-4 bg-status-warning-bg/10 rounded-lg",
|
|
129
|
+
children: [/* @__PURE__ */ C("div", {
|
|
130
|
+
className: "flex items-center gap-3",
|
|
131
|
+
children: [/* @__PURE__ */ S("div", {
|
|
132
|
+
className: "w-10 h-10 rounded-full bg-status-warning-bg/20 flex items-center justify-center",
|
|
133
|
+
children: /* @__PURE__ */ S(E, {
|
|
134
|
+
size: 20,
|
|
135
|
+
className: "text-status-warning-text"
|
|
136
|
+
})
|
|
137
|
+
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
138
|
+
className: "font-medium",
|
|
139
|
+
children: "Open invoices"
|
|
140
|
+
}), /* @__PURE__ */ C("p", {
|
|
141
|
+
className: "text-sm text-text-secondary",
|
|
142
|
+
children: [D.openInvoices, " awaiting settlement"]
|
|
143
|
+
})] })]
|
|
144
|
+
}), /* @__PURE__ */ S("span", {
|
|
145
|
+
className: "text-xl font-bold text-status-warning-text",
|
|
146
|
+
children: D.openInvoices
|
|
147
|
+
})]
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ C(o, {
|
|
150
|
+
className: "w-full",
|
|
151
|
+
onClick: k,
|
|
152
|
+
children: ["Open Billing ", /* @__PURE__ */ S(c, { size: 16 })]
|
|
153
|
+
})
|
|
154
|
+
]
|
|
155
|
+
})]
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ C(e, { children: [/* @__PURE__ */ S(r, { children: /* @__PURE__ */ S(n, { children: "Revenue vs cost" }) }), /* @__PURE__ */ S(t, { children: M ? /* @__PURE__ */ S(m, {
|
|
158
|
+
xKey: "label",
|
|
159
|
+
height: 260,
|
|
160
|
+
showLegend: !1,
|
|
161
|
+
data: j,
|
|
162
|
+
series: [{
|
|
163
|
+
dataKey: "amount",
|
|
164
|
+
name: "Amount"
|
|
165
|
+
}],
|
|
166
|
+
valueFormatter: (e) => b(Number(e))
|
|
167
|
+
}) : /* @__PURE__ */ S("p", {
|
|
168
|
+
className: "py-8 text-center text-sm text-text-secondary",
|
|
169
|
+
children: "Revenue and cost figures appear here as orders are delivered."
|
|
170
|
+
}) })] })
|
|
171
|
+
]
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
export { D as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { M as e, a as t,
|
|
2
|
-
import { t as f } from "./chevron-right-
|
|
3
|
-
import { t as p } from "./fuel-
|
|
4
|
-
import { t as m } from "./star-
|
|
5
|
-
import { t as h } from "./truck-
|
|
6
|
-
import { t as g } from "./users-
|
|
7
|
-
import { t as _ } from "./wrench-
|
|
8
|
-
import { i as v, n as y, o as b } from "./useFleet-
|
|
9
|
-
import { n as x, r as S, t as C } from "./MetricCard-
|
|
10
|
-
import { a as w, r as T } from "./StatusBadge-
|
|
1
|
+
import { M as e, a as t, d as n, f as r, g as i, h as a, i as o, lt as s, o as c, s as l, st as u, u as d } from "./PageLayout-BniRJaQ6.js";
|
|
2
|
+
import { t as f } from "./chevron-right-BIcwUJZq.js";
|
|
3
|
+
import { t as p } from "./fuel-DLH1ag04.js";
|
|
4
|
+
import { t as m } from "./star-CVZHFwDx.js";
|
|
5
|
+
import { t as h } from "./truck-9rLDncav.js";
|
|
6
|
+
import { t as g } from "./users-B8KhJBGg.js";
|
|
7
|
+
import { t as _ } from "./wrench-Dg-sgH2e.js";
|
|
8
|
+
import { i as v, n as y, o as b } from "./useFleet-g5Yri0G8.js";
|
|
9
|
+
import { n as x, r as S, t as C } from "./MetricCard-y3bWHKUQ.js";
|
|
10
|
+
import { a as w, r as T } from "./StatusBadge-BNHXYvZx.js";
|
|
11
11
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
12
12
|
import { CTAOverflowMenu as O, EmphasisPanel as k, NextSteps as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
import { useI18n as M } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
@@ -16,14 +16,14 @@ function N() {
|
|
|
16
16
|
let { t: N } = M(), P = (e, t) => {
|
|
17
17
|
let n = N(e);
|
|
18
18
|
return n === e ? t : n;
|
|
19
|
-
}, { basePath: F, navigate: I } =
|
|
19
|
+
}, { basePath: F, navigate: I } = u(), { stats: L, isLoading: R, error: z, refetch: B } = v(), { vehicles: V, isLoading: H, error: U, refetch: W } = b(), { drivers: G, isLoading: K, error: q, refetch: J } = y(), Y = R || H || K, X = z ?? U ?? q, Z = () => {
|
|
20
20
|
B(), W(), J();
|
|
21
21
|
}, Q = (e) => {
|
|
22
|
-
I && I(
|
|
22
|
+
I && I(s(F, e));
|
|
23
23
|
}, $ = (e, t) => {
|
|
24
24
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
25
25
|
};
|
|
26
|
-
return /* @__PURE__ */ D(
|
|
26
|
+
return /* @__PURE__ */ D(o, {
|
|
27
27
|
title: P("movethewheels.fleet.title", "Fleet Management"),
|
|
28
28
|
subtitle: P("movethewheels.fleet.subtitle", "Manage your vehicles and drivers"),
|
|
29
29
|
icon: /* @__PURE__ */ E(h, { size: 24 }),
|
|
@@ -70,9 +70,9 @@ function N() {
|
|
|
70
70
|
}
|
|
71
71
|
]
|
|
72
72
|
}),
|
|
73
|
-
X && !Y ? /* @__PURE__ */ E(
|
|
73
|
+
X && !Y ? /* @__PURE__ */ E(n, {
|
|
74
74
|
className: "border-status-error-border",
|
|
75
|
-
children: /* @__PURE__ */ D(
|
|
75
|
+
children: /* @__PURE__ */ D(r, {
|
|
76
76
|
className: "p-6 text-center space-y-3",
|
|
77
77
|
children: [
|
|
78
78
|
/* @__PURE__ */ E("p", {
|
|
@@ -141,7 +141,7 @@ function N() {
|
|
|
141
141
|
/* @__PURE__ */ E(f, { size: 16 })
|
|
142
142
|
]
|
|
143
143
|
}),
|
|
144
|
-
children: /* @__PURE__ */ E(
|
|
144
|
+
children: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(r, {
|
|
145
145
|
className: "p-0",
|
|
146
146
|
children: /* @__PURE__ */ E("div", {
|
|
147
147
|
className: "divide-y",
|
|
@@ -222,7 +222,7 @@ function N() {
|
|
|
222
222
|
/* @__PURE__ */ E(f, { size: 16 })
|
|
223
223
|
]
|
|
224
224
|
}),
|
|
225
|
-
children: /* @__PURE__ */ E(
|
|
225
|
+
children: /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E(r, {
|
|
226
226
|
className: "p-0",
|
|
227
227
|
children: /* @__PURE__ */ E("div", {
|
|
228
228
|
className: "divide-y",
|
|
@@ -237,7 +237,7 @@ function N() {
|
|
|
237
237
|
className: "flex items-center justify-between",
|
|
238
238
|
children: [/* @__PURE__ */ D("div", {
|
|
239
239
|
className: "flex items-center gap-3",
|
|
240
|
-
children: [/* @__PURE__ */ E(c, { children: /* @__PURE__ */ E(
|
|
240
|
+
children: [/* @__PURE__ */ E(c, { children: /* @__PURE__ */ E(l, { children: e.fullName.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
241
241
|
className: "font-medium",
|
|
242
242
|
children: e.fullName
|
|
243
243
|
}), /* @__PURE__ */ D("p", {
|
|
@@ -302,7 +302,7 @@ function N() {
|
|
|
302
302
|
})]
|
|
303
303
|
}, t))
|
|
304
304
|
})]
|
|
305
|
-
}), /* @__PURE__ */ D(
|
|
305
|
+
}), /* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ E(i, { children: P("movethewheels.fleet.status.driverTitle", "Driver Status") }) }), /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E("div", {
|
|
306
306
|
className: "space-y-4",
|
|
307
307
|
children: Object.entries(L.driversByStatus).map(([t, n]) => /* @__PURE__ */ D("div", {
|
|
308
308
|
className: "flex items-center justify-between",
|
|
@@ -325,12 +325,12 @@ function N() {
|
|
|
325
325
|
}, t))
|
|
326
326
|
}) })] })]
|
|
327
327
|
}),
|
|
328
|
-
L.vehiclesByStatus.maintenance > 0 && /* @__PURE__ */ D(
|
|
328
|
+
L.vehiclesByStatus.maintenance > 0 && /* @__PURE__ */ D(n, {
|
|
329
329
|
className: "border-status-warning-border",
|
|
330
|
-
children: [/* @__PURE__ */ E(
|
|
330
|
+
children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ D(i, {
|
|
331
331
|
className: "flex items-center gap-2 text-status-warning-text",
|
|
332
332
|
children: [/* @__PURE__ */ E(_, { size: 18 }), P("movethewheels.fleet.maintenance.title", "Maintenance Required")]
|
|
333
|
-
}) }), /* @__PURE__ */ E(
|
|
333
|
+
}) }), /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E("div", {
|
|
334
334
|
className: "space-y-3",
|
|
335
335
|
children: V.filter((e) => e.status === "maintenance").map((e) => /* @__PURE__ */ D("div", {
|
|
336
336
|
className: "flex items-center justify-between p-3 bg-status-warning-bg/10 rounded-lg",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { d as e, f as t, g as n, h as r, i, l as a,
|
|
2
|
-
import { t as c } from "./download-
|
|
3
|
-
import { t as l } from "./file-text-
|
|
4
|
-
import { t as u } from "./upload-
|
|
5
|
-
import { t as d } from "./x-
|
|
6
|
-
import { t as f } from "./useImportExport-
|
|
1
|
+
import { d as e, f as t, g as n, h as r, i, l as a, u as o, ut as s } from "./PageLayout-BniRJaQ6.js";
|
|
2
|
+
import { t as c } from "./download-DP04iWTd.js";
|
|
3
|
+
import { t as l } from "./file-text-BuDx4hZp.js";
|
|
4
|
+
import { t as u } from "./upload-DanJY1Vo.js";
|
|
5
|
+
import { t as d } from "./x-C4ObLVEa.js";
|
|
6
|
+
import { t as f } from "./useImportExport-MYwIT3rE.js";
|
|
7
7
|
import { useRef as p, useState as m } from "react";
|
|
8
8
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
9
|
import { EmphasisPanel as _, IllustratedEmptyState as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region node_modules/lucide-react/dist/esm/icons/check.js
|
|
11
|
-
var b =
|
|
11
|
+
var b = s("Check", [["path", {
|
|
12
12
|
d: "M20 6 9 17l-5-5",
|
|
13
13
|
key: "1gmf2c"
|
|
14
|
-
}]]), x =
|
|
14
|
+
}]]), x = s("FileSpreadsheet", [
|
|
15
15
|
["path", {
|
|
16
16
|
d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
|
|
17
17
|
key: "1rqfz7"
|
|
@@ -84,10 +84,10 @@ var b = o("Check", [["path", {
|
|
|
84
84
|
}
|
|
85
85
|
];
|
|
86
86
|
function w() {
|
|
87
|
-
let { exportData:
|
|
87
|
+
let { exportData: s, importData: w, isBusy: T } = f(), [E, D] = m([]), [O, k] = m(null), A = p(null), j = p(null), M = (e) => D((t) => [e, ...t]), N = async (e, t) => {
|
|
88
88
|
k(`${e.resource}:${t}`);
|
|
89
89
|
try {
|
|
90
|
-
let n = await
|
|
90
|
+
let n = await s(e.resource, t);
|
|
91
91
|
if (n.success && n.payload) {
|
|
92
92
|
let r = JSON.stringify(n.payload, null, 2), i = new Blob([r], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
93
93
|
o.href = a, o.download = `${e.resource}-export.${t.toLowerCase() === "csv" ? "csv" : "json"}`, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a);
|
|
@@ -188,7 +188,7 @@ function w() {
|
|
|
188
188
|
children: [/* @__PURE__ */ h(a, {
|
|
189
189
|
variant: "outline",
|
|
190
190
|
children: "CSV, JSON"
|
|
191
|
-
}), /* @__PURE__ */ h(
|
|
191
|
+
}), /* @__PURE__ */ h(o, {
|
|
192
192
|
variant: "outline",
|
|
193
193
|
size: "sm",
|
|
194
194
|
className: "ml-2",
|
|
@@ -215,7 +215,7 @@ function w() {
|
|
|
215
215
|
children: e.description
|
|
216
216
|
})] }), /* @__PURE__ */ h("div", {
|
|
217
217
|
className: "flex gap-1",
|
|
218
|
-
children: e.formats.map((t) => /* @__PURE__ */ h(
|
|
218
|
+
children: e.formats.map((t) => /* @__PURE__ */ h(o, {
|
|
219
219
|
variant: "outline",
|
|
220
220
|
size: "sm",
|
|
221
221
|
disabled: O === `${e.resource}:${t}`,
|