@burdenoff/microfe-coolandlovely 2026.624.1 → 2026.625.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/coolandlovely/components/EmptyState.js +17 -21
- package/dist/coolandlovely/components/EmptyState.js.map +1 -1
- package/dist/coolandlovely/components/InvestmentCard.js +25 -23
- package/dist/coolandlovely/components/InvestmentCard.js.map +1 -1
- package/dist/coolandlovely/components/MetricsCard.js +18 -12
- package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
- package/dist/coolandlovely/components/PageLayout.js +38 -19
- package/dist/coolandlovely/components/PageLayout.js.map +1 -1
- package/dist/coolandlovely/components/RatingDisplay.js +3 -3
- package/dist/coolandlovely/components/RatingDisplay.js.map +1 -1
- package/dist/coolandlovely/components/StatusBadge.js +36 -16
- package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
- package/dist/coolandlovely/pages/HomePage.js +219 -204
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +98 -92
- package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/coolandlovely/pages/admin/AdminDashboard.js +111 -77
- package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +49 -43
- package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +234 -229
- package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/coolandlovely/pages/admin/AdminProfilePage.js +67 -62
- package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +235 -230
- package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/coolandlovely/pages/admin/CartManagementPage.js +291 -286
- package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/coolandlovely/pages/admin/UserManagementPage.js +287 -282
- package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +108 -100
- package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +260 -255
- package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +596 -554
- package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +187 -182
- package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +229 -221
- package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +675 -674
- package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +525 -524
- package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +264 -266
- package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/coolandlovely/pages/common/HelpSupportPage.js +137 -137
- package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/coolandlovely/pages/common/NotificationCenterPage.js +81 -75
- package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/coolandlovely/pages/common/SettingsPage.js +745 -736
- package/dist/coolandlovely/pages/common/SettingsPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +394 -357
- package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/CartDetailPage.js +189 -186
- package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +222 -211
- package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/CheckoutPage.js +219 -222
- package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/CustomerDashboard.js +446 -404
- package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +525 -488
- package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +522 -513
- package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/FavoritesPage.js +94 -84
- package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +121 -112
- package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +312 -275
- package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +90 -84
- package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/ReviewsPage.js +99 -89
- package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +74 -68
- package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +317 -279
- package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +249 -243
- package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +87 -81
- package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/coolandlovely/pages/investor/InvestorDashboard.js +359 -323
- package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +115 -109
- package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +179 -146
- package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +397 -392
- package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +364 -327
- package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/coolandlovely/pages/worker/WorkerDashboard.js +580 -543
- package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +114 -109
- package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +115 -110
- package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +100 -95
- package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -5,39 +5,40 @@ import { MetricsCard as r } from "../components/MetricsCard.js";
|
|
|
5
5
|
import { StatusBadge as i } from "../components/StatusBadge.js";
|
|
6
6
|
import { EmptyState as a } from "../components/EmptyState.js";
|
|
7
7
|
import { useCoolAndLovelyApi as o } from "../hooks/useCoolAndLovelyApi.js";
|
|
8
|
-
import { formatCurrency as s, formatDistance as
|
|
9
|
-
import { useCallback as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import { Activity as
|
|
12
|
-
import { jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
8
|
+
import { formatCurrency as s, formatDistance as ee, formatRelativeTime as c } from "../utils/formatters.js";
|
|
9
|
+
import { useCallback as l, useMemo as u, useState as d } from "react";
|
|
10
|
+
import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { Activity as p, AlertCircle as m, ArrowRight as h, BadgeCheck as g, BarChart3 as _, CheckCircle2 as v, ChefHat as y, ClipboardList as b, Clock as x, FileText as S, GraduationCap as C, HandCoins as w, Heart as T, Home as E, IndianRupee as D, LayoutDashboard as O, Loader2 as k, MapPin as A, Package as j, Scissors as M, Search as N, Settings as P, Shirt as F, ShoppingBag as I, ShoppingCart as L, Sparkles as R, Star as z, Store as B, TrendingUp as V, Truck as H, Users as U, Wallet as W, Wrench as G } from "lucide-react";
|
|
12
|
+
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
13
|
+
import { EmphasisPanel as Y, GlassCard as X, GradientText as Z, PagePurpose as Q } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
//#region src/coolandlovely/pages/HomePage.tsx
|
|
14
|
-
var
|
|
15
|
+
var $ = {
|
|
15
16
|
customer: [
|
|
16
17
|
{
|
|
17
18
|
label: "Discover Services",
|
|
18
19
|
description: "Browse carts near you",
|
|
19
|
-
icon: /* @__PURE__ */ q(
|
|
20
|
+
icon: /* @__PURE__ */ q(N, { className: "h-5 w-5" }),
|
|
20
21
|
path: "/customer/carts",
|
|
21
|
-
color: "bg-blue-
|
|
22
|
+
color: "bg-accent-blue-subtle/10 text-accent-blue"
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
25
|
label: "My Orders",
|
|
25
26
|
description: "Track your orders",
|
|
26
|
-
icon: /* @__PURE__ */ q(
|
|
27
|
+
icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
|
|
27
28
|
path: "/customer/orders",
|
|
28
|
-
color: "bg-
|
|
29
|
+
color: "bg-status-success-bg-subtle/10 text-status-success-text"
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
label: "Favorites",
|
|
32
33
|
description: "Your saved carts",
|
|
33
|
-
icon: /* @__PURE__ */ q(
|
|
34
|
+
icon: /* @__PURE__ */ q(T, { className: "h-5 w-5" }),
|
|
34
35
|
path: "/customer/favorites",
|
|
35
|
-
color: "bg-pink-
|
|
36
|
+
color: "bg-accent-pink-subtle/10 text-accent-pink"
|
|
36
37
|
},
|
|
37
38
|
{
|
|
38
39
|
label: "Settings",
|
|
39
40
|
description: "Manage preferences",
|
|
40
|
-
icon: /* @__PURE__ */ q(
|
|
41
|
+
icon: /* @__PURE__ */ q(P, { className: "h-5 w-5" }),
|
|
41
42
|
path: "/settings",
|
|
42
43
|
color: "bg-bg-sunken text-text-secondary"
|
|
43
44
|
}
|
|
@@ -46,149 +47,149 @@ var Y = {
|
|
|
46
47
|
{
|
|
47
48
|
label: "My Cart",
|
|
48
49
|
description: "Manage your cart",
|
|
49
|
-
icon: /* @__PURE__ */ q(
|
|
50
|
+
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
50
51
|
path: "/owner/dashboard",
|
|
51
|
-
color: "bg-purple-
|
|
52
|
+
color: "bg-accent-purple-subtle/10 text-accent-purple"
|
|
52
53
|
},
|
|
53
54
|
{
|
|
54
55
|
label: "Orders",
|
|
55
56
|
description: "Incoming orders",
|
|
56
|
-
icon: /* @__PURE__ */ q(
|
|
57
|
+
icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
|
|
57
58
|
path: "/owner/orders",
|
|
58
|
-
color: "bg-blue-
|
|
59
|
+
color: "bg-accent-blue-subtle/10 text-accent-blue"
|
|
59
60
|
},
|
|
60
61
|
{
|
|
61
62
|
label: "Analytics",
|
|
62
63
|
description: "Revenue & insights",
|
|
63
|
-
icon: /* @__PURE__ */ q(
|
|
64
|
+
icon: /* @__PURE__ */ q(_, { className: "h-5 w-5" }),
|
|
64
65
|
path: "/owner/analytics",
|
|
65
|
-
color: "bg-
|
|
66
|
+
color: "bg-status-success-bg-subtle/10 text-status-success-text"
|
|
66
67
|
},
|
|
67
68
|
{
|
|
68
69
|
label: "Staff",
|
|
69
70
|
description: "Manage workers",
|
|
70
|
-
icon: /* @__PURE__ */ q(
|
|
71
|
+
icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" }),
|
|
71
72
|
path: "/owner/staff",
|
|
72
|
-
color: "bg-orange-
|
|
73
|
+
color: "bg-accent-orange-subtle/10 text-accent-orange"
|
|
73
74
|
}
|
|
74
75
|
],
|
|
75
76
|
worker: [
|
|
76
77
|
{
|
|
77
78
|
label: "My Tasks",
|
|
78
79
|
description: "View assigned tasks",
|
|
79
|
-
icon: /* @__PURE__ */ q(
|
|
80
|
+
icon: /* @__PURE__ */ q(b, { className: "h-5 w-5" }),
|
|
80
81
|
path: "/worker/dashboard",
|
|
81
|
-
color: "bg-orange-
|
|
82
|
+
color: "bg-accent-orange-subtle/10 text-accent-orange"
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
85
|
label: "Schedule",
|
|
85
86
|
description: "View shifts",
|
|
86
|
-
icon: /* @__PURE__ */ q(
|
|
87
|
+
icon: /* @__PURE__ */ q(x, { className: "h-5 w-5" }),
|
|
87
88
|
path: "/worker/schedule",
|
|
88
|
-
color: "bg-blue-
|
|
89
|
+
color: "bg-accent-blue-subtle/10 text-accent-blue"
|
|
89
90
|
},
|
|
90
91
|
{
|
|
91
92
|
label: "Earnings",
|
|
92
93
|
description: "Track pay",
|
|
93
|
-
icon: /* @__PURE__ */ q(
|
|
94
|
+
icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" }),
|
|
94
95
|
path: "/worker/earnings",
|
|
95
|
-
color: "bg-
|
|
96
|
+
color: "bg-status-success-bg-subtle/10 text-status-success-text"
|
|
96
97
|
},
|
|
97
98
|
{
|
|
98
99
|
label: "Performance",
|
|
99
100
|
description: "Ratings & stats",
|
|
100
|
-
icon: /* @__PURE__ */ q(
|
|
101
|
+
icon: /* @__PURE__ */ q(z, { className: "h-5 w-5" }),
|
|
101
102
|
path: "/worker/performance",
|
|
102
|
-
color: "bg-
|
|
103
|
+
color: "bg-status-warning-bg-subtle/10 text-status-warning-text"
|
|
103
104
|
}
|
|
104
105
|
],
|
|
105
106
|
investor: [
|
|
106
107
|
{
|
|
107
108
|
label: "Portfolio",
|
|
108
109
|
description: "Your investments",
|
|
109
|
-
icon: /* @__PURE__ */ q(
|
|
110
|
+
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
|
|
110
111
|
path: "/investor/dashboard",
|
|
111
|
-
color: "bg-
|
|
112
|
+
color: "bg-status-success-bg-subtle/10 text-status-success-text"
|
|
112
113
|
},
|
|
113
114
|
{
|
|
114
115
|
label: "Opportunities",
|
|
115
116
|
description: "New investments",
|
|
116
|
-
icon: /* @__PURE__ */ q(
|
|
117
|
+
icon: /* @__PURE__ */ q(w, { className: "h-5 w-5" }),
|
|
117
118
|
path: "/investor/opportunities",
|
|
118
|
-
color: "bg-blue-
|
|
119
|
+
color: "bg-accent-blue-subtle/10 text-accent-blue"
|
|
119
120
|
},
|
|
120
121
|
{
|
|
121
122
|
label: "Returns",
|
|
122
123
|
description: "Earnings history",
|
|
123
|
-
icon: /* @__PURE__ */ q(
|
|
124
|
+
icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
|
|
124
125
|
path: "/investor/returns",
|
|
125
|
-
color: "bg-
|
|
126
|
+
color: "bg-status-success-bg-subtle/10 text-status-success-text"
|
|
126
127
|
},
|
|
127
128
|
{
|
|
128
129
|
label: "Reports",
|
|
129
130
|
description: "Performance reports",
|
|
130
|
-
icon: /* @__PURE__ */ q(
|
|
131
|
+
icon: /* @__PURE__ */ q(S, { className: "h-5 w-5" }),
|
|
131
132
|
path: "/investor/reports",
|
|
132
|
-
color: "bg-purple-
|
|
133
|
+
color: "bg-accent-purple-subtle/10 text-accent-purple"
|
|
133
134
|
}
|
|
134
135
|
],
|
|
135
136
|
admin: [
|
|
136
137
|
{
|
|
137
138
|
label: "Dashboard",
|
|
138
139
|
description: "Platform overview",
|
|
139
|
-
icon: /* @__PURE__ */ q(
|
|
140
|
+
icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
|
|
140
141
|
path: "/admin/dashboard",
|
|
141
|
-
color: "bg-
|
|
142
|
+
color: "bg-status-error-bg-subtle/10 text-status-error-text"
|
|
142
143
|
},
|
|
143
144
|
{
|
|
144
145
|
label: "Users",
|
|
145
146
|
description: "Manage accounts",
|
|
146
|
-
icon: /* @__PURE__ */ q(
|
|
147
|
+
icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" }),
|
|
147
148
|
path: "/admin/users",
|
|
148
|
-
color: "bg-blue-
|
|
149
|
+
color: "bg-accent-blue-subtle/10 text-accent-blue"
|
|
149
150
|
},
|
|
150
151
|
{
|
|
151
152
|
label: "Carts",
|
|
152
153
|
description: "Approve & manage",
|
|
153
|
-
icon: /* @__PURE__ */ q(
|
|
154
|
+
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
154
155
|
path: "/admin/carts",
|
|
155
|
-
color: "bg-purple-
|
|
156
|
+
color: "bg-accent-purple-subtle/10 text-accent-purple"
|
|
156
157
|
},
|
|
157
158
|
{
|
|
158
159
|
label: "Analytics",
|
|
159
160
|
description: "Revenue reports",
|
|
160
|
-
icon: /* @__PURE__ */ q(
|
|
161
|
+
icon: /* @__PURE__ */ q(_, { className: "h-5 w-5" }),
|
|
161
162
|
path: "/admin/analytics",
|
|
162
|
-
color: "bg-
|
|
163
|
+
color: "bg-status-success-bg-subtle/10 text-status-success-text"
|
|
163
164
|
}
|
|
164
165
|
]
|
|
165
166
|
};
|
|
166
|
-
function
|
|
167
|
+
function te(e, t, n) {
|
|
167
168
|
switch (e) {
|
|
168
169
|
case "customer": return [
|
|
169
170
|
{
|
|
170
|
-
icon: /* @__PURE__ */ q(
|
|
171
|
+
icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
|
|
171
172
|
value: t.length.toString(),
|
|
172
173
|
label: "Total Orders",
|
|
173
174
|
trend: "up",
|
|
174
175
|
trendValue: "+2 this week"
|
|
175
176
|
},
|
|
176
177
|
{
|
|
177
|
-
icon: /* @__PURE__ */ q(
|
|
178
|
+
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
178
179
|
value: (n?.activeProviders ?? 0).toString(),
|
|
179
180
|
label: "Nearby Providers",
|
|
180
181
|
trend: "up",
|
|
181
182
|
trendValue: "+3"
|
|
182
183
|
},
|
|
183
184
|
{
|
|
184
|
-
icon: /* @__PURE__ */ q(
|
|
185
|
+
icon: /* @__PURE__ */ q(z, { className: "h-5 w-5" }),
|
|
185
186
|
value: (n?.avgRating ?? 0).toFixed(1),
|
|
186
187
|
label: "Avg. Rating",
|
|
187
188
|
trend: "up",
|
|
188
189
|
trendValue: "+0.1"
|
|
189
190
|
},
|
|
190
191
|
{
|
|
191
|
-
icon: /* @__PURE__ */ q(
|
|
192
|
+
icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
|
|
192
193
|
value: s(t.reduce((e, t) => e + t.total, 0), { minimumFractionDigits: 0 }),
|
|
193
194
|
label: "Total Spent",
|
|
194
195
|
trend: "neutral",
|
|
@@ -197,28 +198,28 @@ function X(e, t, n) {
|
|
|
197
198
|
];
|
|
198
199
|
case "cart_owner": return [
|
|
199
200
|
{
|
|
200
|
-
icon: /* @__PURE__ */ q(
|
|
201
|
+
icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
|
|
201
202
|
value: "48",
|
|
202
203
|
label: "Orders Today",
|
|
203
204
|
trend: "up",
|
|
204
205
|
trendValue: "+12%"
|
|
205
206
|
},
|
|
206
207
|
{
|
|
207
|
-
icon: /* @__PURE__ */ q(
|
|
208
|
+
icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
|
|
208
209
|
value: s(12850, { minimumFractionDigits: 0 }),
|
|
209
210
|
label: "Today's Revenue",
|
|
210
211
|
trend: "up",
|
|
211
212
|
trendValue: "+8%"
|
|
212
213
|
},
|
|
213
214
|
{
|
|
214
|
-
icon: /* @__PURE__ */ q(
|
|
215
|
+
icon: /* @__PURE__ */ q(z, { className: "h-5 w-5" }),
|
|
215
216
|
value: "4.6",
|
|
216
217
|
label: "Cart Rating",
|
|
217
218
|
trend: "up",
|
|
218
219
|
trendValue: "+0.2"
|
|
219
220
|
},
|
|
220
221
|
{
|
|
221
|
-
icon: /* @__PURE__ */ q(
|
|
222
|
+
icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" }),
|
|
222
223
|
value: "5",
|
|
223
224
|
label: "Active Staff",
|
|
224
225
|
trend: "neutral",
|
|
@@ -227,28 +228,28 @@ function X(e, t, n) {
|
|
|
227
228
|
];
|
|
228
229
|
case "worker": return [
|
|
229
230
|
{
|
|
230
|
-
icon: /* @__PURE__ */ q(
|
|
231
|
+
icon: /* @__PURE__ */ q(b, { className: "h-5 w-5" }),
|
|
231
232
|
value: "5",
|
|
232
233
|
label: "Tasks Today",
|
|
233
234
|
trend: "up",
|
|
234
235
|
trendValue: "+2"
|
|
235
236
|
},
|
|
236
237
|
{
|
|
237
|
-
icon: /* @__PURE__ */ q(
|
|
238
|
+
icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
|
|
238
239
|
value: s(425, { minimumFractionDigits: 0 }),
|
|
239
240
|
label: "Today's Earnings",
|
|
240
241
|
trend: "up",
|
|
241
242
|
trendValue: "+15%"
|
|
242
243
|
},
|
|
243
244
|
{
|
|
244
|
-
icon: /* @__PURE__ */ q(
|
|
245
|
+
icon: /* @__PURE__ */ q(z, { className: "h-5 w-5" }),
|
|
245
246
|
value: "4.7",
|
|
246
247
|
label: "Rating",
|
|
247
248
|
trend: "up",
|
|
248
249
|
trendValue: "+0.1"
|
|
249
250
|
},
|
|
250
251
|
{
|
|
251
|
-
icon: /* @__PURE__ */ q(
|
|
252
|
+
icon: /* @__PURE__ */ q(v, { className: "h-5 w-5" }),
|
|
252
253
|
value: "96.8%",
|
|
253
254
|
label: "Completion Rate",
|
|
254
255
|
trend: "up",
|
|
@@ -257,28 +258,28 @@ function X(e, t, n) {
|
|
|
257
258
|
];
|
|
258
259
|
case "investor": return [
|
|
259
260
|
{
|
|
260
|
-
icon: /* @__PURE__ */ q(
|
|
261
|
+
icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
|
|
261
262
|
value: "3",
|
|
262
263
|
label: "Active Investments",
|
|
263
264
|
trend: "up",
|
|
264
265
|
trendValue: "+1"
|
|
265
266
|
},
|
|
266
267
|
{
|
|
267
|
-
icon: /* @__PURE__ */ q(
|
|
268
|
+
icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
|
|
268
269
|
value: s(45e4, { minimumFractionDigits: 0 }),
|
|
269
270
|
label: "Total Invested",
|
|
270
271
|
trend: "up",
|
|
271
272
|
trendValue: ""
|
|
272
273
|
},
|
|
273
274
|
{
|
|
274
|
-
icon: /* @__PURE__ */ q(
|
|
275
|
+
icon: /* @__PURE__ */ q(w, { className: "h-5 w-5" }),
|
|
275
276
|
value: "16.5%",
|
|
276
277
|
label: "Avg. Returns",
|
|
277
278
|
trend: "up",
|
|
278
279
|
trendValue: "+2.1%"
|
|
279
280
|
},
|
|
280
281
|
{
|
|
281
|
-
icon: /* @__PURE__ */ q(
|
|
282
|
+
icon: /* @__PURE__ */ q(_, { className: "h-5 w-5" }),
|
|
282
283
|
value: s(74250, { minimumFractionDigits: 0 }),
|
|
283
284
|
label: "Total Returns",
|
|
284
285
|
trend: "up",
|
|
@@ -287,28 +288,28 @@ function X(e, t, n) {
|
|
|
287
288
|
];
|
|
288
289
|
default: return [
|
|
289
290
|
{
|
|
290
|
-
icon: /* @__PURE__ */ q(
|
|
291
|
+
icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" }),
|
|
291
292
|
value: (n?.activeCustomers ?? 0).toLocaleString("en-IN"),
|
|
292
293
|
label: "Active Customers",
|
|
293
294
|
trend: "up",
|
|
294
295
|
trendValue: "+50"
|
|
295
296
|
},
|
|
296
297
|
{
|
|
297
|
-
icon: /* @__PURE__ */ q(
|
|
298
|
+
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
|
|
298
299
|
value: (n?.activeProviders ?? 0).toString(),
|
|
299
300
|
label: "Service Providers",
|
|
300
301
|
trend: "up",
|
|
301
302
|
trendValue: "+3"
|
|
302
303
|
},
|
|
303
304
|
{
|
|
304
|
-
icon: /* @__PURE__ */ q(
|
|
305
|
+
icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
|
|
305
306
|
value: (n?.totalOrders ?? 0).toLocaleString("en-IN"),
|
|
306
307
|
label: "Total Orders",
|
|
307
308
|
trend: "up",
|
|
308
309
|
trendValue: "+12%"
|
|
309
310
|
},
|
|
310
311
|
{
|
|
311
|
-
icon: /* @__PURE__ */ q(
|
|
312
|
+
icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
|
|
312
313
|
value: s(n?.totalRevenue ?? 0, { minimumFractionDigits: 0 }),
|
|
313
314
|
label: "Total Revenue",
|
|
314
315
|
trend: "up",
|
|
@@ -317,78 +318,78 @@ function X(e, t, n) {
|
|
|
317
318
|
];
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
|
-
var
|
|
321
|
+
var ne = [
|
|
321
322
|
{
|
|
322
323
|
label: "Food & Beverage",
|
|
323
|
-
icon: /* @__PURE__ */ q(
|
|
324
|
-
color: "bg-orange-
|
|
324
|
+
icon: /* @__PURE__ */ q(y, { className: "h-6 w-6" }),
|
|
325
|
+
color: "bg-accent-orange-subtle/10 text-accent-orange"
|
|
325
326
|
},
|
|
326
327
|
{
|
|
327
328
|
label: "Personal Care & Beauty",
|
|
328
|
-
icon: /* @__PURE__ */ q(
|
|
329
|
-
color: "bg-pink-
|
|
329
|
+
icon: /* @__PURE__ */ q(M, { className: "h-6 w-6" }),
|
|
330
|
+
color: "bg-accent-pink-subtle/10 text-accent-pink"
|
|
330
331
|
},
|
|
331
332
|
{
|
|
332
333
|
label: "Repair & Maintenance",
|
|
333
|
-
icon: /* @__PURE__ */ q(
|
|
334
|
-
color: "bg-blue-
|
|
334
|
+
icon: /* @__PURE__ */ q(G, { className: "h-6 w-6" }),
|
|
335
|
+
color: "bg-accent-blue-subtle/10 text-accent-blue"
|
|
335
336
|
},
|
|
336
337
|
{
|
|
337
338
|
label: "Home Services",
|
|
338
|
-
icon: /* @__PURE__ */ q(
|
|
339
|
-
color: "bg-
|
|
339
|
+
icon: /* @__PURE__ */ q(E, { className: "h-6 w-6" }),
|
|
340
|
+
color: "bg-status-success-bg-subtle/10 text-status-success-text"
|
|
340
341
|
},
|
|
341
342
|
{
|
|
342
343
|
label: "Clothing & Fashion",
|
|
343
|
-
icon: /* @__PURE__ */ q(
|
|
344
|
-
color: "bg-purple-
|
|
344
|
+
icon: /* @__PURE__ */ q(F, { className: "h-6 w-6" }),
|
|
345
|
+
color: "bg-accent-purple-subtle/10 text-accent-purple"
|
|
345
346
|
},
|
|
346
347
|
{
|
|
347
348
|
label: "Health & Wellness",
|
|
348
|
-
icon: /* @__PURE__ */ q(
|
|
349
|
-
color: "bg-
|
|
349
|
+
icon: /* @__PURE__ */ q(T, { className: "h-6 w-6" }),
|
|
350
|
+
color: "bg-status-error-bg-subtle/10 text-status-error-text"
|
|
350
351
|
},
|
|
351
352
|
{
|
|
352
353
|
label: "Education & Skills",
|
|
353
|
-
icon: /* @__PURE__ */ q(
|
|
354
|
-
color: "bg-
|
|
354
|
+
icon: /* @__PURE__ */ q(C, { className: "h-6 w-6" }),
|
|
355
|
+
color: "bg-status-warning-bg-subtle/10 text-status-warning-text"
|
|
355
356
|
},
|
|
356
357
|
{
|
|
357
358
|
label: "Retail & Merchandise",
|
|
358
|
-
icon: /* @__PURE__ */ q(
|
|
359
|
-
color: "bg-indigo-
|
|
359
|
+
icon: /* @__PURE__ */ q(j, { className: "h-6 w-6" }),
|
|
360
|
+
color: "bg-accent-indigo-subtle/10 text-accent-indigo"
|
|
360
361
|
},
|
|
361
362
|
{
|
|
362
363
|
label: "Grocery & Essentials",
|
|
363
|
-
icon: /* @__PURE__ */ q(
|
|
364
|
-
color: "bg-
|
|
364
|
+
icon: /* @__PURE__ */ q(L, { className: "h-6 w-6" }),
|
|
365
|
+
color: "bg-status-success-bg-subtle/10 text-status-success-text"
|
|
365
366
|
}
|
|
366
|
-
],
|
|
367
|
+
], re = [
|
|
367
368
|
{
|
|
368
369
|
step: 1,
|
|
369
370
|
title: "Browse Services",
|
|
370
371
|
description: "Discover local service providers and carts near you.",
|
|
371
|
-
icon: /* @__PURE__ */ q(
|
|
372
|
+
icon: /* @__PURE__ */ q(N, { className: "h-6 w-6" })
|
|
372
373
|
},
|
|
373
374
|
{
|
|
374
375
|
step: 2,
|
|
375
376
|
title: "Place an Order",
|
|
376
377
|
description: "Select items or services and place your order seamlessly.",
|
|
377
|
-
icon: /* @__PURE__ */ q(
|
|
378
|
+
icon: /* @__PURE__ */ q(I, { className: "h-6 w-6" })
|
|
378
379
|
},
|
|
379
380
|
{
|
|
380
381
|
step: 3,
|
|
381
382
|
title: "Track in Real-time",
|
|
382
383
|
description: "Get live updates on your order from confirmation to delivery.",
|
|
383
|
-
icon: /* @__PURE__ */ q(
|
|
384
|
+
icon: /* @__PURE__ */ q(H, { className: "h-6 w-6" })
|
|
384
385
|
},
|
|
385
386
|
{
|
|
386
387
|
step: 4,
|
|
387
388
|
title: "Rate & Review",
|
|
388
389
|
description: "Share your experience and help others find great services.",
|
|
389
|
-
icon: /* @__PURE__ */ q(
|
|
390
|
+
icon: /* @__PURE__ */ q(z, { className: "h-6 w-6" })
|
|
390
391
|
}
|
|
391
|
-
],
|
|
392
|
+
], ie = [
|
|
392
393
|
{
|
|
393
394
|
id: "ha-1",
|
|
394
395
|
description: "New order placed at Dosa Express",
|
|
@@ -419,113 +420,126 @@ var Z = [
|
|
|
419
420
|
time: "5 hours ago",
|
|
420
421
|
type: "order"
|
|
421
422
|
}
|
|
422
|
-
],
|
|
423
|
+
], ae = [
|
|
423
424
|
{
|
|
424
425
|
label: "Service Providers",
|
|
425
426
|
value: "21+",
|
|
426
|
-
icon: /* @__PURE__ */ q(
|
|
427
|
+
icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" })
|
|
427
428
|
},
|
|
428
429
|
{
|
|
429
430
|
label: "Categories",
|
|
430
431
|
value: "9",
|
|
431
|
-
icon: /* @__PURE__ */ q(
|
|
432
|
+
icon: /* @__PURE__ */ q(j, { className: "h-5 w-5" })
|
|
432
433
|
},
|
|
433
434
|
{
|
|
434
435
|
label: "Happy Customers",
|
|
435
436
|
value: "534+",
|
|
436
|
-
icon: /* @__PURE__ */ q(
|
|
437
|
+
icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" })
|
|
437
438
|
},
|
|
438
439
|
{
|
|
439
440
|
label: "Orders Completed",
|
|
440
441
|
value: "1,247+",
|
|
441
|
-
icon: /* @__PURE__ */ q(
|
|
442
|
+
icon: /* @__PURE__ */ q(v, { className: "h-5 w-5" })
|
|
442
443
|
}
|
|
443
444
|
];
|
|
444
|
-
function
|
|
445
|
-
let { navigateTo:
|
|
446
|
-
let n =
|
|
445
|
+
function oe() {
|
|
446
|
+
let { navigateTo: _, currentUser: v } = e(), { t: y } = f(), [b, S] = d(""), { providers: C, orders: w, dashboardStats: T } = o(), E = l((e, t) => {
|
|
447
|
+
let n = y(e);
|
|
447
448
|
return n === e ? t : n;
|
|
448
|
-
}, [
|
|
449
|
-
customer:
|
|
450
|
-
cart_owner:
|
|
451
|
-
worker:
|
|
452
|
-
investor:
|
|
453
|
-
admin:
|
|
454
|
-
},
|
|
455
|
-
customer:
|
|
456
|
-
cart_owner:
|
|
457
|
-
worker:
|
|
458
|
-
investor:
|
|
459
|
-
admin:
|
|
460
|
-
},
|
|
461
|
-
let e = (
|
|
462
|
-
if (
|
|
463
|
-
let t =
|
|
449
|
+
}, [y]), O = v?.firstName ?? v?.name ?? "there", j = v?.role ?? "customer", M = {
|
|
450
|
+
customer: E("coolandlovely.home.role.customer", "Customer"),
|
|
451
|
+
cart_owner: E("coolandlovely.home.role.cartOwner", "Cart Owner"),
|
|
452
|
+
worker: E("coolandlovely.home.role.worker", "Worker"),
|
|
453
|
+
investor: E("coolandlovely.home.role.investor", "Investor"),
|
|
454
|
+
admin: E("coolandlovely.home.role.admin", "Administrator")
|
|
455
|
+
}, P = {
|
|
456
|
+
customer: E("coolandlovely.home.greeting.customer", "Discover amazing services near you"),
|
|
457
|
+
cart_owner: E("coolandlovely.home.greeting.cartOwner", "Manage your business and grow"),
|
|
458
|
+
worker: E("coolandlovely.home.greeting.worker", "Check your tasks and earnings"),
|
|
459
|
+
investor: E("coolandlovely.home.greeting.investor", "Track your investments and returns"),
|
|
460
|
+
admin: E("coolandlovely.home.greeting.admin", "Monitor and manage the platform")
|
|
461
|
+
}, F = $[j] ?? $.customer, I = te(j, w.data ?? [], T.data), L = u(() => {
|
|
462
|
+
let e = (C.data ?? []).filter((e) => e.isOpen);
|
|
463
|
+
if (b) {
|
|
464
|
+
let t = b.toLowerCase();
|
|
464
465
|
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.category.toLowerCase().includes(t));
|
|
465
466
|
}
|
|
466
467
|
return e.sort((e, t) => t.rating - e.rating).slice(0, 6);
|
|
467
|
-
}, [
|
|
468
|
-
order: "text-
|
|
469
|
-
review: "text-
|
|
470
|
-
investment: "text-
|
|
471
|
-
cart: "text-
|
|
472
|
-
},
|
|
473
|
-
return
|
|
474
|
-
title:
|
|
468
|
+
}, [C.data, b]), B = u(() => [...w.data ?? []].sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime()).slice(0, 3), [w.data]), V = {
|
|
469
|
+
order: "text-accent-blue",
|
|
470
|
+
review: "text-status-warning-text",
|
|
471
|
+
investment: "text-status-success-text",
|
|
472
|
+
cart: "text-accent-purple"
|
|
473
|
+
}, H = (w.data ?? []).length === 0 && !w.isLoading, U = C.isLoading || w.isLoading || T.isLoading, W = C.isError || w.isError || T.isError;
|
|
474
|
+
return U ? /* @__PURE__ */ q(n, {
|
|
475
|
+
title: E("coolandlovely.common.loading", "Loading..."),
|
|
475
476
|
children: /* @__PURE__ */ q("div", {
|
|
476
477
|
className: "flex h-[60vh] items-center justify-center",
|
|
477
|
-
children: /* @__PURE__ */ q(
|
|
478
|
+
children: /* @__PURE__ */ q(k, { className: "h-8 w-8 animate-spin text-primary" })
|
|
478
479
|
})
|
|
479
|
-
}) :
|
|
480
|
-
title:
|
|
480
|
+
}) : W ? /* @__PURE__ */ q(n, {
|
|
481
|
+
title: E("coolandlovely.common.error", "Error"),
|
|
481
482
|
children: /* @__PURE__ */ J("div", {
|
|
482
483
|
className: "flex h-[60vh] flex-col items-center justify-center gap-4",
|
|
483
484
|
children: [
|
|
484
|
-
/* @__PURE__ */ q(
|
|
485
|
+
/* @__PURE__ */ q(m, { className: "h-12 w-12 text-status-error-text" }),
|
|
485
486
|
/* @__PURE__ */ q("h2", {
|
|
486
487
|
className: "text-xl font-semibold",
|
|
487
|
-
children:
|
|
488
|
+
children: E("coolandlovely.common.errorLoading", "Error loading data")
|
|
488
489
|
}),
|
|
489
490
|
/* @__PURE__ */ q("p", {
|
|
490
491
|
className: "text-text-secondary",
|
|
491
|
-
children:
|
|
492
|
+
children: E("coolandlovely.common.tryAgain", "Please try again later.")
|
|
492
493
|
})
|
|
493
494
|
]
|
|
494
495
|
})
|
|
495
496
|
}) : /* @__PURE__ */ J(n, {
|
|
496
|
-
|
|
497
|
-
|
|
497
|
+
hero: !0,
|
|
498
|
+
title: /* @__PURE__ */ J(K, { children: [
|
|
499
|
+
E("coolandlovely.home.hello", "Hello"),
|
|
500
|
+
",",
|
|
501
|
+
" ",
|
|
502
|
+
/* @__PURE__ */ q(Z, { children: O }),
|
|
503
|
+
"!"
|
|
504
|
+
] }),
|
|
505
|
+
description: P[j],
|
|
498
506
|
children: [
|
|
499
|
-
|
|
500
|
-
className: "mb-6
|
|
507
|
+
/* @__PURE__ */ q(Q, {
|
|
508
|
+
className: "mb-6",
|
|
509
|
+
icon: /* @__PURE__ */ q(R, { className: "h-4 w-4" }),
|
|
510
|
+
children: E("coolandlovely.home.purpose", "Your starting point on CoolAndLovely. Search nearby carts and services, jump into the actions that matter for your role, and pick up recent orders and recommendations — everything you need to get going is one tap away from here.")
|
|
511
|
+
}),
|
|
512
|
+
H && /* @__PURE__ */ q(Y, {
|
|
513
|
+
className: "mb-6 p-6",
|
|
501
514
|
children: /* @__PURE__ */ J("div", {
|
|
502
515
|
className: "flex items-start gap-4",
|
|
503
516
|
children: [/* @__PURE__ */ q("div", {
|
|
504
517
|
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10",
|
|
505
|
-
children: /* @__PURE__ */ q(
|
|
518
|
+
children: /* @__PURE__ */ q(R, { className: "h-6 w-6 text-primary" })
|
|
506
519
|
}), /* @__PURE__ */ J("div", {
|
|
507
520
|
className: "flex-1",
|
|
508
521
|
children: [
|
|
509
522
|
/* @__PURE__ */ q("h2", {
|
|
510
523
|
className: "text-lg font-semibold text-text-primary",
|
|
511
|
-
children:
|
|
524
|
+
children: E("coolandlovely.home.welcomeTitle", "Welcome to CoolAndLovely!")
|
|
512
525
|
}),
|
|
513
526
|
/* @__PURE__ */ q("p", {
|
|
514
527
|
className: "mt-1 text-sm text-text-secondary",
|
|
515
|
-
children:
|
|
528
|
+
children: E("coolandlovely.home.welcomeDescription", "Your local services marketplace. Start by exploring service providers near you or browse categories to find what you need.")
|
|
516
529
|
}),
|
|
517
530
|
/* @__PURE__ */ J("button", {
|
|
518
531
|
type: "button",
|
|
519
|
-
onClick: () =>
|
|
532
|
+
onClick: () => _("/customer/carts"),
|
|
520
533
|
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/90 transition-colors",
|
|
521
|
-
children: [/* @__PURE__ */ q(
|
|
534
|
+
children: [/* @__PURE__ */ q(N, { className: "h-4 w-4" }), E("coolandlovely.home.exploreServices", "Explore Services")]
|
|
522
535
|
})
|
|
523
536
|
]
|
|
524
537
|
})]
|
|
525
538
|
})
|
|
526
539
|
}),
|
|
527
|
-
/* @__PURE__ */ q(
|
|
528
|
-
|
|
540
|
+
/* @__PURE__ */ q(X, {
|
|
541
|
+
treatment: "glass",
|
|
542
|
+
className: "mb-6 p-6",
|
|
529
543
|
children: /* @__PURE__ */ J("div", {
|
|
530
544
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
531
545
|
children: [/* @__PURE__ */ J("div", { children: [
|
|
@@ -533,30 +547,30 @@ function te() {
|
|
|
533
547
|
className: "flex items-center gap-2 mb-1",
|
|
534
548
|
children: /* @__PURE__ */ J("span", {
|
|
535
549
|
className: "inline-flex items-center rounded-full bg-action-primary-bg/10 px-2.5 py-0.5 text-xs font-medium text-primary",
|
|
536
|
-
children: [/* @__PURE__ */ q(
|
|
550
|
+
children: [/* @__PURE__ */ q(g, { className: "mr-1 h-3 w-3" }), M[j]]
|
|
537
551
|
})
|
|
538
552
|
}),
|
|
539
553
|
/* @__PURE__ */ J("h2", {
|
|
540
554
|
className: "text-xl font-bold text-text-primary",
|
|
541
555
|
children: [
|
|
542
|
-
|
|
556
|
+
E("coolandlovely.home.good", "Good"),
|
|
543
557
|
" ",
|
|
544
|
-
(/* @__PURE__ */ new Date()).getHours() < 12 ?
|
|
558
|
+
(/* @__PURE__ */ new Date()).getHours() < 12 ? E("coolandlovely.home.time.morning", "morning") : (/* @__PURE__ */ new Date()).getHours() < 17 ? E("coolandlovely.home.time.afternoon", "afternoon") : E("coolandlovely.home.time.evening", "evening"),
|
|
545
559
|
", ",
|
|
546
|
-
|
|
560
|
+
O
|
|
547
561
|
]
|
|
548
562
|
}),
|
|
549
563
|
/* @__PURE__ */ q("p", {
|
|
550
564
|
className: "mt-1 text-sm text-text-secondary",
|
|
551
|
-
children:
|
|
565
|
+
children: P[j]
|
|
552
566
|
})
|
|
553
567
|
] }), /* @__PURE__ */ J("div", {
|
|
554
568
|
className: "relative w-full sm:w-72",
|
|
555
|
-
children: [/* @__PURE__ */ q(
|
|
569
|
+
children: [/* @__PURE__ */ q(N, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ q("input", {
|
|
556
570
|
type: "text",
|
|
557
|
-
placeholder:
|
|
558
|
-
value:
|
|
559
|
-
onChange: (e) =>
|
|
571
|
+
placeholder: E("coolandlovely.home.searchPlaceholder", "Search services, carts..."),
|
|
572
|
+
value: b,
|
|
573
|
+
onChange: (e) => S(e.target.value),
|
|
560
574
|
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)]"
|
|
561
575
|
})]
|
|
562
576
|
})]
|
|
@@ -566,10 +580,11 @@ function te() {
|
|
|
566
580
|
className: "mb-8",
|
|
567
581
|
children: [/* @__PURE__ */ q("h2", {
|
|
568
582
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
569
|
-
children:
|
|
583
|
+
children: E("coolandlovely.home.quickStats", "Quick Stats")
|
|
570
584
|
}), /* @__PURE__ */ q("div", {
|
|
571
585
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
572
|
-
children:
|
|
586
|
+
children: I.map((e, t) => /* @__PURE__ */ q(r, {
|
|
587
|
+
featured: t === 0,
|
|
573
588
|
icon: e.icon,
|
|
574
589
|
value: e.value,
|
|
575
590
|
label: e.label,
|
|
@@ -582,13 +597,13 @@ function te() {
|
|
|
582
597
|
className: "mb-8",
|
|
583
598
|
children: [/* @__PURE__ */ q("h2", {
|
|
584
599
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
585
|
-
children:
|
|
600
|
+
children: E("coolandlovely.home.quickActions", "Quick Actions")
|
|
586
601
|
}), /* @__PURE__ */ q("div", {
|
|
587
602
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
588
|
-
children:
|
|
603
|
+
children: F.map((e) => /* @__PURE__ */ J("button", {
|
|
589
604
|
type: "button",
|
|
590
|
-
onClick: () =>
|
|
591
|
-
className: t("flex items-start gap-3 rounded-lg border border-border-
|
|
605
|
+
onClick: () => _(e.path),
|
|
606
|
+
className: t("flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left transition-all bg-gloss-card shadow-pop", "hover:border-accent-foreground/20 hover:shadow-md"),
|
|
592
607
|
children: [
|
|
593
608
|
/* @__PURE__ */ q("div", {
|
|
594
609
|
className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg", e.color),
|
|
@@ -604,7 +619,7 @@ function te() {
|
|
|
604
619
|
children: e.description
|
|
605
620
|
})]
|
|
606
621
|
}),
|
|
607
|
-
/* @__PURE__ */ q(
|
|
622
|
+
/* @__PURE__ */ q(h, { className: "h-4 w-4 text-text-secondary shrink-0 mt-1" })
|
|
608
623
|
]
|
|
609
624
|
}, e.label))
|
|
610
625
|
})]
|
|
@@ -615,35 +630,35 @@ function te() {
|
|
|
615
630
|
className: "flex items-center justify-between mb-4",
|
|
616
631
|
children: [/* @__PURE__ */ q("h2", {
|
|
617
632
|
className: "text-lg font-semibold text-text-primary",
|
|
618
|
-
children:
|
|
633
|
+
children: b ? E("coolandlovely.home.searchResults", "Search Results") : E("coolandlovely.home.featuredCarts", "Featured Carts")
|
|
619
634
|
}), /* @__PURE__ */ J("button", {
|
|
620
635
|
type: "button",
|
|
621
|
-
onClick: () =>
|
|
636
|
+
onClick: () => _("/customer/carts"),
|
|
622
637
|
className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
623
638
|
children: [
|
|
624
|
-
|
|
639
|
+
E("coolandlovely.common.viewAll", "View All"),
|
|
625
640
|
" ",
|
|
626
|
-
/* @__PURE__ */ q(
|
|
641
|
+
/* @__PURE__ */ q(h, { className: "h-3.5 w-3.5" })
|
|
627
642
|
]
|
|
628
643
|
})]
|
|
629
|
-
}),
|
|
630
|
-
icon: /* @__PURE__ */ q(
|
|
631
|
-
title:
|
|
632
|
-
description:
|
|
644
|
+
}), L.length === 0 ? /* @__PURE__ */ q(a, {
|
|
645
|
+
icon: /* @__PURE__ */ q(N, { className: "h-10 w-10" }),
|
|
646
|
+
title: E("coolandlovely.home.noCartsFound", "No carts found"),
|
|
647
|
+
description: E("coolandlovely.home.noCartsDescription", "Try adjusting your search or browse all categories"),
|
|
633
648
|
action: /* @__PURE__ */ q("button", {
|
|
634
649
|
type: "button",
|
|
635
|
-
onClick: () =>
|
|
650
|
+
onClick: () => S(""),
|
|
636
651
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
637
|
-
children:
|
|
652
|
+
children: E("coolandlovely.home.clearSearch", "Clear Search")
|
|
638
653
|
})
|
|
639
654
|
}) : /* @__PURE__ */ q("div", {
|
|
640
655
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
641
|
-
children:
|
|
656
|
+
children: L.map((e) => /* @__PURE__ */ J("div", {
|
|
642
657
|
role: "button",
|
|
643
658
|
tabIndex: 0,
|
|
644
|
-
onClick: () =>
|
|
659
|
+
onClick: () => _(`/customer/cart/${e.id}`),
|
|
645
660
|
onKeyDown: (t) => {
|
|
646
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
661
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), _(`/customer/cart/${e.id}`));
|
|
647
662
|
},
|
|
648
663
|
className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-accent-foreground/20 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
649
664
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -662,11 +677,11 @@ function te() {
|
|
|
662
677
|
e.isVerified && /* @__PURE__ */ q("div", {
|
|
663
678
|
className: "absolute top-2 left-2",
|
|
664
679
|
children: /* @__PURE__ */ J("span", {
|
|
665
|
-
className: "inline-flex items-center gap-1 rounded-full bg-blue-
|
|
680
|
+
className: "inline-flex items-center gap-1 rounded-full bg-accent-blue-subtle/90 px-2 py-0.5 text-xs font-medium text-white backdrop-blur-sm",
|
|
666
681
|
children: [
|
|
667
|
-
/* @__PURE__ */ q(
|
|
682
|
+
/* @__PURE__ */ q(g, { className: "h-3 w-3" }),
|
|
668
683
|
" ",
|
|
669
|
-
|
|
684
|
+
E("coolandlovely.home.verified", "Verified")
|
|
670
685
|
]
|
|
671
686
|
})
|
|
672
687
|
}),
|
|
@@ -675,7 +690,7 @@ function te() {
|
|
|
675
690
|
children: /* @__PURE__ */ J("span", {
|
|
676
691
|
className: "inline-flex items-center gap-1 rounded-full bg-black/60 px-2 py-0.5 text-xs text-white backdrop-blur-sm",
|
|
677
692
|
children: [
|
|
678
|
-
/* @__PURE__ */ q(
|
|
693
|
+
/* @__PURE__ */ q(x, { className: "h-3 w-3" }),
|
|
679
694
|
" ",
|
|
680
695
|
e.estimatedTime,
|
|
681
696
|
" min"
|
|
@@ -698,8 +713,8 @@ function te() {
|
|
|
698
713
|
children: e.category
|
|
699
714
|
})]
|
|
700
715
|
}), /* @__PURE__ */ J("div", {
|
|
701
|
-
className: "flex items-center gap-1 rounded bg-
|
|
702
|
-
children: [/* @__PURE__ */ q(
|
|
716
|
+
className: "flex items-center gap-1 rounded bg-status-success-bg-subtle px-1.5 py-0.5 ml-2 shrink-0",
|
|
717
|
+
children: [/* @__PURE__ */ q(z, { className: "h-3 w-3 fill-white text-white" }), /* @__PURE__ */ q("span", {
|
|
703
718
|
className: "text-xs font-bold text-white",
|
|
704
719
|
children: e.rating
|
|
705
720
|
})]
|
|
@@ -711,27 +726,27 @@ function te() {
|
|
|
711
726
|
/* @__PURE__ */ J("span", {
|
|
712
727
|
className: "flex items-center gap-1",
|
|
713
728
|
children: [
|
|
714
|
-
/* @__PURE__ */ q(
|
|
729
|
+
/* @__PURE__ */ q(A, { className: "h-3 w-3" }),
|
|
715
730
|
" ",
|
|
716
|
-
|
|
731
|
+
ee(e.distance)
|
|
717
732
|
]
|
|
718
733
|
}),
|
|
719
734
|
/* @__PURE__ */ J("span", {
|
|
720
735
|
className: "flex items-center gap-1",
|
|
721
736
|
children: [
|
|
722
|
-
/* @__PURE__ */ q(
|
|
737
|
+
/* @__PURE__ */ q(z, { className: "h-3 w-3" }),
|
|
723
738
|
" ",
|
|
724
739
|
e.totalRatings,
|
|
725
740
|
" ",
|
|
726
|
-
|
|
741
|
+
E("coolandlovely.home.reviews", "reviews")
|
|
727
742
|
]
|
|
728
743
|
}),
|
|
729
744
|
e.averageOrderValue && /* @__PURE__ */ J("span", {
|
|
730
745
|
className: "flex items-center gap-1",
|
|
731
746
|
children: [
|
|
732
|
-
/* @__PURE__ */ q(
|
|
747
|
+
/* @__PURE__ */ q(D, { className: "h-3 w-3" }),
|
|
733
748
|
" ",
|
|
734
|
-
|
|
749
|
+
E("coolandlovely.home.average", "Avg."),
|
|
735
750
|
" ",
|
|
736
751
|
s(e.averageOrderValue, { minimumFractionDigits: 0 })
|
|
737
752
|
]
|
|
@@ -750,31 +765,31 @@ function te() {
|
|
|
750
765
|
}, e.id))
|
|
751
766
|
})]
|
|
752
767
|
}),
|
|
753
|
-
|
|
768
|
+
B.length > 0 && /* @__PURE__ */ J("section", {
|
|
754
769
|
className: "mb-8",
|
|
755
770
|
children: [/* @__PURE__ */ J("div", {
|
|
756
771
|
className: "flex items-center justify-between mb-4",
|
|
757
772
|
children: [/* @__PURE__ */ q("h2", {
|
|
758
773
|
className: "text-lg font-semibold text-text-primary",
|
|
759
|
-
children:
|
|
774
|
+
children: E("coolandlovely.home.recentOrders", "Recent Orders")
|
|
760
775
|
}), /* @__PURE__ */ J("button", {
|
|
761
776
|
type: "button",
|
|
762
|
-
onClick: () =>
|
|
777
|
+
onClick: () => _("/customer/orders"),
|
|
763
778
|
className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
764
779
|
children: [
|
|
765
|
-
|
|
780
|
+
E("coolandlovely.common.viewAll", "View All"),
|
|
766
781
|
" ",
|
|
767
|
-
/* @__PURE__ */ q(
|
|
782
|
+
/* @__PURE__ */ q(h, { className: "h-3.5 w-3.5" })
|
|
768
783
|
]
|
|
769
784
|
})]
|
|
770
785
|
}), /* @__PURE__ */ q("div", {
|
|
771
786
|
className: "rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border",
|
|
772
|
-
children:
|
|
787
|
+
children: B.map((e) => /* @__PURE__ */ J("div", {
|
|
773
788
|
role: "button",
|
|
774
789
|
tabIndex: 0,
|
|
775
|
-
onClick: () =>
|
|
790
|
+
onClick: () => _(`/customer/order/${e.id}`),
|
|
776
791
|
onKeyDown: (t) => {
|
|
777
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
792
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), _(`/customer/order/${e.id}`));
|
|
778
793
|
},
|
|
779
794
|
className: "flex items-center gap-4 px-4 py-3 hover:bg-accent/50 transition-colors cursor-pointer",
|
|
780
795
|
children: [
|
|
@@ -803,7 +818,7 @@ function te() {
|
|
|
803
818
|
children: s(e.total, { minimumFractionDigits: 0 })
|
|
804
819
|
}), /* @__PURE__ */ q("p", {
|
|
805
820
|
className: "text-xs text-text-secondary",
|
|
806
|
-
children:
|
|
821
|
+
children: c(e.orderDate)
|
|
807
822
|
})]
|
|
808
823
|
})
|
|
809
824
|
]
|
|
@@ -814,11 +829,11 @@ function te() {
|
|
|
814
829
|
className: "mb-8",
|
|
815
830
|
children: [/* @__PURE__ */ q("h2", {
|
|
816
831
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
817
|
-
children:
|
|
832
|
+
children: E("coolandlovely.home.howItWorks", "How It Works")
|
|
818
833
|
}), /* @__PURE__ */ q("div", {
|
|
819
834
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
820
|
-
children:
|
|
821
|
-
className: "relative rounded-lg border border-border-
|
|
835
|
+
children: re.map((e) => /* @__PURE__ */ J("div", {
|
|
836
|
+
className: "relative rounded-lg border border-border-seam bg-bg-surface p-5 text-center bg-gloss-card shadow-pop",
|
|
822
837
|
children: [
|
|
823
838
|
/* @__PURE__ */ q("div", {
|
|
824
839
|
className: "absolute -top-3 left-1/2 -translate-x-1/2",
|
|
@@ -847,13 +862,13 @@ function te() {
|
|
|
847
862
|
className: "mb-8",
|
|
848
863
|
children: [/* @__PURE__ */ q("h2", {
|
|
849
864
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
850
|
-
children:
|
|
865
|
+
children: E("coolandlovely.home.browseByCategory", "Browse by Category")
|
|
851
866
|
}), /* @__PURE__ */ q("div", {
|
|
852
867
|
className: "grid grid-cols-3 gap-3 sm:grid-cols-4 lg:grid-cols-5",
|
|
853
|
-
children:
|
|
868
|
+
children: ne.map((e) => /* @__PURE__ */ J("button", {
|
|
854
869
|
type: "button",
|
|
855
|
-
onClick: () =>
|
|
856
|
-
className: "flex flex-col items-center gap-2 rounded-lg border border-border-
|
|
870
|
+
onClick: () => _(`/customer/carts?category=${encodeURIComponent(e.label)}`),
|
|
871
|
+
className: "flex flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center hover:shadow-sm hover:border-accent-foreground/20 transition-all bg-gloss-card shadow-pop",
|
|
857
872
|
children: [/* @__PURE__ */ q("div", {
|
|
858
873
|
className: t("flex h-12 w-12 items-center justify-center rounded-full", e.color),
|
|
859
874
|
children: e.icon
|
|
@@ -868,11 +883,11 @@ function te() {
|
|
|
868
883
|
className: "mb-8",
|
|
869
884
|
children: [/* @__PURE__ */ q("h2", {
|
|
870
885
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
871
|
-
children:
|
|
886
|
+
children: E("coolandlovely.home.platformStats", "Platform Stats")
|
|
872
887
|
}), /* @__PURE__ */ q("div", {
|
|
873
888
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
874
|
-
children:
|
|
875
|
-
className: "flex items-center gap-3 rounded-lg border border-border-
|
|
889
|
+
children: ae.map((e) => /* @__PURE__ */ J("div", {
|
|
890
|
+
className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
876
891
|
children: [/* @__PURE__ */ q("div", {
|
|
877
892
|
className: "flex h-10 w-10 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary shrink-0",
|
|
878
893
|
children: e.icon
|
|
@@ -888,15 +903,15 @@ function te() {
|
|
|
888
903
|
}),
|
|
889
904
|
/* @__PURE__ */ J("section", { children: [/* @__PURE__ */ q("h2", {
|
|
890
905
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
891
|
-
children:
|
|
906
|
+
children: E("coolandlovely.home.recentActivity", "Recent Activity")
|
|
892
907
|
}), /* @__PURE__ */ q("div", {
|
|
893
908
|
className: "rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border",
|
|
894
|
-
children:
|
|
909
|
+
children: ie.map((e) => /* @__PURE__ */ J("div", {
|
|
895
910
|
className: "flex items-center gap-3 px-4 py-3",
|
|
896
911
|
children: [
|
|
897
912
|
/* @__PURE__ */ q("div", {
|
|
898
913
|
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken",
|
|
899
|
-
children: /* @__PURE__ */ q(
|
|
914
|
+
children: /* @__PURE__ */ q(p, { className: t("h-4 w-4", V[e.type] ?? "text-text-secondary") })
|
|
900
915
|
}),
|
|
901
916
|
/* @__PURE__ */ q("div", {
|
|
902
917
|
className: "flex-1 min-w-0",
|
|
@@ -916,6 +931,6 @@ function te() {
|
|
|
916
931
|
});
|
|
917
932
|
}
|
|
918
933
|
//#endregion
|
|
919
|
-
export {
|
|
934
|
+
export { oe as HomePage };
|
|
920
935
|
|
|
921
936
|
//# sourceMappingURL=HomePage.js.map
|