@burdenoff/microfe-adaptercloud 2026.625.2 → 2026.628.1

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 (153) hide show
  1. package/dist/adaptercloud/AdapterCloudRoot.js +65 -121
  2. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
  3. package/dist/adaptercloud/AdapterCloudRoutes.js +70 -182
  4. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
  5. package/dist/adaptercloud/components/DataState.js +42 -0
  6. package/dist/adaptercloud/components/DataState.js.map +1 -0
  7. package/dist/adaptercloud/components/SeverityBadge.js +12 -0
  8. package/dist/adaptercloud/components/SeverityBadge.js.map +1 -0
  9. package/dist/adaptercloud/components/StatusBadge.js +43 -44
  10. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  11. package/dist/adaptercloud/context/AdapterCloudContext.js +22 -30
  12. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -1
  13. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +397 -194
  14. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
  15. package/dist/adaptercloud/index.js +1 -0
  16. package/dist/adaptercloud/pages/OverviewPage.js +334 -0
  17. package/dist/adaptercloud/pages/OverviewPage.js.map +1 -0
  18. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +187 -0
  19. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -0
  20. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +278 -0
  21. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -0
  22. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js +172 -0
  23. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -0
  24. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js +247 -0
  25. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js.map +1 -0
  26. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js +271 -0
  27. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js.map +1 -0
  28. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +167 -0
  29. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -0
  30. package/dist/adaptercloud/pages/costs/CostsPage.js +169 -0
  31. package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/drift/DriftListPage.js +132 -0
  33. package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -0
  34. package/dist/adaptercloud/pages/policies/PoliciesListPage.js +171 -0
  35. package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js +185 -0
  37. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/policies/PolicyFormPage.js +215 -0
  39. package/dist/adaptercloud/pages/policies/PolicyFormPage.js.map +1 -0
  40. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +207 -0
  41. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/resources/ResourcesListPage.js +182 -0
  43. package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +196 -0
  45. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/violations/ViolationsListPage.js +258 -0
  47. package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -0
  48. package/dist/adaptercloud/store/adaptercloudStore.js +1 -7
  49. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -1
  50. package/dist/adaptercloud/utils/domain.js +105 -0
  51. package/dist/adaptercloud/utils/domain.js.map +1 -0
  52. package/dist/adaptercloud/utils/formatters.js +1 -12
  53. package/dist/adaptercloud/utils/formatters.js.map +1 -1
  54. package/dist/index.js +5 -4
  55. package/package.json +1 -1
  56. package/dist/adaptercloud/components/InvestmentCard.js +0 -98
  57. package/dist/adaptercloud/components/InvestmentCard.js.map +0 -1
  58. package/dist/adaptercloud/components/RatingDisplay.js +0 -35
  59. package/dist/adaptercloud/components/RatingDisplay.js.map +0 -1
  60. package/dist/adaptercloud/mocks/data.js +0 -1517
  61. package/dist/adaptercloud/mocks/data.js.map +0 -1
  62. package/dist/adaptercloud/mocks/users.js +0 -34
  63. package/dist/adaptercloud/mocks/users.js.map +0 -1
  64. package/dist/adaptercloud/pages/HomePage.js +0 -934
  65. package/dist/adaptercloud/pages/HomePage.js.map +0 -1
  66. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +0 -653
  67. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +0 -1
  68. package/dist/adaptercloud/pages/admin/AdminDashboard.js +0 -665
  69. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +0 -1
  70. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +0 -426
  71. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +0 -1
  72. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +0 -665
  73. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +0 -1
  74. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +0 -261
  75. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +0 -1
  76. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +0 -663
  77. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +0 -1
  78. package/dist/adaptercloud/pages/admin/CartManagementPage.js +0 -874
  79. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +0 -1
  80. package/dist/adaptercloud/pages/admin/UserManagementPage.js +0 -898
  81. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +0 -1
  82. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +0 -840
  83. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  84. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +0 -714
  85. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  86. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +0 -788
  87. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  88. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +0 -888
  89. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  90. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +0 -634
  91. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  92. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +0 -907
  93. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  94. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +0 -875
  95. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +0 -1
  96. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +0 -827
  97. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +0 -1
  98. package/dist/adaptercloud/pages/common/HelpSupportPage.js +0 -1329
  99. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +0 -1
  100. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +0 -671
  101. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +0 -1
  102. package/dist/adaptercloud/pages/common/SettingsPage.js +0 -982
  103. package/dist/adaptercloud/pages/common/SettingsPage.js.map +0 -1
  104. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +0 -596
  105. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +0 -1
  106. package/dist/adaptercloud/pages/customer/CartDetailPage.js +0 -623
  107. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +0 -1
  108. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +0 -552
  109. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +0 -1
  110. package/dist/adaptercloud/pages/customer/CheckoutPage.js +0 -534
  111. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +0 -1
  112. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +0 -525
  113. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +0 -1
  114. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +0 -623
  115. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +0 -1
  116. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +0 -629
  117. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +0 -1
  118. package/dist/adaptercloud/pages/customer/FavoritesPage.js +0 -480
  119. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +0 -1
  120. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +0 -444
  121. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +0 -1
  122. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +0 -391
  123. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +0 -1
  124. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +0 -504
  125. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +0 -1
  126. package/dist/adaptercloud/pages/customer/ReviewsPage.js +0 -609
  127. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +0 -1
  128. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +0 -459
  129. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +0 -1
  130. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +0 -851
  131. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +0 -1
  132. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +0 -942
  133. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  134. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +0 -683
  135. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  136. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +0 -452
  137. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +0 -1
  138. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +0 -402
  139. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  140. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +0 -571
  141. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +0 -1
  142. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +0 -1067
  143. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +0 -1
  144. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +0 -526
  145. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +0 -1
  146. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +0 -659
  147. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +0 -1
  148. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +0 -678
  149. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +0 -1
  150. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +0 -689
  151. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +0 -1
  152. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +0 -582
  153. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,582 +0,0 @@
1
- import { useAdapterCloud as e } from "../../context/AdapterCloudContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { useEffect as a, useMemo as o, useState as s } from "react";
7
- import { Calendar as c, CalendarDays as l, CheckCircle2 as u, ChevronLeft as d, ChevronRight as f, Loader2 as p, LogIn as m, LogOut as h, MapPin as g, PlayCircle as _, Save as v, Send as y, ShoppingCart as b, Star as x, Timer as S } from "lucide-react";
8
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
9
- import { EmphasisPanel as T } from "@burdenoff/fe-libs/ui";
10
- //#region src/adaptercloud/pages/worker/WorkerSchedulePage.tsx
11
- function E(e) {
12
- return new Date(e).toLocaleDateString("en-US", {
13
- weekday: "short",
14
- month: "short",
15
- day: "numeric"
16
- });
17
- }
18
- function D(e) {
19
- let [t, n] = e.split(":"), r = parseInt(t), i = r >= 12 ? "PM" : "AM";
20
- return `${r % 12 || 12}:${n} ${i}`;
21
- }
22
- function O(e) {
23
- let t = /* @__PURE__ */ new Date(), n = t.getDay(), r = new Date(t);
24
- r.setDate(t.getDate() - n + e * 7);
25
- let i = new Date(r);
26
- return i.setDate(r.getDate() + 6), {
27
- start: r.toLocaleDateString("en-US", {
28
- month: "short",
29
- day: "numeric"
30
- }),
31
- end: i.toLocaleDateString("en-US", {
32
- month: "short",
33
- day: "numeric",
34
- year: "numeric"
35
- })
36
- };
37
- }
38
- function k(e) {
39
- switch (e) {
40
- case "scheduled": return "bg-accent-blue-subtle/20 text-accent-blue";
41
- case "ongoing": return "bg-status-success-bg-subtle/20 text-status-success-text";
42
- case "completed": return "bg-secondary text-secondary-foreground";
43
- case "cancelled": return "bg-status-error-bg-subtle/20 text-status-error-text";
44
- default: return "bg-secondary text-secondary-foreground";
45
- }
46
- }
47
- function A(e) {
48
- switch (e) {
49
- case "pending": return "bg-status-warning-bg-subtle/20 text-status-warning-text";
50
- case "approved": return "bg-status-success-bg-subtle/20 text-status-success-text";
51
- case "rejected": return "bg-status-error-bg-subtle/20 text-status-error-text";
52
- default: return "bg-secondary text-secondary-foreground";
53
- }
54
- }
55
- var j = () => {
56
- let { navigateTo: j } = e(), [M, N] = s(!0), [P, F] = s("schedule"), [I, L] = s(0), [R, z] = s([]), [B, V] = s([]), [H, U] = s([]);
57
- a(() => {
58
- N(!0);
59
- let e = setTimeout(() => {
60
- z([
61
- {
62
- id: "shift-001",
63
- date: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
64
- startTime: "09:00",
65
- endTime: "14:00",
66
- cartId: "cart-001",
67
- cartName: "South Indian Express",
68
- location: "MG Road, Bangalore",
69
- status: "ongoing",
70
- earnings: 1200,
71
- tasksCompleted: 8
72
- },
73
- {
74
- id: "shift-002",
75
- date: new Date(Date.now() + 1440 * 60 * 1e3).toISOString().split("T")[0],
76
- startTime: "14:00",
77
- endTime: "20:00",
78
- cartId: "cart-002",
79
- cartName: "Chaat Corner",
80
- location: "Brigade Road, Bangalore",
81
- status: "scheduled",
82
- earnings: 1500
83
- },
84
- {
85
- id: "shift-003",
86
- date: (/* @__PURE__ */ new Date(Date.now() - 1440 * 60 * 1e3)).toISOString().split("T")[0],
87
- startTime: "10:00",
88
- endTime: "16:00",
89
- cartId: "cart-001",
90
- cartName: "South Indian Express",
91
- location: "MG Road, Bangalore",
92
- status: "completed",
93
- earnings: 1350,
94
- tasksCompleted: 12,
95
- rating: 4.8
96
- },
97
- {
98
- id: "shift-004",
99
- date: new Date(Date.now() + 4320 * 60 * 1e3).toISOString().split("T")[0],
100
- startTime: "08:00",
101
- endTime: "14:00",
102
- cartId: "cart-003",
103
- cartName: "Biryani Pot",
104
- location: "Frazer Town, Bangalore",
105
- status: "scheduled",
106
- earnings: 0
107
- }
108
- ]), V([
109
- {
110
- id: "req-001",
111
- date: new Date(Date.now() + 2880 * 60 * 1e3).toISOString().split("T")[0],
112
- startTime: "08:00",
113
- endTime: "14:00",
114
- cartName: "Burger Bliss",
115
- location: "Koramangala, Bangalore",
116
- status: "pending",
117
- requestedOn: (/* @__PURE__ */ new Date(Date.now() - 7200 * 1e3)).toISOString()
118
- },
119
- {
120
- id: "req-002",
121
- date: new Date(Date.now() + 4320 * 60 * 1e3).toISOString().split("T")[0],
122
- startTime: "16:00",
123
- endTime: "22:00",
124
- cartName: "Pizza Paradise",
125
- location: "Indiranagar, Bangalore",
126
- status: "approved",
127
- requestedOn: (/* @__PURE__ */ new Date(Date.now() - 1440 * 60 * 1e3)).toISOString()
128
- },
129
- {
130
- id: "req-003",
131
- date: (/* @__PURE__ */ new Date(Date.now() - 2880 * 60 * 1e3)).toISOString().split("T")[0],
132
- startTime: "10:00",
133
- endTime: "16:00",
134
- cartName: "Dosa Express",
135
- location: "BTM Layout, Bangalore",
136
- status: "rejected",
137
- requestedOn: (/* @__PURE__ */ new Date(Date.now() - 4320 * 60 * 1e3)).toISOString()
138
- }
139
- ]), U([
140
- {
141
- dayOfWeek: "Monday",
142
- isAvailable: !0,
143
- preferredStartTime: "09:00",
144
- preferredEndTime: "18:00"
145
- },
146
- {
147
- dayOfWeek: "Tuesday",
148
- isAvailable: !0,
149
- preferredStartTime: "09:00",
150
- preferredEndTime: "18:00"
151
- },
152
- {
153
- dayOfWeek: "Wednesday",
154
- isAvailable: !0,
155
- preferredStartTime: "09:00",
156
- preferredEndTime: "18:00"
157
- },
158
- {
159
- dayOfWeek: "Thursday",
160
- isAvailable: !0,
161
- preferredStartTime: "09:00",
162
- preferredEndTime: "18:00"
163
- },
164
- {
165
- dayOfWeek: "Friday",
166
- isAvailable: !0,
167
- preferredStartTime: "09:00",
168
- preferredEndTime: "20:00"
169
- },
170
- {
171
- dayOfWeek: "Saturday",
172
- isAvailable: !0,
173
- preferredStartTime: "10:00",
174
- preferredEndTime: "20:00"
175
- },
176
- {
177
- dayOfWeek: "Sunday",
178
- isAvailable: !1,
179
- preferredStartTime: "09:00",
180
- preferredEndTime: "18:00"
181
- }
182
- ]), N(!1);
183
- }, 600);
184
- return () => clearTimeout(e);
185
- }, [I]);
186
- let W = o(() => {
187
- let e = R.filter((e) => e.status !== "cancelled"), t = e.reduce((e, t) => {
188
- let n = /* @__PURE__ */ new Date(`2024-01-01T${t.startTime}`);
189
- return e + ((/* @__PURE__ */ new Date(`2024-01-01T${t.endTime}`)).getTime() - n.getTime()) / (1e3 * 60 * 60);
190
- }, 0), n = e.reduce((e, t) => e + t.earnings, 0), r = R.find((e) => e.status === "scheduled");
191
- return {
192
- hoursThisWeek: t,
193
- shiftsThisWeek: e.length,
194
- earningsThisWeek: n,
195
- nextShift: r
196
- };
197
- }, [R]), G = B.filter((e) => e.status === "pending").length, K = O(I), q = (e) => {
198
- z((t) => t.map((t) => t.id === e ? {
199
- ...t,
200
- status: "ongoing"
201
- } : t)), alert("Checked in successfully");
202
- }, J = (e) => {
203
- z((t) => t.map((t) => t.id === e ? {
204
- ...t,
205
- status: "completed"
206
- } : t)), alert("Checked out successfully");
207
- }, Y = (e) => {
208
- V((t) => t.map((t) => t.id === e ? {
209
- ...t,
210
- status: "approved"
211
- } : t)), alert("Shift accepted");
212
- }, X = (e) => {
213
- V((t) => t.map((t) => t.id === e ? {
214
- ...t,
215
- status: "rejected"
216
- } : t)), alert("Shift rejected");
217
- }, Z = (e, t, n) => {
218
- U((r) => r.map((r) => r.dayOfWeek === e ? {
219
- ...r,
220
- [t]: n
221
- } : r));
222
- };
223
- return M ? /* @__PURE__ */ C(n, {
224
- title: "Schedule",
225
- description: "Manage your work schedule",
226
- children: /* @__PURE__ */ C("div", {
227
- className: "flex items-center justify-center py-24",
228
- children: /* @__PURE__ */ w("div", {
229
- className: "text-center",
230
- children: [/* @__PURE__ */ C(p, { className: "h-10 w-10 animate-spin text-text-secondary mx-auto mb-4" }), /* @__PURE__ */ C("p", {
231
- className: "text-sm text-text-secondary",
232
- children: "Loading schedule..."
233
- })]
234
- })
235
- })
236
- }) : /* @__PURE__ */ C(n, {
237
- title: "Schedule",
238
- description: "Manage your work schedule",
239
- purpose: "Plan your week — see your hours, shifts, and expected earnings, check when your next shift starts, and request shift changes or time off. Keep it up to date so you and the cart owner are always in sync.",
240
- children: /* @__PURE__ */ w("div", {
241
- className: "space-y-6",
242
- children: [/* @__PURE__ */ C(T, { children: /* @__PURE__ */ w("div", {
243
- className: "grid grid-cols-2 md:grid-cols-4 gap-3",
244
- children: [
245
- /* @__PURE__ */ w("div", {
246
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
247
- children: [/* @__PURE__ */ C("p", {
248
- className: "text-xs text-text-secondary",
249
- children: "Hours This Week"
250
- }), /* @__PURE__ */ w("p", {
251
- className: "text-2xl font-bold text-text-primary",
252
- children: [W.hoursThisWeek, "h"]
253
- })]
254
- }),
255
- /* @__PURE__ */ w("div", {
256
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
257
- children: [/* @__PURE__ */ C("p", {
258
- className: "text-xs text-text-secondary",
259
- children: "Shifts This Week"
260
- }), /* @__PURE__ */ C("p", {
261
- className: "text-2xl font-bold text-text-primary",
262
- children: W.shiftsThisWeek
263
- })]
264
- }),
265
- /* @__PURE__ */ w("div", {
266
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
267
- children: [/* @__PURE__ */ C("p", {
268
- className: "text-xs text-text-secondary",
269
- children: "Week Earnings"
270
- }), /* @__PURE__ */ C("p", {
271
- className: "text-2xl font-bold text-text-primary",
272
- children: i(W.earningsThisWeek, { minimumFractionDigits: 0 })
273
- })]
274
- }),
275
- /* @__PURE__ */ w("div", {
276
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
277
- children: [/* @__PURE__ */ C("p", {
278
- className: "text-xs text-text-secondary",
279
- children: "Next Shift"
280
- }), /* @__PURE__ */ C("p", {
281
- className: "text-sm font-bold text-text-primary",
282
- children: W.nextShift ? `${E(W.nextShift.date)} ${D(W.nextShift.startTime)}` : "None scheduled"
283
- })]
284
- })
285
- ]
286
- }) }), /* @__PURE__ */ w("div", {
287
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden",
288
- children: [/* @__PURE__ */ w("div", {
289
- className: "flex border-b border-border-subtle",
290
- children: [
291
- /* @__PURE__ */ w("button", {
292
- type: "button",
293
- onClick: () => F("schedule"),
294
- className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", P === "schedule" ? "border-b-2 border-accent-blue-subtle text-accent-blue bg-accent-blue-subtle/5" : "text-text-secondary hover:text-text-primary"),
295
- children: [/* @__PURE__ */ C(l, { className: "h-4 w-4" }), "My Schedule"]
296
- }),
297
- /* @__PURE__ */ w("button", {
298
- type: "button",
299
- onClick: () => F("requests"),
300
- className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", P === "requests" ? "border-b-2 border-accent-blue-subtle text-accent-blue bg-accent-blue-subtle/5" : "text-text-secondary hover:text-text-primary"),
301
- children: [
302
- /* @__PURE__ */ C(y, { className: "h-4 w-4" }),
303
- "Shift Requests",
304
- G > 0 && /* @__PURE__ */ C("span", {
305
- className: "ml-1 inline-flex items-center justify-center rounded-full bg-status-error-bg-subtle px-1.5 py-0.5 text-[10px] font-medium text-white",
306
- children: G
307
- })
308
- ]
309
- }),
310
- /* @__PURE__ */ w("button", {
311
- type: "button",
312
- onClick: () => F("availability"),
313
- className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", P === "availability" ? "border-b-2 border-accent-blue-subtle text-accent-blue bg-accent-blue-subtle/5" : "text-text-secondary hover:text-text-primary"),
314
- children: [/* @__PURE__ */ C(S, { className: "h-4 w-4" }), "Availability"]
315
- })
316
- ]
317
- }), /* @__PURE__ */ w("div", {
318
- className: "p-5",
319
- children: [
320
- P === "schedule" && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
321
- className: "flex items-center justify-between mb-5",
322
- children: [
323
- /* @__PURE__ */ w("button", {
324
- type: "button",
325
- onClick: () => L((e) => e - 1),
326
- className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
327
- children: [/* @__PURE__ */ C(d, { className: "h-3.5 w-3.5" }), "Previous Week"]
328
- }),
329
- /* @__PURE__ */ w("h3", {
330
- className: "text-sm font-medium text-text-primary",
331
- children: [
332
- K.start,
333
- " - ",
334
- K.end
335
- ]
336
- }),
337
- /* @__PURE__ */ w("button", {
338
- type: "button",
339
- onClick: () => L((e) => e + 1),
340
- className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
341
- children: ["Next Week", /* @__PURE__ */ C(f, { className: "h-3.5 w-3.5" })]
342
- })
343
- ]
344
- }), R.length === 0 ? /* @__PURE__ */ C(r, {
345
- illustration: "empty-data",
346
- icon: /* @__PURE__ */ C(c, { className: "h-12 w-12" }),
347
- title: "No shifts scheduled",
348
- description: "No shifts scheduled for this week"
349
- }) : /* @__PURE__ */ C("div", {
350
- className: "space-y-3",
351
- children: R.map((e) => /* @__PURE__ */ w("div", {
352
- className: t("rounded-lg border p-4 transition-colors", e.status === "ongoing" ? "border-status-success-border/30 bg-status-success-bg-subtle/5" : "border-border-subtle hover:bg-bg-sunken/30"),
353
- children: [
354
- /* @__PURE__ */ w("div", {
355
- className: "flex items-center justify-between mb-3",
356
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
357
- className: "flex items-center gap-2 flex-wrap",
358
- children: [/* @__PURE__ */ C("h4", {
359
- className: "text-sm font-semibold text-text-primary",
360
- children: E(e.date)
361
- }), /* @__PURE__ */ C("span", {
362
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", k(e.status)),
363
- children: e.status === "ongoing" ? "Ongoing" : e.status
364
- })]
365
- }), /* @__PURE__ */ w("p", {
366
- className: "text-xs text-text-secondary mt-1",
367
- children: [
368
- D(e.startTime),
369
- " - ",
370
- D(e.endTime)
371
- ]
372
- })] }), /* @__PURE__ */ w("div", {
373
- className: "text-right",
374
- children: [/* @__PURE__ */ C("p", {
375
- className: "text-lg font-bold text-text-primary",
376
- children: i(e.earnings, { minimumFractionDigits: 0 })
377
- }), e.rating != null && /* @__PURE__ */ w("p", {
378
- className: "text-xs text-text-secondary flex items-center gap-1 justify-end",
379
- children: [/* @__PURE__ */ C(x, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), e.rating]
380
- })]
381
- })]
382
- }),
383
- /* @__PURE__ */ w("div", {
384
- className: "grid grid-cols-1 md:grid-cols-3 gap-3 text-sm",
385
- children: [
386
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
387
- className: "text-xs text-text-secondary",
388
- children: "Cart"
389
- }), /* @__PURE__ */ w("p", {
390
- className: "text-xs font-medium text-text-primary flex items-center gap-1",
391
- children: [/* @__PURE__ */ C(b, { className: "h-3 w-3 text-text-secondary" }), e.cartName]
392
- })] }),
393
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
394
- className: "text-xs text-text-secondary",
395
- children: "Location"
396
- }), /* @__PURE__ */ w("p", {
397
- className: "text-xs font-medium text-text-primary flex items-center gap-1",
398
- children: [/* @__PURE__ */ C(g, { className: "h-3 w-3 text-text-secondary" }), e.location]
399
- })] }),
400
- e.tasksCompleted != null && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
401
- className: "text-xs text-text-secondary",
402
- children: "Tasks Completed"
403
- }), /* @__PURE__ */ w("p", {
404
- className: "text-xs font-medium text-text-primary flex items-center gap-1",
405
- children: [/* @__PURE__ */ C(u, { className: "h-3 w-3 text-text-secondary" }), e.tasksCompleted]
406
- })] })
407
- ]
408
- }),
409
- e.status === "scheduled" && /* @__PURE__ */ C("div", {
410
- className: "mt-3 pt-3 border-t border-border-subtle",
411
- children: /* @__PURE__ */ w("button", {
412
- type: "button",
413
- onClick: () => q(e.id),
414
- className: "inline-flex items-center gap-1.5 rounded-md bg-accent-blue-subtle/10 px-3 py-1.5 text-xs font-medium text-accent-blue hover:bg-accent-blue-subtle/20 transition-colors",
415
- children: [/* @__PURE__ */ C(m, { className: "h-3.5 w-3.5" }), "Check In"]
416
- })
417
- }),
418
- e.status === "ongoing" && /* @__PURE__ */ w("div", {
419
- className: "mt-3 pt-3 border-t border-status-success-border/20 flex items-center justify-between",
420
- children: [/* @__PURE__ */ w("span", {
421
- className: "text-xs font-medium text-status-success-text flex items-center gap-1",
422
- children: [/* @__PURE__ */ C(_, { className: "h-3.5 w-3.5" }), "Shift in progress"]
423
- }), /* @__PURE__ */ w("button", {
424
- type: "button",
425
- onClick: () => J(e.id),
426
- className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
427
- children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5" }), "Check Out"]
428
- })]
429
- })
430
- ]
431
- }, e.id))
432
- })] }),
433
- P === "requests" && /* @__PURE__ */ C("div", { children: B.length === 0 ? /* @__PURE__ */ C(r, {
434
- illustration: "empty-data",
435
- icon: /* @__PURE__ */ C(y, { className: "h-12 w-12" }),
436
- title: "No shift requests",
437
- description: "No shift requests available"
438
- }) : /* @__PURE__ */ C("div", {
439
- className: "space-y-3",
440
- children: B.map((e) => /* @__PURE__ */ w("div", {
441
- className: "rounded-lg border border-border-subtle p-4",
442
- children: [
443
- /* @__PURE__ */ w("div", {
444
- className: "flex items-center justify-between mb-3",
445
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h4", {
446
- className: "text-sm font-semibold text-text-primary",
447
- children: E(e.date)
448
- }), /* @__PURE__ */ w("p", {
449
- className: "text-xs text-text-secondary mt-0.5",
450
- children: [
451
- D(e.startTime),
452
- " - ",
453
- D(e.endTime)
454
- ]
455
- })] }), /* @__PURE__ */ C("span", {
456
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", A(e.status)),
457
- children: e.status
458
- })]
459
- }),
460
- /* @__PURE__ */ w("div", {
461
- className: "grid grid-cols-1 md:grid-cols-2 gap-3 text-sm mb-3",
462
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
463
- className: "text-xs text-text-secondary",
464
- children: "Cart"
465
- }), /* @__PURE__ */ C("p", {
466
- className: "text-xs font-medium text-text-primary",
467
- children: e.cartName
468
- })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
469
- className: "text-xs text-text-secondary",
470
- children: "Location"
471
- }), /* @__PURE__ */ C("p", {
472
- className: "text-xs font-medium text-text-primary",
473
- children: e.location
474
- })] })]
475
- }),
476
- /* @__PURE__ */ w("p", {
477
- className: "text-[10px] text-text-secondary mb-3",
478
- children: [
479
- "Requested",
480
- " ",
481
- new Date(e.requestedOn).toLocaleString("en-IN", {
482
- day: "numeric",
483
- month: "short",
484
- hour: "2-digit",
485
- minute: "2-digit",
486
- hour12: !0
487
- })
488
- ]
489
- }),
490
- e.status === "pending" && /* @__PURE__ */ w("div", {
491
- className: "flex gap-2",
492
- children: [/* @__PURE__ */ w("button", {
493
- type: "button",
494
- onClick: () => Y(e.id),
495
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
496
- children: [/* @__PURE__ */ C(u, { className: "h-3.5 w-3.5" }), "Accept"]
497
- }), /* @__PURE__ */ C("button", {
498
- type: "button",
499
- onClick: () => X(e.id),
500
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-error-bg-subtle/10 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle/20 transition-colors",
501
- children: "Reject"
502
- })]
503
- })
504
- ]
505
- }, e.id))
506
- }) }),
507
- P === "availability" && /* @__PURE__ */ w("div", { children: [
508
- /* @__PURE__ */ C("p", {
509
- className: "text-xs text-text-secondary mb-5",
510
- children: "Set your preferred working hours for each day of the week"
511
- }),
512
- /* @__PURE__ */ C("div", {
513
- className: "space-y-3",
514
- children: H.map((e) => /* @__PURE__ */ w("div", {
515
- className: t("flex flex-col sm:flex-row sm:items-center gap-3 p-3 rounded-lg border", e.isAvailable ? "border-border-subtle bg-bg-surface" : "border-border-subtle/50 bg-bg-sunken/30"),
516
- children: [/* @__PURE__ */ C("div", {
517
- className: "w-32 shrink-0",
518
- children: /* @__PURE__ */ w("label", {
519
- className: "flex items-center gap-2 cursor-pointer",
520
- children: [/* @__PURE__ */ C("input", {
521
- type: "checkbox",
522
- checked: e.isAvailable,
523
- onChange: (t) => Z(e.dayOfWeek, "isAvailable", t.target.checked),
524
- className: "h-4 w-4 rounded border-border-subtle text-accent-blue focus:ring-accent-blue-subtle/40"
525
- }), /* @__PURE__ */ C("span", {
526
- className: "text-sm font-medium text-text-primary",
527
- children: e.dayOfWeek
528
- })]
529
- })
530
- }), e.isAvailable ? /* @__PURE__ */ w("div", {
531
- className: "flex flex-col sm:flex-row gap-3 flex-1",
532
- children: [/* @__PURE__ */ w("div", {
533
- className: "flex items-center gap-2",
534
- children: [/* @__PURE__ */ C("span", {
535
- className: "text-xs text-text-secondary w-10",
536
- children: "From"
537
- }), /* @__PURE__ */ C("input", {
538
- type: "time",
539
- value: e.preferredStartTime,
540
- onChange: (t) => Z(e.dayOfWeek, "preferredStartTime", t.target.value),
541
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
542
- })]
543
- }), /* @__PURE__ */ w("div", {
544
- className: "flex items-center gap-2",
545
- children: [/* @__PURE__ */ C("span", {
546
- className: "text-xs text-text-secondary w-10",
547
- children: "To"
548
- }), /* @__PURE__ */ C("input", {
549
- type: "time",
550
- value: e.preferredEndTime,
551
- onChange: (t) => Z(e.dayOfWeek, "preferredEndTime", t.target.value),
552
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
553
- })]
554
- })]
555
- }) : /* @__PURE__ */ C("span", {
556
- className: "text-xs text-text-secondary",
557
- children: "Not available"
558
- })]
559
- }, e.dayOfWeek))
560
- }),
561
- /* @__PURE__ */ C("div", {
562
- className: "mt-5",
563
- children: /* @__PURE__ */ w("button", {
564
- type: "button",
565
- onClick: () => {
566
- alert("Availability updated successfully");
567
- },
568
- className: "inline-flex items-center gap-2 rounded-md bg-accent-blue-subtle/10 px-4 py-2 text-sm font-medium text-accent-blue hover:bg-accent-blue-subtle/20 transition-colors",
569
- children: [/* @__PURE__ */ C(v, { className: "h-4 w-4" }), "Save Availability"]
570
- })
571
- })
572
- ] })
573
- ]
574
- })]
575
- })]
576
- })
577
- });
578
- };
579
- //#endregion
580
- export { j as WorkerSchedulePage };
581
-
582
- //# sourceMappingURL=WorkerSchedulePage.js.map