@burdenoff/microfe-kadaikodi 2026.704.1 → 2026.704.3
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/hooks/useKadaikodiApi.js +77 -26
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +297 -479
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminDashboard.js +114 -400
- package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +166 -292
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +5 -5
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +323 -422
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -383
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +1 -1
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +232 -343
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js +127 -294
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +204 -290
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +399 -487
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +13 -13
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js +192 -296
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +245 -397
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +85 -117
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +177 -395
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,166 +2,74 @@ 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 { MetricsCard as r } from "../../components/MetricsCard.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { useAdminAnalytics as i, useDashboardStats as a, useOrders as o, useProviders as s } from "../../hooks/useKadaikodiApi.js";
|
|
6
|
+
import { formatCurrency as c } from "../../utils/formatters.js";
|
|
7
|
+
import { useMemo as l, useState as u } from "react";
|
|
8
|
+
import { Award as d, BarChart3 as f, IndianRupee as p, Loader2 as m, ShoppingBag as h, Star as g, Store as _, TrendingUp as v, Users as y, Zap as b } from "lucide-react";
|
|
9
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
10
|
+
import { EmphasisPanel as C, NextSteps as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
|
|
10
11
|
//#region src/kadaikodi/pages/admin/AdminAnalyticsPage.tsx
|
|
11
|
-
function
|
|
12
|
-
let {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
users: {
|
|
33
|
-
total: 12450,
|
|
34
|
-
growth: 12.3,
|
|
35
|
-
active: 9870,
|
|
36
|
-
newThisMonth: 456,
|
|
37
|
-
customers: 9850,
|
|
38
|
-
cartOwners: 1240,
|
|
39
|
-
workers: 890,
|
|
40
|
-
investors: 470
|
|
41
|
-
},
|
|
42
|
-
carts: {
|
|
43
|
-
total: 1240,
|
|
44
|
-
active: 1156,
|
|
45
|
-
pending: 84,
|
|
46
|
-
topPerforming: [
|
|
47
|
-
{
|
|
48
|
-
id: "c1",
|
|
49
|
-
name: "South Indian Express",
|
|
50
|
-
revenue: 285e3,
|
|
51
|
-
orders: 1250,
|
|
52
|
-
rating: 4.8
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: "c2",
|
|
56
|
-
name: "Mumbai Street Chaat",
|
|
57
|
-
revenue: 245e3,
|
|
58
|
-
orders: 980,
|
|
59
|
-
rating: 4.7
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "c3",
|
|
63
|
-
name: "Delhi Paratha Corner",
|
|
64
|
-
revenue: 198e3,
|
|
65
|
-
orders: 876,
|
|
66
|
-
rating: 4.6
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
id: "c4",
|
|
70
|
-
name: "Bangalore Dosa House",
|
|
71
|
-
revenue: 176e3,
|
|
72
|
-
orders: 743,
|
|
73
|
-
rating: 4.9
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
id: "c5",
|
|
77
|
-
name: "Kolkata Fish Fry",
|
|
78
|
-
revenue: 154e3,
|
|
79
|
-
orders: 632,
|
|
80
|
-
rating: 4.5
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
performance: {
|
|
85
|
-
averageDeliveryTime: 28,
|
|
86
|
-
customerSatisfaction: 4.6,
|
|
87
|
-
platformFee: 8.5,
|
|
88
|
-
operatingCosts: 21e5,
|
|
89
|
-
netProfit: 85e4
|
|
90
|
-
},
|
|
91
|
-
geography: { topCities: [
|
|
92
|
-
{
|
|
93
|
-
city: "Bangalore",
|
|
94
|
-
orders: 15670,
|
|
95
|
-
revenue: 425e4
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
city: "Mumbai",
|
|
99
|
-
orders: 12340,
|
|
100
|
-
revenue: 389e4
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
city: "Delhi",
|
|
104
|
-
orders: 9870,
|
|
105
|
-
revenue: 298e4
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
city: "Hyderabad",
|
|
109
|
-
orders: 7650,
|
|
110
|
-
revenue: 214e4
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
city: "Chennai",
|
|
114
|
-
orders: 6540,
|
|
115
|
-
revenue: 189e4
|
|
116
|
-
}
|
|
117
|
-
] }
|
|
118
|
-
}), E(!1);
|
|
119
|
-
}, 800);
|
|
120
|
-
return () => clearTimeout(e);
|
|
121
|
-
}, [D]);
|
|
122
|
-
let j = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : i(e, { minimumFractionDigits: 0 }), M = (e) => e === 0 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-status-warning-text" }) : e === 1 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-text-secondary" }) : e === 2 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ g(c, { className: "h-5 w-5 text-text-secondary" });
|
|
123
|
-
if (T || !C) return /* @__PURE__ */ g(n, {
|
|
12
|
+
function E() {
|
|
13
|
+
let { navigateTo: E } = e(), { data: D, isLoading: O } = a(), { data: k, isLoading: A } = i(), { data: j = [], isLoading: M } = s(), { data: N = [], isLoading: P } = o({}), [F, I] = u("overview"), L = O || A || M || P, R = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : c(e, { minimumFractionDigits: 0 }), z = l(() => {
|
|
14
|
+
let e = N.length, t = N.filter((e) => e.status === "delivered").length, n = N.filter((e) => e.status === "cancelled").length, r = N.filter((e) => e.status === "pending" || e.status === "confirmed").length, i = /* @__PURE__ */ new Date();
|
|
15
|
+
return i.setHours(0, 0, 0, 0), {
|
|
16
|
+
total: e,
|
|
17
|
+
completed: t,
|
|
18
|
+
cancelled: n,
|
|
19
|
+
pending: r,
|
|
20
|
+
ordersToday: N.filter((e) => new Date(e.orderDate).getTime() >= i.getTime()).length,
|
|
21
|
+
avgOrderValue: D && D.totalOrders > 0 ? D.totalRevenue / D.totalOrders : 0
|
|
22
|
+
};
|
|
23
|
+
}, [N, D]), B = l(() => j.filter((e) => !e.isOpen).length, [j]), V = k?.topProviders ?? [], H = k?.customerGrowth?.customers ?? 0, U = l(() => {
|
|
24
|
+
let e = Object.entries(k?.categoryDistribution ?? {}), t = e.reduce((e, [, t]) => e + t, 0);
|
|
25
|
+
return e.map(([e, n]) => ({
|
|
26
|
+
category: e,
|
|
27
|
+
count: n,
|
|
28
|
+
percentage: t > 0 ? n / t * 100 : 0
|
|
29
|
+
})).sort((e, t) => t.count - e.count);
|
|
30
|
+
}, [k]), W = (e) => e.replace(/_/g, " ").toLowerCase(), G = (e, t) => t > 0 ? e / t * 100 : 0, K = (e) => e < 3 ? /* @__PURE__ */ x(d, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ x(f, { className: "h-5 w-5 text-text-secondary" });
|
|
31
|
+
if (L || !D) return /* @__PURE__ */ x(n, {
|
|
124
32
|
title: "Platform Analytics",
|
|
125
33
|
description: "Loading analytics...",
|
|
126
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ S("div", {
|
|
127
35
|
className: "flex flex-col items-center justify-center py-20",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ x(m, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ x("p", {
|
|
129
37
|
className: "text-text-secondary",
|
|
130
38
|
children: "Loading analytics..."
|
|
131
39
|
})]
|
|
132
40
|
})
|
|
133
41
|
});
|
|
134
|
-
let
|
|
42
|
+
let q = [
|
|
135
43
|
{
|
|
136
44
|
key: "overview",
|
|
137
45
|
label: "Overview",
|
|
138
|
-
icon:
|
|
46
|
+
icon: f
|
|
139
47
|
},
|
|
140
48
|
{
|
|
141
49
|
key: "revenue",
|
|
142
50
|
label: "Revenue",
|
|
143
|
-
icon:
|
|
51
|
+
icon: p
|
|
144
52
|
},
|
|
145
53
|
{
|
|
146
54
|
key: "users",
|
|
147
55
|
label: "Users",
|
|
148
|
-
icon:
|
|
56
|
+
icon: y
|
|
149
57
|
},
|
|
150
58
|
{
|
|
151
59
|
key: "performance",
|
|
152
60
|
label: "Performance",
|
|
153
|
-
icon:
|
|
61
|
+
icon: b
|
|
154
62
|
}
|
|
155
63
|
];
|
|
156
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ S(n, {
|
|
157
65
|
title: "Platform Analytics",
|
|
158
66
|
description: "Comprehensive platform metrics and trends",
|
|
159
67
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ x(T, {
|
|
161
69
|
className: "mb-6",
|
|
162
|
-
children: "Your bird's-eye view of how Kadaikodi is performing.
|
|
70
|
+
children: "Your bird's-eye view of how Kadaikodi is performing. Spot revenue and order trends, see which carts and categories drive the most business, and understand where customers are growing — so you can decide where to invest and which carts to promote. Switch tabs to drill into revenue, users, and operational performance."
|
|
163
71
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ x(w, {
|
|
165
73
|
storageKey: "kadaikodi-admin-analytics",
|
|
166
74
|
className: "mb-6",
|
|
167
75
|
steps: [
|
|
@@ -169,505 +77,415 @@ function x() {
|
|
|
169
77
|
id: "review-carts",
|
|
170
78
|
label: "Review top-performing carts",
|
|
171
79
|
description: "See which carts drive the most revenue and orders.",
|
|
172
|
-
onClick: () =>
|
|
80
|
+
onClick: () => I("overview")
|
|
173
81
|
},
|
|
174
82
|
{
|
|
175
83
|
id: "check-revenue",
|
|
176
|
-
label: "Break down revenue by
|
|
177
|
-
description: "Find your strongest
|
|
178
|
-
onClick: () =>
|
|
84
|
+
label: "Break down revenue by category",
|
|
85
|
+
description: "Find your strongest categories in the Revenue tab.",
|
|
86
|
+
onClick: () => I("revenue")
|
|
179
87
|
},
|
|
180
88
|
{
|
|
181
89
|
id: "manage-carts",
|
|
182
90
|
label: "Approve pending carts",
|
|
183
91
|
description: "Onboard the carts waiting for review.",
|
|
184
|
-
onClick: () =>
|
|
92
|
+
onClick: () => E("/admin/carts"),
|
|
93
|
+
done: B === 0
|
|
185
94
|
}
|
|
186
95
|
]
|
|
187
96
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
className: "flex
|
|
190
|
-
children:
|
|
191
|
-
value: D,
|
|
192
|
-
onChange: (e) => O(e.target.value),
|
|
193
|
-
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)] w-fit",
|
|
194
|
-
children: [
|
|
195
|
-
/* @__PURE__ */ g("option", {
|
|
196
|
-
value: "today",
|
|
197
|
-
children: "Today"
|
|
198
|
-
}),
|
|
199
|
-
/* @__PURE__ */ g("option", {
|
|
200
|
-
value: "week",
|
|
201
|
-
children: "This Week"
|
|
202
|
-
}),
|
|
203
|
-
/* @__PURE__ */ g("option", {
|
|
204
|
-
value: "month",
|
|
205
|
-
children: "This Month"
|
|
206
|
-
}),
|
|
207
|
-
/* @__PURE__ */ g("option", {
|
|
208
|
-
value: "quarter",
|
|
209
|
-
children: "This Quarter"
|
|
210
|
-
}),
|
|
211
|
-
/* @__PURE__ */ g("option", {
|
|
212
|
-
value: "year",
|
|
213
|
-
children: "This Year"
|
|
214
|
-
})
|
|
215
|
-
]
|
|
216
|
-
}), /* @__PURE__ */ _("span", {
|
|
97
|
+
/* @__PURE__ */ x("div", {
|
|
98
|
+
className: "flex justify-end mb-6",
|
|
99
|
+
children: /* @__PURE__ */ S("span", {
|
|
217
100
|
className: "text-sm text-text-secondary",
|
|
218
101
|
children: ["Last updated: ", (/* @__PURE__ */ new Date()).toLocaleString("en-IN")]
|
|
219
|
-
})
|
|
102
|
+
})
|
|
220
103
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ S(C, {
|
|
222
105
|
className: "mb-8",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ x("h2", {
|
|
224
107
|
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
225
108
|
children: "Key Metrics"
|
|
226
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ S("div", {
|
|
227
110
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
228
111
|
children: [
|
|
229
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ x(r, {
|
|
230
113
|
featured: !0,
|
|
231
|
-
icon: /* @__PURE__ */
|
|
232
|
-
value:
|
|
233
|
-
label: "Total Revenue"
|
|
234
|
-
trend: "up",
|
|
235
|
-
trendValue: `+${C.revenue.growth}%`
|
|
114
|
+
icon: /* @__PURE__ */ x(p, { className: "h-5 w-5" }),
|
|
115
|
+
value: R(D.totalRevenue),
|
|
116
|
+
label: "Total Revenue"
|
|
236
117
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
icon: /* @__PURE__ */
|
|
239
|
-
value:
|
|
240
|
-
label: "Total Orders"
|
|
241
|
-
trend: "up",
|
|
242
|
-
trendValue: `+${C.orders.growth}%`
|
|
118
|
+
/* @__PURE__ */ x(r, {
|
|
119
|
+
icon: /* @__PURE__ */ x(h, { className: "h-5 w-5" }),
|
|
120
|
+
value: (D.totalOrders ?? 0).toLocaleString("en-IN"),
|
|
121
|
+
label: "Total Orders"
|
|
243
122
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
icon: /* @__PURE__ */
|
|
246
|
-
value:
|
|
247
|
-
label: "Active
|
|
248
|
-
trend: "up",
|
|
249
|
-
trendValue: `+${C.users.growth}%`
|
|
123
|
+
/* @__PURE__ */ x(r, {
|
|
124
|
+
icon: /* @__PURE__ */ x(y, { className: "h-5 w-5" }),
|
|
125
|
+
value: (D.activeCustomers ?? 0).toLocaleString("en-IN"),
|
|
126
|
+
label: "Active Customers"
|
|
250
127
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
icon: /* @__PURE__ */
|
|
253
|
-
value:
|
|
128
|
+
/* @__PURE__ */ x(r, {
|
|
129
|
+
icon: /* @__PURE__ */ x(_, { className: "h-5 w-5" }),
|
|
130
|
+
value: (D.activeProviders ?? 0).toLocaleString("en-IN"),
|
|
254
131
|
label: "Active Carts",
|
|
255
|
-
trendValue: `${
|
|
132
|
+
trendValue: `${B} pending`
|
|
256
133
|
})
|
|
257
134
|
]
|
|
258
135
|
})]
|
|
259
136
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ S("div", {
|
|
261
138
|
className: "rounded-lg border border-border-subtle bg-bg-surface mb-8",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ x("div", {
|
|
263
140
|
className: "border-b border-border-subtle",
|
|
264
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ x("nav", {
|
|
265
142
|
className: "flex -mb-px overflow-x-auto",
|
|
266
|
-
children:
|
|
143
|
+
children: q.map((e) => {
|
|
267
144
|
let n = e.icon;
|
|
268
|
-
return /* @__PURE__ */
|
|
145
|
+
return /* @__PURE__ */ S("button", {
|
|
269
146
|
type: "button",
|
|
270
|
-
onClick: () =>
|
|
271
|
-
className: t("flex items-center gap-2 py-3 px-4 sm:px-6 text-sm font-medium whitespace-nowrap border-b-2 transition-colors",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
147
|
+
onClick: () => I(e.key),
|
|
148
|
+
className: t("flex items-center gap-2 py-3 px-4 sm:px-6 text-sm font-medium whitespace-nowrap border-b-2 transition-colors", F === e.key ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
149
|
+
children: [/* @__PURE__ */ x(n, { className: "h-4 w-4" }), /* @__PURE__ */ x("span", {
|
|
273
150
|
className: "hidden sm:inline",
|
|
274
151
|
children: e.label
|
|
275
152
|
})]
|
|
276
153
|
}, e.key);
|
|
277
154
|
})
|
|
278
155
|
})
|
|
279
|
-
}), /* @__PURE__ */
|
|
156
|
+
}), /* @__PURE__ */ S("div", {
|
|
280
157
|
className: "p-4 sm:p-6",
|
|
281
158
|
children: [
|
|
282
|
-
|
|
159
|
+
F === "overview" && /* @__PURE__ */ S("div", {
|
|
283
160
|
className: "space-y-8",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
|
|
285
162
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
286
163
|
children: "Order Status Distribution"
|
|
287
|
-
}), /* @__PURE__ */
|
|
164
|
+
}), z.total > 0 ? /* @__PURE__ */ S("div", {
|
|
288
165
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
289
166
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ S("div", {
|
|
291
168
|
className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
|
|
292
169
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ x("p", {
|
|
294
171
|
className: "text-sm text-status-success-text",
|
|
295
172
|
children: "Completed Orders"
|
|
296
173
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ x("p", {
|
|
298
175
|
className: "text-2xl font-bold text-status-success-text",
|
|
299
|
-
children:
|
|
176
|
+
children: z.completed.toLocaleString("en-IN")
|
|
300
177
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ S("p", {
|
|
302
179
|
className: "text-sm text-status-success-text/80",
|
|
303
|
-
children: [(
|
|
180
|
+
children: [G(z.completed, z.total).toFixed(1), "% of total"]
|
|
304
181
|
})
|
|
305
182
|
]
|
|
306
183
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ S("div", {
|
|
308
185
|
className: "rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4",
|
|
309
186
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ x("p", {
|
|
311
188
|
className: "text-sm text-status-warning-text",
|
|
312
189
|
children: "Pending Orders"
|
|
313
190
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ x("p", {
|
|
315
192
|
className: "text-2xl font-bold text-status-warning-text",
|
|
316
|
-
children:
|
|
193
|
+
children: z.pending.toLocaleString("en-IN")
|
|
317
194
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ S("p", {
|
|
319
196
|
className: "text-sm text-status-warning-text/80",
|
|
320
|
-
children: [(
|
|
197
|
+
children: [G(z.pending, z.total).toFixed(1), "% of total"]
|
|
321
198
|
})
|
|
322
199
|
]
|
|
323
200
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ S("div", {
|
|
325
202
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle p-4",
|
|
326
203
|
children: [
|
|
327
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ x("p", {
|
|
328
205
|
className: "text-sm text-status-error-text",
|
|
329
206
|
children: "Cancelled Orders"
|
|
330
207
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ x("p", {
|
|
332
209
|
className: "text-2xl font-bold text-status-error-text",
|
|
333
|
-
children:
|
|
210
|
+
children: z.cancelled.toLocaleString("en-IN")
|
|
334
211
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ S("p", {
|
|
336
213
|
className: "text-sm text-status-error-text/80",
|
|
337
|
-
children: [(
|
|
214
|
+
children: [G(z.cancelled, z.total).toFixed(1), "% of total"]
|
|
338
215
|
})
|
|
339
216
|
]
|
|
340
217
|
})
|
|
341
218
|
]
|
|
342
|
-
})
|
|
219
|
+
}) : /* @__PURE__ */ x("p", {
|
|
220
|
+
className: "text-sm text-text-secondary",
|
|
221
|
+
children: "Order breakdowns will appear here once orders are placed."
|
|
222
|
+
})] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
|
|
343
223
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
344
224
|
children: "Top Performing Carts"
|
|
345
|
-
}), /* @__PURE__ */
|
|
225
|
+
}), V.length > 0 ? /* @__PURE__ */ x("div", {
|
|
346
226
|
className: "rounded-lg border border-border-subtle overflow-hidden",
|
|
347
|
-
children: /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ S("table", {
|
|
348
228
|
className: "w-full",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
|
|
350
230
|
className: "border-b border-border-subtle bg-bg-sunken/50",
|
|
351
231
|
children: [
|
|
352
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ x("th", {
|
|
353
233
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase",
|
|
354
234
|
children: "Cart Name"
|
|
355
235
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
className: "px-4 py-3 text-
|
|
358
|
-
children: "
|
|
359
|
-
}),
|
|
360
|
-
/* @__PURE__ */ g("th", {
|
|
361
|
-
className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
|
|
362
|
-
children: "Orders"
|
|
236
|
+
/* @__PURE__ */ x("th", {
|
|
237
|
+
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase",
|
|
238
|
+
children: "Category"
|
|
363
239
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ x("th", {
|
|
365
241
|
className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
|
|
366
242
|
children: "Rating"
|
|
367
243
|
})
|
|
368
244
|
]
|
|
369
|
-
}) }), /* @__PURE__ */
|
|
245
|
+
}) }), /* @__PURE__ */ x("tbody", {
|
|
370
246
|
className: "divide-y divide-border",
|
|
371
|
-
children:
|
|
247
|
+
children: V.map((e, t) => /* @__PURE__ */ S("tr", {
|
|
372
248
|
className: "hover:bg-accent/50 transition-colors",
|
|
373
249
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ x("td", {
|
|
375
251
|
className: "px-4 py-3",
|
|
376
|
-
children: /* @__PURE__ */
|
|
252
|
+
children: /* @__PURE__ */ S("div", {
|
|
377
253
|
className: "flex items-center gap-2",
|
|
378
|
-
children: [
|
|
254
|
+
children: [K(t), /* @__PURE__ */ x("span", {
|
|
379
255
|
className: "text-sm font-medium text-text-primary",
|
|
380
256
|
children: e.name
|
|
381
257
|
})]
|
|
382
258
|
})
|
|
383
259
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
className: "px-4 py-3 text-sm text-
|
|
386
|
-
children:
|
|
387
|
-
}),
|
|
388
|
-
/* @__PURE__ */ g("td", {
|
|
389
|
-
className: "px-4 py-3 text-sm text-right text-text-primary",
|
|
390
|
-
children: e.orders.toLocaleString("en-IN")
|
|
260
|
+
/* @__PURE__ */ x("td", {
|
|
261
|
+
className: "px-4 py-3 text-sm text-left text-text-secondary capitalize",
|
|
262
|
+
children: W(e.category)
|
|
391
263
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ x("td", {
|
|
393
265
|
className: "px-4 py-3 text-sm text-right text-text-primary",
|
|
394
|
-
children: /* @__PURE__ */
|
|
266
|
+
children: /* @__PURE__ */ S("span", {
|
|
395
267
|
className: "flex items-center justify-end gap-1",
|
|
396
|
-
children: [/* @__PURE__ */ g
|
|
268
|
+
children: [/* @__PURE__ */ x(g, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
|
|
397
269
|
})
|
|
398
270
|
})
|
|
399
271
|
]
|
|
400
272
|
}, e.id))
|
|
401
273
|
})]
|
|
402
274
|
})
|
|
275
|
+
}) : /* @__PURE__ */ x("p", {
|
|
276
|
+
className: "text-sm text-text-secondary",
|
|
277
|
+
children: "Top-performing carts will be ranked here once orders start flowing."
|
|
403
278
|
})] })]
|
|
404
279
|
}),
|
|
405
|
-
|
|
280
|
+
F === "revenue" && /* @__PURE__ */ S("div", {
|
|
406
281
|
className: "space-y-8",
|
|
407
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ S("div", {
|
|
408
283
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
409
284
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ S("div", {
|
|
411
286
|
className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-6",
|
|
412
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ x("h4", {
|
|
413
288
|
className: "text-sm font-medium text-text-primary mb-2",
|
|
414
|
-
children: "
|
|
415
|
-
}), /* @__PURE__ */
|
|
289
|
+
children: "Total Revenue"
|
|
290
|
+
}), /* @__PURE__ */ x("p", {
|
|
416
291
|
className: "text-2xl font-bold text-text-primary",
|
|
417
|
-
children:
|
|
292
|
+
children: R(D.totalRevenue)
|
|
418
293
|
})]
|
|
419
294
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ S("div", {
|
|
421
296
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ x("h4", {
|
|
423
298
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
424
|
-
children: "
|
|
425
|
-
}), /* @__PURE__ */
|
|
299
|
+
children: "Total Orders"
|
|
300
|
+
}), /* @__PURE__ */ x("p", {
|
|
426
301
|
className: "text-2xl font-bold text-text-primary",
|
|
427
|
-
children:
|
|
302
|
+
children: (D.totalOrders ?? 0).toLocaleString("en-IN")
|
|
428
303
|
})]
|
|
429
304
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ S("div", {
|
|
431
306
|
className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-6",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ x("h4", {
|
|
433
308
|
className: "text-sm font-medium text-status-success-text mb-2",
|
|
434
309
|
children: "Average Order Value"
|
|
435
|
-
}), /* @__PURE__ */
|
|
310
|
+
}), /* @__PURE__ */ x("p", {
|
|
436
311
|
className: "text-2xl font-bold text-status-success-text",
|
|
437
|
-
children:
|
|
312
|
+
children: R(z.avgOrderValue)
|
|
438
313
|
})]
|
|
439
314
|
})
|
|
440
315
|
]
|
|
441
|
-
}), /* @__PURE__ */
|
|
442
|
-
className: "text-
|
|
443
|
-
children: "Revenue by
|
|
444
|
-
})
|
|
445
|
-
className: "space-y-3",
|
|
446
|
-
children: C.geography.topCities.map((e, t) => /* @__PURE__ */ _("div", {
|
|
447
|
-
className: "flex items-center justify-between p-4 rounded-lg border border-border-subtle bg-bg-sunken/30",
|
|
448
|
-
children: [/* @__PURE__ */ _("div", {
|
|
449
|
-
className: "flex items-center gap-3",
|
|
450
|
-
children: [M(t), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
451
|
-
className: "font-medium text-text-primary",
|
|
452
|
-
children: e.city
|
|
453
|
-
}), /* @__PURE__ */ _("p", {
|
|
454
|
-
className: "text-sm text-text-secondary",
|
|
455
|
-
children: [e.orders.toLocaleString("en-IN"), " orders"]
|
|
456
|
-
})] })]
|
|
457
|
-
}), /* @__PURE__ */ _("div", {
|
|
458
|
-
className: "text-right",
|
|
459
|
-
children: [/* @__PURE__ */ g("p", {
|
|
460
|
-
className: "font-bold text-text-primary",
|
|
461
|
-
children: j(e.revenue)
|
|
462
|
-
}), /* @__PURE__ */ _("p", {
|
|
463
|
-
className: "text-sm text-text-secondary",
|
|
464
|
-
children: [(e.revenue / C.revenue.total * 100).toFixed(1), "%"]
|
|
465
|
-
})]
|
|
466
|
-
})]
|
|
467
|
-
}, e.city))
|
|
468
|
-
})] })]
|
|
316
|
+
}), /* @__PURE__ */ x("p", {
|
|
317
|
+
className: "text-sm text-text-secondary",
|
|
318
|
+
children: "Revenue is not broken down by category by the platform backend. See the Users tab for how carts are distributed across categories."
|
|
319
|
+
})]
|
|
469
320
|
}),
|
|
470
|
-
|
|
321
|
+
F === "users" && /* @__PURE__ */ S("div", {
|
|
471
322
|
className: "space-y-8",
|
|
472
|
-
children: [
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
{
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
323
|
+
children: [
|
|
324
|
+
/* @__PURE__ */ S("div", {
|
|
325
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
326
|
+
children: [/* @__PURE__ */ S("div", {
|
|
327
|
+
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
|
|
328
|
+
children: [/* @__PURE__ */ S("div", {
|
|
329
|
+
className: "flex items-center gap-2 mb-2",
|
|
330
|
+
children: [/* @__PURE__ */ x(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ x("h4", {
|
|
331
|
+
className: "text-sm font-medium text-text-secondary",
|
|
332
|
+
children: "Active Customers"
|
|
333
|
+
})]
|
|
334
|
+
}), /* @__PURE__ */ x("p", {
|
|
335
|
+
className: "text-3xl font-bold text-text-primary",
|
|
336
|
+
children: (D.activeCustomers ?? 0).toLocaleString("en-IN")
|
|
337
|
+
})]
|
|
338
|
+
}), /* @__PURE__ */ S("div", {
|
|
339
|
+
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
|
|
340
|
+
children: [/* @__PURE__ */ S("div", {
|
|
341
|
+
className: "flex items-center gap-2 mb-2",
|
|
342
|
+
children: [/* @__PURE__ */ x(_, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ x("h4", {
|
|
343
|
+
className: "text-sm font-medium text-text-secondary",
|
|
344
|
+
children: "Active Cart Owners"
|
|
345
|
+
})]
|
|
346
|
+
}), /* @__PURE__ */ x("p", {
|
|
347
|
+
className: "text-3xl font-bold text-text-primary",
|
|
348
|
+
children: (D.activeProviders ?? 0).toLocaleString("en-IN")
|
|
349
|
+
})]
|
|
350
|
+
})]
|
|
351
|
+
}),
|
|
352
|
+
/* @__PURE__ */ S("div", {
|
|
353
|
+
className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
|
|
497
354
|
children: [
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
className:
|
|
500
|
-
children:
|
|
355
|
+
/* @__PURE__ */ S("div", {
|
|
356
|
+
className: "flex items-center gap-2 mb-2",
|
|
357
|
+
children: [/* @__PURE__ */ x(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ x("h3", {
|
|
358
|
+
className: "text-sm font-medium text-text-secondary",
|
|
359
|
+
children: "Total Customers"
|
|
360
|
+
})]
|
|
501
361
|
}),
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
className:
|
|
504
|
-
children:
|
|
362
|
+
/* @__PURE__ */ x("p", {
|
|
363
|
+
className: "text-3xl font-bold text-text-primary",
|
|
364
|
+
children: H.toLocaleString("en-IN")
|
|
505
365
|
}),
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
className:
|
|
508
|
-
children:
|
|
366
|
+
/* @__PURE__ */ x("p", {
|
|
367
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
368
|
+
children: "Customers on the platform to date."
|
|
509
369
|
})
|
|
510
370
|
]
|
|
511
|
-
},
|
|
512
|
-
|
|
513
|
-
className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
|
|
514
|
-
children: [/* @__PURE__ */ g("h3", {
|
|
371
|
+
}),
|
|
372
|
+
U.length > 0 && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
|
|
515
373
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
516
|
-
children: "
|
|
517
|
-
}), /* @__PURE__ */
|
|
374
|
+
children: "Cart Category Distribution"
|
|
375
|
+
}), /* @__PURE__ */ x("div", {
|
|
376
|
+
className: "space-y-3",
|
|
377
|
+
children: U.map((e) => /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
|
|
378
|
+
className: "flex items-center justify-between mb-1",
|
|
379
|
+
children: [/* @__PURE__ */ x("span", {
|
|
380
|
+
className: "text-sm font-medium text-text-primary capitalize",
|
|
381
|
+
children: W(e.category)
|
|
382
|
+
}), /* @__PURE__ */ S("span", {
|
|
383
|
+
className: "text-sm text-text-secondary",
|
|
384
|
+
children: [
|
|
385
|
+
(e.count ?? 0).toLocaleString("en-IN"),
|
|
386
|
+
" (",
|
|
387
|
+
(e.percentage ?? 0).toFixed(1),
|
|
388
|
+
"%)"
|
|
389
|
+
]
|
|
390
|
+
})]
|
|
391
|
+
}), /* @__PURE__ */ x("div", {
|
|
392
|
+
className: "w-full bg-bg-sunken rounded-full h-2",
|
|
393
|
+
children: /* @__PURE__ */ x("div", {
|
|
394
|
+
className: "bg-action-primary-bg h-2 rounded-full transition-all duration-300",
|
|
395
|
+
style: { width: `${e.percentage}%` }
|
|
396
|
+
})
|
|
397
|
+
})] }, e.category))
|
|
398
|
+
})] })
|
|
399
|
+
]
|
|
400
|
+
}),
|
|
401
|
+
F === "performance" && /* @__PURE__ */ S("div", {
|
|
402
|
+
className: "space-y-8",
|
|
403
|
+
children: [/* @__PURE__ */ S("div", {
|
|
404
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
405
|
+
children: [
|
|
406
|
+
/* @__PURE__ */ S("div", {
|
|
407
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
408
|
+
children: [
|
|
409
|
+
/* @__PURE__ */ S("div", {
|
|
410
|
+
className: "flex items-center gap-2 mb-2",
|
|
411
|
+
children: [/* @__PURE__ */ x(g, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
|
|
412
|
+
className: "text-sm font-medium text-text-secondary",
|
|
413
|
+
children: "Customer Satisfaction"
|
|
414
|
+
})]
|
|
415
|
+
}),
|
|
416
|
+
/* @__PURE__ */ S("p", {
|
|
417
|
+
className: "text-3xl font-bold text-text-primary flex items-center gap-1",
|
|
418
|
+
children: [/* @__PURE__ */ x(g, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), D.avgRating > 0 ? D.avgRating.toFixed(1) : "—"]
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ x("p", {
|
|
421
|
+
className: "text-sm text-text-secondary mt-1",
|
|
422
|
+
children: "Average rating across carts"
|
|
423
|
+
})
|
|
424
|
+
]
|
|
425
|
+
}),
|
|
426
|
+
/* @__PURE__ */ S("div", {
|
|
427
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
428
|
+
children: [
|
|
429
|
+
/* @__PURE__ */ S("div", {
|
|
430
|
+
className: "flex items-center gap-2 mb-2",
|
|
431
|
+
children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
|
|
432
|
+
className: "text-sm font-medium text-text-secondary",
|
|
433
|
+
children: "Completion Rate"
|
|
434
|
+
})]
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ x("p", {
|
|
437
|
+
className: "text-3xl font-bold text-text-primary",
|
|
438
|
+
children: z.total > 0 ? `${G(z.completed, z.total).toFixed(1)}%` : "—"
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ x("p", {
|
|
441
|
+
className: "text-sm text-text-secondary mt-1",
|
|
442
|
+
children: "Orders delivered"
|
|
443
|
+
})
|
|
444
|
+
]
|
|
445
|
+
}),
|
|
446
|
+
/* @__PURE__ */ S("div", {
|
|
447
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
448
|
+
children: [
|
|
449
|
+
/* @__PURE__ */ S("div", {
|
|
450
|
+
className: "flex items-center gap-2 mb-2",
|
|
451
|
+
children: [/* @__PURE__ */ x(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
|
|
452
|
+
className: "text-sm font-medium text-text-secondary",
|
|
453
|
+
children: "Cancellation Rate"
|
|
454
|
+
})]
|
|
455
|
+
}),
|
|
456
|
+
/* @__PURE__ */ x("p", {
|
|
457
|
+
className: "text-3xl font-bold text-text-primary",
|
|
458
|
+
children: z.total > 0 ? `${G(z.cancelled, z.total).toFixed(1)}%` : "—"
|
|
459
|
+
}),
|
|
460
|
+
/* @__PURE__ */ x("p", {
|
|
461
|
+
className: "text-sm text-text-secondary mt-1",
|
|
462
|
+
children: "Orders cancelled"
|
|
463
|
+
})
|
|
464
|
+
]
|
|
465
|
+
})
|
|
466
|
+
]
|
|
467
|
+
}), /* @__PURE__ */ S("div", {
|
|
468
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
469
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
470
|
+
className: "text-lg font-semibold text-text-primary mb-4",
|
|
471
|
+
children: "Today's Activity"
|
|
472
|
+
}), /* @__PURE__ */ S("div", {
|
|
518
473
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
519
|
-
children: [/* @__PURE__ */
|
|
474
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
520
475
|
className: "text-sm text-text-secondary mb-2",
|
|
521
|
-
children: "
|
|
522
|
-
}), /* @__PURE__ */
|
|
476
|
+
children: "Orders Today"
|
|
477
|
+
}), /* @__PURE__ */ x("p", {
|
|
523
478
|
className: "text-3xl font-bold text-text-primary",
|
|
524
|
-
children:
|
|
525
|
-
})] }), /* @__PURE__ */
|
|
479
|
+
children: z.ordersToday.toLocaleString("en-IN")
|
|
480
|
+
})] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
526
481
|
className: "text-sm text-text-secondary mb-2",
|
|
527
|
-
children: "
|
|
528
|
-
}), /* @__PURE__ */
|
|
529
|
-
className: "text-3xl font-bold text-status-
|
|
530
|
-
children:
|
|
482
|
+
children: "Pending Orders"
|
|
483
|
+
}), /* @__PURE__ */ x("p", {
|
|
484
|
+
className: "text-3xl font-bold text-status-warning-text",
|
|
485
|
+
children: (D.pendingOrders ?? 0).toLocaleString("en-IN")
|
|
531
486
|
})] })]
|
|
532
487
|
})]
|
|
533
488
|
})]
|
|
534
|
-
}),
|
|
535
|
-
k === "performance" && /* @__PURE__ */ _("div", {
|
|
536
|
-
className: "space-y-8",
|
|
537
|
-
children: [
|
|
538
|
-
/* @__PURE__ */ _("div", {
|
|
539
|
-
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
540
|
-
children: [
|
|
541
|
-
/* @__PURE__ */ _("div", {
|
|
542
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
543
|
-
children: [
|
|
544
|
-
/* @__PURE__ */ _("div", {
|
|
545
|
-
className: "flex items-center gap-2 mb-2",
|
|
546
|
-
children: [/* @__PURE__ */ g(p, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
|
|
547
|
-
className: "text-sm font-medium text-text-secondary",
|
|
548
|
-
children: "Avg Delivery Time"
|
|
549
|
-
})]
|
|
550
|
-
}),
|
|
551
|
-
/* @__PURE__ */ _("p", {
|
|
552
|
-
className: "text-3xl font-bold text-text-primary",
|
|
553
|
-
children: [C.performance.averageDeliveryTime, " min"]
|
|
554
|
-
}),
|
|
555
|
-
/* @__PURE__ */ g("p", {
|
|
556
|
-
className: "text-sm text-text-secondary mt-1",
|
|
557
|
-
children: "Target: < 30 min"
|
|
558
|
-
})
|
|
559
|
-
]
|
|
560
|
-
}),
|
|
561
|
-
/* @__PURE__ */ _("div", {
|
|
562
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
563
|
-
children: [
|
|
564
|
-
/* @__PURE__ */ _("div", {
|
|
565
|
-
className: "flex items-center gap-2 mb-2",
|
|
566
|
-
children: [/* @__PURE__ */ g(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
|
|
567
|
-
className: "text-sm font-medium text-text-secondary",
|
|
568
|
-
children: "Customer Satisfaction"
|
|
569
|
-
})]
|
|
570
|
-
}),
|
|
571
|
-
/* @__PURE__ */ _("p", {
|
|
572
|
-
className: "text-3xl font-bold text-text-primary flex items-center gap-1",
|
|
573
|
-
children: [/* @__PURE__ */ g(f, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), C.performance.customerSatisfaction]
|
|
574
|
-
}),
|
|
575
|
-
/* @__PURE__ */ g("p", {
|
|
576
|
-
className: "text-sm text-text-secondary mt-1",
|
|
577
|
-
children: "Based on ratings"
|
|
578
|
-
})
|
|
579
|
-
]
|
|
580
|
-
}),
|
|
581
|
-
/* @__PURE__ */ _("div", {
|
|
582
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
583
|
-
children: [
|
|
584
|
-
/* @__PURE__ */ _("div", {
|
|
585
|
-
className: "flex items-center gap-2 mb-2",
|
|
586
|
-
children: [/* @__PURE__ */ g(l, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
|
|
587
|
-
className: "text-sm font-medium text-text-secondary",
|
|
588
|
-
children: "Platform Fee"
|
|
589
|
-
})]
|
|
590
|
-
}),
|
|
591
|
-
/* @__PURE__ */ _("p", {
|
|
592
|
-
className: "text-3xl font-bold text-text-primary",
|
|
593
|
-
children: [C.performance.platformFee, "%"]
|
|
594
|
-
}),
|
|
595
|
-
/* @__PURE__ */ g("p", {
|
|
596
|
-
className: "text-sm text-text-secondary mt-1",
|
|
597
|
-
children: "Per transaction"
|
|
598
|
-
})
|
|
599
|
-
]
|
|
600
|
-
})
|
|
601
|
-
]
|
|
602
|
-
}),
|
|
603
|
-
/* @__PURE__ */ _("div", {
|
|
604
|
-
className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
|
|
605
|
-
children: [
|
|
606
|
-
/* @__PURE__ */ g("h3", {
|
|
607
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
608
|
-
children: "Financial Performance"
|
|
609
|
-
}),
|
|
610
|
-
/* @__PURE__ */ _("div", {
|
|
611
|
-
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
612
|
-
children: [
|
|
613
|
-
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
614
|
-
className: "text-sm text-text-secondary mb-2",
|
|
615
|
-
children: "Operating Costs"
|
|
616
|
-
}), /* @__PURE__ */ g("p", {
|
|
617
|
-
className: "text-2xl font-bold text-status-error-text",
|
|
618
|
-
children: j(C.performance.operatingCosts)
|
|
619
|
-
})] }),
|
|
620
|
-
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
621
|
-
className: "text-sm text-text-secondary mb-2",
|
|
622
|
-
children: "Total Revenue"
|
|
623
|
-
}), /* @__PURE__ */ g("p", {
|
|
624
|
-
className: "text-2xl font-bold text-text-primary",
|
|
625
|
-
children: j(C.revenue.total)
|
|
626
|
-
})] }),
|
|
627
|
-
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
628
|
-
className: "text-sm text-text-secondary mb-2",
|
|
629
|
-
children: "Net Profit"
|
|
630
|
-
}), /* @__PURE__ */ g("p", {
|
|
631
|
-
className: "text-2xl font-bold text-status-success-text",
|
|
632
|
-
children: j(C.performance.netProfit)
|
|
633
|
-
})] })
|
|
634
|
-
]
|
|
635
|
-
}),
|
|
636
|
-
/* @__PURE__ */ _("div", {
|
|
637
|
-
className: "mt-4 rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
638
|
-
children: [/* @__PURE__ */ g("p", {
|
|
639
|
-
className: "text-sm text-text-secondary",
|
|
640
|
-
children: "Profit Margin"
|
|
641
|
-
}), /* @__PURE__ */ _("p", {
|
|
642
|
-
className: "text-xl font-bold text-text-primary",
|
|
643
|
-
children: [(C.performance.netProfit / C.revenue.total * 100).toFixed(1), "%"]
|
|
644
|
-
})]
|
|
645
|
-
})
|
|
646
|
-
]
|
|
647
|
-
}),
|
|
648
|
-
/* @__PURE__ */ _("div", {
|
|
649
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
|
|
650
|
-
children: [/* @__PURE__ */ g("h3", {
|
|
651
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
652
|
-
children: "Today's Performance"
|
|
653
|
-
}), /* @__PURE__ */ _("div", {
|
|
654
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
655
|
-
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
656
|
-
className: "text-sm text-text-secondary mb-2",
|
|
657
|
-
children: "Orders Today"
|
|
658
|
-
}), /* @__PURE__ */ g("p", {
|
|
659
|
-
className: "text-3xl font-bold text-text-primary",
|
|
660
|
-
children: C.orders.ordersToday
|
|
661
|
-
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
662
|
-
className: "text-sm text-text-secondary mb-2",
|
|
663
|
-
children: "Estimated Revenue"
|
|
664
|
-
}), /* @__PURE__ */ g("p", {
|
|
665
|
-
className: "text-3xl font-bold text-status-success-text",
|
|
666
|
-
children: j(C.orders.ordersToday * C.orders.averageOrderValue)
|
|
667
|
-
})] })]
|
|
668
|
-
})]
|
|
669
|
-
})
|
|
670
|
-
]
|
|
671
489
|
})
|
|
672
490
|
]
|
|
673
491
|
})]
|
|
@@ -676,6 +494,6 @@ function x() {
|
|
|
676
494
|
});
|
|
677
495
|
}
|
|
678
496
|
//#endregion
|
|
679
|
-
export {
|
|
497
|
+
export { E as AdminAnalyticsPage };
|
|
680
498
|
|
|
681
499
|
//# sourceMappingURL=AdminAnalyticsPage.js.map
|