@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.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/kadaikodi/hooks/useKadaikodiApi.js +260 -105
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/HomePage.js +4 -4
- package/dist/kadaikodi/pages/HomePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
- package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js +279 -333
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +299 -372
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +329 -432
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -384
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +276 -279
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +229 -447
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js +34 -46
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +193 -447
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +6 -6
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +255 -215
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/FavoritesPage.js +141 -178
- package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +155 -161
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js +14 -140
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +258 -523
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js +128 -295
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +205 -291
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +426 -514
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +231 -225
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js +197 -301
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +247 -399
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +294 -327
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +179 -397
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +1 -1
- package/dist/kadaikodi/mocks/data.js +0 -1517
- package/dist/kadaikodi/mocks/data.js.map +0 -1
- package/dist/kadaikodi/mocks/users.js +0 -34
- package/dist/kadaikodi/mocks/users.js.map +0 -1
|
@@ -2,407 +2,342 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
|
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
4
|
import { useOrders as r } from "../../hooks/useKadaikodiApi.js";
|
|
5
|
-
import { formatCurrency as i
|
|
6
|
-
import { useState as
|
|
7
|
-
import { AlertTriangle as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { GlassCard as
|
|
5
|
+
import { formatCurrency as i } from "../../utils/formatters.js";
|
|
6
|
+
import { useState as a } from "react";
|
|
7
|
+
import { AlertTriangle as o, BarChart3 as s, Bell as c, Camera as l, ChevronRight as u, Edit3 as d, Heart as f, IndianRupee as p, MapPin as m, Save as h, Settings as g, ShoppingBag as _, User as v, UserCircle as y, X as b } from "lucide-react";
|
|
8
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
9
|
+
import { GlassCard as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/kadaikodi/pages/customer/CustomerProfilePage.tsx
|
|
11
|
-
var
|
|
11
|
+
var T = [
|
|
12
12
|
"vegetarian",
|
|
13
13
|
"vegan",
|
|
14
14
|
"jain",
|
|
15
15
|
"keto",
|
|
16
16
|
"gluten-free",
|
|
17
17
|
"low-carb"
|
|
18
|
-
],
|
|
18
|
+
], E = [
|
|
19
19
|
"nuts",
|
|
20
20
|
"dairy",
|
|
21
21
|
"eggs",
|
|
22
22
|
"soy",
|
|
23
23
|
"shellfish",
|
|
24
24
|
"gluten"
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
area: "Whitefield",
|
|
39
|
-
city: "Bangalore",
|
|
40
|
-
state: "Karnataka",
|
|
41
|
-
pincode: "560066",
|
|
42
|
-
isDefault: !1
|
|
43
|
-
}];
|
|
44
|
-
function M() {
|
|
45
|
-
let { navigateTo: M, currentUser: N } = e(), { data: P = [], isLoading: F } = r({ customerId: N?.id }), [I, L] = o("profile"), [R, z] = o(!1), B = {
|
|
46
|
-
firstName: N?.firstName || N?.name?.split(" ")[0] || "Customer",
|
|
47
|
-
lastName: N?.lastName || N?.name?.split(" ").slice(1).join(" ") || "",
|
|
48
|
-
email: N?.email || "",
|
|
49
|
-
phone: "+91 98765 43210",
|
|
50
|
-
profilePicture: N?.avatar,
|
|
51
|
-
isEmailVerified: !0,
|
|
52
|
-
isPhoneVerified: !0,
|
|
53
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
54
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
55
|
-
}, [V, H] = o({
|
|
56
|
-
firstName: B.firstName,
|
|
57
|
-
lastName: B.lastName,
|
|
58
|
-
email: B.email,
|
|
59
|
-
phone: B.phone,
|
|
25
|
+
];
|
|
26
|
+
function D() {
|
|
27
|
+
let { navigateTo: D, currentUser: O } = e(), { data: k = [], isLoading: A } = r({ customerId: O?.id }), [j, M] = a("profile"), [N, P] = a(!1), F = {
|
|
28
|
+
firstName: O?.firstName || O?.name?.split(" ")[0] || "Customer",
|
|
29
|
+
lastName: O?.lastName || O?.name?.split(" ").slice(1).join(" ") || "",
|
|
30
|
+
email: O?.email || "",
|
|
31
|
+
phone: O?.phone || "",
|
|
32
|
+
profilePicture: O?.avatar
|
|
33
|
+
}, [I, L] = a({
|
|
34
|
+
firstName: F.firstName,
|
|
35
|
+
lastName: F.lastName,
|
|
36
|
+
email: F.email,
|
|
37
|
+
phone: F.phone,
|
|
60
38
|
emergencyContact: {
|
|
61
|
-
name: "
|
|
62
|
-
phone: "
|
|
63
|
-
relationship: "
|
|
39
|
+
name: "",
|
|
40
|
+
phone: "",
|
|
41
|
+
relationship: ""
|
|
64
42
|
},
|
|
65
|
-
dietary: [
|
|
66
|
-
allergies: [
|
|
43
|
+
dietary: [],
|
|
44
|
+
allergies: [],
|
|
67
45
|
notifications: {
|
|
68
46
|
orderUpdates: !0,
|
|
69
47
|
promotions: !0,
|
|
70
48
|
newsletter: !1,
|
|
71
49
|
sms: !0
|
|
72
50
|
}
|
|
73
|
-
}), [
|
|
74
|
-
totalOrders:
|
|
75
|
-
totalSpent:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
H({ ...U }), alert("Preferences saved successfully");
|
|
88
|
-
}, Z = (e, t) => {
|
|
89
|
-
W((n) => ({
|
|
51
|
+
}), [R, z] = a({ ...I }), B = k.reduce((e, t) => e + t.total, 0), V = {
|
|
52
|
+
totalOrders: k.length,
|
|
53
|
+
totalSpent: B,
|
|
54
|
+
avgOrderValue: k.length > 0 ? Math.floor(B / k.length) : 0
|
|
55
|
+
}, H = A, U = () => {
|
|
56
|
+
z({ ...I }), P(!0);
|
|
57
|
+
}, W = () => {
|
|
58
|
+
z({ ...I }), P(!1);
|
|
59
|
+
}, G = () => {
|
|
60
|
+
L({ ...R }), P(!1), alert("Profile updated successfully");
|
|
61
|
+
}, K = () => {
|
|
62
|
+
L({ ...R }), alert("Preferences saved successfully");
|
|
63
|
+
}, q = (e, t) => {
|
|
64
|
+
z((n) => ({
|
|
90
65
|
...n,
|
|
91
66
|
[e]: t
|
|
92
67
|
}));
|
|
93
|
-
},
|
|
94
|
-
|
|
68
|
+
}, J = (e, t) => {
|
|
69
|
+
z((n) => ({
|
|
95
70
|
...n,
|
|
96
71
|
emergencyContact: {
|
|
97
72
|
...n.emergencyContact,
|
|
98
73
|
[e]: t
|
|
99
74
|
}
|
|
100
75
|
}));
|
|
101
|
-
},
|
|
102
|
-
|
|
76
|
+
}, Y = (e, t) => {
|
|
77
|
+
z((n) => ({
|
|
103
78
|
...n,
|
|
104
79
|
notifications: {
|
|
105
80
|
...n.notifications,
|
|
106
81
|
[e]: t
|
|
107
82
|
}
|
|
108
83
|
}));
|
|
109
|
-
},
|
|
110
|
-
|
|
84
|
+
}, X = (e, t, n) => {
|
|
85
|
+
z((r) => {
|
|
111
86
|
let i = r[e], a = n ? [...i, t] : i.filter((e) => e !== t);
|
|
112
87
|
return {
|
|
113
88
|
...r,
|
|
114
89
|
[e]: a
|
|
115
90
|
};
|
|
116
91
|
});
|
|
117
|
-
},
|
|
92
|
+
}, Z = [
|
|
118
93
|
{
|
|
119
94
|
key: "profile",
|
|
120
95
|
label: "Profile Info",
|
|
121
|
-
icon:
|
|
96
|
+
icon: y
|
|
122
97
|
},
|
|
123
98
|
{
|
|
124
99
|
key: "preferences",
|
|
125
100
|
label: "Preferences",
|
|
126
|
-
icon:
|
|
101
|
+
icon: g
|
|
127
102
|
},
|
|
128
103
|
{
|
|
129
104
|
key: "stats",
|
|
130
105
|
label: "My Stats",
|
|
131
|
-
icon:
|
|
106
|
+
icon: s
|
|
132
107
|
}
|
|
133
108
|
];
|
|
134
|
-
return
|
|
109
|
+
return H ? /* @__PURE__ */ x(n, {
|
|
135
110
|
title: "My Profile",
|
|
136
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ S("div", {
|
|
137
112
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ x("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4" }), /* @__PURE__ */ x("p", {
|
|
139
114
|
className: "text-sm text-text-secondary",
|
|
140
115
|
children: "Loading profile..."
|
|
141
116
|
})]
|
|
142
117
|
})
|
|
143
|
-
}) : /* @__PURE__ */
|
|
118
|
+
}) : /* @__PURE__ */ S(n, {
|
|
144
119
|
title: "My Profile",
|
|
145
120
|
description: "Manage your personal information and preferences",
|
|
146
121
|
children: [
|
|
147
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ x(w, {
|
|
148
123
|
className: "mb-6",
|
|
149
|
-
children: "Your account, your way — keep your contact details, delivery address and preferences up to date,
|
|
124
|
+
children: "Your account, your way — keep your contact details, delivery address and preferences up to date, and manage how Kadaikodi reaches you. Accurate details mean smoother orders and deliveries."
|
|
150
125
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ S(C, {
|
|
152
127
|
treatment: "glass",
|
|
153
128
|
glow: !0,
|
|
154
129
|
className: "flex flex-col items-center sm:flex-row sm:items-start gap-6 p-6",
|
|
155
|
-
children: [
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
/* @__PURE__ */ E("div", {
|
|
194
|
-
className: "flex flex-wrap items-center justify-center sm:justify-start gap-2 mt-2",
|
|
195
|
-
children: [/* @__PURE__ */ E("span", {
|
|
196
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", B.isEmailVerified ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
197
|
-
children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), B.isEmailVerified ? "Email Verified" : "Email Not Verified"]
|
|
198
|
-
}), /* @__PURE__ */ E("span", {
|
|
199
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", B.isPhoneVerified ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
200
|
-
children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), B.isPhoneVerified ? "Phone Verified" : "Phone Not Verified"]
|
|
201
|
-
})]
|
|
202
|
-
})
|
|
203
|
-
]
|
|
204
|
-
}),
|
|
205
|
-
/* @__PURE__ */ E("div", {
|
|
206
|
-
className: "text-center sm:text-right",
|
|
207
|
-
children: [/* @__PURE__ */ T("p", {
|
|
208
|
-
className: "text-2xl font-bold text-text-primary",
|
|
209
|
-
children: G.loyaltyPoints
|
|
210
|
-
}), /* @__PURE__ */ T("p", {
|
|
211
|
-
className: "text-xs text-text-secondary",
|
|
212
|
-
children: "Loyalty Points"
|
|
213
|
-
})]
|
|
214
|
-
})
|
|
215
|
-
]
|
|
130
|
+
children: [/* @__PURE__ */ S("div", {
|
|
131
|
+
className: "relative",
|
|
132
|
+
children: [/* @__PURE__ */ x("div", {
|
|
133
|
+
className: "h-24 w-24 rounded-full bg-bg-sunken overflow-hidden",
|
|
134
|
+
children: F.profilePicture ? /* @__PURE__ */ x("img", {
|
|
135
|
+
src: F.profilePicture,
|
|
136
|
+
alt: `${F.firstName} ${F.lastName}`,
|
|
137
|
+
className: "h-full w-full object-cover"
|
|
138
|
+
}) : /* @__PURE__ */ x("div", {
|
|
139
|
+
className: "flex h-full w-full items-center justify-center text-text-secondary",
|
|
140
|
+
children: /* @__PURE__ */ x(v, { className: "h-10 w-10" })
|
|
141
|
+
})
|
|
142
|
+
}), /* @__PURE__ */ x("button", {
|
|
143
|
+
type: "button",
|
|
144
|
+
className: "absolute bottom-0 right-0 flex h-8 w-8 items-center justify-center rounded-full bg-foreground text-background shadow-sm hover:opacity-90 transition-opacity",
|
|
145
|
+
children: /* @__PURE__ */ x(l, { className: "h-4 w-4" })
|
|
146
|
+
})]
|
|
147
|
+
}), /* @__PURE__ */ S("div", {
|
|
148
|
+
className: "flex-1 text-center sm:text-left",
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ S("h2", {
|
|
151
|
+
className: "text-xl font-semibold text-text-primary",
|
|
152
|
+
children: [
|
|
153
|
+
I.firstName,
|
|
154
|
+
" ",
|
|
155
|
+
I.lastName
|
|
156
|
+
]
|
|
157
|
+
}),
|
|
158
|
+
I.email && /* @__PURE__ */ x("p", {
|
|
159
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
160
|
+
children: I.email
|
|
161
|
+
}),
|
|
162
|
+
I.phone && /* @__PURE__ */ x("p", {
|
|
163
|
+
className: "mt-0.5 text-sm text-text-secondary",
|
|
164
|
+
children: I.phone
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
})]
|
|
216
168
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ S("div", {
|
|
218
170
|
className: "mt-6 rounded-lg border border-border-subtle bg-bg-surface",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ x("div", {
|
|
220
172
|
className: "border-b border-border-subtle",
|
|
221
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ x("nav", {
|
|
222
174
|
className: "flex -mb-px overflow-x-auto",
|
|
223
|
-
children:
|
|
175
|
+
children: Z.map((e) => {
|
|
224
176
|
let n = e.icon;
|
|
225
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ S("button", {
|
|
226
178
|
type: "button",
|
|
227
|
-
className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors",
|
|
228
|
-
onClick: () =>
|
|
229
|
-
children: [/* @__PURE__ */
|
|
179
|
+
className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors", j === e.key ? "border-b-2 border-foreground text-text-primary" : "text-text-secondary hover:text-text-primary"),
|
|
180
|
+
onClick: () => M(e.key),
|
|
181
|
+
children: [/* @__PURE__ */ x(n, { className: "h-4 w-4" }), e.label]
|
|
230
182
|
}, e.key);
|
|
231
183
|
})
|
|
232
184
|
})
|
|
233
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ S("div", {
|
|
234
186
|
className: "p-5 md:p-6",
|
|
235
187
|
children: [
|
|
236
|
-
|
|
188
|
+
j === "profile" && /* @__PURE__ */ S("div", {
|
|
237
189
|
className: "space-y-6",
|
|
238
190
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ S("div", {
|
|
240
192
|
className: "flex justify-between items-center",
|
|
241
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
242
194
|
className: "text-lg font-semibold text-text-primary",
|
|
243
195
|
children: "Personal Information"
|
|
244
|
-
}),
|
|
196
|
+
}), N ? /* @__PURE__ */ S("div", {
|
|
245
197
|
className: "flex gap-2",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ S("button", {
|
|
247
199
|
type: "button",
|
|
248
|
-
onClick:
|
|
200
|
+
onClick: G,
|
|
249
201
|
className: "flex items-center gap-1.5 rounded-lg bg-foreground px-3 py-1.5 text-xs font-medium text-background hover:opacity-90 transition-opacity",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
251
|
-
}), /* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ x(h, { className: "h-3 w-3" }), "Save"]
|
|
203
|
+
}), /* @__PURE__ */ S("button", {
|
|
252
204
|
type: "button",
|
|
253
|
-
onClick:
|
|
205
|
+
onClick: W,
|
|
254
206
|
className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ x(b, { className: "h-3 w-3" }), "Cancel"]
|
|
256
208
|
})]
|
|
257
|
-
}) : /* @__PURE__ */
|
|
209
|
+
}) : /* @__PURE__ */ S("button", {
|
|
258
210
|
type: "button",
|
|
259
|
-
onClick:
|
|
211
|
+
onClick: U,
|
|
260
212
|
className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ x(d, { className: "h-3 w-3" }), "Edit Profile"]
|
|
262
214
|
})]
|
|
263
215
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ S("div", {
|
|
265
217
|
className: "grid grid-cols-1 md:grid-cols-2 gap-5",
|
|
266
218
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
268
220
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
269
221
|
children: "First Name"
|
|
270
|
-
}), /* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ x("input", {
|
|
271
223
|
type: "text",
|
|
272
|
-
value:
|
|
273
|
-
onChange: (e) =>
|
|
274
|
-
disabled: !
|
|
275
|
-
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !
|
|
224
|
+
value: N ? R.firstName : I.firstName,
|
|
225
|
+
onChange: (e) => q("firstName", e.target.value),
|
|
226
|
+
disabled: !N,
|
|
227
|
+
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !N && "bg-bg-sunken cursor-not-allowed", N && "bg-bg-surface")
|
|
276
228
|
})] }),
|
|
277
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
278
230
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
279
231
|
children: "Last Name"
|
|
280
|
-
}), /* @__PURE__ */
|
|
232
|
+
}), /* @__PURE__ */ x("input", {
|
|
281
233
|
type: "text",
|
|
282
|
-
value:
|
|
283
|
-
onChange: (e) =>
|
|
284
|
-
disabled: !
|
|
285
|
-
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !
|
|
234
|
+
value: N ? R.lastName : I.lastName,
|
|
235
|
+
onChange: (e) => q("lastName", e.target.value),
|
|
236
|
+
disabled: !N,
|
|
237
|
+
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !N && "bg-bg-sunken cursor-not-allowed", N && "bg-bg-surface")
|
|
286
238
|
})] }),
|
|
287
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
288
240
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
289
241
|
children: "Email"
|
|
290
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ x("input", {
|
|
291
243
|
type: "email",
|
|
292
|
-
value:
|
|
293
|
-
onChange: (e) =>
|
|
294
|
-
disabled: !
|
|
295
|
-
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !
|
|
244
|
+
value: N ? R.email : I.email,
|
|
245
|
+
onChange: (e) => q("email", e.target.value),
|
|
246
|
+
disabled: !N,
|
|
247
|
+
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !N && "bg-bg-sunken cursor-not-allowed", N && "bg-bg-surface")
|
|
296
248
|
})] }),
|
|
297
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
298
250
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
299
251
|
children: "Phone"
|
|
300
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ x("input", {
|
|
301
253
|
type: "tel",
|
|
302
|
-
value:
|
|
303
|
-
onChange: (e) =>
|
|
304
|
-
disabled: !
|
|
305
|
-
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !
|
|
254
|
+
value: N ? R.phone : I.phone,
|
|
255
|
+
onChange: (e) => q("phone", e.target.value),
|
|
256
|
+
disabled: !N,
|
|
257
|
+
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !N && "bg-bg-sunken cursor-not-allowed", N && "bg-bg-surface")
|
|
306
258
|
})] })
|
|
307
259
|
]
|
|
308
260
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h4", {
|
|
310
262
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
311
263
|
children: "Primary Address"
|
|
312
|
-
}), /* @__PURE__ */
|
|
264
|
+
}), /* @__PURE__ */ S("div", {
|
|
313
265
|
className: "rounded-lg bg-bg-sunken/50 p-4",
|
|
314
|
-
children: [
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
className: "
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
", ",
|
|
328
|
-
j[0].state,
|
|
329
|
-
" - ",
|
|
330
|
-
j[0].pincode
|
|
331
|
-
]
|
|
332
|
-
}),
|
|
333
|
-
/* @__PURE__ */ E("button", {
|
|
334
|
-
type: "button",
|
|
335
|
-
onClick: () => M("/customer/addresses"),
|
|
336
|
-
className: "mt-2 flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
|
|
337
|
-
children: [
|
|
338
|
-
/* @__PURE__ */ T(_, { className: "h-3 w-3" }),
|
|
339
|
-
"Manage Addresses",
|
|
340
|
-
/* @__PURE__ */ T(p, { className: "h-3 w-3" })
|
|
341
|
-
]
|
|
342
|
-
})
|
|
343
|
-
]
|
|
266
|
+
children: [/* @__PURE__ */ x("p", {
|
|
267
|
+
className: "text-sm text-text-secondary",
|
|
268
|
+
children: "You haven't saved a delivery address yet. Add one to speed up checkout."
|
|
269
|
+
}), /* @__PURE__ */ S("button", {
|
|
270
|
+
type: "button",
|
|
271
|
+
onClick: () => D("/customer/addresses"),
|
|
272
|
+
className: "mt-2 flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ x(m, { className: "h-3 w-3" }),
|
|
275
|
+
"Manage Addresses",
|
|
276
|
+
/* @__PURE__ */ x(u, { className: "h-3 w-3" })
|
|
277
|
+
]
|
|
278
|
+
})]
|
|
344
279
|
})] }),
|
|
345
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("h4", {
|
|
346
281
|
className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
348
|
-
}), /* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ x(o, { className: "h-4 w-4 text-text-secondary" }), "Emergency Contact"]
|
|
283
|
+
}), /* @__PURE__ */ S("div", {
|
|
349
284
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
350
285
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
352
287
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
353
288
|
children: "Name"
|
|
354
|
-
}), /* @__PURE__ */
|
|
289
|
+
}), /* @__PURE__ */ x("input", {
|
|
355
290
|
type: "text",
|
|
356
|
-
value:
|
|
357
|
-
onChange: (e) =>
|
|
358
|
-
disabled: !
|
|
359
|
-
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !
|
|
291
|
+
value: N ? R.emergencyContact.name : I.emergencyContact.name,
|
|
292
|
+
onChange: (e) => J("name", e.target.value),
|
|
293
|
+
disabled: !N,
|
|
294
|
+
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !N && "bg-bg-sunken cursor-not-allowed", N && "bg-bg-surface")
|
|
360
295
|
})] }),
|
|
361
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
362
297
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
363
298
|
children: "Phone"
|
|
364
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ x("input", {
|
|
365
300
|
type: "tel",
|
|
366
|
-
value:
|
|
367
|
-
onChange: (e) =>
|
|
368
|
-
disabled: !
|
|
369
|
-
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !
|
|
301
|
+
value: N ? R.emergencyContact.phone : I.emergencyContact.phone,
|
|
302
|
+
onChange: (e) => J("phone", e.target.value),
|
|
303
|
+
disabled: !N,
|
|
304
|
+
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !N && "bg-bg-sunken cursor-not-allowed", N && "bg-bg-surface")
|
|
370
305
|
})] }),
|
|
371
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
372
307
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
373
308
|
children: "Relationship"
|
|
374
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ x("input", {
|
|
375
310
|
type: "text",
|
|
376
|
-
value:
|
|
377
|
-
onChange: (e) =>
|
|
378
|
-
disabled: !
|
|
379
|
-
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !
|
|
311
|
+
value: N ? R.emergencyContact.relationship : I.emergencyContact.relationship,
|
|
312
|
+
onChange: (e) => J("relationship", e.target.value),
|
|
313
|
+
disabled: !N,
|
|
314
|
+
className: t("w-full rounded-lg border border-border-subtle px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !N && "bg-bg-sunken cursor-not-allowed", N && "bg-bg-surface")
|
|
380
315
|
})] })
|
|
381
316
|
]
|
|
382
317
|
})] }),
|
|
383
|
-
|
|
318
|
+
N && /* @__PURE__ */ S("div", {
|
|
384
319
|
className: "flex gap-3 pt-4 border-t border-border-subtle",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ S("button", {
|
|
386
321
|
type: "button",
|
|
387
|
-
onClick:
|
|
322
|
+
onClick: G,
|
|
388
323
|
className: "flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
390
|
-
}), /* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ x(h, { className: "h-4 w-4" }), "Save Changes"]
|
|
325
|
+
}), /* @__PURE__ */ x("button", {
|
|
391
326
|
type: "button",
|
|
392
|
-
onClick:
|
|
327
|
+
onClick: W,
|
|
393
328
|
className: "flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
394
329
|
children: "Cancel"
|
|
395
330
|
})]
|
|
396
331
|
})
|
|
397
332
|
]
|
|
398
333
|
}),
|
|
399
|
-
|
|
334
|
+
j === "preferences" && /* @__PURE__ */ S("div", {
|
|
400
335
|
className: "space-y-8",
|
|
401
336
|
children: [
|
|
402
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("h3", {
|
|
403
338
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
405
|
-
}), /* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ x(c, { className: "h-4 w-4 text-text-secondary" }), "Notification Preferences"]
|
|
340
|
+
}), /* @__PURE__ */ x("div", {
|
|
406
341
|
className: "space-y-3",
|
|
407
342
|
children: [
|
|
408
343
|
{
|
|
@@ -421,203 +356,112 @@ function M() {
|
|
|
421
356
|
key: "sms",
|
|
422
357
|
label: "SMS notifications"
|
|
423
358
|
}
|
|
424
|
-
].map((e) => /* @__PURE__ */
|
|
359
|
+
].map((e) => /* @__PURE__ */ S("label", {
|
|
425
360
|
className: "flex items-center gap-3 cursor-pointer",
|
|
426
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ x("input", {
|
|
427
362
|
type: "checkbox",
|
|
428
|
-
checked:
|
|
429
|
-
onChange: (t) =>
|
|
363
|
+
checked: R.notifications[e.key],
|
|
364
|
+
onChange: (t) => Y(e.key, t.target.checked),
|
|
430
365
|
className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-[var(--color-focus-ring)]"
|
|
431
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ x("span", {
|
|
432
367
|
className: "text-sm text-text-primary",
|
|
433
368
|
children: e.label
|
|
434
369
|
})]
|
|
435
370
|
}, e.key))
|
|
436
371
|
})] }),
|
|
437
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("h3", {
|
|
438
373
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
439
|
-
children: [/* @__PURE__ */
|
|
440
|
-
}), /* @__PURE__ */
|
|
374
|
+
children: [/* @__PURE__ */ x(f, { className: "h-4 w-4 text-text-secondary" }), "Dietary Preferences"]
|
|
375
|
+
}), /* @__PURE__ */ x("div", {
|
|
441
376
|
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
|
|
442
|
-
children:
|
|
377
|
+
children: T.map((e) => /* @__PURE__ */ S("label", {
|
|
443
378
|
className: "flex items-center gap-2 cursor-pointer",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
379
|
+
children: [/* @__PURE__ */ x("input", {
|
|
445
380
|
type: "checkbox",
|
|
446
|
-
checked:
|
|
447
|
-
onChange: (t) =>
|
|
381
|
+
checked: R.dietary.includes(e),
|
|
382
|
+
onChange: (t) => X("dietary", e, t.target.checked),
|
|
448
383
|
className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-[var(--color-focus-ring)]"
|
|
449
|
-
}), /* @__PURE__ */
|
|
384
|
+
}), /* @__PURE__ */ x("span", {
|
|
450
385
|
className: "text-sm text-text-primary capitalize",
|
|
451
386
|
children: e
|
|
452
387
|
})]
|
|
453
388
|
}, e))
|
|
454
389
|
})] }),
|
|
455
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("h3", {
|
|
456
391
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
457
|
-
children: [/* @__PURE__ */
|
|
458
|
-
}), /* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ x(o, { className: "h-4 w-4 text-status-error-text" }), "Food Allergies"]
|
|
393
|
+
}), /* @__PURE__ */ x("div", {
|
|
459
394
|
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
|
|
460
|
-
children:
|
|
395
|
+
children: E.map((e) => /* @__PURE__ */ S("label", {
|
|
461
396
|
className: "flex items-center gap-2 cursor-pointer",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ x("input", {
|
|
463
398
|
type: "checkbox",
|
|
464
|
-
checked:
|
|
465
|
-
onChange: (t) =>
|
|
399
|
+
checked: R.allergies.includes(e),
|
|
400
|
+
onChange: (t) => X("allergies", e, t.target.checked),
|
|
466
401
|
className: "h-4 w-4 rounded border-border-subtle text-status-error-text focus:ring-destructive"
|
|
467
|
-
}), /* @__PURE__ */
|
|
402
|
+
}), /* @__PURE__ */ x("span", {
|
|
468
403
|
className: "text-sm text-text-primary capitalize",
|
|
469
404
|
children: e
|
|
470
405
|
})]
|
|
471
406
|
}, e))
|
|
472
407
|
})] }),
|
|
473
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ x("div", {
|
|
474
409
|
className: "pt-4 border-t border-border-subtle",
|
|
475
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ S("button", {
|
|
476
411
|
type: "button",
|
|
477
|
-
onClick:
|
|
412
|
+
onClick: K,
|
|
478
413
|
className: "flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ x(h, { className: "h-4 w-4" }), "Save Preferences"]
|
|
480
415
|
})
|
|
481
416
|
})
|
|
482
417
|
]
|
|
483
418
|
}),
|
|
484
|
-
|
|
419
|
+
j === "stats" && /* @__PURE__ */ x("div", {
|
|
485
420
|
className: "space-y-8",
|
|
486
|
-
children:
|
|
421
|
+
children: /* @__PURE__ */ S("div", {
|
|
487
422
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
488
423
|
children: [
|
|
489
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ S("div", {
|
|
490
425
|
className: "rounded-lg bg-[var(--color-accent-soft)] p-5 border border-border-focus/20",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
426
|
+
children: [/* @__PURE__ */ S("div", {
|
|
492
427
|
className: "flex items-center gap-2 mb-2",
|
|
493
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ x(_, { className: "h-4 w-4 text-text-primary" }), /* @__PURE__ */ x("h4", {
|
|
494
429
|
className: "text-sm font-medium text-text-primary",
|
|
495
430
|
children: "Total Orders"
|
|
496
431
|
})]
|
|
497
|
-
}), /* @__PURE__ */
|
|
432
|
+
}), /* @__PURE__ */ x("p", {
|
|
498
433
|
className: "text-3xl font-bold text-text-primary",
|
|
499
|
-
children:
|
|
434
|
+
children: V.totalOrders
|
|
500
435
|
})]
|
|
501
436
|
}),
|
|
502
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ S("div", {
|
|
503
438
|
className: "rounded-lg bg-status-success-bg-subtle p-5 border border-status-success-text/20",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ S("div", {
|
|
505
440
|
className: "flex items-center gap-2 mb-2",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ x(p, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ x("h4", {
|
|
507
442
|
className: "text-sm font-medium text-status-success-text",
|
|
508
443
|
children: "Total Spent"
|
|
509
444
|
})]
|
|
510
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ x("p", {
|
|
511
446
|
className: "text-3xl font-bold text-status-success-text",
|
|
512
|
-
children: i(
|
|
447
|
+
children: i(V.totalSpent, { minimumFractionDigits: 0 })
|
|
513
448
|
})]
|
|
514
449
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
516
|
-
className: "rounded-lg bg-
|
|
517
|
-
children: [/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ S("div", {
|
|
451
|
+
className: "rounded-lg bg-bg-surface p-5 border border-border-subtle",
|
|
452
|
+
children: [/* @__PURE__ */ S("div", {
|
|
518
453
|
className: "flex items-center gap-2 mb-2",
|
|
519
|
-
children: [/* @__PURE__ */
|
|
454
|
+
children: [/* @__PURE__ */ x(s, { className: "h-4 w-4 text-text-primary" }), /* @__PURE__ */ x("h4", {
|
|
520
455
|
className: "text-sm font-medium text-text-primary",
|
|
521
|
-
children: "
|
|
456
|
+
children: "Avg Order Value"
|
|
522
457
|
})]
|
|
523
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ x("p", {
|
|
524
459
|
className: "text-3xl font-bold text-text-primary",
|
|
525
|
-
children:
|
|
460
|
+
children: i(V.avgOrderValue, { minimumFractionDigits: 0 })
|
|
526
461
|
})]
|
|
527
462
|
})
|
|
528
463
|
]
|
|
529
|
-
})
|
|
530
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
531
|
-
children: [/* @__PURE__ */ E("div", {
|
|
532
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
533
|
-
children: [/* @__PURE__ */ E("h4", {
|
|
534
|
-
className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
535
|
-
children: [/* @__PURE__ */ T(l, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
|
|
536
|
-
}), /* @__PURE__ */ E("div", {
|
|
537
|
-
className: "space-y-3",
|
|
538
|
-
children: [
|
|
539
|
-
/* @__PURE__ */ E("div", {
|
|
540
|
-
className: "flex justify-between",
|
|
541
|
-
children: [/* @__PURE__ */ T("span", {
|
|
542
|
-
className: "text-sm text-text-secondary",
|
|
543
|
-
children: "Average Order Value"
|
|
544
|
-
}), /* @__PURE__ */ T("span", {
|
|
545
|
-
className: "text-sm font-medium text-text-primary",
|
|
546
|
-
children: i(G.avgOrderValue, { minimumFractionDigits: 0 })
|
|
547
|
-
})]
|
|
548
|
-
}),
|
|
549
|
-
/* @__PURE__ */ E("div", {
|
|
550
|
-
className: "flex justify-between",
|
|
551
|
-
children: [/* @__PURE__ */ T("span", {
|
|
552
|
-
className: "text-sm text-text-secondary",
|
|
553
|
-
children: "Favorite Category"
|
|
554
|
-
}), /* @__PURE__ */ T("span", {
|
|
555
|
-
className: "text-sm font-medium text-text-primary",
|
|
556
|
-
children: G.favoriteCategory
|
|
557
|
-
})]
|
|
558
|
-
}),
|
|
559
|
-
/* @__PURE__ */ E("div", {
|
|
560
|
-
className: "flex justify-between",
|
|
561
|
-
children: [/* @__PURE__ */ T("span", {
|
|
562
|
-
className: "text-sm text-text-secondary",
|
|
563
|
-
children: "Member Since"
|
|
564
|
-
}), /* @__PURE__ */ T("span", {
|
|
565
|
-
className: "text-sm font-medium text-text-primary",
|
|
566
|
-
children: a(G.memberSince, {
|
|
567
|
-
hour: void 0,
|
|
568
|
-
minute: void 0,
|
|
569
|
-
hour12: void 0
|
|
570
|
-
})
|
|
571
|
-
})]
|
|
572
|
-
})
|
|
573
|
-
]
|
|
574
|
-
})]
|
|
575
|
-
}), /* @__PURE__ */ E("div", {
|
|
576
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
577
|
-
children: [/* @__PURE__ */ E("h4", {
|
|
578
|
-
className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
579
|
-
children: [/* @__PURE__ */ T(b, { className: "h-4 w-4 text-text-secondary" }), "Account Status"]
|
|
580
|
-
}), /* @__PURE__ */ E("div", {
|
|
581
|
-
className: "space-y-3",
|
|
582
|
-
children: [
|
|
583
|
-
/* @__PURE__ */ E("div", {
|
|
584
|
-
className: "flex justify-between items-center",
|
|
585
|
-
children: [/* @__PURE__ */ T("span", {
|
|
586
|
-
className: "text-sm text-text-secondary",
|
|
587
|
-
children: "Email Verification"
|
|
588
|
-
}), /* @__PURE__ */ T("span", {
|
|
589
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", B.isEmailVerified ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
590
|
-
children: B.isEmailVerified ? "Verified" : "Not Verified"
|
|
591
|
-
})]
|
|
592
|
-
}),
|
|
593
|
-
/* @__PURE__ */ E("div", {
|
|
594
|
-
className: "flex justify-between items-center",
|
|
595
|
-
children: [/* @__PURE__ */ T("span", {
|
|
596
|
-
className: "text-sm text-text-secondary",
|
|
597
|
-
children: "Phone Verification"
|
|
598
|
-
}), /* @__PURE__ */ T("span", {
|
|
599
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", B.isPhoneVerified ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
600
|
-
children: B.isPhoneVerified ? "Verified" : "Not Verified"
|
|
601
|
-
})]
|
|
602
|
-
}),
|
|
603
|
-
/* @__PURE__ */ E("div", {
|
|
604
|
-
className: "flex justify-between",
|
|
605
|
-
children: [/* @__PURE__ */ T("span", {
|
|
606
|
-
className: "text-sm text-text-secondary",
|
|
607
|
-
children: "Last Updated"
|
|
608
|
-
}), /* @__PURE__ */ T("span", {
|
|
609
|
-
className: "text-sm font-medium text-text-primary",
|
|
610
|
-
children: a(B.updatedAt, {
|
|
611
|
-
hour: void 0,
|
|
612
|
-
minute: void 0,
|
|
613
|
-
hour12: void 0
|
|
614
|
-
})
|
|
615
|
-
})]
|
|
616
|
-
})
|
|
617
|
-
]
|
|
618
|
-
})]
|
|
619
|
-
})]
|
|
620
|
-
})]
|
|
464
|
+
})
|
|
621
465
|
})
|
|
622
466
|
]
|
|
623
467
|
})]
|
|
@@ -626,6 +470,6 @@ function M() {
|
|
|
626
470
|
});
|
|
627
471
|
}
|
|
628
472
|
//#endregion
|
|
629
|
-
export {
|
|
473
|
+
export { D as CustomerProfilePage };
|
|
630
474
|
|
|
631
475
|
//# sourceMappingURL=CustomerProfilePage.js.map
|