@burdenoff/microfe-movethewheels 2026.703.4 → 2026.703.6
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-BmILdHgO.js} +16 -15
- package/dist/AnalyticsPage-BSlsiSDE.js +194 -0
- package/dist/{CreateOrderPage-DRAgGo9i.js → CreateOrderPage-DaCgVaO3.js} +40 -40
- package/dist/{CustomerDetailsPage-BCeMmOFe.js → CustomerDetailsPage-DErpbafW.js} +71 -71
- package/dist/CustomersPage-C1lRU6xs.js +205 -0
- package/dist/DashboardPage-Q5-5EKAU.js +542 -0
- package/dist/{DataTable-XvUcTjwi.js → DataTable-KjzbwnRL.js} +31 -31
- package/dist/{DocumentsCard-U2lSe-cn.js → DocumentsCard-T9y6cv4-.js} +25 -25
- package/dist/{DriverDetailsPage-BQrYd_Lp.js → DriverDetailsPage-DnHGkDC7.js} +64 -64
- package/dist/DriversPage-C0ujWVOn.js +221 -0
- package/dist/FinancePage-CA2XEgsQ.js +175 -0
- package/dist/{FleetPage-3ZHsB-TN.js → FleetPage-DrvXW7wK.js} +22 -22
- package/dist/{FormError-cuLV2jVD.js → FormError-CRsMP7TQ.js} +1 -1
- package/dist/{ImportExportPage-C6f7DqhM.js → ImportExportPage-Cac9HjFx.js} +12 -12
- package/dist/InventoryPage-Ezf4gqKI.js +259 -0
- package/dist/LiveTrackingPage-CzbVwDqK.js +429 -0
- package/dist/{MarketplacePage-Bh_2ns4v.js → MarketplacePage-BHDmSQmo.js} +116 -116
- package/dist/MetricCard-DQlDNqmK.js +191 -0
- package/dist/{Notice-CSoDYKw9.js → Notice-GmA7JDR3.js} +2 -2
- package/dist/{OrderDetailsPage-zCj0lW0j.js → OrderDetailsPage-CR0Wc1aN.js} +58 -58
- package/dist/OrdersListPage-C8Bu6wXM.js +386 -0
- package/dist/{PageLayout-D4LDHJJq.js → PageLayout-DX1Ou6V6.js} +164 -134
- package/dist/{ProductDetailsPage-wsxAQkA0.js → ProductDetailsPage-B_ns2MOe.js} +55 -55
- package/dist/ProductsPage-c92BsEoA.js +186 -0
- package/dist/ReportsPage-CPLXtLT2.js +377 -0
- package/dist/{RouteDetailsPage-DyMJE9AS.js → RouteDetailsPage-DOfcRiFv.js} +208 -181
- package/dist/{RoutesPage-Dtc669yc.js → RoutesPage-BZGublby.js} +12 -12
- package/dist/{SettingsPage-CpH9xhQg.js → SettingsPage-5cweX_xh.js} +15 -15
- package/dist/Sparkline-zSXvG6vA.js +16729 -0
- package/dist/{StatusBadge-C87mDpDP.js → StatusBadge-oZjownr1.js} +7 -7
- package/dist/TrackingPage-Ln9qVflK.js +368 -0
- package/dist/{VehicleDetailsPage-DldYNsYV.js → VehicleDetailsPage-CrkzE0dN.js} +53 -53
- package/dist/VehiclesPage-CTQWH7af.js +184 -0
- package/dist/{WarehouseDetailsPage-CMG7or6G.js → WarehouseDetailsPage-CwDLaG65.js} +64 -64
- package/dist/WarehousesPage-KW02DvZg.js +182 -0
- package/dist/{arrow-left-n48Y-Wis.js → arrow-left-DJDw_Yqv.js} +1 -1
- package/dist/{arrow-right-Q3XQpTPR.js → arrow-right-Cb2fLTPJ.js} +1 -1
- package/dist/{arrow-up-xNF1zJUG.js → arrow-up-PxaOIyiT.js} +1 -1
- package/dist/{box-Eu05PXDh.js → box-hSJVtvGf.js} +1 -1
- package/dist/boxes-DDnxEkT5.js +54 -0
- package/dist/{chart-column-ouzgxIv_.js → chart-column-xXgAZvRl.js} +1 -1
- package/dist/charts-CfCwQg6o.js +2018 -0
- package/dist/{chevron-left-B2_r0Elx.js → chevron-left-dhEGJYdh.js} +1 -1
- package/dist/{chevron-right-eV4LjaSi.js → chevron-right-Cud2NDvm.js} +1 -1
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{circle-alert-Bzh2DBSF.js → circle-alert-Rx0p3D5w.js} +1 -1
- package/dist/circle-check-BCxRFdFo.js +13 -0
- package/dist/{circle-check-big-CGMSpQmD.js → circle-check-big-BcIJ8xjx.js} +1 -1
- package/dist/{clock-Bl3ptexL.js → clock-B2_YxJgB.js} +1 -1
- package/dist/{dollar-sign-CAVU95SO.js → dollar-sign-CQmAICv4.js} +1 -1
- package/dist/{download-C5NbvVDc.js → download-CG4Tponq.js} +1 -1
- package/dist/{file-text-D-1uvLZG.js → file-text-CzH-zMub.js} +1 -1
- package/dist/{filter-DUfUg6BO.js → filter-C0u2Lwfn.js} +1 -1
- package/dist/{fuel-B6_lnKDs.js → fuel-C2KELcM-.js} +1 -1
- package/dist/index.css +2 -0
- package/dist/index.js +214 -225
- package/dist/{map-C-M-FQLR.js → map-FuPu5aTw.js} +1 -1
- package/dist/{map-pin-Dznl5l40.js → map-pin-czpLv9uy.js} +1 -1
- package/dist/mapMarkers-NCV9MRKR.js +28 -0
- package/dist/maps-D9m7PKrs.js +5070 -0
- package/dist/{navigation-BJSJl-VG.js → navigation-D5_pdCSS.js} +1 -1
- package/dist/{package-CcRttV2N.js → package-B0sdi6lU.js} +1 -1
- package/dist/{phone-DVSZHt_j.js → phone-V2nuzPu9.js} +1 -1
- package/dist/{plus-C_XZDwBz.js → plus-BqQxkfoU.js} +1 -1
- package/dist/{refresh-cw-CfgN67l3.js → refresh-cw-CEOAPEcV.js} +1 -1
- package/dist/route-CZWcW-Dw.js +22 -0
- package/dist/{save-DJE8Fpdv.js → save-DDFvrxWl.js} +1 -1
- package/dist/{search-D_VyGcZT.js → search-D7Ya6jxj.js} +1 -1
- package/dist/{square-pen-D-6JYrVQ.js → square-pen-DoZZS4Lw.js} +1 -1
- package/dist/{star-BpRlUZuU.js → star-B7PgVu5j.js} +1 -1
- package/dist/{store-B-8HMuyZ.js → store-YVzcIG4A.js} +1 -1
- package/dist/{trash-2-8vmv-XV_.js → trash-2-BegnBzwI.js} +1 -1
- package/dist/{trending-up-Dz6PqPRj.js → trending-up-DBd3XNdb.js} +1 -1
- package/dist/{triangle-alert-D7Y3J_4z.js → triangle-alert-Bxk3Kgs6.js} +1 -1
- package/dist/{truck-D-y2IDzv.js → truck-Clrn0oHp.js} +1 -1
- package/dist/{upload-CHZofOqb.js → upload-Df5JmMwH.js} +1 -1
- package/dist/{useAssistant-DVW4QgQb.js → useAssistant-Cb8nnIVC.js} +11 -28
- package/dist/{useCustomers-BPW4__PR.js → useCustomers-Dq2IR2HQ.js} +1 -1
- package/dist/{useFleet-ChBkxAd6.js → useFleet-CapnWBcA.js} +1 -1
- package/dist/{useImportExport-DrPDHEDK.js → useImportExport-BoGzrlJy.js} +1 -1
- package/dist/{useInventory-CAAVMRp6.js → useInventory-Ci6M2d9f.js} +1 -1
- package/dist/{useOrders-B465S2nt.js → useOrders-BuQU1OHX.js} +1 -1
- package/dist/{useReports-jQ3GpNOm.js → useReports-DIx8W7CO.js} +1 -1
- package/dist/{useRoutes-hS3d5-xr.js → useRoutes-D7EvI_pm.js} +1 -1
- package/dist/{useSettings-BB8X2RLh.js → useSettings-BhX251UQ.js} +6 -6
- package/dist/{useTracking-RjGz9PZG.js → useTracking-C40jmZ6W.js} +3 -3
- package/dist/{user-DzfTn4dE.js → user-BlcJrbtE.js} +1 -1
- package/dist/{user-check-BEKRCi7v.js → user-check-DtnQmimP.js} +1 -1
- package/dist/{users-CCrq-w0C.js → users-Cvwko-Dx.js} +1 -1
- package/dist/{warehouse-CaqfmMKh.js → warehouse-LWLVTk6G.js} +1 -1
- package/dist/{wrench-q_rgJfaP.js → wrench-Cme0RbyR.js} +1 -1
- package/dist/{x-tMeDMcCw.js → x-D8C9Pg5V.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/graphqlClient.ts +81 -31
- 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,215 +0,0 @@
|
|
|
1
|
-
import { M as e, d as t, f as n, g as r, h as i, i as a, u as o } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as s } from "./chart-column-ouzgxIv_.js";
|
|
3
|
-
import { t as c } from "./dollar-sign-CAVU95SO.js";
|
|
4
|
-
import { t as l } from "./package-CcRttV2N.js";
|
|
5
|
-
import { t as u } from "./trending-up-Dz6PqPRj.js";
|
|
6
|
-
import { t as d } from "./truck-D-y2IDzv.js";
|
|
7
|
-
import { t as f } from "./users-CCrq-w0C.js";
|
|
8
|
-
import { a as p, i as m, t as h } from "./useAnalytics-D7HW2XRb.js";
|
|
9
|
-
import { n as g, r as _, t as v } from "./MetricCard-CVBVpu7o.js";
|
|
10
|
-
import { n as y } from "./formatters-BQr-aR5W.js";
|
|
11
|
-
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
|
-
import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
13
|
-
//#region src/movethewheels/pages/AnalyticsPage.tsx
|
|
14
|
-
function w() {
|
|
15
|
-
let { analytics: w, isLoading: T, error: E, refetch: D } = h(), { orderData: O } = p(), { fleetData: k } = m();
|
|
16
|
-
return /* @__PURE__ */ x(a, {
|
|
17
|
-
title: "Analytics",
|
|
18
|
-
subtitle: "Business performance and insights",
|
|
19
|
-
icon: /* @__PURE__ */ b(s, { size: 24 }),
|
|
20
|
-
children: [
|
|
21
|
-
/* @__PURE__ */ b(C, {
|
|
22
|
-
icon: /* @__PURE__ */ b(s, { size: 18 }),
|
|
23
|
-
children: "See how the operation is really performing. Track order volume, revenue, on-time rate and customer satisfaction over time so you can spot trends, find bottlenecks, and decide where to invest — whether that's more vehicles, better routes, or new customers."
|
|
24
|
-
}),
|
|
25
|
-
E && !T ? /* @__PURE__ */ b(t, {
|
|
26
|
-
className: "border-status-error-border",
|
|
27
|
-
children: /* @__PURE__ */ x(n, {
|
|
28
|
-
className: "p-6 text-center space-y-3",
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ b("p", {
|
|
31
|
-
className: "text-status-error-text font-medium",
|
|
32
|
-
children: "Couldn't load analytics"
|
|
33
|
-
}),
|
|
34
|
-
/* @__PURE__ */ b("p", {
|
|
35
|
-
className: "text-sm text-text-secondary",
|
|
36
|
-
children: E.message
|
|
37
|
-
}),
|
|
38
|
-
/* @__PURE__ */ b(o, {
|
|
39
|
-
variant: "outline",
|
|
40
|
-
onClick: D,
|
|
41
|
-
children: "Retry"
|
|
42
|
-
})
|
|
43
|
-
]
|
|
44
|
-
})
|
|
45
|
-
}) : T ? /* @__PURE__ */ b(_, {
|
|
46
|
-
columns: 5,
|
|
47
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ b(g, {}, t))
|
|
48
|
-
}) : /* @__PURE__ */ x(_, {
|
|
49
|
-
columns: 5,
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ b(v, {
|
|
52
|
-
label: "Total Orders",
|
|
53
|
-
value: w.overview.totalOrders.toLocaleString(),
|
|
54
|
-
icon: /* @__PURE__ */ b(l, { size: 20 })
|
|
55
|
-
}),
|
|
56
|
-
/* @__PURE__ */ b(v, {
|
|
57
|
-
treatment: "glass",
|
|
58
|
-
glow: !0,
|
|
59
|
-
label: "Revenue",
|
|
60
|
-
value: y(w.overview.totalRevenue),
|
|
61
|
-
icon: /* @__PURE__ */ b(c, { size: 20 })
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ b(v, {
|
|
64
|
-
label: "Active Vehicles",
|
|
65
|
-
value: w.overview.activeVehicles,
|
|
66
|
-
icon: /* @__PURE__ */ b(d, { size: 20 })
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ b(v, {
|
|
69
|
-
label: "On-Time Rate",
|
|
70
|
-
value: `${w.overview.onTimeDeliveryRate.toFixed(1)}%`,
|
|
71
|
-
icon: /* @__PURE__ */ b(u, { size: 20 }),
|
|
72
|
-
changeType: w.overview.onTimeDeliveryRate >= 90 ? "positive" : "neutral"
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ b(v, {
|
|
75
|
-
label: "Satisfaction",
|
|
76
|
-
value: w.overview.customerSatisfaction.toFixed(1),
|
|
77
|
-
icon: /* @__PURE__ */ b(f, { size: 20 }),
|
|
78
|
-
subtitle: "out of 5"
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
}),
|
|
82
|
-
/* @__PURE__ */ x("div", {
|
|
83
|
-
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
84
|
-
children: [/* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(r, { children: "Order Trends" }) }), /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b("div", {
|
|
85
|
-
className: "h-64 flex items-center justify-center bg-bg-sunken/50 rounded-lg",
|
|
86
|
-
children: /* @__PURE__ */ x("div", {
|
|
87
|
-
className: "text-center text-text-secondary",
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ b(s, {
|
|
90
|
-
size: 48,
|
|
91
|
-
className: "mx-auto mb-2 opacity-50"
|
|
92
|
-
}),
|
|
93
|
-
/* @__PURE__ */ b("p", { children: "Order trend chart" }),
|
|
94
|
-
/* @__PURE__ */ b("p", {
|
|
95
|
-
className: "text-xs",
|
|
96
|
-
children: "(Chart library integration needed)"
|
|
97
|
-
})
|
|
98
|
-
]
|
|
99
|
-
})
|
|
100
|
-
}), /* @__PURE__ */ b("div", {
|
|
101
|
-
className: "mt-4 grid grid-cols-2 sm:grid-cols-4 gap-2",
|
|
102
|
-
children: O.trends.slice(-4).map((e) => /* @__PURE__ */ x("div", {
|
|
103
|
-
className: "text-center p-2 bg-bg-sunken/50 rounded",
|
|
104
|
-
children: [/* @__PURE__ */ b("p", {
|
|
105
|
-
className: "text-xs text-text-secondary",
|
|
106
|
-
children: e.date.split("-").slice(1).join("/")
|
|
107
|
-
}), /* @__PURE__ */ b("p", {
|
|
108
|
-
className: "font-medium",
|
|
109
|
-
children: e.orders
|
|
110
|
-
})]
|
|
111
|
-
}, e.date))
|
|
112
|
-
})] })] }), /* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(r, { children: "Revenue Trends" }) }), /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b("div", {
|
|
113
|
-
className: "h-64 flex items-center justify-center bg-bg-sunken/50 rounded-lg",
|
|
114
|
-
children: /* @__PURE__ */ x("div", {
|
|
115
|
-
className: "text-center text-text-secondary",
|
|
116
|
-
children: [/* @__PURE__ */ b(u, {
|
|
117
|
-
size: 48,
|
|
118
|
-
className: "mx-auto mb-2 opacity-50"
|
|
119
|
-
}), /* @__PURE__ */ b("p", { children: "Revenue trend chart" })]
|
|
120
|
-
})
|
|
121
|
-
}), /* @__PURE__ */ b("div", {
|
|
122
|
-
className: "mt-4 grid grid-cols-2 sm:grid-cols-5 gap-2",
|
|
123
|
-
children: w.trends.revenue.map((e) => /* @__PURE__ */ x("div", {
|
|
124
|
-
className: "text-center p-2 bg-bg-sunken/50 rounded",
|
|
125
|
-
children: [/* @__PURE__ */ b("p", {
|
|
126
|
-
className: "text-xs text-text-secondary",
|
|
127
|
-
children: e.month
|
|
128
|
-
}), /* @__PURE__ */ x("p", {
|
|
129
|
-
className: "font-medium text-sm",
|
|
130
|
-
children: [y(e.revenue / 1e3), "k"]
|
|
131
|
-
})]
|
|
132
|
-
}, e.month))
|
|
133
|
-
})] })] })]
|
|
134
|
-
}),
|
|
135
|
-
/* @__PURE__ */ x("div", {
|
|
136
|
-
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
137
|
-
children: [
|
|
138
|
-
/* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(r, { children: "Orders by Status" }) }), /* @__PURE__ */ b(n, {
|
|
139
|
-
className: "space-y-3",
|
|
140
|
-
children: O.byStatus.filter((e) => e.count > 0).map(({ status: t, count: n }) => /* @__PURE__ */ x("div", {
|
|
141
|
-
className: "flex items-center justify-between",
|
|
142
|
-
children: [/* @__PURE__ */ b("span", {
|
|
143
|
-
className: "text-sm capitalize",
|
|
144
|
-
children: t.replace("_", " ")
|
|
145
|
-
}), /* @__PURE__ */ x("div", {
|
|
146
|
-
className: "flex items-center gap-2",
|
|
147
|
-
children: [/* @__PURE__ */ b(e, {
|
|
148
|
-
value: n / w.overview.totalOrders * 100,
|
|
149
|
-
className: "w-20 h-2"
|
|
150
|
-
}), /* @__PURE__ */ b("span", {
|
|
151
|
-
className: "font-medium w-8 text-right",
|
|
152
|
-
children: n
|
|
153
|
-
})]
|
|
154
|
-
})]
|
|
155
|
-
}, t))
|
|
156
|
-
})] }),
|
|
157
|
-
/* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(r, { children: "Fleet Performance" }) }), /* @__PURE__ */ x(n, {
|
|
158
|
-
className: "space-y-4",
|
|
159
|
-
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
|
|
160
|
-
className: "flex justify-between text-sm mb-1",
|
|
161
|
-
children: [/* @__PURE__ */ b("span", { children: "Vehicle Utilization" }), /* @__PURE__ */ x("span", { children: [k.vehicleUtilization.toFixed(0), "%"] })]
|
|
162
|
-
}), /* @__PURE__ */ b(e, { value: k.vehicleUtilization })] }), k.vehiclesByType.length > 0 && /* @__PURE__ */ x("div", {
|
|
163
|
-
className: "pt-2",
|
|
164
|
-
children: [/* @__PURE__ */ b("p", {
|
|
165
|
-
className: "text-sm text-text-secondary mb-2",
|
|
166
|
-
children: "Vehicles by Type"
|
|
167
|
-
}), k.vehiclesByType.map(({ type: e, count: t }) => /* @__PURE__ */ x("div", {
|
|
168
|
-
className: "flex justify-between text-sm py-1",
|
|
169
|
-
children: [/* @__PURE__ */ b("span", {
|
|
170
|
-
className: "capitalize",
|
|
171
|
-
children: e
|
|
172
|
-
}), /* @__PURE__ */ b("span", {
|
|
173
|
-
className: "font-medium",
|
|
174
|
-
children: t
|
|
175
|
-
})]
|
|
176
|
-
}, e))]
|
|
177
|
-
})]
|
|
178
|
-
})] }),
|
|
179
|
-
/* @__PURE__ */ x(S, {
|
|
180
|
-
className: "space-y-4",
|
|
181
|
-
children: [
|
|
182
|
-
/* @__PURE__ */ b("h2", {
|
|
183
|
-
className: "text-base font-semibold text-text-primary",
|
|
184
|
-
children: "Performance Metrics"
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
187
|
-
className: "text-sm text-text-secondary",
|
|
188
|
-
children: "On-Time Delivery"
|
|
189
|
-
}), /* @__PURE__ */ x("p", {
|
|
190
|
-
className: "text-2xl font-bold",
|
|
191
|
-
children: [w.performance.onTimeDelivery.toFixed(1), "%"]
|
|
192
|
-
})] }),
|
|
193
|
-
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
194
|
-
className: "text-sm text-text-secondary",
|
|
195
|
-
children: "Customer Satisfaction"
|
|
196
|
-
}), /* @__PURE__ */ x("p", {
|
|
197
|
-
className: "text-2xl font-bold",
|
|
198
|
-
children: [w.overview.customerSatisfaction.toFixed(1), "/5"]
|
|
199
|
-
})] }),
|
|
200
|
-
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
201
|
-
className: "text-sm text-text-secondary",
|
|
202
|
-
children: "Driver Ratings"
|
|
203
|
-
}), /* @__PURE__ */ x("p", {
|
|
204
|
-
className: "text-2xl font-bold",
|
|
205
|
-
children: [w.performance.driverRatings.toFixed(1), "/5"]
|
|
206
|
-
})] })
|
|
207
|
-
]
|
|
208
|
-
})
|
|
209
|
-
]
|
|
210
|
-
})
|
|
211
|
-
]
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
//#endregion
|
|
215
|
-
export { w as default };
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { ct as e, i as t, l as n, o as r, ot as i, s as a, u as o } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as s } from "./DataTable-XvUcTjwi.js";
|
|
3
|
-
import { t as c } from "./download-C5NbvVDc.js";
|
|
4
|
-
import { t as l } from "./plus-C_XZDwBz.js";
|
|
5
|
-
import { t as u } from "./refresh-cw-CfgN67l3.js";
|
|
6
|
-
import { t as d } from "./star-BpRlUZuU.js";
|
|
7
|
-
import { t as f } from "./users-CCrq-w0C.js";
|
|
8
|
-
import { n as p, r as m } from "./useCustomers-BPW4__PR.js";
|
|
9
|
-
import { i as h } from "./StatusBadge-C87mDpDP.js";
|
|
10
|
-
import { r as g } from "./formatters-BQr-aR5W.js";
|
|
11
|
-
import { useState as _ } from "react";
|
|
12
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
13
|
-
import { CTAOverflowMenu as b, EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
14
|
-
//#region src/movethewheels/pages/CustomersPage.tsx
|
|
15
|
-
function C() {
|
|
16
|
-
let { basePath: C, navigate: w } = i(), [T, E] = _(0), [D, O] = _(25), { customers: k, hasMore: A, isLoading: j, refetch: M } = m({
|
|
17
|
-
limit: D,
|
|
18
|
-
offset: T * D
|
|
19
|
-
}), { stats: N } = p(), P = (t) => w?.(e(C, t));
|
|
20
|
-
return /* @__PURE__ */ y(t, {
|
|
21
|
-
title: "Customers",
|
|
22
|
-
subtitle: `${N.total} customers`,
|
|
23
|
-
icon: /* @__PURE__ */ v(f, { size: 24 }),
|
|
24
|
-
headerActions: /* @__PURE__ */ v(b, {
|
|
25
|
-
primary: {
|
|
26
|
-
label: "Add Customer",
|
|
27
|
-
icon: /* @__PURE__ */ v(l, { size: 16 }),
|
|
28
|
-
onSelect: () => P("customers/new")
|
|
29
|
-
},
|
|
30
|
-
actions: [{
|
|
31
|
-
label: "Refresh",
|
|
32
|
-
icon: /* @__PURE__ */ v(u, { size: 16 }),
|
|
33
|
-
onSelect: () => M()
|
|
34
|
-
}, {
|
|
35
|
-
label: "Export",
|
|
36
|
-
icon: /* @__PURE__ */ v(c, { size: 16 }),
|
|
37
|
-
onSelect: () => P("import-export")
|
|
38
|
-
}]
|
|
39
|
-
}),
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ v(S, {
|
|
42
|
-
icon: /* @__PURE__ */ v(f, { size: 18 }),
|
|
43
|
-
children: "The businesses and individuals you deliver for. Keep contact details, locations and satisfaction ratings here, and open a customer to see their order history before booking the next shipment."
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ y(x, { children: [/* @__PURE__ */ v("p", {
|
|
46
|
-
className: "text-sm font-medium text-text-secondary",
|
|
47
|
-
children: "Customer base at a glance"
|
|
48
|
-
}), /* @__PURE__ */ y("div", {
|
|
49
|
-
className: "mt-3 grid grid-cols-3 gap-4",
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
52
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
53
|
-
children: N.total
|
|
54
|
-
}), /* @__PURE__ */ v("p", {
|
|
55
|
-
className: "text-xs text-text-secondary",
|
|
56
|
-
children: "Total customers"
|
|
57
|
-
})] }),
|
|
58
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
59
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
60
|
-
children: N.active
|
|
61
|
-
}), /* @__PURE__ */ v("p", {
|
|
62
|
-
className: "text-xs text-text-secondary",
|
|
63
|
-
children: "Active"
|
|
64
|
-
})] }),
|
|
65
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
66
|
-
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
67
|
-
children: N.b2b
|
|
68
|
-
}), /* @__PURE__ */ v("p", {
|
|
69
|
-
className: "text-xs text-text-secondary",
|
|
70
|
-
children: "Business accounts"
|
|
71
|
-
})] })
|
|
72
|
-
]
|
|
73
|
-
})] }),
|
|
74
|
-
/* @__PURE__ */ v(s, {
|
|
75
|
-
columns: [
|
|
76
|
-
{
|
|
77
|
-
id: "customer",
|
|
78
|
-
header: "Customer",
|
|
79
|
-
cell: (e) => /* @__PURE__ */ y("div", {
|
|
80
|
-
className: "flex items-center gap-3",
|
|
81
|
-
children: [/* @__PURE__ */ v(r, { children: /* @__PURE__ */ v(a, { children: e.name.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
82
|
-
className: "font-medium",
|
|
83
|
-
children: e.name
|
|
84
|
-
}), /* @__PURE__ */ v("p", {
|
|
85
|
-
className: "text-sm text-text-secondary",
|
|
86
|
-
children: e.email
|
|
87
|
-
})] })]
|
|
88
|
-
})
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
id: "type",
|
|
92
|
-
header: "Type",
|
|
93
|
-
accessorKey: "type",
|
|
94
|
-
cell: (e) => /* @__PURE__ */ v(h, { type: e.type })
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
id: "company",
|
|
98
|
-
header: "Company",
|
|
99
|
-
accessorKey: "company",
|
|
100
|
-
cell: (e) => e.company || "-"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
id: "phone",
|
|
104
|
-
header: "Phone",
|
|
105
|
-
accessorKey: "phone"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
id: "location",
|
|
109
|
-
header: "Location",
|
|
110
|
-
cell: (e) => `${e.address.city}, ${e.address.state}`
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
id: "rating",
|
|
114
|
-
header: "Rating",
|
|
115
|
-
cell: (e) => /* @__PURE__ */ y("div", {
|
|
116
|
-
className: "flex items-center gap-1",
|
|
117
|
-
children: [/* @__PURE__ */ v(d, {
|
|
118
|
-
size: 14,
|
|
119
|
-
className: "text-status-warning-text fill-current"
|
|
120
|
-
}), /* @__PURE__ */ v("span", { children: e.rating.toFixed(1) })]
|
|
121
|
-
})
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
id: "status",
|
|
125
|
-
header: "Status",
|
|
126
|
-
cell: (e) => /* @__PURE__ */ v(n, {
|
|
127
|
-
variant: e.isActive ? "default" : "secondary",
|
|
128
|
-
children: e.isActive ? "Active" : "Inactive"
|
|
129
|
-
})
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
id: "created",
|
|
133
|
-
header: "Created",
|
|
134
|
-
accessorKey: "createdAt",
|
|
135
|
-
sortable: !0,
|
|
136
|
-
cell: (e) => g(e.createdAt, "short")
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
data: k,
|
|
140
|
-
isLoading: j,
|
|
141
|
-
searchable: !0,
|
|
142
|
-
searchPlaceholder: "Search customers...",
|
|
143
|
-
searchFields: [
|
|
144
|
-
"name",
|
|
145
|
-
"email",
|
|
146
|
-
"company"
|
|
147
|
-
],
|
|
148
|
-
onRowClick: (e) => P(`customers/${e.id}`),
|
|
149
|
-
getRowId: (e) => e.id,
|
|
150
|
-
pageIndex: T,
|
|
151
|
-
pageSize: D,
|
|
152
|
-
onPageChange: E,
|
|
153
|
-
onPageSizeChange: (e) => {
|
|
154
|
-
O(e), E(0);
|
|
155
|
-
},
|
|
156
|
-
hasNextPage: A,
|
|
157
|
-
emptyIllustration: "empty-people",
|
|
158
|
-
emptyTitle: "No customers yet",
|
|
159
|
-
emptyDescription: "Add your first customer to start booking deliveries for them.",
|
|
160
|
-
emptyAction: /* @__PURE__ */ y(o, {
|
|
161
|
-
onClick: () => P("customers/new"),
|
|
162
|
-
children: [/* @__PURE__ */ v(l, {
|
|
163
|
-
size: 16,
|
|
164
|
-
className: "mr-1.5"
|
|
165
|
-
}), "Add Customer"]
|
|
166
|
-
})
|
|
167
|
-
})
|
|
168
|
-
]
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
//#endregion
|
|
172
|
-
export { C as default };
|