@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,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 };
|