@burdenoff/microfe-atheletebridge 2026.625.1 → 2026.625.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/atheletebridge/pages/HomePage.js +272 -268
- package/dist/atheletebridge/pages/HomePage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminDashboard.js +76 -44
- package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +63 -55
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +244 -237
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js +59 -57
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +110 -106
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/CartManagementPage.js +166 -159
- package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/UserManagementPage.js +310 -303
- package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +86 -81
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +170 -166
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +141 -109
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +139 -134
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +109 -107
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +318 -318
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +262 -262
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +170 -162
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/HelpSupportPage.js +292 -298
- package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js +99 -91
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/SettingsPage.js +742 -734
- package/dist/atheletebridge/pages/common/SettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +364 -356
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CartDetailPage.js +276 -241
- package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +260 -250
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CheckoutPage.js +93 -89
- package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js +430 -387
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +526 -490
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +523 -512
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/FavoritesPage.js +83 -75
- package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +116 -108
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +65 -61
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +80 -75
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/ReviewsPage.js +80 -72
- package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +62 -55
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +93 -61
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +89 -84
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +60 -55
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js +345 -311
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +37 -32
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +75 -67
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +385 -381
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +352 -319
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js +353 -318
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +133 -128
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +81 -77
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +352 -344
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.js";
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
+
import { formatCurrency as i } from "../../utils/formatters.js";
|
|
6
|
+
import { useCallback as a, useEffect as o, useState as s } from "react";
|
|
7
|
+
import { CheckCircle2 as c, ClipboardCheck as l, Eye as u, Loader2 as d, Pause as f, Search as p, Star as m, X as h, XCircle as g } from "lucide-react";
|
|
7
8
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
|
|
8
10
|
//#region src/atheletebridge/pages/admin/CartManagementPage.tsx
|
|
9
|
-
var
|
|
11
|
+
var S = [
|
|
10
12
|
{
|
|
11
13
|
id: "cart-001",
|
|
12
14
|
name: "South Indian Express",
|
|
@@ -81,15 +83,15 @@ var b = [
|
|
|
81
83
|
rejectionReason: "Hygiene standards not met, missing food safety certification"
|
|
82
84
|
}
|
|
83
85
|
];
|
|
84
|
-
function
|
|
85
|
-
let { navigateTo:
|
|
86
|
+
function C() {
|
|
87
|
+
let { navigateTo: C } = e(), [w, T] = s([]), [E, D] = s(!0), [O, k] = s(null), [A, j] = s(!1), [M, N] = s("view"), [P, F] = s(""), [I, L] = s({
|
|
86
88
|
searchQuery: "",
|
|
87
89
|
status: "",
|
|
88
90
|
verificationStatus: "",
|
|
89
91
|
category: "",
|
|
90
92
|
location: "",
|
|
91
93
|
sortBy: "recent"
|
|
92
|
-
}), [
|
|
94
|
+
}), [R] = s({
|
|
93
95
|
totalCarts: 156,
|
|
94
96
|
activeCarts: 134,
|
|
95
97
|
pendingApproval: 18,
|
|
@@ -98,14 +100,14 @@ function x() {
|
|
|
98
100
|
averageRating: 4.6,
|
|
99
101
|
complianceRate: 89,
|
|
100
102
|
newApplications: 8
|
|
101
|
-
}),
|
|
102
|
-
|
|
103
|
-
let e = [...
|
|
104
|
-
if (
|
|
105
|
-
let t =
|
|
103
|
+
}), z = a(() => {
|
|
104
|
+
D(!0), setTimeout(() => {
|
|
105
|
+
let e = [...S];
|
|
106
|
+
if (I.searchQuery) {
|
|
107
|
+
let t = I.searchQuery.toLowerCase();
|
|
106
108
|
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.ownerName.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.address.toLowerCase().includes(t));
|
|
107
109
|
}
|
|
108
|
-
switch (
|
|
110
|
+
switch (I.status && (I.status === "active" && (e = e.filter((e) => e.isActive)), I.status === "inactive" && (e = e.filter((e) => !e.isActive))), I.verificationStatus && (I.verificationStatus === "verified" && (e = e.filter((e) => e.isVerified)), I.verificationStatus === "pending" && (e = e.filter((e) => !e.isVerified && e.inspectionStatus !== "failed")), I.verificationStatus === "rejected" && (e = e.filter((e) => e.inspectionStatus === "failed"))), I.category && (e = e.filter((e) => e.category === I.category)), I.location && (e = e.filter((e) => e.city.toLowerCase().includes(I.location.toLowerCase()))), I.sortBy) {
|
|
109
111
|
case "name":
|
|
110
112
|
e.sort((e, t) => e.name.localeCompare(t.name));
|
|
111
113
|
break;
|
|
@@ -120,46 +122,46 @@ function x() {
|
|
|
120
122
|
break;
|
|
121
123
|
default: e.sort((e, t) => new Date(t.applicationDate).getTime() - new Date(e.applicationDate).getTime());
|
|
122
124
|
}
|
|
123
|
-
|
|
125
|
+
T(e), D(!1);
|
|
124
126
|
}, 800);
|
|
125
|
-
}, [
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}, [
|
|
129
|
-
let
|
|
130
|
-
|
|
127
|
+
}, [I]);
|
|
128
|
+
o(() => {
|
|
129
|
+
z();
|
|
130
|
+
}, [z]);
|
|
131
|
+
let B = (e, t) => {
|
|
132
|
+
L((n) => ({
|
|
131
133
|
...n,
|
|
132
134
|
[e]: t
|
|
133
135
|
}));
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
if (!
|
|
136
|
+
}, V = (e, t) => {
|
|
137
|
+
k(e), N(t), F(""), j(!0);
|
|
138
|
+
}, H = () => {
|
|
139
|
+
if (!O) return;
|
|
138
140
|
let e = "";
|
|
139
|
-
switch (
|
|
141
|
+
switch (M) {
|
|
140
142
|
case "approve":
|
|
141
|
-
e = `Cart "${
|
|
143
|
+
e = `Cart "${O.name}" approved successfully`;
|
|
142
144
|
break;
|
|
143
145
|
case "reject":
|
|
144
|
-
if (!
|
|
146
|
+
if (!P.trim()) {
|
|
145
147
|
alert("Please provide a rejection reason");
|
|
146
148
|
return;
|
|
147
149
|
}
|
|
148
|
-
e = `Cart "${
|
|
150
|
+
e = `Cart "${O.name}" rejected`;
|
|
149
151
|
break;
|
|
150
152
|
case "suspend":
|
|
151
|
-
e = `Cart "${
|
|
153
|
+
e = `Cart "${O.name}" suspended`;
|
|
152
154
|
break;
|
|
153
155
|
case "inspect":
|
|
154
|
-
e = `Inspection scheduled for "${
|
|
156
|
+
e = `Inspection scheduled for "${O.name}"`;
|
|
155
157
|
break;
|
|
156
158
|
}
|
|
157
|
-
alert(e),
|
|
158
|
-
},
|
|
159
|
+
alert(e), j(!1), F(""), z();
|
|
160
|
+
}, U = (e) => new Date(e).toLocaleDateString("en-IN", {
|
|
159
161
|
year: "numeric",
|
|
160
162
|
month: "short",
|
|
161
163
|
day: "numeric"
|
|
162
|
-
}),
|
|
164
|
+
}), W = (e) => e.isVerified ? /* @__PURE__ */ v("span", {
|
|
163
165
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-green-500/20 text-green-600 dark:text-green-400",
|
|
164
166
|
children: "Verified"
|
|
165
167
|
}) : e.inspectionStatus === "pending" ? /* @__PURE__ */ v("span", {
|
|
@@ -174,85 +176,92 @@ function x() {
|
|
|
174
176
|
}) : /* @__PURE__ */ v("span", {
|
|
175
177
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-secondary text-secondary-foreground",
|
|
176
178
|
children: "Under Review"
|
|
177
|
-
}),
|
|
179
|
+
}), G = (e) => e ? /* @__PURE__ */ v("span", {
|
|
178
180
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-green-500/20 text-green-600 dark:text-green-400",
|
|
179
181
|
children: "Active"
|
|
180
182
|
}) : /* @__PURE__ */ v("span", {
|
|
181
183
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-secondary text-secondary-foreground",
|
|
182
184
|
children: "Inactive"
|
|
183
|
-
}),
|
|
185
|
+
}), K = (e) => /* @__PURE__ */ v("div", {
|
|
184
186
|
className: "w-full bg-bg-sunken rounded-full h-2",
|
|
185
187
|
children: /* @__PURE__ */ v("div", {
|
|
186
188
|
className: t("h-2 rounded-full", e >= 80 ? "bg-green-500" : e >= 60 ? "bg-yellow-500" : "bg-red-500"),
|
|
187
189
|
style: { width: `${e}%` }
|
|
188
190
|
})
|
|
189
191
|
});
|
|
190
|
-
return
|
|
192
|
+
return E ? /* @__PURE__ */ v(n, {
|
|
191
193
|
title: "Cart Management",
|
|
192
194
|
description: "Loading carts...",
|
|
193
195
|
children: /* @__PURE__ */ y("div", {
|
|
194
196
|
className: "flex flex-col items-center justify-center py-20",
|
|
195
|
-
children: [/* @__PURE__ */ v(
|
|
197
|
+
children: [/* @__PURE__ */ v(d, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ v("p", {
|
|
196
198
|
className: "text-text-secondary",
|
|
197
199
|
children: "Loading carts..."
|
|
198
200
|
})]
|
|
199
201
|
})
|
|
200
202
|
}) : /* @__PURE__ */ y(n, {
|
|
201
203
|
title: "Cart Management",
|
|
202
|
-
description: `${
|
|
204
|
+
description: `${R.totalCarts} service providers on the platform`,
|
|
203
205
|
actions: /* @__PURE__ */ y("span", {
|
|
204
206
|
className: "text-sm text-text-secondary",
|
|
205
|
-
children: [
|
|
207
|
+
children: [R.pendingApproval, " pending approval"]
|
|
206
208
|
}),
|
|
207
209
|
children: [
|
|
208
|
-
/* @__PURE__ */ v(
|
|
209
|
-
className: "
|
|
210
|
-
children:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
210
|
+
/* @__PURE__ */ v(x, {
|
|
211
|
+
className: "mb-6",
|
|
212
|
+
children: "Oversee every service provider on the platform. Approve or reject new cart applications, monitor active and rejected carts, search and filter the full directory, and act on any cart that needs attention. This is mission control for the provider side of the marketplace."
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ v(b, {
|
|
215
|
+
className: "mb-6",
|
|
216
|
+
children: /* @__PURE__ */ v("div", {
|
|
217
|
+
className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3",
|
|
218
|
+
children: [
|
|
219
|
+
{
|
|
220
|
+
label: "Total Carts",
|
|
221
|
+
value: R.totalCarts,
|
|
222
|
+
cls: ""
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
label: "Active",
|
|
226
|
+
value: R.activeCarts,
|
|
227
|
+
cls: "bg-green-500/10 border-green-500/30"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
label: "Pending",
|
|
231
|
+
value: R.pendingApproval,
|
|
232
|
+
cls: "bg-yellow-500/10 border-yellow-500/30"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
label: "Rejected",
|
|
236
|
+
value: R.rejectedCarts,
|
|
237
|
+
cls: "bg-red-500/10 border-red-500/30"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
label: "Total Revenue",
|
|
241
|
+
value: i(R.totalRevenue, { minimumFractionDigits: 0 }),
|
|
242
|
+
cls: "col-span-2 min-w-fit"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
label: "Avg Rating",
|
|
246
|
+
value: `${R.averageRating}`,
|
|
247
|
+
cls: ""
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
label: "New Apps",
|
|
251
|
+
value: R.newApplications,
|
|
252
|
+
cls: "bg-blue-500/10 border-blue-500/30"
|
|
253
|
+
}
|
|
254
|
+
].map((e) => /* @__PURE__ */ y("div", {
|
|
255
|
+
className: t("rounded-lg border border-border-subtle bg-bg-surface p-3", e.cls),
|
|
256
|
+
children: [/* @__PURE__ */ v("p", {
|
|
257
|
+
className: "text-xs text-text-secondary",
|
|
258
|
+
children: e.label
|
|
259
|
+
}), /* @__PURE__ */ v("p", {
|
|
260
|
+
className: "text-lg font-bold text-text-primary",
|
|
261
|
+
children: e.value
|
|
262
|
+
})]
|
|
263
|
+
}, e.label))
|
|
264
|
+
})
|
|
256
265
|
}),
|
|
257
266
|
/* @__PURE__ */ v("div", {
|
|
258
267
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 mb-6",
|
|
@@ -261,17 +270,17 @@ function x() {
|
|
|
261
270
|
children: [
|
|
262
271
|
/* @__PURE__ */ y("div", {
|
|
263
272
|
className: "relative",
|
|
264
|
-
children: [/* @__PURE__ */ v(
|
|
273
|
+
children: [/* @__PURE__ */ v(p, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
|
|
265
274
|
type: "text",
|
|
266
275
|
placeholder: "Search carts...",
|
|
267
|
-
value:
|
|
268
|
-
onChange: (e) =>
|
|
276
|
+
value: I.searchQuery,
|
|
277
|
+
onChange: (e) => B("searchQuery", e.target.value),
|
|
269
278
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
270
279
|
})]
|
|
271
280
|
}),
|
|
272
281
|
/* @__PURE__ */ y("select", {
|
|
273
|
-
value:
|
|
274
|
-
onChange: (e) =>
|
|
282
|
+
value: I.status,
|
|
283
|
+
onChange: (e) => B("status", e.target.value),
|
|
275
284
|
className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
276
285
|
children: [
|
|
277
286
|
/* @__PURE__ */ v("option", {
|
|
@@ -289,8 +298,8 @@ function x() {
|
|
|
289
298
|
]
|
|
290
299
|
}),
|
|
291
300
|
/* @__PURE__ */ y("select", {
|
|
292
|
-
value:
|
|
293
|
-
onChange: (e) =>
|
|
301
|
+
value: I.verificationStatus,
|
|
302
|
+
onChange: (e) => B("verificationStatus", e.target.value),
|
|
294
303
|
className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
295
304
|
children: [
|
|
296
305
|
/* @__PURE__ */ v("option", {
|
|
@@ -312,8 +321,8 @@ function x() {
|
|
|
312
321
|
]
|
|
313
322
|
}),
|
|
314
323
|
/* @__PURE__ */ y("select", {
|
|
315
|
-
value:
|
|
316
|
-
onChange: (e) =>
|
|
324
|
+
value: I.category,
|
|
325
|
+
onChange: (e) => B("category", e.target.value),
|
|
317
326
|
className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
318
327
|
children: [
|
|
319
328
|
/* @__PURE__ */ v("option", {
|
|
@@ -341,13 +350,13 @@ function x() {
|
|
|
341
350
|
/* @__PURE__ */ v("input", {
|
|
342
351
|
type: "text",
|
|
343
352
|
placeholder: "Location...",
|
|
344
|
-
value:
|
|
345
|
-
onChange: (e) =>
|
|
353
|
+
value: I.location,
|
|
354
|
+
onChange: (e) => B("location", e.target.value),
|
|
346
355
|
className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
347
356
|
}),
|
|
348
357
|
/* @__PURE__ */ y("select", {
|
|
349
|
-
value:
|
|
350
|
-
onChange: (e) =>
|
|
358
|
+
value: I.sortBy,
|
|
359
|
+
onChange: (e) => B("sortBy", e.target.value),
|
|
351
360
|
className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
352
361
|
children: [
|
|
353
362
|
/* @__PURE__ */ v("option", {
|
|
@@ -380,7 +389,7 @@ function x() {
|
|
|
380
389
|
children: [
|
|
381
390
|
/* @__PURE__ */ v("div", {
|
|
382
391
|
className: "block md:hidden space-y-4 p-4",
|
|
383
|
-
children:
|
|
392
|
+
children: w.map((e) => /* @__PURE__ */ y("div", {
|
|
384
393
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4",
|
|
385
394
|
children: [
|
|
386
395
|
/* @__PURE__ */ y("div", {
|
|
@@ -429,7 +438,7 @@ function x() {
|
|
|
429
438
|
}),
|
|
430
439
|
/* @__PURE__ */ y("p", {
|
|
431
440
|
className: "text-text-primary",
|
|
432
|
-
children: [
|
|
441
|
+
children: [i(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
|
|
433
442
|
}),
|
|
434
443
|
/* @__PURE__ */ y("p", {
|
|
435
444
|
className: "text-text-secondary text-xs",
|
|
@@ -440,12 +449,12 @@ function x() {
|
|
|
440
449
|
/* @__PURE__ */ y("div", {
|
|
441
450
|
className: "flex flex-wrap gap-2 mb-3",
|
|
442
451
|
children: [
|
|
443
|
-
|
|
444
|
-
|
|
452
|
+
G(e.isActive),
|
|
453
|
+
W(e),
|
|
445
454
|
e.rating > 0 && /* @__PURE__ */ y("span", {
|
|
446
455
|
className: "inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
|
|
447
456
|
children: [
|
|
448
|
-
/* @__PURE__ */ v(
|
|
457
|
+
/* @__PURE__ */ v(m, { className: "h-3 w-3 fill-current" }),
|
|
449
458
|
e.rating,
|
|
450
459
|
" (",
|
|
451
460
|
e.reviewCount,
|
|
@@ -467,7 +476,7 @@ function x() {
|
|
|
467
476
|
children: [e.complianceScore, "%"]
|
|
468
477
|
})]
|
|
469
478
|
}),
|
|
470
|
-
|
|
479
|
+
K(e.complianceScore),
|
|
471
480
|
/* @__PURE__ */ y("p", {
|
|
472
481
|
className: "text-xs text-text-secondary mt-1",
|
|
473
482
|
children: [
|
|
@@ -477,7 +486,7 @@ function x() {
|
|
|
477
486
|
e.documentsRequired,
|
|
478
487
|
" • Applied:",
|
|
479
488
|
" ",
|
|
480
|
-
|
|
489
|
+
U(e.applicationDate)
|
|
481
490
|
]
|
|
482
491
|
})
|
|
483
492
|
]
|
|
@@ -487,30 +496,30 @@ function x() {
|
|
|
487
496
|
children: [
|
|
488
497
|
/* @__PURE__ */ v("button", {
|
|
489
498
|
type: "button",
|
|
490
|
-
onClick: () =>
|
|
499
|
+
onClick: () => V(e, "view"),
|
|
491
500
|
className: "flex-1 rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
492
501
|
children: "View Details"
|
|
493
502
|
}),
|
|
494
503
|
!e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
|
|
495
504
|
type: "button",
|
|
496
|
-
onClick: () =>
|
|
505
|
+
onClick: () => V(e, "approve"),
|
|
497
506
|
className: "rounded-lg bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
498
507
|
children: "Approve"
|
|
499
508
|
}), /* @__PURE__ */ v("button", {
|
|
500
509
|
type: "button",
|
|
501
|
-
onClick: () =>
|
|
510
|
+
onClick: () => V(e, "reject"),
|
|
502
511
|
className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
|
|
503
512
|
children: "Reject"
|
|
504
513
|
})] }),
|
|
505
514
|
e.inspectionStatus === "pending" && /* @__PURE__ */ v("button", {
|
|
506
515
|
type: "button",
|
|
507
|
-
onClick: () =>
|
|
516
|
+
onClick: () => V(e, "inspect"),
|
|
508
517
|
className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
509
518
|
children: "Inspect"
|
|
510
519
|
}),
|
|
511
520
|
e.isActive && /* @__PURE__ */ v("button", {
|
|
512
521
|
type: "button",
|
|
513
|
-
onClick: () =>
|
|
522
|
+
onClick: () => V(e, "suspend"),
|
|
514
523
|
className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
|
|
515
524
|
children: "Suspend"
|
|
516
525
|
})
|
|
@@ -553,7 +562,7 @@ function x() {
|
|
|
553
562
|
]
|
|
554
563
|
}) }), /* @__PURE__ */ v("tbody", {
|
|
555
564
|
className: "divide-y divide-border",
|
|
556
|
-
children:
|
|
565
|
+
children: w.map((e) => /* @__PURE__ */ y("tr", {
|
|
557
566
|
className: "hover:bg-accent/50 transition-colors",
|
|
558
567
|
children: [
|
|
559
568
|
/* @__PURE__ */ v("td", {
|
|
@@ -605,13 +614,13 @@ function x() {
|
|
|
605
614
|
children: /* @__PURE__ */ y("div", {
|
|
606
615
|
className: "space-y-1",
|
|
607
616
|
children: [
|
|
608
|
-
|
|
617
|
+
G(e.isActive),
|
|
609
618
|
/* @__PURE__ */ v("br", {}),
|
|
610
|
-
|
|
619
|
+
W(e),
|
|
611
620
|
e.rating > 0 && /* @__PURE__ */ y("div", {
|
|
612
621
|
className: "text-sm flex items-center gap-1 mt-1",
|
|
613
622
|
children: [
|
|
614
|
-
/* @__PURE__ */ v(
|
|
623
|
+
/* @__PURE__ */ v(m, { className: "h-3 w-3 fill-yellow-400 text-yellow-400" }),
|
|
615
624
|
e.rating,
|
|
616
625
|
" ",
|
|
617
626
|
/* @__PURE__ */ y("span", {
|
|
@@ -631,7 +640,7 @@ function x() {
|
|
|
631
640
|
className: "px-4 py-3 text-sm",
|
|
632
641
|
children: [/* @__PURE__ */ y("p", {
|
|
633
642
|
className: "text-text-primary",
|
|
634
|
-
children: [
|
|
643
|
+
children: [i(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
|
|
635
644
|
}), /* @__PURE__ */ y("p", {
|
|
636
645
|
className: "text-text-secondary",
|
|
637
646
|
children: [e.monthlyOrders, " orders/mo"]
|
|
@@ -644,7 +653,7 @@ function x() {
|
|
|
644
653
|
className: "flex items-center gap-2 mb-1",
|
|
645
654
|
children: [/* @__PURE__ */ v("div", {
|
|
646
655
|
className: "w-16",
|
|
647
|
-
children:
|
|
656
|
+
children: K(e.complianceScore)
|
|
648
657
|
}), /* @__PURE__ */ y("span", {
|
|
649
658
|
className: "font-medium text-text-primary",
|
|
650
659
|
children: [e.complianceScore, "%"]
|
|
@@ -661,7 +670,7 @@ function x() {
|
|
|
661
670
|
}),
|
|
662
671
|
/* @__PURE__ */ y("p", {
|
|
663
672
|
className: "text-xs text-text-secondary",
|
|
664
|
-
children: ["Applied: ",
|
|
673
|
+
children: ["Applied: ", U(e.applicationDate)]
|
|
665
674
|
})
|
|
666
675
|
]
|
|
667
676
|
}),
|
|
@@ -672,35 +681,35 @@ function x() {
|
|
|
672
681
|
children: [
|
|
673
682
|
/* @__PURE__ */ y("button", {
|
|
674
683
|
type: "button",
|
|
675
|
-
onClick: () =>
|
|
684
|
+
onClick: () => V(e, "view"),
|
|
676
685
|
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors inline-flex items-center gap-1 text-xs",
|
|
677
|
-
children: [/* @__PURE__ */ v(
|
|
686
|
+
children: [/* @__PURE__ */ v(u, { className: "h-4 w-4" }), " View"]
|
|
678
687
|
}),
|
|
679
688
|
!e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ y("div", {
|
|
680
689
|
className: "flex gap-1",
|
|
681
690
|
children: [/* @__PURE__ */ v("button", {
|
|
682
691
|
type: "button",
|
|
683
|
-
onClick: () =>
|
|
692
|
+
onClick: () => V(e, "approve"),
|
|
684
693
|
className: "rounded p-1.5 text-text-secondary hover:text-green-600 hover:bg-green-500/10 transition-colors",
|
|
685
|
-
children: /* @__PURE__ */ v(
|
|
694
|
+
children: /* @__PURE__ */ v(c, { className: "h-4 w-4" })
|
|
686
695
|
}), /* @__PURE__ */ v("button", {
|
|
687
696
|
type: "button",
|
|
688
|
-
onClick: () =>
|
|
697
|
+
onClick: () => V(e, "reject"),
|
|
689
698
|
className: "rounded p-1.5 text-text-secondary hover:text-red-600 hover:bg-red-500/10 transition-colors",
|
|
690
699
|
children: /* @__PURE__ */ v(g, { className: "h-4 w-4" })
|
|
691
700
|
})]
|
|
692
701
|
}),
|
|
693
702
|
e.inspectionStatus === "pending" && /* @__PURE__ */ y("button", {
|
|
694
703
|
type: "button",
|
|
695
|
-
onClick: () =>
|
|
704
|
+
onClick: () => V(e, "inspect"),
|
|
696
705
|
className: "rounded p-1.5 text-text-secondary hover:text-blue-600 hover:bg-blue-500/10 transition-colors inline-flex items-center gap-1 text-xs",
|
|
697
|
-
children: [/* @__PURE__ */ v(
|
|
706
|
+
children: [/* @__PURE__ */ v(l, { className: "h-4 w-4" }), " Inspect"]
|
|
698
707
|
}),
|
|
699
708
|
e.isActive && /* @__PURE__ */ v("button", {
|
|
700
709
|
type: "button",
|
|
701
|
-
onClick: () =>
|
|
710
|
+
onClick: () => V(e, "suspend"),
|
|
702
711
|
className: "rounded p-1.5 text-text-secondary hover:text-red-600 hover:bg-red-500/10 transition-colors",
|
|
703
|
-
children: /* @__PURE__ */ v(
|
|
712
|
+
children: /* @__PURE__ */ v(f, { className: "h-4 w-4" })
|
|
704
713
|
})
|
|
705
714
|
]
|
|
706
715
|
})
|
|
@@ -710,16 +719,14 @@ function x() {
|
|
|
710
719
|
})]
|
|
711
720
|
})
|
|
712
721
|
}),
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
children: "No carts found matching your criteria"
|
|
718
|
-
})]
|
|
722
|
+
w.length === 0 && /* @__PURE__ */ v(r, {
|
|
723
|
+
illustration: "empty-search",
|
|
724
|
+
title: "No carts found",
|
|
725
|
+
description: "No service providers match your current filters. Try adjusting your search or status filter."
|
|
719
726
|
})
|
|
720
727
|
]
|
|
721
728
|
}),
|
|
722
|
-
|
|
729
|
+
A && O && /* @__PURE__ */ v("div", {
|
|
723
730
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
724
731
|
children: /* @__PURE__ */ y("div", {
|
|
725
732
|
className: "w-full max-w-2xl rounded-lg border border-border-subtle bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
|
|
@@ -727,10 +734,10 @@ function x() {
|
|
|
727
734
|
className: "flex items-center justify-between p-4 border-b border-border-subtle",
|
|
728
735
|
children: [/* @__PURE__ */ v("h3", {
|
|
729
736
|
className: "text-lg font-semibold text-text-primary",
|
|
730
|
-
children:
|
|
737
|
+
children: M === "view" ? "Cart Details" : M === "approve" ? "Approve Cart" : M === "reject" ? "Reject Cart" : M === "suspend" ? "Suspend Cart" : "Schedule Inspection"
|
|
731
738
|
}), /* @__PURE__ */ v("button", {
|
|
732
739
|
type: "button",
|
|
733
|
-
onClick: () =>
|
|
740
|
+
onClick: () => j(!1),
|
|
734
741
|
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
|
|
735
742
|
children: /* @__PURE__ */ v(h, { className: "h-5 w-5" })
|
|
736
743
|
})]
|
|
@@ -745,28 +752,28 @@ function x() {
|
|
|
745
752
|
children: "Cart Name"
|
|
746
753
|
}), /* @__PURE__ */ v("p", {
|
|
747
754
|
className: "font-medium text-text-primary",
|
|
748
|
-
children:
|
|
755
|
+
children: O.name
|
|
749
756
|
})] }),
|
|
750
757
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
751
758
|
className: "text-sm text-text-secondary",
|
|
752
759
|
children: "Category"
|
|
753
760
|
}), /* @__PURE__ */ v("p", {
|
|
754
761
|
className: "font-medium text-text-primary",
|
|
755
|
-
children:
|
|
762
|
+
children: O.category
|
|
756
763
|
})] }),
|
|
757
764
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
758
765
|
className: "text-sm text-text-secondary",
|
|
759
766
|
children: "Owner"
|
|
760
767
|
}), /* @__PURE__ */ v("p", {
|
|
761
768
|
className: "font-medium text-text-primary",
|
|
762
|
-
children:
|
|
769
|
+
children: O.ownerName
|
|
763
770
|
})] }),
|
|
764
771
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
765
772
|
className: "text-sm text-text-secondary",
|
|
766
773
|
children: "Contact"
|
|
767
774
|
}), /* @__PURE__ */ v("p", {
|
|
768
775
|
className: "font-medium text-text-primary",
|
|
769
|
-
children:
|
|
776
|
+
children: O.ownerPhone
|
|
770
777
|
})] })
|
|
771
778
|
]
|
|
772
779
|
}),
|
|
@@ -775,14 +782,14 @@ function x() {
|
|
|
775
782
|
children: "Description"
|
|
776
783
|
}), /* @__PURE__ */ v("p", {
|
|
777
784
|
className: "font-medium text-text-primary",
|
|
778
|
-
children:
|
|
785
|
+
children: O.description
|
|
779
786
|
})] }),
|
|
780
787
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
781
788
|
className: "text-sm text-text-secondary",
|
|
782
789
|
children: "Location"
|
|
783
790
|
}), /* @__PURE__ */ v("p", {
|
|
784
791
|
className: "font-medium text-text-primary",
|
|
785
|
-
children:
|
|
792
|
+
children: O.address
|
|
786
793
|
})] }),
|
|
787
794
|
/* @__PURE__ */ y("div", {
|
|
788
795
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
@@ -792,7 +799,7 @@ function x() {
|
|
|
792
799
|
children: "Compliance Score"
|
|
793
800
|
}), /* @__PURE__ */ y("p", {
|
|
794
801
|
className: "font-medium text-text-primary",
|
|
795
|
-
children: [
|
|
802
|
+
children: [O.complianceScore, "%"]
|
|
796
803
|
})] }),
|
|
797
804
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
798
805
|
className: "text-sm text-text-secondary",
|
|
@@ -800,9 +807,9 @@ function x() {
|
|
|
800
807
|
}), /* @__PURE__ */ y("p", {
|
|
801
808
|
className: "font-medium text-text-primary",
|
|
802
809
|
children: [
|
|
803
|
-
|
|
810
|
+
O.documentsSubmitted,
|
|
804
811
|
"/",
|
|
805
|
-
|
|
812
|
+
O.documentsRequired
|
|
806
813
|
]
|
|
807
814
|
})] }),
|
|
808
815
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
@@ -810,31 +817,31 @@ function x() {
|
|
|
810
817
|
children: "Monthly Revenue"
|
|
811
818
|
}), /* @__PURE__ */ v("p", {
|
|
812
819
|
className: "font-medium text-text-primary",
|
|
813
|
-
children:
|
|
820
|
+
children: i(O.monthlyRevenue, { minimumFractionDigits: 0 })
|
|
814
821
|
})] })
|
|
815
822
|
]
|
|
816
823
|
}),
|
|
817
|
-
|
|
824
|
+
O.rejectionReason && /* @__PURE__ */ y("div", {
|
|
818
825
|
className: "rounded-lg border border-red-500/30 bg-red-500/10 p-4",
|
|
819
826
|
children: [/* @__PURE__ */ v("p", {
|
|
820
827
|
className: "text-sm font-medium text-red-600 dark:text-red-400",
|
|
821
828
|
children: "Previous Rejection Reason:"
|
|
822
829
|
}), /* @__PURE__ */ v("p", {
|
|
823
830
|
className: "text-sm text-red-600/80 dark:text-red-400/80",
|
|
824
|
-
children:
|
|
831
|
+
children: O.rejectionReason
|
|
825
832
|
})]
|
|
826
833
|
}),
|
|
827
|
-
|
|
834
|
+
M === "reject" && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
828
835
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
829
836
|
children: "Rejection Reason *"
|
|
830
837
|
}), /* @__PURE__ */ v("textarea", {
|
|
831
838
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface p-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] min-h-[100px]",
|
|
832
839
|
rows: 4,
|
|
833
|
-
value:
|
|
834
|
-
onChange: (e) =>
|
|
840
|
+
value: P,
|
|
841
|
+
onChange: (e) => F(e.target.value),
|
|
835
842
|
placeholder: "Please provide a detailed reason for rejection..."
|
|
836
843
|
})] }),
|
|
837
|
-
|
|
844
|
+
M === "approve" && /* @__PURE__ */ v("div", {
|
|
838
845
|
className: "rounded-lg border border-green-500/30 bg-green-500/10 p-4",
|
|
839
846
|
children: /* @__PURE__ */ v("p", {
|
|
840
847
|
className: "text-sm text-green-600 dark:text-green-400",
|
|
@@ -845,15 +852,15 @@ function x() {
|
|
|
845
852
|
className: "flex gap-3 pt-2",
|
|
846
853
|
children: [/* @__PURE__ */ v("button", {
|
|
847
854
|
type: "button",
|
|
848
|
-
onClick: () =>
|
|
855
|
+
onClick: () => j(!1),
|
|
849
856
|
className: "flex-1 rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
850
857
|
children: "Cancel"
|
|
851
|
-
}),
|
|
858
|
+
}), M !== "view" && /* @__PURE__ */ v("button", {
|
|
852
859
|
type: "button",
|
|
853
|
-
onClick:
|
|
854
|
-
disabled:
|
|
860
|
+
onClick: H,
|
|
861
|
+
disabled: M === "reject" && !P.trim(),
|
|
855
862
|
className: "flex-1 rounded-lg bg-action-primary-bg py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
856
|
-
children:
|
|
863
|
+
children: M === "approve" ? "Approve Cart" : M === "reject" ? "Reject Cart" : M === "suspend" ? "Suspend Cart" : "Schedule Inspection"
|
|
857
864
|
})]
|
|
858
865
|
})
|
|
859
866
|
]
|
|
@@ -864,6 +871,6 @@ function x() {
|
|
|
864
871
|
});
|
|
865
872
|
}
|
|
866
873
|
//#endregion
|
|
867
|
-
export {
|
|
874
|
+
export { C as CartManagementPage };
|
|
868
875
|
|
|
869
876
|
//# sourceMappingURL=CartManagementPage.js.map
|