@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
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import { F as e, G as t, H as ee, I as n, K as te, L as r, P as i, R as a, U as ne, W as o, ct as s, d as c, f as l, g as u, h as d, i as re, j as f, l as p, lt as m, n as ie, ot as ae, q as h, r as oe, u as g, z as _ } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as se } from "./arrow-left-n48Y-Wis.js";
|
|
3
|
+
import { t as ce } from "./arrow-right-Q3XQpTPR.js";
|
|
4
|
+
import { t as v } from "./circle-check-big-CGMSpQmD.js";
|
|
5
|
+
import { t as le } from "./clock-Bl3ptexL.js";
|
|
6
|
+
import { t as ue } from "./dollar-sign-CAVU95SO.js";
|
|
7
|
+
import { t as de } from "./DocumentsCard-U2lSe-cn.js";
|
|
8
|
+
import { t as fe } from "./file-text-D-1uvLZG.js";
|
|
9
|
+
import { n as pe, t as me } from "./Notice-CSoDYKw9.js";
|
|
10
|
+
import { n as he, t as y } from "./phone-DVSZHt_j.js";
|
|
11
|
+
import { t as b } from "./map-pin-Dznl5l40.js";
|
|
12
|
+
import { t as x } from "./package-CcRttV2N.js";
|
|
13
|
+
import { t as S } from "./square-pen-D-6JYrVQ.js";
|
|
14
|
+
import { t as ge } from "./truck-D-y2IDzv.js";
|
|
15
|
+
import { t as _e } from "./user-check-BEKRCi7v.js";
|
|
16
|
+
import { t as ve } from "./user-DzfTn4dE.js";
|
|
17
|
+
import { r as ye, t as be } from "./useOrders-B465S2nt.js";
|
|
18
|
+
import { r as xe } from "./useFleet-ChBkxAd6.js";
|
|
19
|
+
import { i as Se, n as Ce, r as C, t as we } from "./StatusBadge-C87mDpDP.js";
|
|
20
|
+
import { t as Te } from "./FormError-cuLV2jVD.js";
|
|
21
|
+
import { n as w, r as T, t as E } from "./formatters-BQr-aR5W.js";
|
|
22
|
+
import { useState as D } from "react";
|
|
23
|
+
import { useParams as O } from "react-router-dom";
|
|
24
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
25
|
+
import { EmphasisPanel as j, NextSteps as Ee, PagePurpose as De } from "@burdenoff/fe-libs/ui";
|
|
26
|
+
//#region node_modules/lucide-react/dist/esm/icons/circle-x.js
|
|
27
|
+
var Oe = m("CircleX", [
|
|
28
|
+
["circle", {
|
|
29
|
+
cx: "12",
|
|
30
|
+
cy: "12",
|
|
31
|
+
r: "10",
|
|
32
|
+
key: "1mglay"
|
|
33
|
+
}],
|
|
34
|
+
["path", {
|
|
35
|
+
d: "m15 9-6 6",
|
|
36
|
+
key: "1uzhvr"
|
|
37
|
+
}],
|
|
38
|
+
["path", {
|
|
39
|
+
d: "m9 9 6 6",
|
|
40
|
+
key: "z0biqf"
|
|
41
|
+
}]
|
|
42
|
+
]), M = m("Printer", [
|
|
43
|
+
["path", {
|
|
44
|
+
d: "M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",
|
|
45
|
+
key: "143wyd"
|
|
46
|
+
}],
|
|
47
|
+
["path", {
|
|
48
|
+
d: "M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",
|
|
49
|
+
key: "1itne7"
|
|
50
|
+
}],
|
|
51
|
+
["rect", {
|
|
52
|
+
x: "6",
|
|
53
|
+
y: "14",
|
|
54
|
+
width: "12",
|
|
55
|
+
height: "8",
|
|
56
|
+
rx: "1",
|
|
57
|
+
key: "1ue0tg"
|
|
58
|
+
}]
|
|
59
|
+
]), N = [
|
|
60
|
+
"pending",
|
|
61
|
+
"confirmed",
|
|
62
|
+
"assigned",
|
|
63
|
+
"picked_up",
|
|
64
|
+
"in_transit",
|
|
65
|
+
"out_for_delivery",
|
|
66
|
+
"delivered"
|
|
67
|
+
], P = {
|
|
68
|
+
pending: "Pending",
|
|
69
|
+
confirmed: "Confirmed",
|
|
70
|
+
assigned: "Assigned",
|
|
71
|
+
picked_up: "Picked Up",
|
|
72
|
+
in_transit: "In Transit",
|
|
73
|
+
out_for_delivery: "Out for Delivery",
|
|
74
|
+
delivered: "Delivered",
|
|
75
|
+
cancelled: "Cancelled",
|
|
76
|
+
failed: "Failed"
|
|
77
|
+
};
|
|
78
|
+
function ke(e) {
|
|
79
|
+
let t = N.indexOf(e);
|
|
80
|
+
return t === -1 || t >= N.length - 1 ? null : N[t + 1];
|
|
81
|
+
}
|
|
82
|
+
function F() {
|
|
83
|
+
let { orderId: m } = O(), { basePath: N, navigate: F } = ae(), { order: I, isLoading: Ae, error: je, refetch: L } = be(m), { updateOrder: Me, updateOrderStatus: Ne } = ye(), { vehicles: Pe, drivers: Fe } = xe(), { message: R, notify: z } = pe(), [B, V] = D(""), [H, U] = D(""), [W, G] = D(!1), [K, q] = D(!1), [J, Y] = D(null), X = Pe.filter((e) => e.status === "available" || e.id === I?.vehicleId), Z = Fe.filter((e) => e.status === "available" || e.id === I?.driverId), Ie = async () => {
|
|
84
|
+
if (!m || !B && !H) {
|
|
85
|
+
Y("Pick a vehicle and/or a driver to assign.");
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
G(!0), Y(null);
|
|
89
|
+
try {
|
|
90
|
+
await Me(m, {
|
|
91
|
+
vehicleId: B || void 0,
|
|
92
|
+
driverId: H || void 0
|
|
93
|
+
}), z("Assignment updated."), V(""), U(""), L();
|
|
94
|
+
} catch (e) {
|
|
95
|
+
Y(e instanceof Error ? e.message : "Failed to update assignment.");
|
|
96
|
+
} finally {
|
|
97
|
+
G(!1);
|
|
98
|
+
}
|
|
99
|
+
}, Q = async (e, t) => {
|
|
100
|
+
if (m) {
|
|
101
|
+
q(!0), Y(null);
|
|
102
|
+
try {
|
|
103
|
+
await Ne(m, e), z(t), L();
|
|
104
|
+
} catch (e) {
|
|
105
|
+
Y(e instanceof Error ? e.message : "Failed to update status.");
|
|
106
|
+
} finally {
|
|
107
|
+
q(!1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}, $ = (e) => {
|
|
111
|
+
F && F(s(N, e));
|
|
112
|
+
};
|
|
113
|
+
return Ae ? /* @__PURE__ */ k(oe, { message: "Loading order details..." }) : je || !I ? /* @__PURE__ */ k(ie, {
|
|
114
|
+
title: "Order not found",
|
|
115
|
+
message: "The order you're looking for doesn't exist or has been removed.",
|
|
116
|
+
onRetry: L
|
|
117
|
+
}) : /* @__PURE__ */ A(re, {
|
|
118
|
+
title: I.orderNumber,
|
|
119
|
+
subtitle: `Created ${T(I.createdAt, "full")}`,
|
|
120
|
+
icon: /* @__PURE__ */ k(x, { size: 24 }),
|
|
121
|
+
headerActions: /* @__PURE__ */ A("div", {
|
|
122
|
+
className: "flex gap-2",
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ A(g, {
|
|
125
|
+
variant: "outline",
|
|
126
|
+
onClick: () => {
|
|
127
|
+
F && F(s(N, "orders"));
|
|
128
|
+
},
|
|
129
|
+
children: [/* @__PURE__ */ k(se, { size: 16 }), "Back"]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ A(g, {
|
|
132
|
+
variant: "outline",
|
|
133
|
+
children: [/* @__PURE__ */ k(M, { size: 16 }), "Print"]
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ A(g, {
|
|
136
|
+
onClick: () => $(`orders/${m}/edit`),
|
|
137
|
+
children: [/* @__PURE__ */ k(S, { size: 16 }), "Edit"]
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}),
|
|
141
|
+
headerContent: /* @__PURE__ */ A("div", {
|
|
142
|
+
className: "flex flex-wrap gap-2",
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ k(C, {
|
|
145
|
+
status: I.status,
|
|
146
|
+
type: "order"
|
|
147
|
+
}),
|
|
148
|
+
/* @__PURE__ */ k(Ce, { priority: I.priority }),
|
|
149
|
+
/* @__PURE__ */ k(Se, { type: I.orderType }),
|
|
150
|
+
/* @__PURE__ */ k(we, { status: I.pricing.paymentStatus })
|
|
151
|
+
]
|
|
152
|
+
}),
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ k(De, {
|
|
155
|
+
icon: /* @__PURE__ */ k(x, { size: 18 }),
|
|
156
|
+
children: "Everything about this one delivery in a single place — who it's for, where it's going, what's inside, the running cost and the full status history. Use this page to review the order, hand it to a driver, print the docket, or jump into live tracking."
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ k(Ee, {
|
|
159
|
+
storageKey: "movethewheels-order-details",
|
|
160
|
+
steps: [
|
|
161
|
+
{
|
|
162
|
+
id: "track",
|
|
163
|
+
label: "Track this order live",
|
|
164
|
+
description: "See where the shipment is right now on the map.",
|
|
165
|
+
icon: /* @__PURE__ */ k(b, { size: 16 }),
|
|
166
|
+
onClick: () => $(`tracking?order=${I.id}`)
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: "edit",
|
|
170
|
+
label: "Edit order details",
|
|
171
|
+
description: "Update items, addresses or instructions before dispatch.",
|
|
172
|
+
icon: /* @__PURE__ */ k(S, { size: 16 }),
|
|
173
|
+
onClick: () => $(`orders/${m}/edit`)
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: "print",
|
|
177
|
+
label: "Print the delivery docket",
|
|
178
|
+
description: "Generate a printable copy for the driver or warehouse.",
|
|
179
|
+
icon: /* @__PURE__ */ k(M, { size: 16 }),
|
|
180
|
+
onClick: () => window.print()
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ A("div", {
|
|
185
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
186
|
+
children: [/* @__PURE__ */ A("div", {
|
|
187
|
+
className: "lg:col-span-2 space-y-6",
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ A(u, {
|
|
190
|
+
className: "flex items-center gap-2",
|
|
191
|
+
children: [/* @__PURE__ */ k(ve, { size: 18 }), "Customer Information"]
|
|
192
|
+
}) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ A("div", {
|
|
193
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
194
|
+
children: [/* @__PURE__ */ A("div", { children: [
|
|
195
|
+
/* @__PURE__ */ k("h4", {
|
|
196
|
+
className: "font-medium mb-2",
|
|
197
|
+
children: I.customerInfo.name
|
|
198
|
+
}),
|
|
199
|
+
I.customerInfo.company && /* @__PURE__ */ k("p", {
|
|
200
|
+
className: "text-sm text-text-secondary mb-2",
|
|
201
|
+
children: I.customerInfo.company
|
|
202
|
+
}),
|
|
203
|
+
/* @__PURE__ */ A("div", {
|
|
204
|
+
className: "space-y-1 text-sm",
|
|
205
|
+
children: [/* @__PURE__ */ A("p", {
|
|
206
|
+
className: "flex items-center gap-2",
|
|
207
|
+
children: [/* @__PURE__ */ k(he, {
|
|
208
|
+
size: 14,
|
|
209
|
+
className: "text-text-secondary"
|
|
210
|
+
}), I.customerInfo.email]
|
|
211
|
+
}), /* @__PURE__ */ A("p", {
|
|
212
|
+
className: "flex items-center gap-2",
|
|
213
|
+
children: [/* @__PURE__ */ k(y, {
|
|
214
|
+
size: 14,
|
|
215
|
+
className: "text-text-secondary"
|
|
216
|
+
}), I.customerInfo.phone]
|
|
217
|
+
})]
|
|
218
|
+
})
|
|
219
|
+
] }), /* @__PURE__ */ A("div", { children: [I.customerInfo.preferredDeliveryTime && /* @__PURE__ */ A("div", {
|
|
220
|
+
className: "mb-2",
|
|
221
|
+
children: [/* @__PURE__ */ k("p", {
|
|
222
|
+
className: "text-sm text-text-secondary",
|
|
223
|
+
children: "Preferred Delivery Time"
|
|
224
|
+
}), /* @__PURE__ */ k("p", {
|
|
225
|
+
className: "text-sm",
|
|
226
|
+
children: I.customerInfo.preferredDeliveryTime
|
|
227
|
+
})]
|
|
228
|
+
}), I.customerInfo.deliveryInstructions && /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
229
|
+
className: "text-sm text-text-secondary",
|
|
230
|
+
children: "Delivery Instructions"
|
|
231
|
+
}), /* @__PURE__ */ k("p", {
|
|
232
|
+
className: "text-sm",
|
|
233
|
+
children: I.customerInfo.deliveryInstructions
|
|
234
|
+
})] })] })]
|
|
235
|
+
}) })] }),
|
|
236
|
+
/* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ A(u, {
|
|
237
|
+
className: "flex items-center gap-2",
|
|
238
|
+
children: [/* @__PURE__ */ k(b, { size: 18 }), "Addresses"]
|
|
239
|
+
}) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ A("div", {
|
|
240
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
241
|
+
children: [/* @__PURE__ */ A("div", { children: [
|
|
242
|
+
/* @__PURE__ */ k("h4", {
|
|
243
|
+
className: "font-medium mb-2 flex items-center gap-2",
|
|
244
|
+
children: /* @__PURE__ */ k(p, {
|
|
245
|
+
variant: "outline",
|
|
246
|
+
children: "Pickup"
|
|
247
|
+
})
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ k("p", {
|
|
250
|
+
className: "text-sm",
|
|
251
|
+
children: E(I.pickupAddress)
|
|
252
|
+
}),
|
|
253
|
+
I.scheduledPickup && /* @__PURE__ */ A("p", {
|
|
254
|
+
className: "text-sm text-text-secondary mt-2",
|
|
255
|
+
children: ["Scheduled: ", T(I.scheduledPickup, "full")]
|
|
256
|
+
}),
|
|
257
|
+
I.actualPickup && /* @__PURE__ */ A("p", {
|
|
258
|
+
className: "text-sm text-status-success-text mt-1",
|
|
259
|
+
children: [
|
|
260
|
+
/* @__PURE__ */ k(v, {
|
|
261
|
+
size: 14,
|
|
262
|
+
className: "inline mr-1"
|
|
263
|
+
}),
|
|
264
|
+
"Picked up: ",
|
|
265
|
+
T(I.actualPickup, "full")
|
|
266
|
+
]
|
|
267
|
+
})
|
|
268
|
+
] }), /* @__PURE__ */ A("div", { children: [
|
|
269
|
+
/* @__PURE__ */ k("h4", {
|
|
270
|
+
className: "font-medium mb-2 flex items-center gap-2",
|
|
271
|
+
children: /* @__PURE__ */ k(p, {
|
|
272
|
+
variant: "outline",
|
|
273
|
+
children: "Delivery"
|
|
274
|
+
})
|
|
275
|
+
}),
|
|
276
|
+
/* @__PURE__ */ k("p", {
|
|
277
|
+
className: "text-sm",
|
|
278
|
+
children: E(I.deliveryAddress)
|
|
279
|
+
}),
|
|
280
|
+
I.scheduledDelivery && /* @__PURE__ */ A("p", {
|
|
281
|
+
className: "text-sm text-text-secondary mt-2",
|
|
282
|
+
children: ["Scheduled: ", T(I.scheduledDelivery, "full")]
|
|
283
|
+
}),
|
|
284
|
+
I.actualDelivery && /* @__PURE__ */ A("p", {
|
|
285
|
+
className: "text-sm text-status-success-text mt-1",
|
|
286
|
+
children: [
|
|
287
|
+
/* @__PURE__ */ k(v, {
|
|
288
|
+
size: 14,
|
|
289
|
+
className: "inline mr-1"
|
|
290
|
+
}),
|
|
291
|
+
"Delivered: ",
|
|
292
|
+
T(I.actualDelivery, "full")
|
|
293
|
+
]
|
|
294
|
+
})
|
|
295
|
+
] })]
|
|
296
|
+
}) })] }),
|
|
297
|
+
/* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ A(u, {
|
|
298
|
+
className: "flex items-center gap-2",
|
|
299
|
+
children: [
|
|
300
|
+
/* @__PURE__ */ k(x, { size: 18 }),
|
|
301
|
+
"Order Items (",
|
|
302
|
+
I.items.length,
|
|
303
|
+
")"
|
|
304
|
+
]
|
|
305
|
+
}) }), /* @__PURE__ */ k(l, {
|
|
306
|
+
className: "p-0",
|
|
307
|
+
children: /* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(te, { children: /* @__PURE__ */ A(h, { children: [
|
|
308
|
+
/* @__PURE__ */ k(t, { children: "Item" }),
|
|
309
|
+
/* @__PURE__ */ k(t, { children: "SKU" }),
|
|
310
|
+
/* @__PURE__ */ k(t, {
|
|
311
|
+
className: "text-center",
|
|
312
|
+
children: "Qty"
|
|
313
|
+
}),
|
|
314
|
+
/* @__PURE__ */ k(t, {
|
|
315
|
+
className: "text-right",
|
|
316
|
+
children: "Unit Price"
|
|
317
|
+
}),
|
|
318
|
+
/* @__PURE__ */ k(t, {
|
|
319
|
+
className: "text-right",
|
|
320
|
+
children: "Total"
|
|
321
|
+
})
|
|
322
|
+
] }) }), /* @__PURE__ */ k(ne, { children: I.items.map((e) => /* @__PURE__ */ A(h, { children: [
|
|
323
|
+
/* @__PURE__ */ k(o, { children: /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
324
|
+
className: "font-medium",
|
|
325
|
+
children: e.name
|
|
326
|
+
}), e.description && /* @__PURE__ */ k("p", {
|
|
327
|
+
className: "text-sm text-text-secondary",
|
|
328
|
+
children: e.description
|
|
329
|
+
})] }) }),
|
|
330
|
+
/* @__PURE__ */ k(o, {
|
|
331
|
+
className: "font-mono text-sm",
|
|
332
|
+
children: e.sku
|
|
333
|
+
}),
|
|
334
|
+
/* @__PURE__ */ k(o, {
|
|
335
|
+
className: "text-center",
|
|
336
|
+
children: e.quantity
|
|
337
|
+
}),
|
|
338
|
+
/* @__PURE__ */ k(o, {
|
|
339
|
+
className: "text-right",
|
|
340
|
+
children: w(e.value)
|
|
341
|
+
}),
|
|
342
|
+
/* @__PURE__ */ k(o, {
|
|
343
|
+
className: "text-right font-medium",
|
|
344
|
+
children: w(e.value * e.quantity)
|
|
345
|
+
})
|
|
346
|
+
] }, e.id)) })] })
|
|
347
|
+
})] }),
|
|
348
|
+
/* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ A(u, {
|
|
349
|
+
className: "flex items-center gap-2",
|
|
350
|
+
children: [/* @__PURE__ */ k(le, { size: 18 }), "Order Timeline"]
|
|
351
|
+
}) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ k("div", {
|
|
352
|
+
className: "relative",
|
|
353
|
+
children: I.timeline.map((e, t) => /* @__PURE__ */ A("div", {
|
|
354
|
+
className: "flex gap-4 pb-6 last:pb-0",
|
|
355
|
+
children: [/* @__PURE__ */ A("div", {
|
|
356
|
+
className: "relative",
|
|
357
|
+
children: [/* @__PURE__ */ k("div", { className: "w-3 h-3 rounded-full bg-action-primary-bg mt-1.5" }), t < I.timeline.length - 1 && /* @__PURE__ */ k("div", { className: "absolute top-4 left-1.5 w-px h-full -ml-px bg-border" })]
|
|
358
|
+
}), /* @__PURE__ */ A("div", {
|
|
359
|
+
className: "flex-1",
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ A("div", {
|
|
362
|
+
className: "flex items-center gap-2 mb-1",
|
|
363
|
+
children: [/* @__PURE__ */ k(C, {
|
|
364
|
+
status: e.status,
|
|
365
|
+
type: "order",
|
|
366
|
+
size: "sm"
|
|
367
|
+
}), /* @__PURE__ */ k("span", {
|
|
368
|
+
className: "text-sm text-text-secondary",
|
|
369
|
+
children: T(e.timestamp, "full")
|
|
370
|
+
})]
|
|
371
|
+
}),
|
|
372
|
+
e.notes && /* @__PURE__ */ k("p", {
|
|
373
|
+
className: "text-sm",
|
|
374
|
+
children: e.notes
|
|
375
|
+
}),
|
|
376
|
+
/* @__PURE__ */ A("p", {
|
|
377
|
+
className: "text-xs text-text-secondary",
|
|
378
|
+
children: ["by ", e.performedBy]
|
|
379
|
+
})
|
|
380
|
+
]
|
|
381
|
+
})]
|
|
382
|
+
}, t))
|
|
383
|
+
}) })] })
|
|
384
|
+
]
|
|
385
|
+
}), /* @__PURE__ */ A("div", {
|
|
386
|
+
className: "space-y-6",
|
|
387
|
+
children: [
|
|
388
|
+
/* @__PURE__ */ A(j, { children: [/* @__PURE__ */ A("h2", {
|
|
389
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
|
|
390
|
+
children: [/* @__PURE__ */ k(ue, { size: 18 }), "Order Summary"]
|
|
391
|
+
}), /* @__PURE__ */ A("div", {
|
|
392
|
+
className: "space-y-3",
|
|
393
|
+
children: [
|
|
394
|
+
/* @__PURE__ */ A("div", {
|
|
395
|
+
className: "flex justify-between text-sm",
|
|
396
|
+
children: [/* @__PURE__ */ k("span", {
|
|
397
|
+
className: "text-text-secondary",
|
|
398
|
+
children: "Subtotal"
|
|
399
|
+
}), /* @__PURE__ */ k("span", { children: w(I.pricing.subtotal) })]
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ A("div", {
|
|
402
|
+
className: "flex justify-between text-sm",
|
|
403
|
+
children: [/* @__PURE__ */ k("span", {
|
|
404
|
+
className: "text-text-secondary",
|
|
405
|
+
children: "Delivery"
|
|
406
|
+
}), /* @__PURE__ */ k("span", { children: w(I.pricing.fees.delivery) })]
|
|
407
|
+
}),
|
|
408
|
+
/* @__PURE__ */ A("div", {
|
|
409
|
+
className: "flex justify-between text-sm",
|
|
410
|
+
children: [/* @__PURE__ */ k("span", {
|
|
411
|
+
className: "text-text-secondary",
|
|
412
|
+
children: "Handling"
|
|
413
|
+
}), /* @__PURE__ */ k("span", { children: w(I.pricing.fees.handling) })]
|
|
414
|
+
}),
|
|
415
|
+
I.pricing.fees.insurance && /* @__PURE__ */ A("div", {
|
|
416
|
+
className: "flex justify-between text-sm",
|
|
417
|
+
children: [/* @__PURE__ */ k("span", {
|
|
418
|
+
className: "text-text-secondary",
|
|
419
|
+
children: "Insurance"
|
|
420
|
+
}), /* @__PURE__ */ k("span", { children: w(I.pricing.fees.insurance) })]
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ A("div", {
|
|
423
|
+
className: "flex justify-between text-sm",
|
|
424
|
+
children: [/* @__PURE__ */ k("span", {
|
|
425
|
+
className: "text-text-secondary",
|
|
426
|
+
children: "Taxes"
|
|
427
|
+
}), /* @__PURE__ */ k("span", { children: w(I.pricing.taxes) })]
|
|
428
|
+
}),
|
|
429
|
+
/* @__PURE__ */ k(_, {}),
|
|
430
|
+
/* @__PURE__ */ A("div", {
|
|
431
|
+
className: "flex justify-between font-medium",
|
|
432
|
+
children: [/* @__PURE__ */ k("span", { children: "Total" }), /* @__PURE__ */ k("span", {
|
|
433
|
+
className: "text-lg",
|
|
434
|
+
children: w(I.pricing.total)
|
|
435
|
+
})]
|
|
436
|
+
}),
|
|
437
|
+
/* @__PURE__ */ A("div", {
|
|
438
|
+
className: "pt-2",
|
|
439
|
+
children: [/* @__PURE__ */ k("p", {
|
|
440
|
+
className: "text-sm text-text-secondary",
|
|
441
|
+
children: "Payment Method"
|
|
442
|
+
}), /* @__PURE__ */ k("p", {
|
|
443
|
+
className: "text-sm capitalize",
|
|
444
|
+
children: I.pricing.paymentMethod.replace("_", " ")
|
|
445
|
+
})]
|
|
446
|
+
})
|
|
447
|
+
]
|
|
448
|
+
})] }),
|
|
449
|
+
/* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ A(u, {
|
|
450
|
+
className: "flex items-center gap-2",
|
|
451
|
+
children: [/* @__PURE__ */ k(ge, { size: 18 }), "Assignment"]
|
|
452
|
+
}) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ A("div", {
|
|
453
|
+
className: "space-y-4",
|
|
454
|
+
children: [
|
|
455
|
+
J && /* @__PURE__ */ k(Te, { message: J }),
|
|
456
|
+
R && /* @__PURE__ */ k(me, { message: R }),
|
|
457
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
458
|
+
className: "text-sm text-text-secondary",
|
|
459
|
+
children: "Tracking Number"
|
|
460
|
+
}), /* @__PURE__ */ k("p", {
|
|
461
|
+
className: "text-sm font-mono",
|
|
462
|
+
children: I.trackingNumber || "—"
|
|
463
|
+
})] }),
|
|
464
|
+
/* @__PURE__ */ k(_, {}),
|
|
465
|
+
/* @__PURE__ */ A("div", {
|
|
466
|
+
className: "space-y-3",
|
|
467
|
+
children: [
|
|
468
|
+
/* @__PURE__ */ A("div", {
|
|
469
|
+
className: "space-y-1.5",
|
|
470
|
+
children: [/* @__PURE__ */ k(f, {
|
|
471
|
+
htmlFor: "assign-vehicle",
|
|
472
|
+
children: "Vehicle"
|
|
473
|
+
}), /* @__PURE__ */ A(i, {
|
|
474
|
+
value: B,
|
|
475
|
+
onValueChange: V,
|
|
476
|
+
children: [/* @__PURE__ */ k(r, {
|
|
477
|
+
id: "assign-vehicle",
|
|
478
|
+
children: /* @__PURE__ */ k(a, { placeholder: I.vehicleId ? `Current: ${I.vehicleId}` : "Select a vehicle" })
|
|
479
|
+
}), /* @__PURE__ */ k(e, { children: X.length === 0 ? /* @__PURE__ */ k(n, {
|
|
480
|
+
value: "none",
|
|
481
|
+
disabled: !0,
|
|
482
|
+
children: "No available vehicles"
|
|
483
|
+
}) : X.map((e) => /* @__PURE__ */ A(n, {
|
|
484
|
+
value: e.id,
|
|
485
|
+
children: [
|
|
486
|
+
e.vehicleNumber,
|
|
487
|
+
" (",
|
|
488
|
+
e.type,
|
|
489
|
+
")"
|
|
490
|
+
]
|
|
491
|
+
}, e.id)) })]
|
|
492
|
+
})]
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ A("div", {
|
|
495
|
+
className: "space-y-1.5",
|
|
496
|
+
children: [/* @__PURE__ */ k(f, {
|
|
497
|
+
htmlFor: "assign-driver",
|
|
498
|
+
children: "Driver"
|
|
499
|
+
}), /* @__PURE__ */ A(i, {
|
|
500
|
+
value: H,
|
|
501
|
+
onValueChange: U,
|
|
502
|
+
children: [/* @__PURE__ */ k(r, {
|
|
503
|
+
id: "assign-driver",
|
|
504
|
+
children: /* @__PURE__ */ k(a, { placeholder: I.driverId ? `Current: ${I.driverId}` : "Select a driver" })
|
|
505
|
+
}), /* @__PURE__ */ k(e, { children: Z.length === 0 ? /* @__PURE__ */ k(n, {
|
|
506
|
+
value: "none",
|
|
507
|
+
disabled: !0,
|
|
508
|
+
children: "No available drivers"
|
|
509
|
+
}) : Z.map((e) => /* @__PURE__ */ A(n, {
|
|
510
|
+
value: e.id,
|
|
511
|
+
children: [
|
|
512
|
+
e.fullName,
|
|
513
|
+
" (",
|
|
514
|
+
e.employeeId,
|
|
515
|
+
")"
|
|
516
|
+
]
|
|
517
|
+
}, e.id)) })]
|
|
518
|
+
})]
|
|
519
|
+
}),
|
|
520
|
+
/* @__PURE__ */ A(g, {
|
|
521
|
+
className: "w-full",
|
|
522
|
+
onClick: Ie,
|
|
523
|
+
disabled: W || !B && !H,
|
|
524
|
+
children: [/* @__PURE__ */ k(_e, { size: 16 }), W ? "Assigning…" : "Assign driver & vehicle"]
|
|
525
|
+
})
|
|
526
|
+
]
|
|
527
|
+
}),
|
|
528
|
+
/* @__PURE__ */ k(_, {}),
|
|
529
|
+
/* @__PURE__ */ A("div", {
|
|
530
|
+
className: "space-y-2",
|
|
531
|
+
children: [
|
|
532
|
+
/* @__PURE__ */ A("p", {
|
|
533
|
+
className: "text-sm text-text-secondary",
|
|
534
|
+
children: ["Current status: ", /* @__PURE__ */ k("span", {
|
|
535
|
+
className: "font-medium",
|
|
536
|
+
children: P[I.status]
|
|
537
|
+
})]
|
|
538
|
+
}),
|
|
539
|
+
(() => {
|
|
540
|
+
let e = ke(I.status);
|
|
541
|
+
return e ? /* @__PURE__ */ A(g, {
|
|
542
|
+
variant: "outline",
|
|
543
|
+
className: "w-full",
|
|
544
|
+
onClick: () => Q(e, `Order advanced to ${P[e]}.`),
|
|
545
|
+
disabled: K,
|
|
546
|
+
children: [/* @__PURE__ */ k(ce, { size: 16 }), K ? "Updating…" : `Advance to ${P[e]}`]
|
|
547
|
+
}) : null;
|
|
548
|
+
})(),
|
|
549
|
+
I.status !== "cancelled" && I.status !== "delivered" && /* @__PURE__ */ A(g, {
|
|
550
|
+
variant: "outline",
|
|
551
|
+
className: "w-full text-status-error-text",
|
|
552
|
+
onClick: () => Q("cancelled", "Order cancelled."),
|
|
553
|
+
disabled: K,
|
|
554
|
+
children: [/* @__PURE__ */ k(Oe, { size: 16 }), "Cancel order"]
|
|
555
|
+
})
|
|
556
|
+
]
|
|
557
|
+
}),
|
|
558
|
+
/* @__PURE__ */ A(g, {
|
|
559
|
+
variant: "outline",
|
|
560
|
+
className: "w-full",
|
|
561
|
+
onClick: () => $(`tracking?order=${I.id}`),
|
|
562
|
+
children: [/* @__PURE__ */ k(b, { size: 16 }), "Track Order"]
|
|
563
|
+
})
|
|
564
|
+
]
|
|
565
|
+
}) })] }),
|
|
566
|
+
/* @__PURE__ */ k(de, {
|
|
567
|
+
entityType: "order",
|
|
568
|
+
entityId: I.id
|
|
569
|
+
}),
|
|
570
|
+
I.specialInstructions && /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ A(u, {
|
|
571
|
+
className: "flex items-center gap-2",
|
|
572
|
+
children: [/* @__PURE__ */ k(fe, { size: 18 }), "Special Instructions"]
|
|
573
|
+
}) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ k("p", {
|
|
574
|
+
className: "text-sm",
|
|
575
|
+
children: I.specialInstructions
|
|
576
|
+
}) })] })
|
|
577
|
+
]
|
|
578
|
+
})]
|
|
579
|
+
})
|
|
580
|
+
]
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
//#endregion
|
|
584
|
+
export { F as default };
|