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