@burdenoff/microfe-movethewheels 2026.703.3 → 2026.703.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AIAssistantPage-C3cPsWt-.js → AIAssistantPage-D2gaEL1U.js} +16 -15
- package/dist/AnalyticsPage-DZMlEoBi.js +194 -0
- package/dist/CreateOrderPage-CWHx8yys.js +490 -0
- package/dist/CustomerDetailsPage-nR4oZ_ju.js +615 -0
- package/dist/CustomersPage-Bbvwvn8k.js +205 -0
- package/dist/DashboardPage-DrEhNf7N.js +542 -0
- package/dist/DataTable-CqMUD4er.js +340 -0
- package/dist/DocumentsCard-edDkgnJj.js +169 -0
- package/dist/DriverDetailsPage-whEMOWs9.js +490 -0
- package/dist/DriversPage-CHF2ZEzd.js +221 -0
- package/dist/FinancePage-Dn9GrW-1.js +175 -0
- package/dist/{FleetPage-DqkFi3s3.js → FleetPage-CrtGPy-p.js} +36 -35
- package/dist/{FormError-BlOjnXOq.js → FormError-BKcb_wT-.js} +1 -1
- package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-WYdwZomZ.js} +52 -72
- package/dist/InventoryPage-l5A1f753.js +259 -0
- package/dist/LiveTrackingPage-DhEaNKZ4.js +429 -0
- package/dist/MarketplacePage-B9RYOb1Y.js +426 -0
- package/dist/MetricCard-y3bWHKUQ.js +191 -0
- package/dist/Notice-DOO-tjpV.js +46 -0
- package/dist/OrderDetailsPage-CwYHwk1K.js +584 -0
- package/dist/OrdersListPage-DhZJoQeI.js +386 -0
- package/dist/{PageLayout-D4LDHJJq.js → PageLayout-BniRJaQ6.js} +1 -1
- package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-1Gm9JKy0.js} +56 -56
- package/dist/ProductsPage-C8sn-1tN.js +186 -0
- package/dist/ReportsPage-D1tb0dcz.js +377 -0
- package/dist/RouteDetailsPage-CkMyR9b_.js +610 -0
- package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-QkENzsE5.js} +58 -47
- package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-DV3_tU_X.js} +16 -38
- package/dist/Sparkline-K2RMJ58u.js +16729 -0
- package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-BNHXYvZx.js} +7 -7
- package/dist/TrackingPage-BZrg4RCu.js +368 -0
- package/dist/VehicleDetailsPage-D-8XPZ2G.js +393 -0
- package/dist/VehiclesPage-D5BELbtM.js +184 -0
- package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-Cmg-8Frn.js} +70 -70
- package/dist/WarehousesPage-C1Y1M867.js +182 -0
- package/dist/{arrow-left-n48Y-Wis.js → arrow-left-ClW4Isj7.js} +1 -1
- package/dist/arrow-right-CmKOmIkh.js +11 -0
- package/dist/arrow-up-BJijRLAZ.js +17 -0
- package/dist/{box-D9Pal4HM.js → box-BT3NsRQP.js} +1 -1
- package/dist/boxes-B_OGvQiW.js +54 -0
- package/dist/{chart-column-BFIJysDR.js → chart-column-DQTTdUPk.js} +1 -1
- package/dist/charts-Tj_PPTfA.js +2018 -0
- package/dist/chevron-left-B1rZyWWb.js +8 -0
- package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-BIcwUJZq.js} +1 -1
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{circle-alert-iY24lSlp.js → circle-alert-CNkuDNc6.js} +1 -1
- package/dist/circle-check-Cs1OVjtV.js +13 -0
- package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-C-p4eNwn.js} +1 -1
- package/dist/{clock-DJZtdl8u.js → clock-dRGG4rkF.js} +1 -1
- package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-B6RoYHHz.js} +1 -1
- package/dist/{download-DRXxoiQR.js → download-DP04iWTd.js} +1 -1
- package/dist/{file-text-DWWY6_f5.js → file-text-BuDx4hZp.js} +1 -1
- package/dist/{filter-DloLC2eE.js → filter-BD483_8g.js} +1 -1
- package/dist/{wrench-CANXWxF-.js → fuel-DLH1ag04.js} +3 -6
- package/dist/index.css +2 -0
- package/dist/index.js +150 -172
- package/dist/{map-CkJaULb2.js → map-DNQn9fyY.js} +1 -1
- package/dist/{map-pin-BGiCvyCs.js → map-pin-CqN1bbT1.js} +1 -1
- package/dist/mapMarkers-NCV9MRKR.js +28 -0
- package/dist/maps-yzLqiK_C.js +5070 -0
- package/dist/{navigation-D36prnAn.js → navigation-CgGUt2tR.js} +1 -1
- package/dist/{package-BChUzpJS.js → package-DmRF7iQD.js} +1 -1
- package/dist/{phone-Ac9s3mo_.js → phone-Cl32EXKW.js} +1 -1
- package/dist/{plus-Z76q-FZm.js → plus-DlANgOFx.js} +1 -1
- package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-rW59D4b7.js} +1 -1
- package/dist/route-CWjPrtAN.js +22 -0
- package/dist/{save-CojywNhG.js → save-UDlog7hg.js} +1 -1
- package/dist/{search-CDGefqb3.js → search-DNIG5Ck7.js} +1 -1
- package/dist/{square-pen-CopE9GmB.js → square-pen-BcfB3Grd.js} +1 -1
- package/dist/{star-nHlLjDKR.js → star-CVZHFwDx.js} +1 -1
- package/dist/{store-BR9Voi5E.js → store-bwnmCK9f.js} +1 -1
- package/dist/{trash-2-BKhar6Hs.js → trash-2-B80G12d4.js} +1 -1
- package/dist/{trending-up-Dohgd4t_.js → trending-up-CH4R4KOa.js} +1 -1
- package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-CmS8AUU6.js} +1 -1
- package/dist/{truck-C0v_hbLR.js → truck-9rLDncav.js} +1 -1
- package/dist/upload-DanJY1Vo.js +21 -0
- package/dist/{useAssistant-D4v3oxD3.js → useAssistant-CnEwkTLm.js} +11 -28
- package/dist/{useCustomers-BmTNGxiI.js → useCustomers-ChJao1ET.js} +30 -27
- package/dist/{useFleet-DKqXZ16m.js → useFleet-g5Yri0G8.js} +82 -70
- package/dist/{useImportExport-DHr-SWSw.js → useImportExport-MYwIT3rE.js} +1 -1
- package/dist/{useInventory-DkyiVY_A.js → useInventory-BSOn-R1c.js} +84 -39
- package/dist/{useOrders-Cfk1GLiq.js → useOrders-BSiqo61w.js} +59 -48
- package/dist/{useReports-CTqZr-AB.js → useReports-fWESfsF9.js} +41 -35
- package/dist/{useRoutes-BQWO607N.js → useRoutes-zD8Yp323.js} +50 -42
- package/dist/{useSettings-CkDH_-gM.js → useSettings-B1lsWeZ1.js} +6 -6
- package/dist/{useTracking-B-va1kO3.js → useTracking-BKG0I2ln.js} +3 -3
- package/dist/{user-jyFU3lXk.js → user-DU51el3m.js} +1 -1
- package/dist/user-check-IMhk-qkX.js +20 -0
- package/dist/{users-DZ-ilS6B.js → users-B8KhJBGg.js} +1 -1
- package/dist/{warehouse-6m5kXMLu.js → warehouse-CcMMioeY.js} +1 -1
- package/dist/wrench-Dg-sgH2e.js +8 -0
- package/dist/x-C4ObLVEa.js +11 -0
- package/package.json +5 -1
- package/src/movethewheels/components/DataTable.tsx +252 -84
- package/src/movethewheels/components/DocumentsCard.tsx +102 -0
- package/src/movethewheels/components/GlassPanel.tsx +71 -0
- package/src/movethewheels/components/MetricCard.tsx +171 -73
- package/src/movethewheels/components/Notice.tsx +61 -0
- package/src/movethewheels/components/StatusBadge.tsx +7 -6
- package/src/movethewheels/components/charts/ChartShell.tsx +78 -0
- package/src/movethewheels/components/charts/Sparkline.tsx +85 -0
- package/src/movethewheels/components/charts/StatusDonut.tsx +115 -0
- package/src/movethewheels/components/charts/TrendChart.tsx +179 -0
- package/src/movethewheels/components/charts/VolumeBar.tsx +97 -0
- package/src/movethewheels/components/charts/chartTokens.ts +43 -0
- package/src/movethewheels/components/charts/index.ts +9 -0
- package/src/movethewheels/components/index.ts +51 -1
- package/src/movethewheels/components/maps/LogisticsMap.tsx +94 -0
- package/src/movethewheels/components/maps/MapCanvas.tsx +118 -0
- package/src/movethewheels/components/maps/RouteMap.tsx +71 -0
- package/src/movethewheels/components/maps/TrackingMap.tsx +102 -0
- package/src/movethewheels/components/maps/index.ts +16 -0
- package/src/movethewheels/components/maps/leaflet-setup.ts +124 -0
- package/src/movethewheels/components/maps/map-markers.css +121 -0
- package/src/movethewheels/hooks/index.ts +9 -0
- package/src/movethewheels/hooks/useAnalytics.ts +109 -4
- package/src/movethewheels/hooks/useCustomers.ts +11 -4
- package/src/movethewheels/hooks/useEntityDocuments.ts +132 -0
- package/src/movethewheels/hooks/useFleet.ts +26 -7
- package/src/movethewheels/hooks/useInventory.ts +70 -7
- package/src/movethewheels/hooks/useOrders.ts +32 -2
- package/src/movethewheels/hooks/useReports.ts +14 -4
- package/src/movethewheels/hooks/useRoutes.ts +20 -3
- package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
- package/src/movethewheels/pages/CreateOrderPage.tsx +48 -20
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
- package/src/movethewheels/pages/CustomersPage.tsx +53 -28
- package/src/movethewheels/pages/DashboardPage.tsx +238 -12
- package/src/movethewheels/pages/DriverDetailsPage.tsx +17 -31
- package/src/movethewheels/pages/DriversPage.tsx +59 -31
- package/src/movethewheels/pages/FinancePage.tsx +103 -82
- package/src/movethewheels/pages/InventoryPage.tsx +15 -3
- package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
- package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
- package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
- package/src/movethewheels/pages/OrdersListPage.tsx +118 -47
- package/src/movethewheels/pages/ProductsPage.tsx +52 -28
- package/src/movethewheels/pages/ReportsPage.tsx +88 -4
- package/src/movethewheels/pages/RouteDetailsPage.tsx +119 -19
- package/src/movethewheels/pages/RoutesPage.tsx +22 -6
- package/src/movethewheels/pages/SettingsPage.tsx +5 -21
- package/src/movethewheels/pages/TrackingPage.tsx +76 -6
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -34
- package/src/movethewheels/pages/VehiclesPage.tsx +58 -27
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/WarehousesPage.tsx +47 -36
- package/src/movethewheels/types/index.ts +9 -1
- package/src/movethewheels/utils/download.ts +62 -0
- package/src/movethewheels/utils/mapMarkers.ts +58 -0
- package/dist/AnalyticsPage-Dz6g2MvK.js +0 -215
- package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
- package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
- package/dist/CustomersPage-BKxMS1AV.js +0 -161
- package/dist/DashboardPage-BVjQi0EB.js +0 -387
- package/dist/DataTable-DmciIKKM.js +0 -249
- package/dist/DriverDetailsPage-CN3WQ0B9.js +0 -507
- package/dist/DriversPage-CH9rjQC-.js +0 -165
- package/dist/FinancePage-DEDykSOP.js +0 -158
- package/dist/InventoryPage-e0ze63iX.js +0 -253
- package/dist/LiveTrackingPage-DCX-K-LR.js +0 -379
- package/dist/MarketplacePage-CIQ97_zp.js +0 -247
- package/dist/MetricCard-BY0QrMD4.js +0 -146
- package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
- package/dist/OrdersListPage-Cn90P1Xx.js +0 -307
- package/dist/ProductsPage-QJfHHpqB.js +0 -169
- package/dist/ReportsPage-Zp53q3_8.js +0 -284
- package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
- package/dist/TrackingPage-W-jtdM3Y.js +0 -325
- package/dist/VehicleDetailsPage-Bceo5oz3.js +0 -410
- package/dist/VehiclesPage-ApKThYeG.js +0 -165
- package/dist/WarehousesPage-DCbXXXWE.js +0 -162
- package/dist/useAnalytics-DS8n0xgg.js +0 -297
- /package/dist/{formatters-CF2S2l1m.js → formatters-FWJDwTFv.js} +0 -0
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { d as e, f as t, g as n, h as r, i, lt as a, u as o } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as s } from "./dollar-sign-CgKQRz_e.js";
|
|
3
|
-
import { t as c } from "./download-DRXxoiQR.js";
|
|
4
|
-
import { t as l } from "./file-text-DWWY6_f5.js";
|
|
5
|
-
import { t as u } from "./trending-up-Dohgd4t_.js";
|
|
6
|
-
import { n as d } from "./useOrders-Cfk1GLiq.js";
|
|
7
|
-
import { t as f } from "./useAnalytics-DS8n0xgg.js";
|
|
8
|
-
import { r as p, t as m } from "./MetricCard-BY0QrMD4.js";
|
|
9
|
-
import { n as h } from "./formatters-CF2S2l1m.js";
|
|
10
|
-
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
|
-
import { EmphasisPanel as v, IllustratedEmptyState as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
|
|
12
|
-
//#region node_modules/lucide-react/dist/esm/icons/credit-card.js
|
|
13
|
-
var x = 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 S() {
|
|
30
|
-
let { analytics: a } = f(), { stats: S } = d(), C = S.totalRevenue * .15, w = S.totalRevenue * .85;
|
|
31
|
-
return /* @__PURE__ */ _(i, {
|
|
32
|
-
title: "Finance",
|
|
33
|
-
subtitle: "Financial overview and reports",
|
|
34
|
-
icon: /* @__PURE__ */ g(s, { size: 24 }),
|
|
35
|
-
headerActions: /* @__PURE__ */ _("div", {
|
|
36
|
-
className: "flex gap-2",
|
|
37
|
-
children: [/* @__PURE__ */ _(o, {
|
|
38
|
-
variant: "outline",
|
|
39
|
-
children: [/* @__PURE__ */ g(l, { size: 16 }), " Invoices"]
|
|
40
|
-
}), /* @__PURE__ */ _(o, {
|
|
41
|
-
variant: "outline",
|
|
42
|
-
children: [/* @__PURE__ */ g(c, { size: 16 }), " Export"]
|
|
43
|
-
})]
|
|
44
|
-
}),
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ g(b, {
|
|
47
|
-
icon: /* @__PURE__ */ g(s, { size: 18 }),
|
|
48
|
-
children: "Follow the money behind your deliveries. See revenue earned, what's been collected versus still owed, and average order value — use it to chase pending payments, forecast cash flow, and confirm which shipments have actually been paid for."
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ _(p, {
|
|
51
|
-
columns: 4,
|
|
52
|
-
children: [
|
|
53
|
-
/* @__PURE__ */ g(m, {
|
|
54
|
-
treatment: "glass",
|
|
55
|
-
glow: !0,
|
|
56
|
-
label: "Total Revenue",
|
|
57
|
-
value: h(a.overview.totalRevenue),
|
|
58
|
-
icon: /* @__PURE__ */ g(s, { size: 20 }),
|
|
59
|
-
change: "+12.5%",
|
|
60
|
-
changeType: "positive",
|
|
61
|
-
trend: "up"
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ g(m, {
|
|
64
|
-
label: "Completed",
|
|
65
|
-
value: h(w),
|
|
66
|
-
icon: /* @__PURE__ */ g(u, { size: 20 }),
|
|
67
|
-
changeType: "positive"
|
|
68
|
-
}),
|
|
69
|
-
/* @__PURE__ */ g(m, {
|
|
70
|
-
label: "Pending",
|
|
71
|
-
value: h(C),
|
|
72
|
-
icon: /* @__PURE__ */ g(x, { size: 20 }),
|
|
73
|
-
changeType: "neutral"
|
|
74
|
-
}),
|
|
75
|
-
/* @__PURE__ */ g(m, {
|
|
76
|
-
label: "Avg Order Value",
|
|
77
|
-
value: h(S.avgOrderValue),
|
|
78
|
-
icon: /* @__PURE__ */ g(s, { size: 20 })
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
}),
|
|
82
|
-
/* @__PURE__ */ _("div", {
|
|
83
|
-
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
84
|
-
children: [/* @__PURE__ */ _(e, { children: [/* @__PURE__ */ g(r, { children: /* @__PURE__ */ g(n, { children: "Revenue by Month" }) }), /* @__PURE__ */ g(t, { children: /* @__PURE__ */ g("div", {
|
|
85
|
-
className: "space-y-4",
|
|
86
|
-
children: a.trends.revenue.map((e) => /* @__PURE__ */ _("div", {
|
|
87
|
-
className: "flex items-center justify-between p-3 bg-bg-sunken/50 rounded-lg",
|
|
88
|
-
children: [/* @__PURE__ */ _("span", {
|
|
89
|
-
className: "font-medium",
|
|
90
|
-
children: [e.month, " 2024"]
|
|
91
|
-
}), /* @__PURE__ */ g("span", {
|
|
92
|
-
className: "text-lg font-bold",
|
|
93
|
-
children: h(e.revenue)
|
|
94
|
-
})]
|
|
95
|
-
}, e.month))
|
|
96
|
-
}) })] }), /* @__PURE__ */ _(v, {
|
|
97
|
-
className: "space-y-4",
|
|
98
|
-
children: [/* @__PURE__ */ g("h2", {
|
|
99
|
-
className: "text-base font-semibold text-text-primary",
|
|
100
|
-
children: "Payment Status"
|
|
101
|
-
}), /* @__PURE__ */ _("div", {
|
|
102
|
-
className: "space-y-4",
|
|
103
|
-
children: [/* @__PURE__ */ _("div", {
|
|
104
|
-
className: "flex items-center justify-between p-4 bg-status-success-bg/10 rounded-lg",
|
|
105
|
-
children: [/* @__PURE__ */ _("div", {
|
|
106
|
-
className: "flex items-center gap-3",
|
|
107
|
-
children: [/* @__PURE__ */ g("div", {
|
|
108
|
-
className: "w-10 h-10 rounded-full bg-status-success-bg/20 flex items-center justify-center",
|
|
109
|
-
children: /* @__PURE__ */ g(u, {
|
|
110
|
-
size: 20,
|
|
111
|
-
className: "text-status-success-text"
|
|
112
|
-
})
|
|
113
|
-
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
114
|
-
className: "font-medium",
|
|
115
|
-
children: "Paid"
|
|
116
|
-
}), /* @__PURE__ */ _("p", {
|
|
117
|
-
className: "text-sm text-text-secondary",
|
|
118
|
-
children: [S.byStatus.delivered, " orders"]
|
|
119
|
-
})] })]
|
|
120
|
-
}), /* @__PURE__ */ g("span", {
|
|
121
|
-
className: "text-xl font-bold text-status-success-text",
|
|
122
|
-
children: h(w)
|
|
123
|
-
})]
|
|
124
|
-
}), /* @__PURE__ */ _("div", {
|
|
125
|
-
className: "flex items-center justify-between p-4 bg-status-warning-bg/10 rounded-lg",
|
|
126
|
-
children: [/* @__PURE__ */ _("div", {
|
|
127
|
-
className: "flex items-center gap-3",
|
|
128
|
-
children: [/* @__PURE__ */ g("div", {
|
|
129
|
-
className: "w-10 h-10 rounded-full bg-status-warning-bg/20 flex items-center justify-center",
|
|
130
|
-
children: /* @__PURE__ */ g(x, {
|
|
131
|
-
size: 20,
|
|
132
|
-
className: "text-status-warning-text"
|
|
133
|
-
})
|
|
134
|
-
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
135
|
-
className: "font-medium",
|
|
136
|
-
children: "Pending"
|
|
137
|
-
}), /* @__PURE__ */ _("p", {
|
|
138
|
-
className: "text-sm text-text-secondary",
|
|
139
|
-
children: [S.byStatus.pending + S.byStatus.in_transit, " orders"]
|
|
140
|
-
})] })]
|
|
141
|
-
}), /* @__PURE__ */ g("span", {
|
|
142
|
-
className: "text-xl font-bold text-status-warning-text",
|
|
143
|
-
children: h(C)
|
|
144
|
-
})]
|
|
145
|
-
})]
|
|
146
|
-
})]
|
|
147
|
-
})]
|
|
148
|
-
}),
|
|
149
|
-
/* @__PURE__ */ _(e, { children: [/* @__PURE__ */ g(r, { children: /* @__PURE__ */ g(n, { children: "Recent Transactions" }) }), /* @__PURE__ */ g(t, { children: /* @__PURE__ */ g(y, {
|
|
150
|
-
illustration: "empty-data",
|
|
151
|
-
title: "No transactions yet",
|
|
152
|
-
description: "Once payments are processed, your transaction history will appear here. Connect a payment gateway to start recording transactions."
|
|
153
|
-
}) })] })
|
|
154
|
-
]
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
//#endregion
|
|
158
|
-
export { S 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-EMIIyyJ1.js";
|
|
3
|
-
import { t as u } from "./package-BChUzpJS.js";
|
|
4
|
-
import { t as d } from "./plus-Z76q-FZm.js";
|
|
5
|
-
import { t as f } from "./triangle-alert-i-XQL9Rd.js";
|
|
6
|
-
import { t as p } from "./warehouse-6m5kXMLu.js";
|
|
7
|
-
import { n as m, t as h } from "./useInventory-DkyiVY_A.js";
|
|
8
|
-
import { n as g, r as _, t as v } from "./MetricCard-BY0QrMD4.js";
|
|
9
|
-
import { n as y } from "./formatters-CF2S2l1m.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 };
|