@burdenoff/microfe-subscriberbot 2026.626.1 → 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 (141) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/subscriberbot/SubscriberBotRoot.js +61 -133
  3. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  4. package/dist/subscriberbot/SubscriberBotRoutes.js +56 -187
  5. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  6. package/dist/subscriberbot/components/StateViews.js +49 -0
  7. package/dist/subscriberbot/components/StateViews.js.map +1 -0
  8. package/dist/subscriberbot/components/StatusBadge.js +45 -47
  9. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  10. package/dist/subscriberbot/context/SubscriberBotContext.js +22 -30
  11. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +342 -195
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  14. package/dist/subscriberbot/index.js +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +269 -0
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -0
  17. package/dist/subscriberbot/pages/InboxPage.js +186 -0
  18. package/dist/subscriberbot/pages/InboxPage.js.map +1 -0
  19. package/dist/subscriberbot/pages/InvoicesPage.js +211 -0
  20. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -0
  21. package/dist/subscriberbot/pages/WorkflowsPage.js +236 -0
  22. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -0
  23. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +160 -0
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -0
  25. package/dist/subscriberbot/pages/agents/AgentNewPage.js +140 -0
  26. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -0
  27. package/dist/subscriberbot/pages/agents/AgentsListPage.js +178 -0
  28. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -0
  29. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +179 -0
  30. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -0
  31. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +185 -0
  32. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -0
  33. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +254 -0
  34. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -0
  35. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +306 -0
  36. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -0
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +253 -0
  38. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -0
  39. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +248 -0
  40. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -0
  41. package/dist/subscriberbot/utils/formatters.js +50 -32
  42. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/subscriberbot/components/InvestmentCard.js +0 -97
  45. package/dist/subscriberbot/components/InvestmentCard.js.map +0 -1
  46. package/dist/subscriberbot/components/RatingDisplay.js +0 -35
  47. package/dist/subscriberbot/components/RatingDisplay.js.map +0 -1
  48. package/dist/subscriberbot/mocks/data.js +0 -1517
  49. package/dist/subscriberbot/mocks/data.js.map +0 -1
  50. package/dist/subscriberbot/mocks/users.js +0 -34
  51. package/dist/subscriberbot/mocks/users.js.map +0 -1
  52. package/dist/subscriberbot/pages/HomePage.js +0 -930
  53. package/dist/subscriberbot/pages/HomePage.js.map +0 -1
  54. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +0 -651
  55. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +0 -1
  56. package/dist/subscriberbot/pages/admin/AdminDashboard.js +0 -679
  57. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +0 -1
  58. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +0 -427
  59. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +0 -1
  60. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +0 -665
  61. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +0 -1
  62. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +0 -261
  63. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +0 -1
  64. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +0 -654
  65. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +0 -1
  66. package/dist/subscriberbot/pages/admin/CartManagementPage.js +0 -874
  67. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +0 -1
  68. package/dist/subscriberbot/pages/admin/UserManagementPage.js +0 -898
  69. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +0 -1
  70. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +0 -839
  71. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  72. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +0 -705
  73. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  74. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +0 -802
  75. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  76. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  77. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  78. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +0 -633
  79. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  80. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +0 -910
  81. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  82. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +0 -879
  83. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +0 -1
  84. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +0 -838
  85. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +0 -1
  86. package/dist/subscriberbot/pages/common/HelpSupportPage.js +0 -1323
  87. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +0 -1
  88. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +0 -672
  89. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +0 -1
  90. package/dist/subscriberbot/pages/common/SettingsPage.js +0 -973
  91. package/dist/subscriberbot/pages/common/SettingsPage.js.map +0 -1
  92. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +0 -626
  93. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +0 -1
  94. package/dist/subscriberbot/pages/customer/CartDetailPage.js +0 -654
  95. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +0 -1
  96. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +0 -555
  97. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +0 -1
  98. package/dist/subscriberbot/pages/customer/CheckoutPage.js +0 -529
  99. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +0 -1
  100. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +0 -532
  101. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +0 -1
  102. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +0 -630
  103. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +0 -1
  104. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +0 -633
  105. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +0 -1
  106. package/dist/subscriberbot/pages/customer/FavoritesPage.js +0 -484
  107. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +0 -1
  108. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +0 -446
  109. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +0 -1
  110. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +0 -394
  111. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +0 -1
  112. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +0 -495
  113. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +0 -1
  114. package/dist/subscriberbot/pages/customer/ReviewsPage.js +0 -613
  115. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +0 -1
  116. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +0 -450
  117. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +0 -1
  118. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +0 -886
  119. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +0 -1
  120. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +0 -947
  121. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  122. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +0 -687
  123. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  124. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +0 -451
  125. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +0 -1
  126. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +0 -406
  127. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  128. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +0 -575
  129. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +0 -1
  130. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +0 -1070
  131. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +0 -1
  132. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +0 -535
  133. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +0 -1
  134. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +0 -666
  135. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +0 -1
  136. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +0 -681
  137. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +0 -1
  138. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +0 -692
  139. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +0 -1
  140. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +0 -588
  141. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,588 +0,0 @@
1
- import { useSubscriberBot as e } from "../../context/SubscriberBotContext.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, PagePurpose as E } from "@burdenoff/fe-libs/ui";
10
- //#region src/subscriberbot/pages/worker/WorkerSchedulePage.tsx
11
- function D(e) {
12
- return new Date(e).toLocaleDateString("en-US", {
13
- weekday: "short",
14
- month: "short",
15
- day: "numeric"
16
- });
17
- }
18
- function O(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 k(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 A(e) {
39
- switch (e) {
40
- case "scheduled": return "bg-status-info-bg/20 text-status-info-text";
41
- case "ongoing": return "bg-status-success-bg/20 text-status-success-text";
42
- case "completed": return "bg-secondary text-secondary-foreground";
43
- case "cancelled": return "bg-status-error-bg/20 text-status-error-text";
44
- default: return "bg-secondary text-secondary-foreground";
45
- }
46
- }
47
- function j(e) {
48
- switch (e) {
49
- case "pending": return "bg-status-warning-bg/20 text-status-warning-text";
50
- case "approved": return "bg-status-success-bg/20 text-status-success-text";
51
- case "rejected": return "bg-status-error-bg/20 text-status-error-text";
52
- default: return "bg-secondary text-secondary-foreground";
53
- }
54
- }
55
- var M = () => {
56
- let { navigateTo: M } = e(), [N, P] = s(!0), [F, I] = s("schedule"), [L, R] = s(0), [z, B] = s([]), [V, H] = s([]), [U, W] = s([]);
57
- a(() => {
58
- P(!0);
59
- let e = setTimeout(() => {
60
- B([
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
- ]), H([
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
- ]), W([
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
- ]), P(!1);
183
- }, 600);
184
- return () => clearTimeout(e);
185
- }, [L]);
186
- let G = o(() => {
187
- let e = z.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 = z.find((e) => e.status === "scheduled");
191
- return {
192
- hoursThisWeek: t,
193
- shiftsThisWeek: e.length,
194
- earningsThisWeek: n,
195
- nextShift: r
196
- };
197
- }, [z]), K = V.filter((e) => e.status === "pending").length, q = k(L), J = (e) => {
198
- B((t) => t.map((t) => t.id === e ? {
199
- ...t,
200
- status: "ongoing"
201
- } : t)), alert("Checked in successfully");
202
- }, Y = (e) => {
203
- B((t) => t.map((t) => t.id === e ? {
204
- ...t,
205
- status: "completed"
206
- } : t)), alert("Checked out successfully");
207
- }, X = (e) => {
208
- H((t) => t.map((t) => t.id === e ? {
209
- ...t,
210
- status: "approved"
211
- } : t)), alert("Shift accepted");
212
- }, Z = (e) => {
213
- H((t) => t.map((t) => t.id === e ? {
214
- ...t,
215
- status: "rejected"
216
- } : t)), alert("Shift rejected");
217
- }, Q = (e, t, n) => {
218
- W((r) => r.map((r) => r.dayOfWeek === e ? {
219
- ...r,
220
- [t]: n
221
- } : r));
222
- };
223
- return N ? /* @__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
- children: /* @__PURE__ */ w("div", {
240
- className: "space-y-6",
241
- children: [
242
- /* @__PURE__ */ C(E, {
243
- icon: /* @__PURE__ */ C(l, { className: "h-4 w-4" }),
244
- children: "Plan your work week. See your upcoming shifts, the hours and earnings you're on track for, and when your next shift starts. Switch between your schedule and time-off requests to stay organised — and make sure you're never caught off guard by a shift you forgot."
245
- }),
246
- /* @__PURE__ */ w(T, {
247
- className: "grid grid-cols-2 md:grid-cols-4 gap-3",
248
- children: [
249
- /* @__PURE__ */ w("div", {
250
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
251
- children: [/* @__PURE__ */ C("p", {
252
- className: "text-xs text-text-secondary",
253
- children: "Hours This Week"
254
- }), /* @__PURE__ */ w("p", {
255
- className: "text-2xl font-bold text-text-primary",
256
- children: [G.hoursThisWeek, "h"]
257
- })]
258
- }),
259
- /* @__PURE__ */ w("div", {
260
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
261
- children: [/* @__PURE__ */ C("p", {
262
- className: "text-xs text-text-secondary",
263
- children: "Shifts This Week"
264
- }), /* @__PURE__ */ C("p", {
265
- className: "text-2xl font-bold text-text-primary",
266
- children: G.shiftsThisWeek
267
- })]
268
- }),
269
- /* @__PURE__ */ w("div", {
270
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
271
- children: [/* @__PURE__ */ C("p", {
272
- className: "text-xs text-text-secondary",
273
- children: "Week Earnings"
274
- }), /* @__PURE__ */ C("p", {
275
- className: "text-2xl font-bold text-text-primary",
276
- children: i(G.earningsThisWeek, { minimumFractionDigits: 0 })
277
- })]
278
- }),
279
- /* @__PURE__ */ w("div", {
280
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
281
- children: [/* @__PURE__ */ C("p", {
282
- className: "text-xs text-text-secondary",
283
- children: "Next Shift"
284
- }), /* @__PURE__ */ C("p", {
285
- className: "text-sm font-bold text-text-primary",
286
- children: G.nextShift ? `${D(G.nextShift.date)} ${O(G.nextShift.startTime)}` : "None scheduled"
287
- })]
288
- })
289
- ]
290
- }),
291
- /* @__PURE__ */ w("div", {
292
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm overflow-hidden",
293
- children: [/* @__PURE__ */ w("div", {
294
- className: "flex border-b border-border-seam",
295
- children: [
296
- /* @__PURE__ */ w("button", {
297
- type: "button",
298
- onClick: () => I("schedule"),
299
- className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", F === "schedule" ? "border-b-2 border-status-info-border text-status-info-text bg-status-info-bg/5" : "text-text-secondary hover:text-text-primary"),
300
- children: [/* @__PURE__ */ C(l, { className: "h-4 w-4" }), "My Schedule"]
301
- }),
302
- /* @__PURE__ */ w("button", {
303
- type: "button",
304
- onClick: () => I("requests"),
305
- className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", F === "requests" ? "border-b-2 border-status-info-border text-status-info-text bg-status-info-bg/5" : "text-text-secondary hover:text-text-primary"),
306
- children: [
307
- /* @__PURE__ */ C(y, { className: "h-4 w-4" }),
308
- "Shift Requests",
309
- K > 0 && /* @__PURE__ */ C("span", {
310
- className: "ml-1 inline-flex items-center justify-center rounded-full bg-status-error-text px-1.5 py-0.5 text-[10px] font-medium text-text-inverse",
311
- children: K
312
- })
313
- ]
314
- }),
315
- /* @__PURE__ */ w("button", {
316
- type: "button",
317
- onClick: () => I("availability"),
318
- className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", F === "availability" ? "border-b-2 border-status-info-border text-status-info-text bg-status-info-bg/5" : "text-text-secondary hover:text-text-primary"),
319
- children: [/* @__PURE__ */ C(S, { className: "h-4 w-4" }), "Availability"]
320
- })
321
- ]
322
- }), /* @__PURE__ */ w("div", {
323
- className: "p-5",
324
- children: [
325
- F === "schedule" && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
326
- className: "flex items-center justify-between mb-5",
327
- children: [
328
- /* @__PURE__ */ w("button", {
329
- type: "button",
330
- onClick: () => R((e) => e - 1),
331
- 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",
332
- children: [/* @__PURE__ */ C(d, { className: "h-3.5 w-3.5" }), "Previous Week"]
333
- }),
334
- /* @__PURE__ */ w("h3", {
335
- className: "text-sm font-medium text-text-primary",
336
- children: [
337
- q.start,
338
- " - ",
339
- q.end
340
- ]
341
- }),
342
- /* @__PURE__ */ w("button", {
343
- type: "button",
344
- onClick: () => R((e) => e + 1),
345
- 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",
346
- children: ["Next Week", /* @__PURE__ */ C(f, { className: "h-3.5 w-3.5" })]
347
- })
348
- ]
349
- }), z.length === 0 ? /* @__PURE__ */ C(r, {
350
- illustration: "empty-data",
351
- icon: /* @__PURE__ */ C(c, { className: "h-12 w-12" }),
352
- title: "No shifts scheduled",
353
- description: "No shifts scheduled for this week"
354
- }) : /* @__PURE__ */ C("div", {
355
- className: "space-y-3",
356
- children: z.map((e) => /* @__PURE__ */ w("div", {
357
- className: t("rounded-lg border p-4 transition-colors", e.status === "ongoing" ? "border-status-success-border/30 bg-status-success-bg/5" : "border-border-seam hover:bg-bg-sunken/30"),
358
- children: [
359
- /* @__PURE__ */ w("div", {
360
- className: "flex items-center justify-between mb-3",
361
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
362
- className: "flex items-center gap-2 flex-wrap",
363
- children: [/* @__PURE__ */ C("h4", {
364
- className: "text-sm font-semibold text-text-primary",
365
- children: D(e.date)
366
- }), /* @__PURE__ */ C("span", {
367
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", A(e.status)),
368
- children: e.status === "ongoing" ? "Ongoing" : e.status
369
- })]
370
- }), /* @__PURE__ */ w("p", {
371
- className: "text-xs text-text-secondary mt-1",
372
- children: [
373
- O(e.startTime),
374
- " - ",
375
- O(e.endTime)
376
- ]
377
- })] }), /* @__PURE__ */ w("div", {
378
- className: "text-right",
379
- children: [/* @__PURE__ */ C("p", {
380
- className: "text-lg font-bold text-text-primary",
381
- children: i(e.earnings, { minimumFractionDigits: 0 })
382
- }), e.rating != null && /* @__PURE__ */ w("p", {
383
- className: "text-xs text-text-secondary flex items-center gap-1 justify-end",
384
- children: [/* @__PURE__ */ C(x, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), e.rating]
385
- })]
386
- })]
387
- }),
388
- /* @__PURE__ */ w("div", {
389
- className: "grid grid-cols-1 md:grid-cols-3 gap-3 text-sm",
390
- children: [
391
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
392
- className: "text-xs text-text-secondary",
393
- children: "Cart"
394
- }), /* @__PURE__ */ w("p", {
395
- className: "text-xs font-medium text-text-primary flex items-center gap-1",
396
- children: [/* @__PURE__ */ C(b, { className: "h-3 w-3 text-text-secondary" }), e.cartName]
397
- })] }),
398
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
399
- className: "text-xs text-text-secondary",
400
- children: "Location"
401
- }), /* @__PURE__ */ w("p", {
402
- className: "text-xs font-medium text-text-primary flex items-center gap-1",
403
- children: [/* @__PURE__ */ C(g, { className: "h-3 w-3 text-text-secondary" }), e.location]
404
- })] }),
405
- e.tasksCompleted != null && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
406
- className: "text-xs text-text-secondary",
407
- children: "Tasks Completed"
408
- }), /* @__PURE__ */ w("p", {
409
- className: "text-xs font-medium text-text-primary flex items-center gap-1",
410
- children: [/* @__PURE__ */ C(u, { className: "h-3 w-3 text-text-secondary" }), e.tasksCompleted]
411
- })] })
412
- ]
413
- }),
414
- e.status === "scheduled" && /* @__PURE__ */ C("div", {
415
- className: "mt-3 pt-3 border-t border-border-seam",
416
- children: /* @__PURE__ */ w("button", {
417
- type: "button",
418
- onClick: () => J(e.id),
419
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-info-bg/10 px-3 py-1.5 text-xs font-medium text-status-info-text hover:bg-status-info-bg/20 transition-colors",
420
- children: [/* @__PURE__ */ C(m, { className: "h-3.5 w-3.5" }), "Check In"]
421
- })
422
- }),
423
- e.status === "ongoing" && /* @__PURE__ */ w("div", {
424
- className: "mt-3 pt-3 border-t border-status-success-border/20 flex items-center justify-between",
425
- children: [/* @__PURE__ */ w("span", {
426
- className: "text-xs font-medium text-status-success-text flex items-center gap-1",
427
- children: [/* @__PURE__ */ C(_, { className: "h-3.5 w-3.5" }), "Shift in progress"]
428
- }), /* @__PURE__ */ w("button", {
429
- type: "button",
430
- onClick: () => Y(e.id),
431
- 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",
432
- children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5" }), "Check Out"]
433
- })]
434
- })
435
- ]
436
- }, e.id))
437
- })] }),
438
- F === "requests" && /* @__PURE__ */ C("div", { children: V.length === 0 ? /* @__PURE__ */ C(r, {
439
- illustration: "empty-data",
440
- icon: /* @__PURE__ */ C(y, { className: "h-12 w-12" }),
441
- title: "No shift requests",
442
- description: "No shift requests available"
443
- }) : /* @__PURE__ */ C("div", {
444
- className: "space-y-3",
445
- children: V.map((e) => /* @__PURE__ */ w("div", {
446
- className: "rounded-lg border border-border-seam p-4",
447
- children: [
448
- /* @__PURE__ */ w("div", {
449
- className: "flex items-center justify-between mb-3",
450
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h4", {
451
- className: "text-sm font-semibold text-text-primary",
452
- children: D(e.date)
453
- }), /* @__PURE__ */ w("p", {
454
- className: "text-xs text-text-secondary mt-0.5",
455
- children: [
456
- O(e.startTime),
457
- " - ",
458
- O(e.endTime)
459
- ]
460
- })] }), /* @__PURE__ */ C("span", {
461
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", j(e.status)),
462
- children: e.status
463
- })]
464
- }),
465
- /* @__PURE__ */ w("div", {
466
- className: "grid grid-cols-1 md:grid-cols-2 gap-3 text-sm mb-3",
467
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
468
- className: "text-xs text-text-secondary",
469
- children: "Cart"
470
- }), /* @__PURE__ */ C("p", {
471
- className: "text-xs font-medium text-text-primary",
472
- children: e.cartName
473
- })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
474
- className: "text-xs text-text-secondary",
475
- children: "Location"
476
- }), /* @__PURE__ */ C("p", {
477
- className: "text-xs font-medium text-text-primary",
478
- children: e.location
479
- })] })]
480
- }),
481
- /* @__PURE__ */ w("p", {
482
- className: "text-[10px] text-text-secondary mb-3",
483
- children: [
484
- "Requested",
485
- " ",
486
- new Date(e.requestedOn).toLocaleString("en-IN", {
487
- day: "numeric",
488
- month: "short",
489
- hour: "2-digit",
490
- minute: "2-digit",
491
- hour12: !0
492
- })
493
- ]
494
- }),
495
- e.status === "pending" && /* @__PURE__ */ w("div", {
496
- className: "flex gap-2",
497
- children: [/* @__PURE__ */ w("button", {
498
- type: "button",
499
- onClick: () => X(e.id),
500
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg/20 transition-colors",
501
- children: [/* @__PURE__ */ C(u, { className: "h-3.5 w-3.5" }), "Accept"]
502
- }), /* @__PURE__ */ C("button", {
503
- type: "button",
504
- onClick: () => Z(e.id),
505
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-error-bg/10 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/20 transition-colors",
506
- children: "Reject"
507
- })]
508
- })
509
- ]
510
- }, e.id))
511
- }) }),
512
- F === "availability" && /* @__PURE__ */ w("div", { children: [
513
- /* @__PURE__ */ C("p", {
514
- className: "text-xs text-text-secondary mb-5",
515
- children: "Set your preferred working hours for each day of the week"
516
- }),
517
- /* @__PURE__ */ C("div", {
518
- className: "space-y-3",
519
- children: U.map((e) => /* @__PURE__ */ w("div", {
520
- className: t("flex flex-col sm:flex-row sm:items-center gap-3 p-3 rounded-lg border", e.isAvailable ? "border-border-seam bg-bg-surface" : "border-border-seam/50 bg-bg-sunken/30"),
521
- children: [/* @__PURE__ */ C("div", {
522
- className: "w-32 shrink-0",
523
- children: /* @__PURE__ */ w("label", {
524
- className: "flex items-center gap-2 cursor-pointer",
525
- children: [/* @__PURE__ */ C("input", {
526
- type: "checkbox",
527
- checked: e.isAvailable,
528
- onChange: (t) => Q(e.dayOfWeek, "isAvailable", t.target.checked),
529
- className: "h-4 w-4 rounded border-border-seam text-status-info-text focus:ring-status-info-border/40"
530
- }), /* @__PURE__ */ C("span", {
531
- className: "text-sm font-medium text-text-primary",
532
- children: e.dayOfWeek
533
- })]
534
- })
535
- }), e.isAvailable ? /* @__PURE__ */ w("div", {
536
- className: "flex flex-col sm:flex-row gap-3 flex-1",
537
- children: [/* @__PURE__ */ w("div", {
538
- className: "flex items-center gap-2",
539
- children: [/* @__PURE__ */ C("span", {
540
- className: "text-xs text-text-secondary w-10",
541
- children: "From"
542
- }), /* @__PURE__ */ C("input", {
543
- type: "time",
544
- value: e.preferredStartTime,
545
- onChange: (t) => Q(e.dayOfWeek, "preferredStartTime", t.target.value),
546
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-status-info-border/40"
547
- })]
548
- }), /* @__PURE__ */ w("div", {
549
- className: "flex items-center gap-2",
550
- children: [/* @__PURE__ */ C("span", {
551
- className: "text-xs text-text-secondary w-10",
552
- children: "To"
553
- }), /* @__PURE__ */ C("input", {
554
- type: "time",
555
- value: e.preferredEndTime,
556
- onChange: (t) => Q(e.dayOfWeek, "preferredEndTime", t.target.value),
557
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-status-info-border/40"
558
- })]
559
- })]
560
- }) : /* @__PURE__ */ C("span", {
561
- className: "text-xs text-text-secondary",
562
- children: "Not available"
563
- })]
564
- }, e.dayOfWeek))
565
- }),
566
- /* @__PURE__ */ C("div", {
567
- className: "mt-5",
568
- children: /* @__PURE__ */ w("button", {
569
- type: "button",
570
- onClick: () => {
571
- alert("Availability updated successfully");
572
- },
573
- className: "inline-flex items-center gap-2 rounded-md bg-status-info-bg/10 px-4 py-2 text-sm font-medium text-status-info-text hover:bg-status-info-bg/20 transition-colors",
574
- children: [/* @__PURE__ */ C(v, { className: "h-4 w-4" }), "Save Availability"]
575
- })
576
- })
577
- ] })
578
- ]
579
- })]
580
- })
581
- ]
582
- })
583
- });
584
- };
585
- //#endregion
586
- export { M as WorkerSchedulePage };
587
-
588
- //# sourceMappingURL=WorkerSchedulePage.js.map