@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
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.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 {
|
|
4
|
+
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
+
import { useDashboardStats as i, useOrders as a, useProviders as o } from "../../hooks/useCoolAndLovelyApi.js";
|
|
6
|
+
import { formatCurrency as s } from "../../utils/formatters.js";
|
|
7
|
+
import { useCallback as c } from "react";
|
|
8
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
+
import { ArrowRight as u, Clock as d, CreditCard as f, Heart as p, Lightbulb as m, MapPin as h, Navigation as g, Package as _, Search as v, ShoppingBag as y, Star as b, TrendingUp as x, User as S, Zap as C } from "lucide-react";
|
|
10
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
11
|
+
import { EmphasisPanel as E, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
|
|
10
12
|
//#region src/coolandlovely/pages/customer/CustomerDashboard.tsx
|
|
11
|
-
function
|
|
13
|
+
function k() {
|
|
12
14
|
let e = (/* @__PURE__ */ new Date()).getHours();
|
|
13
15
|
return e < 12 ? "Good morning" : e < 17 ? "Good afternoon" : "Good evening";
|
|
14
16
|
}
|
|
15
|
-
function
|
|
16
|
-
let { navigateTo:
|
|
17
|
-
let n =
|
|
17
|
+
function A() {
|
|
18
|
+
let { navigateTo: A, currentUser: j } = e(), { t: M } = l(), { data: N = [], isLoading: P } = a({ customerId: j?.id }), { data: F = [], isLoading: I } = o(), { data: L, isLoading: R } = i(), z = P || I || R, B = c((e, t) => {
|
|
19
|
+
let n = M(e);
|
|
18
20
|
return n === e ? t : n;
|
|
19
|
-
}, [
|
|
21
|
+
}, [M]), V = j?.firstName ?? j?.name ?? "Customer", H = [
|
|
20
22
|
{
|
|
21
23
|
id: "1",
|
|
22
24
|
type: "suggestion",
|
|
@@ -41,456 +43,496 @@ function E() {
|
|
|
41
43
|
confidence: 88,
|
|
42
44
|
action: "View Carts"
|
|
43
45
|
}
|
|
44
|
-
],
|
|
45
|
-
totalOrders:
|
|
46
|
-
totalSpent:
|
|
46
|
+
], U = N.slice(0, 3), W = F.slice(0, 3), G = {
|
|
47
|
+
totalOrders: N.length,
|
|
48
|
+
totalSpent: N.reduce((e, t) => e + t.total, 0),
|
|
47
49
|
favoriteCount: 6,
|
|
48
50
|
avgRating: 4.5
|
|
49
|
-
},
|
|
51
|
+
}, K = (e) => {
|
|
50
52
|
switch (e) {
|
|
51
|
-
case "delivered": return "bg-
|
|
52
|
-
case "preparing": return "bg-
|
|
53
|
-
case "out_for_delivery": return "bg-blue-
|
|
54
|
-
case "confirmed": return "bg-blue-
|
|
55
|
-
case "cancelled": return "bg-
|
|
53
|
+
case "delivered": return "bg-status-success-bg-subtle/20 text-status-success-text";
|
|
54
|
+
case "preparing": return "bg-status-warning-bg-subtle/20 text-status-warning-text";
|
|
55
|
+
case "out_for_delivery": return "bg-accent-blue-subtle/20 text-accent-blue";
|
|
56
|
+
case "confirmed": return "bg-accent-blue-subtle/20 text-accent-blue";
|
|
57
|
+
case "cancelled": return "bg-status-error-bg-subtle/20 text-status-error-text";
|
|
56
58
|
default: return "bg-bg-sunken text-text-secondary";
|
|
57
59
|
}
|
|
58
|
-
},
|
|
60
|
+
}, q = (e) => {
|
|
59
61
|
switch (e) {
|
|
60
|
-
case "suggestion": return /* @__PURE__ */
|
|
61
|
-
case "opportunity": return /* @__PURE__ */
|
|
62
|
-
case "trend": return /* @__PURE__ */ C
|
|
63
|
-
default: return /* @__PURE__ */
|
|
62
|
+
case "suggestion": return /* @__PURE__ */ w(m, { className: "h-4 w-4" });
|
|
63
|
+
case "opportunity": return /* @__PURE__ */ w(x, { className: "h-4 w-4" });
|
|
64
|
+
case "trend": return /* @__PURE__ */ w(C, { className: "h-4 w-4" });
|
|
65
|
+
default: return /* @__PURE__ */ w(m, { className: "h-4 w-4" });
|
|
64
66
|
}
|
|
65
|
-
},
|
|
67
|
+
}, J = (e) => {
|
|
66
68
|
switch (e) {
|
|
67
|
-
case "suggestion": return "bg-blue-
|
|
68
|
-
case "opportunity": return "bg-
|
|
69
|
-
case "trend": return "bg-
|
|
69
|
+
case "suggestion": return "bg-accent-blue-subtle/10 text-accent-blue border-accent-blue-subtle/20";
|
|
70
|
+
case "opportunity": return "bg-status-success-bg-subtle/10 text-status-success-text border-status-success-border/20";
|
|
71
|
+
case "trend": return "bg-status-warning-bg-subtle/10 text-status-warning-text border-status-warning-border/20";
|
|
70
72
|
default: return "bg-bg-sunken text-text-secondary border-border-subtle";
|
|
71
73
|
}
|
|
72
74
|
};
|
|
73
|
-
return
|
|
74
|
-
title:
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
return z ? /* @__PURE__ */ w(n, {
|
|
76
|
+
title: B("coolandlovely.customerDashboard.title", "Dashboard"),
|
|
77
|
+
children: /* @__PURE__ */ w("div", {
|
|
76
78
|
className: "flex items-center justify-center py-20",
|
|
77
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ T("div", {
|
|
78
80
|
className: "text-center",
|
|
79
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ w("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-foreground" }), /* @__PURE__ */ w("p", {
|
|
80
82
|
className: "text-sm text-text-secondary",
|
|
81
|
-
children:
|
|
83
|
+
children: B("coolandlovely.customerDashboard.loading", "Loading your dashboard...")
|
|
82
84
|
})]
|
|
83
85
|
})
|
|
84
86
|
})
|
|
85
|
-
}) : /* @__PURE__ */
|
|
86
|
-
title:
|
|
87
|
-
description: `${
|
|
88
|
-
children: [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
125
|
-
children: /* @__PURE__ */ w("div", {
|
|
126
|
-
className: "flex items-center gap-3",
|
|
127
|
-
children: [/* @__PURE__ */ C("div", {
|
|
128
|
-
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
129
|
-
children: /* @__PURE__ */ C(f, { className: "h-5 w-5 text-text-secondary" })
|
|
130
|
-
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
131
|
-
className: "text-2xl font-bold text-text-primary",
|
|
132
|
-
children: V.favoriteCount
|
|
133
|
-
}), /* @__PURE__ */ C("p", {
|
|
134
|
-
className: "text-xs text-text-secondary",
|
|
135
|
-
children: I("coolandlovely.customerDashboard.favoriteCarts", "Favorite Carts")
|
|
136
|
-
})] })]
|
|
137
|
-
})
|
|
138
|
-
}),
|
|
139
|
-
/* @__PURE__ */ C("div", {
|
|
140
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
141
|
-
children: /* @__PURE__ */ w("div", {
|
|
142
|
-
className: "flex items-center gap-3",
|
|
143
|
-
children: [/* @__PURE__ */ C("div", {
|
|
144
|
-
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
145
|
-
children: /* @__PURE__ */ C(y, { className: "h-5 w-5 text-text-secondary" })
|
|
146
|
-
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
147
|
-
className: "text-2xl font-bold text-text-primary",
|
|
148
|
-
children: V.avgRating.toFixed(1)
|
|
149
|
-
}), /* @__PURE__ */ C("p", {
|
|
150
|
-
className: "text-xs text-text-secondary",
|
|
151
|
-
children: I("coolandlovely.customerDashboard.avgRatingGiven", "Avg Rating Given")
|
|
152
|
-
})] })]
|
|
153
|
-
})
|
|
154
|
-
})
|
|
155
|
-
]
|
|
156
|
-
}), /* @__PURE__ */ w("div", {
|
|
157
|
-
className: "mt-8 grid grid-cols-1 gap-8 lg:grid-cols-3",
|
|
158
|
-
children: [/* @__PURE__ */ w("div", {
|
|
159
|
-
className: "lg:col-span-2 space-y-8",
|
|
87
|
+
}) : /* @__PURE__ */ T(n, {
|
|
88
|
+
title: B("coolandlovely.customerDashboard.welcomeBack", "Welcome Back!"),
|
|
89
|
+
description: `${k()}, ${V}`,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ w(O, {
|
|
92
|
+
className: "mb-6",
|
|
93
|
+
icon: /* @__PURE__ */ w(y, { className: "h-4 w-4" }),
|
|
94
|
+
children: B("coolandlovely.customerDashboard.purpose", "Your home base as a customer: see what you have spent and ordered, pick up where you left off, and discover nearby carts. Use it to track recent orders, jump back into favourites, and act on personalised recommendations before they expire.")
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ w(D, {
|
|
97
|
+
className: "mb-6",
|
|
98
|
+
storageKey: "coolandlovely-customer-dashboard",
|
|
99
|
+
steps: [
|
|
100
|
+
{
|
|
101
|
+
id: "discover",
|
|
102
|
+
label: B("coolandlovely.customerDashboard.next.discover", "Discover carts near you"),
|
|
103
|
+
description: B("coolandlovely.customerDashboard.next.discoverDesc", "Browse open carts and services around your location."),
|
|
104
|
+
icon: /* @__PURE__ */ w(v, { className: "h-4 w-4" }),
|
|
105
|
+
onClick: () => A("/customer/carts")
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "orders",
|
|
109
|
+
label: B("coolandlovely.customerDashboard.next.orders", "Review your orders"),
|
|
110
|
+
description: B("coolandlovely.customerDashboard.next.ordersDesc", "Track current orders or reorder from your history."),
|
|
111
|
+
icon: /* @__PURE__ */ w(d, { className: "h-4 w-4" }),
|
|
112
|
+
onClick: () => A("/customer/orders"),
|
|
113
|
+
done: G.totalOrders > 0
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "addresses",
|
|
117
|
+
label: B("coolandlovely.customerDashboard.next.addresses", "Save a delivery address"),
|
|
118
|
+
description: B("coolandlovely.customerDashboard.next.addressesDesc", "Add addresses so checkout is faster next time."),
|
|
119
|
+
icon: /* @__PURE__ */ w(h, { className: "h-4 w-4" }),
|
|
120
|
+
onClick: () => A("/customer/addresses")
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}),
|
|
124
|
+
G && /* @__PURE__ */ T("div", {
|
|
125
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
160
126
|
children: [
|
|
161
|
-
/* @__PURE__ */ w("
|
|
162
|
-
className: "
|
|
163
|
-
children:
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
127
|
+
/* @__PURE__ */ w("div", {
|
|
128
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
129
|
+
children: /* @__PURE__ */ T("div", {
|
|
130
|
+
className: "flex items-center gap-3",
|
|
131
|
+
children: [/* @__PURE__ */ w("div", {
|
|
132
|
+
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
133
|
+
children: /* @__PURE__ */ w(_, { className: "h-5 w-5 text-text-secondary" })
|
|
134
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
135
|
+
className: "text-2xl font-bold text-text-primary",
|
|
136
|
+
children: G.totalOrders
|
|
137
|
+
}), /* @__PURE__ */ w("p", {
|
|
138
|
+
className: "text-xs text-text-secondary",
|
|
139
|
+
children: B("coolandlovely.customerDashboard.totalOrders", "Total Orders")
|
|
140
|
+
})] })]
|
|
141
|
+
})
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ w("div", {
|
|
144
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
145
|
+
children: /* @__PURE__ */ T("div", {
|
|
146
|
+
className: "flex items-center gap-3",
|
|
147
|
+
children: [/* @__PURE__ */ w("div", {
|
|
148
|
+
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
149
|
+
children: /* @__PURE__ */ w(f, { className: "h-5 w-5 text-text-secondary" })
|
|
150
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
151
|
+
className: "text-2xl font-bold text-text-primary",
|
|
152
|
+
children: s(G.totalSpent, { minimumFractionDigits: 0 })
|
|
153
|
+
}), /* @__PURE__ */ w("p", {
|
|
154
|
+
className: "text-xs text-text-secondary",
|
|
155
|
+
children: B("coolandlovely.customerDashboard.totalSpent", "Total Spent")
|
|
156
|
+
})] })]
|
|
157
|
+
})
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ w("div", {
|
|
160
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
161
|
+
children: /* @__PURE__ */ T("div", {
|
|
162
|
+
className: "flex items-center gap-3",
|
|
163
|
+
children: [/* @__PURE__ */ w("div", {
|
|
164
|
+
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
165
|
+
children: /* @__PURE__ */ w(p, { className: "h-5 w-5 text-text-secondary" })
|
|
166
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
167
|
+
className: "text-2xl font-bold text-text-primary",
|
|
168
|
+
children: G.favoriteCount
|
|
169
|
+
}), /* @__PURE__ */ w("p", {
|
|
170
|
+
className: "text-xs text-text-secondary",
|
|
171
|
+
children: B("coolandlovely.customerDashboard.favoriteCarts", "Favorite Carts")
|
|
172
|
+
})] })]
|
|
173
|
+
})
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ w("div", {
|
|
176
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
177
|
+
children: /* @__PURE__ */ T("div", {
|
|
178
|
+
className: "flex items-center gap-3",
|
|
179
|
+
children: [/* @__PURE__ */ w("div", {
|
|
180
|
+
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
181
|
+
children: /* @__PURE__ */ w(b, { className: "h-5 w-5 text-text-secondary" })
|
|
182
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
183
|
+
className: "text-2xl font-bold text-text-primary",
|
|
184
|
+
children: G.avgRating.toFixed(1)
|
|
185
|
+
}), /* @__PURE__ */ w("p", {
|
|
186
|
+
className: "text-xs text-text-secondary",
|
|
187
|
+
children: B("coolandlovely.customerDashboard.avgRatingGiven", "Avg Rating Given")
|
|
188
|
+
})] })]
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ T("div", {
|
|
194
|
+
className: "mt-8 grid grid-cols-1 gap-8 lg:grid-cols-3",
|
|
195
|
+
children: [/* @__PURE__ */ T("div", {
|
|
196
|
+
className: "lg:col-span-2 space-y-8",
|
|
197
|
+
children: [
|
|
198
|
+
/* @__PURE__ */ T("section", { children: [/* @__PURE__ */ w("h2", {
|
|
199
|
+
className: "text-lg font-semibold text-text-primary mb-4",
|
|
200
|
+
children: B("coolandlovely.customerDashboard.quickActions", "Quick Actions")
|
|
201
|
+
}), /* @__PURE__ */ T("div", {
|
|
202
|
+
className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ T("button", {
|
|
205
|
+
type: "button",
|
|
206
|
+
onClick: () => A("/customer/carts"),
|
|
207
|
+
className: t("flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 transition-colors text-left bg-gloss-card shadow-pop", "hover:bg-accent hover:shadow-md"),
|
|
208
|
+
children: [/* @__PURE__ */ w("div", {
|
|
209
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-accent-blue-subtle/10",
|
|
210
|
+
children: /* @__PURE__ */ w(v, { className: "h-5 w-5 text-accent-blue" })
|
|
211
|
+
}), /* @__PURE__ */ T("div", {
|
|
212
|
+
className: "min-w-0",
|
|
213
|
+
children: [/* @__PURE__ */ w("p", {
|
|
214
|
+
className: "text-sm font-semibold text-text-primary",
|
|
215
|
+
children: B("coolandlovely.customerDashboard.discoverCarts", "Discover Carts")
|
|
216
|
+
}), /* @__PURE__ */ w("p", {
|
|
217
|
+
className: "text-xs text-text-secondary",
|
|
218
|
+
children: B("coolandlovely.customerDashboard.findNearbyCarts", "Find nearby carts")
|
|
219
|
+
})]
|
|
182
220
|
})]
|
|
183
|
-
})
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ T("button", {
|
|
223
|
+
type: "button",
|
|
224
|
+
onClick: () => A("/customer/orders"),
|
|
225
|
+
className: t("flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 transition-colors text-left bg-gloss-card shadow-pop", "hover:bg-accent hover:shadow-md"),
|
|
226
|
+
children: [/* @__PURE__ */ w("div", {
|
|
227
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-status-success-bg-subtle/10",
|
|
228
|
+
children: /* @__PURE__ */ w(d, { className: "h-5 w-5 text-status-success-text" })
|
|
229
|
+
}), /* @__PURE__ */ T("div", {
|
|
230
|
+
className: "min-w-0",
|
|
231
|
+
children: [/* @__PURE__ */ w("p", {
|
|
232
|
+
className: "text-sm font-semibold text-text-primary",
|
|
233
|
+
children: B("coolandlovely.customerDashboard.orderHistory", "Order History")
|
|
234
|
+
}), /* @__PURE__ */ w("p", {
|
|
235
|
+
className: "text-xs text-text-secondary",
|
|
236
|
+
children: B("coolandlovely.customerDashboard.viewPastOrders", "View past orders")
|
|
237
|
+
})]
|
|
200
238
|
})]
|
|
201
|
-
})
|
|
202
|
-
|
|
203
|
-
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ T("button", {
|
|
241
|
+
type: "button",
|
|
242
|
+
onClick: () => A("/customer/favorites"),
|
|
243
|
+
className: t("flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 transition-colors text-left bg-gloss-card shadow-pop", "hover:bg-accent hover:shadow-md"),
|
|
244
|
+
children: [/* @__PURE__ */ w("div", {
|
|
245
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-status-error-bg-subtle/10",
|
|
246
|
+
children: /* @__PURE__ */ w(p, { className: "h-5 w-5 text-status-error-text" })
|
|
247
|
+
}), /* @__PURE__ */ T("div", {
|
|
248
|
+
className: "min-w-0",
|
|
249
|
+
children: [/* @__PURE__ */ w("p", {
|
|
250
|
+
className: "text-sm font-semibold text-text-primary",
|
|
251
|
+
children: B("coolandlovely.customerDashboard.favorites", "Favorites")
|
|
252
|
+
}), /* @__PURE__ */ w("p", {
|
|
253
|
+
className: "text-xs text-text-secondary",
|
|
254
|
+
children: B("coolandlovely.customerDashboard.savedCarts", "Saved carts")
|
|
255
|
+
})]
|
|
256
|
+
})]
|
|
257
|
+
})
|
|
258
|
+
]
|
|
259
|
+
})] }),
|
|
260
|
+
/* @__PURE__ */ T("section", { children: [/* @__PURE__ */ T("div", {
|
|
261
|
+
className: "flex items-center justify-between mb-4",
|
|
262
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
263
|
+
className: "text-lg font-semibold text-text-primary",
|
|
264
|
+
children: B("coolandlovely.customerDashboard.recentOrders", "Recent Orders")
|
|
265
|
+
}), /* @__PURE__ */ T("button", {
|
|
204
266
|
type: "button",
|
|
205
|
-
onClick: () =>
|
|
206
|
-
className:
|
|
207
|
-
children: [/* @__PURE__ */
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
className: "
|
|
217
|
-
children:
|
|
267
|
+
onClick: () => A("/customer/orders"),
|
|
268
|
+
className: "flex items-center gap-1 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
|
|
269
|
+
children: [B("coolandlovely.common.viewAll", "View All"), /* @__PURE__ */ w(u, { className: "h-4 w-4" })]
|
|
270
|
+
})]
|
|
271
|
+
}), U.length > 0 ? /* @__PURE__ */ w("div", {
|
|
272
|
+
className: "space-y-3",
|
|
273
|
+
children: U.map((e) => /* @__PURE__ */ w("div", {
|
|
274
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
275
|
+
children: /* @__PURE__ */ T("div", {
|
|
276
|
+
className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",
|
|
277
|
+
children: [/* @__PURE__ */ T("div", {
|
|
278
|
+
className: "flex-1 min-w-0",
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ T("div", {
|
|
281
|
+
className: "flex flex-wrap items-center gap-2 mb-1",
|
|
282
|
+
children: [/* @__PURE__ */ w("h3", {
|
|
283
|
+
className: "text-sm font-semibold text-text-primary",
|
|
284
|
+
children: e.cartName
|
|
285
|
+
}), /* @__PURE__ */ w("span", {
|
|
286
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium capitalize", K(e.status)),
|
|
287
|
+
children: e.status.replace(/_/g, " ")
|
|
288
|
+
})]
|
|
289
|
+
}),
|
|
290
|
+
/* @__PURE__ */ w("p", {
|
|
291
|
+
className: "text-xs text-text-secondary mb-2 leading-relaxed",
|
|
292
|
+
children: e.items.map((e) => `${e.name} (${e.quantity})`).join(", ")
|
|
293
|
+
}),
|
|
294
|
+
/* @__PURE__ */ T("div", {
|
|
295
|
+
className: "flex flex-wrap items-center gap-3 text-xs text-text-secondary",
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ w("span", {
|
|
298
|
+
className: "font-medium text-text-primary",
|
|
299
|
+
children: s(e.total, { minimumFractionDigits: 0 })
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ w("span", { children: new Date(e.orderDate).toLocaleDateString() }),
|
|
302
|
+
e.rating && /* @__PURE__ */ T("span", {
|
|
303
|
+
className: "flex items-center gap-1",
|
|
304
|
+
children: [/* @__PURE__ */ w(b, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), e.rating]
|
|
305
|
+
})
|
|
306
|
+
]
|
|
307
|
+
})
|
|
308
|
+
]
|
|
309
|
+
}), /* @__PURE__ */ w("button", {
|
|
310
|
+
type: "button",
|
|
311
|
+
onClick: () => A(`/customer/orders/${e.id}`),
|
|
312
|
+
className: "rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
|
|
313
|
+
children: B("coolandlovely.customerDashboard.viewDetails", "View Details")
|
|
218
314
|
})]
|
|
219
|
-
})
|
|
315
|
+
})
|
|
316
|
+
}, e.id))
|
|
317
|
+
}) : /* @__PURE__ */ w(r, {
|
|
318
|
+
illustration: "empty-data",
|
|
319
|
+
title: B("coolandlovely.customerDashboard.noRecentOrders", "No recent orders"),
|
|
320
|
+
description: B("coolandlovely.customerDashboard.noRecentOrdersDesc", "Once you place an order it will show up here so you can track and reorder it."),
|
|
321
|
+
action: /* @__PURE__ */ T("button", {
|
|
322
|
+
type: "button",
|
|
323
|
+
onClick: () => A("/customer/carts"),
|
|
324
|
+
className: "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",
|
|
325
|
+
children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), B("coolandlovely.customerDashboard.discoverCarts", "Discover Carts")]
|
|
220
326
|
})
|
|
221
|
-
]
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
className: "
|
|
227
|
-
children:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
327
|
+
})] }),
|
|
328
|
+
/* @__PURE__ */ T("section", { children: [/* @__PURE__ */ w("h2", {
|
|
329
|
+
className: "text-lg font-semibold text-text-primary mb-4",
|
|
330
|
+
children: B("coolandlovely.customerDashboard.recommendedForYou", "Recommended for You")
|
|
331
|
+
}), /* @__PURE__ */ w("div", {
|
|
332
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
333
|
+
children: W.map((e) => /* @__PURE__ */ T("div", {
|
|
334
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden shadow-sm hover:shadow-md transition-shadow",
|
|
335
|
+
children: [/* @__PURE__ */ T("div", {
|
|
336
|
+
className: "relative h-40",
|
|
337
|
+
children: [/* @__PURE__ */ w("img", {
|
|
338
|
+
src: e.image,
|
|
339
|
+
alt: e.name,
|
|
340
|
+
className: "h-full w-full object-cover"
|
|
341
|
+
}), /* @__PURE__ */ w("div", {
|
|
342
|
+
className: "absolute top-2 right-2",
|
|
343
|
+
children: /* @__PURE__ */ w("span", {
|
|
344
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", e.isOpen ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg-subtle/20 text-status-error-text"),
|
|
345
|
+
children: e.isOpen ? B("coolandlovely.customerDashboard.open", "Open") : B("coolandlovely.customerDashboard.closed", "Closed")
|
|
346
|
+
})
|
|
347
|
+
})]
|
|
348
|
+
}), /* @__PURE__ */ T("div", {
|
|
349
|
+
className: "p-4",
|
|
242
350
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
className: "flex
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
-
className: "
|
|
247
|
-
children:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
351
|
+
/* @__PURE__ */ T("div", {
|
|
352
|
+
className: "flex items-start justify-between mb-2",
|
|
353
|
+
children: [/* @__PURE__ */ T("div", {
|
|
354
|
+
className: "min-w-0 flex-1",
|
|
355
|
+
children: [/* @__PURE__ */ w("h3", {
|
|
356
|
+
className: "text-sm font-semibold text-text-primary",
|
|
357
|
+
children: e.name
|
|
358
|
+
}), /* @__PURE__ */ w("p", {
|
|
359
|
+
className: "text-xs text-text-secondary",
|
|
360
|
+
children: e.category
|
|
361
|
+
})]
|
|
362
|
+
}), /* @__PURE__ */ T("div", {
|
|
363
|
+
className: "flex items-center gap-1 text-xs",
|
|
364
|
+
children: [/* @__PURE__ */ w(b, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ w("span", {
|
|
365
|
+
className: "font-medium text-text-primary",
|
|
366
|
+
children: e.rating
|
|
367
|
+
})]
|
|
251
368
|
})]
|
|
252
369
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
className: "text-xs text-text-secondary mb-
|
|
255
|
-
children:
|
|
370
|
+
/* @__PURE__ */ T("div", {
|
|
371
|
+
className: "flex items-center gap-3 text-xs text-text-secondary mb-3",
|
|
372
|
+
children: [/* @__PURE__ */ T("span", {
|
|
373
|
+
className: "flex items-center gap-1",
|
|
374
|
+
children: [
|
|
375
|
+
/* @__PURE__ */ w(h, { className: "h-3 w-3" }),
|
|
376
|
+
e.distance,
|
|
377
|
+
"km away"
|
|
378
|
+
]
|
|
379
|
+
}), /* @__PURE__ */ T("span", {
|
|
380
|
+
className: "flex items-center gap-1",
|
|
381
|
+
children: [
|
|
382
|
+
/* @__PURE__ */ w(d, { className: "h-3 w-3" }),
|
|
383
|
+
e.estimatedTime,
|
|
384
|
+
" mins"
|
|
385
|
+
]
|
|
386
|
+
})]
|
|
256
387
|
}),
|
|
257
|
-
/* @__PURE__ */ w("
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}),
|
|
264
|
-
/* @__PURE__ */ C("span", { children: new Date(e.orderDate).toLocaleDateString() }),
|
|
265
|
-
e.rating && /* @__PURE__ */ w("span", {
|
|
266
|
-
className: "flex items-center gap-1",
|
|
267
|
-
children: [/* @__PURE__ */ C(y, { className: "h-3 w-3 fill-yellow-400 text-yellow-400" }), e.rating]
|
|
268
|
-
})
|
|
269
|
-
]
|
|
388
|
+
/* @__PURE__ */ w("button", {
|
|
389
|
+
type: "button",
|
|
390
|
+
disabled: !e.isOpen,
|
|
391
|
+
onClick: () => e.isOpen && A(`/customer/carts/${e.id}`),
|
|
392
|
+
className: t("w-full rounded-lg py-2 text-sm font-medium transition-opacity", e.isOpen ? "bg-foreground text-background hover:opacity-90" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
|
|
393
|
+
children: e.isOpen ? B("coolandlovely.customerDashboard.viewMenu", "View Menu") : B("coolandlovely.customerDashboard.currentlyClosed", "Currently Closed")
|
|
270
394
|
})
|
|
271
395
|
]
|
|
272
|
-
}), /* @__PURE__ */ C("button", {
|
|
273
|
-
type: "button",
|
|
274
|
-
onClick: () => E(`/customer/orders/${e.id}`),
|
|
275
|
-
className: "rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
|
|
276
|
-
children: I("coolandlovely.customerDashboard.viewDetails", "View Details")
|
|
277
|
-
})]
|
|
278
|
-
})
|
|
279
|
-
}, e.id))
|
|
280
|
-
}) : /* @__PURE__ */ w("div", {
|
|
281
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-8 text-center",
|
|
282
|
-
children: [/* @__PURE__ */ C(v, { className: "mx-auto h-10 w-10 text-text-secondary/50" }), /* @__PURE__ */ C("p", {
|
|
283
|
-
className: "mt-3 text-sm text-text-secondary",
|
|
284
|
-
children: I("coolandlovely.customerDashboard.noRecentOrders", "No recent orders")
|
|
285
|
-
})]
|
|
286
|
-
})] }),
|
|
287
|
-
/* @__PURE__ */ w("section", { children: [/* @__PURE__ */ C("h2", {
|
|
288
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
289
|
-
children: I("coolandlovely.customerDashboard.recommendedForYou", "Recommended for You")
|
|
290
|
-
}), /* @__PURE__ */ C("div", {
|
|
291
|
-
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
292
|
-
children: B.map((e) => /* @__PURE__ */ w("div", {
|
|
293
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden shadow-sm hover:shadow-md transition-shadow",
|
|
294
|
-
children: [/* @__PURE__ */ w("div", {
|
|
295
|
-
className: "relative h-40",
|
|
296
|
-
children: [/* @__PURE__ */ C("img", {
|
|
297
|
-
src: e.image,
|
|
298
|
-
alt: e.name,
|
|
299
|
-
className: "h-full w-full object-cover"
|
|
300
|
-
}), /* @__PURE__ */ C("div", {
|
|
301
|
-
className: "absolute top-2 right-2",
|
|
302
|
-
children: /* @__PURE__ */ C("span", {
|
|
303
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", e.isOpen ? "bg-green-500/20 text-green-600 dark:text-green-400" : "bg-red-500/20 text-red-600 dark:text-red-400"),
|
|
304
|
-
children: e.isOpen ? I("coolandlovely.customerDashboard.open", "Open") : I("coolandlovely.customerDashboard.closed", "Closed")
|
|
305
|
-
})
|
|
306
396
|
})]
|
|
397
|
+
}, e.id))
|
|
398
|
+
})] })
|
|
399
|
+
]
|
|
400
|
+
}), /* @__PURE__ */ T("div", {
|
|
401
|
+
className: "space-y-6",
|
|
402
|
+
children: [
|
|
403
|
+
/* @__PURE__ */ T(E, {
|
|
404
|
+
className: "p-5",
|
|
405
|
+
children: [/* @__PURE__ */ w("h3", {
|
|
406
|
+
className: "text-base font-semibold text-text-primary mb-4",
|
|
407
|
+
children: B("coolandlovely.customerDashboard.personalizedRecommendations", "Personalized Recommendations")
|
|
307
408
|
}), /* @__PURE__ */ w("div", {
|
|
308
|
-
className: "
|
|
309
|
-
children:
|
|
310
|
-
|
|
311
|
-
|
|
409
|
+
className: "space-y-3",
|
|
410
|
+
children: H.map((e) => /* @__PURE__ */ w("div", {
|
|
411
|
+
className: t("rounded-lg border p-3", J(e.type)),
|
|
412
|
+
children: /* @__PURE__ */ T("div", {
|
|
413
|
+
className: "flex items-start gap-2",
|
|
312
414
|
children: [/* @__PURE__ */ w("div", {
|
|
313
|
-
className: "
|
|
314
|
-
children:
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}), /* @__PURE__ */ C("p", {
|
|
318
|
-
className: "text-xs text-text-secondary",
|
|
319
|
-
children: e.category
|
|
320
|
-
})]
|
|
321
|
-
}), /* @__PURE__ */ w("div", {
|
|
322
|
-
className: "flex items-center gap-1 text-xs",
|
|
323
|
-
children: [/* @__PURE__ */ C(y, { className: "h-3 w-3 fill-yellow-400 text-yellow-400" }), /* @__PURE__ */ C("span", {
|
|
324
|
-
className: "font-medium text-text-primary",
|
|
325
|
-
children: e.rating
|
|
326
|
-
})]
|
|
327
|
-
})]
|
|
328
|
-
}),
|
|
329
|
-
/* @__PURE__ */ w("div", {
|
|
330
|
-
className: "flex items-center gap-3 text-xs text-text-secondary mb-3",
|
|
331
|
-
children: [/* @__PURE__ */ w("span", {
|
|
332
|
-
className: "flex items-center gap-1",
|
|
333
|
-
children: [
|
|
334
|
-
/* @__PURE__ */ C(m, { className: "h-3 w-3" }),
|
|
335
|
-
e.distance,
|
|
336
|
-
"km away"
|
|
337
|
-
]
|
|
338
|
-
}), /* @__PURE__ */ w("span", {
|
|
339
|
-
className: "flex items-center gap-1",
|
|
415
|
+
className: "mt-0.5 shrink-0",
|
|
416
|
+
children: q(e.type)
|
|
417
|
+
}), /* @__PURE__ */ T("div", {
|
|
418
|
+
className: "flex-1 min-w-0",
|
|
340
419
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
|
|
343
|
-
|
|
420
|
+
/* @__PURE__ */ T("div", {
|
|
421
|
+
className: "flex items-center justify-between gap-2",
|
|
422
|
+
children: [/* @__PURE__ */ w("p", {
|
|
423
|
+
className: "text-xs font-semibold",
|
|
424
|
+
children: e.title
|
|
425
|
+
}), /* @__PURE__ */ T("span", {
|
|
426
|
+
className: "text-[10px] opacity-70",
|
|
427
|
+
children: [e.confidence, "%"]
|
|
428
|
+
})]
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ w("p", {
|
|
431
|
+
className: "mt-1 text-xs opacity-80 leading-relaxed",
|
|
432
|
+
children: e.description
|
|
433
|
+
}),
|
|
434
|
+
/* @__PURE__ */ w("button", {
|
|
435
|
+
type: "button",
|
|
436
|
+
onClick: () => A("/customer/carts"),
|
|
437
|
+
className: "mt-2 text-[10px] font-semibold underline underline-offset-2",
|
|
438
|
+
children: e.action
|
|
439
|
+
})
|
|
344
440
|
]
|
|
345
441
|
})]
|
|
442
|
+
})
|
|
443
|
+
}, e.id))
|
|
444
|
+
})]
|
|
445
|
+
}),
|
|
446
|
+
/* @__PURE__ */ T("div", {
|
|
447
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
|
|
448
|
+
children: [/* @__PURE__ */ w("h3", {
|
|
449
|
+
className: "text-base font-semibold text-text-primary mb-3",
|
|
450
|
+
children: B("coolandlovely.customerDashboard.quickLinks", "Quick Links")
|
|
451
|
+
}), /* @__PURE__ */ T("div", {
|
|
452
|
+
className: "space-y-2",
|
|
453
|
+
children: [
|
|
454
|
+
/* @__PURE__ */ T("button", {
|
|
455
|
+
type: "button",
|
|
456
|
+
onClick: () => A("/customer/profile"),
|
|
457
|
+
className: "flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary hover:bg-accent transition-colors text-left",
|
|
458
|
+
children: [/* @__PURE__ */ w(S, { className: "h-4 w-4 text-text-secondary" }), B("coolandlovely.customerDashboard.profileSettings", "Profile Settings")]
|
|
459
|
+
}),
|
|
460
|
+
/* @__PURE__ */ T("button", {
|
|
461
|
+
type: "button",
|
|
462
|
+
onClick: () => A("/customer/addresses"),
|
|
463
|
+
className: "flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary hover:bg-accent transition-colors text-left",
|
|
464
|
+
children: [/* @__PURE__ */ w(h, { className: "h-4 w-4 text-text-secondary" }), B("coolandlovely.customerDashboard.savedAddresses", "Saved Addresses")]
|
|
346
465
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ T("button", {
|
|
348
467
|
type: "button",
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
children: e.isOpen ? I("coolandlovely.customerDashboard.viewMenu", "View Menu") : I("coolandlovely.customerDashboard.currentlyClosed", "Currently Closed")
|
|
468
|
+
onClick: () => A("/customer/payment-methods"),
|
|
469
|
+
className: "flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary hover:bg-accent transition-colors text-left",
|
|
470
|
+
children: [/* @__PURE__ */ w(f, { className: "h-4 w-4 text-text-secondary" }), B("coolandlovely.customerDashboard.paymentMethods", "Payment Methods")]
|
|
353
471
|
})
|
|
354
472
|
]
|
|
355
473
|
})]
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}), /* @__PURE__ */ C("div", {
|
|
368
|
-
className: "space-y-3",
|
|
369
|
-
children: R.map((e) => /* @__PURE__ */ C("div", {
|
|
370
|
-
className: t("rounded-lg border p-3", W(e.type)),
|
|
371
|
-
children: /* @__PURE__ */ w("div", {
|
|
372
|
-
className: "flex items-start gap-2",
|
|
373
|
-
children: [/* @__PURE__ */ C("div", {
|
|
374
|
-
className: "mt-0.5 shrink-0",
|
|
375
|
-
children: U(e.type)
|
|
376
|
-
}), /* @__PURE__ */ w("div", {
|
|
474
|
+
}),
|
|
475
|
+
/* @__PURE__ */ T("div", {
|
|
476
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
|
|
477
|
+
children: [
|
|
478
|
+
/* @__PURE__ */ w("h3", {
|
|
479
|
+
className: "text-base font-semibold text-text-primary mb-3",
|
|
480
|
+
children: B("coolandlovely.customerDashboard.currentLocation", "Current Location")
|
|
481
|
+
}),
|
|
482
|
+
/* @__PURE__ */ T("div", {
|
|
483
|
+
className: "flex items-start gap-3",
|
|
484
|
+
children: [/* @__PURE__ */ w(g, { className: "h-4 w-4 text-accent-blue mt-0.5 shrink-0" }), /* @__PURE__ */ T("div", {
|
|
377
485
|
className: "flex-1 min-w-0",
|
|
378
486
|
children: [
|
|
379
|
-
/* @__PURE__ */ w("
|
|
380
|
-
className: "
|
|
381
|
-
children:
|
|
382
|
-
className: "text-xs font-semibold",
|
|
383
|
-
children: e.title
|
|
384
|
-
}), /* @__PURE__ */ w("span", {
|
|
385
|
-
className: "text-[10px] opacity-70",
|
|
386
|
-
children: [e.confidence, "%"]
|
|
387
|
-
})]
|
|
487
|
+
/* @__PURE__ */ w("p", {
|
|
488
|
+
className: "text-sm font-medium text-text-primary",
|
|
489
|
+
children: "Koramangala"
|
|
388
490
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
className: "
|
|
391
|
-
children:
|
|
491
|
+
/* @__PURE__ */ w("p", {
|
|
492
|
+
className: "text-xs text-text-secondary",
|
|
493
|
+
children: "80 Feet Road, 6th Block"
|
|
392
494
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
className: "mt-2 text-[10px] font-semibold underline underline-offset-2",
|
|
397
|
-
children: e.action
|
|
495
|
+
/* @__PURE__ */ w("p", {
|
|
496
|
+
className: "text-xs text-text-secondary",
|
|
497
|
+
children: "Bangalore, Karnataka"
|
|
398
498
|
})
|
|
399
499
|
]
|
|
400
500
|
})]
|
|
401
|
-
})
|
|
402
|
-
}, e.id))
|
|
403
|
-
})]
|
|
404
|
-
}),
|
|
405
|
-
/* @__PURE__ */ w("div", {
|
|
406
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
407
|
-
children: [/* @__PURE__ */ C("h3", {
|
|
408
|
-
className: "text-base font-semibold text-text-primary mb-3",
|
|
409
|
-
children: I("coolandlovely.customerDashboard.quickLinks", "Quick Links")
|
|
410
|
-
}), /* @__PURE__ */ w("div", {
|
|
411
|
-
className: "space-y-2",
|
|
412
|
-
children: [
|
|
413
|
-
/* @__PURE__ */ w("button", {
|
|
414
|
-
type: "button",
|
|
415
|
-
onClick: () => E("/customer/profile"),
|
|
416
|
-
className: "flex w-full items-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary hover:bg-accent transition-colors text-left",
|
|
417
|
-
children: [/* @__PURE__ */ C(x, { className: "h-4 w-4 text-text-secondary" }), I("coolandlovely.customerDashboard.profileSettings", "Profile Settings")]
|
|
418
501
|
}),
|
|
419
502
|
/* @__PURE__ */ w("button", {
|
|
420
503
|
type: "button",
|
|
421
|
-
onClick: () =>
|
|
422
|
-
className: "
|
|
423
|
-
children:
|
|
504
|
+
onClick: () => A("/customer/addresses"),
|
|
505
|
+
className: "mt-3 w-full rounded-lg border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
|
|
506
|
+
children: B("coolandlovely.customerDashboard.updateLocation", "Update Location")
|
|
507
|
+
})
|
|
508
|
+
]
|
|
509
|
+
}),
|
|
510
|
+
/* @__PURE__ */ T("div", {
|
|
511
|
+
className: "rounded-lg bg-gradient-to-r from-accent-blue/10 to-accent-purple/10 border border-accent-blue-subtle/20 p-5",
|
|
512
|
+
children: [
|
|
513
|
+
/* @__PURE__ */ w("h3", {
|
|
514
|
+
className: "text-base font-semibold text-text-primary mb-2",
|
|
515
|
+
children: B("coolandlovely.customerDashboard.specialOffers", "Special Offers")
|
|
516
|
+
}),
|
|
517
|
+
/* @__PURE__ */ w("p", {
|
|
518
|
+
className: "text-xs text-text-secondary mb-3 leading-relaxed",
|
|
519
|
+
children: B("coolandlovely.customerDashboard.specialOffersDescription", "Get 25% off on your next order from featured carts")
|
|
424
520
|
}),
|
|
425
521
|
/* @__PURE__ */ w("button", {
|
|
426
522
|
type: "button",
|
|
427
|
-
onClick: () =>
|
|
428
|
-
className: "
|
|
429
|
-
children:
|
|
523
|
+
onClick: () => A("/customer/carts"),
|
|
524
|
+
className: "w-full rounded-lg bg-foreground px-3 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
525
|
+
children: B("coolandlovely.customerDashboard.viewOffers", "View Offers")
|
|
430
526
|
})
|
|
431
527
|
]
|
|
432
|
-
})
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
/* @__PURE__ */ C("h3", {
|
|
438
|
-
className: "text-base font-semibold text-text-primary mb-3",
|
|
439
|
-
children: I("coolandlovely.customerDashboard.currentLocation", "Current Location")
|
|
440
|
-
}),
|
|
441
|
-
/* @__PURE__ */ w("div", {
|
|
442
|
-
className: "flex items-start gap-3",
|
|
443
|
-
children: [/* @__PURE__ */ C(h, { className: "h-4 w-4 text-blue-500 mt-0.5 shrink-0" }), /* @__PURE__ */ w("div", {
|
|
444
|
-
className: "flex-1 min-w-0",
|
|
445
|
-
children: [
|
|
446
|
-
/* @__PURE__ */ C("p", {
|
|
447
|
-
className: "text-sm font-medium text-text-primary",
|
|
448
|
-
children: "Koramangala"
|
|
449
|
-
}),
|
|
450
|
-
/* @__PURE__ */ C("p", {
|
|
451
|
-
className: "text-xs text-text-secondary",
|
|
452
|
-
children: "80 Feet Road, 6th Block"
|
|
453
|
-
}),
|
|
454
|
-
/* @__PURE__ */ C("p", {
|
|
455
|
-
className: "text-xs text-text-secondary",
|
|
456
|
-
children: "Bangalore, Karnataka"
|
|
457
|
-
})
|
|
458
|
-
]
|
|
459
|
-
})]
|
|
460
|
-
}),
|
|
461
|
-
/* @__PURE__ */ C("button", {
|
|
462
|
-
type: "button",
|
|
463
|
-
onClick: () => E("/customer/addresses"),
|
|
464
|
-
className: "mt-3 w-full rounded-lg border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
|
|
465
|
-
children: I("coolandlovely.customerDashboard.updateLocation", "Update Location")
|
|
466
|
-
})
|
|
467
|
-
]
|
|
468
|
-
}),
|
|
469
|
-
/* @__PURE__ */ w("div", {
|
|
470
|
-
className: "rounded-lg bg-gradient-to-r from-blue-500/10 to-purple-500/10 border border-blue-500/20 p-5",
|
|
471
|
-
children: [
|
|
472
|
-
/* @__PURE__ */ C("h3", {
|
|
473
|
-
className: "text-base font-semibold text-text-primary mb-2",
|
|
474
|
-
children: I("coolandlovely.customerDashboard.specialOffers", "Special Offers")
|
|
475
|
-
}),
|
|
476
|
-
/* @__PURE__ */ C("p", {
|
|
477
|
-
className: "text-xs text-text-secondary mb-3 leading-relaxed",
|
|
478
|
-
children: I("coolandlovely.customerDashboard.specialOffersDescription", "Get 25% off on your next order from featured carts")
|
|
479
|
-
}),
|
|
480
|
-
/* @__PURE__ */ C("button", {
|
|
481
|
-
type: "button",
|
|
482
|
-
onClick: () => E("/customer/carts"),
|
|
483
|
-
className: "w-full rounded-lg bg-foreground px-3 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
484
|
-
children: I("coolandlovely.customerDashboard.viewOffers", "View Offers")
|
|
485
|
-
})
|
|
486
|
-
]
|
|
487
|
-
})
|
|
488
|
-
]
|
|
489
|
-
})]
|
|
490
|
-
})]
|
|
528
|
+
})
|
|
529
|
+
]
|
|
530
|
+
})]
|
|
531
|
+
})
|
|
532
|
+
]
|
|
491
533
|
});
|
|
492
534
|
}
|
|
493
535
|
//#endregion
|
|
494
|
-
export {
|
|
536
|
+
export { A as CustomerDashboard };
|
|
495
537
|
|
|
496
538
|
//# sourceMappingURL=CustomerDashboard.js.map
|