@burdenoff/microfe-movethewheels 2026.625.1 → 2026.626.2
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-CNyoKtID.js → AIAssistantPage-AvsMbunM.js} +35 -29
- package/dist/{AnalyticsPage-Ck615ox7.js → AnalyticsPage-CCLfHgQZ.js} +36 -25
- package/dist/CreateOrderPage-CjlnEtk3.js +510 -0
- package/dist/CustomerDetailsPage-I6cdDHUi.js +265 -0
- package/dist/CustomersPage-CGGfD4ki.js +163 -0
- package/dist/{DashboardPage-DTmyuC11.js → DashboardPage-D2HRqwg9.js} +93 -89
- package/dist/DataTable-CD9ZhpLB.js +249 -0
- package/dist/DriverDetailsPage-rg_pGNuP.js +330 -0
- package/dist/DriversPage-DKiynISH.js +167 -0
- package/dist/FinancePage-Vg8WPs38.js +158 -0
- package/dist/{FleetPage-DCfOmBa2.js → FleetPage-DddXt8r8.js} +109 -71
- package/dist/ImportExportPage-BW6qO3kc.js +248 -0
- package/dist/{InventoryPage-BW0QXWuf.js → InventoryPage-rMGuaJN-.js} +74 -70
- package/dist/LiveTrackingPage-DQ1q4Id3.js +375 -0
- package/dist/MarketplacePage-DKrXAv62.js +219 -0
- package/dist/OrderDetailsPage-CFASgsYX.js +431 -0
- package/dist/OrdersListPage-BHeT8S5o.js +309 -0
- package/dist/ProductDetailsPage-CFGcbaHo.js +195 -0
- package/dist/ProductsPage--xEpbQ8A.js +171 -0
- package/dist/{ReportsPage-Df3hciPy.js → ReportsPage-Bb7_90rK.js} +53 -45
- package/dist/RouteDetailsPage-CVtDVb1N.js +282 -0
- package/dist/RoutesPage-s57PtgcQ.js +163 -0
- package/dist/SettingsPage-BYNCBOpN.js +298 -0
- package/dist/{TrackingPage-CU0Vk4mx.js → TrackingPage-CcRc_dva.js} +77 -72
- package/dist/VehicleDetailsPage-3YDMPsPs.js +220 -0
- package/dist/VehiclesPage-UlxPWP9K.js +167 -0
- package/dist/WarehouseDetailsPage-Db7KeN-d.js +238 -0
- package/dist/WarehousesPage-CuTO-OPp.js +164 -0
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/src/movethewheels/components/DataTable.tsx +37 -2
- package/src/movethewheels/components/MetricCard.tsx +3 -1
- package/src/movethewheels/pages/AIAssistantPage.tsx +11 -3
- package/src/movethewheels/pages/AnalyticsPage.tsx +31 -25
- package/src/movethewheels/pages/CreateOrderPage.tsx +56 -17
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +63 -38
- package/src/movethewheels/pages/CustomersPage.tsx +40 -2
- package/src/movethewheels/pages/DashboardPage.tsx +8 -1
- package/src/movethewheels/pages/DriverDetailsPage.tsx +57 -26
- package/src/movethewheels/pages/DriversPage.tsx +37 -1
- package/src/movethewheels/pages/FinancePage.tsx +45 -41
- package/src/movethewheels/pages/FleetPage.tsx +68 -25
- package/src/movethewheels/pages/ImportExportPage.tsx +46 -29
- package/src/movethewheels/pages/InventoryPage.tsx +20 -23
- package/src/movethewheels/pages/LiveTrackingPage.tsx +58 -20
- package/src/movethewheels/pages/MarketplacePage.tsx +37 -3
- package/src/movethewheels/pages/OrderDetailsPage.tsx +74 -46
- package/src/movethewheels/pages/OrdersListPage.tsx +62 -1
- package/src/movethewheels/pages/ProductDetailsPage.tsx +36 -11
- package/src/movethewheels/pages/ProductsPage.tsx +33 -1
- package/src/movethewheels/pages/ReportsPage.tsx +23 -19
- package/src/movethewheels/pages/RouteDetailsPage.tsx +71 -31
- package/src/movethewheels/pages/RoutesPage.tsx +41 -5
- package/src/movethewheels/pages/SettingsPage.tsx +68 -26
- package/src/movethewheels/pages/TrackingPage.tsx +50 -47
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +49 -24
- package/src/movethewheels/pages/VehiclesPage.tsx +33 -1
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +55 -30
- package/src/movethewheels/pages/WarehousesPage.tsx +42 -4
- package/dist/CreateOrderPage-C9Vb57Yn.js +0 -471
- package/dist/CustomerDetailsPage-BVkHRZvi.js +0 -239
- package/dist/CustomersPage-DhQg-6h_.js +0 -118
- package/dist/DataTable-CfWvFw5B.js +0 -239
- package/dist/DriverDetailsPage-DaaCQ-2O.js +0 -297
- package/dist/DriversPage-D0RMBB_t.js +0 -129
- package/dist/FinancePage-BUXqW1IM.js +0 -154
- package/dist/ImportExportPage-BM1BoRcE.js +0 -232
- package/dist/LiveTrackingPage-DqcGXdkw.js +0 -332
- package/dist/MarketplacePage-DFqsxNYU.js +0 -192
- package/dist/OrderDetailsPage-Dx1m3cVA.js +0 -398
- package/dist/OrdersListPage-DHYBGrWf.js +0 -256
- package/dist/ProductDetailsPage-DOXO90kb.js +0 -168
- package/dist/ProductsPage-RLMTwWN0.js +0 -133
- package/dist/RouteDetailsPage-xzFDeR-X.js +0 -240
- package/dist/RoutesPage-DDFy1QVi.js +0 -118
- package/dist/SettingsPage-JH_-UPbf.js +0 -247
- package/dist/VehicleDetailsPage-P4xDttKw.js +0 -194
- package/dist/VehiclesPage-tJZ64QKV.js +0 -129
- package/dist/WarehouseDetailsPage-Bt_w2Yf7.js +0 -215
- package/dist/WarehousesPage-HsPpEFeG.js +0 -126
|
@@ -1,239 +0,0 @@
|
|
|
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-D3N8MCTm.js";
|
|
2
|
-
import { t as u } from "./arrow-left-CBpZKkpq.js";
|
|
3
|
-
import { t as d } from "./file-text-C8Uioy11.js";
|
|
4
|
-
import { n as f, t as p } from "./phone-DV4StZiA.js";
|
|
5
|
-
import { t as m } from "./map-pin-BSaf5IDL.js";
|
|
6
|
-
import { t as h } from "./square-pen-hLIbFQFV.js";
|
|
7
|
-
import { t as g } from "./star-YsVV3MNQ.js";
|
|
8
|
-
import { t as _ } from "./users-g2N0eL-Z.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-CijYQXtb.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-text-secondary"
|
|
121
|
-
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
122
|
-
className: "text-sm text-text-secondary",
|
|
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-text-secondary"
|
|
133
|
-
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
134
|
-
className: "text-sm text-text-secondary",
|
|
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-text-secondary"
|
|
148
|
-
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
149
|
-
className: "text-sm text-text-secondary",
|
|
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-text-secondary",
|
|
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-text-secondary",
|
|
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-text-secondary",
|
|
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-text-secondary",
|
|
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-text-secondary",
|
|
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-text-secondary",
|
|
212
|
-
children: "Created"
|
|
213
|
-
}), /* @__PURE__ */ T("p", { children: x(A.createdAt, "full") })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
214
|
-
className: "text-sm text-text-secondary",
|
|
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-text-secondary",
|
|
233
|
-
children: "Customer creation form would go here"
|
|
234
|
-
})
|
|
235
|
-
}) })
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
//#endregion
|
|
239
|
-
export { O as default };
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { i as e, l as t, o as n, s as r } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
-
import { t as i } from "./DataTable-CfWvFw5B.js";
|
|
3
|
-
import { t as a } from "./download-Dpa9vqoG.js";
|
|
4
|
-
import { t as o } from "./plus-Dl1rLeJR.js";
|
|
5
|
-
import { t as s } from "./refresh-cw-CWfERAit.js";
|
|
6
|
-
import { t as c } from "./star-YsVV3MNQ.js";
|
|
7
|
-
import { t as l } from "./users-g2N0eL-Z.js";
|
|
8
|
-
import { r as u } from "./graphqlClient-CdJyR_ed.js";
|
|
9
|
-
import { r as d } from "./useCustomers-bS3a4ytk.js";
|
|
10
|
-
import { i as f } from "./StatusBadge-CijYQXtb.js";
|
|
11
|
-
import { r as p } from "./formatters-_vJlC-47.js";
|
|
12
|
-
import { t as m } from "./navigation-BgnOfsVd.js";
|
|
13
|
-
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
|
-
import { CTAOverflowMenu as _ } from "@burdenoff/fe-libs/ui";
|
|
15
|
-
//#region src/movethewheels/pages/CustomersPage.tsx
|
|
16
|
-
function v() {
|
|
17
|
-
let { basePath: v, navigate: y } = u(), { customers: b, totalCustomers: x, isLoading: S, refetch: C } = d({ limit: 100 }), w = (e) => y?.(m(v, e));
|
|
18
|
-
return /* @__PURE__ */ h(e, {
|
|
19
|
-
title: "Customers",
|
|
20
|
-
subtitle: `${x} customers`,
|
|
21
|
-
icon: /* @__PURE__ */ h(l, { size: 24 }),
|
|
22
|
-
headerActions: /* @__PURE__ */ h(_, {
|
|
23
|
-
primary: {
|
|
24
|
-
label: "Add Customer",
|
|
25
|
-
icon: /* @__PURE__ */ h(o, { size: 16 }),
|
|
26
|
-
onSelect: () => w("customers/new")
|
|
27
|
-
},
|
|
28
|
-
actions: [{
|
|
29
|
-
label: "Refresh",
|
|
30
|
-
icon: /* @__PURE__ */ h(s, { size: 16 }),
|
|
31
|
-
onSelect: () => C()
|
|
32
|
-
}, {
|
|
33
|
-
label: "Export",
|
|
34
|
-
icon: /* @__PURE__ */ h(a, { size: 16 }),
|
|
35
|
-
onSelect: () => {}
|
|
36
|
-
}]
|
|
37
|
-
}),
|
|
38
|
-
children: /* @__PURE__ */ h(i, {
|
|
39
|
-
columns: [
|
|
40
|
-
{
|
|
41
|
-
id: "customer",
|
|
42
|
-
header: "Customer",
|
|
43
|
-
cell: (e) => /* @__PURE__ */ g("div", {
|
|
44
|
-
className: "flex items-center gap-3",
|
|
45
|
-
children: [/* @__PURE__ */ h(n, { children: /* @__PURE__ */ h(r, { children: e.name.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
46
|
-
className: "font-medium",
|
|
47
|
-
children: e.name
|
|
48
|
-
}), /* @__PURE__ */ h("p", {
|
|
49
|
-
className: "text-sm text-text-secondary",
|
|
50
|
-
children: e.email
|
|
51
|
-
})] })]
|
|
52
|
-
})
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: "type",
|
|
56
|
-
header: "Type",
|
|
57
|
-
accessorKey: "type",
|
|
58
|
-
cell: (e) => /* @__PURE__ */ h(f, { type: e.type })
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: "company",
|
|
62
|
-
header: "Company",
|
|
63
|
-
accessorKey: "company",
|
|
64
|
-
cell: (e) => e.company || "-"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: "phone",
|
|
68
|
-
header: "Phone",
|
|
69
|
-
accessorKey: "phone"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: "location",
|
|
73
|
-
header: "Location",
|
|
74
|
-
cell: (e) => `${e.address.city}, ${e.address.state}`
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: "rating",
|
|
78
|
-
header: "Rating",
|
|
79
|
-
cell: (e) => /* @__PURE__ */ g("div", {
|
|
80
|
-
className: "flex items-center gap-1",
|
|
81
|
-
children: [/* @__PURE__ */ h(c, {
|
|
82
|
-
size: 14,
|
|
83
|
-
className: "text-yellow-500 fill-yellow-500"
|
|
84
|
-
}), /* @__PURE__ */ h("span", { children: e.rating.toFixed(1) })]
|
|
85
|
-
})
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
id: "status",
|
|
89
|
-
header: "Status",
|
|
90
|
-
cell: (e) => /* @__PURE__ */ h(t, {
|
|
91
|
-
variant: e.isActive ? "default" : "secondary",
|
|
92
|
-
children: e.isActive ? "Active" : "Inactive"
|
|
93
|
-
})
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
id: "created",
|
|
97
|
-
header: "Created",
|
|
98
|
-
accessorKey: "createdAt",
|
|
99
|
-
sortable: !0,
|
|
100
|
-
cell: (e) => p(e.createdAt, "short")
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
data: b,
|
|
104
|
-
isLoading: S,
|
|
105
|
-
searchable: !0,
|
|
106
|
-
searchPlaceholder: "Search customers...",
|
|
107
|
-
searchFields: [
|
|
108
|
-
"name",
|
|
109
|
-
"email",
|
|
110
|
-
"company"
|
|
111
|
-
],
|
|
112
|
-
onRowClick: (e) => w(`customers/${e.id}`),
|
|
113
|
-
getRowId: (e) => e.id
|
|
114
|
-
})
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
//#endregion
|
|
118
|
-
export { v as default };
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { A as e, B as t, F as n, G as r, H as i, I as a, K as o, L as s, P as c, R as l, U as u, W as d, it as f, q as p, rt as m, u as h } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
-
import { t as g } from "./chevron-right-BIFGi0UA.js";
|
|
3
|
-
import { t as _ } from "./search-OxoIiL_C.js";
|
|
4
|
-
import { useMemo as v, useState as y } from "react";
|
|
5
|
-
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
6
|
-
//#region node_modules/lucide-react/dist/esm/icons/arrow-down.js
|
|
7
|
-
var S = f("ArrowDown", [["path", {
|
|
8
|
-
d: "M12 5v14",
|
|
9
|
-
key: "s699le"
|
|
10
|
-
}], ["path", {
|
|
11
|
-
d: "m19 12-7 7-7-7",
|
|
12
|
-
key: "1idqje"
|
|
13
|
-
}]]), C = f("ArrowUpDown", [
|
|
14
|
-
["path", {
|
|
15
|
-
d: "m21 16-4 4-4-4",
|
|
16
|
-
key: "f6ql7i"
|
|
17
|
-
}],
|
|
18
|
-
["path", {
|
|
19
|
-
d: "M17 20V4",
|
|
20
|
-
key: "1ejh1v"
|
|
21
|
-
}],
|
|
22
|
-
["path", {
|
|
23
|
-
d: "m3 8 4-4 4 4",
|
|
24
|
-
key: "11wl7u"
|
|
25
|
-
}],
|
|
26
|
-
["path", {
|
|
27
|
-
d: "M7 4v16",
|
|
28
|
-
key: "1glfcx"
|
|
29
|
-
}]
|
|
30
|
-
]), w = f("ArrowUp", [["path", {
|
|
31
|
-
d: "m5 12 7-7 7 7",
|
|
32
|
-
key: "hav0vg"
|
|
33
|
-
}], ["path", {
|
|
34
|
-
d: "M12 19V5",
|
|
35
|
-
key: "x0mq9r"
|
|
36
|
-
}]]), T = f("ChevronLeft", [["path", {
|
|
37
|
-
d: "m15 18-6-6 6-6",
|
|
38
|
-
key: "1wnfg3"
|
|
39
|
-
}]]), E = f("ChevronsLeft", [["path", {
|
|
40
|
-
d: "m11 17-5-5 5-5",
|
|
41
|
-
key: "13zhaf"
|
|
42
|
-
}], ["path", {
|
|
43
|
-
d: "m18 17-5-5 5-5",
|
|
44
|
-
key: "h8a8et"
|
|
45
|
-
}]]), D = f("ChevronsRight", [["path", {
|
|
46
|
-
d: "m6 17 5-5-5-5",
|
|
47
|
-
key: "xnjwq"
|
|
48
|
-
}], ["path", {
|
|
49
|
-
d: "m13 17 5-5-5-5",
|
|
50
|
-
key: "17xmmf"
|
|
51
|
-
}]]);
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/movethewheels/components/DataTable.tsx
|
|
54
|
-
function O({ columns: f, data: O, isLoading: ee = !1, searchable: k = !1, searchPlaceholder: A = "Search...", searchFields: j, pagination: M = !0, pageSize: N = 10, pageSizeOptions: P = [
|
|
55
|
-
5,
|
|
56
|
-
10,
|
|
57
|
-
20,
|
|
58
|
-
50
|
|
59
|
-
], onRowClick: F, rowClassName: I, emptyMessage: L = "No data found", className: R, getRowId: z }) {
|
|
60
|
-
let [B, V] = y(""), [H, U] = y(null), [W, G] = y(null), [K, q] = y(1), [J, Y] = y(N), X = v(() => {
|
|
61
|
-
if (!B || !j || j.length === 0) return O;
|
|
62
|
-
let e = B.toLowerCase();
|
|
63
|
-
return O.filter((t) => j.some((n) => {
|
|
64
|
-
let r = t[n];
|
|
65
|
-
return r != null && String(r).toLowerCase().includes(e);
|
|
66
|
-
}));
|
|
67
|
-
}, [
|
|
68
|
-
O,
|
|
69
|
-
B,
|
|
70
|
-
j
|
|
71
|
-
]), Z = v(() => {
|
|
72
|
-
if (!H || !W) return X;
|
|
73
|
-
let e = f.find((e) => e.id === H);
|
|
74
|
-
return e?.accessorKey ? [...X].sort((t, n) => {
|
|
75
|
-
let r = t[e.accessorKey], i = n[e.accessorKey];
|
|
76
|
-
if (r == null) return 1;
|
|
77
|
-
if (i == null) return -1;
|
|
78
|
-
let a = 0;
|
|
79
|
-
return a = typeof r == "string" && typeof i == "string" ? r.localeCompare(i) : typeof r == "number" && typeof i == "number" ? r - i : r instanceof Date && i instanceof Date ? r.getTime() - i.getTime() : String(r).localeCompare(String(i)), W === "asc" ? a : -a;
|
|
80
|
-
}) : X;
|
|
81
|
-
}, [
|
|
82
|
-
X,
|
|
83
|
-
H,
|
|
84
|
-
W,
|
|
85
|
-
f
|
|
86
|
-
]), Q = v(() => {
|
|
87
|
-
if (!M) return Z;
|
|
88
|
-
let e = (K - 1) * J;
|
|
89
|
-
return Z.slice(e, e + J);
|
|
90
|
-
}, [
|
|
91
|
-
Z,
|
|
92
|
-
K,
|
|
93
|
-
J,
|
|
94
|
-
M
|
|
95
|
-
]), $ = Math.ceil(Z.length / J), te = (e) => {
|
|
96
|
-
H === e ? W === "asc" ? G("desc") : W === "desc" && (U(null), G(null)) : (U(e), G("asc"));
|
|
97
|
-
}, ne = (e) => H === e ? b(W === "asc" ? w : S, { className: "w-4 h-4 text-primary" }) : /* @__PURE__ */ b(C, { className: "w-4 h-4 text-text-secondary/50" }), re = (e, t) => {
|
|
98
|
-
if (t.cell) return t.cell(e);
|
|
99
|
-
if (t.accessorKey) {
|
|
100
|
-
let n = e[t.accessorKey];
|
|
101
|
-
return n == null ? "-" : n instanceof Date ? n.toLocaleDateString() : String(n);
|
|
102
|
-
}
|
|
103
|
-
return "-";
|
|
104
|
-
};
|
|
105
|
-
return ee ? /* @__PURE__ */ x("div", {
|
|
106
|
-
className: m("space-y-4", R),
|
|
107
|
-
children: [k && /* @__PURE__ */ b("div", {
|
|
108
|
-
className: "flex items-center gap-4",
|
|
109
|
-
children: /* @__PURE__ */ b(t, { className: "h-10 w-64" })
|
|
110
|
-
}), /* @__PURE__ */ b("div", {
|
|
111
|
-
className: "rounded-card border border-border-seam bg-bg-surface shadow-elevation-1",
|
|
112
|
-
children: /* @__PURE__ */ x(i, { children: [/* @__PURE__ */ b(o, { children: /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(t, { className: "h-4 w-20 motion-safe:animate-vc-shimmer" }) }, e.id)) }) }), /* @__PURE__ */ b(u, { children: Array.from({ length: 5 }).map((e, n) => /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(d, { children: /* @__PURE__ */ b(t, { className: "h-4 w-full max-w-[100px] motion-safe:animate-vc-shimmer" }) }, e.id)) }, n)) })] })
|
|
113
|
-
})]
|
|
114
|
-
}) : /* @__PURE__ */ x("div", {
|
|
115
|
-
className: m("space-y-4", R),
|
|
116
|
-
children: [
|
|
117
|
-
k && /* @__PURE__ */ b("div", {
|
|
118
|
-
className: "flex items-center gap-4",
|
|
119
|
-
children: /* @__PURE__ */ x("div", {
|
|
120
|
-
className: "relative flex-1 max-w-sm",
|
|
121
|
-
children: [/* @__PURE__ */ b(_, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-text-secondary" }), /* @__PURE__ */ b(e, {
|
|
122
|
-
placeholder: A,
|
|
123
|
-
value: B,
|
|
124
|
-
onChange: (e) => {
|
|
125
|
-
V(e.target.value), q(1);
|
|
126
|
-
},
|
|
127
|
-
className: "pl-9"
|
|
128
|
-
})]
|
|
129
|
-
})
|
|
130
|
-
}),
|
|
131
|
-
/* @__PURE__ */ b("div", {
|
|
132
|
-
className: "overflow-x-auto rounded-card border border-border-seam bg-bg-surface shadow-elevation-1",
|
|
133
|
-
children: /* @__PURE__ */ x(i, { children: [/* @__PURE__ */ b(o, { children: /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(r, {
|
|
134
|
-
className: m(e.sortable && "cursor-pointer select-none hover:bg-bg-sunken/50", e.headerClassName),
|
|
135
|
-
onClick: () => e.sortable && te(e.id),
|
|
136
|
-
children: /* @__PURE__ */ x("div", {
|
|
137
|
-
className: "flex items-center gap-2",
|
|
138
|
-
children: [e.header, e.sortable && ne(e.id)]
|
|
139
|
-
})
|
|
140
|
-
}, e.id)) }) }), /* @__PURE__ */ b(u, { children: Q.length === 0 ? /* @__PURE__ */ b(p, { children: /* @__PURE__ */ b(d, {
|
|
141
|
-
colSpan: f.length,
|
|
142
|
-
className: "h-24 text-center",
|
|
143
|
-
children: /* @__PURE__ */ b("p", {
|
|
144
|
-
className: "text-text-secondary",
|
|
145
|
-
children: L
|
|
146
|
-
})
|
|
147
|
-
}) }) : Q.map((e, t) => {
|
|
148
|
-
let n = z ? z(e) : t, r = typeof I == "function" ? I(e) : I;
|
|
149
|
-
return /* @__PURE__ */ b(p, {
|
|
150
|
-
className: m(F && "cursor-pointer hover:bg-bg-sunken/50", r),
|
|
151
|
-
onClick: () => F?.(e),
|
|
152
|
-
children: f.map((t) => /* @__PURE__ */ b(d, {
|
|
153
|
-
className: t.className,
|
|
154
|
-
children: re(e, t)
|
|
155
|
-
}, t.id))
|
|
156
|
-
}, n);
|
|
157
|
-
}) })] })
|
|
158
|
-
}),
|
|
159
|
-
M && Z.length > 0 && /* @__PURE__ */ x("div", {
|
|
160
|
-
className: "flex items-center justify-between",
|
|
161
|
-
children: [/* @__PURE__ */ x("div", {
|
|
162
|
-
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
163
|
-
children: [
|
|
164
|
-
/* @__PURE__ */ x("span", { children: [
|
|
165
|
-
"Showing ",
|
|
166
|
-
(K - 1) * J + 1,
|
|
167
|
-
" to",
|
|
168
|
-
" ",
|
|
169
|
-
Math.min(K * J, Z.length),
|
|
170
|
-
" of ",
|
|
171
|
-
Z.length
|
|
172
|
-
] }),
|
|
173
|
-
/* @__PURE__ */ x(c, {
|
|
174
|
-
value: String(J),
|
|
175
|
-
onValueChange: (e) => {
|
|
176
|
-
Y(Number(e)), q(1);
|
|
177
|
-
},
|
|
178
|
-
children: [/* @__PURE__ */ b(s, {
|
|
179
|
-
className: "w-[70px] h-8",
|
|
180
|
-
children: /* @__PURE__ */ b(l, {})
|
|
181
|
-
}), /* @__PURE__ */ b(n, { children: P.map((e) => /* @__PURE__ */ b(a, {
|
|
182
|
-
value: String(e),
|
|
183
|
-
children: e
|
|
184
|
-
}, e)) })]
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ b("span", { children: "per page" })
|
|
187
|
-
]
|
|
188
|
-
}), /* @__PURE__ */ x("div", {
|
|
189
|
-
className: "flex items-center gap-1",
|
|
190
|
-
children: [
|
|
191
|
-
/* @__PURE__ */ b(h, {
|
|
192
|
-
variant: "outline",
|
|
193
|
-
size: "icon",
|
|
194
|
-
className: "h-8 w-8",
|
|
195
|
-
onClick: () => q(1),
|
|
196
|
-
disabled: K === 1,
|
|
197
|
-
children: /* @__PURE__ */ b(E, { className: "h-4 w-4" })
|
|
198
|
-
}),
|
|
199
|
-
/* @__PURE__ */ b(h, {
|
|
200
|
-
variant: "outline",
|
|
201
|
-
size: "icon",
|
|
202
|
-
className: "h-8 w-8",
|
|
203
|
-
onClick: () => q((e) => Math.max(1, e - 1)),
|
|
204
|
-
disabled: K === 1,
|
|
205
|
-
children: /* @__PURE__ */ b(T, { className: "h-4 w-4" })
|
|
206
|
-
}),
|
|
207
|
-
/* @__PURE__ */ x("span", {
|
|
208
|
-
className: "px-3 text-sm",
|
|
209
|
-
children: [
|
|
210
|
-
"Page ",
|
|
211
|
-
K,
|
|
212
|
-
" of ",
|
|
213
|
-
$
|
|
214
|
-
]
|
|
215
|
-
}),
|
|
216
|
-
/* @__PURE__ */ b(h, {
|
|
217
|
-
variant: "outline",
|
|
218
|
-
size: "icon",
|
|
219
|
-
className: "h-8 w-8",
|
|
220
|
-
onClick: () => q((e) => Math.min($, e + 1)),
|
|
221
|
-
disabled: K === $,
|
|
222
|
-
children: /* @__PURE__ */ b(g, { className: "h-4 w-4" })
|
|
223
|
-
}),
|
|
224
|
-
/* @__PURE__ */ b(h, {
|
|
225
|
-
variant: "outline",
|
|
226
|
-
size: "icon",
|
|
227
|
-
className: "h-8 w-8",
|
|
228
|
-
onClick: () => q($),
|
|
229
|
-
disabled: K === $,
|
|
230
|
-
children: /* @__PURE__ */ b(D, { className: "h-4 w-4" })
|
|
231
|
-
})
|
|
232
|
-
]
|
|
233
|
-
})]
|
|
234
|
-
})
|
|
235
|
-
]
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
//#endregion
|
|
239
|
-
export { O as t };
|