@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.5

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