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