@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.2

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