@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,239 @@
|
|
|
1
|
+
import { d as e, f as t, g as n, h as r, i, it as a, l as o, n as s, r as c, u as l } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as u } from "./arrow-left-6CiLhqVp.js";
|
|
3
|
+
import { t as d } from "./file-text-Dd_thxkn.js";
|
|
4
|
+
import { n as f, t as p } from "./phone-KdwpVmC4.js";
|
|
5
|
+
import { t as m } from "./map-pin-CFBOmh-A.js";
|
|
6
|
+
import { t as h } from "./square-pen-BwQ67vLE.js";
|
|
7
|
+
import { t as g } from "./star-BlVsC3Ad.js";
|
|
8
|
+
import { t as _ } from "./users-i-igmsP4.js";
|
|
9
|
+
import { r as v } from "./graphqlClient-CdJyR_ed.js";
|
|
10
|
+
import { t as y } from "./useCustomers-bS3a4ytk.js";
|
|
11
|
+
import { i as b } from "./StatusBadge-BrrwraIA.js";
|
|
12
|
+
import { r as x, t as S } from "./formatters-_vJlC-47.js";
|
|
13
|
+
import { t as C } from "./navigation-BgnOfsVd.js";
|
|
14
|
+
import { useParams as w } from "react-router-dom";
|
|
15
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
16
|
+
//#region node_modules/lucide-react/dist/esm/icons/building.js
|
|
17
|
+
var D = a("Building", [
|
|
18
|
+
["rect", {
|
|
19
|
+
width: "16",
|
|
20
|
+
height: "20",
|
|
21
|
+
x: "4",
|
|
22
|
+
y: "2",
|
|
23
|
+
rx: "2",
|
|
24
|
+
ry: "2",
|
|
25
|
+
key: "76otgf"
|
|
26
|
+
}],
|
|
27
|
+
["path", {
|
|
28
|
+
d: "M9 22v-4h6v4",
|
|
29
|
+
key: "r93iot"
|
|
30
|
+
}],
|
|
31
|
+
["path", {
|
|
32
|
+
d: "M8 6h.01",
|
|
33
|
+
key: "1dz90k"
|
|
34
|
+
}],
|
|
35
|
+
["path", {
|
|
36
|
+
d: "M16 6h.01",
|
|
37
|
+
key: "1x0f13"
|
|
38
|
+
}],
|
|
39
|
+
["path", {
|
|
40
|
+
d: "M12 6h.01",
|
|
41
|
+
key: "1vi96p"
|
|
42
|
+
}],
|
|
43
|
+
["path", {
|
|
44
|
+
d: "M12 10h.01",
|
|
45
|
+
key: "1nrarc"
|
|
46
|
+
}],
|
|
47
|
+
["path", {
|
|
48
|
+
d: "M12 14h.01",
|
|
49
|
+
key: "1etili"
|
|
50
|
+
}],
|
|
51
|
+
["path", {
|
|
52
|
+
d: "M16 10h.01",
|
|
53
|
+
key: "1m94wz"
|
|
54
|
+
}],
|
|
55
|
+
["path", {
|
|
56
|
+
d: "M16 14h.01",
|
|
57
|
+
key: "1gbofw"
|
|
58
|
+
}],
|
|
59
|
+
["path", {
|
|
60
|
+
d: "M8 10h.01",
|
|
61
|
+
key: "19clt8"
|
|
62
|
+
}],
|
|
63
|
+
["path", {
|
|
64
|
+
d: "M8 14h.01",
|
|
65
|
+
key: "6423bh"
|
|
66
|
+
}]
|
|
67
|
+
]);
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/movethewheels/pages/CustomerDetailsPage.tsx
|
|
70
|
+
function O() {
|
|
71
|
+
let { customerId: a } = w(), { basePath: O, navigate: k } = v(), { customer: A, isLoading: j, error: M, refetch: N } = y(a), P = () => k?.(C(O, "customers"));
|
|
72
|
+
return a ? j ? /* @__PURE__ */ T(c, { message: "Loading customer details..." }) : M || !A ? /* @__PURE__ */ T(s, {
|
|
73
|
+
title: "Customer not found",
|
|
74
|
+
onRetry: N
|
|
75
|
+
}) : /* @__PURE__ */ T(i, {
|
|
76
|
+
title: A.name,
|
|
77
|
+
subtitle: A.company || A.email,
|
|
78
|
+
icon: /* @__PURE__ */ T(_, { size: 24 }),
|
|
79
|
+
headerActions: /* @__PURE__ */ E("div", {
|
|
80
|
+
className: "flex gap-2",
|
|
81
|
+
children: [/* @__PURE__ */ E(l, {
|
|
82
|
+
variant: "outline",
|
|
83
|
+
onClick: P,
|
|
84
|
+
children: [/* @__PURE__ */ T(u, { size: 16 }), " Back"]
|
|
85
|
+
}), /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(h, { size: 16 }), " Edit"] })]
|
|
86
|
+
}),
|
|
87
|
+
headerContent: /* @__PURE__ */ E("div", {
|
|
88
|
+
className: "flex items-center gap-4",
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ T(b, { type: A.type }),
|
|
91
|
+
/* @__PURE__ */ T(o, {
|
|
92
|
+
variant: A.isActive ? "default" : "secondary",
|
|
93
|
+
children: A.isActive ? "Active" : "Inactive"
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ E("div", {
|
|
96
|
+
className: "flex items-center gap-1",
|
|
97
|
+
children: [/* @__PURE__ */ T(g, {
|
|
98
|
+
size: 16,
|
|
99
|
+
className: "text-yellow-500 fill-yellow-500"
|
|
100
|
+
}), /* @__PURE__ */ T("span", {
|
|
101
|
+
className: "font-medium",
|
|
102
|
+
children: A.rating.toFixed(1)
|
|
103
|
+
})]
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
}),
|
|
107
|
+
children: /* @__PURE__ */ E("div", {
|
|
108
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
109
|
+
children: [/* @__PURE__ */ E("div", {
|
|
110
|
+
className: "lg:col-span-2 space-y-6",
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Contact Information" }) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ E("div", {
|
|
113
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
114
|
+
children: [/* @__PURE__ */ E("div", {
|
|
115
|
+
className: "space-y-4",
|
|
116
|
+
children: [/* @__PURE__ */ E("div", {
|
|
117
|
+
className: "flex items-center gap-3",
|
|
118
|
+
children: [/* @__PURE__ */ T(f, {
|
|
119
|
+
size: 18,
|
|
120
|
+
className: "text-muted-foreground"
|
|
121
|
+
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
122
|
+
className: "text-sm text-muted-foreground",
|
|
123
|
+
children: "Email"
|
|
124
|
+
}), /* @__PURE__ */ T("p", {
|
|
125
|
+
className: "font-medium",
|
|
126
|
+
children: A.email
|
|
127
|
+
})] })]
|
|
128
|
+
}), /* @__PURE__ */ E("div", {
|
|
129
|
+
className: "flex items-center gap-3",
|
|
130
|
+
children: [/* @__PURE__ */ T(p, {
|
|
131
|
+
size: 18,
|
|
132
|
+
className: "text-muted-foreground"
|
|
133
|
+
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
134
|
+
className: "text-sm text-muted-foreground",
|
|
135
|
+
children: "Phone"
|
|
136
|
+
}), /* @__PURE__ */ T("p", {
|
|
137
|
+
className: "font-medium",
|
|
138
|
+
children: A.phone
|
|
139
|
+
})] })]
|
|
140
|
+
})]
|
|
141
|
+
}), /* @__PURE__ */ E("div", {
|
|
142
|
+
className: "space-y-4",
|
|
143
|
+
children: [A.company && /* @__PURE__ */ E("div", {
|
|
144
|
+
className: "flex items-center gap-3",
|
|
145
|
+
children: [/* @__PURE__ */ T(D, {
|
|
146
|
+
size: 18,
|
|
147
|
+
className: "text-muted-foreground"
|
|
148
|
+
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
149
|
+
className: "text-sm text-muted-foreground",
|
|
150
|
+
children: "Company"
|
|
151
|
+
}), /* @__PURE__ */ T("p", {
|
|
152
|
+
className: "font-medium",
|
|
153
|
+
children: A.company
|
|
154
|
+
})] })]
|
|
155
|
+
}), A.website && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
156
|
+
className: "text-sm text-muted-foreground",
|
|
157
|
+
children: "Website"
|
|
158
|
+
}), /* @__PURE__ */ T("a", {
|
|
159
|
+
href: A.website,
|
|
160
|
+
className: "text-primary hover:underline",
|
|
161
|
+
children: A.website
|
|
162
|
+
})] })]
|
|
163
|
+
})]
|
|
164
|
+
}) })] }),
|
|
165
|
+
/* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ E(n, {
|
|
166
|
+
className: "flex items-center gap-2",
|
|
167
|
+
children: [/* @__PURE__ */ T(m, { size: 18 }), " Address"]
|
|
168
|
+
}) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T("p", { children: S(A.address) }) })] }),
|
|
169
|
+
A.notes && /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ E(n, {
|
|
170
|
+
className: "flex items-center gap-2",
|
|
171
|
+
children: [/* @__PURE__ */ T(d, { size: 18 }), " Notes"]
|
|
172
|
+
}) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T("p", { children: A.notes }) })] })
|
|
173
|
+
]
|
|
174
|
+
}), /* @__PURE__ */ E("div", {
|
|
175
|
+
className: "space-y-6",
|
|
176
|
+
children: [/* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Business Details" }) }), /* @__PURE__ */ E(t, {
|
|
177
|
+
className: "space-y-3",
|
|
178
|
+
children: [
|
|
179
|
+
A.businessLicense && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
180
|
+
className: "text-sm text-muted-foreground",
|
|
181
|
+
children: "Business License"
|
|
182
|
+
}), /* @__PURE__ */ T("p", {
|
|
183
|
+
className: "font-mono",
|
|
184
|
+
children: A.businessLicense
|
|
185
|
+
})] }),
|
|
186
|
+
A.taxId && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
187
|
+
className: "text-sm text-muted-foreground",
|
|
188
|
+
children: "Tax ID"
|
|
189
|
+
}), /* @__PURE__ */ T("p", {
|
|
190
|
+
className: "font-mono",
|
|
191
|
+
children: A.taxId
|
|
192
|
+
})] }),
|
|
193
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
194
|
+
className: "text-sm text-muted-foreground",
|
|
195
|
+
children: "Preferred Contact"
|
|
196
|
+
}), /* @__PURE__ */ T("p", {
|
|
197
|
+
className: "capitalize",
|
|
198
|
+
children: A.preferredContactMethod
|
|
199
|
+
})] }),
|
|
200
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
201
|
+
className: "text-sm text-muted-foreground",
|
|
202
|
+
children: "Marketing Opt-in"
|
|
203
|
+
}), /* @__PURE__ */ T(o, {
|
|
204
|
+
variant: A.marketingOptIn ? "default" : "secondary",
|
|
205
|
+
children: A.marketingOptIn ? "Yes" : "No"
|
|
206
|
+
})] })
|
|
207
|
+
]
|
|
208
|
+
})] }), /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Account Info" }) }), /* @__PURE__ */ E(t, {
|
|
209
|
+
className: "space-y-3",
|
|
210
|
+
children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
211
|
+
className: "text-sm text-muted-foreground",
|
|
212
|
+
children: "Created"
|
|
213
|
+
}), /* @__PURE__ */ T("p", { children: x(A.createdAt, "full") })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
214
|
+
className: "text-sm text-muted-foreground",
|
|
215
|
+
children: "Last Updated"
|
|
216
|
+
}), /* @__PURE__ */ T("p", { children: x(A.updatedAt, "relative") })] })]
|
|
217
|
+
})] })]
|
|
218
|
+
})]
|
|
219
|
+
})
|
|
220
|
+
}) : /* @__PURE__ */ T(i, {
|
|
221
|
+
title: "New Customer",
|
|
222
|
+
subtitle: "Add a new customer",
|
|
223
|
+
icon: /* @__PURE__ */ T(_, { size: 24 }),
|
|
224
|
+
headerActions: /* @__PURE__ */ E(l, {
|
|
225
|
+
variant: "outline",
|
|
226
|
+
onClick: P,
|
|
227
|
+
children: [/* @__PURE__ */ T(u, { size: 16 }), " Back"]
|
|
228
|
+
}),
|
|
229
|
+
children: /* @__PURE__ */ T(e, { children: /* @__PURE__ */ T(t, {
|
|
230
|
+
className: "p-8 text-center",
|
|
231
|
+
children: /* @__PURE__ */ T("p", {
|
|
232
|
+
className: "text-muted-foreground",
|
|
233
|
+
children: "Customer creation form would go here"
|
|
234
|
+
})
|
|
235
|
+
}) })
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
export { O as default };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { i as e, l as t, o as n, s as r, u as i } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as a } from "./DataTable-CRIKfdIN.js";
|
|
3
|
+
import { t as o } from "./download-CIuG04pJ.js";
|
|
4
|
+
import { t as s } from "./plus-Bl7uX6Ji.js";
|
|
5
|
+
import { t as c } from "./refresh-cw-BYjl3K-8.js";
|
|
6
|
+
import { t as l } from "./star-BlVsC3Ad.js";
|
|
7
|
+
import { t as u } from "./users-i-igmsP4.js";
|
|
8
|
+
import { r as d } from "./graphqlClient-CdJyR_ed.js";
|
|
9
|
+
import { r as f } from "./useCustomers-bS3a4ytk.js";
|
|
10
|
+
import { i as p } from "./StatusBadge-BrrwraIA.js";
|
|
11
|
+
import { r as m } from "./formatters-_vJlC-47.js";
|
|
12
|
+
import { t as h } from "./navigation-BgnOfsVd.js";
|
|
13
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
14
|
+
//#region src/movethewheels/pages/CustomersPage.tsx
|
|
15
|
+
function v() {
|
|
16
|
+
let { basePath: v, navigate: y } = d(), { customers: b, totalCustomers: x, isLoading: S, refetch: C } = f({ limit: 100 }), w = (e) => y?.(h(v, e));
|
|
17
|
+
return /* @__PURE__ */ g(e, {
|
|
18
|
+
title: "Customers",
|
|
19
|
+
subtitle: `${x} customers`,
|
|
20
|
+
icon: /* @__PURE__ */ g(u, { size: 24 }),
|
|
21
|
+
headerActions: /* @__PURE__ */ _("div", {
|
|
22
|
+
className: "flex gap-2",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ _(i, {
|
|
25
|
+
variant: "outline",
|
|
26
|
+
onClick: C,
|
|
27
|
+
children: [/* @__PURE__ */ g(c, { size: 16 }), " Refresh"]
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ _(i, {
|
|
30
|
+
variant: "outline",
|
|
31
|
+
children: [/* @__PURE__ */ g(o, { size: 16 }), " Export"]
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ _(i, {
|
|
34
|
+
onClick: () => w("customers/new"),
|
|
35
|
+
children: [/* @__PURE__ */ g(s, { size: 16 }), " Add Customer"]
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
}),
|
|
39
|
+
children: /* @__PURE__ */ g(a, {
|
|
40
|
+
columns: [
|
|
41
|
+
{
|
|
42
|
+
id: "customer",
|
|
43
|
+
header: "Customer",
|
|
44
|
+
cell: (e) => /* @__PURE__ */ _("div", {
|
|
45
|
+
className: "flex items-center gap-3",
|
|
46
|
+
children: [/* @__PURE__ */ g(n, { children: /* @__PURE__ */ g(r, { children: e.name.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
47
|
+
className: "font-medium",
|
|
48
|
+
children: e.name
|
|
49
|
+
}), /* @__PURE__ */ g("p", {
|
|
50
|
+
className: "text-sm text-muted-foreground",
|
|
51
|
+
children: e.email
|
|
52
|
+
})] })]
|
|
53
|
+
})
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "type",
|
|
57
|
+
header: "Type",
|
|
58
|
+
accessorKey: "type",
|
|
59
|
+
cell: (e) => /* @__PURE__ */ g(p, { type: e.type })
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "company",
|
|
63
|
+
header: "Company",
|
|
64
|
+
accessorKey: "company",
|
|
65
|
+
cell: (e) => e.company || "-"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "phone",
|
|
69
|
+
header: "Phone",
|
|
70
|
+
accessorKey: "phone"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "location",
|
|
74
|
+
header: "Location",
|
|
75
|
+
cell: (e) => `${e.address.city}, ${e.address.state}`
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "rating",
|
|
79
|
+
header: "Rating",
|
|
80
|
+
cell: (e) => /* @__PURE__ */ _("div", {
|
|
81
|
+
className: "flex items-center gap-1",
|
|
82
|
+
children: [/* @__PURE__ */ g(l, {
|
|
83
|
+
size: 14,
|
|
84
|
+
className: "text-yellow-500 fill-yellow-500"
|
|
85
|
+
}), /* @__PURE__ */ g("span", { children: e.rating.toFixed(1) })]
|
|
86
|
+
})
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "status",
|
|
90
|
+
header: "Status",
|
|
91
|
+
cell: (e) => /* @__PURE__ */ g(t, {
|
|
92
|
+
variant: e.isActive ? "default" : "secondary",
|
|
93
|
+
children: e.isActive ? "Active" : "Inactive"
|
|
94
|
+
})
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "created",
|
|
98
|
+
header: "Created",
|
|
99
|
+
accessorKey: "createdAt",
|
|
100
|
+
sortable: !0,
|
|
101
|
+
cell: (e) => m(e.createdAt, "short")
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
data: b,
|
|
105
|
+
isLoading: S,
|
|
106
|
+
searchable: !0,
|
|
107
|
+
searchPlaceholder: "Search customers...",
|
|
108
|
+
searchFields: [
|
|
109
|
+
"name",
|
|
110
|
+
"email",
|
|
111
|
+
"company"
|
|
112
|
+
],
|
|
113
|
+
onRowClick: (e) => w(`customers/${e.id}`),
|
|
114
|
+
getRowId: (e) => e.id
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { v as default };
|