@burdenoff/microfe-movethewheels 2026.703.3 → 2026.703.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AIAssistantPage-C3cPsWt-.js → AIAssistantPage-3YOnHO9Y.js} +3 -3
- package/dist/{AnalyticsPage-Dz6g2MvK.js → AnalyticsPage-CMpI1070.js} +11 -11
- package/dist/CreateOrderPage-DRAgGo9i.js +490 -0
- package/dist/CustomerDetailsPage-BCeMmOFe.js +615 -0
- package/dist/{CustomersPage-BKxMS1AV.js → CustomersPage-CaNBMXmM.js} +64 -53
- package/dist/{DashboardPage-BVjQi0EB.js → DashboardPage-DIKlXde3.js} +16 -16
- package/dist/DataTable-XvUcTjwi.js +340 -0
- package/dist/DocumentsCard-U2lSe-cn.js +169 -0
- package/dist/{DriverDetailsPage-CN3WQ0B9.js → DriverDetailsPage-BQrYd_Lp.js} +178 -195
- package/dist/{DriversPage-CH9rjQC-.js → DriversPage-PYmdFiby.js} +65 -54
- package/dist/FinancePage-Cwh9Bw4M.js +136 -0
- package/dist/{FleetPage-DqkFi3s3.js → FleetPage-3ZHsB-TN.js} +23 -22
- package/dist/{FormError-BlOjnXOq.js → FormError-cuLV2jVD.js} +1 -1
- package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-C6f7DqhM.js} +50 -70
- package/dist/{InventoryPage-e0ze63iX.js → InventoryPage-DpiqVu1v.js} +8 -8
- package/dist/{LiveTrackingPage-DCX-K-LR.js → LiveTrackingPage-FAzzlVnX.js} +9 -9
- package/dist/MarketplacePage-Bh_2ns4v.js +426 -0
- package/dist/Notice-CSoDYKw9.js +46 -0
- package/dist/OrderDetailsPage-zCj0lW0j.js +584 -0
- package/dist/{OrdersListPage-Cn90P1Xx.js → OrdersListPage-CAMsuUck.js} +166 -89
- package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-wsxAQkA0.js} +12 -12
- package/dist/{ProductsPage-QJfHHpqB.js → ProductsPage-DC5qDLfz.js} +60 -49
- package/dist/ReportsPage-BwUJ37eO.js +356 -0
- package/dist/RouteDetailsPage-DyMJE9AS.js +583 -0
- package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-Dtc669yc.js} +57 -46
- package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-CpH9xhQg.js} +5 -27
- package/dist/{TrackingPage-W-jtdM3Y.js → TrackingPage-DaNEFG_h.js} +10 -10
- package/dist/{VehicleDetailsPage-Bceo5oz3.js → VehicleDetailsPage-DldYNsYV.js} +125 -142
- package/dist/{VehiclesPage-ApKThYeG.js → VehiclesPage-BFw13iMt.js} +61 -50
- package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-CMG7or6G.js} +17 -17
- package/dist/{WarehousesPage-DCbXXXWE.js → WarehousesPage-Wkytnt86.js} +58 -47
- package/dist/arrow-right-Q3XQpTPR.js +11 -0
- package/dist/arrow-up-xNF1zJUG.js +17 -0
- package/dist/chevron-left-B2_r0Elx.js +8 -0
- package/dist/{wrench-CANXWxF-.js → fuel-B6_lnKDs.js} +2 -5
- package/dist/index.js +163 -174
- package/dist/upload-CHZofOqb.js +21 -0
- package/dist/{useAnalytics-DS8n0xgg.js → useAnalytics-D7HW2XRb.js} +52 -2
- package/dist/{useCustomers-BmTNGxiI.js → useCustomers-BPW4__PR.js} +29 -26
- package/dist/{useFleet-DKqXZ16m.js → useFleet-ChBkxAd6.js} +81 -69
- package/dist/{useInventory-DkyiVY_A.js → useInventory-CAAVMRp6.js} +83 -38
- package/dist/{useOrders-Cfk1GLiq.js → useOrders-B465S2nt.js} +58 -47
- package/dist/{useReports-CTqZr-AB.js → useReports-jQ3GpNOm.js} +40 -34
- package/dist/{useRoutes-BQWO607N.js → useRoutes-hS3d5-xr.js} +49 -41
- package/dist/{useTracking-B-va1kO3.js → useTracking-RjGz9PZG.js} +2 -2
- package/dist/user-check-BEKRCi7v.js +20 -0
- package/dist/wrench-q_rgJfaP.js +8 -0
- package/dist/x-tMeDMcCw.js +11 -0
- package/package.json +1 -1
- package/src/movethewheels/components/DataTable.tsx +252 -84
- package/src/movethewheels/components/DocumentsCard.tsx +102 -0
- package/src/movethewheels/components/Notice.tsx +61 -0
- package/src/movethewheels/components/index.ts +7 -0
- package/src/movethewheels/hooks/index.ts +9 -0
- package/src/movethewheels/hooks/useAnalytics.ts +95 -0
- package/src/movethewheels/hooks/useCustomers.ts +11 -4
- package/src/movethewheels/hooks/useEntityDocuments.ts +132 -0
- package/src/movethewheels/hooks/useFleet.ts +26 -7
- package/src/movethewheels/hooks/useInventory.ts +70 -7
- package/src/movethewheels/hooks/useOrders.ts +32 -2
- package/src/movethewheels/hooks/useReports.ts +14 -4
- package/src/movethewheels/hooks/useRoutes.ts +20 -3
- package/src/movethewheels/pages/AnalyticsPage.tsx +2 -2
- package/src/movethewheels/pages/CreateOrderPage.tsx +44 -16
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
- package/src/movethewheels/pages/CustomersPage.tsx +27 -11
- package/src/movethewheels/pages/DriverDetailsPage.tsx +16 -30
- package/src/movethewheels/pages/DriversPage.tsx +26 -9
- package/src/movethewheels/pages/FinancePage.tsx +67 -84
- package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
- package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
- package/src/movethewheels/pages/OrdersListPage.tsx +76 -13
- package/src/movethewheels/pages/ProductsPage.tsx +27 -7
- package/src/movethewheels/pages/ReportsPage.tsx +65 -4
- package/src/movethewheels/pages/RouteDetailsPage.tsx +74 -13
- package/src/movethewheels/pages/RoutesPage.tsx +22 -6
- package/src/movethewheels/pages/SettingsPage.tsx +3 -19
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +3 -33
- package/src/movethewheels/pages/VehiclesPage.tsx +26 -5
- package/src/movethewheels/pages/WarehousesPage.tsx +22 -17
- package/src/movethewheels/types/index.ts +8 -0
- package/src/movethewheels/utils/download.ts +62 -0
- package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
- package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
- package/dist/DataTable-DmciIKKM.js +0 -249
- package/dist/FinancePage-DEDykSOP.js +0 -158
- package/dist/MarketplacePage-CIQ97_zp.js +0 -247
- package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
- package/dist/ReportsPage-Zp53q3_8.js +0 -284
- package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
- /package/dist/{MetricCard-BY0QrMD4.js → MetricCard-CVBVpu7o.js} +0 -0
- /package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-C87mDpDP.js} +0 -0
- /package/dist/{box-D9Pal4HM.js → box-Eu05PXDh.js} +0 -0
- /package/dist/{chart-column-BFIJysDR.js → chart-column-ouzgxIv_.js} +0 -0
- /package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-eV4LjaSi.js} +0 -0
- /package/dist/{circle-alert-iY24lSlp.js → circle-alert-Bzh2DBSF.js} +0 -0
- /package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-CGMSpQmD.js} +0 -0
- /package/dist/{clock-DJZtdl8u.js → clock-Bl3ptexL.js} +0 -0
- /package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-CAVU95SO.js} +0 -0
- /package/dist/{download-DRXxoiQR.js → download-C5NbvVDc.js} +0 -0
- /package/dist/{file-text-DWWY6_f5.js → file-text-D-1uvLZG.js} +0 -0
- /package/dist/{filter-DloLC2eE.js → filter-DUfUg6BO.js} +0 -0
- /package/dist/{formatters-CF2S2l1m.js → formatters-BQr-aR5W.js} +0 -0
- /package/dist/{map-CkJaULb2.js → map-C-M-FQLR.js} +0 -0
- /package/dist/{map-pin-BGiCvyCs.js → map-pin-Dznl5l40.js} +0 -0
- /package/dist/{navigation-D36prnAn.js → navigation-BJSJl-VG.js} +0 -0
- /package/dist/{package-BChUzpJS.js → package-CcRttV2N.js} +0 -0
- /package/dist/{phone-Ac9s3mo_.js → phone-DVSZHt_j.js} +0 -0
- /package/dist/{plus-Z76q-FZm.js → plus-C_XZDwBz.js} +0 -0
- /package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-CfgN67l3.js} +0 -0
- /package/dist/{save-CojywNhG.js → save-DJE8Fpdv.js} +0 -0
- /package/dist/{search-CDGefqb3.js → search-D_VyGcZT.js} +0 -0
- /package/dist/{square-pen-CopE9GmB.js → square-pen-D-6JYrVQ.js} +0 -0
- /package/dist/{star-nHlLjDKR.js → star-BpRlUZuU.js} +0 -0
- /package/dist/{store-BR9Voi5E.js → store-B-8HMuyZ.js} +0 -0
- /package/dist/{trash-2-BKhar6Hs.js → trash-2-8vmv-XV_.js} +0 -0
- /package/dist/{trending-up-Dohgd4t_.js → trending-up-Dz6PqPRj.js} +0 -0
- /package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-D7Y3J_4z.js} +0 -0
- /package/dist/{truck-C0v_hbLR.js → truck-D-y2IDzv.js} +0 -0
- /package/dist/{useAssistant-D4v3oxD3.js → useAssistant-DVW4QgQb.js} +0 -0
- /package/dist/{useImportExport-DHr-SWSw.js → useImportExport-DrPDHEDK.js} +0 -0
- /package/dist/{useSettings-CkDH_-gM.js → useSettings-BB8X2RLh.js} +0 -0
- /package/dist/{user-jyFU3lXk.js → user-DzfTn4dE.js} +0 -0
- /package/dist/{users-DZ-ilS6B.js → users-CCrq-w0C.js} +0 -0
- /package/dist/{warehouse-6m5kXMLu.js → warehouse-CaqfmMKh.js} +0 -0
|
@@ -1,80 +1,84 @@
|
|
|
1
1
|
import { M as e, ct as t, i as n, ot as r } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as i } from "./DataTable-
|
|
3
|
-
import { t as a } from "./download-
|
|
4
|
-
import { t as o } from "./plus-
|
|
5
|
-
import { t as s } from "./refresh-cw-
|
|
6
|
-
import { t as c } from "./truck-
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { t as i } from "./DataTable-XvUcTjwi.js";
|
|
3
|
+
import { t as a } from "./download-C5NbvVDc.js";
|
|
4
|
+
import { t as o } from "./plus-C_XZDwBz.js";
|
|
5
|
+
import { t as s } from "./refresh-cw-CfgN67l3.js";
|
|
6
|
+
import { t as c } from "./truck-D-y2IDzv.js";
|
|
7
|
+
import { i as l, o as u } from "./useFleet-ChBkxAd6.js";
|
|
8
|
+
import { a as d, r as f } from "./StatusBadge-C87mDpDP.js";
|
|
9
|
+
import { useState as p } from "react";
|
|
10
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
11
|
+
import { CTAOverflowMenu as g, EmphasisPanel as _, PagePurpose as v } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
//#region src/movethewheels/pages/VehiclesPage.tsx
|
|
12
|
-
function
|
|
13
|
-
let { basePath:
|
|
14
|
-
|
|
13
|
+
function y() {
|
|
14
|
+
let { basePath: y, navigate: b } = r(), [x, S] = p(0), [C, w] = p(25), { vehicles: T, isLoading: E, refetch: D } = u({
|
|
15
|
+
limit: C,
|
|
16
|
+
offset: x * C
|
|
17
|
+
}), { stats: O } = l(), k = O.totalVehicles, A = (e) => {
|
|
18
|
+
b && b(t(y, e));
|
|
15
19
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ h(n, {
|
|
17
21
|
title: "Vehicles",
|
|
18
|
-
subtitle: `${
|
|
19
|
-
icon: /* @__PURE__ */
|
|
20
|
-
headerActions: /* @__PURE__ */
|
|
22
|
+
subtitle: `${k} vehicles in fleet`,
|
|
23
|
+
icon: /* @__PURE__ */ m(c, { size: 24 }),
|
|
24
|
+
headerActions: /* @__PURE__ */ m(g, {
|
|
21
25
|
primary: {
|
|
22
26
|
label: "Add Vehicle",
|
|
23
|
-
icon: /* @__PURE__ */
|
|
24
|
-
onSelect: () =>
|
|
27
|
+
icon: /* @__PURE__ */ m(o, { size: 16 }),
|
|
28
|
+
onSelect: () => A("fleet/vehicles/new")
|
|
25
29
|
},
|
|
26
30
|
actions: [{
|
|
27
31
|
label: "Refresh",
|
|
28
|
-
icon: /* @__PURE__ */
|
|
29
|
-
onSelect: () =>
|
|
32
|
+
icon: /* @__PURE__ */ m(s, { size: 16 }),
|
|
33
|
+
onSelect: () => D()
|
|
30
34
|
}, {
|
|
31
35
|
label: "Export",
|
|
32
|
-
icon: /* @__PURE__ */
|
|
33
|
-
onSelect: () =>
|
|
36
|
+
icon: /* @__PURE__ */ m(a, { size: 16 }),
|
|
37
|
+
onSelect: () => A("import-export")
|
|
34
38
|
}]
|
|
35
39
|
}),
|
|
36
40
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
icon: /* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ m(v, {
|
|
42
|
+
icon: /* @__PURE__ */ m(c, { size: 18 }),
|
|
39
43
|
children: "Every truck, van and bike in your fleet. Monitor capacity, fuel level, mileage and maintenance status here so you always know which vehicles are road-ready before dispatching an order."
|
|
40
44
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ h(_, { children: [/* @__PURE__ */ m("p", {
|
|
42
46
|
className: "text-sm font-medium text-text-secondary",
|
|
43
47
|
children: "Fleet at a glance"
|
|
44
|
-
}), /* @__PURE__ */
|
|
48
|
+
}), /* @__PURE__ */ h("div", {
|
|
45
49
|
className: "mt-3 grid grid-cols-3 gap-4",
|
|
46
50
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
48
52
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
49
|
-
children:
|
|
50
|
-
}), /* @__PURE__ */
|
|
53
|
+
children: k
|
|
54
|
+
}), /* @__PURE__ */ m("p", {
|
|
51
55
|
className: "text-xs text-text-secondary",
|
|
52
56
|
children: "Total vehicles"
|
|
53
57
|
})] }),
|
|
54
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
55
59
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
56
|
-
children:
|
|
57
|
-
}), /* @__PURE__ */
|
|
60
|
+
children: O.vehiclesByStatus.available
|
|
61
|
+
}), /* @__PURE__ */ m("p", {
|
|
58
62
|
className: "text-xs text-text-secondary",
|
|
59
63
|
children: "Available now"
|
|
60
64
|
})] }),
|
|
61
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
62
66
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
63
|
-
children:
|
|
64
|
-
}), /* @__PURE__ */
|
|
67
|
+
children: O.vehiclesByStatus.maintenance
|
|
68
|
+
}), /* @__PURE__ */ m("p", {
|
|
65
69
|
className: "text-xs text-text-secondary",
|
|
66
70
|
children: "In maintenance"
|
|
67
71
|
})] })
|
|
68
72
|
]
|
|
69
73
|
})] }),
|
|
70
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ m(i, {
|
|
71
75
|
columns: [
|
|
72
76
|
{
|
|
73
77
|
id: "vehicleNumber",
|
|
74
78
|
header: "Vehicle #",
|
|
75
79
|
accessorKey: "vehicleNumber",
|
|
76
80
|
sortable: !0,
|
|
77
|
-
cell: (e) => /* @__PURE__ */
|
|
81
|
+
cell: (e) => /* @__PURE__ */ m("span", {
|
|
78
82
|
className: "font-medium",
|
|
79
83
|
children: e.vehicleNumber
|
|
80
84
|
})
|
|
@@ -83,19 +87,19 @@ function _() {
|
|
|
83
87
|
id: "type",
|
|
84
88
|
header: "Type",
|
|
85
89
|
accessorKey: "type",
|
|
86
|
-
cell: (e) => /* @__PURE__ */
|
|
90
|
+
cell: (e) => /* @__PURE__ */ m(d, { type: e.type })
|
|
87
91
|
},
|
|
88
92
|
{
|
|
89
93
|
id: "details",
|
|
90
94
|
header: "Vehicle",
|
|
91
|
-
cell: (e) => /* @__PURE__ */
|
|
95
|
+
cell: (e) => /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("p", {
|
|
92
96
|
className: "font-medium",
|
|
93
97
|
children: [
|
|
94
98
|
e.make,
|
|
95
99
|
" ",
|
|
96
100
|
e.model
|
|
97
101
|
]
|
|
98
|
-
}), /* @__PURE__ */
|
|
102
|
+
}), /* @__PURE__ */ m("p", {
|
|
99
103
|
className: "text-sm text-text-secondary",
|
|
100
104
|
children: e.year
|
|
101
105
|
})] })
|
|
@@ -105,7 +109,7 @@ function _() {
|
|
|
105
109
|
header: "Status",
|
|
106
110
|
accessorKey: "status",
|
|
107
111
|
sortable: !0,
|
|
108
|
-
cell: (e) => /* @__PURE__ */ f
|
|
112
|
+
cell: (e) => /* @__PURE__ */ m(f, {
|
|
109
113
|
status: e.status,
|
|
110
114
|
type: "vehicle"
|
|
111
115
|
})
|
|
@@ -113,9 +117,9 @@ function _() {
|
|
|
113
117
|
{
|
|
114
118
|
id: "capacity",
|
|
115
119
|
header: "Capacity",
|
|
116
|
-
cell: (e) => /* @__PURE__ */
|
|
120
|
+
cell: (e) => /* @__PURE__ */ h("div", {
|
|
117
121
|
className: "text-sm",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ h("p", { children: [e.capacity.weight, " kg"] }), /* @__PURE__ */ h("p", {
|
|
119
123
|
className: "text-text-secondary",
|
|
120
124
|
children: [e.capacity.volume, " m³"]
|
|
121
125
|
})]
|
|
@@ -124,12 +128,12 @@ function _() {
|
|
|
124
128
|
{
|
|
125
129
|
id: "fuel",
|
|
126
130
|
header: "Fuel Level",
|
|
127
|
-
cell: (t) => t.fuelLevel === void 0 ? "-" : /* @__PURE__ */
|
|
131
|
+
cell: (t) => t.fuelLevel === void 0 ? "-" : /* @__PURE__ */ h("div", {
|
|
128
132
|
className: "flex items-center gap-2",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ m(e, {
|
|
130
134
|
value: t.fuelLevel,
|
|
131
135
|
className: "w-16 h-2"
|
|
132
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ h("span", {
|
|
133
137
|
className: "text-sm",
|
|
134
138
|
children: [t.fuelLevel, "%"]
|
|
135
139
|
})]
|
|
@@ -143,8 +147,8 @@ function _() {
|
|
|
143
147
|
cell: (e) => e.mileage ? `${e.mileage.toLocaleString()} mi` : "-"
|
|
144
148
|
}
|
|
145
149
|
],
|
|
146
|
-
data:
|
|
147
|
-
isLoading:
|
|
150
|
+
data: T,
|
|
151
|
+
isLoading: E,
|
|
148
152
|
searchable: !0,
|
|
149
153
|
searchPlaceholder: "Search vehicles...",
|
|
150
154
|
searchFields: [
|
|
@@ -152,8 +156,15 @@ function _() {
|
|
|
152
156
|
"make",
|
|
153
157
|
"model"
|
|
154
158
|
],
|
|
155
|
-
onRowClick: (e) =>
|
|
159
|
+
onRowClick: (e) => A(`fleet/vehicles/${e.id}`),
|
|
156
160
|
getRowId: (e) => e.id,
|
|
161
|
+
pageIndex: x,
|
|
162
|
+
pageSize: C,
|
|
163
|
+
onPageChange: S,
|
|
164
|
+
onPageSizeChange: (e) => {
|
|
165
|
+
w(e), S(0);
|
|
166
|
+
},
|
|
167
|
+
totalItems: k,
|
|
157
168
|
emptyIllustration: "empty-data",
|
|
158
169
|
emptyTitle: "No vehicles yet",
|
|
159
170
|
emptyDescription: "Add vehicles to your fleet to start assigning them to deliveries."
|
|
@@ -162,4 +173,4 @@ function _() {
|
|
|
162
173
|
});
|
|
163
174
|
}
|
|
164
175
|
//#endregion
|
|
165
|
-
export {
|
|
176
|
+
export { y as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { A as e, F as t, I as n, L as r, M as i, P as a, R as o, ct as s, d as c, f as l, g as u, h as d, i as f, j as p, l as m, n as h, ot as g, r as _, u as v } from "./PageLayout-D4LDHJJq.js";
|
|
2
2
|
import { t as y } from "./arrow-left-n48Y-Wis.js";
|
|
3
|
-
import { t as b } from "./box-
|
|
4
|
-
import { t as x } from "./clock-
|
|
5
|
-
import { t as S } from "./map-pin-
|
|
6
|
-
import { t as C } from "./save-
|
|
7
|
-
import { t as w } from "./square-pen-
|
|
8
|
-
import { t as T } from "./users-
|
|
9
|
-
import { t as E } from "./warehouse-
|
|
10
|
-
import {
|
|
11
|
-
import { t as k } from "./
|
|
12
|
-
import { t as A } from "./
|
|
3
|
+
import { t as b } from "./box-Eu05PXDh.js";
|
|
4
|
+
import { t as x } from "./clock-Bl3ptexL.js";
|
|
5
|
+
import { t as S } from "./map-pin-Dznl5l40.js";
|
|
6
|
+
import { t as C } from "./save-DJE8Fpdv.js";
|
|
7
|
+
import { t as w } from "./square-pen-D-6JYrVQ.js";
|
|
8
|
+
import { t as T } from "./users-CCrq-w0C.js";
|
|
9
|
+
import { t as E } from "./warehouse-CaqfmMKh.js";
|
|
10
|
+
import { o as D, t as O } from "./useInventory-CAAVMRp6.js";
|
|
11
|
+
import { t as k } from "./FormError-cuLV2jVD.js";
|
|
12
|
+
import { t as A } from "./formatters-BQr-aR5W.js";
|
|
13
13
|
import { useState as j } from "react";
|
|
14
14
|
import { useParams as M } from "react-router-dom";
|
|
15
15
|
import { jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
@@ -48,7 +48,7 @@ function z() {
|
|
|
48
48
|
postalCode: "",
|
|
49
49
|
country: "USA",
|
|
50
50
|
totalCapacity: ""
|
|
51
|
-
}), [x, w] = j(!1), [T, D] = j(null),
|
|
51
|
+
}), [x, w] = j(!1), [T, D] = j(null), A = () => m?.(s(i, "inventory/warehouses")), M = (e, t) => b((n) => ({
|
|
52
52
|
...n,
|
|
53
53
|
[e]: t
|
|
54
54
|
})), I = async (e) => {
|
|
@@ -88,7 +88,7 @@ function z() {
|
|
|
88
88
|
className: "flex gap-2",
|
|
89
89
|
children: [/* @__PURE__ */ P(v, {
|
|
90
90
|
variant: "outline",
|
|
91
|
-
onClick:
|
|
91
|
+
onClick: A,
|
|
92
92
|
disabled: x,
|
|
93
93
|
children: [/* @__PURE__ */ N(y, { size: 16 }), " Cancel"]
|
|
94
94
|
}), /* @__PURE__ */ P(v, {
|
|
@@ -108,7 +108,7 @@ function z() {
|
|
|
108
108
|
onSubmit: I,
|
|
109
109
|
className: "max-w-2xl space-y-6",
|
|
110
110
|
children: [
|
|
111
|
-
/* @__PURE__ */ N(
|
|
111
|
+
/* @__PURE__ */ N(k, { message: T }),
|
|
112
112
|
/* @__PURE__ */ P(F, { children: [/* @__PURE__ */ N("h2", {
|
|
113
113
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
114
114
|
children: "Warehouse Details"
|
|
@@ -276,7 +276,7 @@ function B() {
|
|
|
276
276
|
title: "Warehouse not found",
|
|
277
277
|
onRetry: p
|
|
278
278
|
});
|
|
279
|
-
let
|
|
279
|
+
let k = r.capacity.usedSpace / r.capacity.totalSpace * 100;
|
|
280
280
|
return /* @__PURE__ */ P(f, {
|
|
281
281
|
title: r.name,
|
|
282
282
|
subtitle: `Code: ${r.code}`,
|
|
@@ -334,9 +334,9 @@ function B() {
|
|
|
334
334
|
children: [/* @__PURE__ */ P("div", { children: [
|
|
335
335
|
/* @__PURE__ */ P("div", {
|
|
336
336
|
className: "flex justify-between text-sm mb-2",
|
|
337
|
-
children: [/* @__PURE__ */ N("span", { children: "Space Utilization" }), /* @__PURE__ */ P("span", { children: [
|
|
337
|
+
children: [/* @__PURE__ */ N("span", { children: "Space Utilization" }), /* @__PURE__ */ P("span", { children: [k.toFixed(0), "%"] })]
|
|
338
338
|
}),
|
|
339
|
-
/* @__PURE__ */ N(i, { value:
|
|
339
|
+
/* @__PURE__ */ N(i, { value: k }),
|
|
340
340
|
/* @__PURE__ */ P("p", {
|
|
341
341
|
className: "text-sm text-text-secondary mt-1",
|
|
342
342
|
children: [
|
|
@@ -421,7 +421,7 @@ function B() {
|
|
|
421
421
|
children: [/* @__PURE__ */ N(S, { size: 18 }), " Location"]
|
|
422
422
|
}) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("p", {
|
|
423
423
|
className: "text-sm",
|
|
424
|
-
children:
|
|
424
|
+
children: A(r.address)
|
|
425
425
|
}) })] }),
|
|
426
426
|
/* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ N(u, { children: "Metrics" }) }), /* @__PURE__ */ P(l, {
|
|
427
427
|
className: "space-y-3",
|
|
@@ -1,75 +1,79 @@
|
|
|
1
1
|
import { M as e, ct as t, i as n, l as r, ot as i } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as a } from "./DataTable-
|
|
3
|
-
import { t as o } from "./plus-
|
|
4
|
-
import { t as s } from "./refresh-cw-
|
|
5
|
-
import { t as c } from "./warehouse-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { t as a } from "./DataTable-XvUcTjwi.js";
|
|
3
|
+
import { t as o } from "./plus-C_XZDwBz.js";
|
|
4
|
+
import { t as s } from "./refresh-cw-CfgN67l3.js";
|
|
5
|
+
import { t as c } from "./warehouse-CaqfmMKh.js";
|
|
6
|
+
import { c as l, s as u } from "./useInventory-CAAVMRp6.js";
|
|
7
|
+
import { useState as d } from "react";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
import { CTAOverflowMenu as m, EmphasisPanel as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/movethewheels/pages/WarehousesPage.tsx
|
|
10
|
-
function
|
|
11
|
-
let { basePath:
|
|
12
|
-
|
|
11
|
+
function _() {
|
|
12
|
+
let { basePath: _, navigate: v } = i(), [y, b] = d(0), [x, S] = d(25), { warehouses: C, hasMore: w, isLoading: T, refetch: E } = l({
|
|
13
|
+
limit: x,
|
|
14
|
+
offset: y * x
|
|
15
|
+
}), { stats: D } = u(), O = (e) => v?.(t(_, e));
|
|
16
|
+
return /* @__PURE__ */ p(n, {
|
|
13
17
|
title: "Warehouses",
|
|
14
|
-
subtitle: `${
|
|
15
|
-
icon: /* @__PURE__ */
|
|
16
|
-
headerActions: /* @__PURE__ */
|
|
18
|
+
subtitle: `${D.total} warehouses`,
|
|
19
|
+
icon: /* @__PURE__ */ f(c, { size: 24 }),
|
|
20
|
+
headerActions: /* @__PURE__ */ f(m, {
|
|
17
21
|
primary: {
|
|
18
22
|
label: "Add Warehouse",
|
|
19
|
-
icon: /* @__PURE__ */
|
|
20
|
-
onSelect: () =>
|
|
23
|
+
icon: /* @__PURE__ */ f(o, { size: 16 }),
|
|
24
|
+
onSelect: () => O("inventory/warehouses/new")
|
|
21
25
|
},
|
|
22
26
|
actions: [{
|
|
23
27
|
label: "Refresh",
|
|
24
|
-
icon: /* @__PURE__ */
|
|
25
|
-
onSelect: () =>
|
|
28
|
+
icon: /* @__PURE__ */ f(s, { size: 16 }),
|
|
29
|
+
onSelect: () => E()
|
|
26
30
|
}]
|
|
27
31
|
}),
|
|
28
32
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
icon: /* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ f(g, {
|
|
34
|
+
icon: /* @__PURE__ */ f(c, { size: 18 }),
|
|
31
35
|
children: "Your storage and fulfilment sites. Watch space and pallet utilization across each warehouse to balance stock, spot capacity crunches, and decide where to fulfil an order from."
|
|
32
36
|
}),
|
|
33
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f("p", {
|
|
34
38
|
className: "text-sm font-medium text-text-secondary",
|
|
35
39
|
children: "Network at a glance"
|
|
36
|
-
}), /* @__PURE__ */
|
|
40
|
+
}), /* @__PURE__ */ p("div", {
|
|
37
41
|
className: "mt-3 grid grid-cols-3 gap-4",
|
|
38
42
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
40
44
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
41
|
-
children:
|
|
42
|
-
}), /* @__PURE__ */
|
|
45
|
+
children: D.total
|
|
46
|
+
}), /* @__PURE__ */ f("p", {
|
|
43
47
|
className: "text-xs text-text-secondary",
|
|
44
48
|
children: "Total sites"
|
|
45
49
|
})] }),
|
|
46
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
47
51
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
48
|
-
children:
|
|
49
|
-
}), /* @__PURE__ */
|
|
52
|
+
children: D.active
|
|
53
|
+
}), /* @__PURE__ */ f("p", {
|
|
50
54
|
className: "text-xs text-text-secondary",
|
|
51
55
|
children: "Active"
|
|
52
56
|
})] }),
|
|
53
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
54
58
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
55
|
-
children:
|
|
56
|
-
}), /* @__PURE__ */
|
|
59
|
+
children: D.total > 0 ? `${Math.round(D.avgUtilization * 100)}%` : "—"
|
|
60
|
+
}), /* @__PURE__ */ f("p", {
|
|
57
61
|
className: "text-xs text-text-secondary",
|
|
58
62
|
children: "Avg utilization"
|
|
59
63
|
})] })
|
|
60
64
|
]
|
|
61
65
|
})] }),
|
|
62
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ f(a, {
|
|
63
67
|
columns: [
|
|
64
68
|
{
|
|
65
69
|
id: "name",
|
|
66
70
|
header: "Warehouse",
|
|
67
71
|
accessorKey: "name",
|
|
68
72
|
sortable: !0,
|
|
69
|
-
cell: (e) => /* @__PURE__ */
|
|
73
|
+
cell: (e) => /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
70
74
|
className: "font-medium",
|
|
71
75
|
children: e.name
|
|
72
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ f("p", {
|
|
73
77
|
className: "text-sm text-text-secondary",
|
|
74
78
|
children: e.code
|
|
75
79
|
})] })
|
|
@@ -77,11 +81,11 @@ function h() {
|
|
|
77
81
|
{
|
|
78
82
|
id: "location",
|
|
79
83
|
header: "Location",
|
|
80
|
-
cell: (e) => /* @__PURE__ */
|
|
84
|
+
cell: (e) => /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", { children: [
|
|
81
85
|
e.address.city,
|
|
82
86
|
", ",
|
|
83
87
|
e.address.state
|
|
84
|
-
] }), /* @__PURE__ */
|
|
88
|
+
] }), /* @__PURE__ */ f("p", {
|
|
85
89
|
className: "text-sm text-text-secondary",
|
|
86
90
|
children: e.address.country
|
|
87
91
|
})] })
|
|
@@ -90,7 +94,7 @@ function h() {
|
|
|
90
94
|
id: "type",
|
|
91
95
|
header: "Type",
|
|
92
96
|
accessorKey: "type",
|
|
93
|
-
cell: (e) => /* @__PURE__ */
|
|
97
|
+
cell: (e) => /* @__PURE__ */ f(r, {
|
|
94
98
|
variant: "outline",
|
|
95
99
|
className: "capitalize",
|
|
96
100
|
children: e.type.replace("_", " ")
|
|
@@ -101,12 +105,12 @@ function h() {
|
|
|
101
105
|
header: "Utilization",
|
|
102
106
|
cell: (t) => {
|
|
103
107
|
let n = t.capacity.usedSpace / t.capacity.totalSpace * 100;
|
|
104
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ p("div", {
|
|
105
109
|
className: "flex items-center gap-2",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ f(e, {
|
|
107
111
|
value: n,
|
|
108
112
|
className: "w-16 h-2"
|
|
109
|
-
}), /* @__PURE__ */
|
|
113
|
+
}), /* @__PURE__ */ p("span", {
|
|
110
114
|
className: "text-sm",
|
|
111
115
|
children: [n.toFixed(0), "%"]
|
|
112
116
|
})]
|
|
@@ -116,15 +120,15 @@ function h() {
|
|
|
116
120
|
{
|
|
117
121
|
id: "capacity",
|
|
118
122
|
header: "Capacity",
|
|
119
|
-
cell: (e) => /* @__PURE__ */
|
|
123
|
+
cell: (e) => /* @__PURE__ */ p("div", {
|
|
120
124
|
className: "text-sm",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ p("p", { children: [
|
|
122
126
|
e.capacity.usedSpace.toLocaleString(),
|
|
123
127
|
" / ",
|
|
124
128
|
e.capacity.totalSpace.toLocaleString(),
|
|
125
129
|
" ",
|
|
126
130
|
"sq ft"
|
|
127
|
-
] }), /* @__PURE__ */
|
|
131
|
+
] }), /* @__PURE__ */ p("p", {
|
|
128
132
|
className: "text-text-secondary",
|
|
129
133
|
children: [
|
|
130
134
|
e.capacity.usedPallets,
|
|
@@ -138,19 +142,26 @@ function h() {
|
|
|
138
142
|
{
|
|
139
143
|
id: "status",
|
|
140
144
|
header: "Status",
|
|
141
|
-
cell: (e) => /* @__PURE__ */
|
|
145
|
+
cell: (e) => /* @__PURE__ */ f(r, {
|
|
142
146
|
variant: e.isActive ? "default" : "secondary",
|
|
143
147
|
children: e.isActive ? "Active" : "Inactive"
|
|
144
148
|
})
|
|
145
149
|
}
|
|
146
150
|
],
|
|
147
|
-
data:
|
|
148
|
-
isLoading:
|
|
151
|
+
data: C,
|
|
152
|
+
isLoading: T,
|
|
149
153
|
searchable: !0,
|
|
150
154
|
searchPlaceholder: "Search warehouses...",
|
|
151
155
|
searchFields: ["name", "code"],
|
|
152
|
-
onRowClick: (e) =>
|
|
156
|
+
onRowClick: (e) => O(`inventory/warehouses/${e.id}`),
|
|
153
157
|
getRowId: (e) => e.id,
|
|
158
|
+
pageIndex: y,
|
|
159
|
+
pageSize: x,
|
|
160
|
+
onPageChange: b,
|
|
161
|
+
onPageSizeChange: (e) => {
|
|
162
|
+
S(e), b(0);
|
|
163
|
+
},
|
|
164
|
+
hasNextPage: w,
|
|
154
165
|
emptyIllustration: "empty-data",
|
|
155
166
|
emptyTitle: "No warehouses yet",
|
|
156
167
|
emptyDescription: "Add a warehouse to store inventory and fulfil orders from it."
|
|
@@ -159,4 +170,4 @@ function h() {
|
|
|
159
170
|
});
|
|
160
171
|
}
|
|
161
172
|
//#endregion
|
|
162
|
-
export {
|
|
173
|
+
export { _ as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { lt as e } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
//#region node_modules/lucide-react/dist/esm/icons/arrow-right.js
|
|
3
|
+
var t = e("ArrowRight", [["path", {
|
|
4
|
+
d: "M5 12h14",
|
|
5
|
+
key: "1ays0h"
|
|
6
|
+
}], ["path", {
|
|
7
|
+
d: "m12 5 7 7-7 7",
|
|
8
|
+
key: "xquz4c"
|
|
9
|
+
}]]);
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { lt as e } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
//#region node_modules/lucide-react/dist/esm/icons/arrow-down.js
|
|
3
|
+
var t = e("ArrowDown", [["path", {
|
|
4
|
+
d: "M12 5v14",
|
|
5
|
+
key: "s699le"
|
|
6
|
+
}], ["path", {
|
|
7
|
+
d: "m19 12-7 7-7-7",
|
|
8
|
+
key: "1idqje"
|
|
9
|
+
}]]), n = e("ArrowUp", [["path", {
|
|
10
|
+
d: "m5 12 7-7 7 7",
|
|
11
|
+
key: "hav0vg"
|
|
12
|
+
}], ["path", {
|
|
13
|
+
d: "M12 19V5",
|
|
14
|
+
key: "x0mq9r"
|
|
15
|
+
}]]);
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as n, n as t };
|
|
@@ -23,9 +23,6 @@ var t = e("Fuel", [
|
|
|
23
23
|
d: "M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2a2 2 0 0 0 2-2V9.83a2 2 0 0 0-.59-1.42L18 5",
|
|
24
24
|
key: "7cu91f"
|
|
25
25
|
}]
|
|
26
|
-
])
|
|
27
|
-
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",
|
|
28
|
-
key: "cbrjhi"
|
|
29
|
-
}]]);
|
|
26
|
+
]);
|
|
30
27
|
//#endregion
|
|
31
|
-
export { t
|
|
28
|
+
export { t };
|