@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
|
@@ -1,176 +0,0 @@
|
|
|
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-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";
|
|
14
|
-
//#region src/movethewheels/pages/DriversPage.tsx
|
|
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, {
|
|
21
|
-
title: "Drivers",
|
|
22
|
-
subtitle: `${j} drivers`,
|
|
23
|
-
icon: /* @__PURE__ */ g(u, { size: 24 }),
|
|
24
|
-
headerActions: /* @__PURE__ */ g(v, {
|
|
25
|
-
primary: {
|
|
26
|
-
label: "Add Driver",
|
|
27
|
-
icon: /* @__PURE__ */ g(s, { size: 16 }),
|
|
28
|
-
onSelect: () => M("fleet/drivers/new")
|
|
29
|
-
},
|
|
30
|
-
actions: [{
|
|
31
|
-
label: "Refresh",
|
|
32
|
-
icon: /* @__PURE__ */ g(c, { size: 16 }),
|
|
33
|
-
onSelect: () => k()
|
|
34
|
-
}, {
|
|
35
|
-
label: "Export",
|
|
36
|
-
icon: /* @__PURE__ */ g(o, { size: 16 }),
|
|
37
|
-
onSelect: () => M("import-export")
|
|
38
|
-
}]
|
|
39
|
-
}),
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ g(b, {
|
|
42
|
-
icon: /* @__PURE__ */ g(u, { size: 18 }),
|
|
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."
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ _(y, { children: [/* @__PURE__ */ g("p", {
|
|
46
|
-
className: "text-sm font-medium text-text-secondary",
|
|
47
|
-
children: "Workforce at a glance"
|
|
48
|
-
}), /* @__PURE__ */ _("div", {
|
|
49
|
-
className: "mt-3 grid grid-cols-3 gap-4",
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
52
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
53
|
-
children: j
|
|
54
|
-
}), /* @__PURE__ */ g("p", {
|
|
55
|
-
className: "text-xs text-text-secondary",
|
|
56
|
-
children: "Total drivers"
|
|
57
|
-
})] }),
|
|
58
|
-
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
59
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
60
|
-
children: A.driversByStatus.available + A.driversByStatus.busy
|
|
61
|
-
}), /* @__PURE__ */ g("p", {
|
|
62
|
-
className: "text-xs text-text-secondary",
|
|
63
|
-
children: "On duty / available"
|
|
64
|
-
})] }),
|
|
65
|
-
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
66
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
67
|
-
children: A.avgDriverRating > 0 ? A.avgDriverRating.toFixed(1) : "—"
|
|
68
|
-
}), /* @__PURE__ */ g("p", {
|
|
69
|
-
className: "text-xs text-text-secondary",
|
|
70
|
-
children: "Avg rating"
|
|
71
|
-
})] })
|
|
72
|
-
]
|
|
73
|
-
})] }),
|
|
74
|
-
/* @__PURE__ */ g(a, {
|
|
75
|
-
columns: [
|
|
76
|
-
{
|
|
77
|
-
id: "driver",
|
|
78
|
-
header: "Driver",
|
|
79
|
-
cell: (e) => /* @__PURE__ */ _("div", {
|
|
80
|
-
className: "flex items-center gap-3",
|
|
81
|
-
children: [/* @__PURE__ */ g(n, { children: /* @__PURE__ */ g(i, { children: e.fullName.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
82
|
-
className: "font-medium",
|
|
83
|
-
children: e.fullName
|
|
84
|
-
}), /* @__PURE__ */ g("p", {
|
|
85
|
-
className: "text-sm text-text-secondary",
|
|
86
|
-
children: e.employeeId
|
|
87
|
-
})] })]
|
|
88
|
-
})
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
id: "status",
|
|
92
|
-
header: "Status",
|
|
93
|
-
accessorKey: "status",
|
|
94
|
-
sortable: !0,
|
|
95
|
-
cell: (e) => /* @__PURE__ */ g(p, {
|
|
96
|
-
status: e.status,
|
|
97
|
-
type: "driver"
|
|
98
|
-
})
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: "rating",
|
|
102
|
-
header: "Rating",
|
|
103
|
-
cell: (e) => /* @__PURE__ */ _("div", {
|
|
104
|
-
className: "flex items-center gap-1",
|
|
105
|
-
children: [
|
|
106
|
-
/* @__PURE__ */ g(l, {
|
|
107
|
-
size: 14,
|
|
108
|
-
className: "text-status-warning-text fill-current"
|
|
109
|
-
}),
|
|
110
|
-
/* @__PURE__ */ g("span", {
|
|
111
|
-
className: "font-medium",
|
|
112
|
-
children: e.ratings.overall.toFixed(1)
|
|
113
|
-
}),
|
|
114
|
-
/* @__PURE__ */ _("span", {
|
|
115
|
-
className: "text-text-secondary text-sm",
|
|
116
|
-
children: [
|
|
117
|
-
"(",
|
|
118
|
-
e.ratings.totalRatings,
|
|
119
|
-
")"
|
|
120
|
-
]
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
})
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: "deliveries",
|
|
127
|
-
header: "Deliveries",
|
|
128
|
-
accessorKey: "completedOrders",
|
|
129
|
-
sortable: !0,
|
|
130
|
-
cell: (e) => /* @__PURE__ */ g("span", {
|
|
131
|
-
className: "font-medium",
|
|
132
|
-
children: e.completedOrders.toLocaleString()
|
|
133
|
-
})
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: "license",
|
|
137
|
-
header: "License",
|
|
138
|
-
cell: (e) => /* @__PURE__ */ _("div", {
|
|
139
|
-
className: "text-sm",
|
|
140
|
-
children: [/* @__PURE__ */ g("p", { children: e.licenseType }), /* @__PURE__ */ _("p", {
|
|
141
|
-
className: "text-text-secondary",
|
|
142
|
-
children: ["Exp: ", m(e.licenseExpiry, "short")]
|
|
143
|
-
})]
|
|
144
|
-
})
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: "joined",
|
|
148
|
-
header: "Join Date",
|
|
149
|
-
accessorKey: "joinDate",
|
|
150
|
-
sortable: !0,
|
|
151
|
-
cell: (e) => m(e.joinDate, "short")
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
data: D,
|
|
155
|
-
isLoading: O,
|
|
156
|
-
searchable: !0,
|
|
157
|
-
searchPlaceholder: "Search drivers...",
|
|
158
|
-
searchFields: ["fullName", "employeeId"],
|
|
159
|
-
onRowClick: (e) => M(`fleet/drivers/${e.id}`),
|
|
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,
|
|
168
|
-
emptyIllustration: "empty-people",
|
|
169
|
-
emptyTitle: "No drivers yet",
|
|
170
|
-
emptyDescription: "Add drivers to start assigning deliveries and routes."
|
|
171
|
-
})
|
|
172
|
-
]
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
//#endregion
|
|
176
|
-
export { x as default };
|
|
@@ -1,136 +0,0 @@
|
|
|
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,253 +0,0 @@
|
|
|
1
|
-
import { M as e, a as t, ct as n, d as r, f as i, i as a, l as o, ot as s, u as c } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as l } from "./chevron-right-eV4LjaSi.js";
|
|
3
|
-
import { t as u } from "./package-CcRttV2N.js";
|
|
4
|
-
import { t as d } from "./plus-C_XZDwBz.js";
|
|
5
|
-
import { t as f } from "./triangle-alert-D7Y3J_4z.js";
|
|
6
|
-
import { t as p } from "./warehouse-CaqfmMKh.js";
|
|
7
|
-
import { n as m, t as h } from "./useInventory-CAAVMRp6.js";
|
|
8
|
-
import { n as g, r as _, t as v } from "./MetricCard-CVBVpu7o.js";
|
|
9
|
-
import { n as y } from "./formatters-BQr-aR5W.js";
|
|
10
|
-
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
11
|
-
import { CTAOverflowMenu as S, EmphasisPanel as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
|
|
12
|
-
import { useI18n as T } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
|
-
//#region src/movethewheels/pages/InventoryPage.tsx
|
|
14
|
-
function E() {
|
|
15
|
-
let { t: E } = T(), D = (e, t) => {
|
|
16
|
-
let n = E(e);
|
|
17
|
-
return n === e ? t : n;
|
|
18
|
-
}, { basePath: O, navigate: k } = s(), { inventory: A, products: j, warehouses: M, isLoading: N, error: P, refetch: F } = h(), { stats: I } = m(), L = (e) => k?.(n(O, e)), R = (e, t) => {
|
|
19
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
20
|
-
}, z = A.filter((e) => e.availableQuantity <= e.reorderLevel);
|
|
21
|
-
return /* @__PURE__ */ x(a, {
|
|
22
|
-
title: D("movethewheels.inventory.title", "Inventory"),
|
|
23
|
-
subtitle: D("movethewheels.inventory.subtitle", "Manage your products and warehouses"),
|
|
24
|
-
icon: /* @__PURE__ */ b(u, { size: 24 }),
|
|
25
|
-
headerActions: /* @__PURE__ */ b(S, {
|
|
26
|
-
primary: {
|
|
27
|
-
label: D("movethewheels.inventory.actions.addProduct", "Add Product"),
|
|
28
|
-
icon: /* @__PURE__ */ b(d, { size: 16 }),
|
|
29
|
-
onSelect: () => L("inventory/products/new")
|
|
30
|
-
},
|
|
31
|
-
actions: [{
|
|
32
|
-
label: D("movethewheels.inventory.actions.products", "Products"),
|
|
33
|
-
onSelect: () => L("inventory/products")
|
|
34
|
-
}, {
|
|
35
|
-
label: D("movethewheels.inventory.actions.warehouses", "Warehouses"),
|
|
36
|
-
onSelect: () => L("inventory/warehouses")
|
|
37
|
-
}]
|
|
38
|
-
}),
|
|
39
|
-
children: [
|
|
40
|
-
/* @__PURE__ */ b(w, {
|
|
41
|
-
icon: /* @__PURE__ */ b(u, { size: 18 }),
|
|
42
|
-
children: D("movethewheels.inventory.purpose", "A real-time view of what you have and where. Track stock value and quantities across warehouses, catch low-stock items before they run out, and drill into products or warehouses to manage what you can promise on an order.")
|
|
43
|
-
}),
|
|
44
|
-
P && !N ? /* @__PURE__ */ b(r, {
|
|
45
|
-
className: "border-status-error-border",
|
|
46
|
-
children: /* @__PURE__ */ x(i, {
|
|
47
|
-
className: "p-6 text-center space-y-3",
|
|
48
|
-
children: [
|
|
49
|
-
/* @__PURE__ */ b("p", {
|
|
50
|
-
className: "text-status-error-text font-medium",
|
|
51
|
-
children: D("movethewheels.inventory.error.title", "Couldn't load inventory")
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ b("p", {
|
|
54
|
-
className: "text-sm text-text-secondary",
|
|
55
|
-
children: P.message
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ b(c, {
|
|
58
|
-
variant: "outline",
|
|
59
|
-
onClick: F,
|
|
60
|
-
children: D("movethewheels.inventory.error.retry", "Retry")
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
})
|
|
64
|
-
}) : N ? /* @__PURE__ */ b(_, {
|
|
65
|
-
columns: 4,
|
|
66
|
-
children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ b(g, {}, t))
|
|
67
|
-
}) : /* @__PURE__ */ x(_, {
|
|
68
|
-
columns: 4,
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ b(v, {
|
|
71
|
-
label: D("movethewheels.inventory.metrics.totalProducts", "Total Products"),
|
|
72
|
-
value: I.totalProducts,
|
|
73
|
-
icon: /* @__PURE__ */ b(u, { size: 20 }),
|
|
74
|
-
onClick: () => L("inventory/products")
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ b(v, {
|
|
77
|
-
label: D("movethewheels.inventory.metrics.totalItems", "Total Items"),
|
|
78
|
-
value: I.totalItems.toLocaleString(),
|
|
79
|
-
icon: /* @__PURE__ */ b(u, { size: 20 })
|
|
80
|
-
}),
|
|
81
|
-
/* @__PURE__ */ b(v, {
|
|
82
|
-
label: D("movethewheels.inventory.metrics.inventoryValue", "Inventory Value"),
|
|
83
|
-
value: y(I.totalValue),
|
|
84
|
-
icon: /* @__PURE__ */ b(u, { size: 20 })
|
|
85
|
-
}),
|
|
86
|
-
/* @__PURE__ */ b(v, {
|
|
87
|
-
label: D("movethewheels.inventory.metrics.warehouses", "Warehouses"),
|
|
88
|
-
value: I.totalWarehouses,
|
|
89
|
-
icon: /* @__PURE__ */ b(p, { size: 20 }),
|
|
90
|
-
onClick: () => L("inventory/warehouses")
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
}),
|
|
94
|
-
z.length > 0 && /* @__PURE__ */ x(C, {
|
|
95
|
-
className: "space-y-4",
|
|
96
|
-
children: [/* @__PURE__ */ x("h2", {
|
|
97
|
-
className: "flex items-center gap-2 text-base font-semibold text-status-warning-text",
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ b(f, { size: 18 }),
|
|
100
|
-
D("movethewheels.inventory.lowStock.title", "Low Stock Alert"),
|
|
101
|
-
" (",
|
|
102
|
-
z.length,
|
|
103
|
-
" ",
|
|
104
|
-
D("movethewheels.inventory.lowStock.items", "items"),
|
|
105
|
-
")"
|
|
106
|
-
]
|
|
107
|
-
}), /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b("div", {
|
|
108
|
-
className: "space-y-3",
|
|
109
|
-
children: z.slice(0, 5).map((e) => {
|
|
110
|
-
let t = j.find((t) => t.id === e.productId);
|
|
111
|
-
return /* @__PURE__ */ x("div", {
|
|
112
|
-
className: "flex items-center justify-between p-3 bg-status-warning-bg/10 rounded-lg",
|
|
113
|
-
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
114
|
-
className: "font-medium",
|
|
115
|
-
children: t?.name || D("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product")
|
|
116
|
-
}), /* @__PURE__ */ x("p", {
|
|
117
|
-
className: "text-sm text-text-secondary",
|
|
118
|
-
children: [
|
|
119
|
-
D("movethewheels.inventory.lowStock.sku", "SKU:"),
|
|
120
|
-
" ",
|
|
121
|
-
t?.sku
|
|
122
|
-
]
|
|
123
|
-
})] }), /* @__PURE__ */ x("div", {
|
|
124
|
-
className: "text-right",
|
|
125
|
-
children: [/* @__PURE__ */ x("p", {
|
|
126
|
-
className: "font-medium text-status-warning-text",
|
|
127
|
-
children: [
|
|
128
|
-
e.availableQuantity,
|
|
129
|
-
" ",
|
|
130
|
-
D("movethewheels.inventory.lowStock.left", "left")
|
|
131
|
-
]
|
|
132
|
-
}), /* @__PURE__ */ x("p", {
|
|
133
|
-
className: "text-sm text-text-secondary",
|
|
134
|
-
children: [
|
|
135
|
-
D("movethewheels.inventory.lowStock.reorderAt", "Reorder at:"),
|
|
136
|
-
" ",
|
|
137
|
-
e.reorderLevel
|
|
138
|
-
]
|
|
139
|
-
})]
|
|
140
|
-
})]
|
|
141
|
-
}, e.id);
|
|
142
|
-
})
|
|
143
|
-
}) })]
|
|
144
|
-
}),
|
|
145
|
-
/* @__PURE__ */ x("div", {
|
|
146
|
-
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
147
|
-
children: [/* @__PURE__ */ b(t, {
|
|
148
|
-
title: D("movethewheels.inventory.warehouses.title", "Warehouses"),
|
|
149
|
-
actions: /* @__PURE__ */ x(c, {
|
|
150
|
-
variant: "ghost",
|
|
151
|
-
size: "sm",
|
|
152
|
-
onClick: () => L("inventory/warehouses"),
|
|
153
|
-
children: [
|
|
154
|
-
D("movethewheels.inventory.common.viewAll", "View all"),
|
|
155
|
-
" ",
|
|
156
|
-
/* @__PURE__ */ b(l, { size: 16 })
|
|
157
|
-
]
|
|
158
|
-
}),
|
|
159
|
-
children: /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(i, {
|
|
160
|
-
className: "p-0",
|
|
161
|
-
children: /* @__PURE__ */ b("div", {
|
|
162
|
-
className: "divide-y",
|
|
163
|
-
children: M.map((t) => /* @__PURE__ */ b("div", {
|
|
164
|
-
role: "button",
|
|
165
|
-
tabIndex: 0,
|
|
166
|
-
"aria-label": `View warehouse ${t.name}`,
|
|
167
|
-
className: "p-4 hover:bg-bg-sunken/50 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
|
|
168
|
-
onClick: () => L(`inventory/warehouses/${t.id}`),
|
|
169
|
-
onKeyDown: (e) => R(e, () => L(`inventory/warehouses/${t.id}`)),
|
|
170
|
-
children: /* @__PURE__ */ x("div", {
|
|
171
|
-
className: "flex items-center justify-between",
|
|
172
|
-
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
173
|
-
className: "font-medium",
|
|
174
|
-
children: t.name
|
|
175
|
-
}), /* @__PURE__ */ x("p", {
|
|
176
|
-
className: "text-sm text-text-secondary",
|
|
177
|
-
children: [
|
|
178
|
-
t.address.city,
|
|
179
|
-
", ",
|
|
180
|
-
t.address.state
|
|
181
|
-
]
|
|
182
|
-
})] }), /* @__PURE__ */ x("div", {
|
|
183
|
-
className: "text-right",
|
|
184
|
-
children: [/* @__PURE__ */ b(o, {
|
|
185
|
-
variant: t.isActive ? "default" : "secondary",
|
|
186
|
-
children: t.isActive ? D("movethewheels.inventory.warehouses.active", "Active") : D("movethewheels.inventory.warehouses.inactive", "Inactive")
|
|
187
|
-
}), /* @__PURE__ */ x("div", {
|
|
188
|
-
className: "mt-2",
|
|
189
|
-
children: [/* @__PURE__ */ b("p", {
|
|
190
|
-
className: "text-xs text-text-secondary",
|
|
191
|
-
children: D("movethewheels.inventory.warehouses.utilization", "Utilization")
|
|
192
|
-
}), /* @__PURE__ */ b(e, {
|
|
193
|
-
value: t.capacity.usedSpace / t.capacity.totalSpace * 100,
|
|
194
|
-
className: "w-24 h-2"
|
|
195
|
-
})]
|
|
196
|
-
})]
|
|
197
|
-
})]
|
|
198
|
-
})
|
|
199
|
-
}, t.id))
|
|
200
|
-
})
|
|
201
|
-
}) })
|
|
202
|
-
}), /* @__PURE__ */ b(t, {
|
|
203
|
-
title: D("movethewheels.inventory.products.title", "Recent Products"),
|
|
204
|
-
actions: /* @__PURE__ */ x(c, {
|
|
205
|
-
variant: "ghost",
|
|
206
|
-
size: "sm",
|
|
207
|
-
onClick: () => L("inventory/products"),
|
|
208
|
-
children: [
|
|
209
|
-
D("movethewheels.inventory.common.viewAll", "View all"),
|
|
210
|
-
" ",
|
|
211
|
-
/* @__PURE__ */ b(l, { size: 16 })
|
|
212
|
-
]
|
|
213
|
-
}),
|
|
214
|
-
children: /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(i, {
|
|
215
|
-
className: "p-0",
|
|
216
|
-
children: /* @__PURE__ */ b("div", {
|
|
217
|
-
className: "divide-y",
|
|
218
|
-
children: j.slice(0, 5).map((e) => /* @__PURE__ */ b("div", {
|
|
219
|
-
role: "button",
|
|
220
|
-
tabIndex: 0,
|
|
221
|
-
"aria-label": `View product ${e.name}`,
|
|
222
|
-
className: "p-4 hover:bg-bg-sunken/50 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
|
|
223
|
-
onClick: () => L(`inventory/products/${e.id}`),
|
|
224
|
-
onKeyDown: (t) => R(t, () => L(`inventory/products/${e.id}`)),
|
|
225
|
-
children: /* @__PURE__ */ x("div", {
|
|
226
|
-
className: "flex items-center justify-between",
|
|
227
|
-
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
228
|
-
className: "font-medium",
|
|
229
|
-
children: e.name
|
|
230
|
-
}), /* @__PURE__ */ b("p", {
|
|
231
|
-
className: "text-sm text-text-secondary",
|
|
232
|
-
children: e.sku
|
|
233
|
-
})] }), /* @__PURE__ */ x("div", {
|
|
234
|
-
className: "text-right",
|
|
235
|
-
children: [/* @__PURE__ */ b("p", {
|
|
236
|
-
className: "font-medium",
|
|
237
|
-
children: y(e.value)
|
|
238
|
-
}), /* @__PURE__ */ b(o, {
|
|
239
|
-
variant: "outline",
|
|
240
|
-
children: e.category
|
|
241
|
-
})]
|
|
242
|
-
})]
|
|
243
|
-
})
|
|
244
|
-
}, e.id))
|
|
245
|
-
})
|
|
246
|
-
}) })
|
|
247
|
-
})]
|
|
248
|
-
})
|
|
249
|
-
]
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
//#endregion
|
|
253
|
-
export { E as default };
|