@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,135 +1,134 @@
|
|
|
1
1
|
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
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { EmphasisPanel as Y, PagePurpose as X } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
import { StatusBadge as r } from "../components/StatusBadge.js";
|
|
5
|
+
import { EmptyState as i } from "../components/EmptyState.js";
|
|
6
|
+
import { useKadaikodiApi as a } from "../hooks/useKadaikodiApi.js";
|
|
7
|
+
import { formatCurrency as o, formatDistance as s, formatRelativeTime as ee } from "../utils/formatters.js";
|
|
8
|
+
import { useCallback as c, useMemo as l, useState as u } from "react";
|
|
9
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { AlertCircle as f, ArrowRight as p, BadgeCheck as m, BarChart3 as h, ChefHat as g, ChevronRight as _, ClipboardList as v, Clock as y, GraduationCap as b, HandCoins as x, Heart as S, Home as C, IndianRupee as w, LayoutDashboard as T, Loader2 as E, Lock as D, MapPin as O, Package as k, Scissors as A, Search as j, Settings as M, Shield as N, Shirt as P, ShoppingBag as F, ShoppingCart as I, Sparkles as L, Star as R, Store as z, TrendingUp as B, Truck as V, UserCheck as H, Users as U, Wrench as W } from "lucide-react";
|
|
11
|
+
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
12
|
+
import { PagePurpose as J } from "@burdenoff/fe-libs/ui";
|
|
14
13
|
//#region src/kadaikodi/pages/HomePage.tsx
|
|
15
|
-
var
|
|
14
|
+
var Y = {
|
|
16
15
|
customer: [
|
|
17
16
|
{
|
|
18
|
-
label: "Discover
|
|
17
|
+
label: "Discover",
|
|
19
18
|
description: "Browse carts near you",
|
|
20
|
-
icon: /* @__PURE__ */
|
|
21
|
-
path: "/customer/
|
|
19
|
+
icon: /* @__PURE__ */ K(j, { className: "h-5 w-5" }),
|
|
20
|
+
path: "/customer/discover",
|
|
22
21
|
color: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
23
22
|
},
|
|
24
23
|
{
|
|
25
24
|
label: "My Orders",
|
|
26
25
|
description: "Track your orders",
|
|
27
|
-
icon: /* @__PURE__ */
|
|
26
|
+
icon: /* @__PURE__ */ K(F, { className: "h-5 w-5" }),
|
|
28
27
|
path: "/customer/orders",
|
|
29
28
|
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
30
29
|
},
|
|
31
30
|
{
|
|
32
31
|
label: "Favorites",
|
|
33
32
|
description: "Your saved carts",
|
|
34
|
-
icon: /* @__PURE__ */
|
|
33
|
+
icon: /* @__PURE__ */ K(S, { className: "h-5 w-5" }),
|
|
35
34
|
path: "/customer/favorites",
|
|
36
35
|
color: "bg-accent-purple-subtle text-text-primary"
|
|
37
36
|
},
|
|
38
37
|
{
|
|
39
38
|
label: "Settings",
|
|
40
39
|
description: "Manage preferences",
|
|
41
|
-
icon: /* @__PURE__ */
|
|
40
|
+
icon: /* @__PURE__ */ K(M, { className: "h-5 w-5" }),
|
|
42
41
|
path: "/settings",
|
|
43
42
|
color: "bg-bg-sunken text-text-secondary"
|
|
44
43
|
}
|
|
45
44
|
],
|
|
46
45
|
cart_owner: [
|
|
47
46
|
{
|
|
48
|
-
label: "
|
|
49
|
-
description: "
|
|
50
|
-
icon: /* @__PURE__ */
|
|
51
|
-
path: "/owner/dashboard",
|
|
52
|
-
color: "bg-accent-
|
|
47
|
+
label: "Dashboard",
|
|
48
|
+
description: "Run your cart",
|
|
49
|
+
icon: /* @__PURE__ */ K(z, { className: "h-5 w-5" }),
|
|
50
|
+
path: "/cart-owner/dashboard",
|
|
51
|
+
color: "bg-accent-primary/10 text-accent-primary"
|
|
53
52
|
},
|
|
54
53
|
{
|
|
55
54
|
label: "Orders",
|
|
56
55
|
description: "Incoming orders",
|
|
57
|
-
icon: /* @__PURE__ */
|
|
58
|
-
path: "/owner/orders",
|
|
56
|
+
icon: /* @__PURE__ */ K(F, { className: "h-5 w-5" }),
|
|
57
|
+
path: "/cart-owner/orders",
|
|
59
58
|
color: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
60
59
|
},
|
|
61
60
|
{
|
|
62
61
|
label: "Analytics",
|
|
63
62
|
description: "Revenue & insights",
|
|
64
|
-
icon: /* @__PURE__ */
|
|
65
|
-
path: "/owner/analytics",
|
|
63
|
+
icon: /* @__PURE__ */ K(h, { className: "h-5 w-5" }),
|
|
64
|
+
path: "/cart-owner/analytics",
|
|
66
65
|
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
67
66
|
},
|
|
68
67
|
{
|
|
69
68
|
label: "Staff",
|
|
70
69
|
description: "Manage workers",
|
|
71
|
-
icon: /* @__PURE__ */
|
|
72
|
-
path: "/owner/staff",
|
|
70
|
+
icon: /* @__PURE__ */ K(U, { className: "h-5 w-5" }),
|
|
71
|
+
path: "/cart-owner/staff",
|
|
73
72
|
color: "bg-status-warning-bg-subtle text-status-warning-text"
|
|
74
73
|
}
|
|
75
74
|
],
|
|
76
75
|
worker: [
|
|
77
76
|
{
|
|
78
77
|
label: "My Tasks",
|
|
79
|
-
description: "
|
|
80
|
-
icon: /* @__PURE__ */
|
|
78
|
+
description: "Assigned work",
|
|
79
|
+
icon: /* @__PURE__ */ K(v, { className: "h-5 w-5" }),
|
|
81
80
|
path: "/worker/dashboard",
|
|
82
81
|
color: "bg-status-warning-bg-subtle text-status-warning-text"
|
|
83
82
|
},
|
|
84
83
|
{
|
|
85
84
|
label: "Schedule",
|
|
86
85
|
description: "View shifts",
|
|
87
|
-
icon: /* @__PURE__ */
|
|
86
|
+
icon: /* @__PURE__ */ K(y, { className: "h-5 w-5" }),
|
|
88
87
|
path: "/worker/schedule",
|
|
89
88
|
color: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
90
89
|
},
|
|
91
90
|
{
|
|
92
|
-
label: "
|
|
93
|
-
description: "
|
|
94
|
-
icon: /* @__PURE__ */
|
|
95
|
-
path: "/worker/
|
|
91
|
+
label: "Deliveries",
|
|
92
|
+
description: "Active runs",
|
|
93
|
+
icon: /* @__PURE__ */ K(k, { className: "h-5 w-5" }),
|
|
94
|
+
path: "/worker/orders",
|
|
96
95
|
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
97
96
|
},
|
|
98
97
|
{
|
|
99
|
-
label: "
|
|
100
|
-
description: "
|
|
101
|
-
icon: /* @__PURE__ */
|
|
102
|
-
path: "/worker/
|
|
103
|
-
color: "bg-
|
|
98
|
+
label: "Profile",
|
|
99
|
+
description: "Your details",
|
|
100
|
+
icon: /* @__PURE__ */ K(H, { className: "h-5 w-5" }),
|
|
101
|
+
path: "/worker/profile",
|
|
102
|
+
color: "bg-bg-sunken text-text-secondary"
|
|
104
103
|
}
|
|
105
104
|
],
|
|
106
105
|
investor: [
|
|
107
106
|
{
|
|
108
107
|
label: "Portfolio",
|
|
109
108
|
description: "Your investments",
|
|
110
|
-
icon: /* @__PURE__ */
|
|
111
|
-
path: "/investor/
|
|
109
|
+
icon: /* @__PURE__ */ K(B, { className: "h-5 w-5" }),
|
|
110
|
+
path: "/investor/portfolio",
|
|
112
111
|
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
113
112
|
},
|
|
114
113
|
{
|
|
115
114
|
label: "Opportunities",
|
|
116
115
|
description: "New investments",
|
|
117
|
-
icon: /* @__PURE__ */
|
|
116
|
+
icon: /* @__PURE__ */ K(x, { className: "h-5 w-5" }),
|
|
118
117
|
path: "/investor/opportunities",
|
|
119
118
|
color: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
120
119
|
},
|
|
121
120
|
{
|
|
122
|
-
label: "
|
|
123
|
-
description: "
|
|
124
|
-
icon: /* @__PURE__ */
|
|
125
|
-
path: "/investor/
|
|
121
|
+
label: "Investments",
|
|
122
|
+
description: "Active positions",
|
|
123
|
+
icon: /* @__PURE__ */ K(w, { className: "h-5 w-5" }),
|
|
124
|
+
path: "/investor/investments",
|
|
126
125
|
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
127
126
|
},
|
|
128
127
|
{
|
|
129
|
-
label: "
|
|
130
|
-
description: "Performance
|
|
131
|
-
icon: /* @__PURE__ */
|
|
132
|
-
path: "/investor/
|
|
128
|
+
label: "Analytics",
|
|
129
|
+
description: "Performance",
|
|
130
|
+
icon: /* @__PURE__ */ K(h, { className: "h-5 w-5" }),
|
|
131
|
+
path: "/investor/analytics",
|
|
133
132
|
color: "bg-accent-purple-subtle text-text-primary"
|
|
134
133
|
}
|
|
135
134
|
],
|
|
@@ -137,616 +136,437 @@ var Z = {
|
|
|
137
136
|
{
|
|
138
137
|
label: "Dashboard",
|
|
139
138
|
description: "Platform overview",
|
|
140
|
-
icon: /* @__PURE__ */
|
|
139
|
+
icon: /* @__PURE__ */ K(T, { className: "h-5 w-5" }),
|
|
141
140
|
path: "/admin/dashboard",
|
|
142
141
|
color: "bg-status-error-bg-subtle text-status-error-text"
|
|
143
142
|
},
|
|
144
143
|
{
|
|
145
144
|
label: "Users",
|
|
146
145
|
description: "Manage accounts",
|
|
147
|
-
icon: /* @__PURE__ */
|
|
146
|
+
icon: /* @__PURE__ */ K(U, { className: "h-5 w-5" }),
|
|
148
147
|
path: "/admin/users",
|
|
149
148
|
color: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
150
149
|
},
|
|
151
150
|
{
|
|
152
151
|
label: "Carts",
|
|
153
152
|
description: "Approve & manage",
|
|
154
|
-
icon: /* @__PURE__ */
|
|
153
|
+
icon: /* @__PURE__ */ K(z, { className: "h-5 w-5" }),
|
|
155
154
|
path: "/admin/carts",
|
|
156
155
|
color: "bg-accent-purple-subtle text-text-primary"
|
|
157
156
|
},
|
|
158
157
|
{
|
|
159
158
|
label: "Analytics",
|
|
160
159
|
description: "Revenue reports",
|
|
161
|
-
icon: /* @__PURE__ */
|
|
160
|
+
icon: /* @__PURE__ */ K(h, { className: "h-5 w-5" }),
|
|
162
161
|
path: "/admin/analytics",
|
|
163
162
|
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
164
163
|
}
|
|
165
164
|
]
|
|
166
|
-
}
|
|
167
|
-
function Q(e, t, n) {
|
|
168
|
-
switch (e) {
|
|
169
|
-
case "customer": return [
|
|
170
|
-
{
|
|
171
|
-
icon: /* @__PURE__ */ q(L, { className: "h-5 w-5" }),
|
|
172
|
-
value: t.length.toString(),
|
|
173
|
-
label: "Total Orders",
|
|
174
|
-
trend: "up",
|
|
175
|
-
trendValue: "+2 this week"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
|
|
179
|
-
value: (n?.activeProviders ?? 0).toString(),
|
|
180
|
-
label: "Nearby Providers",
|
|
181
|
-
trend: "up",
|
|
182
|
-
trendValue: "+3"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
186
|
-
value: (n?.avgRating ?? 0).toFixed(1),
|
|
187
|
-
label: "Avg. Rating",
|
|
188
|
-
trend: "up",
|
|
189
|
-
trendValue: "+0.1"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
193
|
-
value: s(t.reduce((e, t) => e + t.total, 0), { minimumFractionDigits: 0 }),
|
|
194
|
-
label: "Total Spent",
|
|
195
|
-
trend: "neutral",
|
|
196
|
-
trendValue: ""
|
|
197
|
-
}
|
|
198
|
-
];
|
|
199
|
-
case "cart_owner": return [
|
|
200
|
-
{
|
|
201
|
-
icon: /* @__PURE__ */ q(L, { className: "h-5 w-5" }),
|
|
202
|
-
value: "48",
|
|
203
|
-
label: "Orders Today",
|
|
204
|
-
trend: "up",
|
|
205
|
-
trendValue: "+12%"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
209
|
-
value: s(12850, { minimumFractionDigits: 0 }),
|
|
210
|
-
label: "Today's Revenue",
|
|
211
|
-
trend: "up",
|
|
212
|
-
trendValue: "+8%"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
216
|
-
value: "4.6",
|
|
217
|
-
label: "Cart Rating",
|
|
218
|
-
trend: "up",
|
|
219
|
-
trendValue: "+0.2"
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" }),
|
|
223
|
-
value: "5",
|
|
224
|
-
label: "Active Staff",
|
|
225
|
-
trend: "neutral",
|
|
226
|
-
trendValue: ""
|
|
227
|
-
}
|
|
228
|
-
];
|
|
229
|
-
case "worker": return [
|
|
230
|
-
{
|
|
231
|
-
icon: /* @__PURE__ */ q(x, { className: "h-5 w-5" }),
|
|
232
|
-
value: "5",
|
|
233
|
-
label: "Tasks Today",
|
|
234
|
-
trend: "up",
|
|
235
|
-
trendValue: "+2"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
239
|
-
value: s(425, { minimumFractionDigits: 0 }),
|
|
240
|
-
label: "Today's Earnings",
|
|
241
|
-
trend: "up",
|
|
242
|
-
trendValue: "+15%"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
246
|
-
value: "4.7",
|
|
247
|
-
label: "Rating",
|
|
248
|
-
trend: "up",
|
|
249
|
-
trendValue: "+0.1"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
icon: /* @__PURE__ */ q(y, { className: "h-5 w-5" }),
|
|
253
|
-
value: "96.8%",
|
|
254
|
-
label: "Completion Rate",
|
|
255
|
-
trend: "up",
|
|
256
|
-
trendValue: "+0.5%"
|
|
257
|
-
}
|
|
258
|
-
];
|
|
259
|
-
case "investor": return [
|
|
260
|
-
{
|
|
261
|
-
icon: /* @__PURE__ */ q(H, { className: "h-5 w-5" }),
|
|
262
|
-
value: "3",
|
|
263
|
-
label: "Active Investments",
|
|
264
|
-
trend: "up",
|
|
265
|
-
trendValue: "+1"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
269
|
-
value: s(45e4, { minimumFractionDigits: 0 }),
|
|
270
|
-
label: "Total Invested",
|
|
271
|
-
trend: "up",
|
|
272
|
-
trendValue: ""
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
icon: /* @__PURE__ */ q(T, { className: "h-5 w-5" }),
|
|
276
|
-
value: "16.5%",
|
|
277
|
-
label: "Avg. Returns",
|
|
278
|
-
trend: "up",
|
|
279
|
-
trendValue: "+2.1%"
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
icon: /* @__PURE__ */ q(v, { className: "h-5 w-5" }),
|
|
283
|
-
value: s(74250, { minimumFractionDigits: 0 }),
|
|
284
|
-
label: "Total Returns",
|
|
285
|
-
trend: "up",
|
|
286
|
-
trendValue: "+8.5%"
|
|
287
|
-
}
|
|
288
|
-
];
|
|
289
|
-
default: return [
|
|
290
|
-
{
|
|
291
|
-
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" }),
|
|
292
|
-
value: (n?.activeCustomers ?? 0).toLocaleString("en-IN"),
|
|
293
|
-
label: "Active Customers",
|
|
294
|
-
trend: "up",
|
|
295
|
-
trendValue: "+50"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
|
|
299
|
-
value: (n?.activeProviders ?? 0).toString(),
|
|
300
|
-
label: "Service Providers",
|
|
301
|
-
trend: "up",
|
|
302
|
-
trendValue: "+3"
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
icon: /* @__PURE__ */ q(L, { className: "h-5 w-5" }),
|
|
306
|
-
value: (n?.totalOrders ?? 0).toLocaleString("en-IN"),
|
|
307
|
-
label: "Total Orders",
|
|
308
|
-
trend: "up",
|
|
309
|
-
trendValue: "+12%"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
313
|
-
value: s(n?.totalRevenue ?? 0, { minimumFractionDigits: 0 }),
|
|
314
|
-
label: "Total Revenue",
|
|
315
|
-
trend: "up",
|
|
316
|
-
trendValue: "+8.5%"
|
|
317
|
-
}
|
|
318
|
-
];
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
var $ = [
|
|
165
|
+
}, X = [
|
|
322
166
|
{
|
|
323
167
|
label: "Food & Beverage",
|
|
324
|
-
icon: /* @__PURE__ */
|
|
168
|
+
icon: /* @__PURE__ */ K(g, { className: "h-6 w-6" }),
|
|
325
169
|
color: "bg-status-warning-bg-subtle text-status-warning-text"
|
|
326
170
|
},
|
|
327
171
|
{
|
|
328
172
|
label: "Personal Care & Beauty",
|
|
329
|
-
icon: /* @__PURE__ */
|
|
173
|
+
icon: /* @__PURE__ */ K(A, { className: "h-6 w-6" }),
|
|
330
174
|
color: "bg-accent-purple-subtle text-text-primary"
|
|
331
175
|
},
|
|
332
176
|
{
|
|
333
177
|
label: "Repair & Maintenance",
|
|
334
|
-
icon: /* @__PURE__ */
|
|
178
|
+
icon: /* @__PURE__ */ K(W, { className: "h-6 w-6" }),
|
|
335
179
|
color: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
336
180
|
},
|
|
337
181
|
{
|
|
338
182
|
label: "Home Services",
|
|
339
|
-
icon: /* @__PURE__ */
|
|
183
|
+
icon: /* @__PURE__ */ K(C, { className: "h-6 w-6" }),
|
|
340
184
|
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
341
185
|
},
|
|
342
186
|
{
|
|
343
187
|
label: "Clothing & Fashion",
|
|
344
|
-
icon: /* @__PURE__ */
|
|
188
|
+
icon: /* @__PURE__ */ K(P, { className: "h-6 w-6" }),
|
|
345
189
|
color: "bg-accent-purple-subtle text-text-primary"
|
|
346
190
|
},
|
|
347
191
|
{
|
|
348
192
|
label: "Health & Wellness",
|
|
349
|
-
icon: /* @__PURE__ */
|
|
193
|
+
icon: /* @__PURE__ */ K(S, { className: "h-6 w-6" }),
|
|
350
194
|
color: "bg-status-error-bg-subtle text-status-error-text"
|
|
351
195
|
},
|
|
352
196
|
{
|
|
353
197
|
label: "Education & Skills",
|
|
354
|
-
icon: /* @__PURE__ */
|
|
198
|
+
icon: /* @__PURE__ */ K(b, { className: "h-6 w-6" }),
|
|
355
199
|
color: "bg-status-warning-bg-subtle text-status-warning-text"
|
|
356
200
|
},
|
|
357
201
|
{
|
|
358
202
|
label: "Retail & Merchandise",
|
|
359
|
-
icon: /* @__PURE__ */
|
|
203
|
+
icon: /* @__PURE__ */ K(k, { className: "h-6 w-6" }),
|
|
360
204
|
color: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
361
205
|
},
|
|
362
206
|
{
|
|
363
207
|
label: "Grocery & Essentials",
|
|
364
|
-
icon: /* @__PURE__ */
|
|
208
|
+
icon: /* @__PURE__ */ K(I, { className: "h-6 w-6" }),
|
|
365
209
|
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
366
210
|
}
|
|
367
|
-
], ee = [
|
|
368
|
-
{
|
|
369
|
-
step: 1,
|
|
370
|
-
title: "Browse Services",
|
|
371
|
-
description: "Discover local service providers and carts near you.",
|
|
372
|
-
icon: /* @__PURE__ */ q(P, { className: "h-6 w-6" })
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
step: 2,
|
|
376
|
-
title: "Place an Order",
|
|
377
|
-
description: "Select items or services and place your order seamlessly.",
|
|
378
|
-
icon: /* @__PURE__ */ q(L, { className: "h-6 w-6" })
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
step: 3,
|
|
382
|
-
title: "Track in Real-time",
|
|
383
|
-
description: "Get live updates on your order from confirmation to delivery.",
|
|
384
|
-
icon: /* @__PURE__ */ q(U, { className: "h-6 w-6" })
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
step: 4,
|
|
388
|
-
title: "Rate & Review",
|
|
389
|
-
description: "Share your experience and help others find great services.",
|
|
390
|
-
icon: /* @__PURE__ */ q(B, { className: "h-6 w-6" })
|
|
391
|
-
}
|
|
392
|
-
], te = [
|
|
393
|
-
{
|
|
394
|
-
id: "ha-1",
|
|
395
|
-
description: "New order placed at Dosa Express",
|
|
396
|
-
time: "2 mins ago",
|
|
397
|
-
type: "order"
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
id: "ha-2",
|
|
401
|
-
description: "Quick Cuts Salon received a new review",
|
|
402
|
-
time: "15 mins ago",
|
|
403
|
-
type: "review"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
id: "ha-3",
|
|
407
|
-
description: "Investment opportunity funded: Spotless Cleaning",
|
|
408
|
-
time: "1 hour ago",
|
|
409
|
-
type: "investment"
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
id: "ha-4",
|
|
413
|
-
description: "New cart registered: Gadget Zone Brigade",
|
|
414
|
-
time: "3 hours ago",
|
|
415
|
-
type: "cart"
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
id: "ha-5",
|
|
419
|
-
description: "Order delivered: Fix-It Mobile Repair",
|
|
420
|
-
time: "5 hours ago",
|
|
421
|
-
type: "order"
|
|
422
|
-
}
|
|
423
|
-
], ne = [
|
|
424
|
-
{
|
|
425
|
-
label: "Service Providers",
|
|
426
|
-
value: "21+",
|
|
427
|
-
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" })
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
label: "Categories",
|
|
431
|
-
value: "9",
|
|
432
|
-
icon: /* @__PURE__ */ q(M, { className: "h-5 w-5" })
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
label: "Happy Customers",
|
|
436
|
-
value: "534+",
|
|
437
|
-
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" })
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
label: "Orders Completed",
|
|
441
|
-
value: "1,247+",
|
|
442
|
-
icon: /* @__PURE__ */ q(y, { className: "h-5 w-5" })
|
|
443
|
-
}
|
|
444
211
|
];
|
|
445
|
-
function
|
|
446
|
-
let { navigateTo:
|
|
447
|
-
let n =
|
|
212
|
+
function Z() {
|
|
213
|
+
let { navigateTo: h, currentUser: g } = e(), { t: v } = d(), [y, b] = u(""), { providers: S, orders: C, dashboardStats: T, investments: k } = a(), A = c((e, t) => {
|
|
214
|
+
let n = v(e);
|
|
448
215
|
return n === e ? t : n;
|
|
449
|
-
}, [
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
216
|
+
}, [v]), M = g?.firstName ?? g?.name ?? "there", P = g?.role ?? "customer", B = P === "admin", H = Y[P] ?? Y.customer, U = l(() => (S.data ?? []).find((e) => e.ownerId === g?.id), [S.data, g?.id]), W = (C.data ?? []).length, Z = l(() => (k.data ?? []).reduce((e, t) => e + t.currentValue, 0), [k.data]), te = c((e) => {
|
|
217
|
+
switch (e) {
|
|
218
|
+
case "customer": return {
|
|
219
|
+
value: W.toString(),
|
|
220
|
+
label: W === 1 ? A("kadaikodi.home.order", "order") : A("kadaikodi.home.orders", "orders")
|
|
221
|
+
};
|
|
222
|
+
case "cart_owner": return U ? {
|
|
223
|
+
value: `★ ${U.rating.toFixed(1)}`,
|
|
224
|
+
label: A("kadaikodi.home.rating", "rating")
|
|
225
|
+
} : null;
|
|
226
|
+
case "investor": return Z > 0 ? {
|
|
227
|
+
value: o(Z, { minimumFractionDigits: 0 }),
|
|
228
|
+
label: A("kadaikodi.home.portfolio", "portfolio")
|
|
229
|
+
} : null;
|
|
230
|
+
case "admin": return B ? {
|
|
231
|
+
value: (T.data?.activeProviders ?? 0).toString(),
|
|
232
|
+
label: A("kadaikodi.home.providers", "providers")
|
|
233
|
+
} : null;
|
|
234
|
+
default: return null;
|
|
235
|
+
}
|
|
236
|
+
}, [
|
|
237
|
+
W,
|
|
238
|
+
U,
|
|
239
|
+
Z,
|
|
240
|
+
B,
|
|
241
|
+
T.data,
|
|
242
|
+
A
|
|
243
|
+
]), ne = [
|
|
244
|
+
{
|
|
245
|
+
role: "customer",
|
|
246
|
+
title: A("kadaikodi.home.roleCard.customer.title", "Shop as Customer"),
|
|
247
|
+
description: A("kadaikodi.home.roleCard.customer.desc", "Discover carts & order"),
|
|
248
|
+
icon: /* @__PURE__ */ K(I, { className: "h-6 w-6" }),
|
|
249
|
+
path: "/customer/dashboard",
|
|
250
|
+
iconClass: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
role: "cart_owner",
|
|
254
|
+
title: A("kadaikodi.home.roleCard.merchant.title", "My Cart (Merchant)"),
|
|
255
|
+
description: A("kadaikodi.home.roleCard.merchant.desc", "Run your business"),
|
|
256
|
+
icon: /* @__PURE__ */ K(z, { className: "h-6 w-6" }),
|
|
257
|
+
path: "/cart-owner/dashboard",
|
|
258
|
+
iconClass: "bg-accent-primary/10 text-accent-primary"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
role: "worker",
|
|
262
|
+
title: A("kadaikodi.home.roleCard.worker.title", "Work"),
|
|
263
|
+
description: A("kadaikodi.home.roleCard.worker.desc", "Deliveries & tasks"),
|
|
264
|
+
icon: /* @__PURE__ */ K(V, { className: "h-6 w-6" }),
|
|
265
|
+
path: "/worker/dashboard",
|
|
266
|
+
iconClass: "bg-status-warning-bg-subtle text-status-warning-text"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
role: "investor",
|
|
270
|
+
title: A("kadaikodi.home.roleCard.investor.title", "Invest"),
|
|
271
|
+
description: A("kadaikodi.home.roleCard.investor.desc", "Back local merchants"),
|
|
272
|
+
icon: /* @__PURE__ */ K(x, { className: "h-6 w-6" }),
|
|
273
|
+
path: "/investor/dashboard",
|
|
274
|
+
iconClass: "bg-status-success-bg-subtle text-status-success-text"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
role: "admin",
|
|
278
|
+
title: A("kadaikodi.home.roleCard.admin.title", "Admin"),
|
|
279
|
+
description: A("kadaikodi.home.roleCard.admin.desc", "Platform operations"),
|
|
280
|
+
icon: /* @__PURE__ */ K(N, { className: "h-6 w-6" }),
|
|
281
|
+
path: "/admin/dashboard",
|
|
282
|
+
iconClass: "bg-bg-sunken text-text-secondary"
|
|
283
|
+
}
|
|
284
|
+
], Q = l(() => {
|
|
285
|
+
let e = (S.data ?? []).filter((e) => e.isOpen);
|
|
286
|
+
if (y) {
|
|
287
|
+
let t = y.toLowerCase();
|
|
465
288
|
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.category.toLowerCase().includes(t));
|
|
466
289
|
}
|
|
467
290
|
return e.sort((e, t) => t.rating - e.rating).slice(0, 6);
|
|
468
|
-
}, [
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
cart: "text-text-primary"
|
|
473
|
-
}, U = (T.data ?? []).length === 0 && !T.isLoading, W = w.isLoading || T.isLoading || E.isLoading, G = w.isError || T.isError || E.isError;
|
|
474
|
-
return W ? /* @__PURE__ */ q(n, {
|
|
475
|
-
title: D("kadaikodi.common.loading", "Loading..."),
|
|
476
|
-
children: /* @__PURE__ */ q("div", {
|
|
291
|
+
}, [S.data, y]), $ = l(() => [...C.data ?? []].sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime()).slice(0, 3), [C.data]), re = (C.data ?? []).length === 0 && !C.isLoading, ie = S.isLoading || C.isLoading || T.isLoading, ae = S.isError || C.isError || T.isError;
|
|
292
|
+
return ie ? /* @__PURE__ */ K(n, {
|
|
293
|
+
title: A("kadaikodi.common.loading", "Loading..."),
|
|
294
|
+
children: /* @__PURE__ */ K("div", {
|
|
477
295
|
className: "flex h-[60vh] items-center justify-center",
|
|
478
|
-
children: /* @__PURE__ */
|
|
296
|
+
children: /* @__PURE__ */ K(E, { className: "h-8 w-8 animate-spin text-accent-primary" })
|
|
479
297
|
})
|
|
480
|
-
}) :
|
|
481
|
-
title:
|
|
482
|
-
children: /* @__PURE__ */
|
|
298
|
+
}) : ae ? /* @__PURE__ */ K(n, {
|
|
299
|
+
title: A("kadaikodi.common.error", "Error"),
|
|
300
|
+
children: /* @__PURE__ */ q("div", {
|
|
483
301
|
className: "flex h-[60vh] flex-col items-center justify-center gap-4",
|
|
484
302
|
children: [
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
className: "text-xl font-semibold",
|
|
488
|
-
children:
|
|
303
|
+
/* @__PURE__ */ K(f, { className: "h-12 w-12 text-status-error-text" }),
|
|
304
|
+
/* @__PURE__ */ K("h2", {
|
|
305
|
+
className: "text-xl font-semibold text-text-primary",
|
|
306
|
+
children: A("kadaikodi.common.errorLoading", "Error loading data")
|
|
489
307
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ K("p", {
|
|
491
309
|
className: "text-text-secondary",
|
|
492
|
-
children:
|
|
310
|
+
children: A("kadaikodi.common.tryAgain", "Please try again later.")
|
|
493
311
|
})
|
|
494
312
|
]
|
|
495
313
|
})
|
|
496
|
-
}) : /* @__PURE__ */
|
|
497
|
-
title: `${
|
|
498
|
-
description:
|
|
314
|
+
}) : /* @__PURE__ */ q(n, {
|
|
315
|
+
title: `${A("kadaikodi.home.hi", "Hi")}, ${M}`,
|
|
316
|
+
description: A("kadaikodi.home.everyRole", "One account, every role"),
|
|
499
317
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ K(J, {
|
|
501
319
|
className: "mb-6",
|
|
502
|
-
children:
|
|
320
|
+
children: A("kadaikodi.home.purpose", "Kadaikodi gives you one account for every side of local commerce. Jump into the role you need — shop as a customer, run your cart as a merchant, pick up delivery work, or back local businesses — and pick up right where you left off.")
|
|
503
321
|
}),
|
|
504
|
-
|
|
505
|
-
className: "mb-
|
|
506
|
-
children: /* @__PURE__ */
|
|
322
|
+
re && /* @__PURE__ */ K("section", {
|
|
323
|
+
className: "mb-8 overflow-hidden rounded-xl border border-border-subtle bg-accent-primary/5 p-6",
|
|
324
|
+
children: /* @__PURE__ */ q("div", {
|
|
507
325
|
className: "flex items-start gap-4",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
509
|
-
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-
|
|
510
|
-
children: /* @__PURE__ */
|
|
511
|
-
}), /* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ K("div", {
|
|
327
|
+
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-accent-primary/10 text-accent-primary",
|
|
328
|
+
children: /* @__PURE__ */ K(L, { className: "h-6 w-6" })
|
|
329
|
+
}), /* @__PURE__ */ q("div", {
|
|
512
330
|
className: "flex-1",
|
|
513
331
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ K("h2", {
|
|
515
333
|
className: "text-lg font-semibold text-text-primary",
|
|
516
|
-
children:
|
|
334
|
+
children: A("kadaikodi.home.welcomeTitle", "Welcome to Kadaikodi!")
|
|
517
335
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ K("p", {
|
|
519
337
|
className: "mt-1 text-sm text-text-secondary",
|
|
520
|
-
children:
|
|
338
|
+
children: A("kadaikodi.home.welcomeDescription", "Your local commerce hub. Start by exploring service providers near you, or pick a role above to get going.")
|
|
521
339
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ q("button", {
|
|
523
341
|
type: "button",
|
|
524
|
-
onClick: () =>
|
|
525
|
-
className: "mt-3 inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg
|
|
526
|
-
children: [/* @__PURE__ */
|
|
342
|
+
onClick: () => h("/customer/discover"),
|
|
343
|
+
className: "mt-3 inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover",
|
|
344
|
+
children: [/* @__PURE__ */ K(j, { className: "h-4 w-4" }), A("kadaikodi.home.exploreServices", "Explore Services")]
|
|
527
345
|
})
|
|
528
346
|
]
|
|
529
347
|
})]
|
|
530
348
|
})
|
|
531
349
|
}),
|
|
532
350
|
/* @__PURE__ */ q("section", {
|
|
533
|
-
className: "mb-
|
|
534
|
-
children: /* @__PURE__ */
|
|
535
|
-
className: "
|
|
536
|
-
children: [/* @__PURE__ */
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
351
|
+
className: "mb-10",
|
|
352
|
+
children: [/* @__PURE__ */ q("div", {
|
|
353
|
+
className: "mb-4 flex items-center justify-between",
|
|
354
|
+
children: [/* @__PURE__ */ K("h2", {
|
|
355
|
+
className: "text-lg font-semibold text-text-primary",
|
|
356
|
+
children: A("kadaikodi.home.chooseRole", "Choose how you want to show up")
|
|
357
|
+
}), /* @__PURE__ */ q("span", {
|
|
358
|
+
className: "hidden items-center gap-1 text-xs font-medium text-text-muted sm:inline-flex",
|
|
359
|
+
children: [/* @__PURE__ */ K(N, { className: "h-3.5 w-3.5" }), A("kadaikodi.home.rbac", "RBAC & multi-tenant")]
|
|
360
|
+
})]
|
|
361
|
+
}), /* @__PURE__ */ K("div", {
|
|
362
|
+
className: "grid gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",
|
|
363
|
+
children: ne.map((e) => {
|
|
364
|
+
let n = e.role === P, r = e.role === "admin" && !B, i = te(e.role);
|
|
365
|
+
return /* @__PURE__ */ q("button", {
|
|
366
|
+
type: "button",
|
|
367
|
+
disabled: r,
|
|
368
|
+
onClick: () => {
|
|
369
|
+
r || h(e.path);
|
|
370
|
+
},
|
|
371
|
+
"aria-label": e.title,
|
|
372
|
+
className: t("group relative flex items-center gap-4 rounded-xl border p-4 text-left transition-all sm:p-5", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n ? "border-accent-primary/40 bg-accent-primary/5 shadow-[var(--shadow-glow)]" : "border-border-subtle bg-bg-surface hover:border-border-strong hover:shadow-md", r && "cursor-not-allowed opacity-70 hover:border-border-subtle hover:shadow-none"),
|
|
546
373
|
children: [
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
374
|
+
/* @__PURE__ */ K("div", {
|
|
375
|
+
className: t("flex h-12 w-12 shrink-0 items-center justify-center rounded-xl", e.iconClass),
|
|
376
|
+
children: r ? /* @__PURE__ */ K(D, { className: "h-6 w-6" }) : e.icon
|
|
377
|
+
}),
|
|
378
|
+
/* @__PURE__ */ q("div", {
|
|
379
|
+
className: "min-w-0 flex-1",
|
|
380
|
+
children: [/* @__PURE__ */ q("div", {
|
|
381
|
+
className: "flex flex-wrap items-center gap-2",
|
|
382
|
+
children: [/* @__PURE__ */ K("p", {
|
|
383
|
+
className: "truncate text-base font-semibold text-text-primary",
|
|
384
|
+
children: e.title
|
|
385
|
+
}), n && /* @__PURE__ */ K("span", {
|
|
386
|
+
className: "inline-flex items-center rounded-full bg-accent-primary/10 px-2 py-0.5 text-[11px] font-medium text-accent-primary",
|
|
387
|
+
children: A("kadaikodi.home.current", "Current")
|
|
388
|
+
})]
|
|
389
|
+
}), /* @__PURE__ */ K("p", {
|
|
390
|
+
className: "mt-0.5 truncate text-sm text-text-secondary",
|
|
391
|
+
children: e.description
|
|
392
|
+
})]
|
|
393
|
+
}),
|
|
394
|
+
/* @__PURE__ */ K("div", {
|
|
395
|
+
className: "flex shrink-0 items-center gap-3",
|
|
396
|
+
children: r ? /* @__PURE__ */ q("span", {
|
|
397
|
+
className: "inline-flex items-center gap-1 whitespace-nowrap text-xs font-medium text-text-muted",
|
|
398
|
+
children: [A("kadaikodi.home.operatorsOnly", "operators only"), /* @__PURE__ */ K(D, { className: "h-3.5 w-3.5" })]
|
|
399
|
+
}) : /* @__PURE__ */ q(G, { children: [i && /* @__PURE__ */ q("div", {
|
|
400
|
+
className: "hidden text-right sm:block",
|
|
401
|
+
children: [/* @__PURE__ */ K("p", {
|
|
402
|
+
className: "text-sm font-bold tabular-nums text-text-primary",
|
|
403
|
+
children: i.value
|
|
404
|
+
}), /* @__PURE__ */ K("p", {
|
|
405
|
+
className: "text-[11px] text-text-secondary",
|
|
406
|
+
children: i.label
|
|
407
|
+
})]
|
|
408
|
+
}), /* @__PURE__ */ K(_, { className: "h-5 w-5 text-text-secondary transition group-hover:translate-x-0.5 group-hover:text-text-primary" })] })
|
|
409
|
+
})
|
|
552
410
|
]
|
|
553
|
-
})
|
|
554
|
-
|
|
555
|
-
className: "mt-1 text-sm text-text-secondary",
|
|
556
|
-
children: F[M]
|
|
557
|
-
})
|
|
558
|
-
] }), /* @__PURE__ */ J("div", {
|
|
559
|
-
className: "relative w-full sm:w-72",
|
|
560
|
-
children: [/* @__PURE__ */ q(P, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ q("input", {
|
|
561
|
-
type: "text",
|
|
562
|
-
placeholder: D("kadaikodi.home.searchPlaceholder", "Search services, carts..."),
|
|
563
|
-
value: x,
|
|
564
|
-
onChange: (e) => C(e.target.value),
|
|
565
|
-
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2.5 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
566
|
-
})]
|
|
567
|
-
})]
|
|
568
|
-
})
|
|
569
|
-
}),
|
|
570
|
-
/* @__PURE__ */ J(Y, {
|
|
571
|
-
className: "mb-8",
|
|
572
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
573
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
574
|
-
children: D("kadaikodi.home.quickStats", "Quick Stats")
|
|
575
|
-
}), /* @__PURE__ */ q("div", {
|
|
576
|
-
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
577
|
-
children: L.map((e) => /* @__PURE__ */ q(r, {
|
|
578
|
-
icon: e.icon,
|
|
579
|
-
value: e.value,
|
|
580
|
-
label: e.label,
|
|
581
|
-
trend: e.trend,
|
|
582
|
-
trendValue: e.trendValue
|
|
583
|
-
}, e.label))
|
|
411
|
+
}, e.role);
|
|
412
|
+
})
|
|
584
413
|
})]
|
|
585
414
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ q("section", {
|
|
587
416
|
className: "mb-8",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
589
|
-
className: "text-lg font-semibold text-text-primary
|
|
590
|
-
children:
|
|
591
|
-
}), /* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ K("h2", {
|
|
418
|
+
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
419
|
+
children: A("kadaikodi.home.quickActions", "Quick Actions")
|
|
420
|
+
}), /* @__PURE__ */ K("div", {
|
|
592
421
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
593
|
-
children:
|
|
422
|
+
children: H.map((e) => /* @__PURE__ */ q("button", {
|
|
594
423
|
type: "button",
|
|
595
|
-
onClick: () =>
|
|
596
|
-
className: t("flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 text-left shadow-sm transition-all", "hover:border-border-strong hover:shadow-md"),
|
|
424
|
+
onClick: () => h(e.path),
|
|
425
|
+
className: t("group flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 text-left shadow-sm transition-all", "hover:border-border-strong hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"),
|
|
597
426
|
children: [
|
|
598
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ K("div", {
|
|
599
428
|
className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg", e.color),
|
|
600
429
|
children: e.icon
|
|
601
430
|
}),
|
|
602
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ q("div", {
|
|
603
432
|
className: "min-w-0 flex-1",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
433
|
+
children: [/* @__PURE__ */ K("p", {
|
|
605
434
|
className: "text-sm font-semibold text-text-primary",
|
|
606
435
|
children: e.label
|
|
607
|
-
}), /* @__PURE__ */
|
|
436
|
+
}), /* @__PURE__ */ K("p", {
|
|
608
437
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
609
438
|
children: e.description
|
|
610
439
|
})]
|
|
611
440
|
}),
|
|
612
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ K(p, { className: "mt-1 h-4 w-4 shrink-0 text-text-secondary transition group-hover:translate-x-0.5" })
|
|
613
442
|
]
|
|
614
443
|
}, e.label))
|
|
615
444
|
})]
|
|
616
445
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ q("section", {
|
|
618
447
|
className: "mb-8",
|
|
619
|
-
children: [/* @__PURE__ */
|
|
620
|
-
className: "flex items-center justify-between
|
|
621
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ q("div", {
|
|
449
|
+
className: "mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
450
|
+
children: [/* @__PURE__ */ K("h2", {
|
|
622
451
|
className: "text-lg font-semibold text-text-primary",
|
|
623
|
-
children:
|
|
624
|
-
}), /* @__PURE__ */
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
452
|
+
children: y ? A("kadaikodi.home.searchResults", "Search Results") : A("kadaikodi.home.openNearby", "What's open nearby")
|
|
453
|
+
}), /* @__PURE__ */ q("div", {
|
|
454
|
+
className: "flex items-center gap-3",
|
|
455
|
+
children: [/* @__PURE__ */ q("div", {
|
|
456
|
+
className: "relative w-full sm:w-64",
|
|
457
|
+
children: [/* @__PURE__ */ K(j, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ K("input", {
|
|
458
|
+
type: "text",
|
|
459
|
+
placeholder: A("kadaikodi.home.searchPlaceholder", "Search carts..."),
|
|
460
|
+
value: y,
|
|
461
|
+
onChange: (e) => b(e.target.value),
|
|
462
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
463
|
+
})]
|
|
464
|
+
}), /* @__PURE__ */ q("button", {
|
|
465
|
+
type: "button",
|
|
466
|
+
onClick: () => h("/customer/discover"),
|
|
467
|
+
className: "hidden items-center gap-1 whitespace-nowrap text-sm font-medium text-accent-primary hover:underline sm:flex",
|
|
468
|
+
children: [
|
|
469
|
+
A("kadaikodi.common.viewAll", "View All"),
|
|
470
|
+
" ",
|
|
471
|
+
/* @__PURE__ */ K(p, { className: "h-3.5 w-3.5" })
|
|
472
|
+
]
|
|
473
|
+
})]
|
|
633
474
|
})]
|
|
634
|
-
}),
|
|
475
|
+
}), Q.length === 0 ? /* @__PURE__ */ K(i, {
|
|
635
476
|
illustration: "empty-search",
|
|
636
|
-
icon: /* @__PURE__ */
|
|
637
|
-
title:
|
|
638
|
-
description:
|
|
639
|
-
action: /* @__PURE__ */
|
|
477
|
+
icon: /* @__PURE__ */ K(j, { className: "h-10 w-10" }),
|
|
478
|
+
title: A("kadaikodi.home.noCartsFound", "No carts found"),
|
|
479
|
+
description: A("kadaikodi.home.noCartsDescription", "Try adjusting your search or browse all categories"),
|
|
480
|
+
action: y ? /* @__PURE__ */ K("button", {
|
|
640
481
|
type: "button",
|
|
641
|
-
onClick: () =>
|
|
642
|
-
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-
|
|
643
|
-
children:
|
|
644
|
-
})
|
|
645
|
-
}) : /* @__PURE__ */
|
|
482
|
+
onClick: () => b(""),
|
|
483
|
+
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
|
|
484
|
+
children: A("kadaikodi.home.clearSearch", "Clear Search")
|
|
485
|
+
}) : void 0
|
|
486
|
+
}) : /* @__PURE__ */ K("div", {
|
|
646
487
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
647
|
-
children:
|
|
488
|
+
children: Q.map((e) => /* @__PURE__ */ q("div", {
|
|
648
489
|
role: "button",
|
|
649
490
|
tabIndex: 0,
|
|
650
|
-
onClick: () =>
|
|
491
|
+
onClick: () => h(`/customer/cart/${e.id}`),
|
|
651
492
|
onKeyDown: (t) => {
|
|
652
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
493
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), h(`/customer/cart/${e.id}`));
|
|
653
494
|
},
|
|
654
|
-
className: "rounded-
|
|
655
|
-
children: [/* @__PURE__ */
|
|
656
|
-
className: "relative h-
|
|
495
|
+
className: "group cursor-pointer overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-sm transition-all hover:border-border-strong hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
496
|
+
children: [/* @__PURE__ */ q("div", {
|
|
497
|
+
className: "relative flex h-24 items-center justify-center bg-gradient-to-br from-[var(--color-accent-soft)] to-bg-sunken",
|
|
657
498
|
children: [
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
loading: "lazy"
|
|
663
|
-
}),
|
|
664
|
-
/* @__PURE__ */ q("div", {
|
|
665
|
-
className: "absolute top-2 right-2",
|
|
666
|
-
children: /* @__PURE__ */ q(i, { status: e.isOpen ? "open" : "closed" })
|
|
499
|
+
/* @__PURE__ */ K(z, { className: "h-8 w-8 text-text-secondary/50" }),
|
|
500
|
+
/* @__PURE__ */ K("div", {
|
|
501
|
+
className: "absolute right-2 top-2",
|
|
502
|
+
children: /* @__PURE__ */ K(r, { status: e.isOpen ? "open" : "closed" })
|
|
667
503
|
}),
|
|
668
|
-
e.isVerified && /* @__PURE__ */
|
|
669
|
-
className: "absolute
|
|
670
|
-
children: /* @__PURE__ */
|
|
671
|
-
className: "inline-flex items-center gap-1 rounded-full bg-
|
|
672
|
-
children: [
|
|
673
|
-
/* @__PURE__ */ q(_, { className: "h-3 w-3" }),
|
|
674
|
-
" ",
|
|
675
|
-
D("kadaikodi.home.verified", "Verified")
|
|
676
|
-
]
|
|
677
|
-
})
|
|
678
|
-
}),
|
|
679
|
-
/* @__PURE__ */ q("div", {
|
|
680
|
-
className: "absolute bottom-2 right-2",
|
|
681
|
-
children: /* @__PURE__ */ J("span", {
|
|
682
|
-
className: "inline-flex items-center gap-1 rounded-full bg-black/60 px-2 py-0.5 text-xs text-white backdrop-blur-sm",
|
|
683
|
-
children: [
|
|
684
|
-
/* @__PURE__ */ q(S, { className: "h-3 w-3" }),
|
|
685
|
-
" ",
|
|
686
|
-
e.estimatedTime,
|
|
687
|
-
" min"
|
|
688
|
-
]
|
|
504
|
+
e.isVerified && /* @__PURE__ */ K("div", {
|
|
505
|
+
className: "absolute left-2 top-2",
|
|
506
|
+
children: /* @__PURE__ */ q("span", {
|
|
507
|
+
className: "inline-flex items-center gap-1 rounded-full bg-bg-surface/80 px-2 py-0.5 text-xs font-medium text-accent-primary backdrop-blur-sm",
|
|
508
|
+
children: [/* @__PURE__ */ K(m, { className: "h-3 w-3" }), A("kadaikodi.home.verified", "Verified")]
|
|
689
509
|
})
|
|
690
510
|
})
|
|
691
511
|
]
|
|
692
|
-
}), /* @__PURE__ */
|
|
512
|
+
}), /* @__PURE__ */ q("div", {
|
|
693
513
|
className: "p-4",
|
|
694
514
|
children: [
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
className: "flex items-start justify-between",
|
|
697
|
-
children: [/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ q("div", {
|
|
516
|
+
className: "flex items-start justify-between gap-2",
|
|
517
|
+
children: [/* @__PURE__ */ q("div", {
|
|
698
518
|
className: "min-w-0 flex-1",
|
|
699
|
-
children: [/* @__PURE__ */
|
|
700
|
-
className: "text-base font-semibold text-text-primary
|
|
519
|
+
children: [/* @__PURE__ */ K("h3", {
|
|
520
|
+
className: "truncate text-base font-semibold text-text-primary",
|
|
701
521
|
children: e.name
|
|
702
|
-
}), /* @__PURE__ */
|
|
522
|
+
}), /* @__PURE__ */ K("p", {
|
|
703
523
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
704
524
|
children: e.category
|
|
705
525
|
})]
|
|
706
|
-
}), /* @__PURE__ */
|
|
707
|
-
className: "flex items-center gap-1 rounded bg-status-success-
|
|
708
|
-
children: [/* @__PURE__ */
|
|
709
|
-
className: "text-xs font-bold text-
|
|
710
|
-
children: e.rating
|
|
526
|
+
}), /* @__PURE__ */ q("div", {
|
|
527
|
+
className: "flex shrink-0 items-center gap-1 rounded bg-status-success-bg-subtle px-1.5 py-0.5",
|
|
528
|
+
children: [/* @__PURE__ */ K(R, { className: "h-3 w-3 fill-status-success-text text-status-success-text" }), /* @__PURE__ */ K("span", {
|
|
529
|
+
className: "text-xs font-bold text-status-success-text tabular-nums",
|
|
530
|
+
children: e.rating.toFixed(1)
|
|
711
531
|
})]
|
|
712
532
|
})]
|
|
713
533
|
}),
|
|
714
|
-
/* @__PURE__ */
|
|
715
|
-
className: "mt-3 flex items-center gap-4 text-xs text-text-secondary",
|
|
534
|
+
/* @__PURE__ */ q("div", {
|
|
535
|
+
className: "mt-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
|
|
716
536
|
children: [
|
|
717
|
-
e.distance != null && /* @__PURE__ */
|
|
537
|
+
e.distance != null && /* @__PURE__ */ q("span", {
|
|
718
538
|
className: "flex items-center gap-1",
|
|
719
539
|
children: [
|
|
720
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ K(O, { className: "h-3 w-3" }),
|
|
721
541
|
" ",
|
|
722
|
-
|
|
542
|
+
s(e.distance)
|
|
723
543
|
]
|
|
724
544
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ q("span", {
|
|
726
546
|
className: "flex items-center gap-1",
|
|
727
547
|
children: [
|
|
728
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ K(R, { className: "h-3 w-3" }),
|
|
729
549
|
" ",
|
|
730
550
|
e.totalRatings,
|
|
731
551
|
" ",
|
|
732
|
-
|
|
552
|
+
A("kadaikodi.home.reviews", "reviews")
|
|
733
553
|
]
|
|
734
554
|
}),
|
|
735
|
-
e.averageOrderValue && /* @__PURE__ */
|
|
555
|
+
e.averageOrderValue != null && e.averageOrderValue > 0 && /* @__PURE__ */ q("span", {
|
|
736
556
|
className: "flex items-center gap-1",
|
|
737
557
|
children: [
|
|
738
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ K(w, { className: "h-3 w-3" }),
|
|
739
559
|
" ",
|
|
740
|
-
|
|
560
|
+
A("kadaikodi.home.average", "Avg."),
|
|
741
561
|
" ",
|
|
742
|
-
|
|
562
|
+
o(e.averageOrderValue, { minimumFractionDigits: 0 })
|
|
743
563
|
]
|
|
744
564
|
})
|
|
745
565
|
]
|
|
746
566
|
}),
|
|
747
|
-
e.serviceTypes && e.serviceTypes.length > 0 && /* @__PURE__ */
|
|
567
|
+
e.serviceTypes && e.serviceTypes.length > 0 && /* @__PURE__ */ K("div", {
|
|
748
568
|
className: "mt-3 flex flex-wrap gap-1.5",
|
|
749
|
-
children: e.serviceTypes.slice(0, 3).map((e) => /* @__PURE__ */
|
|
569
|
+
children: e.serviceTypes.slice(0, 3).map((e) => /* @__PURE__ */ K("span", {
|
|
750
570
|
className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
|
|
751
571
|
children: e.replace(/_/g, " ")
|
|
752
572
|
}, e))
|
|
@@ -756,172 +576,94 @@ function re() {
|
|
|
756
576
|
}, e.id))
|
|
757
577
|
})]
|
|
758
578
|
}),
|
|
759
|
-
|
|
579
|
+
$.length > 0 && /* @__PURE__ */ q("section", {
|
|
760
580
|
className: "mb-8",
|
|
761
|
-
children: [/* @__PURE__ */
|
|
762
|
-
className: "flex items-center justify-between
|
|
763
|
-
children: [/* @__PURE__ */
|
|
581
|
+
children: [/* @__PURE__ */ q("div", {
|
|
582
|
+
className: "mb-4 flex items-center justify-between",
|
|
583
|
+
children: [/* @__PURE__ */ K("h2", {
|
|
764
584
|
className: "text-lg font-semibold text-text-primary",
|
|
765
|
-
children:
|
|
766
|
-
}), /* @__PURE__ */
|
|
585
|
+
children: A("kadaikodi.home.recentOrders", "Recent Orders")
|
|
586
|
+
}), /* @__PURE__ */ q("button", {
|
|
767
587
|
type: "button",
|
|
768
|
-
onClick: () =>
|
|
769
|
-
className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
588
|
+
onClick: () => h("/customer/orders"),
|
|
589
|
+
className: "flex items-center gap-1 text-sm font-medium text-accent-primary hover:underline",
|
|
770
590
|
children: [
|
|
771
|
-
|
|
591
|
+
A("kadaikodi.common.viewAll", "View All"),
|
|
772
592
|
" ",
|
|
773
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ K(p, { className: "h-3.5 w-3.5" })
|
|
774
594
|
]
|
|
775
595
|
})]
|
|
776
|
-
}), /* @__PURE__ */
|
|
777
|
-
className: "rounded-
|
|
778
|
-
children:
|
|
596
|
+
}), /* @__PURE__ */ K("div", {
|
|
597
|
+
className: "divide-y divide-border-subtle overflow-hidden rounded-xl border border-border-subtle bg-bg-surface",
|
|
598
|
+
children: $.map((e) => /* @__PURE__ */ q("div", {
|
|
779
599
|
role: "button",
|
|
780
600
|
tabIndex: 0,
|
|
781
|
-
onClick: () =>
|
|
601
|
+
onClick: () => h(`/customer/orders/${e.id}/track`),
|
|
782
602
|
onKeyDown: (t) => {
|
|
783
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
603
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), h(`/customer/orders/${e.id}/track`));
|
|
784
604
|
},
|
|
785
|
-
className: "flex items-center gap-4 px-4 py-3 hover:bg-
|
|
605
|
+
className: "flex cursor-pointer items-center gap-4 px-4 py-3 transition-colors hover:bg-bg-sunken/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
786
606
|
children: [
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
className: "h-12 w-12 rounded-lg object-cover shrink-0"
|
|
607
|
+
/* @__PURE__ */ K("div", {
|
|
608
|
+
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
609
|
+
children: /* @__PURE__ */ K(F, { className: "h-5 w-5" })
|
|
791
610
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
793
|
-
className: "
|
|
794
|
-
children: [/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ q("div", {
|
|
612
|
+
className: "min-w-0 flex-1",
|
|
613
|
+
children: [/* @__PURE__ */ q("div", {
|
|
795
614
|
className: "flex items-center gap-2",
|
|
796
|
-
children: [/* @__PURE__ */
|
|
797
|
-
className: "text-sm font-medium text-text-primary
|
|
615
|
+
children: [/* @__PURE__ */ K("p", {
|
|
616
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
798
617
|
children: e.cartName
|
|
799
|
-
}), /* @__PURE__ */
|
|
800
|
-
}), /* @__PURE__ */
|
|
801
|
-
className: "text-xs text-text-secondary
|
|
618
|
+
}), /* @__PURE__ */ K(r, { status: e.status })]
|
|
619
|
+
}), /* @__PURE__ */ K("p", {
|
|
620
|
+
className: "mt-0.5 truncate text-xs text-text-secondary",
|
|
802
621
|
children: e.items.map((e) => e.name).join(", ")
|
|
803
622
|
})]
|
|
804
623
|
}),
|
|
805
|
-
/* @__PURE__ */
|
|
806
|
-
className: "text-right
|
|
807
|
-
children: [/* @__PURE__ */
|
|
808
|
-
className: "text-sm font-semibold text-text-primary",
|
|
809
|
-
children:
|
|
810
|
-
}), /* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ q("div", {
|
|
625
|
+
className: "shrink-0 text-right",
|
|
626
|
+
children: [/* @__PURE__ */ K("p", {
|
|
627
|
+
className: "text-sm font-semibold text-text-primary tabular-nums",
|
|
628
|
+
children: o(e.total, { minimumFractionDigits: 0 })
|
|
629
|
+
}), /* @__PURE__ */ K("p", {
|
|
811
630
|
className: "text-xs text-text-secondary",
|
|
812
|
-
children:
|
|
631
|
+
children: ee(e.orderDate)
|
|
813
632
|
})]
|
|
814
633
|
})
|
|
815
634
|
]
|
|
816
635
|
}, e.id))
|
|
817
636
|
})]
|
|
818
637
|
}),
|
|
819
|
-
/* @__PURE__ */
|
|
820
|
-
className: "mb-8",
|
|
821
|
-
children: [/* @__PURE__ */ q("h2", {
|
|
822
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
823
|
-
children: D("kadaikodi.home.howItWorks", "How It Works")
|
|
824
|
-
}), /* @__PURE__ */ q("div", {
|
|
825
|
-
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
826
|
-
children: ee.map((e) => /* @__PURE__ */ J("div", {
|
|
827
|
-
className: "relative rounded-lg border border-border-subtle bg-bg-surface p-5 text-center",
|
|
828
|
-
children: [
|
|
829
|
-
/* @__PURE__ */ q("div", {
|
|
830
|
-
className: "absolute -top-3 left-1/2 -translate-x-1/2",
|
|
831
|
-
children: /* @__PURE__ */ q("span", {
|
|
832
|
-
className: "inline-flex h-6 w-6 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
|
|
833
|
-
children: e.step
|
|
834
|
-
})
|
|
835
|
-
}),
|
|
836
|
-
/* @__PURE__ */ q("div", {
|
|
837
|
-
className: "mt-2 flex justify-center text-text-secondary mb-3",
|
|
838
|
-
children: e.icon
|
|
839
|
-
}),
|
|
840
|
-
/* @__PURE__ */ q("h3", {
|
|
841
|
-
className: "text-sm font-semibold text-text-primary",
|
|
842
|
-
children: e.title
|
|
843
|
-
}),
|
|
844
|
-
/* @__PURE__ */ q("p", {
|
|
845
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
846
|
-
children: e.description
|
|
847
|
-
})
|
|
848
|
-
]
|
|
849
|
-
}, e.step))
|
|
850
|
-
})]
|
|
851
|
-
}),
|
|
852
|
-
/* @__PURE__ */ J("section", {
|
|
638
|
+
/* @__PURE__ */ q("section", {
|
|
853
639
|
className: "mb-8",
|
|
854
|
-
children: [/* @__PURE__ */
|
|
855
|
-
className: "text-lg font-semibold text-text-primary
|
|
856
|
-
children:
|
|
857
|
-
}), /* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ K("h2", {
|
|
641
|
+
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
642
|
+
children: A("kadaikodi.home.browseByCategory", "Browse by Category")
|
|
643
|
+
}), /* @__PURE__ */ K("div", {
|
|
858
644
|
className: "grid grid-cols-3 gap-3 sm:grid-cols-4 lg:grid-cols-5",
|
|
859
|
-
children:
|
|
645
|
+
children: X.map((e) => /* @__PURE__ */ q("button", {
|
|
860
646
|
type: "button",
|
|
861
|
-
onClick: () =>
|
|
862
|
-
className: "flex flex-col items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface p-4 text-center
|
|
863
|
-
children: [/* @__PURE__ */
|
|
647
|
+
onClick: () => h(`/customer/discover?category=${encodeURIComponent(e.label)}`),
|
|
648
|
+
className: "flex flex-col items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface p-4 text-center transition-all hover:border-border-strong hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
649
|
+
children: [/* @__PURE__ */ K("div", {
|
|
864
650
|
className: t("flex h-12 w-12 items-center justify-center rounded-full", e.color),
|
|
865
651
|
children: e.icon
|
|
866
|
-
}), /* @__PURE__ */
|
|
867
|
-
className: "text-xs font-medium text-text-primary
|
|
652
|
+
}), /* @__PURE__ */ K("span", {
|
|
653
|
+
className: "text-xs font-medium leading-tight text-text-primary",
|
|
868
654
|
children: e.label
|
|
869
655
|
})]
|
|
870
656
|
}, e.label))
|
|
871
657
|
})]
|
|
872
658
|
}),
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
className: "
|
|
875
|
-
children:
|
|
876
|
-
|
|
877
|
-
children: D("kadaikodi.home.platformStats", "Platform Stats")
|
|
878
|
-
}), /* @__PURE__ */ q("div", {
|
|
879
|
-
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
880
|
-
children: ne.map((e) => /* @__PURE__ */ J("div", {
|
|
881
|
-
className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
882
|
-
children: [/* @__PURE__ */ q("div", {
|
|
883
|
-
className: "flex h-10 w-10 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary shrink-0",
|
|
884
|
-
children: e.icon
|
|
885
|
-
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
886
|
-
className: "text-lg font-bold text-text-primary",
|
|
887
|
-
children: e.value
|
|
888
|
-
}), /* @__PURE__ */ q("p", {
|
|
889
|
-
className: "text-xs text-text-secondary",
|
|
890
|
-
children: e.label
|
|
891
|
-
})] })]
|
|
892
|
-
}, e.label))
|
|
893
|
-
})]
|
|
894
|
-
}),
|
|
895
|
-
/* @__PURE__ */ J("section", { children: [/* @__PURE__ */ q("h2", {
|
|
896
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
897
|
-
children: D("kadaikodi.home.recentActivity", "Recent Activity")
|
|
898
|
-
}), /* @__PURE__ */ q("div", {
|
|
899
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border",
|
|
900
|
-
children: te.map((e) => /* @__PURE__ */ J("div", {
|
|
901
|
-
className: "flex items-center gap-3 px-4 py-3",
|
|
902
|
-
children: [
|
|
903
|
-
/* @__PURE__ */ q("div", {
|
|
904
|
-
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken",
|
|
905
|
-
children: /* @__PURE__ */ q(m, { className: t("h-4 w-4", H[e.type] ?? "text-text-secondary") })
|
|
906
|
-
}),
|
|
907
|
-
/* @__PURE__ */ q("div", {
|
|
908
|
-
className: "flex-1 min-w-0",
|
|
909
|
-
children: /* @__PURE__ */ q("p", {
|
|
910
|
-
className: "text-sm text-text-primary truncate",
|
|
911
|
-
children: e.description
|
|
912
|
-
})
|
|
913
|
-
}),
|
|
914
|
-
/* @__PURE__ */ q("span", {
|
|
915
|
-
className: "text-xs text-text-secondary whitespace-nowrap",
|
|
916
|
-
children: e.time
|
|
917
|
-
})
|
|
918
|
-
]
|
|
919
|
-
}, e.id))
|
|
920
|
-
})] })
|
|
659
|
+
/* @__PURE__ */ K("p", {
|
|
660
|
+
className: "mt-2 text-center text-xs text-text-muted",
|
|
661
|
+
children: A("kadaikodi.home.footerNote", "RBAC & multi-tenancy inherited from the Burdenoff platform")
|
|
662
|
+
})
|
|
921
663
|
]
|
|
922
664
|
});
|
|
923
665
|
}
|
|
924
666
|
//#endregion
|
|
925
|
-
export {
|
|
667
|
+
export { Z as HomePage };
|
|
926
668
|
|
|
927
669
|
//# sourceMappingURL=HomePage.js.map
|