@burdenoff/microfe-movethewheels 2026.703.2 → 2026.703.4
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-3YOnHO9Y.js} +3 -3
- package/dist/{AnalyticsPage-Dz6g2MvK.js → AnalyticsPage-CMpI1070.js} +11 -11
- package/dist/CreateOrderPage-DRAgGo9i.js +490 -0
- package/dist/CustomerDetailsPage-BCeMmOFe.js +615 -0
- package/dist/{CustomersPage-2Y05LVyh.js → CustomersPage-CaNBMXmM.js} +64 -53
- package/dist/{DashboardPage-BVjQi0EB.js → DashboardPage-DIKlXde3.js} +16 -16
- package/dist/DataTable-XvUcTjwi.js +340 -0
- package/dist/DocumentsCard-U2lSe-cn.js +169 -0
- package/dist/{DriverDetailsPage-CN3WQ0B9.js → DriverDetailsPage-BQrYd_Lp.js} +178 -195
- package/dist/{DriversPage-B0Zpx8OQ.js → DriversPage-PYmdFiby.js} +65 -54
- package/dist/FinancePage-Cwh9Bw4M.js +136 -0
- package/dist/{FleetPage-DqkFi3s3.js → FleetPage-3ZHsB-TN.js} +23 -22
- package/dist/{FormError-BlOjnXOq.js → FormError-cuLV2jVD.js} +1 -1
- package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-C6f7DqhM.js} +50 -70
- package/dist/{InventoryPage-DwfgCUQq.js → InventoryPage-DpiqVu1v.js} +9 -9
- package/dist/{LiveTrackingPage-DCX-K-LR.js → LiveTrackingPage-FAzzlVnX.js} +9 -9
- package/dist/MarketplacePage-Bh_2ns4v.js +426 -0
- package/dist/Notice-CSoDYKw9.js +46 -0
- package/dist/OrderDetailsPage-zCj0lW0j.js +584 -0
- package/dist/{OrdersListPage-BjDlCKJd.js → OrdersListPage-CAMsuUck.js} +166 -89
- package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-wsxAQkA0.js} +12 -12
- package/dist/{ProductsPage-C1G9h7Xd.js → ProductsPage-DC5qDLfz.js} +60 -49
- package/dist/ReportsPage-BwUJ37eO.js +356 -0
- package/dist/RouteDetailsPage-DyMJE9AS.js +583 -0
- package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-Dtc669yc.js} +57 -46
- package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-CpH9xhQg.js} +5 -27
- package/dist/{TrackingPage-W-jtdM3Y.js → TrackingPage-DaNEFG_h.js} +10 -10
- package/dist/{VehicleDetailsPage-Bceo5oz3.js → VehicleDetailsPage-DldYNsYV.js} +125 -142
- package/dist/{VehiclesPage-VBtOep91.js → VehiclesPage-BFw13iMt.js} +61 -50
- package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-CMG7or6G.js} +17 -17
- package/dist/{WarehousesPage-DCbXXXWE.js → WarehousesPage-Wkytnt86.js} +58 -47
- package/dist/arrow-right-Q3XQpTPR.js +11 -0
- package/dist/arrow-up-xNF1zJUG.js +17 -0
- package/dist/chevron-left-B2_r0Elx.js +8 -0
- package/dist/{wrench-CANXWxF-.js → fuel-B6_lnKDs.js} +2 -5
- package/dist/index.js +163 -174
- package/dist/upload-CHZofOqb.js +21 -0
- package/dist/{useAnalytics-DS8n0xgg.js → useAnalytics-D7HW2XRb.js} +52 -2
- package/dist/{useCustomers-BmTNGxiI.js → useCustomers-BPW4__PR.js} +29 -26
- package/dist/{useFleet-DKqXZ16m.js → useFleet-ChBkxAd6.js} +81 -69
- package/dist/{useInventory-DkyiVY_A.js → useInventory-CAAVMRp6.js} +83 -38
- package/dist/{useOrders-Cfk1GLiq.js → useOrders-B465S2nt.js} +58 -47
- package/dist/{useReports-CTqZr-AB.js → useReports-jQ3GpNOm.js} +40 -34
- package/dist/{useRoutes-BQWO607N.js → useRoutes-hS3d5-xr.js} +49 -41
- package/dist/{useTracking-B-va1kO3.js → useTracking-RjGz9PZG.js} +2 -2
- package/dist/user-check-BEKRCi7v.js +20 -0
- package/dist/wrench-q_rgJfaP.js +8 -0
- package/dist/x-tMeDMcCw.js +11 -0
- package/package.json +1 -1
- package/src/movethewheels/components/DataTable.tsx +252 -84
- package/src/movethewheels/components/DocumentsCard.tsx +102 -0
- package/src/movethewheels/components/Notice.tsx +61 -0
- package/src/movethewheels/components/index.ts +7 -0
- package/src/movethewheels/hooks/index.ts +9 -0
- package/src/movethewheels/hooks/useAnalytics.ts +95 -0
- 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 +2 -2
- package/src/movethewheels/pages/CreateOrderPage.tsx +44 -16
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
- package/src/movethewheels/pages/CustomersPage.tsx +27 -11
- package/src/movethewheels/pages/DriverDetailsPage.tsx +16 -30
- package/src/movethewheels/pages/DriversPage.tsx +26 -9
- package/src/movethewheels/pages/FinancePage.tsx +67 -84
- package/src/movethewheels/pages/InventoryPage.tsx +1 -1
- package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
- package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
- package/src/movethewheels/pages/OrdersListPage.tsx +77 -14
- package/src/movethewheels/pages/ProductsPage.tsx +27 -7
- package/src/movethewheels/pages/ReportsPage.tsx +65 -4
- package/src/movethewheels/pages/RouteDetailsPage.tsx +74 -13
- package/src/movethewheels/pages/RoutesPage.tsx +22 -6
- package/src/movethewheels/pages/SettingsPage.tsx +3 -19
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +3 -33
- package/src/movethewheels/pages/VehiclesPage.tsx +26 -5
- package/src/movethewheels/pages/WarehousesPage.tsx +22 -17
- package/src/movethewheels/types/index.ts +8 -0
- package/src/movethewheels/utils/download.ts +62 -0
- package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
- package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
- package/dist/DataTable-DmciIKKM.js +0 -249
- package/dist/FinancePage-DEDykSOP.js +0 -158
- package/dist/MarketplacePage-CIQ97_zp.js +0 -247
- package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
- package/dist/ReportsPage-Zp53q3_8.js +0 -284
- package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
- /package/dist/{MetricCard-BY0QrMD4.js → MetricCard-CVBVpu7o.js} +0 -0
- /package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-C87mDpDP.js} +0 -0
- /package/dist/{box-D9Pal4HM.js → box-Eu05PXDh.js} +0 -0
- /package/dist/{chart-column-BFIJysDR.js → chart-column-ouzgxIv_.js} +0 -0
- /package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-eV4LjaSi.js} +0 -0
- /package/dist/{circle-alert-iY24lSlp.js → circle-alert-Bzh2DBSF.js} +0 -0
- /package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-CGMSpQmD.js} +0 -0
- /package/dist/{clock-DJZtdl8u.js → clock-Bl3ptexL.js} +0 -0
- /package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-CAVU95SO.js} +0 -0
- /package/dist/{download-DRXxoiQR.js → download-C5NbvVDc.js} +0 -0
- /package/dist/{file-text-DWWY6_f5.js → file-text-D-1uvLZG.js} +0 -0
- /package/dist/{filter-DloLC2eE.js → filter-DUfUg6BO.js} +0 -0
- /package/dist/{formatters-CF2S2l1m.js → formatters-BQr-aR5W.js} +0 -0
- /package/dist/{map-CkJaULb2.js → map-C-M-FQLR.js} +0 -0
- /package/dist/{map-pin-BGiCvyCs.js → map-pin-Dznl5l40.js} +0 -0
- /package/dist/{navigation-D36prnAn.js → navigation-BJSJl-VG.js} +0 -0
- /package/dist/{package-BChUzpJS.js → package-CcRttV2N.js} +0 -0
- /package/dist/{phone-Ac9s3mo_.js → phone-DVSZHt_j.js} +0 -0
- /package/dist/{plus-Z76q-FZm.js → plus-C_XZDwBz.js} +0 -0
- /package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-CfgN67l3.js} +0 -0
- /package/dist/{save-CojywNhG.js → save-DJE8Fpdv.js} +0 -0
- /package/dist/{search-CDGefqb3.js → search-D_VyGcZT.js} +0 -0
- /package/dist/{square-pen-CopE9GmB.js → square-pen-D-6JYrVQ.js} +0 -0
- /package/dist/{star-nHlLjDKR.js → star-BpRlUZuU.js} +0 -0
- /package/dist/{store-BR9Voi5E.js → store-B-8HMuyZ.js} +0 -0
- /package/dist/{trash-2-BKhar6Hs.js → trash-2-8vmv-XV_.js} +0 -0
- /package/dist/{trending-up-Dohgd4t_.js → trending-up-Dz6PqPRj.js} +0 -0
- /package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-D7Y3J_4z.js} +0 -0
- /package/dist/{truck-C0v_hbLR.js → truck-D-y2IDzv.js} +0 -0
- /package/dist/{useAssistant-D4v3oxD3.js → useAssistant-DVW4QgQb.js} +0 -0
- /package/dist/{useImportExport-DHr-SWSw.js → useImportExport-DrPDHEDK.js} +0 -0
- /package/dist/{useSettings-CkDH_-gM.js → useSettings-BB8X2RLh.js} +0 -0
- /package/dist/{user-jyFU3lXk.js → user-DzfTn4dE.js} +0 -0
- /package/dist/{users-DZ-ilS6B.js → users-CCrq-w0C.js} +0 -0
- /package/dist/{warehouse-6m5kXMLu.js → warehouse-CaqfmMKh.js} +0 -0
|
@@ -1,83 +1,87 @@
|
|
|
1
1
|
import { ct as e, i as t, o as n, ot as r, s as i } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as a } from "./DataTable-
|
|
3
|
-
import { t as o } from "./download-
|
|
4
|
-
import { t as s } from "./plus-
|
|
5
|
-
import { t as c } from "./refresh-cw-
|
|
6
|
-
import { t as l } from "./star-
|
|
7
|
-
import { t as u } from "./users-
|
|
8
|
-
import {
|
|
9
|
-
import { r as
|
|
10
|
-
import { r as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { t as a } from "./DataTable-XvUcTjwi.js";
|
|
3
|
+
import { t as o } from "./download-C5NbvVDc.js";
|
|
4
|
+
import { t as s } from "./plus-C_XZDwBz.js";
|
|
5
|
+
import { t as c } from "./refresh-cw-CfgN67l3.js";
|
|
6
|
+
import { t as l } from "./star-BpRlUZuU.js";
|
|
7
|
+
import { t as u } from "./users-CCrq-w0C.js";
|
|
8
|
+
import { i as d, n as f } from "./useFleet-ChBkxAd6.js";
|
|
9
|
+
import { r as p } from "./StatusBadge-C87mDpDP.js";
|
|
10
|
+
import { r as m } from "./formatters-BQr-aR5W.js";
|
|
11
|
+
import { useState as h } from "react";
|
|
12
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
13
|
+
import { CTAOverflowMenu as v, EmphasisPanel as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
//#region src/movethewheels/pages/DriversPage.tsx
|
|
14
|
-
function
|
|
15
|
-
let { basePath:
|
|
16
|
-
|
|
15
|
+
function x() {
|
|
16
|
+
let { basePath: x, navigate: S } = r(), [C, w] = h(0), [T, E] = h(25), { drivers: D, isLoading: O, refetch: k } = f({
|
|
17
|
+
limit: T,
|
|
18
|
+
offset: C * T
|
|
19
|
+
}), { stats: A } = d(), j = A.totalDrivers, M = (t) => S?.(e(x, t));
|
|
20
|
+
return /* @__PURE__ */ _(t, {
|
|
17
21
|
title: "Drivers",
|
|
18
|
-
subtitle: `${
|
|
19
|
-
icon: /* @__PURE__ */
|
|
20
|
-
headerActions: /* @__PURE__ */
|
|
22
|
+
subtitle: `${j} drivers`,
|
|
23
|
+
icon: /* @__PURE__ */ g(u, { size: 24 }),
|
|
24
|
+
headerActions: /* @__PURE__ */ g(v, {
|
|
21
25
|
primary: {
|
|
22
26
|
label: "Add Driver",
|
|
23
|
-
icon: /* @__PURE__ */
|
|
24
|
-
onSelect: () =>
|
|
27
|
+
icon: /* @__PURE__ */ g(s, { size: 16 }),
|
|
28
|
+
onSelect: () => M("fleet/drivers/new")
|
|
25
29
|
},
|
|
26
30
|
actions: [{
|
|
27
31
|
label: "Refresh",
|
|
28
|
-
icon: /* @__PURE__ */
|
|
29
|
-
onSelect: () =>
|
|
32
|
+
icon: /* @__PURE__ */ g(c, { size: 16 }),
|
|
33
|
+
onSelect: () => k()
|
|
30
34
|
}, {
|
|
31
35
|
label: "Export",
|
|
32
|
-
icon: /* @__PURE__ */
|
|
33
|
-
onSelect: () =>
|
|
36
|
+
icon: /* @__PURE__ */ g(o, { size: 16 }),
|
|
37
|
+
onSelect: () => M("import-export")
|
|
34
38
|
}]
|
|
35
39
|
}),
|
|
36
40
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
icon: /* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ g(b, {
|
|
42
|
+
icon: /* @__PURE__ */ g(u, { size: 18 }),
|
|
39
43
|
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."
|
|
40
44
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ _(y, { children: [/* @__PURE__ */ g("p", {
|
|
42
46
|
className: "text-sm font-medium text-text-secondary",
|
|
43
47
|
children: "Workforce at a glance"
|
|
44
|
-
}), /* @__PURE__ */
|
|
48
|
+
}), /* @__PURE__ */ _("div", {
|
|
45
49
|
className: "mt-3 grid grid-cols-3 gap-4",
|
|
46
50
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
48
52
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
49
|
-
children:
|
|
50
|
-
}), /* @__PURE__ */
|
|
53
|
+
children: j
|
|
54
|
+
}), /* @__PURE__ */ g("p", {
|
|
51
55
|
className: "text-xs text-text-secondary",
|
|
52
56
|
children: "Total drivers"
|
|
53
57
|
})] }),
|
|
54
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
55
59
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
56
|
-
children:
|
|
57
|
-
}), /* @__PURE__ */
|
|
60
|
+
children: A.driversByStatus.available + A.driversByStatus.busy
|
|
61
|
+
}), /* @__PURE__ */ g("p", {
|
|
58
62
|
className: "text-xs text-text-secondary",
|
|
59
63
|
children: "On duty / available"
|
|
60
64
|
})] }),
|
|
61
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
62
66
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
63
|
-
children:
|
|
64
|
-
}), /* @__PURE__ */
|
|
67
|
+
children: A.avgDriverRating > 0 ? A.avgDriverRating.toFixed(1) : "—"
|
|
68
|
+
}), /* @__PURE__ */ g("p", {
|
|
65
69
|
className: "text-xs text-text-secondary",
|
|
66
70
|
children: "Avg rating"
|
|
67
71
|
})] })
|
|
68
72
|
]
|
|
69
73
|
})] }),
|
|
70
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ g(a, {
|
|
71
75
|
columns: [
|
|
72
76
|
{
|
|
73
77
|
id: "driver",
|
|
74
78
|
header: "Driver",
|
|
75
|
-
cell: (e) => /* @__PURE__ */
|
|
79
|
+
cell: (e) => /* @__PURE__ */ _("div", {
|
|
76
80
|
className: "flex items-center gap-3",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ g(n, { children: /* @__PURE__ */ g(i, { children: e.fullName.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
78
82
|
className: "font-medium",
|
|
79
83
|
children: e.fullName
|
|
80
|
-
}), /* @__PURE__ */
|
|
84
|
+
}), /* @__PURE__ */ g("p", {
|
|
81
85
|
className: "text-sm text-text-secondary",
|
|
82
86
|
children: e.employeeId
|
|
83
87
|
})] })]
|
|
@@ -88,7 +92,7 @@ function y() {
|
|
|
88
92
|
header: "Status",
|
|
89
93
|
accessorKey: "status",
|
|
90
94
|
sortable: !0,
|
|
91
|
-
cell: (e) => /* @__PURE__ */
|
|
95
|
+
cell: (e) => /* @__PURE__ */ g(p, {
|
|
92
96
|
status: e.status,
|
|
93
97
|
type: "driver"
|
|
94
98
|
})
|
|
@@ -96,18 +100,18 @@ function y() {
|
|
|
96
100
|
{
|
|
97
101
|
id: "rating",
|
|
98
102
|
header: "Rating",
|
|
99
|
-
cell: (e) => /* @__PURE__ */
|
|
103
|
+
cell: (e) => /* @__PURE__ */ _("div", {
|
|
100
104
|
className: "flex items-center gap-1",
|
|
101
105
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ g(l, {
|
|
103
107
|
size: 14,
|
|
104
108
|
className: "text-status-warning-text fill-current"
|
|
105
109
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ g("span", {
|
|
107
111
|
className: "font-medium",
|
|
108
112
|
children: e.ratings.overall.toFixed(1)
|
|
109
113
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ _("span", {
|
|
111
115
|
className: "text-text-secondary text-sm",
|
|
112
116
|
children: [
|
|
113
117
|
"(",
|
|
@@ -123,7 +127,7 @@ function y() {
|
|
|
123
127
|
header: "Deliveries",
|
|
124
128
|
accessorKey: "completedOrders",
|
|
125
129
|
sortable: !0,
|
|
126
|
-
cell: (e) => /* @__PURE__ */
|
|
130
|
+
cell: (e) => /* @__PURE__ */ g("span", {
|
|
127
131
|
className: "font-medium",
|
|
128
132
|
children: e.completedOrders.toLocaleString()
|
|
129
133
|
})
|
|
@@ -131,11 +135,11 @@ function y() {
|
|
|
131
135
|
{
|
|
132
136
|
id: "license",
|
|
133
137
|
header: "License",
|
|
134
|
-
cell: (e) => /* @__PURE__ */
|
|
138
|
+
cell: (e) => /* @__PURE__ */ _("div", {
|
|
135
139
|
className: "text-sm",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ g("p", { children: e.licenseType }), /* @__PURE__ */ _("p", {
|
|
137
141
|
className: "text-text-secondary",
|
|
138
|
-
children: ["Exp: ",
|
|
142
|
+
children: ["Exp: ", m(e.licenseExpiry, "short")]
|
|
139
143
|
})]
|
|
140
144
|
})
|
|
141
145
|
},
|
|
@@ -144,16 +148,23 @@ function y() {
|
|
|
144
148
|
header: "Join Date",
|
|
145
149
|
accessorKey: "joinDate",
|
|
146
150
|
sortable: !0,
|
|
147
|
-
cell: (e) =>
|
|
151
|
+
cell: (e) => m(e.joinDate, "short")
|
|
148
152
|
}
|
|
149
153
|
],
|
|
150
|
-
data:
|
|
151
|
-
isLoading:
|
|
154
|
+
data: D,
|
|
155
|
+
isLoading: O,
|
|
152
156
|
searchable: !0,
|
|
153
157
|
searchPlaceholder: "Search drivers...",
|
|
154
158
|
searchFields: ["fullName", "employeeId"],
|
|
155
|
-
onRowClick: (e) =>
|
|
159
|
+
onRowClick: (e) => M(`fleet/drivers/${e.id}`),
|
|
156
160
|
getRowId: (e) => e.id,
|
|
161
|
+
pageIndex: C,
|
|
162
|
+
pageSize: T,
|
|
163
|
+
onPageChange: w,
|
|
164
|
+
onPageSizeChange: (e) => {
|
|
165
|
+
E(e), w(0);
|
|
166
|
+
},
|
|
167
|
+
totalItems: j,
|
|
157
168
|
emptyIllustration: "empty-people",
|
|
158
169
|
emptyTitle: "No drivers yet",
|
|
159
170
|
emptyDescription: "Add drivers to start assigning deliveries and routes."
|
|
@@ -162,4 +173,4 @@ function y() {
|
|
|
162
173
|
});
|
|
163
174
|
}
|
|
164
175
|
//#endregion
|
|
165
|
-
export {
|
|
176
|
+
export { x as default };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { d as e, f as t, g as n, h as r, i, lt as a, ot as o, u as s } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as c } from "./arrow-right-Q3XQpTPR.js";
|
|
3
|
+
import { t as l } from "./dollar-sign-CAVU95SO.js";
|
|
4
|
+
import { t as u } from "./file-text-D-1uvLZG.js";
|
|
5
|
+
import { t as d } from "./fuel-B6_lnKDs.js";
|
|
6
|
+
import { t as f } from "./trending-up-Dz6PqPRj.js";
|
|
7
|
+
import { r as p, t as m } from "./useAnalytics-D7HW2XRb.js";
|
|
8
|
+
import { r as h, t as g } from "./MetricCard-CVBVpu7o.js";
|
|
9
|
+
import { n as _ } from "./formatters-BQr-aR5W.js";
|
|
10
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
+
import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
//#region node_modules/lucide-react/dist/esm/icons/credit-card.js
|
|
13
|
+
var S = a("CreditCard", [["rect", {
|
|
14
|
+
width: "20",
|
|
15
|
+
height: "14",
|
|
16
|
+
x: "2",
|
|
17
|
+
y: "5",
|
|
18
|
+
rx: "2",
|
|
19
|
+
key: "ynyp8z"
|
|
20
|
+
}], ["line", {
|
|
21
|
+
x1: "2",
|
|
22
|
+
x2: "22",
|
|
23
|
+
y1: "10",
|
|
24
|
+
y2: "10",
|
|
25
|
+
key: "1b3vmo"
|
|
26
|
+
}]]);
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/movethewheels/pages/FinancePage.tsx
|
|
29
|
+
function C() {
|
|
30
|
+
let { analytics: a } = m(), { metrics: C } = p(), { navigate: w } = o(), T = () => w("/billing");
|
|
31
|
+
return /* @__PURE__ */ y(i, {
|
|
32
|
+
title: "Finance",
|
|
33
|
+
subtitle: "Financial overview and reports",
|
|
34
|
+
icon: /* @__PURE__ */ v(l, { size: 24 }),
|
|
35
|
+
headerActions: /* @__PURE__ */ y(s, {
|
|
36
|
+
variant: "outline",
|
|
37
|
+
onClick: T,
|
|
38
|
+
children: [/* @__PURE__ */ v(u, { size: 16 }), " Invoices & Billing"]
|
|
39
|
+
}),
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ v(x, {
|
|
42
|
+
icon: /* @__PURE__ */ v(l, { size: 18 }),
|
|
43
|
+
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."
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ y(h, {
|
|
46
|
+
columns: 4,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ v(g, {
|
|
49
|
+
treatment: "glass",
|
|
50
|
+
glow: !0,
|
|
51
|
+
label: "Total Revenue",
|
|
52
|
+
value: _(C.totalRevenue),
|
|
53
|
+
icon: /* @__PURE__ */ v(l, { size: 20 })
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ v(g, {
|
|
56
|
+
label: "Collected (Delivered)",
|
|
57
|
+
value: _(C.deliveredRevenue),
|
|
58
|
+
icon: /* @__PURE__ */ v(f, { size: 20 }),
|
|
59
|
+
changeType: "positive"
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ v(g, {
|
|
62
|
+
label: "Fuel Cost",
|
|
63
|
+
value: _(C.fuelCost),
|
|
64
|
+
icon: /* @__PURE__ */ v(d, { size: 20 }),
|
|
65
|
+
changeType: "neutral"
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ v(g, {
|
|
68
|
+
label: "Open Invoices",
|
|
69
|
+
value: String(C.openInvoices),
|
|
70
|
+
icon: /* @__PURE__ */ v(S, { size: 20 })
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ y("div", {
|
|
75
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
76
|
+
children: [/* @__PURE__ */ y(e, { children: [/* @__PURE__ */ v(r, { children: /* @__PURE__ */ v(n, { children: "Revenue by Month" }) }), /* @__PURE__ */ v(t, { children: a.trends.revenue.length > 0 ? /* @__PURE__ */ v("div", {
|
|
77
|
+
className: "space-y-4",
|
|
78
|
+
children: a.trends.revenue.map((e) => /* @__PURE__ */ y("div", {
|
|
79
|
+
className: "flex items-center justify-between p-3 bg-bg-sunken/50 rounded-lg",
|
|
80
|
+
children: [/* @__PURE__ */ v("span", {
|
|
81
|
+
className: "font-medium",
|
|
82
|
+
children: e.month
|
|
83
|
+
}), /* @__PURE__ */ v("span", {
|
|
84
|
+
className: "text-lg font-bold",
|
|
85
|
+
children: _(e.revenue)
|
|
86
|
+
})]
|
|
87
|
+
}, e.month))
|
|
88
|
+
}) : /* @__PURE__ */ v("p", {
|
|
89
|
+
className: "text-text-secondary text-center py-6",
|
|
90
|
+
children: "No revenue recorded yet. Revenue appears here as orders are delivered."
|
|
91
|
+
}) })] }), /* @__PURE__ */ y(b, {
|
|
92
|
+
className: "space-y-4",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ v("h2", {
|
|
95
|
+
className: "text-base font-semibold text-text-primary",
|
|
96
|
+
children: "Invoices & Settlement"
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ v("p", {
|
|
99
|
+
className: "text-sm text-text-secondary",
|
|
100
|
+
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."
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ y("div", {
|
|
103
|
+
className: "flex items-center justify-between p-4 bg-status-warning-bg/10 rounded-lg",
|
|
104
|
+
children: [/* @__PURE__ */ y("div", {
|
|
105
|
+
className: "flex items-center gap-3",
|
|
106
|
+
children: [/* @__PURE__ */ v("div", {
|
|
107
|
+
className: "w-10 h-10 rounded-full bg-status-warning-bg/20 flex items-center justify-center",
|
|
108
|
+
children: /* @__PURE__ */ v(S, {
|
|
109
|
+
size: 20,
|
|
110
|
+
className: "text-status-warning-text"
|
|
111
|
+
})
|
|
112
|
+
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
113
|
+
className: "font-medium",
|
|
114
|
+
children: "Open invoices"
|
|
115
|
+
}), /* @__PURE__ */ y("p", {
|
|
116
|
+
className: "text-sm text-text-secondary",
|
|
117
|
+
children: [C.openInvoices, " awaiting settlement"]
|
|
118
|
+
})] })]
|
|
119
|
+
}), /* @__PURE__ */ v("span", {
|
|
120
|
+
className: "text-xl font-bold text-status-warning-text",
|
|
121
|
+
children: C.openInvoices
|
|
122
|
+
})]
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ y(s, {
|
|
125
|
+
className: "w-full",
|
|
126
|
+
onClick: T,
|
|
127
|
+
children: ["Open Billing ", /* @__PURE__ */ v(c, { size: 16 })]
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
})]
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
export { C as default };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { M as e, a as t, ct as n, d as r, f as i, g as a, h as o, i as s, o as c, ot as l, s as u, u as d } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as f } from "./chevron-right-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { t as f } from "./chevron-right-eV4LjaSi.js";
|
|
3
|
+
import { t as p } from "./fuel-B6_lnKDs.js";
|
|
4
|
+
import { t as m } from "./star-BpRlUZuU.js";
|
|
5
|
+
import { t as h } from "./truck-D-y2IDzv.js";
|
|
6
|
+
import { t as g } from "./users-CCrq-w0C.js";
|
|
7
|
+
import { t as _ } from "./wrench-q_rgJfaP.js";
|
|
8
|
+
import { i as v, n as y, o as b } from "./useFleet-ChBkxAd6.js";
|
|
9
|
+
import { n as x, r as S, t as C } from "./MetricCard-CVBVpu7o.js";
|
|
10
|
+
import { a as w, r as T } from "./StatusBadge-C87mDpDP.js";
|
|
10
11
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
11
12
|
import { CTAOverflowMenu as O, EmphasisPanel as k, NextSteps as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
|
|
12
13
|
import { useI18n as M } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
@@ -25,22 +26,22 @@ function N() {
|
|
|
25
26
|
return /* @__PURE__ */ D(s, {
|
|
26
27
|
title: P("movethewheels.fleet.title", "Fleet Management"),
|
|
27
28
|
subtitle: P("movethewheels.fleet.subtitle", "Manage your vehicles and drivers"),
|
|
28
|
-
icon: /* @__PURE__ */ E(
|
|
29
|
+
icon: /* @__PURE__ */ E(h, { size: 24 }),
|
|
29
30
|
headerActions: /* @__PURE__ */ E(O, {
|
|
30
31
|
primary: {
|
|
31
32
|
label: P("movethewheels.fleet.actions.allVehicles", "All Vehicles"),
|
|
32
|
-
icon: /* @__PURE__ */ E(
|
|
33
|
+
icon: /* @__PURE__ */ E(h, { size: 16 }),
|
|
33
34
|
onSelect: () => Q("fleet/vehicles")
|
|
34
35
|
},
|
|
35
36
|
actions: [{
|
|
36
37
|
label: P("movethewheels.fleet.actions.allDrivers", "All Drivers"),
|
|
37
|
-
icon: /* @__PURE__ */ E(
|
|
38
|
+
icon: /* @__PURE__ */ E(g, { size: 16 }),
|
|
38
39
|
onSelect: () => Q("fleet/drivers")
|
|
39
40
|
}]
|
|
40
41
|
}),
|
|
41
42
|
children: [
|
|
42
43
|
/* @__PURE__ */ E(j, {
|
|
43
|
-
icon: /* @__PURE__ */ E(
|
|
44
|
+
icon: /* @__PURE__ */ E(h, { size: 18 }),
|
|
44
45
|
children: P("movethewheels.fleet.purpose", "Your command center for vehicles and drivers. See utilization at a glance, keep an eye on availability and ratings, and act on maintenance alerts so you always have road-ready capacity to fulfil orders.")
|
|
45
46
|
}),
|
|
46
47
|
/* @__PURE__ */ E(A, {
|
|
@@ -50,14 +51,14 @@ function N() {
|
|
|
50
51
|
id: "vehicles",
|
|
51
52
|
label: P("movethewheels.fleet.nextSteps.vehicles", "Review your vehicles"),
|
|
52
53
|
description: P("movethewheels.fleet.nextSteps.vehiclesDesc", "Check capacity, fuel and maintenance status across the fleet."),
|
|
53
|
-
icon: /* @__PURE__ */ E(
|
|
54
|
+
icon: /* @__PURE__ */ E(h, { size: 16 }),
|
|
54
55
|
onClick: () => Q("fleet/vehicles")
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
id: "drivers",
|
|
58
59
|
label: P("movethewheels.fleet.nextSteps.drivers", "Review your drivers"),
|
|
59
60
|
description: P("movethewheels.fleet.nextSteps.driversDesc", "See availability, ratings and delivery history before assigning work."),
|
|
60
|
-
icon: /* @__PURE__ */ E(
|
|
61
|
+
icon: /* @__PURE__ */ E(g, { size: 16 }),
|
|
61
62
|
onClick: () => Q("fleet/drivers")
|
|
62
63
|
},
|
|
63
64
|
{
|
|
@@ -98,14 +99,14 @@ function N() {
|
|
|
98
99
|
/* @__PURE__ */ E(C, {
|
|
99
100
|
label: P("movethewheels.fleet.metrics.totalVehicles", "Total Vehicles"),
|
|
100
101
|
value: L.totalVehicles,
|
|
101
|
-
icon: /* @__PURE__ */ E(
|
|
102
|
+
icon: /* @__PURE__ */ E(h, { size: 20 }),
|
|
102
103
|
subtitle: `${L.vehiclesByStatus.available} ${P("movethewheels.fleet.metrics.available", "available")}`,
|
|
103
104
|
onClick: () => Q("fleet/vehicles")
|
|
104
105
|
}),
|
|
105
106
|
/* @__PURE__ */ E(C, {
|
|
106
107
|
label: P("movethewheels.fleet.metrics.totalDrivers", "Total Drivers"),
|
|
107
108
|
value: L.totalDrivers,
|
|
108
|
-
icon: /* @__PURE__ */ E(
|
|
109
|
+
icon: /* @__PURE__ */ E(g, { size: 20 }),
|
|
109
110
|
subtitle: `${L.driversByStatus.available} ${P("movethewheels.fleet.metrics.available", "available")}`,
|
|
110
111
|
onClick: () => Q("fleet/drivers")
|
|
111
112
|
}),
|
|
@@ -114,13 +115,13 @@ function N() {
|
|
|
114
115
|
glow: !0,
|
|
115
116
|
label: P("movethewheels.fleet.metrics.utilization", "Fleet Utilization"),
|
|
116
117
|
value: `${L.utilization.toFixed(0)}%`,
|
|
117
|
-
icon: /* @__PURE__ */ E(
|
|
118
|
+
icon: /* @__PURE__ */ E(h, { size: 20 }),
|
|
118
119
|
changeType: L.utilization >= 70 ? "positive" : "neutral"
|
|
119
120
|
}),
|
|
120
121
|
/* @__PURE__ */ E(C, {
|
|
121
122
|
label: P("movethewheels.fleet.metrics.avgDriverRating", "Avg Driver Rating"),
|
|
122
123
|
value: L.avgDriverRating.toFixed(1),
|
|
123
|
-
icon: /* @__PURE__ */ E(
|
|
124
|
+
icon: /* @__PURE__ */ E(m, { size: 20 }),
|
|
124
125
|
subtitle: P("movethewheels.fleet.metrics.outOfFive", "out of 5"),
|
|
125
126
|
changeType: L.avgDriverRating >= 4.5 ? "positive" : "neutral"
|
|
126
127
|
})
|
|
@@ -157,7 +158,7 @@ function N() {
|
|
|
157
158
|
className: "flex items-center gap-3",
|
|
158
159
|
children: [/* @__PURE__ */ E("div", {
|
|
159
160
|
className: "w-10 h-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
|
|
160
|
-
children: /* @__PURE__ */ E(
|
|
161
|
+
children: /* @__PURE__ */ E(h, {
|
|
161
162
|
size: 20,
|
|
162
163
|
className: "text-primary"
|
|
163
164
|
})
|
|
@@ -257,7 +258,7 @@ function N() {
|
|
|
257
258
|
size: "sm"
|
|
258
259
|
}), /* @__PURE__ */ D("div", {
|
|
259
260
|
className: "mt-1 flex items-center gap-1 justify-end",
|
|
260
|
-
children: [/* @__PURE__ */ E(
|
|
261
|
+
children: [/* @__PURE__ */ E(m, {
|
|
261
262
|
size: 12,
|
|
262
263
|
className: "text-status-warning-text fill-current"
|
|
263
264
|
}), /* @__PURE__ */ E("span", {
|
|
@@ -328,14 +329,14 @@ function N() {
|
|
|
328
329
|
className: "border-status-warning-border",
|
|
329
330
|
children: [/* @__PURE__ */ E(o, { children: /* @__PURE__ */ D(a, {
|
|
330
331
|
className: "flex items-center gap-2 text-status-warning-text",
|
|
331
|
-
children: [/* @__PURE__ */ E(
|
|
332
|
+
children: [/* @__PURE__ */ E(_, { size: 18 }), P("movethewheels.fleet.maintenance.title", "Maintenance Required")]
|
|
332
333
|
}) }), /* @__PURE__ */ E(i, { children: /* @__PURE__ */ E("div", {
|
|
333
334
|
className: "space-y-3",
|
|
334
335
|
children: V.filter((e) => e.status === "maintenance").map((e) => /* @__PURE__ */ D("div", {
|
|
335
336
|
className: "flex items-center justify-between p-3 bg-status-warning-bg/10 rounded-lg",
|
|
336
337
|
children: [/* @__PURE__ */ D("div", {
|
|
337
338
|
className: "flex items-center gap-3",
|
|
338
|
-
children: [/* @__PURE__ */ E(
|
|
339
|
+
children: [/* @__PURE__ */ E(h, {
|
|
339
340
|
size: 20,
|
|
340
341
|
className: "text-status-warning-text"
|
|
341
342
|
}), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|