@burdenoff/microfe-movethewheels 2026.510.105
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/README.md +82 -0
- package/dist/AIAssistantPage-hD0VYJdH.js +210 -0
- package/dist/AnalyticsPage-DHTHCUtr.js +201 -0
- package/dist/CreateOrderPage-Cprg4Y9V.js +471 -0
- package/dist/CustomerDetailsPage-DNDEw7IW.js +239 -0
- package/dist/CustomersPage-CDjjeCEL.js +119 -0
- package/dist/DashboardPage-8iTPXRAG.js +374 -0
- package/dist/DataTable-CRIKfdIN.js +239 -0
- package/dist/DriverDetailsPage-CRyRCno7.js +297 -0
- package/dist/DriversPage-16O8fVmf.js +127 -0
- package/dist/FinancePage-BYUxK5dR.js +154 -0
- package/dist/FleetPage-CHYETCWT.js +293 -0
- package/dist/ImportExportPage-C3MKKxfc.js +232 -0
- package/dist/InventoryPage--822AxZM.js +223 -0
- package/dist/LiveTrackingPage-Dp3rTJDr.js +332 -0
- package/dist/MarketplacePage-DjEqudfM.js +192 -0
- package/dist/MetricCard-GTbxAk1a.js +135 -0
- package/dist/OrderDetailsPage-BIuYG0ub.js +398 -0
- package/dist/OrdersListPage-CW5V0Uvh.js +257 -0
- package/dist/PageLayout-B7b0vl0R.js +1894 -0
- package/dist/ProductDetailsPage-Q3X7AT-7.js +168 -0
- package/dist/ProductsPage-CUj9JpnW.js +131 -0
- package/dist/ReportsPage-DblO5CdJ.js +227 -0
- package/dist/RouteDetailsPage-CLctgk6A.js +240 -0
- package/dist/RoutesPage-8hrv6RWT.js +116 -0
- package/dist/SettingsPage-BJ5BQeqn.js +247 -0
- package/dist/StatusBadge-BrrwraIA.js +206 -0
- package/dist/TrackingPage-BGqHDh-w.js +322 -0
- package/dist/VehicleDetailsPage-XnDH4iQR.js +194 -0
- package/dist/VehiclesPage-Cs4XxHkA.js +127 -0
- package/dist/WarehouseDetailsPage-GemdMvr_.js +215 -0
- package/dist/WarehousesPage-QTiuDuXy.js +121 -0
- package/dist/arrow-left-6CiLhqVp.js +11 -0
- package/dist/box-BunB_4UH.js +18 -0
- package/dist/chart-column-DWwVEVQ-.js +22 -0
- package/dist/chevron-right-DhZVf20o.js +8 -0
- package/dist/circle-alert-D5f6RZxt.js +26 -0
- package/dist/circle-check-big-D-JMHcTe.js +11 -0
- package/dist/clock-CvwBKbQP.js +13 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/dollar-sign-CP9qeU5d.js +14 -0
- package/dist/download-CIuG04pJ.js +21 -0
- package/dist/file-text-Dd_thxkn.js +26 -0
- package/dist/filter-DyRMX9CU.js +8 -0
- package/dist/formatters-_vJlC-47.js +50 -0
- package/dist/generated/global-operations.d.ts +1 -0
- package/dist/generated/global-types.d.ts +20715 -0
- package/dist/generated/wspace-operations.d.ts +3704 -0
- package/dist/generated/wspace-types.d.ts +53362 -0
- package/dist/graphqlClient-CdJyR_ed.js +55 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +772 -0
- package/dist/map-BqH1cBJi.js +18 -0
- package/dist/map-pin-CFBOmh-A.js +13 -0
- package/dist/movethewheels/MoveTheWheelsRoot.d.ts +25 -0
- package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +7 -0
- package/dist/movethewheels/components/DataTable.d.ts +32 -0
- package/dist/movethewheels/components/MetricCard.d.ts +43 -0
- package/dist/movethewheels/components/PageLayout.d.ts +68 -0
- package/dist/movethewheels/components/StatusBadge.d.ts +49 -0
- package/dist/movethewheels/components/index.d.ts +10 -0
- package/dist/movethewheels/components/ui.d.ts +22 -0
- package/dist/movethewheels/constants/index.d.ts +24 -0
- package/dist/movethewheels/constants/mockData.d.ts +33 -0
- package/dist/movethewheels/hooks/index.d.ts +12 -0
- package/dist/movethewheels/hooks/useAnalytics.d.ts +118 -0
- package/dist/movethewheels/hooks/useCustomers.d.ts +37 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +71 -0
- package/dist/movethewheels/hooks/useInventory.d.ts +60 -0
- package/dist/movethewheels/hooks/useOrders.d.ts +47 -0
- package/dist/movethewheels/hooks/useRoutes.d.ts +41 -0
- package/dist/movethewheels/hooks/useTracking.d.ts +69 -0
- package/dist/movethewheels/index.d.ts +30 -0
- package/dist/movethewheels/pages/AIAssistantPage.d.ts +4 -0
- package/dist/movethewheels/pages/AnalyticsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CreateOrderPage.d.ts +6 -0
- package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CustomersPage.d.ts +4 -0
- package/dist/movethewheels/pages/DashboardPage.d.ts +6 -0
- package/dist/movethewheels/pages/DriverDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/DriversPage.d.ts +4 -0
- package/dist/movethewheels/pages/FinancePage.d.ts +4 -0
- package/dist/movethewheels/pages/FleetPage.d.ts +6 -0
- package/dist/movethewheels/pages/ImportExportPage.d.ts +4 -0
- package/dist/movethewheels/pages/InventoryPage.d.ts +4 -0
- package/dist/movethewheels/pages/LiveTrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/MarketplacePage.d.ts +4 -0
- package/dist/movethewheels/pages/OrderDetailsPage.d.ts +6 -0
- package/dist/movethewheels/pages/OrdersListPage.d.ts +6 -0
- package/dist/movethewheels/pages/ProductDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ProductsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ReportsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RouteDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RoutesPage.d.ts +4 -0
- package/dist/movethewheels/pages/SettingsPage.d.ts +4 -0
- package/dist/movethewheels/pages/TrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/VehiclesPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehousesPage.d.ts +4 -0
- package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +16 -0
- package/dist/movethewheels/store/movethewheelsStore.d.ts +73 -0
- package/dist/movethewheels/types/index.d.ts +655 -0
- package/dist/movethewheels/utils/cn.d.ts +6 -0
- package/dist/movethewheels/utils/formatters.d.ts +60 -0
- package/dist/movethewheels/utils/graphqlClient.d.ts +11 -0
- package/dist/movethewheels/utils/index.d.ts +7 -0
- package/dist/movethewheels/utils/navigation.d.ts +23 -0
- package/dist/navigation-BgnOfsVd.js +6 -0
- package/dist/navigation-C2fY_aS9.js +8 -0
- package/dist/package-DVZbDRcV.js +22 -0
- package/dist/phone-KdwpVmC4.js +18 -0
- package/dist/plus-Bl7uX6Ji.js +11 -0
- package/dist/refresh-cw-BYjl3K-8.js +22 -0
- package/dist/route-Ce_poKFi.js +51 -0
- package/dist/save-C-qDVat-.js +18 -0
- package/dist/search-5pdn5eOO.js +13 -0
- package/dist/settings-C4kIDsYg.js +28 -0
- package/dist/square-pen-BwQ67vLE.js +11 -0
- package/dist/star-BlVsC3Ad.js +8 -0
- package/dist/store-DTmQT5M0.js +26 -0
- package/dist/trending-up-C1faflCI.js +11 -0
- package/dist/triangle-alert-CUoVAA4L.js +18 -0
- package/dist/truck-BmDAzu05.js +30 -0
- package/dist/useAnalytics-ph7eTIK6.js +297 -0
- package/dist/useCustomers-bS3a4ytk.js +186 -0
- package/dist/useFleet-BdETplNE.js +398 -0
- package/dist/useInventory-Dwn18FPz.js +323 -0
- package/dist/useOrders-D_3_hGMp.js +324 -0
- package/dist/useRoutes-v4aBaS-E.js +224 -0
- package/dist/useTracking-De2KIUNu.js +261 -0
- package/dist/user-BplzDrLP.js +13 -0
- package/dist/users-i-igmsP4.js +24 -0
- package/dist/warehouse-DewG0PXh.js +25 -0
- package/dist/wrench-CoSDEIC7.js +31 -0
- package/package.json +107 -0
- package/src/dev/main.tsx +110 -0
- package/src/dev/styles.css +139 -0
- package/src/generated/global-operations.ts +2 -0
- package/src/generated/global-types.ts +24048 -0
- package/src/generated/wspace-operations.ts +3734 -0
- package/src/generated/wspace-types.ts +60715 -0
- package/src/index.ts +4 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +258 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +119 -0
- package/src/movethewheels/components/DataTable.tsx +367 -0
- package/src/movethewheels/components/MetricCard.tsx +180 -0
- package/src/movethewheels/components/PageLayout.tsx +234 -0
- package/src/movethewheels/components/StatusBadge.tsx +243 -0
- package/src/movethewheels/components/index.ts +26 -0
- package/src/movethewheels/components/ui.tsx +124 -0
- package/src/movethewheels/constants/index.ts +65 -0
- package/src/movethewheels/constants/mockData.ts +1342 -0
- package/src/movethewheels/hooks/index.ts +55 -0
- package/src/movethewheels/hooks/useAnalytics.ts +476 -0
- package/src/movethewheels/hooks/useCustomers.ts +359 -0
- package/src/movethewheels/hooks/useFleet.ts +778 -0
- package/src/movethewheels/hooks/useInventory.ts +632 -0
- package/src/movethewheels/hooks/useOrders.ts +703 -0
- package/src/movethewheels/hooks/useRoutes.ts +453 -0
- package/src/movethewheels/hooks/useTracking.ts +505 -0
- package/src/movethewheels/index.ts +68 -0
- package/src/movethewheels/pages/AIAssistantPage.tsx +160 -0
- package/src/movethewheels/pages/AnalyticsPage.tsx +190 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +454 -0
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +207 -0
- package/src/movethewheels/pages/CustomersPage.tsx +115 -0
- package/src/movethewheels/pages/DashboardPage.tsx +414 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +261 -0
- package/src/movethewheels/pages/DriversPage.tsx +118 -0
- package/src/movethewheels/pages/FinancePage.tsx +141 -0
- package/src/movethewheels/pages/FleetPage.tsx +289 -0
- package/src/movethewheels/pages/ImportExportPage.tsx +165 -0
- package/src/movethewheels/pages/InventoryPage.tsx +212 -0
- package/src/movethewheels/pages/LiveTrackingPage.tsx +325 -0
- package/src/movethewheels/pages/MarketplacePage.tsx +235 -0
- package/src/movethewheels/pages/OrderDetailsPage.tsx +387 -0
- package/src/movethewheels/pages/OrdersListPage.tsx +241 -0
- package/src/movethewheels/pages/ProductDetailsPage.tsx +155 -0
- package/src/movethewheels/pages/ProductsPage.tsx +124 -0
- package/src/movethewheels/pages/ReportsPage.tsx +164 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +245 -0
- package/src/movethewheels/pages/RoutesPage.tsx +104 -0
- package/src/movethewheels/pages/SettingsPage.tsx +242 -0
- package/src/movethewheels/pages/TrackingPage.tsx +419 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +218 -0
- package/src/movethewheels/pages/VehiclesPage.tsx +124 -0
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +216 -0
- package/src/movethewheels/pages/WarehousesPage.tsx +122 -0
- package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +66 -0
- package/src/movethewheels/store/movethewheelsStore.ts +136 -0
- package/src/movethewheels/types/index.ts +744 -0
- package/src/movethewheels/utils/cn.ts +9 -0
- package/src/movethewheels/utils/formatters.ts +215 -0
- package/src/movethewheels/utils/graphqlClient.ts +63 -0
- package/src/movethewheels/utils/index.ts +8 -0
- package/src/movethewheels/utils/navigation.ts +70 -0
- package/src/operations/global/.gitkeep +0 -0
- package/src/operations/wspace/movethewheels/fragments/core.graphql +191 -0
- package/src/operations/wspace/movethewheels/mutations/entities.graphql +87 -0
- package/src/operations/wspace/movethewheels/mutations/logistics.graphql +86 -0
- package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +81 -0
- package/src/operations/wspace/movethewheels/mutations/orders.graphql +21 -0
- package/src/operations/wspace/movethewheels/queries/dashboard.graphql +61 -0
- package/src/operations/wspace/movethewheels/queries/entities.graphql +83 -0
- package/src/operations/wspace/movethewheels/queries/logistics.graphql +84 -0
- package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +40 -0
- package/src/operations/wspace/movethewheels/queries/orders.graphql +43 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import { G as e, H as t, K as n, U as r, W as i, d as a, f as o, g as s, h as c, i as l, it as u, l as d, n as f, q as p, r as m, u as h, z as g } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as _ } from "./arrow-left-6CiLhqVp.js";
|
|
3
|
+
import { t as v } from "./circle-check-big-D-JMHcTe.js";
|
|
4
|
+
import { t as y } from "./clock-CvwBKbQP.js";
|
|
5
|
+
import { t as b } from "./dollar-sign-CP9qeU5d.js";
|
|
6
|
+
import { t as x } from "./file-text-Dd_thxkn.js";
|
|
7
|
+
import { n as S, t as C } from "./phone-KdwpVmC4.js";
|
|
8
|
+
import { t as w } from "./map-pin-CFBOmh-A.js";
|
|
9
|
+
import { t as T } from "./package-DVZbDRcV.js";
|
|
10
|
+
import { t as E } from "./square-pen-BwQ67vLE.js";
|
|
11
|
+
import { t as D } from "./truck-BmDAzu05.js";
|
|
12
|
+
import { t as O } from "./user-BplzDrLP.js";
|
|
13
|
+
import { r as k } from "./graphqlClient-CdJyR_ed.js";
|
|
14
|
+
import { t as A } from "./useOrders-D_3_hGMp.js";
|
|
15
|
+
import { i as j, n as M, r as N, t as P } from "./StatusBadge-BrrwraIA.js";
|
|
16
|
+
import { n as F, r as I, t as L } from "./formatters-_vJlC-47.js";
|
|
17
|
+
import { t as R } from "./navigation-BgnOfsVd.js";
|
|
18
|
+
import { useParams as z } from "react-router-dom";
|
|
19
|
+
import { jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
20
|
+
//#region node_modules/lucide-react/dist/esm/icons/printer.js
|
|
21
|
+
var H = u("Printer", [
|
|
22
|
+
["path", {
|
|
23
|
+
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",
|
|
24
|
+
key: "143wyd"
|
|
25
|
+
}],
|
|
26
|
+
["path", {
|
|
27
|
+
d: "M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",
|
|
28
|
+
key: "1itne7"
|
|
29
|
+
}],
|
|
30
|
+
["rect", {
|
|
31
|
+
x: "6",
|
|
32
|
+
y: "14",
|
|
33
|
+
width: "12",
|
|
34
|
+
height: "8",
|
|
35
|
+
rx: "1",
|
|
36
|
+
key: "1ue0tg"
|
|
37
|
+
}]
|
|
38
|
+
]);
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/movethewheels/pages/OrderDetailsPage.tsx
|
|
41
|
+
function U() {
|
|
42
|
+
let { orderId: u } = z(), { basePath: U, navigate: W } = k(), { order: G, isLoading: K, error: q, refetch: J } = A(u), Y = (e) => {
|
|
43
|
+
W && W(R(U, e));
|
|
44
|
+
};
|
|
45
|
+
return K ? /* @__PURE__ */ B(m, { message: "Loading order details..." }) : q || !G ? /* @__PURE__ */ B(f, {
|
|
46
|
+
title: "Order not found",
|
|
47
|
+
message: "The order you're looking for doesn't exist or has been removed.",
|
|
48
|
+
onRetry: J
|
|
49
|
+
}) : /* @__PURE__ */ B(l, {
|
|
50
|
+
title: G.orderNumber,
|
|
51
|
+
subtitle: `Created ${I(G.createdAt, "full")}`,
|
|
52
|
+
icon: /* @__PURE__ */ B(T, { size: 24 }),
|
|
53
|
+
headerActions: /* @__PURE__ */ V("div", {
|
|
54
|
+
className: "flex gap-2",
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ V(h, {
|
|
57
|
+
variant: "outline",
|
|
58
|
+
onClick: () => {
|
|
59
|
+
W && W(R(U, "orders"));
|
|
60
|
+
},
|
|
61
|
+
children: [/* @__PURE__ */ B(_, { size: 16 }), "Back"]
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ V(h, {
|
|
64
|
+
variant: "outline",
|
|
65
|
+
children: [/* @__PURE__ */ B(H, { size: 16 }), "Print"]
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ V(h, {
|
|
68
|
+
onClick: () => Y(`orders/${u}/edit`),
|
|
69
|
+
children: [/* @__PURE__ */ B(E, { size: 16 }), "Edit"]
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
}),
|
|
73
|
+
headerContent: /* @__PURE__ */ V("div", {
|
|
74
|
+
className: "flex flex-wrap gap-2",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ B(N, {
|
|
77
|
+
status: G.status,
|
|
78
|
+
type: "order"
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ B(M, { priority: G.priority }),
|
|
81
|
+
/* @__PURE__ */ B(j, { type: G.orderType }),
|
|
82
|
+
/* @__PURE__ */ B(P, { status: G.pricing.paymentStatus })
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
children: /* @__PURE__ */ V("div", {
|
|
86
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
87
|
+
children: [/* @__PURE__ */ V("div", {
|
|
88
|
+
className: "lg:col-span-2 space-y-6",
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ V(a, { children: [/* @__PURE__ */ B(c, { children: /* @__PURE__ */ V(s, {
|
|
91
|
+
className: "flex items-center gap-2",
|
|
92
|
+
children: [/* @__PURE__ */ B(O, { size: 18 }), "Customer Information"]
|
|
93
|
+
}) }), /* @__PURE__ */ B(o, { children: /* @__PURE__ */ V("div", {
|
|
94
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
95
|
+
children: [/* @__PURE__ */ V("div", { children: [
|
|
96
|
+
/* @__PURE__ */ B("h4", {
|
|
97
|
+
className: "font-medium mb-2",
|
|
98
|
+
children: G.customerInfo.name
|
|
99
|
+
}),
|
|
100
|
+
G.customerInfo.company && /* @__PURE__ */ B("p", {
|
|
101
|
+
className: "text-sm text-muted-foreground mb-2",
|
|
102
|
+
children: G.customerInfo.company
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ V("div", {
|
|
105
|
+
className: "space-y-1 text-sm",
|
|
106
|
+
children: [/* @__PURE__ */ V("p", {
|
|
107
|
+
className: "flex items-center gap-2",
|
|
108
|
+
children: [/* @__PURE__ */ B(S, {
|
|
109
|
+
size: 14,
|
|
110
|
+
className: "text-muted-foreground"
|
|
111
|
+
}), G.customerInfo.email]
|
|
112
|
+
}), /* @__PURE__ */ V("p", {
|
|
113
|
+
className: "flex items-center gap-2",
|
|
114
|
+
children: [/* @__PURE__ */ B(C, {
|
|
115
|
+
size: 14,
|
|
116
|
+
className: "text-muted-foreground"
|
|
117
|
+
}), G.customerInfo.phone]
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
] }), /* @__PURE__ */ V("div", { children: [G.customerInfo.preferredDeliveryTime && /* @__PURE__ */ V("div", {
|
|
121
|
+
className: "mb-2",
|
|
122
|
+
children: [/* @__PURE__ */ B("p", {
|
|
123
|
+
className: "text-sm text-muted-foreground",
|
|
124
|
+
children: "Preferred Delivery Time"
|
|
125
|
+
}), /* @__PURE__ */ B("p", {
|
|
126
|
+
className: "text-sm",
|
|
127
|
+
children: G.customerInfo.preferredDeliveryTime
|
|
128
|
+
})]
|
|
129
|
+
}), G.customerInfo.deliveryInstructions && /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("p", {
|
|
130
|
+
className: "text-sm text-muted-foreground",
|
|
131
|
+
children: "Delivery Instructions"
|
|
132
|
+
}), /* @__PURE__ */ B("p", {
|
|
133
|
+
className: "text-sm",
|
|
134
|
+
children: G.customerInfo.deliveryInstructions
|
|
135
|
+
})] })] })]
|
|
136
|
+
}) })] }),
|
|
137
|
+
/* @__PURE__ */ V(a, { children: [/* @__PURE__ */ B(c, { children: /* @__PURE__ */ V(s, {
|
|
138
|
+
className: "flex items-center gap-2",
|
|
139
|
+
children: [/* @__PURE__ */ B(w, { size: 18 }), "Addresses"]
|
|
140
|
+
}) }), /* @__PURE__ */ B(o, { children: /* @__PURE__ */ V("div", {
|
|
141
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
142
|
+
children: [/* @__PURE__ */ V("div", { children: [
|
|
143
|
+
/* @__PURE__ */ B("h4", {
|
|
144
|
+
className: "font-medium mb-2 flex items-center gap-2",
|
|
145
|
+
children: /* @__PURE__ */ B(d, {
|
|
146
|
+
variant: "outline",
|
|
147
|
+
children: "Pickup"
|
|
148
|
+
})
|
|
149
|
+
}),
|
|
150
|
+
/* @__PURE__ */ B("p", {
|
|
151
|
+
className: "text-sm",
|
|
152
|
+
children: L(G.pickupAddress)
|
|
153
|
+
}),
|
|
154
|
+
G.scheduledPickup && /* @__PURE__ */ V("p", {
|
|
155
|
+
className: "text-sm text-muted-foreground mt-2",
|
|
156
|
+
children: ["Scheduled: ", I(G.scheduledPickup, "full")]
|
|
157
|
+
}),
|
|
158
|
+
G.actualPickup && /* @__PURE__ */ V("p", {
|
|
159
|
+
className: "text-sm text-green-600 mt-1",
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ B(v, {
|
|
162
|
+
size: 14,
|
|
163
|
+
className: "inline mr-1"
|
|
164
|
+
}),
|
|
165
|
+
"Picked up: ",
|
|
166
|
+
I(G.actualPickup, "full")
|
|
167
|
+
]
|
|
168
|
+
})
|
|
169
|
+
] }), /* @__PURE__ */ V("div", { children: [
|
|
170
|
+
/* @__PURE__ */ B("h4", {
|
|
171
|
+
className: "font-medium mb-2 flex items-center gap-2",
|
|
172
|
+
children: /* @__PURE__ */ B(d, {
|
|
173
|
+
variant: "outline",
|
|
174
|
+
children: "Delivery"
|
|
175
|
+
})
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ B("p", {
|
|
178
|
+
className: "text-sm",
|
|
179
|
+
children: L(G.deliveryAddress)
|
|
180
|
+
}),
|
|
181
|
+
G.scheduledDelivery && /* @__PURE__ */ V("p", {
|
|
182
|
+
className: "text-sm text-muted-foreground mt-2",
|
|
183
|
+
children: ["Scheduled: ", I(G.scheduledDelivery, "full")]
|
|
184
|
+
}),
|
|
185
|
+
G.actualDelivery && /* @__PURE__ */ V("p", {
|
|
186
|
+
className: "text-sm text-green-600 mt-1",
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ B(v, {
|
|
189
|
+
size: 14,
|
|
190
|
+
className: "inline mr-1"
|
|
191
|
+
}),
|
|
192
|
+
"Delivered: ",
|
|
193
|
+
I(G.actualDelivery, "full")
|
|
194
|
+
]
|
|
195
|
+
})
|
|
196
|
+
] })]
|
|
197
|
+
}) })] }),
|
|
198
|
+
/* @__PURE__ */ V(a, { children: [/* @__PURE__ */ B(c, { children: /* @__PURE__ */ V(s, {
|
|
199
|
+
className: "flex items-center gap-2",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ B(T, { size: 18 }),
|
|
202
|
+
"Order Items (",
|
|
203
|
+
G.items.length,
|
|
204
|
+
")"
|
|
205
|
+
]
|
|
206
|
+
}) }), /* @__PURE__ */ B(o, {
|
|
207
|
+
className: "p-0",
|
|
208
|
+
children: /* @__PURE__ */ V(t, { children: [/* @__PURE__ */ B(n, { children: /* @__PURE__ */ V(p, { children: [
|
|
209
|
+
/* @__PURE__ */ B(e, { children: "Item" }),
|
|
210
|
+
/* @__PURE__ */ B(e, { children: "SKU" }),
|
|
211
|
+
/* @__PURE__ */ B(e, {
|
|
212
|
+
className: "text-center",
|
|
213
|
+
children: "Qty"
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ B(e, {
|
|
216
|
+
className: "text-right",
|
|
217
|
+
children: "Unit Price"
|
|
218
|
+
}),
|
|
219
|
+
/* @__PURE__ */ B(e, {
|
|
220
|
+
className: "text-right",
|
|
221
|
+
children: "Total"
|
|
222
|
+
})
|
|
223
|
+
] }) }), /* @__PURE__ */ B(r, { children: G.items.map((e) => /* @__PURE__ */ V(p, { children: [
|
|
224
|
+
/* @__PURE__ */ B(i, { children: /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("p", {
|
|
225
|
+
className: "font-medium",
|
|
226
|
+
children: e.name
|
|
227
|
+
}), e.description && /* @__PURE__ */ B("p", {
|
|
228
|
+
className: "text-sm text-muted-foreground",
|
|
229
|
+
children: e.description
|
|
230
|
+
})] }) }),
|
|
231
|
+
/* @__PURE__ */ B(i, {
|
|
232
|
+
className: "font-mono text-sm",
|
|
233
|
+
children: e.sku
|
|
234
|
+
}),
|
|
235
|
+
/* @__PURE__ */ B(i, {
|
|
236
|
+
className: "text-center",
|
|
237
|
+
children: e.quantity
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ B(i, {
|
|
240
|
+
className: "text-right",
|
|
241
|
+
children: F(e.value)
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ B(i, {
|
|
244
|
+
className: "text-right font-medium",
|
|
245
|
+
children: F(e.value * e.quantity)
|
|
246
|
+
})
|
|
247
|
+
] }, e.id)) })] })
|
|
248
|
+
})] }),
|
|
249
|
+
/* @__PURE__ */ V(a, { children: [/* @__PURE__ */ B(c, { children: /* @__PURE__ */ V(s, {
|
|
250
|
+
className: "flex items-center gap-2",
|
|
251
|
+
children: [/* @__PURE__ */ B(y, { size: 18 }), "Order Timeline"]
|
|
252
|
+
}) }), /* @__PURE__ */ B(o, { children: /* @__PURE__ */ B("div", {
|
|
253
|
+
className: "relative",
|
|
254
|
+
children: G.timeline.map((e, t) => /* @__PURE__ */ V("div", {
|
|
255
|
+
className: "flex gap-4 pb-6 last:pb-0",
|
|
256
|
+
children: [/* @__PURE__ */ V("div", {
|
|
257
|
+
className: "relative",
|
|
258
|
+
children: [/* @__PURE__ */ B("div", { className: "w-3 h-3 rounded-full bg-primary mt-1.5" }), t < G.timeline.length - 1 && /* @__PURE__ */ B("div", { className: "absolute top-4 left-1.5 w-px h-full -ml-px bg-border" })]
|
|
259
|
+
}), /* @__PURE__ */ V("div", {
|
|
260
|
+
className: "flex-1",
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ V("div", {
|
|
263
|
+
className: "flex items-center gap-2 mb-1",
|
|
264
|
+
children: [/* @__PURE__ */ B(N, {
|
|
265
|
+
status: e.status,
|
|
266
|
+
type: "order",
|
|
267
|
+
size: "sm"
|
|
268
|
+
}), /* @__PURE__ */ B("span", {
|
|
269
|
+
className: "text-sm text-muted-foreground",
|
|
270
|
+
children: I(e.timestamp, "full")
|
|
271
|
+
})]
|
|
272
|
+
}),
|
|
273
|
+
e.notes && /* @__PURE__ */ B("p", {
|
|
274
|
+
className: "text-sm",
|
|
275
|
+
children: e.notes
|
|
276
|
+
}),
|
|
277
|
+
/* @__PURE__ */ V("p", {
|
|
278
|
+
className: "text-xs text-muted-foreground",
|
|
279
|
+
children: ["by ", e.performedBy]
|
|
280
|
+
})
|
|
281
|
+
]
|
|
282
|
+
})]
|
|
283
|
+
}, t))
|
|
284
|
+
}) })] })
|
|
285
|
+
]
|
|
286
|
+
}), /* @__PURE__ */ V("div", {
|
|
287
|
+
className: "space-y-6",
|
|
288
|
+
children: [
|
|
289
|
+
/* @__PURE__ */ V(a, { children: [/* @__PURE__ */ B(c, { children: /* @__PURE__ */ V(s, {
|
|
290
|
+
className: "flex items-center gap-2",
|
|
291
|
+
children: [/* @__PURE__ */ B(b, { size: 18 }), "Order Summary"]
|
|
292
|
+
}) }), /* @__PURE__ */ B(o, { children: /* @__PURE__ */ V("div", {
|
|
293
|
+
className: "space-y-3",
|
|
294
|
+
children: [
|
|
295
|
+
/* @__PURE__ */ V("div", {
|
|
296
|
+
className: "flex justify-between text-sm",
|
|
297
|
+
children: [/* @__PURE__ */ B("span", {
|
|
298
|
+
className: "text-muted-foreground",
|
|
299
|
+
children: "Subtotal"
|
|
300
|
+
}), /* @__PURE__ */ B("span", { children: F(G.pricing.subtotal) })]
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ V("div", {
|
|
303
|
+
className: "flex justify-between text-sm",
|
|
304
|
+
children: [/* @__PURE__ */ B("span", {
|
|
305
|
+
className: "text-muted-foreground",
|
|
306
|
+
children: "Delivery"
|
|
307
|
+
}), /* @__PURE__ */ B("span", { children: F(G.pricing.fees.delivery) })]
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ V("div", {
|
|
310
|
+
className: "flex justify-between text-sm",
|
|
311
|
+
children: [/* @__PURE__ */ B("span", {
|
|
312
|
+
className: "text-muted-foreground",
|
|
313
|
+
children: "Handling"
|
|
314
|
+
}), /* @__PURE__ */ B("span", { children: F(G.pricing.fees.handling) })]
|
|
315
|
+
}),
|
|
316
|
+
G.pricing.fees.insurance && /* @__PURE__ */ V("div", {
|
|
317
|
+
className: "flex justify-between text-sm",
|
|
318
|
+
children: [/* @__PURE__ */ B("span", {
|
|
319
|
+
className: "text-muted-foreground",
|
|
320
|
+
children: "Insurance"
|
|
321
|
+
}), /* @__PURE__ */ B("span", { children: F(G.pricing.fees.insurance) })]
|
|
322
|
+
}),
|
|
323
|
+
/* @__PURE__ */ V("div", {
|
|
324
|
+
className: "flex justify-between text-sm",
|
|
325
|
+
children: [/* @__PURE__ */ B("span", {
|
|
326
|
+
className: "text-muted-foreground",
|
|
327
|
+
children: "Taxes"
|
|
328
|
+
}), /* @__PURE__ */ B("span", { children: F(G.pricing.taxes) })]
|
|
329
|
+
}),
|
|
330
|
+
/* @__PURE__ */ B(g, {}),
|
|
331
|
+
/* @__PURE__ */ V("div", {
|
|
332
|
+
className: "flex justify-between font-medium",
|
|
333
|
+
children: [/* @__PURE__ */ B("span", { children: "Total" }), /* @__PURE__ */ B("span", {
|
|
334
|
+
className: "text-lg",
|
|
335
|
+
children: F(G.pricing.total)
|
|
336
|
+
})]
|
|
337
|
+
}),
|
|
338
|
+
/* @__PURE__ */ V("div", {
|
|
339
|
+
className: "pt-2",
|
|
340
|
+
children: [/* @__PURE__ */ B("p", {
|
|
341
|
+
className: "text-sm text-muted-foreground",
|
|
342
|
+
children: "Payment Method"
|
|
343
|
+
}), /* @__PURE__ */ B("p", {
|
|
344
|
+
className: "text-sm capitalize",
|
|
345
|
+
children: G.pricing.paymentMethod.replace("_", " ")
|
|
346
|
+
})]
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
}) })] }),
|
|
350
|
+
/* @__PURE__ */ V(a, { children: [/* @__PURE__ */ B(c, { children: /* @__PURE__ */ V(s, {
|
|
351
|
+
className: "flex items-center gap-2",
|
|
352
|
+
children: [/* @__PURE__ */ B(D, { size: 18 }), "Assignment"]
|
|
353
|
+
}) }), /* @__PURE__ */ B(o, { children: /* @__PURE__ */ V("div", {
|
|
354
|
+
className: "space-y-4",
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("p", {
|
|
357
|
+
className: "text-sm text-muted-foreground",
|
|
358
|
+
children: "Driver"
|
|
359
|
+
}), /* @__PURE__ */ B("p", {
|
|
360
|
+
className: "text-sm",
|
|
361
|
+
children: G.driverId || "Not assigned"
|
|
362
|
+
})] }),
|
|
363
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("p", {
|
|
364
|
+
className: "text-sm text-muted-foreground",
|
|
365
|
+
children: "Vehicle"
|
|
366
|
+
}), /* @__PURE__ */ B("p", {
|
|
367
|
+
className: "text-sm",
|
|
368
|
+
children: G.vehicleId || "Not assigned"
|
|
369
|
+
})] }),
|
|
370
|
+
/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("p", {
|
|
371
|
+
className: "text-sm text-muted-foreground",
|
|
372
|
+
children: "Tracking Number"
|
|
373
|
+
}), /* @__PURE__ */ B("p", {
|
|
374
|
+
className: "text-sm font-mono",
|
|
375
|
+
children: G.trackingNumber
|
|
376
|
+
})] }),
|
|
377
|
+
/* @__PURE__ */ V(h, {
|
|
378
|
+
variant: "outline",
|
|
379
|
+
className: "w-full",
|
|
380
|
+
onClick: () => Y(`tracking?order=${G.id}`),
|
|
381
|
+
children: [/* @__PURE__ */ B(w, { size: 16 }), "Track Order"]
|
|
382
|
+
})
|
|
383
|
+
]
|
|
384
|
+
}) })] }),
|
|
385
|
+
G.specialInstructions && /* @__PURE__ */ V(a, { children: [/* @__PURE__ */ B(c, { children: /* @__PURE__ */ V(s, {
|
|
386
|
+
className: "flex items-center gap-2",
|
|
387
|
+
children: [/* @__PURE__ */ B(x, { size: 18 }), "Special Instructions"]
|
|
388
|
+
}) }), /* @__PURE__ */ B(o, { children: /* @__PURE__ */ B("p", {
|
|
389
|
+
className: "text-sm",
|
|
390
|
+
children: G.specialInstructions
|
|
391
|
+
}) })] })
|
|
392
|
+
]
|
|
393
|
+
})]
|
|
394
|
+
})
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
//#endregion
|
|
398
|
+
export { U as default };
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { F as e, I as t, L as n, P as r, R as i, d as a, f as o, i as s, l as c, u as l } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as u } from "./DataTable-CRIKfdIN.js";
|
|
3
|
+
import { t as d } from "./download-CIuG04pJ.js";
|
|
4
|
+
import { t as f } from "./filter-DyRMX9CU.js";
|
|
5
|
+
import { t as p } from "./package-DVZbDRcV.js";
|
|
6
|
+
import { t as m } from "./plus-Bl7uX6Ji.js";
|
|
7
|
+
import { t as h } from "./refresh-cw-BYjl3K-8.js";
|
|
8
|
+
import { r as g } from "./graphqlClient-CdJyR_ed.js";
|
|
9
|
+
import { r as _ } from "./useOrders-D_3_hGMp.js";
|
|
10
|
+
import { i as v, n as y, r as b } from "./StatusBadge-BrrwraIA.js";
|
|
11
|
+
import { n as x, r as S } from "./formatters-_vJlC-47.js";
|
|
12
|
+
import { t as C } from "./navigation-BgnOfsVd.js";
|
|
13
|
+
import { useState as w } from "react";
|
|
14
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
15
|
+
import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
16
|
+
//#region src/movethewheels/pages/OrdersListPage.tsx
|
|
17
|
+
function O() {
|
|
18
|
+
let { t: O } = D(), k = (e, t) => {
|
|
19
|
+
let n = O(e);
|
|
20
|
+
return n === e ? t : n;
|
|
21
|
+
}, { basePath: A, navigate: j } = g(), [M, N] = w("all"), [P, F] = w("all"), { orders: I, totalOrders: L, isLoading: R, refetch: z } = _({
|
|
22
|
+
filters: {
|
|
23
|
+
status: M === "all" ? void 0 : M,
|
|
24
|
+
orderType: P === "all" ? void 0 : P
|
|
25
|
+
},
|
|
26
|
+
limit: 50
|
|
27
|
+
}), B = (e) => {
|
|
28
|
+
j && j(C(A, e));
|
|
29
|
+
}, V = [
|
|
30
|
+
{
|
|
31
|
+
id: "orderNumber",
|
|
32
|
+
header: k("movethewheels.orders.table.orderNumber", "Order #"),
|
|
33
|
+
accessorKey: "orderNumber",
|
|
34
|
+
sortable: !0,
|
|
35
|
+
className: "min-w-[100px] whitespace-nowrap",
|
|
36
|
+
cell: (e) => /* @__PURE__ */ T("span", {
|
|
37
|
+
className: "font-medium text-primary",
|
|
38
|
+
children: e.orderNumber
|
|
39
|
+
})
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "customer",
|
|
43
|
+
header: k("movethewheels.orders.table.customer", "Customer"),
|
|
44
|
+
className: "min-w-[180px] max-w-[220px]",
|
|
45
|
+
cell: (e) => /* @__PURE__ */ E("div", {
|
|
46
|
+
className: "min-w-0",
|
|
47
|
+
children: [/* @__PURE__ */ T("p", {
|
|
48
|
+
className: "font-medium truncate",
|
|
49
|
+
children: e.customerInfo.name
|
|
50
|
+
}), /* @__PURE__ */ T("p", {
|
|
51
|
+
className: "text-sm text-muted-foreground truncate",
|
|
52
|
+
children: e.customerInfo.email
|
|
53
|
+
})]
|
|
54
|
+
})
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "status",
|
|
58
|
+
header: k("movethewheels.orders.table.status", "Status"),
|
|
59
|
+
accessorKey: "status",
|
|
60
|
+
sortable: !0,
|
|
61
|
+
className: "min-w-[130px] whitespace-nowrap",
|
|
62
|
+
cell: (e) => /* @__PURE__ */ T(b, {
|
|
63
|
+
status: e.status,
|
|
64
|
+
type: "order"
|
|
65
|
+
})
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "type",
|
|
69
|
+
header: k("movethewheels.orders.table.type", "Type"),
|
|
70
|
+
accessorKey: "orderType",
|
|
71
|
+
className: "min-w-[70px] whitespace-nowrap",
|
|
72
|
+
cell: (e) => /* @__PURE__ */ T(v, { type: e.orderType })
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "priority",
|
|
76
|
+
header: k("movethewheels.orders.table.priority", "Priority"),
|
|
77
|
+
accessorKey: "priority",
|
|
78
|
+
sortable: !0,
|
|
79
|
+
className: "min-w-[90px] whitespace-nowrap",
|
|
80
|
+
cell: (e) => /* @__PURE__ */ T(y, { priority: e.priority })
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "items",
|
|
84
|
+
header: k("movethewheels.orders.table.items", "Items"),
|
|
85
|
+
className: "min-w-[80px] whitespace-nowrap",
|
|
86
|
+
cell: (e) => /* @__PURE__ */ E(c, {
|
|
87
|
+
variant: "secondary",
|
|
88
|
+
children: [
|
|
89
|
+
e.items.length,
|
|
90
|
+
" ",
|
|
91
|
+
k("movethewheels.orders.table.itemsSuffix", "items")
|
|
92
|
+
]
|
|
93
|
+
})
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "total",
|
|
97
|
+
header: k("movethewheels.orders.table.total", "Total"),
|
|
98
|
+
accessorKey: "pricing",
|
|
99
|
+
sortable: !0,
|
|
100
|
+
className: "min-w-[100px] whitespace-nowrap text-right",
|
|
101
|
+
cell: (e) => /* @__PURE__ */ T("span", {
|
|
102
|
+
className: "font-medium",
|
|
103
|
+
children: x(e.pricing.total)
|
|
104
|
+
})
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "scheduledDelivery",
|
|
108
|
+
header: k("movethewheels.orders.table.deliveryDate", "Delivery Date"),
|
|
109
|
+
accessorKey: "scheduledDelivery",
|
|
110
|
+
sortable: !0,
|
|
111
|
+
className: "min-w-[110px] whitespace-nowrap",
|
|
112
|
+
cell: (e) => e.scheduledDelivery ? S(e.scheduledDelivery) : "-"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "createdAt",
|
|
116
|
+
header: k("movethewheels.orders.table.created", "Created"),
|
|
117
|
+
accessorKey: "createdAt",
|
|
118
|
+
sortable: !0,
|
|
119
|
+
className: "min-w-[100px] whitespace-nowrap",
|
|
120
|
+
cell: (e) => S(e.createdAt, "relative")
|
|
121
|
+
}
|
|
122
|
+
], H = [
|
|
123
|
+
{
|
|
124
|
+
value: "all",
|
|
125
|
+
label: k("movethewheels.orders.filters.allStatuses", "All Statuses")
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
value: "pending",
|
|
129
|
+
label: k("movethewheels.orders.status.pending", "Pending")
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
value: "confirmed",
|
|
133
|
+
label: k("movethewheels.orders.status.confirmed", "Confirmed")
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
value: "assigned",
|
|
137
|
+
label: k("movethewheels.orders.status.assigned", "Assigned")
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
value: "picked_up",
|
|
141
|
+
label: k("movethewheels.orders.status.pickedUp", "Picked Up")
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
value: "in_transit",
|
|
145
|
+
label: k("movethewheels.orders.status.inTransit", "In Transit")
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
value: "out_for_delivery",
|
|
149
|
+
label: k("movethewheels.orders.status.outForDelivery", "Out for Delivery")
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
value: "delivered",
|
|
153
|
+
label: k("movethewheels.orders.status.delivered", "Delivered")
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
value: "cancelled",
|
|
157
|
+
label: k("movethewheels.orders.status.cancelled", "Cancelled")
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
value: "failed",
|
|
161
|
+
label: k("movethewheels.orders.status.failed", "Failed")
|
|
162
|
+
}
|
|
163
|
+
];
|
|
164
|
+
return /* @__PURE__ */ E(s, {
|
|
165
|
+
title: k("movethewheels.orders.title", "Orders"),
|
|
166
|
+
subtitle: `${L} ${k("movethewheels.orders.subtitle", "total orders")}`,
|
|
167
|
+
icon: /* @__PURE__ */ T(p, { size: 24 }),
|
|
168
|
+
headerActions: /* @__PURE__ */ E("div", {
|
|
169
|
+
className: "flex gap-2",
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ E(l, {
|
|
172
|
+
variant: "outline",
|
|
173
|
+
onClick: z,
|
|
174
|
+
children: [/* @__PURE__ */ T(h, { size: 16 }), k("movethewheels.orders.actions.refresh", "Refresh")]
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ E(l, {
|
|
177
|
+
variant: "outline",
|
|
178
|
+
children: [/* @__PURE__ */ T(d, { size: 16 }), k("movethewheels.orders.actions.export", "Export")]
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ E(l, {
|
|
181
|
+
onClick: () => B("orders/new"),
|
|
182
|
+
children: [/* @__PURE__ */ T(m, { size: 16 }), k("movethewheels.orders.actions.newOrder", "New Order")]
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
}),
|
|
186
|
+
children: [/* @__PURE__ */ T(a, { children: /* @__PURE__ */ T(o, {
|
|
187
|
+
className: "p-4",
|
|
188
|
+
children: /* @__PURE__ */ E("div", {
|
|
189
|
+
className: "flex flex-wrap items-center gap-4",
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ E("div", {
|
|
192
|
+
className: "flex items-center gap-2",
|
|
193
|
+
children: [/* @__PURE__ */ T(f, {
|
|
194
|
+
size: 16,
|
|
195
|
+
className: "text-muted-foreground"
|
|
196
|
+
}), /* @__PURE__ */ T("span", {
|
|
197
|
+
className: "text-sm font-medium",
|
|
198
|
+
children: k("movethewheels.orders.filters.label", "Filters:")
|
|
199
|
+
})]
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ E(r, {
|
|
202
|
+
value: M,
|
|
203
|
+
onValueChange: (e) => N(e),
|
|
204
|
+
children: [/* @__PURE__ */ T(n, {
|
|
205
|
+
className: "w-[180px]",
|
|
206
|
+
children: /* @__PURE__ */ T(i, { placeholder: k("movethewheels.orders.filters.status", "Status") })
|
|
207
|
+
}), /* @__PURE__ */ T(e, { children: H.map((e) => /* @__PURE__ */ T(t, {
|
|
208
|
+
value: e.value,
|
|
209
|
+
children: e.label
|
|
210
|
+
}, e.value)) })]
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ E(r, {
|
|
213
|
+
value: P,
|
|
214
|
+
onValueChange: (e) => F(e),
|
|
215
|
+
children: [/* @__PURE__ */ T(n, {
|
|
216
|
+
className: "w-[150px]",
|
|
217
|
+
children: /* @__PURE__ */ T(i, { placeholder: k("movethewheels.orders.filters.type", "Type") })
|
|
218
|
+
}), /* @__PURE__ */ E(e, { children: [
|
|
219
|
+
/* @__PURE__ */ T(t, {
|
|
220
|
+
value: "all",
|
|
221
|
+
children: k("movethewheels.orders.filters.allTypes", "All Types")
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ T(t, {
|
|
224
|
+
value: "b2b",
|
|
225
|
+
children: "B2B"
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ T(t, {
|
|
228
|
+
value: "b2c",
|
|
229
|
+
children: "B2C"
|
|
230
|
+
})
|
|
231
|
+
] })]
|
|
232
|
+
}),
|
|
233
|
+
(M !== "all" || P !== "all") && /* @__PURE__ */ T(l, {
|
|
234
|
+
variant: "ghost",
|
|
235
|
+
size: "sm",
|
|
236
|
+
onClick: () => {
|
|
237
|
+
N("all"), F("all");
|
|
238
|
+
},
|
|
239
|
+
children: k("movethewheels.orders.filters.clear", "Clear filters")
|
|
240
|
+
})
|
|
241
|
+
]
|
|
242
|
+
})
|
|
243
|
+
}) }), /* @__PURE__ */ T(u, {
|
|
244
|
+
columns: V,
|
|
245
|
+
data: I,
|
|
246
|
+
isLoading: R,
|
|
247
|
+
searchable: !0,
|
|
248
|
+
searchPlaceholder: k("movethewheels.orders.searchPlaceholder", "Search orders..."),
|
|
249
|
+
searchFields: ["orderNumber", "customerInfo"],
|
|
250
|
+
onRowClick: (e) => B(`orders/${e.id}`),
|
|
251
|
+
getRowId: (e) => e.id,
|
|
252
|
+
emptyMessage: k("movethewheels.orders.empty", "No orders found")
|
|
253
|
+
})]
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
//#endregion
|
|
257
|
+
export { O as default };
|