@burdenoff/microfe-kadaikodi 2026.704.2 → 2026.704.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kadaikodi/KadaikodiRoutes.js +30 -26
- package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +45 -107
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminDashboard.js +30 -32
- package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +137 -120
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +2 -2
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
- 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 -4
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +6 -6
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
- package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,18 +4,18 @@ import { PageLayout as n } from "../../components/PageLayout.js";
|
|
|
4
4
|
import { useOrders as r } from "../../hooks/useKadaikodiApi.js";
|
|
5
5
|
import { formatCurrency as i } from "../../utils/formatters.js";
|
|
6
6
|
import { useState as a } from "react";
|
|
7
|
-
import { AlertTriangle as o, BarChart3 as s, Bell as c,
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { GlassCard as
|
|
7
|
+
import { AlertTriangle as o, BarChart3 as s, Bell as c, CheckCircle2 as l, ChevronRight as u, Heart as d, IndianRupee as f, MapPin as p, Save as m, Settings as h, Shield as g, ShoppingBag as _, User as v, UserCircle as y } from "lucide-react";
|
|
8
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
9
|
+
import { GlassCard as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/kadaikodi/pages/customer/CustomerProfilePage.tsx
|
|
11
|
-
var
|
|
11
|
+
var w = [
|
|
12
12
|
"vegetarian",
|
|
13
13
|
"vegan",
|
|
14
14
|
"jain",
|
|
15
15
|
"keto",
|
|
16
16
|
"gluten-free",
|
|
17
17
|
"low-carb"
|
|
18
|
-
],
|
|
18
|
+
], T = [
|
|
19
19
|
"nuts",
|
|
20
20
|
"dairy",
|
|
21
21
|
"eggs",
|
|
@@ -23,13 +23,15 @@ var T = [
|
|
|
23
23
|
"shellfish",
|
|
24
24
|
"gluten"
|
|
25
25
|
];
|
|
26
|
-
function
|
|
27
|
-
let { navigateTo:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
function E() {
|
|
27
|
+
let { navigateTo: E, currentUser: D } = e(), { data: O = [], isLoading: k } = r({ customerId: D?.id }), [A, j] = a("profile"), [M, N] = a(null), P = (e) => {
|
|
28
|
+
N(e), setTimeout(() => N(null), 3e3);
|
|
29
|
+
}, F = {
|
|
30
|
+
firstName: D?.firstName || D?.name?.split(" ")[0] || "Customer",
|
|
31
|
+
lastName: D?.lastName || D?.name?.split(" ").slice(1).join(" ") || "",
|
|
32
|
+
email: D?.email || "",
|
|
33
|
+
phone: D?.phone || "",
|
|
34
|
+
profilePicture: D?.avatar
|
|
33
35
|
}, [I, L] = a({
|
|
34
36
|
firstName: F.firstName,
|
|
35
37
|
lastName: F.lastName,
|
|
@@ -48,24 +50,13 @@ function D() {
|
|
|
48
50
|
newsletter: !1,
|
|
49
51
|
sms: !0
|
|
50
52
|
}
|
|
51
|
-
}), [R, z] = a({ ...I }), B =
|
|
52
|
-
totalOrders:
|
|
53
|
+
}), [R, z] = a({ ...I }), B = O.reduce((e, t) => e + t.total, 0), V = {
|
|
54
|
+
totalOrders: O.length,
|
|
53
55
|
totalSpent: B,
|
|
54
|
-
avgOrderValue:
|
|
55
|
-
}, H =
|
|
56
|
-
|
|
57
|
-
},
|
|
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) => ({
|
|
65
|
-
...n,
|
|
66
|
-
[e]: t
|
|
67
|
-
}));
|
|
68
|
-
}, J = (e, t) => {
|
|
56
|
+
avgOrderValue: O.length > 0 ? Math.floor(B / O.length) : 0
|
|
57
|
+
}, H = k, U = () => E("/auth/security"), W = () => {
|
|
58
|
+
L({ ...R }), P("Preferences applied for this session. Saved profiles are coming soon.");
|
|
59
|
+
}, G = (e, t) => {
|
|
69
60
|
z((n) => ({
|
|
70
61
|
...n,
|
|
71
62
|
emergencyContact: {
|
|
@@ -73,7 +64,7 @@ function D() {
|
|
|
73
64
|
[e]: t
|
|
74
65
|
}
|
|
75
66
|
}));
|
|
76
|
-
},
|
|
67
|
+
}, K = (e, t) => {
|
|
77
68
|
z((n) => ({
|
|
78
69
|
...n,
|
|
79
70
|
notifications: {
|
|
@@ -81,7 +72,7 @@ function D() {
|
|
|
81
72
|
[e]: t
|
|
82
73
|
}
|
|
83
74
|
}));
|
|
84
|
-
},
|
|
75
|
+
}, q = (e, t, n) => {
|
|
85
76
|
z((r) => {
|
|
86
77
|
let i = r[e], a = n ? [...i, t] : i.filter((e) => e !== t);
|
|
87
78
|
return {
|
|
@@ -89,7 +80,7 @@ function D() {
|
|
|
89
80
|
[e]: a
|
|
90
81
|
};
|
|
91
82
|
});
|
|
92
|
-
},
|
|
83
|
+
}, J = [
|
|
93
84
|
{
|
|
94
85
|
key: "profile",
|
|
95
86
|
label: "Profile Info",
|
|
@@ -98,7 +89,7 @@ function D() {
|
|
|
98
89
|
{
|
|
99
90
|
key: "preferences",
|
|
100
91
|
label: "Preferences",
|
|
101
|
-
icon:
|
|
92
|
+
icon: h
|
|
102
93
|
},
|
|
103
94
|
{
|
|
104
95
|
key: "stats",
|
|
@@ -106,48 +97,57 @@ function D() {
|
|
|
106
97
|
icon: s
|
|
107
98
|
}
|
|
108
99
|
];
|
|
109
|
-
return H ? /* @__PURE__ */
|
|
100
|
+
return H ? /* @__PURE__ */ b(n, {
|
|
110
101
|
title: "My Profile",
|
|
111
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ x("div", {
|
|
112
103
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ b("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4" }), /* @__PURE__ */ b("p", {
|
|
114
105
|
className: "text-sm text-text-secondary",
|
|
115
106
|
children: "Loading profile..."
|
|
116
107
|
})]
|
|
117
108
|
})
|
|
118
|
-
}) : /* @__PURE__ */
|
|
109
|
+
}) : /* @__PURE__ */ x(n, {
|
|
119
110
|
title: "My Profile",
|
|
120
111
|
description: "Manage your personal information and preferences",
|
|
121
112
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ b(C, {
|
|
123
114
|
className: "mb-6",
|
|
124
115
|
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."
|
|
125
116
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
117
|
+
M && /* @__PURE__ */ x("div", {
|
|
118
|
+
className: "mb-4 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-3 flex items-center gap-2",
|
|
119
|
+
children: [/* @__PURE__ */ b(l, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ b("p", {
|
|
120
|
+
className: "text-sm text-status-success-text",
|
|
121
|
+
children: M
|
|
122
|
+
})]
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ x(S, {
|
|
127
125
|
treatment: "glass",
|
|
128
126
|
glow: !0,
|
|
129
127
|
className: "flex flex-col items-center sm:flex-row sm:items-start gap-6 p-6",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ x("div", {
|
|
131
129
|
className: "relative",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ b("div", {
|
|
133
131
|
className: "h-24 w-24 rounded-full bg-bg-sunken overflow-hidden",
|
|
134
|
-
children: F.profilePicture ? /* @__PURE__ */
|
|
132
|
+
children: F.profilePicture ? /* @__PURE__ */ b("img", {
|
|
135
133
|
src: F.profilePicture,
|
|
136
134
|
alt: `${F.firstName} ${F.lastName}`,
|
|
137
135
|
className: "h-full w-full object-cover"
|
|
138
|
-
}) : /* @__PURE__ */
|
|
136
|
+
}) : /* @__PURE__ */ b("div", {
|
|
139
137
|
className: "flex h-full w-full items-center justify-center text-text-secondary",
|
|
140
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ b(v, { className: "h-10 w-10" })
|
|
141
139
|
})
|
|
142
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ b("button", {
|
|
143
141
|
type: "button",
|
|
142
|
+
onClick: U,
|
|
143
|
+
title: "Manage your photo in Account Security",
|
|
144
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__ */
|
|
145
|
+
children: /* @__PURE__ */ b(g, { className: "h-4 w-4" })
|
|
146
146
|
})]
|
|
147
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ x("div", {
|
|
148
148
|
className: "flex-1 text-center sm:text-left",
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ x("h2", {
|
|
151
151
|
className: "text-xl font-semibold text-text-primary",
|
|
152
152
|
children: [
|
|
153
153
|
I.firstName,
|
|
@@ -155,189 +155,179 @@ function D() {
|
|
|
155
155
|
I.lastName
|
|
156
156
|
]
|
|
157
157
|
}),
|
|
158
|
-
I.email && /* @__PURE__ */
|
|
158
|
+
I.email && /* @__PURE__ */ b("p", {
|
|
159
159
|
className: "mt-1 text-sm text-text-secondary",
|
|
160
160
|
children: I.email
|
|
161
161
|
}),
|
|
162
|
-
I.phone && /* @__PURE__ */
|
|
162
|
+
I.phone && /* @__PURE__ */ b("p", {
|
|
163
163
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
164
164
|
children: I.phone
|
|
165
165
|
})
|
|
166
166
|
]
|
|
167
167
|
})]
|
|
168
168
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ x("div", {
|
|
170
170
|
className: "mt-6 rounded-lg border border-border-subtle bg-bg-surface",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ b("div", {
|
|
172
172
|
className: "border-b border-border-subtle",
|
|
173
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ b("nav", {
|
|
174
174
|
className: "flex -mb-px overflow-x-auto",
|
|
175
|
-
children:
|
|
175
|
+
children: J.map((e) => {
|
|
176
176
|
let n = e.icon;
|
|
177
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ x("button", {
|
|
178
178
|
type: "button",
|
|
179
|
-
className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors",
|
|
180
|
-
onClick: () =>
|
|
181
|
-
children: [/* @__PURE__ */
|
|
179
|
+
className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors", A === e.key ? "border-b-2 border-foreground text-text-primary" : "text-text-secondary hover:text-text-primary"),
|
|
180
|
+
onClick: () => j(e.key),
|
|
181
|
+
children: [/* @__PURE__ */ b(n, { className: "h-4 w-4" }), e.label]
|
|
182
182
|
}, e.key);
|
|
183
183
|
})
|
|
184
184
|
})
|
|
185
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ x("div", {
|
|
186
186
|
className: "p-5 md:p-6",
|
|
187
187
|
children: [
|
|
188
|
-
|
|
188
|
+
A === "profile" && /* @__PURE__ */ x("div", {
|
|
189
189
|
className: "space-y-6",
|
|
190
190
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
className: "flex justify-between items-center",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ x("div", {
|
|
192
|
+
className: "flex flex-wrap justify-between items-center gap-2",
|
|
193
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
194
194
|
className: "text-lg font-semibold text-text-primary",
|
|
195
195
|
children: "Personal Information"
|
|
196
|
-
}),
|
|
197
|
-
className: "flex gap-2",
|
|
198
|
-
children: [/* @__PURE__ */ S("button", {
|
|
199
|
-
type: "button",
|
|
200
|
-
onClick: G,
|
|
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",
|
|
202
|
-
children: [/* @__PURE__ */ x(h, { className: "h-3 w-3" }), "Save"]
|
|
203
|
-
}), /* @__PURE__ */ S("button", {
|
|
204
|
-
type: "button",
|
|
205
|
-
onClick: W,
|
|
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",
|
|
207
|
-
children: [/* @__PURE__ */ x(b, { className: "h-3 w-3" }), "Cancel"]
|
|
208
|
-
})]
|
|
209
|
-
}) : /* @__PURE__ */ S("button", {
|
|
196
|
+
}), /* @__PURE__ */ x("button", {
|
|
210
197
|
type: "button",
|
|
211
198
|
onClick: U,
|
|
212
199
|
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",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ b(g, { className: "h-3 w-3" }), "Manage in Account Security"]
|
|
214
201
|
})]
|
|
215
202
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ b("p", {
|
|
204
|
+
className: "-mt-3 text-xs text-text-secondary",
|
|
205
|
+
children: "Your name, email and phone come from your Kadaikodi account. Update them in Account Security."
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ x("div", {
|
|
217
208
|
className: "grid grid-cols-1 md:grid-cols-2 gap-5",
|
|
218
209
|
children: [
|
|
219
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
220
211
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
221
212
|
children: "First Name"
|
|
222
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ b("input", {
|
|
223
214
|
type: "text",
|
|
224
|
-
value:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
className:
|
|
215
|
+
value: I.firstName,
|
|
216
|
+
disabled: !0,
|
|
217
|
+
readOnly: !0,
|
|
218
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-sunken px-3 py-2.5 text-sm text-text-primary cursor-not-allowed"
|
|
228
219
|
})] }),
|
|
229
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
230
221
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
231
222
|
children: "Last Name"
|
|
232
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ b("input", {
|
|
233
224
|
type: "text",
|
|
234
|
-
value:
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
className:
|
|
225
|
+
value: I.lastName,
|
|
226
|
+
disabled: !0,
|
|
227
|
+
readOnly: !0,
|
|
228
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-sunken px-3 py-2.5 text-sm text-text-primary cursor-not-allowed"
|
|
238
229
|
})] }),
|
|
239
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
240
231
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
241
232
|
children: "Email"
|
|
242
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ b("input", {
|
|
243
234
|
type: "email",
|
|
244
|
-
value:
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
className:
|
|
235
|
+
value: I.email,
|
|
236
|
+
disabled: !0,
|
|
237
|
+
readOnly: !0,
|
|
238
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-sunken px-3 py-2.5 text-sm text-text-primary cursor-not-allowed"
|
|
248
239
|
})] }),
|
|
249
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
250
241
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
251
242
|
children: "Phone"
|
|
252
|
-
}), /* @__PURE__ */
|
|
243
|
+
}), /* @__PURE__ */ b("input", {
|
|
253
244
|
type: "tel",
|
|
254
|
-
value:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
className:
|
|
245
|
+
value: I.phone,
|
|
246
|
+
disabled: !0,
|
|
247
|
+
readOnly: !0,
|
|
248
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-sunken px-3 py-2.5 text-sm text-text-primary cursor-not-allowed"
|
|
258
249
|
})] })
|
|
259
250
|
]
|
|
260
251
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h4", {
|
|
262
253
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
263
254
|
children: "Primary Address"
|
|
264
|
-
}), /* @__PURE__ */
|
|
255
|
+
}), /* @__PURE__ */ x("div", {
|
|
265
256
|
className: "rounded-lg bg-bg-sunken/50 p-4",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ b("p", {
|
|
267
258
|
className: "text-sm text-text-secondary",
|
|
268
259
|
children: "You haven't saved a delivery address yet. Add one to speed up checkout."
|
|
269
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ x("button", {
|
|
270
261
|
type: "button",
|
|
271
|
-
onClick: () =>
|
|
262
|
+
onClick: () => E("/customer/addresses"),
|
|
272
263
|
className: "mt-2 flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
|
|
273
264
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ b(p, { className: "h-3 w-3" }),
|
|
275
266
|
"Manage Addresses",
|
|
276
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ b(u, { className: "h-3 w-3" })
|
|
277
268
|
]
|
|
278
269
|
})]
|
|
279
270
|
})] }),
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
271
|
+
/* @__PURE__ */ x("div", { children: [
|
|
272
|
+
/* @__PURE__ */ x("h4", {
|
|
273
|
+
className: "text-base font-semibold text-text-primary mb-1 flex items-center gap-2",
|
|
274
|
+
children: [/* @__PURE__ */ b(o, { className: "h-4 w-4 text-text-secondary" }), "Emergency Contact"]
|
|
275
|
+
}),
|
|
276
|
+
/* @__PURE__ */ b("p", {
|
|
277
|
+
className: "mb-3 text-xs text-text-secondary",
|
|
278
|
+
children: "Applied for this session — persistent profile storage is coming soon."
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ x("div", {
|
|
281
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
284
|
+
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
285
|
+
children: "Name"
|
|
286
|
+
}), /* @__PURE__ */ b("input", {
|
|
287
|
+
type: "text",
|
|
288
|
+
value: R.emergencyContact.name,
|
|
289
|
+
onChange: (e) => G("name", e.target.value),
|
|
290
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
291
|
+
})] }),
|
|
292
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
293
|
+
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
294
|
+
children: "Phone"
|
|
295
|
+
}), /* @__PURE__ */ b("input", {
|
|
296
|
+
type: "tel",
|
|
297
|
+
value: R.emergencyContact.phone,
|
|
298
|
+
onChange: (e) => G("phone", e.target.value),
|
|
299
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
300
|
+
})] }),
|
|
301
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
302
|
+
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
303
|
+
children: "Relationship"
|
|
304
|
+
}), /* @__PURE__ */ b("input", {
|
|
305
|
+
type: "text",
|
|
306
|
+
value: R.emergencyContact.relationship,
|
|
307
|
+
onChange: (e) => G("relationship", e.target.value),
|
|
308
|
+
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
309
|
+
})] })
|
|
310
|
+
]
|
|
311
|
+
})
|
|
312
|
+
] }),
|
|
313
|
+
/* @__PURE__ */ b("div", {
|
|
319
314
|
className: "flex gap-3 pt-4 border-t border-border-subtle",
|
|
320
|
-
children:
|
|
321
|
-
type: "button",
|
|
322
|
-
onClick: G,
|
|
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",
|
|
324
|
-
children: [/* @__PURE__ */ x(h, { className: "h-4 w-4" }), "Save Changes"]
|
|
325
|
-
}), /* @__PURE__ */ x("button", {
|
|
315
|
+
children: /* @__PURE__ */ x("button", {
|
|
326
316
|
type: "button",
|
|
327
317
|
onClick: W,
|
|
328
|
-
className: "flex items-center gap-2 rounded-lg
|
|
329
|
-
children: "
|
|
330
|
-
})
|
|
318
|
+
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",
|
|
319
|
+
children: [/* @__PURE__ */ b(m, { className: "h-4 w-4" }), "Save for this session"]
|
|
320
|
+
})
|
|
331
321
|
})
|
|
332
322
|
]
|
|
333
323
|
}),
|
|
334
|
-
|
|
324
|
+
A === "preferences" && /* @__PURE__ */ x("div", {
|
|
335
325
|
className: "space-y-8",
|
|
336
326
|
children: [
|
|
337
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("h3", {
|
|
338
328
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
340
|
-
}), /* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ b(c, { className: "h-4 w-4 text-text-secondary" }), "Notification Preferences"]
|
|
330
|
+
}), /* @__PURE__ */ b("div", {
|
|
341
331
|
className: "space-y-3",
|
|
342
332
|
children: [
|
|
343
333
|
{
|
|
@@ -356,106 +346,106 @@ function D() {
|
|
|
356
346
|
key: "sms",
|
|
357
347
|
label: "SMS notifications"
|
|
358
348
|
}
|
|
359
|
-
].map((e) => /* @__PURE__ */
|
|
349
|
+
].map((e) => /* @__PURE__ */ x("label", {
|
|
360
350
|
className: "flex items-center gap-3 cursor-pointer",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ b("input", {
|
|
362
352
|
type: "checkbox",
|
|
363
353
|
checked: R.notifications[e.key],
|
|
364
|
-
onChange: (t) =>
|
|
354
|
+
onChange: (t) => K(e.key, t.target.checked),
|
|
365
355
|
className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-[var(--color-focus-ring)]"
|
|
366
|
-
}), /* @__PURE__ */
|
|
356
|
+
}), /* @__PURE__ */ b("span", {
|
|
367
357
|
className: "text-sm text-text-primary",
|
|
368
358
|
children: e.label
|
|
369
359
|
})]
|
|
370
360
|
}, e.key))
|
|
371
361
|
})] }),
|
|
372
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("h3", {
|
|
373
363
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
374
|
-
children: [/* @__PURE__ */
|
|
375
|
-
}), /* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ b(d, { className: "h-4 w-4 text-text-secondary" }), "Dietary Preferences"]
|
|
365
|
+
}), /* @__PURE__ */ b("div", {
|
|
376
366
|
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
|
|
377
|
-
children:
|
|
367
|
+
children: w.map((e) => /* @__PURE__ */ x("label", {
|
|
378
368
|
className: "flex items-center gap-2 cursor-pointer",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ b("input", {
|
|
380
370
|
type: "checkbox",
|
|
381
371
|
checked: R.dietary.includes(e),
|
|
382
|
-
onChange: (t) =>
|
|
372
|
+
onChange: (t) => q("dietary", e, t.target.checked),
|
|
383
373
|
className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-[var(--color-focus-ring)]"
|
|
384
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ b("span", {
|
|
385
375
|
className: "text-sm text-text-primary capitalize",
|
|
386
376
|
children: e
|
|
387
377
|
})]
|
|
388
378
|
}, e))
|
|
389
379
|
})] }),
|
|
390
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("h3", {
|
|
391
381
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
393
|
-
}), /* @__PURE__ */
|
|
382
|
+
children: [/* @__PURE__ */ b(o, { className: "h-4 w-4 text-status-error-text" }), "Food Allergies"]
|
|
383
|
+
}), /* @__PURE__ */ b("div", {
|
|
394
384
|
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
|
|
395
|
-
children:
|
|
385
|
+
children: T.map((e) => /* @__PURE__ */ x("label", {
|
|
396
386
|
className: "flex items-center gap-2 cursor-pointer",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ b("input", {
|
|
398
388
|
type: "checkbox",
|
|
399
389
|
checked: R.allergies.includes(e),
|
|
400
|
-
onChange: (t) =>
|
|
390
|
+
onChange: (t) => q("allergies", e, t.target.checked),
|
|
401
391
|
className: "h-4 w-4 rounded border-border-subtle text-status-error-text focus:ring-destructive"
|
|
402
|
-
}), /* @__PURE__ */
|
|
392
|
+
}), /* @__PURE__ */ b("span", {
|
|
403
393
|
className: "text-sm text-text-primary capitalize",
|
|
404
394
|
children: e
|
|
405
395
|
})]
|
|
406
396
|
}, e))
|
|
407
397
|
})] }),
|
|
408
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ b("div", {
|
|
409
399
|
className: "pt-4 border-t border-border-subtle",
|
|
410
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ x("button", {
|
|
411
401
|
type: "button",
|
|
412
|
-
onClick:
|
|
402
|
+
onClick: W,
|
|
413
403
|
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",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ b(m, { className: "h-4 w-4" }), "Save Preferences"]
|
|
415
405
|
})
|
|
416
406
|
})
|
|
417
407
|
]
|
|
418
408
|
}),
|
|
419
|
-
|
|
409
|
+
A === "stats" && /* @__PURE__ */ b("div", {
|
|
420
410
|
className: "space-y-8",
|
|
421
|
-
children: /* @__PURE__ */
|
|
411
|
+
children: /* @__PURE__ */ x("div", {
|
|
422
412
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
423
413
|
children: [
|
|
424
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ x("div", {
|
|
425
415
|
className: "rounded-lg bg-[var(--color-accent-soft)] p-5 border border-border-focus/20",
|
|
426
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ x("div", {
|
|
427
417
|
className: "flex items-center gap-2 mb-2",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ b(_, { className: "h-4 w-4 text-text-primary" }), /* @__PURE__ */ b("h4", {
|
|
429
419
|
className: "text-sm font-medium text-text-primary",
|
|
430
420
|
children: "Total Orders"
|
|
431
421
|
})]
|
|
432
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ b("p", {
|
|
433
423
|
className: "text-3xl font-bold text-text-primary",
|
|
434
424
|
children: V.totalOrders
|
|
435
425
|
})]
|
|
436
426
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ x("div", {
|
|
438
428
|
className: "rounded-lg bg-status-success-bg-subtle p-5 border border-status-success-text/20",
|
|
439
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ x("div", {
|
|
440
430
|
className: "flex items-center gap-2 mb-2",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ b(f, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ b("h4", {
|
|
442
432
|
className: "text-sm font-medium text-status-success-text",
|
|
443
433
|
children: "Total Spent"
|
|
444
434
|
})]
|
|
445
|
-
}), /* @__PURE__ */
|
|
435
|
+
}), /* @__PURE__ */ b("p", {
|
|
446
436
|
className: "text-3xl font-bold text-status-success-text",
|
|
447
437
|
children: i(V.totalSpent, { minimumFractionDigits: 0 })
|
|
448
438
|
})]
|
|
449
439
|
}),
|
|
450
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ x("div", {
|
|
451
441
|
className: "rounded-lg bg-bg-surface p-5 border border-border-subtle",
|
|
452
|
-
children: [/* @__PURE__ */
|
|
442
|
+
children: [/* @__PURE__ */ x("div", {
|
|
453
443
|
className: "flex items-center gap-2 mb-2",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ b(s, { className: "h-4 w-4 text-text-primary" }), /* @__PURE__ */ b("h4", {
|
|
455
445
|
className: "text-sm font-medium text-text-primary",
|
|
456
446
|
children: "Avg Order Value"
|
|
457
447
|
})]
|
|
458
|
-
}), /* @__PURE__ */
|
|
448
|
+
}), /* @__PURE__ */ b("p", {
|
|
459
449
|
className: "text-3xl font-bold text-text-primary",
|
|
460
450
|
children: i(V.avgOrderValue, { minimumFractionDigits: 0 })
|
|
461
451
|
})]
|
|
@@ -470,6 +460,6 @@ function D() {
|
|
|
470
460
|
});
|
|
471
461
|
}
|
|
472
462
|
//#endregion
|
|
473
|
-
export {
|
|
463
|
+
export { E as CustomerProfilePage };
|
|
474
464
|
|
|
475
465
|
//# sourceMappingURL=CustomerProfilePage.js.map
|