@burdenoff/microfe-adaptercloud 2026.625.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/adaptercloud/components/PageLayout.js +24 -17
- package/dist/adaptercloud/components/PageLayout.js.map +1 -1
- package/dist/adaptercloud/pages/HomePage.js +18 -16
- package/dist/adaptercloud/pages/HomePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminDashboard.js +70 -44
- package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +60 -55
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +97 -92
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js +59 -57
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +118 -104
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/CartManagementPage.js +145 -140
- package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/UserManagementPage.js +152 -147
- package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +87 -81
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +179 -165
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +73 -48
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +95 -93
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +110 -107
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +293 -299
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +218 -224
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +122 -128
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/HelpSupportPage.js +248 -244
- package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js +96 -91
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/SettingsPage.js +754 -736
- package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDetailPage.js +110 -108
- package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +221 -217
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CheckoutPage.js +89 -87
- package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js +410 -381
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +120 -118
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +86 -81
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/FavoritesPage.js +53 -51
- package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +114 -109
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +60 -58
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +87 -72
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/ReviewsPage.js +65 -63
- package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +68 -53
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +86 -84
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +57 -55
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js +341 -308
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +34 -32
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +48 -46
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +383 -381
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +348 -319
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js +84 -59
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +73 -71
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +76 -74
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +70 -68
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -6,22 +6,23 @@ import { formatCurrency as i, formatDate as a } from "../../utils/formatters.js"
|
|
|
6
6
|
import { useState as o } from "react";
|
|
7
7
|
import { AlertTriangle as s, Award as c, BarChart3 as l, Bell as u, Camera as d, CheckCircle2 as f, ChevronRight as p, Edit3 as m, Heart as h, IndianRupee as g, MapPin as _, Save as v, Settings as y, Shield as b, ShoppingBag as x, User as S, UserCircle as C, X as w } from "lucide-react";
|
|
8
8
|
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as D } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/adaptercloud/pages/customer/CustomerProfilePage.tsx
|
|
10
|
-
var
|
|
11
|
+
var O = [
|
|
11
12
|
"vegetarian",
|
|
12
13
|
"vegan",
|
|
13
14
|
"jain",
|
|
14
15
|
"keto",
|
|
15
16
|
"gluten-free",
|
|
16
17
|
"low-carb"
|
|
17
|
-
],
|
|
18
|
+
], k = [
|
|
18
19
|
"nuts",
|
|
19
20
|
"dairy",
|
|
20
21
|
"eggs",
|
|
21
22
|
"soy",
|
|
22
23
|
"shellfish",
|
|
23
24
|
"gluten"
|
|
24
|
-
],
|
|
25
|
+
], A = [{
|
|
25
26
|
id: "addr-1",
|
|
26
27
|
label: "Home",
|
|
27
28
|
street: "123, MG Road",
|
|
@@ -40,22 +41,22 @@ var D = [
|
|
|
40
41
|
pincode: "560066",
|
|
41
42
|
isDefault: !1
|
|
42
43
|
}];
|
|
43
|
-
function
|
|
44
|
-
let { navigateTo:
|
|
45
|
-
firstName:
|
|
46
|
-
lastName:
|
|
47
|
-
email:
|
|
44
|
+
function j() {
|
|
45
|
+
let { navigateTo: j, currentUser: M } = e(), { data: N = [], isLoading: P } = r({ customerId: M?.id }), [F, I] = o("profile"), [L, R] = o(!1), z = {
|
|
46
|
+
firstName: M?.firstName || M?.name?.split(" ")[0] || "Customer",
|
|
47
|
+
lastName: M?.lastName || M?.name?.split(" ").slice(1).join(" ") || "",
|
|
48
|
+
email: M?.email || "",
|
|
48
49
|
phone: "+91 98765 43210",
|
|
49
|
-
profilePicture:
|
|
50
|
+
profilePicture: M?.avatar,
|
|
50
51
|
isEmailVerified: !0,
|
|
51
52
|
isPhoneVerified: !0,
|
|
52
53
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
53
54
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
54
|
-
}, [
|
|
55
|
-
firstName:
|
|
56
|
-
lastName:
|
|
57
|
-
email:
|
|
58
|
-
phone:
|
|
55
|
+
}, [B, V] = o({
|
|
56
|
+
firstName: z.firstName,
|
|
57
|
+
lastName: z.lastName,
|
|
58
|
+
email: z.email,
|
|
59
|
+
phone: z.phone,
|
|
59
60
|
emergencyContact: {
|
|
60
61
|
name: "Priya Sharma",
|
|
61
62
|
phone: "+91 98765 43211",
|
|
@@ -69,51 +70,51 @@ function A() {
|
|
|
69
70
|
newsletter: !1,
|
|
70
71
|
sms: !0
|
|
71
72
|
}
|
|
72
|
-
}), [
|
|
73
|
-
totalOrders:
|
|
74
|
-
totalSpent:
|
|
75
|
-
loyaltyPoints: Math.floor(
|
|
76
|
-
avgOrderValue:
|
|
73
|
+
}), [H, U] = o({ ...B }), W = {
|
|
74
|
+
totalOrders: N.length,
|
|
75
|
+
totalSpent: N.reduce((e, t) => e + t.total, 0),
|
|
76
|
+
loyaltyPoints: Math.floor(N.reduce((e, t) => e + t.total, 0) / 10),
|
|
77
|
+
avgOrderValue: N.length > 0 ? Math.floor(N.reduce((e, t) => e + t.total, 0) / N.length) : 0,
|
|
77
78
|
favoriteCategory: "South Indian",
|
|
78
|
-
memberSince:
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
}, K = () => {
|
|
82
|
-
H({ ...z }), L(!1);
|
|
79
|
+
memberSince: z.createdAt
|
|
80
|
+
}, G = P, K = () => {
|
|
81
|
+
U({ ...B }), R(!0);
|
|
83
82
|
}, q = () => {
|
|
84
|
-
|
|
83
|
+
U({ ...B }), R(!1);
|
|
85
84
|
}, J = () => {
|
|
86
|
-
|
|
87
|
-
}, Y = (
|
|
88
|
-
H
|
|
85
|
+
V({ ...H }), R(!1), alert("Profile updated successfully");
|
|
86
|
+
}, Y = () => {
|
|
87
|
+
V({ ...H }), alert("Preferences saved successfully");
|
|
88
|
+
}, X = (e, t) => {
|
|
89
|
+
U((n) => ({
|
|
89
90
|
...n,
|
|
90
91
|
[e]: t
|
|
91
92
|
}));
|
|
92
|
-
},
|
|
93
|
-
|
|
93
|
+
}, Z = (e, t) => {
|
|
94
|
+
U((n) => ({
|
|
94
95
|
...n,
|
|
95
96
|
emergencyContact: {
|
|
96
97
|
...n.emergencyContact,
|
|
97
98
|
[e]: t
|
|
98
99
|
}
|
|
99
100
|
}));
|
|
100
|
-
},
|
|
101
|
-
|
|
101
|
+
}, Q = (e, t) => {
|
|
102
|
+
U((n) => ({
|
|
102
103
|
...n,
|
|
103
104
|
notifications: {
|
|
104
105
|
...n.notifications,
|
|
105
106
|
[e]: t
|
|
106
107
|
}
|
|
107
108
|
}));
|
|
108
|
-
},
|
|
109
|
-
|
|
109
|
+
}, $ = (e, t, n) => {
|
|
110
|
+
U((r) => {
|
|
110
111
|
let i = r[e], a = n ? [...i, t] : i.filter((e) => e !== t);
|
|
111
112
|
return {
|
|
112
113
|
...r,
|
|
113
114
|
[e]: a
|
|
114
115
|
};
|
|
115
116
|
});
|
|
116
|
-
},
|
|
117
|
+
}, ee = [
|
|
117
118
|
{
|
|
118
119
|
key: "profile",
|
|
119
120
|
label: "Profile Info",
|
|
@@ -130,7 +131,7 @@ function A() {
|
|
|
130
131
|
icon: l
|
|
131
132
|
}
|
|
132
133
|
];
|
|
133
|
-
return
|
|
134
|
+
return G ? /* @__PURE__ */ T(n, {
|
|
134
135
|
title: "My Profile",
|
|
135
136
|
children: /* @__PURE__ */ E("div", {
|
|
136
137
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
@@ -142,16 +143,17 @@ function A() {
|
|
|
142
143
|
}) : /* @__PURE__ */ E(n, {
|
|
143
144
|
title: "My Profile",
|
|
144
145
|
description: "Manage your personal information and preferences",
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
purpose: "Keep your account details current — your name, contact info, and preferences. Accurate details mean smoother checkouts, correct delivery contact, and notifications that actually reach you.",
|
|
147
|
+
children: [/* @__PURE__ */ E(D, {
|
|
148
|
+
className: "flex flex-col items-center sm:flex-row sm:items-start gap-6",
|
|
147
149
|
children: [
|
|
148
150
|
/* @__PURE__ */ E("div", {
|
|
149
151
|
className: "relative",
|
|
150
152
|
children: [/* @__PURE__ */ T("div", {
|
|
151
153
|
className: "h-24 w-24 rounded-full bg-bg-sunken overflow-hidden",
|
|
152
|
-
children:
|
|
153
|
-
src:
|
|
154
|
-
alt: `${
|
|
154
|
+
children: z.profilePicture ? /* @__PURE__ */ T("img", {
|
|
155
|
+
src: z.profilePicture,
|
|
156
|
+
alt: `${z.firstName} ${z.lastName}`,
|
|
155
157
|
className: "h-full w-full object-cover"
|
|
156
158
|
}) : /* @__PURE__ */ T("div", {
|
|
157
159
|
className: "flex h-full w-full items-center justify-center text-text-secondary",
|
|
@@ -169,27 +171,27 @@ function A() {
|
|
|
169
171
|
/* @__PURE__ */ E("h2", {
|
|
170
172
|
className: "text-xl font-semibold text-text-primary",
|
|
171
173
|
children: [
|
|
172
|
-
|
|
174
|
+
B.firstName,
|
|
173
175
|
" ",
|
|
174
|
-
|
|
176
|
+
B.lastName
|
|
175
177
|
]
|
|
176
178
|
}),
|
|
177
179
|
/* @__PURE__ */ T("p", {
|
|
178
180
|
className: "mt-1 text-sm text-text-secondary",
|
|
179
|
-
children:
|
|
181
|
+
children: B.email
|
|
180
182
|
}),
|
|
181
183
|
/* @__PURE__ */ T("p", {
|
|
182
184
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
183
|
-
children:
|
|
185
|
+
children: B.phone
|
|
184
186
|
}),
|
|
185
187
|
/* @__PURE__ */ E("div", {
|
|
186
188
|
className: "flex flex-wrap items-center justify-center sm:justify-start gap-2 mt-2",
|
|
187
189
|
children: [/* @__PURE__ */ E("span", {
|
|
188
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium",
|
|
189
|
-
children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }),
|
|
190
|
+
className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", z.isEmailVerified ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
191
|
+
children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), z.isEmailVerified ? "Email Verified" : "Email Not Verified"]
|
|
190
192
|
}), /* @__PURE__ */ E("span", {
|
|
191
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium",
|
|
192
|
-
children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }),
|
|
193
|
+
className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", z.isPhoneVerified ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
194
|
+
children: [/* @__PURE__ */ T(f, { className: "h-3 w-3" }), z.isPhoneVerified ? "Phone Verified" : "Phone Not Verified"]
|
|
193
195
|
})]
|
|
194
196
|
})
|
|
195
197
|
]
|
|
@@ -198,7 +200,7 @@ function A() {
|
|
|
198
200
|
className: "text-center sm:text-right",
|
|
199
201
|
children: [/* @__PURE__ */ T("p", {
|
|
200
202
|
className: "text-2xl font-bold text-text-primary",
|
|
201
|
-
children:
|
|
203
|
+
children: W.loyaltyPoints
|
|
202
204
|
}), /* @__PURE__ */ T("p", {
|
|
203
205
|
className: "text-xs text-text-secondary",
|
|
204
206
|
children: "Loyalty Points"
|
|
@@ -211,12 +213,12 @@ function A() {
|
|
|
211
213
|
className: "border-b border-border-subtle",
|
|
212
214
|
children: /* @__PURE__ */ T("nav", {
|
|
213
215
|
className: "flex -mb-px overflow-x-auto",
|
|
214
|
-
children:
|
|
216
|
+
children: ee.map((e) => {
|
|
215
217
|
let n = e.icon;
|
|
216
218
|
return /* @__PURE__ */ E("button", {
|
|
217
219
|
type: "button",
|
|
218
|
-
className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors",
|
|
219
|
-
onClick: () =>
|
|
220
|
+
className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors", F === e.key ? "border-b-2 border-foreground text-text-primary" : "text-text-secondary hover:text-text-primary"),
|
|
221
|
+
onClick: () => I(e.key),
|
|
220
222
|
children: [/* @__PURE__ */ T(n, { className: "h-4 w-4" }), e.label]
|
|
221
223
|
}, e.key);
|
|
222
224
|
})
|
|
@@ -224,7 +226,7 @@ function A() {
|
|
|
224
226
|
}), /* @__PURE__ */ E("div", {
|
|
225
227
|
className: "p-5 md:p-6",
|
|
226
228
|
children: [
|
|
227
|
-
|
|
229
|
+
F === "profile" && /* @__PURE__ */ E("div", {
|
|
228
230
|
className: "space-y-6",
|
|
229
231
|
children: [
|
|
230
232
|
/* @__PURE__ */ E("div", {
|
|
@@ -232,22 +234,22 @@ function A() {
|
|
|
232
234
|
children: [/* @__PURE__ */ T("h3", {
|
|
233
235
|
className: "text-lg font-semibold text-text-primary",
|
|
234
236
|
children: "Personal Information"
|
|
235
|
-
}),
|
|
237
|
+
}), L ? /* @__PURE__ */ E("div", {
|
|
236
238
|
className: "flex gap-2",
|
|
237
239
|
children: [/* @__PURE__ */ E("button", {
|
|
238
240
|
type: "button",
|
|
239
|
-
onClick:
|
|
241
|
+
onClick: J,
|
|
240
242
|
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",
|
|
241
243
|
children: [/* @__PURE__ */ T(v, { className: "h-3 w-3" }), "Save"]
|
|
242
244
|
}), /* @__PURE__ */ E("button", {
|
|
243
245
|
type: "button",
|
|
244
|
-
onClick:
|
|
246
|
+
onClick: q,
|
|
245
247
|
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",
|
|
246
248
|
children: [/* @__PURE__ */ T(w, { className: "h-3 w-3" }), "Cancel"]
|
|
247
249
|
})]
|
|
248
250
|
}) : /* @__PURE__ */ E("button", {
|
|
249
251
|
type: "button",
|
|
250
|
-
onClick:
|
|
252
|
+
onClick: K,
|
|
251
253
|
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",
|
|
252
254
|
children: [/* @__PURE__ */ T(m, { className: "h-3 w-3" }), "Edit Profile"]
|
|
253
255
|
})]
|
|
@@ -260,40 +262,40 @@ function A() {
|
|
|
260
262
|
children: "First Name"
|
|
261
263
|
}), /* @__PURE__ */ T("input", {
|
|
262
264
|
type: "text",
|
|
263
|
-
value:
|
|
264
|
-
onChange: (e) =>
|
|
265
|
-
disabled: !
|
|
266
|
-
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)]", !
|
|
265
|
+
value: L ? H.firstName : B.firstName,
|
|
266
|
+
onChange: (e) => X("firstName", e.target.value),
|
|
267
|
+
disabled: !L,
|
|
268
|
+
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)]", !L && "bg-bg-sunken cursor-not-allowed", L && "bg-bg-surface")
|
|
267
269
|
})] }),
|
|
268
270
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
269
271
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
270
272
|
children: "Last Name"
|
|
271
273
|
}), /* @__PURE__ */ T("input", {
|
|
272
274
|
type: "text",
|
|
273
|
-
value:
|
|
274
|
-
onChange: (e) =>
|
|
275
|
-
disabled: !
|
|
276
|
-
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)]", !
|
|
275
|
+
value: L ? H.lastName : B.lastName,
|
|
276
|
+
onChange: (e) => X("lastName", e.target.value),
|
|
277
|
+
disabled: !L,
|
|
278
|
+
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)]", !L && "bg-bg-sunken cursor-not-allowed", L && "bg-bg-surface")
|
|
277
279
|
})] }),
|
|
278
280
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
279
281
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
280
282
|
children: "Email"
|
|
281
283
|
}), /* @__PURE__ */ T("input", {
|
|
282
284
|
type: "email",
|
|
283
|
-
value:
|
|
284
|
-
onChange: (e) =>
|
|
285
|
-
disabled: !
|
|
286
|
-
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)]", !
|
|
285
|
+
value: L ? H.email : B.email,
|
|
286
|
+
onChange: (e) => X("email", e.target.value),
|
|
287
|
+
disabled: !L,
|
|
288
|
+
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)]", !L && "bg-bg-sunken cursor-not-allowed", L && "bg-bg-surface")
|
|
287
289
|
})] }),
|
|
288
290
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
289
291
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
290
292
|
children: "Phone"
|
|
291
293
|
}), /* @__PURE__ */ T("input", {
|
|
292
294
|
type: "tel",
|
|
293
|
-
value:
|
|
294
|
-
onChange: (e) =>
|
|
295
|
-
disabled: !
|
|
296
|
-
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)]", !
|
|
295
|
+
value: L ? H.phone : B.phone,
|
|
296
|
+
onChange: (e) => X("phone", e.target.value),
|
|
297
|
+
disabled: !L,
|
|
298
|
+
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)]", !L && "bg-bg-sunken cursor-not-allowed", L && "bg-bg-surface")
|
|
297
299
|
})] })
|
|
298
300
|
]
|
|
299
301
|
}),
|
|
@@ -305,25 +307,25 @@ function A() {
|
|
|
305
307
|
children: [
|
|
306
308
|
/* @__PURE__ */ T("p", {
|
|
307
309
|
className: "text-sm font-medium text-text-primary",
|
|
308
|
-
children:
|
|
310
|
+
children: A[0].street
|
|
309
311
|
}),
|
|
310
312
|
/* @__PURE__ */ T("p", {
|
|
311
313
|
className: "text-sm text-text-secondary",
|
|
312
|
-
children:
|
|
314
|
+
children: A[0].area
|
|
313
315
|
}),
|
|
314
316
|
/* @__PURE__ */ E("p", {
|
|
315
317
|
className: "text-sm text-text-secondary",
|
|
316
318
|
children: [
|
|
317
|
-
|
|
319
|
+
A[0].city,
|
|
318
320
|
", ",
|
|
319
|
-
|
|
321
|
+
A[0].state,
|
|
320
322
|
" - ",
|
|
321
|
-
|
|
323
|
+
A[0].pincode
|
|
322
324
|
]
|
|
323
325
|
}),
|
|
324
326
|
/* @__PURE__ */ E("button", {
|
|
325
327
|
type: "button",
|
|
326
|
-
onClick: () =>
|
|
328
|
+
onClick: () => j("/customer/addresses"),
|
|
327
329
|
className: "mt-2 flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
|
|
328
330
|
children: [
|
|
329
331
|
/* @__PURE__ */ T(_, { className: "h-3 w-3" }),
|
|
@@ -344,50 +346,50 @@ function A() {
|
|
|
344
346
|
children: "Name"
|
|
345
347
|
}), /* @__PURE__ */ T("input", {
|
|
346
348
|
type: "text",
|
|
347
|
-
value:
|
|
348
|
-
onChange: (e) =>
|
|
349
|
-
disabled: !
|
|
350
|
-
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)]", !
|
|
349
|
+
value: L ? H.emergencyContact.name : B.emergencyContact.name,
|
|
350
|
+
onChange: (e) => Z("name", e.target.value),
|
|
351
|
+
disabled: !L,
|
|
352
|
+
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)]", !L && "bg-bg-sunken cursor-not-allowed", L && "bg-bg-surface")
|
|
351
353
|
})] }),
|
|
352
354
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
353
355
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
354
356
|
children: "Phone"
|
|
355
357
|
}), /* @__PURE__ */ T("input", {
|
|
356
358
|
type: "tel",
|
|
357
|
-
value:
|
|
358
|
-
onChange: (e) =>
|
|
359
|
-
disabled: !
|
|
360
|
-
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)]", !
|
|
359
|
+
value: L ? H.emergencyContact.phone : B.emergencyContact.phone,
|
|
360
|
+
onChange: (e) => Z("phone", e.target.value),
|
|
361
|
+
disabled: !L,
|
|
362
|
+
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)]", !L && "bg-bg-sunken cursor-not-allowed", L && "bg-bg-surface")
|
|
361
363
|
})] }),
|
|
362
364
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
363
365
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
364
366
|
children: "Relationship"
|
|
365
367
|
}), /* @__PURE__ */ T("input", {
|
|
366
368
|
type: "text",
|
|
367
|
-
value:
|
|
368
|
-
onChange: (e) =>
|
|
369
|
-
disabled: !
|
|
370
|
-
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)]", !
|
|
369
|
+
value: L ? H.emergencyContact.relationship : B.emergencyContact.relationship,
|
|
370
|
+
onChange: (e) => Z("relationship", e.target.value),
|
|
371
|
+
disabled: !L,
|
|
372
|
+
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)]", !L && "bg-bg-sunken cursor-not-allowed", L && "bg-bg-surface")
|
|
371
373
|
})] })
|
|
372
374
|
]
|
|
373
375
|
})] }),
|
|
374
|
-
|
|
376
|
+
L && /* @__PURE__ */ E("div", {
|
|
375
377
|
className: "flex gap-3 pt-4 border-t border-border-subtle",
|
|
376
378
|
children: [/* @__PURE__ */ E("button", {
|
|
377
379
|
type: "button",
|
|
378
|
-
onClick:
|
|
380
|
+
onClick: J,
|
|
379
381
|
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",
|
|
380
382
|
children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Save Changes"]
|
|
381
383
|
}), /* @__PURE__ */ T("button", {
|
|
382
384
|
type: "button",
|
|
383
|
-
onClick:
|
|
385
|
+
onClick: q,
|
|
384
386
|
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",
|
|
385
387
|
children: "Cancel"
|
|
386
388
|
})]
|
|
387
389
|
})
|
|
388
390
|
]
|
|
389
391
|
}),
|
|
390
|
-
|
|
392
|
+
F === "preferences" && /* @__PURE__ */ E("div", {
|
|
391
393
|
className: "space-y-8",
|
|
392
394
|
children: [
|
|
393
395
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
|
|
@@ -416,8 +418,8 @@ function A() {
|
|
|
416
418
|
className: "flex items-center gap-3 cursor-pointer",
|
|
417
419
|
children: [/* @__PURE__ */ T("input", {
|
|
418
420
|
type: "checkbox",
|
|
419
|
-
checked:
|
|
420
|
-
onChange: (t) =>
|
|
421
|
+
checked: H.notifications[e.key],
|
|
422
|
+
onChange: (t) => Q(e.key, t.target.checked),
|
|
421
423
|
className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-[var(--color-focus-ring)]"
|
|
422
424
|
}), /* @__PURE__ */ T("span", {
|
|
423
425
|
className: "text-sm text-text-primary",
|
|
@@ -430,12 +432,12 @@ function A() {
|
|
|
430
432
|
children: [/* @__PURE__ */ T(h, { className: "h-4 w-4 text-text-secondary" }), "Dietary Preferences"]
|
|
431
433
|
}), /* @__PURE__ */ T("div", {
|
|
432
434
|
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
|
|
433
|
-
children:
|
|
435
|
+
children: O.map((e) => /* @__PURE__ */ E("label", {
|
|
434
436
|
className: "flex items-center gap-2 cursor-pointer",
|
|
435
437
|
children: [/* @__PURE__ */ T("input", {
|
|
436
438
|
type: "checkbox",
|
|
437
|
-
checked:
|
|
438
|
-
onChange: (t) =>
|
|
439
|
+
checked: H.dietary.includes(e),
|
|
440
|
+
onChange: (t) => $("dietary", e, t.target.checked),
|
|
439
441
|
className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-[var(--color-focus-ring)]"
|
|
440
442
|
}), /* @__PURE__ */ T("span", {
|
|
441
443
|
className: "text-sm text-text-primary capitalize",
|
|
@@ -448,12 +450,12 @@ function A() {
|
|
|
448
450
|
children: [/* @__PURE__ */ T(s, { className: "h-4 w-4 text-status-error-text" }), "Food Allergies"]
|
|
449
451
|
}), /* @__PURE__ */ T("div", {
|
|
450
452
|
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
|
|
451
|
-
children:
|
|
453
|
+
children: k.map((e) => /* @__PURE__ */ E("label", {
|
|
452
454
|
className: "flex items-center gap-2 cursor-pointer",
|
|
453
455
|
children: [/* @__PURE__ */ T("input", {
|
|
454
456
|
type: "checkbox",
|
|
455
|
-
checked:
|
|
456
|
-
onChange: (t) =>
|
|
457
|
+
checked: H.allergies.includes(e),
|
|
458
|
+
onChange: (t) => $("allergies", e, t.target.checked),
|
|
457
459
|
className: "h-4 w-4 rounded border-border-subtle text-status-error-text focus:ring-destructive"
|
|
458
460
|
}), /* @__PURE__ */ T("span", {
|
|
459
461
|
className: "text-sm text-text-primary capitalize",
|
|
@@ -465,14 +467,14 @@ function A() {
|
|
|
465
467
|
className: "pt-4 border-t border-border-subtle",
|
|
466
468
|
children: /* @__PURE__ */ E("button", {
|
|
467
469
|
type: "button",
|
|
468
|
-
onClick:
|
|
470
|
+
onClick: Y,
|
|
469
471
|
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",
|
|
470
472
|
children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Save Preferences"]
|
|
471
473
|
})
|
|
472
474
|
})
|
|
473
475
|
]
|
|
474
476
|
}),
|
|
475
|
-
|
|
477
|
+
F === "stats" && /* @__PURE__ */ E("div", {
|
|
476
478
|
className: "space-y-8",
|
|
477
479
|
children: [/* @__PURE__ */ E("div", {
|
|
478
480
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
@@ -487,7 +489,7 @@ function A() {
|
|
|
487
489
|
})]
|
|
488
490
|
}), /* @__PURE__ */ T("p", {
|
|
489
491
|
className: "text-3xl font-bold text-accent-blue",
|
|
490
|
-
children:
|
|
492
|
+
children: W.totalOrders
|
|
491
493
|
})]
|
|
492
494
|
}),
|
|
493
495
|
/* @__PURE__ */ E("div", {
|
|
@@ -500,7 +502,7 @@ function A() {
|
|
|
500
502
|
})]
|
|
501
503
|
}), /* @__PURE__ */ T("p", {
|
|
502
504
|
className: "text-3xl font-bold text-status-success-text",
|
|
503
|
-
children: i(
|
|
505
|
+
children: i(W.totalSpent, { minimumFractionDigits: 0 })
|
|
504
506
|
})]
|
|
505
507
|
}),
|
|
506
508
|
/* @__PURE__ */ E("div", {
|
|
@@ -513,7 +515,7 @@ function A() {
|
|
|
513
515
|
})]
|
|
514
516
|
}), /* @__PURE__ */ T("p", {
|
|
515
517
|
className: "text-3xl font-bold text-accent-purple",
|
|
516
|
-
children:
|
|
518
|
+
children: W.loyaltyPoints
|
|
517
519
|
})]
|
|
518
520
|
})
|
|
519
521
|
]
|
|
@@ -534,7 +536,7 @@ function A() {
|
|
|
534
536
|
children: "Average Order Value"
|
|
535
537
|
}), /* @__PURE__ */ T("span", {
|
|
536
538
|
className: "text-sm font-medium text-text-primary",
|
|
537
|
-
children: i(
|
|
539
|
+
children: i(W.avgOrderValue, { minimumFractionDigits: 0 })
|
|
538
540
|
})]
|
|
539
541
|
}),
|
|
540
542
|
/* @__PURE__ */ E("div", {
|
|
@@ -544,7 +546,7 @@ function A() {
|
|
|
544
546
|
children: "Favorite Category"
|
|
545
547
|
}), /* @__PURE__ */ T("span", {
|
|
546
548
|
className: "text-sm font-medium text-text-primary",
|
|
547
|
-
children:
|
|
549
|
+
children: W.favoriteCategory
|
|
548
550
|
})]
|
|
549
551
|
}),
|
|
550
552
|
/* @__PURE__ */ E("div", {
|
|
@@ -554,7 +556,7 @@ function A() {
|
|
|
554
556
|
children: "Member Since"
|
|
555
557
|
}), /* @__PURE__ */ T("span", {
|
|
556
558
|
className: "text-sm font-medium text-text-primary",
|
|
557
|
-
children: a(
|
|
559
|
+
children: a(W.memberSince, {
|
|
558
560
|
hour: void 0,
|
|
559
561
|
minute: void 0,
|
|
560
562
|
hour12: void 0
|
|
@@ -577,8 +579,8 @@ function A() {
|
|
|
577
579
|
className: "text-sm text-text-secondary",
|
|
578
580
|
children: "Email Verification"
|
|
579
581
|
}), /* @__PURE__ */ T("span", {
|
|
580
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",
|
|
581
|
-
children:
|
|
582
|
+
className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", z.isEmailVerified ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
583
|
+
children: z.isEmailVerified ? "Verified" : "Not Verified"
|
|
582
584
|
})]
|
|
583
585
|
}),
|
|
584
586
|
/* @__PURE__ */ E("div", {
|
|
@@ -587,8 +589,8 @@ function A() {
|
|
|
587
589
|
className: "text-sm text-text-secondary",
|
|
588
590
|
children: "Phone Verification"
|
|
589
591
|
}), /* @__PURE__ */ T("span", {
|
|
590
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",
|
|
591
|
-
children:
|
|
592
|
+
className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", z.isPhoneVerified ? "bg-status-success-bg-subtle/20 text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
|
|
593
|
+
children: z.isPhoneVerified ? "Verified" : "Not Verified"
|
|
592
594
|
})]
|
|
593
595
|
}),
|
|
594
596
|
/* @__PURE__ */ E("div", {
|
|
@@ -598,7 +600,7 @@ function A() {
|
|
|
598
600
|
children: "Last Updated"
|
|
599
601
|
}), /* @__PURE__ */ T("span", {
|
|
600
602
|
className: "text-sm font-medium text-text-primary",
|
|
601
|
-
children: a(
|
|
603
|
+
children: a(z.updatedAt, {
|
|
602
604
|
hour: void 0,
|
|
603
605
|
minute: void 0,
|
|
604
606
|
hour12: void 0
|
|
@@ -616,6 +618,6 @@ function A() {
|
|
|
616
618
|
});
|
|
617
619
|
}
|
|
618
620
|
//#endregion
|
|
619
|
-
export {
|
|
621
|
+
export { j as CustomerProfilePage };
|
|
620
622
|
|
|
621
623
|
//# sourceMappingURL=CustomerProfilePage.js.map
|