@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.4
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/kadaikodi/KadaikodiRoutes.js +30 -26
- package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -4
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +5 -5
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
- package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
|
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
4
|
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
-
import { useProviders as i } from "../../hooks/useKadaikodiApi.js";
|
|
6
|
-
import { formatCurrency as
|
|
7
|
-
import { useMemo as
|
|
8
|
-
import {
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { EmphasisPanel as
|
|
5
|
+
import { useProviders as i, useUpdateProvider as a } from "../../hooks/useKadaikodiApi.js";
|
|
6
|
+
import { formatCurrency as o } from "../../utils/formatters.js";
|
|
7
|
+
import { useMemo as s, useState as c } from "react";
|
|
8
|
+
import { AlertCircle as l, CheckCircle2 as u, Eye as d, Loader2 as f, Pause as p, Search as m, Star as h, Store as g, X as _, XCircle as v } from "lucide-react";
|
|
9
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
10
|
+
import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
//#region src/kadaikodi/pages/admin/CartManagementPage.tsx
|
|
12
|
-
function
|
|
12
|
+
function w(e) {
|
|
13
13
|
return {
|
|
14
14
|
id: e.id,
|
|
15
15
|
name: e.name,
|
|
@@ -34,18 +34,23 @@ function C(e) {
|
|
|
34
34
|
applicationDate: e.createdAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
let { navigateTo:
|
|
37
|
+
function T() {
|
|
38
|
+
let { navigateTo: T } = e(), { data: E = [], isLoading: D } = i(), O = a(), [k, A] = c(null), j = (e, t) => {
|
|
39
|
+
A({
|
|
40
|
+
text: e,
|
|
41
|
+
type: t
|
|
42
|
+
}), setTimeout(() => A(null), 3500);
|
|
43
|
+
}, [M, N] = c(null), [P, F] = c(!1), [I, L] = c("view"), [R, z] = c(""), [B, V] = c({
|
|
39
44
|
searchQuery: "",
|
|
40
45
|
status: "",
|
|
41
46
|
verificationStatus: "",
|
|
42
47
|
category: "",
|
|
43
48
|
location: "",
|
|
44
49
|
sortBy: "recent"
|
|
45
|
-
}),
|
|
46
|
-
let e =
|
|
50
|
+
}), H = s(() => E.map(w), [E]), U = s(() => {
|
|
51
|
+
let e = H.filter((e) => e.isActive).length, t = H.filter((e) => !e.isVerified).length, n = H.length ? H.reduce((e, t) => e + t.rating, 0) / H.length : 0;
|
|
47
52
|
return {
|
|
48
|
-
totalCarts:
|
|
53
|
+
totalCarts: H.length,
|
|
49
54
|
activeCarts: e,
|
|
50
55
|
pendingApproval: t,
|
|
51
56
|
rejectedCarts: 0,
|
|
@@ -54,13 +59,13 @@ function w() {
|
|
|
54
59
|
complianceRate: 0,
|
|
55
60
|
newApplications: t
|
|
56
61
|
};
|
|
57
|
-
}, [
|
|
58
|
-
let e = [...
|
|
59
|
-
if (
|
|
60
|
-
let t =
|
|
62
|
+
}, [H]), W = s(() => {
|
|
63
|
+
let e = [...H];
|
|
64
|
+
if (B.searchQuery) {
|
|
65
|
+
let t = B.searchQuery.toLowerCase();
|
|
61
66
|
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.ownerName.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.address.toLowerCase().includes(t));
|
|
62
67
|
}
|
|
63
|
-
switch (
|
|
68
|
+
switch (B.status && (B.status === "active" && (e = e.filter((e) => e.isActive)), B.status === "inactive" && (e = e.filter((e) => !e.isActive))), B.verificationStatus && (B.verificationStatus === "verified" && (e = e.filter((e) => e.isVerified)), B.verificationStatus === "pending" && (e = e.filter((e) => !e.isVerified && e.inspectionStatus !== "failed")), B.verificationStatus === "rejected" && (e = e.filter((e) => e.inspectionStatus === "failed"))), B.category && (e = e.filter((e) => e.category === B.category)), B.location && (e = e.filter((e) => e.city.toLowerCase().includes(B.location.toLowerCase()))), B.sortBy) {
|
|
64
69
|
case "name":
|
|
65
70
|
e.sort((e, t) => e.name.localeCompare(t.name));
|
|
66
71
|
break;
|
|
@@ -76,257 +81,259 @@ function w() {
|
|
|
76
81
|
default: e.sort((e, t) => new Date(t.applicationDate).getTime() - new Date(e.applicationDate).getTime());
|
|
77
82
|
}
|
|
78
83
|
return e;
|
|
79
|
-
}, [
|
|
80
|
-
|
|
84
|
+
}, [H, B]), G = (e, t) => {
|
|
85
|
+
V((n) => ({
|
|
81
86
|
...n,
|
|
82
87
|
[e]: t
|
|
83
88
|
}));
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
if (!
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
e = `Cart "${D.name}" approved successfully`;
|
|
92
|
-
break;
|
|
93
|
-
case "reject":
|
|
94
|
-
if (!N.trim()) {
|
|
95
|
-
alert("Please provide a rejection reason");
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
e = `Cart "${D.name}" rejected`;
|
|
99
|
-
break;
|
|
100
|
-
case "suspend":
|
|
101
|
-
e = `Cart "${D.name}" suspended`;
|
|
102
|
-
break;
|
|
103
|
-
case "inspect":
|
|
104
|
-
e = `Inspection scheduled for "${D.name}"`;
|
|
105
|
-
break;
|
|
89
|
+
}, K = (e, t) => {
|
|
90
|
+
N(e), L(t), z(""), F(!0);
|
|
91
|
+
}, q = () => {
|
|
92
|
+
if (!M || I === "view") return;
|
|
93
|
+
if (I === "reject" && !R.trim()) {
|
|
94
|
+
j("Please provide a rejection reason", "error");
|
|
95
|
+
return;
|
|
106
96
|
}
|
|
107
|
-
|
|
108
|
-
|
|
97
|
+
let e = I === "approve" ? "VERIFIED" : I === "reject" ? "ARCHIVED" : "SUSPENDED";
|
|
98
|
+
O.mutate({
|
|
99
|
+
id: M.id,
|
|
100
|
+
input: { status: e }
|
|
101
|
+
}, {
|
|
102
|
+
onSuccess: () => {
|
|
103
|
+
let e = I === "approve" ? "approved" : I === "reject" ? "rejected" : "suspended";
|
|
104
|
+
j(`Cart "${M.name}" ${e}.`, "success"), F(!1), z("");
|
|
105
|
+
},
|
|
106
|
+
onError: () => j(`Could not ${I} "${M.name}". Please try again.`, "error")
|
|
107
|
+
});
|
|
108
|
+
}, J = (e) => new Date(e).toLocaleDateString("en-IN", {
|
|
109
109
|
year: "numeric",
|
|
110
110
|
month: "short",
|
|
111
111
|
day: "numeric"
|
|
112
|
-
}),
|
|
112
|
+
}), Y = (e) => e.isVerified ? /* @__PURE__ */ b("span", {
|
|
113
113
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-success-bg-subtle text-status-success-text",
|
|
114
114
|
children: "Verified"
|
|
115
|
-
}) : e.inspectionStatus === "pending" ? /* @__PURE__ */
|
|
115
|
+
}) : e.inspectionStatus === "pending" ? /* @__PURE__ */ b("span", {
|
|
116
116
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-warning-bg-subtle text-status-warning-text",
|
|
117
117
|
children: "Pending Review"
|
|
118
|
-
}) : e.inspectionStatus === "scheduled" ? /* @__PURE__ */
|
|
118
|
+
}) : e.inspectionStatus === "scheduled" ? /* @__PURE__ */ b("span", {
|
|
119
119
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-[var(--color-accent-soft)] text-text-primary",
|
|
120
120
|
children: "Inspection Scheduled"
|
|
121
|
-
}) : e.inspectionStatus === "failed" ? /* @__PURE__ */
|
|
121
|
+
}) : e.inspectionStatus === "failed" ? /* @__PURE__ */ b("span", {
|
|
122
122
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-error-bg-subtle text-status-error-text",
|
|
123
123
|
children: "Rejected"
|
|
124
|
-
}) : /* @__PURE__ */
|
|
124
|
+
}) : /* @__PURE__ */ b("span", {
|
|
125
125
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-bg-sunken text-text-secondary",
|
|
126
126
|
children: "Under Review"
|
|
127
|
-
}),
|
|
127
|
+
}), X = (e) => e ? /* @__PURE__ */ b("span", {
|
|
128
128
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-success-bg-subtle text-status-success-text",
|
|
129
129
|
children: "Active"
|
|
130
|
-
}) : /* @__PURE__ */
|
|
130
|
+
}) : /* @__PURE__ */ b("span", {
|
|
131
131
|
className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-bg-sunken text-text-secondary",
|
|
132
132
|
children: "Inactive"
|
|
133
|
-
}),
|
|
133
|
+
}), Z = (e) => /* @__PURE__ */ b("div", {
|
|
134
134
|
className: "w-full bg-bg-sunken rounded-full h-2",
|
|
135
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ b("div", {
|
|
136
136
|
className: t("h-2 rounded-full", e >= 80 ? "bg-status-success-text" : e >= 60 ? "bg-status-warning-text" : "bg-status-error-text"),
|
|
137
137
|
style: { width: `${e}%` }
|
|
138
138
|
})
|
|
139
139
|
});
|
|
140
|
-
return
|
|
140
|
+
return D ? /* @__PURE__ */ b(n, {
|
|
141
141
|
title: "Cart Management",
|
|
142
142
|
description: "Loading carts...",
|
|
143
|
-
children: /* @__PURE__ */
|
|
143
|
+
children: /* @__PURE__ */ x("div", {
|
|
144
144
|
className: "flex flex-col items-center justify-center py-20",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ b(f, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ b("p", {
|
|
146
146
|
className: "text-text-secondary",
|
|
147
147
|
children: "Loading carts..."
|
|
148
148
|
})]
|
|
149
149
|
})
|
|
150
|
-
}) : /* @__PURE__ */
|
|
150
|
+
}) : /* @__PURE__ */ x(n, {
|
|
151
151
|
title: "Cart Management",
|
|
152
|
-
description: `${
|
|
153
|
-
actions: /* @__PURE__ */
|
|
152
|
+
description: `${U.totalCarts} service providers on the platform`,
|
|
153
|
+
actions: /* @__PURE__ */ x("span", {
|
|
154
154
|
className: "text-sm text-text-secondary",
|
|
155
|
-
children: [
|
|
155
|
+
children: [U.pendingApproval, " pending approval"]
|
|
156
156
|
}),
|
|
157
157
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ b(C, {
|
|
159
159
|
className: "mb-6",
|
|
160
160
|
children: "Where you onboard and oversee every cart (service provider) on Kadaikodi. Use this page to approve or reject new applications, verify legitimate businesses, suspend ones that break the rules, and keep an eye on each cart's performance and ratings — so customers only ever see trustworthy, active providers. Filter and search to zero in on what needs your attention."
|
|
161
161
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
k && /* @__PURE__ */ x("div", {
|
|
163
|
+
className: t("mb-6 flex items-center gap-2 rounded-lg border p-3", k.type === "success" ? "border-status-success-text/30 bg-status-success-bg-subtle" : "border-status-error-text/30 bg-status-error-bg-subtle"),
|
|
164
|
+
children: [k.type === "success" ? /* @__PURE__ */ b(u, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ b(l, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ b("span", {
|
|
165
|
+
className: t("text-sm font-medium", k.type === "success" ? "text-status-success-text" : "text-status-error-text"),
|
|
166
|
+
children: k.text
|
|
167
|
+
})]
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ x(S, {
|
|
163
170
|
className: "mb-6",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
165
172
|
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
166
173
|
children: "Provider Overview"
|
|
167
|
-
}), /* @__PURE__ */
|
|
174
|
+
}), /* @__PURE__ */ b("div", {
|
|
168
175
|
className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3",
|
|
169
176
|
children: [
|
|
170
177
|
{
|
|
171
178
|
label: "Total Carts",
|
|
172
|
-
value:
|
|
179
|
+
value: U.totalCarts,
|
|
173
180
|
cls: ""
|
|
174
181
|
},
|
|
175
182
|
{
|
|
176
183
|
label: "Active",
|
|
177
|
-
value:
|
|
184
|
+
value: U.activeCarts,
|
|
178
185
|
cls: "bg-status-success-bg-subtle border-status-success-text/30"
|
|
179
186
|
},
|
|
180
187
|
{
|
|
181
188
|
label: "Pending",
|
|
182
|
-
value:
|
|
189
|
+
value: U.pendingApproval,
|
|
183
190
|
cls: "bg-status-warning-bg-subtle border-status-warning-text/30"
|
|
184
191
|
},
|
|
185
192
|
{
|
|
186
193
|
label: "Rejected",
|
|
187
|
-
value:
|
|
194
|
+
value: U.rejectedCarts,
|
|
188
195
|
cls: "bg-status-error-bg-subtle border-status-error-text/30"
|
|
189
196
|
},
|
|
190
197
|
{
|
|
191
198
|
label: "Total Revenue",
|
|
192
|
-
value:
|
|
199
|
+
value: o(U.totalRevenue, { minimumFractionDigits: 0 }),
|
|
193
200
|
cls: "col-span-2 min-w-fit"
|
|
194
201
|
},
|
|
195
202
|
{
|
|
196
203
|
label: "Avg Rating",
|
|
197
|
-
value: `${
|
|
204
|
+
value: `${U.averageRating}`,
|
|
198
205
|
cls: ""
|
|
199
206
|
},
|
|
200
207
|
{
|
|
201
208
|
label: "New Apps",
|
|
202
|
-
value:
|
|
209
|
+
value: U.newApplications,
|
|
203
210
|
cls: "bg-[var(--color-accent-soft)] border-border-focus/30"
|
|
204
211
|
}
|
|
205
|
-
].map((e) => /* @__PURE__ */
|
|
212
|
+
].map((e) => /* @__PURE__ */ x("div", {
|
|
206
213
|
className: t("rounded-lg border border-border-subtle bg-bg-surface p-3", e.cls),
|
|
207
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ b("p", {
|
|
208
215
|
className: "text-xs text-text-secondary",
|
|
209
216
|
children: e.label
|
|
210
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ b("p", {
|
|
211
218
|
className: "text-lg font-bold text-text-primary",
|
|
212
219
|
children: e.value
|
|
213
220
|
})]
|
|
214
221
|
}, e.label))
|
|
215
222
|
})]
|
|
216
223
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ b("div", {
|
|
218
225
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 mb-6",
|
|
219
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ x("div", {
|
|
220
227
|
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",
|
|
221
228
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ x("div", {
|
|
223
230
|
className: "relative",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
231
|
+
children: [/* @__PURE__ */ b(m, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ b("input", {
|
|
225
232
|
type: "text",
|
|
226
233
|
placeholder: "Search carts...",
|
|
227
|
-
value:
|
|
228
|
-
onChange: (e) =>
|
|
234
|
+
value: B.searchQuery,
|
|
235
|
+
onChange: (e) => G("searchQuery", e.target.value),
|
|
229
236
|
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)]"
|
|
230
237
|
})]
|
|
231
238
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
value:
|
|
234
|
-
onChange: (e) =>
|
|
239
|
+
/* @__PURE__ */ x("select", {
|
|
240
|
+
value: B.status,
|
|
241
|
+
onChange: (e) => G("status", e.target.value),
|
|
235
242
|
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)]",
|
|
236
243
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ b("option", {
|
|
238
245
|
value: "",
|
|
239
246
|
children: "All Status"
|
|
240
247
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ b("option", {
|
|
242
249
|
value: "active",
|
|
243
250
|
children: "Active"
|
|
244
251
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ b("option", {
|
|
246
253
|
value: "inactive",
|
|
247
254
|
children: "Inactive"
|
|
248
255
|
})
|
|
249
256
|
]
|
|
250
257
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
value:
|
|
253
|
-
onChange: (e) =>
|
|
258
|
+
/* @__PURE__ */ x("select", {
|
|
259
|
+
value: B.verificationStatus,
|
|
260
|
+
onChange: (e) => G("verificationStatus", e.target.value),
|
|
254
261
|
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)]",
|
|
255
262
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ b("option", {
|
|
257
264
|
value: "",
|
|
258
265
|
children: "All Verification"
|
|
259
266
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ b("option", {
|
|
261
268
|
value: "verified",
|
|
262
269
|
children: "Verified"
|
|
263
270
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ b("option", {
|
|
265
272
|
value: "pending",
|
|
266
273
|
children: "Pending"
|
|
267
274
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ b("option", {
|
|
269
276
|
value: "rejected",
|
|
270
277
|
children: "Rejected"
|
|
271
278
|
})
|
|
272
279
|
]
|
|
273
280
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
value:
|
|
276
|
-
onChange: (e) =>
|
|
281
|
+
/* @__PURE__ */ x("select", {
|
|
282
|
+
value: B.category,
|
|
283
|
+
onChange: (e) => G("category", e.target.value),
|
|
277
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)]",
|
|
278
285
|
children: [
|
|
279
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ b("option", {
|
|
280
287
|
value: "",
|
|
281
288
|
children: "All Categories"
|
|
282
289
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ b("option", {
|
|
284
291
|
value: "Food & Beverage",
|
|
285
292
|
children: "Food & Beverage"
|
|
286
293
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ b("option", {
|
|
288
295
|
value: "Beverages",
|
|
289
296
|
children: "Beverages"
|
|
290
297
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ b("option", {
|
|
292
299
|
value: "Street Food",
|
|
293
300
|
children: "Street Food"
|
|
294
301
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ b("option", {
|
|
296
303
|
value: "Fast Food",
|
|
297
304
|
children: "Fast Food"
|
|
298
305
|
})
|
|
299
306
|
]
|
|
300
307
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ b("input", {
|
|
302
309
|
type: "text",
|
|
303
310
|
placeholder: "Location...",
|
|
304
|
-
value:
|
|
305
|
-
onChange: (e) =>
|
|
311
|
+
value: B.location,
|
|
312
|
+
onChange: (e) => G("location", e.target.value),
|
|
306
313
|
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)]"
|
|
307
314
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
value:
|
|
310
|
-
onChange: (e) =>
|
|
315
|
+
/* @__PURE__ */ x("select", {
|
|
316
|
+
value: B.sortBy,
|
|
317
|
+
onChange: (e) => G("sortBy", e.target.value),
|
|
311
318
|
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)]",
|
|
312
319
|
children: [
|
|
313
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ b("option", {
|
|
314
321
|
value: "recent",
|
|
315
322
|
children: "Most Recent"
|
|
316
323
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ b("option", {
|
|
318
325
|
value: "name",
|
|
319
326
|
children: "Name A-Z"
|
|
320
327
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ b("option", {
|
|
322
329
|
value: "rating",
|
|
323
330
|
children: "Highest Rated"
|
|
324
331
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ b("option", {
|
|
326
333
|
value: "revenue",
|
|
327
334
|
children: "Highest Revenue"
|
|
328
335
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ b("option", {
|
|
330
337
|
value: "compliance",
|
|
331
338
|
children: "Best Compliance"
|
|
332
339
|
})
|
|
@@ -335,76 +342,76 @@ function w() {
|
|
|
335
342
|
]
|
|
336
343
|
})
|
|
337
344
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ x("div", {
|
|
339
346
|
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
|
|
340
347
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ b("div", {
|
|
342
349
|
className: "block md:hidden space-y-4 p-4",
|
|
343
|
-
children:
|
|
350
|
+
children: W.map((e) => /* @__PURE__ */ x("div", {
|
|
344
351
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4",
|
|
345
352
|
children: [
|
|
346
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ x("div", {
|
|
347
354
|
className: "flex items-center mb-3",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ b("div", {
|
|
349
356
|
className: "w-16 h-16 rounded-lg bg-bg-sunken flex items-center justify-center mr-3 shrink-0",
|
|
350
|
-
children: /* @__PURE__ */
|
|
351
|
-
}), /* @__PURE__ */
|
|
357
|
+
children: /* @__PURE__ */ b(g, { className: "h-7 w-7 text-text-secondary" })
|
|
358
|
+
}), /* @__PURE__ */ x("div", {
|
|
352
359
|
className: "flex-1 min-w-0",
|
|
353
360
|
children: [
|
|
354
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ b("h3", {
|
|
355
362
|
className: "font-medium text-text-primary text-lg truncate",
|
|
356
363
|
children: e.name
|
|
357
364
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ b("p", {
|
|
359
366
|
className: "text-sm text-text-secondary truncate",
|
|
360
367
|
children: e.category
|
|
361
368
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ b("p", {
|
|
363
370
|
className: "text-sm text-text-secondary truncate",
|
|
364
371
|
children: e.address
|
|
365
372
|
})
|
|
366
373
|
]
|
|
367
374
|
})]
|
|
368
375
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ x("div", {
|
|
370
377
|
className: "grid grid-cols-2 gap-4 mb-3 text-sm",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ x("div", { children: [
|
|
379
|
+
/* @__PURE__ */ b("p", {
|
|
373
380
|
className: "text-text-secondary font-medium",
|
|
374
381
|
children: "Owner"
|
|
375
382
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ b("p", {
|
|
377
384
|
className: "text-text-primary",
|
|
378
385
|
children: e.ownerName
|
|
379
386
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ b("p", {
|
|
381
388
|
className: "text-text-secondary text-xs",
|
|
382
389
|
children: e.ownerPhone
|
|
383
390
|
})
|
|
384
|
-
] }), /* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
391
|
+
] }), /* @__PURE__ */ x("div", { children: [
|
|
392
|
+
/* @__PURE__ */ b("p", {
|
|
386
393
|
className: "text-text-secondary font-medium",
|
|
387
394
|
children: "Performance"
|
|
388
395
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ x("p", {
|
|
390
397
|
className: "text-text-primary",
|
|
391
|
-
children: [
|
|
398
|
+
children: [o(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
|
|
392
399
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ x("p", {
|
|
394
401
|
className: "text-text-secondary text-xs",
|
|
395
402
|
children: [e.monthlyOrders, " orders"]
|
|
396
403
|
})
|
|
397
404
|
] })]
|
|
398
405
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ x("div", {
|
|
400
407
|
className: "flex flex-wrap gap-2 mb-3",
|
|
401
408
|
children: [
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
e.rating > 0 && /* @__PURE__ */
|
|
409
|
+
X(e.isActive),
|
|
410
|
+
Y(e),
|
|
411
|
+
e.rating > 0 && /* @__PURE__ */ x("span", {
|
|
405
412
|
className: "inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-warning-bg-subtle text-status-warning-text",
|
|
406
413
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ b(h, { className: "h-3 w-3 fill-current" }),
|
|
408
415
|
e.rating,
|
|
409
416
|
" (",
|
|
410
417
|
e.reviewCount,
|
|
@@ -413,21 +420,21 @@ function w() {
|
|
|
413
420
|
})
|
|
414
421
|
]
|
|
415
422
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ x("div", {
|
|
417
424
|
className: "mb-3",
|
|
418
425
|
children: [
|
|
419
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ x("div", {
|
|
420
427
|
className: "flex items-center justify-between text-sm mb-1",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ b("span", {
|
|
422
429
|
className: "text-text-secondary",
|
|
423
430
|
children: "Compliance"
|
|
424
|
-
}), /* @__PURE__ */
|
|
431
|
+
}), /* @__PURE__ */ x("span", {
|
|
425
432
|
className: "font-medium text-text-primary",
|
|
426
433
|
children: [e.complianceScore, "%"]
|
|
427
434
|
})]
|
|
428
435
|
}),
|
|
429
|
-
|
|
430
|
-
/* @__PURE__ */
|
|
436
|
+
Z(e.complianceScore),
|
|
437
|
+
/* @__PURE__ */ x("p", {
|
|
431
438
|
className: "text-xs text-text-secondary mt-1",
|
|
432
439
|
children: [
|
|
433
440
|
"Docs: ",
|
|
@@ -436,40 +443,34 @@ function w() {
|
|
|
436
443
|
e.documentsRequired,
|
|
437
444
|
" • Applied:",
|
|
438
445
|
" ",
|
|
439
|
-
|
|
446
|
+
J(e.applicationDate)
|
|
440
447
|
]
|
|
441
448
|
})
|
|
442
449
|
]
|
|
443
450
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ x("div", {
|
|
445
452
|
className: "flex flex-wrap gap-2",
|
|
446
453
|
children: [
|
|
447
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ b("button", {
|
|
448
455
|
type: "button",
|
|
449
|
-
onClick: () =>
|
|
456
|
+
onClick: () => K(e, "view"),
|
|
450
457
|
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",
|
|
451
458
|
children: "View Details"
|
|
452
459
|
}),
|
|
453
|
-
!e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */
|
|
460
|
+
!e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("button", {
|
|
454
461
|
type: "button",
|
|
455
|
-
onClick: () =>
|
|
462
|
+
onClick: () => K(e, "approve"),
|
|
456
463
|
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",
|
|
457
464
|
children: "Approve"
|
|
458
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), /* @__PURE__ */ b("button", {
|
|
459
466
|
type: "button",
|
|
460
|
-
onClick: () =>
|
|
467
|
+
onClick: () => K(e, "reject"),
|
|
461
468
|
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 transition-colors",
|
|
462
469
|
children: "Reject"
|
|
463
470
|
})] }),
|
|
464
|
-
e.
|
|
471
|
+
e.isActive && /* @__PURE__ */ b("button", {
|
|
465
472
|
type: "button",
|
|
466
|
-
onClick: () =>
|
|
467
|
-
className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
468
|
-
children: "Inspect"
|
|
469
|
-
}),
|
|
470
|
-
e.isActive && /* @__PURE__ */ y("button", {
|
|
471
|
-
type: "button",
|
|
472
|
-
onClick: () => V(e, "suspend"),
|
|
473
|
+
onClick: () => K(e, "suspend"),
|
|
473
474
|
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 transition-colors",
|
|
474
475
|
children: "Suspend"
|
|
475
476
|
})
|
|
@@ -478,62 +479,62 @@ function w() {
|
|
|
478
479
|
]
|
|
479
480
|
}, e.id))
|
|
480
481
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ b("div", {
|
|
482
483
|
className: "hidden md:block overflow-x-auto",
|
|
483
|
-
children: /* @__PURE__ */
|
|
484
|
+
children: /* @__PURE__ */ x("table", {
|
|
484
485
|
className: "w-full",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
|
|
486
487
|
className: "border-b border-border-subtle bg-bg-sunken/50",
|
|
487
488
|
children: [
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ b("th", {
|
|
489
490
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
490
491
|
children: "Cart"
|
|
491
492
|
}),
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ b("th", {
|
|
493
494
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
494
495
|
children: "Owner"
|
|
495
496
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ b("th", {
|
|
497
498
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
498
499
|
children: "Status"
|
|
499
500
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ b("th", {
|
|
501
502
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
502
503
|
children: "Performance"
|
|
503
504
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ b("th", {
|
|
505
506
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
506
507
|
children: "Compliance"
|
|
507
508
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ b("th", {
|
|
509
510
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
510
511
|
children: "Actions"
|
|
511
512
|
})
|
|
512
513
|
]
|
|
513
|
-
}) }), /* @__PURE__ */
|
|
514
|
+
}) }), /* @__PURE__ */ b("tbody", {
|
|
514
515
|
className: "divide-y divide-border",
|
|
515
|
-
children:
|
|
516
|
+
children: W.map((e) => /* @__PURE__ */ x("tr", {
|
|
516
517
|
className: "hover:bg-accent/50 transition-colors",
|
|
517
518
|
children: [
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ b("td", {
|
|
519
520
|
className: "px-4 py-3",
|
|
520
|
-
children: /* @__PURE__ */
|
|
521
|
+
children: /* @__PURE__ */ x("div", {
|
|
521
522
|
className: "flex items-center gap-3",
|
|
522
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ b("div", {
|
|
523
524
|
className: "w-12 h-12 rounded-lg bg-bg-sunken flex items-center justify-center shrink-0",
|
|
524
|
-
children: /* @__PURE__ */
|
|
525
|
-
}), /* @__PURE__ */
|
|
525
|
+
children: /* @__PURE__ */ b(g, { className: "h-5 w-5 text-text-secondary" })
|
|
526
|
+
}), /* @__PURE__ */ x("div", {
|
|
526
527
|
className: "min-w-0",
|
|
527
528
|
children: [
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ b("p", {
|
|
529
530
|
className: "text-sm font-medium text-text-primary truncate",
|
|
530
531
|
children: e.name
|
|
531
532
|
}),
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ b("p", {
|
|
533
534
|
className: "text-xs text-text-secondary truncate",
|
|
534
535
|
children: e.category
|
|
535
536
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ b("p", {
|
|
537
538
|
className: "text-xs text-text-secondary truncate",
|
|
538
539
|
children: e.address
|
|
539
540
|
})
|
|
@@ -541,38 +542,38 @@ function w() {
|
|
|
541
542
|
})]
|
|
542
543
|
})
|
|
543
544
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ x("td", {
|
|
545
546
|
className: "px-4 py-3 text-sm",
|
|
546
547
|
children: [
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ b("p", {
|
|
548
549
|
className: "font-medium text-text-primary",
|
|
549
550
|
children: e.ownerName
|
|
550
551
|
}),
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ b("p", {
|
|
552
553
|
className: "text-xs text-text-secondary",
|
|
553
554
|
children: e.ownerEmail
|
|
554
555
|
}),
|
|
555
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ b("p", {
|
|
556
557
|
className: "text-xs text-text-secondary",
|
|
557
558
|
children: e.ownerPhone
|
|
558
559
|
})
|
|
559
560
|
]
|
|
560
561
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ b("td", {
|
|
562
563
|
className: "px-4 py-3",
|
|
563
|
-
children: /* @__PURE__ */
|
|
564
|
+
children: /* @__PURE__ */ x("div", {
|
|
564
565
|
className: "space-y-1",
|
|
565
566
|
children: [
|
|
566
|
-
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
|
|
569
|
-
e.rating > 0 && /* @__PURE__ */
|
|
567
|
+
X(e.isActive),
|
|
568
|
+
/* @__PURE__ */ b("br", {}),
|
|
569
|
+
Y(e),
|
|
570
|
+
e.rating > 0 && /* @__PURE__ */ x("div", {
|
|
570
571
|
className: "text-sm flex items-center gap-1 mt-1",
|
|
571
572
|
children: [
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ b(h, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }),
|
|
573
574
|
e.rating,
|
|
574
575
|
" ",
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ x("span", {
|
|
576
577
|
className: "text-text-secondary",
|
|
577
578
|
children: [
|
|
578
579
|
"(",
|
|
@@ -585,30 +586,30 @@ function w() {
|
|
|
585
586
|
]
|
|
586
587
|
})
|
|
587
588
|
}),
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ x("td", {
|
|
589
590
|
className: "px-4 py-3 text-sm",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
591
|
+
children: [/* @__PURE__ */ x("p", {
|
|
591
592
|
className: "text-text-primary",
|
|
592
|
-
children: [
|
|
593
|
-
}), /* @__PURE__ */
|
|
593
|
+
children: [o(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
|
|
594
|
+
}), /* @__PURE__ */ x("p", {
|
|
594
595
|
className: "text-text-secondary",
|
|
595
596
|
children: [e.monthlyOrders, " orders/mo"]
|
|
596
597
|
})]
|
|
597
598
|
}),
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ x("td", {
|
|
599
600
|
className: "px-4 py-3 text-sm",
|
|
600
601
|
children: [
|
|
601
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ x("div", {
|
|
602
603
|
className: "flex items-center gap-2 mb-1",
|
|
603
|
-
children: [/* @__PURE__ */
|
|
604
|
+
children: [/* @__PURE__ */ b("div", {
|
|
604
605
|
className: "w-16",
|
|
605
|
-
children:
|
|
606
|
-
}), /* @__PURE__ */
|
|
606
|
+
children: Z(e.complianceScore)
|
|
607
|
+
}), /* @__PURE__ */ x("span", {
|
|
607
608
|
className: "font-medium text-text-primary",
|
|
608
609
|
children: [e.complianceScore, "%"]
|
|
609
610
|
})]
|
|
610
611
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ x("p", {
|
|
612
613
|
className: "text-xs text-text-secondary",
|
|
613
614
|
children: [
|
|
614
615
|
"Docs: ",
|
|
@@ -617,48 +618,42 @@ function w() {
|
|
|
617
618
|
e.documentsRequired
|
|
618
619
|
]
|
|
619
620
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ x("p", {
|
|
621
622
|
className: "text-xs text-text-secondary",
|
|
622
|
-
children: ["Applied: ",
|
|
623
|
+
children: ["Applied: ", J(e.applicationDate)]
|
|
623
624
|
})
|
|
624
625
|
]
|
|
625
626
|
}),
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ b("td", {
|
|
627
628
|
className: "px-4 py-3",
|
|
628
|
-
children: /* @__PURE__ */
|
|
629
|
+
children: /* @__PURE__ */ x("div", {
|
|
629
630
|
className: "flex flex-col gap-1",
|
|
630
631
|
children: [
|
|
631
|
-
/* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ x("button", {
|
|
632
633
|
type: "button",
|
|
633
|
-
onClick: () =>
|
|
634
|
+
onClick: () => K(e, "view"),
|
|
634
635
|
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",
|
|
635
|
-
children: [/* @__PURE__ */
|
|
636
|
+
children: [/* @__PURE__ */ b(d, { className: "h-4 w-4" }), " View"]
|
|
636
637
|
}),
|
|
637
|
-
!e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */
|
|
638
|
+
!e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ x("div", {
|
|
638
639
|
className: "flex gap-1",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ b("button", {
|
|
640
641
|
type: "button",
|
|
641
|
-
onClick: () =>
|
|
642
|
+
onClick: () => K(e, "approve"),
|
|
642
643
|
className: "rounded p-1.5 text-text-secondary hover:text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
|
|
643
|
-
children: /* @__PURE__ */
|
|
644
|
-
}), /* @__PURE__ */
|
|
644
|
+
children: /* @__PURE__ */ b(u, { className: "h-4 w-4" })
|
|
645
|
+
}), /* @__PURE__ */ b("button", {
|
|
645
646
|
type: "button",
|
|
646
|
-
onClick: () =>
|
|
647
|
+
onClick: () => K(e, "reject"),
|
|
647
648
|
className: "rounded p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
648
|
-
children: /* @__PURE__ */
|
|
649
|
+
children: /* @__PURE__ */ b(v, { className: "h-4 w-4" })
|
|
649
650
|
})]
|
|
650
651
|
}),
|
|
651
|
-
e.
|
|
652
|
+
e.isActive && /* @__PURE__ */ b("button", {
|
|
652
653
|
type: "button",
|
|
653
|
-
onClick: () =>
|
|
654
|
-
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-[var(--color-accent-soft)] transition-colors inline-flex items-center gap-1 text-xs",
|
|
655
|
-
children: [/* @__PURE__ */ y(l, { className: "h-4 w-4" }), " Inspect"]
|
|
656
|
-
}),
|
|
657
|
-
e.isActive && /* @__PURE__ */ y("button", {
|
|
658
|
-
type: "button",
|
|
659
|
-
onClick: () => V(e, "suspend"),
|
|
654
|
+
onClick: () => K(e, "suspend"),
|
|
660
655
|
className: "rounded p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
661
|
-
children: /* @__PURE__ */
|
|
656
|
+
children: /* @__PURE__ */ b(p, { className: "h-4 w-4" })
|
|
662
657
|
})
|
|
663
658
|
]
|
|
664
659
|
})
|
|
@@ -668,13 +663,13 @@ function w() {
|
|
|
668
663
|
})]
|
|
669
664
|
})
|
|
670
665
|
}),
|
|
671
|
-
|
|
666
|
+
W.length === 0 && /* @__PURE__ */ b(r, {
|
|
672
667
|
illustration: "empty-search",
|
|
673
668
|
title: "No carts found",
|
|
674
669
|
description: "No service providers match your current filters. Try clearing the filters or searching for a different name.",
|
|
675
|
-
action: /* @__PURE__ */
|
|
670
|
+
action: /* @__PURE__ */ b("button", {
|
|
676
671
|
type: "button",
|
|
677
|
-
onClick: () =>
|
|
672
|
+
onClick: () => V({
|
|
678
673
|
searchQuery: "",
|
|
679
674
|
status: "",
|
|
680
675
|
verificationStatus: "",
|
|
@@ -688,141 +683,141 @@ function w() {
|
|
|
688
683
|
})
|
|
689
684
|
]
|
|
690
685
|
}),
|
|
691
|
-
|
|
686
|
+
P && M && /* @__PURE__ */ b("div", {
|
|
692
687
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
693
|
-
children: /* @__PURE__ */
|
|
688
|
+
children: /* @__PURE__ */ x("div", {
|
|
694
689
|
className: "w-full max-w-2xl rounded-lg border border-border-subtle bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
|
|
695
|
-
children: [/* @__PURE__ */
|
|
690
|
+
children: [/* @__PURE__ */ x("div", {
|
|
696
691
|
className: "flex items-center justify-between p-4 border-b border-border-subtle",
|
|
697
|
-
children: [/* @__PURE__ */
|
|
692
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
698
693
|
className: "text-lg font-semibold text-text-primary",
|
|
699
|
-
children:
|
|
700
|
-
}), /* @__PURE__ */
|
|
694
|
+
children: I === "view" ? "Cart Details" : I === "approve" ? "Approve Cart" : I === "reject" ? "Reject Cart" : "Suspend Cart"
|
|
695
|
+
}), /* @__PURE__ */ b("button", {
|
|
701
696
|
type: "button",
|
|
702
|
-
onClick: () =>
|
|
697
|
+
onClick: () => F(!1),
|
|
703
698
|
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
|
|
704
|
-
children: /* @__PURE__ */
|
|
699
|
+
children: /* @__PURE__ */ b(_, { className: "h-5 w-5" })
|
|
705
700
|
})]
|
|
706
|
-
}), /* @__PURE__ */
|
|
701
|
+
}), /* @__PURE__ */ x("div", {
|
|
707
702
|
className: "p-4 space-y-4",
|
|
708
703
|
children: [
|
|
709
|
-
/* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ x("div", {
|
|
710
705
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
711
706
|
children: [
|
|
712
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
713
708
|
className: "text-sm text-text-secondary",
|
|
714
709
|
children: "Cart Name"
|
|
715
|
-
}), /* @__PURE__ */
|
|
710
|
+
}), /* @__PURE__ */ b("p", {
|
|
716
711
|
className: "font-medium text-text-primary",
|
|
717
|
-
children:
|
|
712
|
+
children: M.name
|
|
718
713
|
})] }),
|
|
719
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
720
715
|
className: "text-sm text-text-secondary",
|
|
721
716
|
children: "Category"
|
|
722
|
-
}), /* @__PURE__ */
|
|
717
|
+
}), /* @__PURE__ */ b("p", {
|
|
723
718
|
className: "font-medium text-text-primary",
|
|
724
|
-
children:
|
|
719
|
+
children: M.category
|
|
725
720
|
})] }),
|
|
726
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
727
722
|
className: "text-sm text-text-secondary",
|
|
728
723
|
children: "Owner"
|
|
729
|
-
}), /* @__PURE__ */
|
|
724
|
+
}), /* @__PURE__ */ b("p", {
|
|
730
725
|
className: "font-medium text-text-primary",
|
|
731
|
-
children:
|
|
726
|
+
children: M.ownerName
|
|
732
727
|
})] }),
|
|
733
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
734
729
|
className: "text-sm text-text-secondary",
|
|
735
730
|
children: "Contact"
|
|
736
|
-
}), /* @__PURE__ */
|
|
731
|
+
}), /* @__PURE__ */ b("p", {
|
|
737
732
|
className: "font-medium text-text-primary",
|
|
738
|
-
children:
|
|
733
|
+
children: M.ownerPhone
|
|
739
734
|
})] })
|
|
740
735
|
]
|
|
741
736
|
}),
|
|
742
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
743
738
|
className: "text-sm text-text-secondary",
|
|
744
739
|
children: "Description"
|
|
745
|
-
}), /* @__PURE__ */
|
|
740
|
+
}), /* @__PURE__ */ b("p", {
|
|
746
741
|
className: "font-medium text-text-primary",
|
|
747
|
-
children:
|
|
742
|
+
children: M.description
|
|
748
743
|
})] }),
|
|
749
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
750
745
|
className: "text-sm text-text-secondary",
|
|
751
746
|
children: "Location"
|
|
752
|
-
}), /* @__PURE__ */
|
|
747
|
+
}), /* @__PURE__ */ b("p", {
|
|
753
748
|
className: "font-medium text-text-primary",
|
|
754
|
-
children:
|
|
749
|
+
children: M.address
|
|
755
750
|
})] }),
|
|
756
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ x("div", {
|
|
757
752
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
758
753
|
children: [
|
|
759
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
760
755
|
className: "text-sm text-text-secondary",
|
|
761
756
|
children: "Compliance Score"
|
|
762
|
-
}), /* @__PURE__ */
|
|
757
|
+
}), /* @__PURE__ */ x("p", {
|
|
763
758
|
className: "font-medium text-text-primary",
|
|
764
|
-
children: [
|
|
759
|
+
children: [M.complianceScore, "%"]
|
|
765
760
|
})] }),
|
|
766
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
767
762
|
className: "text-sm text-text-secondary",
|
|
768
763
|
children: "Documents"
|
|
769
|
-
}), /* @__PURE__ */
|
|
764
|
+
}), /* @__PURE__ */ x("p", {
|
|
770
765
|
className: "font-medium text-text-primary",
|
|
771
766
|
children: [
|
|
772
|
-
|
|
767
|
+
M.documentsSubmitted,
|
|
773
768
|
"/",
|
|
774
|
-
|
|
769
|
+
M.documentsRequired
|
|
775
770
|
]
|
|
776
771
|
})] }),
|
|
777
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
778
773
|
className: "text-sm text-text-secondary",
|
|
779
774
|
children: "Monthly Revenue"
|
|
780
|
-
}), /* @__PURE__ */
|
|
775
|
+
}), /* @__PURE__ */ b("p", {
|
|
781
776
|
className: "font-medium text-text-primary",
|
|
782
|
-
children:
|
|
777
|
+
children: o(M.monthlyRevenue, { minimumFractionDigits: 0 })
|
|
783
778
|
})] })
|
|
784
779
|
]
|
|
785
780
|
}),
|
|
786
|
-
|
|
781
|
+
M.rejectionReason && /* @__PURE__ */ x("div", {
|
|
787
782
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle p-4",
|
|
788
|
-
children: [/* @__PURE__ */
|
|
783
|
+
children: [/* @__PURE__ */ b("p", {
|
|
789
784
|
className: "text-sm font-medium text-status-error-text",
|
|
790
785
|
children: "Previous Rejection Reason:"
|
|
791
|
-
}), /* @__PURE__ */
|
|
786
|
+
}), /* @__PURE__ */ b("p", {
|
|
792
787
|
className: "text-sm text-status-error-text/80",
|
|
793
|
-
children:
|
|
788
|
+
children: M.rejectionReason
|
|
794
789
|
})]
|
|
795
790
|
}),
|
|
796
|
-
|
|
791
|
+
I === "reject" && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
797
792
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
798
793
|
children: "Rejection Reason *"
|
|
799
|
-
}), /* @__PURE__ */
|
|
794
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
800
795
|
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]",
|
|
801
796
|
rows: 4,
|
|
802
|
-
value:
|
|
803
|
-
onChange: (e) =>
|
|
797
|
+
value: R,
|
|
798
|
+
onChange: (e) => z(e.target.value),
|
|
804
799
|
placeholder: "Please provide a detailed reason for rejection..."
|
|
805
800
|
})] }),
|
|
806
|
-
|
|
801
|
+
I === "approve" && /* @__PURE__ */ b("div", {
|
|
807
802
|
className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
|
|
808
|
-
children: /* @__PURE__ */
|
|
803
|
+
children: /* @__PURE__ */ b("p", {
|
|
809
804
|
className: "text-sm text-status-success-text",
|
|
810
|
-
children: "This
|
|
805
|
+
children: "This marks the cart as verified and active on the platform, so customers can start ordering from it."
|
|
811
806
|
})
|
|
812
807
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ x("div", {
|
|
814
809
|
className: "flex gap-3 pt-2",
|
|
815
|
-
children: [/* @__PURE__ */
|
|
810
|
+
children: [/* @__PURE__ */ b("button", {
|
|
816
811
|
type: "button",
|
|
817
|
-
onClick: () =>
|
|
812
|
+
onClick: () => F(!1),
|
|
818
813
|
className: "flex-1 rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
819
814
|
children: "Cancel"
|
|
820
|
-
}),
|
|
815
|
+
}), I !== "view" && /* @__PURE__ */ b("button", {
|
|
821
816
|
type: "button",
|
|
822
|
-
onClick:
|
|
823
|
-
disabled:
|
|
817
|
+
onClick: q,
|
|
818
|
+
disabled: O.isPending || I === "reject" && !R.trim(),
|
|
824
819
|
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",
|
|
825
|
-
children:
|
|
820
|
+
children: O.isPending ? "Working..." : I === "approve" ? "Approve Cart" : I === "reject" ? "Reject Cart" : "Suspend Cart"
|
|
826
821
|
})]
|
|
827
822
|
})
|
|
828
823
|
]
|
|
@@ -833,6 +828,6 @@ function w() {
|
|
|
833
828
|
});
|
|
834
829
|
}
|
|
835
830
|
//#endregion
|
|
836
|
-
export {
|
|
831
|
+
export { T as CartManagementPage };
|
|
837
832
|
|
|
838
833
|
//# sourceMappingURL=CartManagementPage.js.map
|