@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.
Files changed (77) hide show
  1. package/dist/kadaikodi/KadaikodiRoutes.js +30 -26
  2. package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
  3. package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
  4. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +45 -107
  6. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminDashboard.js +30 -32
  8. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +137 -120
  10. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +2 -2
  12. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
  15. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
  17. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  18. package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
  19. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  20. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
  21. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  22. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
  23. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
  27. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
  29. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
  31. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  32. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
  33. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
  34. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
  35. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  36. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
  38. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
  41. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  42. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
  43. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
  45. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  47. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  48. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -4
  49. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +6 -6
  51. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  52. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
  53. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  54. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
  55. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  56. package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
  57. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
  59. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
  61. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
  63. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  67. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
  69. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  70. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
  71. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
  74. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
  76. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  77. package/package.json +1 -1
@@ -2,50 +2,50 @@ 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 { EmptyState as r } from "../../components/EmptyState.js";
5
- import { useWorkerStats as i } from "../../hooks/useKadaikodiApi.js";
6
- import { useState as a } from "react";
7
- import { Award as o, Bell as s, Briefcase as c, Camera as l, CreditCard as u, Loader2 as d, MapPin as f, Pencil as p, Save as m, Shield as h, User as g, X as _ } from "lucide-react";
8
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
9
- import { EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
5
+ import { useProviderWorkers as i, useProviders as a, useUpdateProviderWorker as o, useWorkerStats as s } from "../../hooks/useKadaikodiApi.js";
6
+ import { useEffect as c, useMemo as l, useState as u } from "react";
7
+ import { Award as d, Bell as f, Briefcase as p, CreditCard as m, Loader2 as h, Lock as g, MapPin as _, Pencil as v, Save as y, Shield as b, User as x, X as S } from "lucide-react";
8
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
9
+ import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
10
10
  //#region src/kadaikodi/pages/worker/WorkerProfilePage.tsx
11
- var C = [
11
+ var O = [
12
12
  {
13
13
  id: "personal",
14
14
  label: "Personal Info",
15
- icon: g
15
+ icon: x
16
16
  },
17
17
  {
18
18
  id: "work",
19
19
  label: "Work Details",
20
- icon: c
20
+ icon: p
21
21
  },
22
22
  {
23
23
  id: "address",
24
24
  label: "Address",
25
- icon: f
25
+ icon: _
26
26
  },
27
27
  {
28
28
  id: "documents",
29
29
  label: "Documents",
30
- icon: u
30
+ icon: m
31
31
  },
32
32
  {
33
33
  id: "achievements",
34
34
  label: "Achievements",
35
- icon: o
35
+ icon: d
36
36
  },
37
37
  {
38
38
  id: "notifications",
39
39
  label: "Notifications",
40
- icon: s
40
+ icon: f
41
41
  }
42
- ], w = () => {
43
- let { navigateTo: s, currentUser: c } = e(), { data: u } = i(c?.id ?? ""), [f, w] = a("personal"), [T, E] = a(!1), [D, O] = a(!1), [k, A] = a({
44
- firstName: c?.firstName ?? c?.name?.split(" ")[0] ?? "",
45
- lastName: c?.lastName ?? c?.name?.split(" ").slice(1).join(" ") ?? "",
46
- email: c?.email ?? "",
47
- phone: c?.phone ?? "",
48
- profileImage: c?.avatar ?? c?.profilePicture ?? "",
42
+ ], k = () => {
43
+ let { navigateTo: f, currentUser: p } = e(), { data: m } = s(p?.id ?? ""), { data: _ = [] } = a(), { data: k = [] } = i(l(() => _.find((e) => e.ownerId === p?.id) ?? _[0], [_, p?.id])?.id), A = l(() => k.find((e) => e.workerId === p?.id) ?? k[0], [k, p?.id]), j = o(), [M, N] = u("personal"), [P, F] = u(!1), [I, L] = u(null), [R, z] = u({
44
+ firstName: p?.firstName ?? p?.name?.split(" ")[0] ?? "",
45
+ lastName: p?.lastName ?? p?.name?.split(" ").slice(1).join(" ") ?? "",
46
+ email: p?.email ?? "",
47
+ phone: p?.phone ?? "",
48
+ profileImage: p?.avatar ?? p?.profilePicture ?? "",
49
49
  dateOfBirth: "",
50
50
  employeeId: "",
51
51
  designation: "",
@@ -67,7 +67,7 @@ var C = [
67
67
  ifscCode: "",
68
68
  panNumber: "",
69
69
  aadharNumber: ""
70
- }), [j, M] = a([
70
+ }), [B, V] = u([
71
71
  {
72
72
  id: "orders",
73
73
  label: "New Order Assignments",
@@ -98,321 +98,389 @@ var C = [
98
98
  description: "Important updates from management",
99
99
  enabled: !0
100
100
  }
101
- ]), N = (e, t) => {
102
- A((n) => ({
101
+ ]);
102
+ c(() => {
103
+ let e = A?.metadata ?? {}, t = e.profile ?? {};
104
+ if (z((e) => ({
105
+ ...e,
106
+ firstName: p?.firstName ?? p?.name?.split(" ")[0] ?? e.firstName,
107
+ lastName: p?.lastName ?? p?.name?.split(" ").slice(1).join(" ") ?? e.lastName,
108
+ email: p?.email ?? e.email,
109
+ phone: p?.phone ?? e.phone,
110
+ profileImage: p?.avatar ?? p?.profilePicture ?? e.profileImage,
111
+ dateOfBirth: t.dateOfBirth ?? "",
112
+ designation: t.designation ?? "",
113
+ department: t.department ?? "",
114
+ workLocation: t.workLocation ?? "",
115
+ employmentType: t.employmentType ?? "",
116
+ currentAddress: t.currentAddress ?? "",
117
+ city: t.city ?? "",
118
+ state: t.state ?? "",
119
+ pincode: t.pincode ?? "",
120
+ permanentAddress: t.permanentAddress ?? "",
121
+ sameAsCurrent: t.sameAsCurrent ?? !0,
122
+ emergencyContactName: t.emergencyContactName ?? "",
123
+ emergencyContactPhone: t.emergencyContactPhone ?? "",
124
+ emergencyContactRelation: t.emergencyContactRelation ?? "",
125
+ bankName: t.bankName ?? "",
126
+ ifscCode: t.ifscCode ?? ""
127
+ })), e.notificationPrefs) {
128
+ let t = e.notificationPrefs;
129
+ V((e) => e.map((e) => e.id in t ? {
130
+ ...e,
131
+ enabled: !!t[e.id]
132
+ } : e));
133
+ }
134
+ }, [A, p]);
135
+ let H = (e, t) => {
136
+ z((n) => ({
103
137
  ...n,
104
138
  [e]: t
105
139
  }));
106
- }, P = () => {
107
- O(!0), setTimeout(() => {
108
- O(!1), E(!1), alert("Profile updated successfully!");
109
- }, 1e3);
110
- }, F = (e) => {
111
- let t = e.target.files?.[0];
112
- if (t) {
113
- let e = new FileReader();
114
- e.onloadend = () => {
115
- A((t) => ({
116
- ...t,
117
- profileImage: e.result
118
- }));
119
- }, e.readAsDataURL(t);
140
+ }, U = () => {
141
+ if (L(null), !A) {
142
+ L("We couldn't find your worker record yet, so profile changes can't be saved. Please try again once your cart owner has added you as a worker.");
143
+ return;
120
144
  }
121
- }, I = (e) => {
122
- T && M((t) => t.map((t) => t.id === e ? {
145
+ let e = {
146
+ profile: {
147
+ dateOfBirth: R.dateOfBirth,
148
+ designation: R.designation,
149
+ department: R.department,
150
+ workLocation: R.workLocation,
151
+ employmentType: R.employmentType,
152
+ currentAddress: R.currentAddress,
153
+ city: R.city,
154
+ state: R.state,
155
+ pincode: R.pincode,
156
+ permanentAddress: R.permanentAddress,
157
+ sameAsCurrent: R.sameAsCurrent,
158
+ emergencyContactName: R.emergencyContactName,
159
+ emergencyContactPhone: R.emergencyContactPhone,
160
+ emergencyContactRelation: R.emergencyContactRelation,
161
+ bankName: R.bankName,
162
+ ifscCode: R.ifscCode
163
+ },
164
+ notificationPrefs: B.reduce((e, t) => (e[t.id] = t.enabled, e), {})
165
+ };
166
+ j.mutate({
167
+ id: A.id,
168
+ metadata: e
169
+ }, {
170
+ onSuccess: () => F(!1),
171
+ onError: (e) => L(e instanceof Error ? e.message : "Failed to save profile.")
172
+ });
173
+ }, W = j.isPending, G = (e) => {
174
+ P && V((t) => t.map((t) => t.id === e ? {
123
175
  ...t,
124
176
  enabled: !t.enabled
125
177
  } : t));
126
178
  };
127
- return /* @__PURE__ */ b(n, {
179
+ return /* @__PURE__ */ T(n, {
128
180
  title: "My Profile",
129
181
  description: "Manage your profile information",
130
- actions: /* @__PURE__ */ y("div", {
182
+ actions: /* @__PURE__ */ w("div", {
131
183
  className: "flex items-center gap-2",
132
- children: T ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b("button", {
184
+ children: P ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("button", {
133
185
  type: "button",
134
- onClick: () => E(!1),
186
+ onClick: () => F(!1),
135
187
  className: "inline-flex items-center gap-2 rounded-md bg-accent px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
136
- children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "Cancel"]
137
- }), /* @__PURE__ */ y("button", {
188
+ children: [/* @__PURE__ */ w(S, { className: "h-4 w-4" }), "Cancel"]
189
+ }), /* @__PURE__ */ w("button", {
138
190
  type: "button",
139
- onClick: P,
140
- disabled: D,
191
+ onClick: U,
192
+ disabled: W,
141
193
  className: "inline-flex items-center gap-2 rounded-md bg-[var(--color-accent-soft)] px-3 py-2 text-sm font-medium text-text-primary hover:bg-[var(--color-accent-soft)] transition-colors disabled:opacity-50",
142
- children: D ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(d, { className: "h-4 w-4 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), "Save Changes"] })
143
- })] }) : /* @__PURE__ */ b("button", {
194
+ children: W ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(h, { className: "h-4 w-4 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(y, { className: "h-4 w-4" }), "Save Changes"] })
195
+ })] }) : /* @__PURE__ */ T("button", {
144
196
  type: "button",
145
- onClick: () => E(!0),
197
+ onClick: () => F(!0),
146
198
  className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
147
- children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), "Edit Profile"]
199
+ children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Edit Profile"]
148
200
  })
149
201
  }),
150
- children: [/* @__PURE__ */ y(S, {
202
+ children: [/* @__PURE__ */ w(D, {
151
203
  className: "mb-6 max-w-6xl",
152
204
  children: "Your worker profile — the details Kadaikodi and your cart owner rely on. Use this page to keep your personal info, emergency contact, work details and address up to date, and to see your performance stats. Accurate details mean smoother shift assignments, faster payouts and fewer mix-ups. Use Edit Profile to make changes."
153
- }), /* @__PURE__ */ b("div", {
205
+ }), /* @__PURE__ */ T("div", {
154
206
  className: "grid lg:grid-cols-4 gap-6 max-w-6xl",
155
- children: [/* @__PURE__ */ b("div", {
207
+ children: [/* @__PURE__ */ T("div", {
156
208
  className: "lg:col-span-1 space-y-4",
157
- children: [/* @__PURE__ */ b(x, {
209
+ children: [/* @__PURE__ */ T(E, {
158
210
  className: "p-5 text-center",
159
211
  children: [
160
- /* @__PURE__ */ b("div", {
212
+ /* @__PURE__ */ T("div", {
161
213
  className: "relative inline-block",
162
- children: [/* @__PURE__ */ y("div", {
214
+ children: [/* @__PURE__ */ w("div", {
163
215
  className: "h-20 w-20 rounded-full bg-bg-sunken overflow-hidden mx-auto",
164
- children: k.profileImage ? /* @__PURE__ */ y("img", {
165
- src: k.profileImage,
166
- alt: `${k.firstName} ${k.lastName}`,
216
+ children: R.profileImage ? /* @__PURE__ */ w("img", {
217
+ src: R.profileImage,
218
+ alt: `${R.firstName} ${R.lastName}`,
167
219
  className: "h-full w-full object-cover"
168
- }) : /* @__PURE__ */ y("div", {
220
+ }) : /* @__PURE__ */ w("div", {
169
221
  className: "flex h-full w-full items-center justify-center text-text-secondary",
170
- children: /* @__PURE__ */ y(g, { className: "h-10 w-10" })
222
+ children: /* @__PURE__ */ w(x, { className: "h-10 w-10" })
171
223
  })
172
- }), T && /* @__PURE__ */ b("label", {
224
+ }), /* @__PURE__ */ w("button", {
225
+ type: "button",
226
+ onClick: () => f("/auth/security"),
227
+ title: "Your photo and login details are managed in Account Security",
173
228
  className: "absolute bottom-0 right-0 flex h-7 w-7 items-center justify-center rounded-full bg-[var(--color-accent-soft)] text-text-primary cursor-pointer hover:bg-[var(--color-accent-soft)] transition-colors",
174
- children: [/* @__PURE__ */ y(l, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ y("input", {
175
- type: "file",
176
- accept: "image/*",
177
- onChange: F,
178
- className: "hidden"
179
- })]
229
+ children: /* @__PURE__ */ w(g, { className: "h-3.5 w-3.5" })
180
230
  })]
181
231
  }),
182
- /* @__PURE__ */ y("h3", {
232
+ /* @__PURE__ */ w("h3", {
183
233
  className: "mt-3 text-sm font-semibold text-text-primary",
184
- children: k.firstName || k.lastName ? `${k.firstName} ${k.lastName}`.trim() : "Your profile"
234
+ children: R.firstName || R.lastName ? `${R.firstName} ${R.lastName}`.trim() : "Your profile"
185
235
  }),
186
- k.designation && /* @__PURE__ */ y("p", {
236
+ R.designation && /* @__PURE__ */ w("p", {
187
237
  className: "text-xs text-text-secondary",
188
- children: k.designation
238
+ children: R.designation
189
239
  }),
190
- k.employeeId && /* @__PURE__ */ y("p", {
240
+ R.employeeId && /* @__PURE__ */ w("p", {
191
241
  className: "text-[10px] text-text-secondary mt-0.5",
192
- children: k.employeeId
242
+ children: R.employeeId
193
243
  })
194
244
  ]
195
- }), /* @__PURE__ */ y("div", {
245
+ }), /* @__PURE__ */ w("div", {
196
246
  className: "space-y-1",
197
- children: C.map((e) => {
247
+ children: O.map((e) => {
198
248
  let n = e.icon;
199
- return /* @__PURE__ */ b("button", {
249
+ return /* @__PURE__ */ T("button", {
200
250
  type: "button",
201
- onClick: () => w(e.id),
202
- className: t("w-full flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", f === e.id ? "bg-[var(--color-accent-soft)] text-text-primary" : "bg-bg-surface text-text-primary hover:bg-bg-sunken"),
203
- children: [/* @__PURE__ */ y(n, { className: "h-4 w-4" }), e.label]
251
+ onClick: () => N(e.id),
252
+ className: t("w-full flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", M === e.id ? "bg-[var(--color-accent-soft)] text-text-primary" : "bg-bg-surface text-text-primary hover:bg-bg-sunken"),
253
+ children: [/* @__PURE__ */ w(n, { className: "h-4 w-4" }), e.label]
204
254
  }, e.id);
205
255
  })
206
256
  })]
207
- }), /* @__PURE__ */ y("div", {
257
+ }), /* @__PURE__ */ T("div", {
208
258
  className: "lg:col-span-3",
209
- children: /* @__PURE__ */ b("div", {
259
+ children: [I && /* @__PURE__ */ w("div", {
260
+ className: "mb-4 rounded-lg border border-status-error-text/20 bg-status-error-bg-subtle p-3",
261
+ children: /* @__PURE__ */ w("p", {
262
+ className: "text-xs text-status-error-text",
263
+ children: I
264
+ })
265
+ }), /* @__PURE__ */ T("div", {
210
266
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6 shadow-sm",
211
267
  children: [
212
- f === "personal" && /* @__PURE__ */ b("div", { children: [
213
- /* @__PURE__ */ y("h2", {
214
- className: "text-lg font-semibold text-text-primary mb-5",
215
- children: "Personal Information"
268
+ M === "personal" && /* @__PURE__ */ T("div", { children: [
269
+ /* @__PURE__ */ T("div", {
270
+ className: "flex flex-wrap items-center justify-between gap-2 mb-5",
271
+ children: [/* @__PURE__ */ w("h2", {
272
+ className: "text-lg font-semibold text-text-primary",
273
+ children: "Personal Information"
274
+ }), /* @__PURE__ */ T("button", {
275
+ type: "button",
276
+ onClick: () => f("/auth/security"),
277
+ className: "inline-flex items-center gap-1.5 rounded-md bg-bg-sunken px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
278
+ children: [/* @__PURE__ */ w(g, { className: "h-3.5 w-3.5" }), "Manage in Account Security"]
279
+ })]
280
+ }),
281
+ /* @__PURE__ */ w("p", {
282
+ className: "text-xs text-text-secondary mb-4",
283
+ children: "Your name, email, phone and photo are part of your login identity and are managed in Account Security. The details below on this page are your work profile."
216
284
  }),
217
- /* @__PURE__ */ b("div", {
285
+ /* @__PURE__ */ T("div", {
218
286
  className: "grid sm:grid-cols-2 gap-4",
219
287
  children: [
220
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
288
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
221
289
  className: "block text-xs font-medium text-text-secondary mb-1",
222
290
  children: "First Name"
223
- }), /* @__PURE__ */ y("input", {
291
+ }), /* @__PURE__ */ w("input", {
224
292
  type: "text",
225
- value: k.firstName,
226
- onChange: (e) => N("firstName", e.target.value),
227
- disabled: !T,
228
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
293
+ value: R.firstName,
294
+ readOnly: !0,
295
+ disabled: !0,
296
+ className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
229
297
  })] }),
230
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
298
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
231
299
  className: "block text-xs font-medium text-text-secondary mb-1",
232
300
  children: "Last Name"
233
- }), /* @__PURE__ */ y("input", {
301
+ }), /* @__PURE__ */ w("input", {
234
302
  type: "text",
235
- value: k.lastName,
236
- onChange: (e) => N("lastName", e.target.value),
237
- disabled: !T,
238
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
303
+ value: R.lastName,
304
+ readOnly: !0,
305
+ disabled: !0,
306
+ className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
239
307
  })] }),
240
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
308
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
241
309
  className: "block text-xs font-medium text-text-secondary mb-1",
242
310
  children: "Email Address"
243
- }), /* @__PURE__ */ y("input", {
311
+ }), /* @__PURE__ */ w("input", {
244
312
  type: "email",
245
- value: k.email,
246
- onChange: (e) => N("email", e.target.value),
247
- disabled: !T,
248
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
313
+ value: R.email,
314
+ readOnly: !0,
315
+ disabled: !0,
316
+ className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
249
317
  })] }),
250
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
318
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
251
319
  className: "block text-xs font-medium text-text-secondary mb-1",
252
320
  children: "Phone Number"
253
- }), /* @__PURE__ */ y("input", {
321
+ }), /* @__PURE__ */ w("input", {
254
322
  type: "text",
255
- value: k.phone,
256
- onChange: (e) => N("phone", e.target.value),
257
- disabled: !T,
258
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
323
+ value: R.phone,
324
+ readOnly: !0,
325
+ disabled: !0,
326
+ className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
259
327
  })] }),
260
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
328
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
261
329
  className: "block text-xs font-medium text-text-secondary mb-1",
262
330
  children: "Date of Birth"
263
- }), /* @__PURE__ */ y("input", {
331
+ }), /* @__PURE__ */ w("input", {
264
332
  type: "date",
265
- value: k.dateOfBirth,
266
- onChange: (e) => N("dateOfBirth", e.target.value),
267
- disabled: !T,
333
+ value: R.dateOfBirth,
334
+ onChange: (e) => H("dateOfBirth", e.target.value),
335
+ disabled: !P,
268
336
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
269
337
  })] })
270
338
  ]
271
339
  }),
272
- /* @__PURE__ */ b("div", {
340
+ /* @__PURE__ */ T("div", {
273
341
  className: "mt-7",
274
- children: [/* @__PURE__ */ y("h3", {
342
+ children: [/* @__PURE__ */ w("h3", {
275
343
  className: "text-sm font-semibold text-text-primary mb-4",
276
344
  children: "Emergency Contact"
277
- }), /* @__PURE__ */ b("div", {
345
+ }), /* @__PURE__ */ T("div", {
278
346
  className: "grid sm:grid-cols-3 gap-4",
279
347
  children: [
280
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
348
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
281
349
  className: "block text-xs font-medium text-text-secondary mb-1",
282
350
  children: "Contact Name"
283
- }), /* @__PURE__ */ y("input", {
351
+ }), /* @__PURE__ */ w("input", {
284
352
  type: "text",
285
- value: k.emergencyContactName,
286
- onChange: (e) => N("emergencyContactName", e.target.value),
287
- disabled: !T,
353
+ value: R.emergencyContactName,
354
+ onChange: (e) => H("emergencyContactName", e.target.value),
355
+ disabled: !P,
288
356
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
289
357
  })] }),
290
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
358
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
291
359
  className: "block text-xs font-medium text-text-secondary mb-1",
292
360
  children: "Contact Phone"
293
- }), /* @__PURE__ */ y("input", {
361
+ }), /* @__PURE__ */ w("input", {
294
362
  type: "text",
295
- value: k.emergencyContactPhone,
296
- onChange: (e) => N("emergencyContactPhone", e.target.value),
297
- disabled: !T,
363
+ value: R.emergencyContactPhone,
364
+ onChange: (e) => H("emergencyContactPhone", e.target.value),
365
+ disabled: !P,
298
366
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
299
367
  })] }),
300
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
368
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
301
369
  className: "block text-xs font-medium text-text-secondary mb-1",
302
370
  children: "Relationship"
303
- }), /* @__PURE__ */ y("input", {
371
+ }), /* @__PURE__ */ w("input", {
304
372
  type: "text",
305
- value: k.emergencyContactRelation,
306
- onChange: (e) => N("emergencyContactRelation", e.target.value),
307
- disabled: !T,
373
+ value: R.emergencyContactRelation,
374
+ onChange: (e) => H("emergencyContactRelation", e.target.value),
375
+ disabled: !P,
308
376
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
309
377
  })] })
310
378
  ]
311
379
  })]
312
380
  })
313
381
  ] }),
314
- f === "work" && /* @__PURE__ */ b("div", { children: [
315
- /* @__PURE__ */ y("h2", {
382
+ M === "work" && /* @__PURE__ */ T("div", { children: [
383
+ /* @__PURE__ */ w("h2", {
316
384
  className: "text-lg font-semibold text-text-primary mb-5",
317
385
  children: "Work Details"
318
386
  }),
319
- /* @__PURE__ */ b("div", {
387
+ /* @__PURE__ */ T("div", {
320
388
  className: "grid sm:grid-cols-2 gap-4",
321
389
  children: [
322
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
390
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
323
391
  className: "block text-xs font-medium text-text-secondary mb-1",
324
392
  children: "Employee ID"
325
- }), /* @__PURE__ */ y("input", {
393
+ }), /* @__PURE__ */ w("input", {
326
394
  type: "text",
327
- value: k.employeeId,
395
+ value: R.employeeId,
328
396
  disabled: !0,
329
397
  placeholder: "Assigned by Kadaikodi",
330
398
  className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary cursor-not-allowed"
331
399
  })] }),
332
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
400
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
333
401
  className: "block text-xs font-medium text-text-secondary mb-1",
334
402
  children: "Designation"
335
- }), /* @__PURE__ */ y("input", {
403
+ }), /* @__PURE__ */ w("input", {
336
404
  type: "text",
337
- value: k.designation,
338
- onChange: (e) => N("designation", e.target.value),
339
- disabled: !T,
405
+ value: R.designation,
406
+ onChange: (e) => H("designation", e.target.value),
407
+ disabled: !P,
340
408
  placeholder: "e.g. Delivery Executive",
341
409
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
342
410
  })] }),
343
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
411
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
344
412
  className: "block text-xs font-medium text-text-secondary mb-1",
345
413
  children: "Department"
346
- }), /* @__PURE__ */ y("input", {
414
+ }), /* @__PURE__ */ w("input", {
347
415
  type: "text",
348
- value: k.department,
349
- onChange: (e) => N("department", e.target.value),
350
- disabled: !T,
416
+ value: R.department,
417
+ onChange: (e) => H("department", e.target.value),
418
+ disabled: !P,
351
419
  placeholder: "e.g. Operations",
352
420
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
353
421
  })] }),
354
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
422
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
355
423
  className: "block text-xs font-medium text-text-secondary mb-1",
356
424
  children: "Work Location"
357
- }), /* @__PURE__ */ y("input", {
425
+ }), /* @__PURE__ */ w("input", {
358
426
  type: "text",
359
- value: k.workLocation,
360
- onChange: (e) => N("workLocation", e.target.value),
361
- disabled: !T,
427
+ value: R.workLocation,
428
+ onChange: (e) => H("workLocation", e.target.value),
429
+ disabled: !P,
362
430
  placeholder: "Your primary work area",
363
431
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
364
432
  })] }),
365
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
433
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
366
434
  className: "block text-xs font-medium text-text-secondary mb-1",
367
435
  children: "Joining Date"
368
- }), /* @__PURE__ */ y("input", {
436
+ }), /* @__PURE__ */ w("input", {
369
437
  type: "date",
370
- value: k.joiningDate,
438
+ value: R.joiningDate,
371
439
  disabled: !0,
372
440
  className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
373
441
  })] }),
374
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
442
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
375
443
  className: "block text-xs font-medium text-text-secondary mb-1",
376
444
  children: "Employment Type"
377
- }), /* @__PURE__ */ y("input", {
445
+ }), /* @__PURE__ */ w("input", {
378
446
  type: "text",
379
- value: k.employmentType,
380
- onChange: (e) => N("employmentType", e.target.value),
381
- disabled: !T,
447
+ value: R.employmentType,
448
+ onChange: (e) => H("employmentType", e.target.value),
449
+ disabled: !P,
382
450
  placeholder: "e.g. Full Time",
383
451
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
384
452
  })] })
385
453
  ]
386
454
  }),
387
- /* @__PURE__ */ b("div", {
455
+ /* @__PURE__ */ T("div", {
388
456
  className: "mt-7 grid sm:grid-cols-3 gap-4",
389
457
  children: [
390
- /* @__PURE__ */ b("div", {
458
+ /* @__PURE__ */ T("div", {
391
459
  className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
392
- children: [/* @__PURE__ */ y("p", {
460
+ children: [/* @__PURE__ */ w("p", {
393
461
  className: "text-2xl font-bold text-text-primary",
394
- children: u?.totalDeliveries ?? 0
395
- }), /* @__PURE__ */ y("p", {
462
+ children: m?.totalDeliveries ?? 0
463
+ }), /* @__PURE__ */ w("p", {
396
464
  className: "text-xs text-text-secondary",
397
465
  children: "Total Deliveries"
398
466
  })]
399
467
  }),
400
- /* @__PURE__ */ b("div", {
468
+ /* @__PURE__ */ T("div", {
401
469
  className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
402
- children: [/* @__PURE__ */ y("p", {
470
+ children: [/* @__PURE__ */ w("p", {
403
471
  className: "text-2xl font-bold text-status-success-text",
404
- children: u?.averageRating ?? 0
405
- }), /* @__PURE__ */ y("p", {
472
+ children: m?.averageRating ?? 0
473
+ }), /* @__PURE__ */ w("p", {
406
474
  className: "text-xs text-text-secondary",
407
475
  children: "Average Rating"
408
476
  })]
409
477
  }),
410
- /* @__PURE__ */ b("div", {
478
+ /* @__PURE__ */ T("div", {
411
479
  className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
412
- children: [/* @__PURE__ */ b("p", {
480
+ children: [/* @__PURE__ */ T("p", {
413
481
  className: "text-2xl font-bold text-text-primary",
414
- children: [u?.completionRate ?? 0, "%"]
415
- }), /* @__PURE__ */ y("p", {
482
+ children: [m?.completionRate ?? 0, "%"]
483
+ }), /* @__PURE__ */ w("p", {
416
484
  className: "text-xs text-text-secondary",
417
485
  children: "On-Time Delivery"
418
486
  })]
@@ -420,239 +488,239 @@ var C = [
420
488
  ]
421
489
  })
422
490
  ] }),
423
- f === "address" && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
491
+ M === "address" && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h2", {
424
492
  className: "text-lg font-semibold text-text-primary mb-5",
425
493
  children: "Address Information"
426
- }), /* @__PURE__ */ b("div", {
494
+ }), /* @__PURE__ */ T("div", {
427
495
  className: "space-y-6",
428
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
496
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
429
497
  className: "text-sm font-semibold text-text-primary mb-3",
430
498
  children: "Current Address"
431
- }), /* @__PURE__ */ b("div", {
499
+ }), /* @__PURE__ */ T("div", {
432
500
  className: "grid sm:grid-cols-2 gap-4",
433
501
  children: [
434
- /* @__PURE__ */ b("div", {
502
+ /* @__PURE__ */ T("div", {
435
503
  className: "sm:col-span-2",
436
- children: [/* @__PURE__ */ y("label", {
504
+ children: [/* @__PURE__ */ w("label", {
437
505
  className: "block text-xs font-medium text-text-secondary mb-1",
438
506
  children: "Address Line"
439
- }), /* @__PURE__ */ y("textarea", {
507
+ }), /* @__PURE__ */ w("textarea", {
440
508
  rows: 2,
441
- value: k.currentAddress,
442
- onChange: (e) => N("currentAddress", e.target.value),
443
- disabled: !T,
509
+ value: R.currentAddress,
510
+ onChange: (e) => H("currentAddress", e.target.value),
511
+ disabled: !P,
444
512
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40 resize-none"
445
513
  })]
446
514
  }),
447
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
515
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
448
516
  className: "block text-xs font-medium text-text-secondary mb-1",
449
517
  children: "City"
450
- }), /* @__PURE__ */ y("input", {
518
+ }), /* @__PURE__ */ w("input", {
451
519
  type: "text",
452
- value: k.city,
453
- onChange: (e) => N("city", e.target.value),
454
- disabled: !T,
520
+ value: R.city,
521
+ onChange: (e) => H("city", e.target.value),
522
+ disabled: !P,
455
523
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
456
524
  })] }),
457
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
525
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
458
526
  className: "block text-xs font-medium text-text-secondary mb-1",
459
527
  children: "State"
460
- }), /* @__PURE__ */ y("input", {
528
+ }), /* @__PURE__ */ w("input", {
461
529
  type: "text",
462
- value: k.state,
463
- onChange: (e) => N("state", e.target.value),
464
- disabled: !T,
530
+ value: R.state,
531
+ onChange: (e) => H("state", e.target.value),
532
+ disabled: !P,
465
533
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
466
534
  })] }),
467
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
535
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
468
536
  className: "block text-xs font-medium text-text-secondary mb-1",
469
537
  children: "Pincode"
470
- }), /* @__PURE__ */ y("input", {
538
+ }), /* @__PURE__ */ w("input", {
471
539
  type: "text",
472
- value: k.pincode,
473
- onChange: (e) => N("pincode", e.target.value),
474
- disabled: !T,
540
+ value: R.pincode,
541
+ onChange: (e) => H("pincode", e.target.value),
542
+ disabled: !P,
475
543
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
476
544
  })] })
477
545
  ]
478
- })] }), /* @__PURE__ */ b("div", { children: [
479
- /* @__PURE__ */ y("h3", {
546
+ })] }), /* @__PURE__ */ T("div", { children: [
547
+ /* @__PURE__ */ w("h3", {
480
548
  className: "text-sm font-semibold text-text-primary mb-3",
481
549
  children: "Permanent Address"
482
550
  }),
483
- /* @__PURE__ */ b("label", {
551
+ /* @__PURE__ */ T("label", {
484
552
  className: "flex items-center gap-2 mb-3 cursor-pointer",
485
- children: [/* @__PURE__ */ y("input", {
553
+ children: [/* @__PURE__ */ w("input", {
486
554
  type: "checkbox",
487
- checked: k.sameAsCurrent,
488
- onChange: (e) => N("sameAsCurrent", e.target.checked),
489
- disabled: !T,
555
+ checked: R.sameAsCurrent,
556
+ onChange: (e) => H("sameAsCurrent", e.target.checked),
557
+ disabled: !P,
490
558
  className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-border-focus/40"
491
- }), /* @__PURE__ */ y("span", {
559
+ }), /* @__PURE__ */ w("span", {
492
560
  className: "text-xs text-text-primary",
493
561
  children: "Same as current address"
494
562
  })]
495
563
  }),
496
- !k.sameAsCurrent && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
564
+ !R.sameAsCurrent && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
497
565
  className: "block text-xs font-medium text-text-secondary mb-1",
498
566
  children: "Address Line"
499
- }), /* @__PURE__ */ y("textarea", {
567
+ }), /* @__PURE__ */ w("textarea", {
500
568
  rows: 2,
501
- value: k.permanentAddress,
502
- onChange: (e) => N("permanentAddress", e.target.value),
503
- disabled: !T,
569
+ value: R.permanentAddress,
570
+ onChange: (e) => H("permanentAddress", e.target.value),
571
+ disabled: !P,
504
572
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40 resize-none"
505
573
  })] })
506
574
  ] })]
507
575
  })] }),
508
- f === "documents" && /* @__PURE__ */ b("div", { children: [
509
- /* @__PURE__ */ y("h2", {
576
+ M === "documents" && /* @__PURE__ */ T("div", { children: [
577
+ /* @__PURE__ */ w("h2", {
510
578
  className: "text-lg font-semibold text-text-primary mb-5",
511
579
  children: "Documents & Banking"
512
580
  }),
513
- /* @__PURE__ */ y("div", {
581
+ /* @__PURE__ */ w("div", {
514
582
  className: "rounded-lg bg-status-warning-bg-subtle border border-status-warning-text/20 p-3 mb-5",
515
- children: /* @__PURE__ */ b("p", {
583
+ children: /* @__PURE__ */ T("p", {
516
584
  className: "text-xs text-status-warning-text flex items-center gap-2",
517
- children: [/* @__PURE__ */ y(h, { className: "h-4 w-4 shrink-0" }), "Your documents and banking information are encrypted and secure."]
585
+ children: [/* @__PURE__ */ w(b, { className: "h-4 w-4 shrink-0" }), "Your documents and banking information are encrypted and secure."]
518
586
  })
519
587
  }),
520
- /* @__PURE__ */ b("div", {
588
+ /* @__PURE__ */ T("div", {
521
589
  className: "grid sm:grid-cols-2 gap-4",
522
590
  children: [
523
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
591
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
524
592
  className: "block text-xs font-medium text-text-secondary mb-1",
525
593
  children: "PAN Number"
526
- }), /* @__PURE__ */ y("input", {
594
+ }), /* @__PURE__ */ w("input", {
527
595
  type: "text",
528
- value: k.panNumber,
596
+ value: R.panNumber,
529
597
  disabled: !0,
530
598
  placeholder: "Not on file",
531
599
  className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary cursor-not-allowed"
532
600
  })] }),
533
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
601
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
534
602
  className: "block text-xs font-medium text-text-secondary mb-1",
535
603
  children: "Aadhar Number"
536
- }), /* @__PURE__ */ y("input", {
604
+ }), /* @__PURE__ */ w("input", {
537
605
  type: "text",
538
- value: k.aadharNumber,
606
+ value: R.aadharNumber,
539
607
  disabled: !0,
540
608
  placeholder: "Not on file",
541
609
  className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary cursor-not-allowed"
542
610
  })] }),
543
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
611
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
544
612
  className: "block text-xs font-medium text-text-secondary mb-1",
545
613
  children: "Bank Name"
546
- }), /* @__PURE__ */ y("input", {
614
+ }), /* @__PURE__ */ w("input", {
547
615
  type: "text",
548
- value: k.bankName,
549
- onChange: (e) => N("bankName", e.target.value),
550
- disabled: !T,
616
+ value: R.bankName,
617
+ onChange: (e) => H("bankName", e.target.value),
618
+ disabled: !P,
551
619
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
552
620
  })] }),
553
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
621
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
554
622
  className: "block text-xs font-medium text-text-secondary mb-1",
555
623
  children: "Account Number"
556
- }), /* @__PURE__ */ y("input", {
624
+ }), /* @__PURE__ */ w("input", {
557
625
  type: "text",
558
- value: k.accountNumber,
626
+ value: R.accountNumber,
559
627
  disabled: !0,
560
628
  placeholder: "Not on file",
561
629
  className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary cursor-not-allowed"
562
630
  })] }),
563
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
631
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
564
632
  className: "block text-xs font-medium text-text-secondary mb-1",
565
633
  children: "IFSC Code"
566
- }), /* @__PURE__ */ y("input", {
634
+ }), /* @__PURE__ */ w("input", {
567
635
  type: "text",
568
- value: k.ifscCode,
569
- onChange: (e) => N("ifscCode", e.target.value),
570
- disabled: !T,
636
+ value: R.ifscCode,
637
+ onChange: (e) => H("ifscCode", e.target.value),
638
+ disabled: !P,
571
639
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
572
640
  })] })
573
641
  ]
574
642
  })
575
643
  ] }),
576
- f === "achievements" && /* @__PURE__ */ b("div", { children: [
577
- /* @__PURE__ */ y("h2", {
644
+ M === "achievements" && /* @__PURE__ */ T("div", { children: [
645
+ /* @__PURE__ */ w("h2", {
578
646
  className: "text-lg font-semibold text-text-primary mb-5",
579
647
  children: "Achievements & Recognition"
580
648
  }),
581
- /* @__PURE__ */ b("div", {
649
+ /* @__PURE__ */ T("div", {
582
650
  className: "mb-7",
583
- children: [/* @__PURE__ */ y("h3", {
651
+ children: [/* @__PURE__ */ w("h3", {
584
652
  className: "text-sm font-semibold text-text-primary mb-4",
585
653
  children: "Performance Metrics"
586
- }), /* @__PURE__ */ b("div", {
654
+ }), /* @__PURE__ */ T("div", {
587
655
  className: "space-y-4",
588
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("div", {
656
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
589
657
  className: "flex justify-between items-center mb-1.5",
590
- children: [/* @__PURE__ */ y("span", {
658
+ children: [/* @__PURE__ */ w("span", {
591
659
  className: "text-xs text-text-secondary",
592
660
  children: "On-Time Completion Rate"
593
- }), /* @__PURE__ */ b("span", {
661
+ }), /* @__PURE__ */ T("span", {
594
662
  className: "text-xs font-medium text-text-primary",
595
- children: [u?.completionRate ?? 0, "%"]
663
+ children: [m?.completionRate ?? 0, "%"]
596
664
  })]
597
- }), /* @__PURE__ */ y("div", {
665
+ }), /* @__PURE__ */ w("div", {
598
666
  className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
599
- children: /* @__PURE__ */ y("div", {
667
+ children: /* @__PURE__ */ w("div", {
600
668
  className: "h-full rounded-full bg-status-success-text transition-all",
601
- style: { width: `${u?.completionRate ?? 0}%` }
669
+ style: { width: `${m?.completionRate ?? 0}%` }
602
670
  })
603
- })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("div", {
671
+ })] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
604
672
  className: "flex justify-between items-center mb-1.5",
605
- children: [/* @__PURE__ */ y("span", {
673
+ children: [/* @__PURE__ */ w("span", {
606
674
  className: "text-xs text-text-secondary",
607
675
  children: "Average Customer Rating"
608
- }), /* @__PURE__ */ b("span", {
676
+ }), /* @__PURE__ */ T("span", {
609
677
  className: "text-xs font-medium text-text-primary",
610
- children: [u?.averageRating ?? 0, "/5"]
678
+ children: [m?.averageRating ?? 0, "/5"]
611
679
  })]
612
- }), /* @__PURE__ */ y("div", {
680
+ }), /* @__PURE__ */ w("div", {
613
681
  className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
614
- children: /* @__PURE__ */ y("div", {
682
+ children: /* @__PURE__ */ w("div", {
615
683
  className: "h-full rounded-full bg-action-primary-bg transition-all",
616
- style: { width: `${(u?.averageRating ?? 0) / 5 * 100}%` }
684
+ style: { width: `${(m?.averageRating ?? 0) / 5 * 100}%` }
617
685
  })
618
686
  })] })]
619
687
  })]
620
688
  }),
621
- /* @__PURE__ */ y(r, {
622
- icon: /* @__PURE__ */ y(o, { className: "h-12 w-12" }),
689
+ /* @__PURE__ */ w(r, {
690
+ icon: /* @__PURE__ */ w(d, { className: "h-12 w-12" }),
623
691
  title: "No badges yet",
624
692
  description: "Earn recognition as you complete deliveries and hit milestones. Achievement badges are coming soon."
625
693
  })
626
694
  ] }),
627
- f === "notifications" && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
695
+ M === "notifications" && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h2", {
628
696
  className: "text-lg font-semibold text-text-primary mb-5",
629
697
  children: "Notification Preferences"
630
- }), /* @__PURE__ */ y("div", {
698
+ }), /* @__PURE__ */ w("div", {
631
699
  className: "space-y-4",
632
- children: j.map((e) => /* @__PURE__ */ b("div", {
700
+ children: B.map((e) => /* @__PURE__ */ T("div", {
633
701
  className: "flex items-center justify-between p-4 rounded-lg bg-bg-sunken/50",
634
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h4", {
702
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h4", {
635
703
  className: "text-sm font-medium text-text-primary",
636
704
  children: e.label
637
- }), /* @__PURE__ */ y("p", {
705
+ }), /* @__PURE__ */ w("p", {
638
706
  className: "text-xs text-text-secondary mt-0.5",
639
707
  children: e.description
640
- })] }), /* @__PURE__ */ y("button", {
708
+ })] }), /* @__PURE__ */ w("button", {
641
709
  type: "button",
642
- onClick: () => I(e.id),
643
- disabled: !T,
644
- className: t("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", e.enabled ? "bg-action-primary-bg" : "bg-muted-foreground/30", !T && "opacity-60 cursor-not-allowed"),
645
- children: /* @__PURE__ */ y("span", { className: t("inline-block h-4 w-4 rounded-full bg-white transition-transform", e.enabled ? "translate-x-6" : "translate-x-1") })
710
+ onClick: () => G(e.id),
711
+ disabled: !P,
712
+ className: t("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", e.enabled ? "bg-action-primary-bg" : "bg-muted-foreground/30", !P && "opacity-60 cursor-not-allowed"),
713
+ children: /* @__PURE__ */ w("span", { className: t("inline-block h-4 w-4 rounded-full bg-white transition-transform", e.enabled ? "translate-x-6" : "translate-x-1") })
646
714
  })]
647
715
  }, e.id))
648
716
  })] })
649
717
  ]
650
- })
718
+ })]
651
719
  })]
652
720
  })]
653
721
  });
654
722
  };
655
723
  //#endregion
656
- export { w as WorkerProfilePage };
724
+ export { k as WorkerProfilePage };
657
725
 
658
726
  //# sourceMappingURL=WorkerProfilePage.js.map