@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,838 +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 { useMemo as i, useState as a } from "react";
6
- import { AlertCircle as o, CheckCircle2 as s, Clock as c, Edit2 as l, Mail as u, Phone as d, Search as f, Star as p, Trash2 as m, UserPlus as h, Users as g, X as _ } from "lucide-react";
7
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
8
- import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
9
- //#region src/subscriberbot/pages/cart-owner/StaffManagementPage.tsx
10
- var S = [
11
- {
12
- id: "staff-001",
13
- firstName: "Ravi",
14
- lastName: "Kumar",
15
- email: "ravi@dosaexpress.in",
16
- phone: "+91-9876543210",
17
- role: "delivery",
18
- status: "active",
19
- dateJoined: "2023-06-15",
20
- lastActive: "2024-01-16T10:00:00Z",
21
- hourlyRate: 200,
22
- hoursWorked: 160,
23
- totalEarnings: 32e3,
24
- performance: {
25
- rating: 4.8,
26
- tasksCompleted: 245,
27
- customerRating: 4.7,
28
- punctuality: 95
29
- },
30
- currentShift: "09:00 - 17:00",
31
- shiftsThisWeek: 5
32
- },
33
- {
34
- id: "staff-002",
35
- firstName: "Suresh",
36
- lastName: "Worker",
37
- email: "suresh@dosaexpress.in",
38
- phone: "+91-9876543211",
39
- role: "chef",
40
- status: "active",
41
- dateJoined: "2023-08-20",
42
- lastActive: "2024-01-16T09:30:00Z",
43
- hourlyRate: 250,
44
- hoursWorked: 148,
45
- totalEarnings: 37e3,
46
- performance: {
47
- rating: 4.6,
48
- tasksCompleted: 312,
49
- customerRating: 4.5,
50
- punctuality: 90
51
- },
52
- currentShift: "10:00 - 18:00",
53
- shiftsThisWeek: 4
54
- },
55
- {
56
- id: "staff-003",
57
- firstName: "Amit",
58
- lastName: "Sharma",
59
- email: "amit@dosaexpress.in",
60
- phone: "+91-9876543212",
61
- role: "delivery",
62
- status: "on-leave",
63
- dateJoined: "2023-10-01",
64
- hourlyRate: 180,
65
- hoursWorked: 120,
66
- totalEarnings: 21600,
67
- performance: {
68
- rating: 4.4,
69
- tasksCompleted: 178,
70
- customerRating: 4.3,
71
- punctuality: 85
72
- },
73
- shiftsThisWeek: 0
74
- },
75
- {
76
- id: "staff-004",
77
- firstName: "Priya",
78
- lastName: "Helper",
79
- email: "priya@dosaexpress.in",
80
- phone: "+91-9876543213",
81
- role: "server",
82
- status: "inactive",
83
- dateJoined: "2024-01-05",
84
- hourlyRate: 150,
85
- hoursWorked: 40,
86
- totalEarnings: 6e3,
87
- performance: {
88
- rating: 4.7,
89
- tasksCompleted: 56,
90
- customerRating: 4.8,
91
- punctuality: 98
92
- },
93
- shiftsThisWeek: 0
94
- },
95
- {
96
- id: "staff-005",
97
- firstName: "Kiran",
98
- lastName: "B.",
99
- email: "kiran@dosaexpress.in",
100
- phone: "+91-9876543214",
101
- role: "cashier",
102
- status: "active",
103
- dateJoined: "2023-12-10",
104
- lastActive: "2024-01-16T11:00:00Z",
105
- hourlyRate: 175,
106
- hoursWorked: 80,
107
- totalEarnings: 14e3,
108
- performance: {
109
- rating: 4.3,
110
- tasksCompleted: 134,
111
- customerRating: 4.2,
112
- punctuality: 88
113
- },
114
- currentShift: "11:00 - 19:00",
115
- shiftsThisWeek: 5
116
- },
117
- {
118
- id: "staff-006",
119
- firstName: "Meera",
120
- lastName: "Devi",
121
- email: "meera@dosaexpress.in",
122
- phone: "+91-9876543215",
123
- role: "manager",
124
- status: "active",
125
- dateJoined: "2023-04-01",
126
- lastActive: "2024-01-16T08:00:00Z",
127
- hourlyRate: 350,
128
- hoursWorked: 168,
129
- totalEarnings: 58800,
130
- performance: {
131
- rating: 4.9,
132
- tasksCompleted: 420,
133
- customerRating: 4.9,
134
- punctuality: 99
135
- },
136
- currentShift: "08:00 - 16:00",
137
- shiftsThisWeek: 6
138
- }
139
- ], C = {
140
- active: {
141
- label: "Active",
142
- color: "text-status-success-text",
143
- dot: "bg-status-success-text"
144
- },
145
- inactive: {
146
- label: "Inactive",
147
- color: "text-text-secondary",
148
- dot: "bg-muted-foreground"
149
- },
150
- "on-leave": {
151
- label: "On Leave",
152
- color: "text-status-warning-text",
153
- dot: "bg-status-warning-text"
154
- },
155
- terminated: {
156
- label: "Terminated",
157
- color: "text-status-error-text",
158
- dot: "bg-status-error-text"
159
- }
160
- }, w = {
161
- manager: {
162
- label: "Manager",
163
- color: "bg-accent-purple-subtle text-accent-purple"
164
- },
165
- chef: {
166
- label: "Chef",
167
- color: "bg-status-warning-bg/20 text-status-warning-text"
168
- },
169
- server: {
170
- label: "Server",
171
- color: "bg-status-info-bg/20 text-status-info-text"
172
- },
173
- delivery: {
174
- label: "Delivery",
175
- color: "bg-status-success-bg/20 text-status-success-text"
176
- },
177
- cashier: {
178
- label: "Cashier",
179
- color: "bg-status-info-bg/20 text-status-info-text"
180
- }
181
- }, T = {
182
- email: "",
183
- firstName: "",
184
- lastName: "",
185
- phone: "",
186
- role: "server",
187
- hourlyRate: 150
188
- }, E = () => {
189
- let { navigateTo: E } = e(), [D, O] = a(S), [k, A] = a(""), [j, M] = a(""), [N, P] = a(""), [F, I] = a("name"), [L, R] = a(!1), [z, B] = a(!1), [V, H] = a(null), [U, W] = a(T), [G, K] = a({
190
- firstName: "",
191
- lastName: "",
192
- email: "",
193
- phone: "",
194
- role: "server",
195
- hourlyRate: 150,
196
- status: "active"
197
- }), [q, J] = a(null), Y = (e, t) => {
198
- J({
199
- text: e,
200
- type: t
201
- }), setTimeout(() => J(null), 3e3);
202
- }, X = D.filter((e) => e.status === "active").length, Z = D.filter((e) => e.status === "on-leave").length, Q = D.length > 0 ? (D.reduce((e, t) => e + t.performance.rating, 0) / D.length).toFixed(1) : "0";
203
- D.reduce((e, t) => e + t.totalEarnings, 0);
204
- let $ = i(() => {
205
- let e = [...D];
206
- if (k) {
207
- let t = k.toLowerCase();
208
- e = e.filter((e) => `${e.firstName} ${e.lastName}`.toLowerCase().includes(t) || e.email.toLowerCase().includes(t) || e.phone.includes(t));
209
- }
210
- switch (j && (e = e.filter((e) => e.role === j)), N && (e = e.filter((e) => e.status === N)), F) {
211
- case "name":
212
- e.sort((e, t) => `${e.firstName} ${e.lastName}`.localeCompare(`${t.firstName} ${t.lastName}`));
213
- break;
214
- case "rating":
215
- e.sort((e, t) => t.performance.rating - e.performance.rating);
216
- break;
217
- case "hours":
218
- e.sort((e, t) => t.hoursWorked - e.hoursWorked);
219
- break;
220
- case "joined":
221
- e.sort((e, t) => new Date(t.dateJoined).getTime() - new Date(e.dateJoined).getTime());
222
- break;
223
- }
224
- return e;
225
- }, [
226
- D,
227
- k,
228
- j,
229
- N,
230
- F
231
- ]), ee = () => {
232
- if (!U.email || !U.firstName || !U.lastName) {
233
- Y("Please fill in all required fields", "error");
234
- return;
235
- }
236
- let e = {
237
- id: `staff-${Date.now()}`,
238
- ...U,
239
- status: "active",
240
- dateJoined: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
241
- hoursWorked: 0,
242
- totalEarnings: 0,
243
- performance: {
244
- rating: 0,
245
- tasksCompleted: 0,
246
- customerRating: 0,
247
- punctuality: 0
248
- },
249
- shiftsThisWeek: 0
250
- };
251
- O((t) => [...t, e]), R(!1), W(T), Y("Staff member invited successfully", "success");
252
- }, te = (e) => {
253
- H(e), K({
254
- firstName: e.firstName,
255
- lastName: e.lastName,
256
- email: e.email,
257
- phone: e.phone,
258
- role: e.role,
259
- hourlyRate: e.hourlyRate,
260
- status: e.status
261
- }), B(!0);
262
- }, ne = () => {
263
- V && (O((e) => e.map((e) => e.id === V.id ? {
264
- ...e,
265
- ...G
266
- } : e)), B(!1), Y("Staff member updated successfully", "success"));
267
- }, re = (e) => {
268
- O((t) => t.map((t) => {
269
- if (t.id === e) {
270
- let e = t.status === "active" ? "inactive" : "active";
271
- return {
272
- ...t,
273
- status: e
274
- };
275
- }
276
- return t;
277
- })), Y("Staff status updated", "success");
278
- }, ie = (e) => {
279
- confirm("Are you sure you want to remove this staff member?") && (O((t) => t.filter((t) => t.id !== e)), Y("Staff member removed", "success"));
280
- };
281
- return /* @__PURE__ */ y(n, {
282
- title: "Staff Management",
283
- description: "Manage your workers, delivery partners, and shifts",
284
- actions: /* @__PURE__ */ y("button", {
285
- type: "button",
286
- onClick: () => {
287
- W(T), R(!0);
288
- },
289
- 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",
290
- children: [/* @__PURE__ */ v(h, { className: "h-4 w-4" }), "Invite Staff"]
291
- }),
292
- children: [
293
- /* @__PURE__ */ y("div", {
294
- className: "space-y-4",
295
- children: [
296
- /* @__PURE__ */ v(x, {
297
- icon: /* @__PURE__ */ v(g, { className: "h-4 w-4" }),
298
- children: "Build and run your team from one place. Invite chefs, servers and delivery partners, assign roles, and keep track of who's active, on leave or off duty. Staff ratings help you spot your strongest performers and anyone who needs a hand — so every shift is covered by the right people."
299
- }),
300
- q && /* @__PURE__ */ y("div", {
301
- className: t("flex items-center gap-2 rounded-lg border p-3", q.type === "success" ? "border-status-success-border/30 bg-status-success-bg/10" : "border-status-error-border/30 bg-status-error-bg/10"),
302
- children: [q.type === "success" ? /* @__PURE__ */ v(s, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ v(o, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ v("span", {
303
- className: t("text-sm font-medium", q.type === "success" ? "text-status-success-text" : "text-status-error-text"),
304
- children: q.text
305
- })]
306
- }),
307
- /* @__PURE__ */ y(b, {
308
- className: "grid grid-cols-2 sm:grid-cols-4 gap-3",
309
- children: [
310
- /* @__PURE__ */ y("div", {
311
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
312
- children: [/* @__PURE__ */ v("p", {
313
- className: "text-2xl font-bold text-text-primary",
314
- children: D.length
315
- }), /* @__PURE__ */ v("p", {
316
- className: "text-xs text-text-secondary",
317
- children: "Total Staff"
318
- })]
319
- }),
320
- /* @__PURE__ */ y("div", {
321
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
322
- children: [/* @__PURE__ */ v("p", {
323
- className: "text-2xl font-bold text-status-success-text",
324
- children: X
325
- }), /* @__PURE__ */ v("p", {
326
- className: "text-xs text-text-secondary",
327
- children: "Active Now"
328
- })]
329
- }),
330
- /* @__PURE__ */ y("div", {
331
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
332
- children: [/* @__PURE__ */ v("p", {
333
- className: "text-2xl font-bold text-status-warning-text",
334
- children: Z
335
- }), /* @__PURE__ */ v("p", {
336
- className: "text-xs text-text-secondary",
337
- children: "On Leave"
338
- })]
339
- }),
340
- /* @__PURE__ */ y("div", {
341
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
342
- children: [/* @__PURE__ */ v("p", {
343
- className: "text-2xl font-bold text-text-primary",
344
- children: Q
345
- }), /* @__PURE__ */ v("p", {
346
- className: "text-xs text-text-secondary",
347
- children: "Avg. Rating"
348
- })]
349
- })
350
- ]
351
- }),
352
- /* @__PURE__ */ v("div", {
353
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
354
- children: /* @__PURE__ */ y("div", {
355
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
356
- children: [
357
- /* @__PURE__ */ y("div", {
358
- className: "relative",
359
- children: [/* @__PURE__ */ v(f, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
360
- type: "text",
361
- placeholder: "Search staff...",
362
- value: k,
363
- onChange: (e) => A(e.target.value),
364
- className: "w-full rounded-md border border-border-seam bg-bg-surface pl-10 pr-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
365
- })]
366
- }),
367
- /* @__PURE__ */ y("select", {
368
- value: j,
369
- onChange: (e) => M(e.target.value),
370
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
371
- children: [/* @__PURE__ */ v("option", {
372
- value: "",
373
- children: "All Roles"
374
- }), Object.entries(w).map(([e, t]) => /* @__PURE__ */ v("option", {
375
- value: e,
376
- children: t.label
377
- }, e))]
378
- }),
379
- /* @__PURE__ */ y("select", {
380
- value: N,
381
- onChange: (e) => P(e.target.value),
382
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
383
- children: [/* @__PURE__ */ v("option", {
384
- value: "",
385
- children: "All Status"
386
- }), Object.entries(C).map(([e, t]) => /* @__PURE__ */ v("option", {
387
- value: e,
388
- children: t.label
389
- }, e))]
390
- }),
391
- /* @__PURE__ */ y("select", {
392
- value: F,
393
- onChange: (e) => I(e.target.value),
394
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
395
- children: [
396
- /* @__PURE__ */ v("option", {
397
- value: "name",
398
- children: "Name A-Z"
399
- }),
400
- /* @__PURE__ */ v("option", {
401
- value: "rating",
402
- children: "Rating: High to Low"
403
- }),
404
- /* @__PURE__ */ v("option", {
405
- value: "hours",
406
- children: "Hours: Most Worked"
407
- }),
408
- /* @__PURE__ */ v("option", {
409
- value: "joined",
410
- children: "Recently Joined"
411
- })
412
- ]
413
- })
414
- ]
415
- })
416
- }),
417
- $.length === 0 ? /* @__PURE__ */ v(r, {
418
- illustration: "empty-people",
419
- title: "No staff members found",
420
- description: "Try adjusting your filters, or invite your first team member to get started.",
421
- action: /* @__PURE__ */ y("button", {
422
- type: "button",
423
- onClick: () => {
424
- W(T), R(!0);
425
- },
426
- 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",
427
- children: [/* @__PURE__ */ v(h, { className: "h-4 w-4" }), "Invite Staff"]
428
- })
429
- }) : /* @__PURE__ */ v("div", {
430
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm divide-y divide-border",
431
- children: $.map((e) => {
432
- let n = C[e.status], r = w[e.role];
433
- return /* @__PURE__ */ y("div", {
434
- className: "p-4 sm:p-5 hover:bg-bg-sunken/30 transition-colors",
435
- children: [/* @__PURE__ */ y("div", {
436
- className: "flex flex-col sm:flex-row sm:items-center gap-4",
437
- children: [/* @__PURE__ */ y("div", {
438
- className: "flex items-center gap-4 flex-1 min-w-0",
439
- children: [/* @__PURE__ */ y("div", {
440
- className: "relative shrink-0",
441
- children: [/* @__PURE__ */ v("div", {
442
- className: "flex h-12 w-12 items-center justify-center rounded-full bg-bg-sunken text-sm font-semibold text-text-primary",
443
- children: `${e.firstName[0]}${e.lastName[0]}`
444
- }), /* @__PURE__ */ v("span", { className: t("absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full border-2 border-card", n.dot) })]
445
- }), /* @__PURE__ */ y("div", {
446
- className: "flex-1 min-w-0",
447
- children: [/* @__PURE__ */ y("div", {
448
- className: "flex items-center gap-2 flex-wrap",
449
- children: [
450
- /* @__PURE__ */ y("p", {
451
- className: "text-sm font-medium text-text-primary",
452
- children: [
453
- e.firstName,
454
- " ",
455
- e.lastName
456
- ]
457
- }),
458
- /* @__PURE__ */ v("span", {
459
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium", r.color),
460
- children: r.label
461
- }),
462
- /* @__PURE__ */ v("span", {
463
- className: t("text-xs", n.color),
464
- children: n.label
465
- })
466
- ]
467
- }), /* @__PURE__ */ y("div", {
468
- className: "flex items-center gap-3 mt-1 text-xs text-text-secondary flex-wrap",
469
- children: [/* @__PURE__ */ y("span", {
470
- className: "flex items-center gap-1",
471
- children: [/* @__PURE__ */ v(u, { className: "h-3 w-3" }), e.email]
472
- }), /* @__PURE__ */ y("span", {
473
- className: "flex items-center gap-1",
474
- children: [/* @__PURE__ */ v(d, { className: "h-3 w-3" }), e.phone]
475
- })]
476
- })]
477
- })]
478
- }), /* @__PURE__ */ y("div", {
479
- className: "flex items-center gap-4 sm:gap-6",
480
- children: [/* @__PURE__ */ y("div", {
481
- className: "hidden md:flex items-center gap-4 text-xs",
482
- children: [
483
- /* @__PURE__ */ y("div", {
484
- className: "text-center",
485
- children: [/* @__PURE__ */ y("p", {
486
- className: "font-bold text-text-primary flex items-center gap-0.5 justify-center",
487
- children: [/* @__PURE__ */ v(p, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), e.performance.rating]
488
- }), /* @__PURE__ */ v("p", {
489
- className: "text-text-secondary",
490
- children: "Rating"
491
- })]
492
- }),
493
- /* @__PURE__ */ y("div", {
494
- className: "text-center",
495
- children: [/* @__PURE__ */ v("p", {
496
- className: "font-bold text-text-primary",
497
- children: e.performance.tasksCompleted
498
- }), /* @__PURE__ */ v("p", {
499
- className: "text-text-secondary",
500
- children: "Tasks"
501
- })]
502
- }),
503
- /* @__PURE__ */ y("div", {
504
- className: "text-center",
505
- children: [/* @__PURE__ */ y("p", {
506
- className: "font-bold text-text-primary",
507
- children: [e.performance.punctuality, "%"]
508
- }), /* @__PURE__ */ v("p", {
509
- className: "text-text-secondary",
510
- children: "On Time"
511
- })]
512
- }),
513
- e.currentShift && /* @__PURE__ */ y("div", {
514
- className: "text-center",
515
- children: [/* @__PURE__ */ y("p", {
516
- className: "font-bold text-text-primary flex items-center gap-0.5 justify-center",
517
- children: [/* @__PURE__ */ v(c, { className: "h-3 w-3 text-text-secondary" }), e.currentShift]
518
- }), /* @__PURE__ */ v("p", {
519
- className: "text-text-secondary",
520
- children: "Shift"
521
- })]
522
- })
523
- ]
524
- }), /* @__PURE__ */ y("div", {
525
- className: "flex items-center gap-1",
526
- children: [
527
- /* @__PURE__ */ v("button", {
528
- type: "button",
529
- onClick: () => re(e.id),
530
- className: t("h-6 w-11 rounded-full transition-colors relative", e.status === "active" ? "bg-status-success-text" : "bg-muted-foreground/30"),
531
- title: e.status === "active" ? "Deactivate" : "Activate",
532
- children: /* @__PURE__ */ v("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-bg-surface transition-transform", e.status === "active" ? "translate-x-5" : "translate-x-0.5") })
533
- }),
534
- /* @__PURE__ */ v("button", {
535
- type: "button",
536
- onClick: () => te(e),
537
- className: "rounded p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
538
- title: "Edit",
539
- children: /* @__PURE__ */ v(l, { className: "h-4 w-4" })
540
- }),
541
- /* @__PURE__ */ v("button", {
542
- type: "button",
543
- onClick: () => ie(e.id),
544
- className: "rounded p-1.5 text-text-secondary hover:bg-status-error-bg/10 hover:text-status-error-text transition-colors",
545
- title: "Remove",
546
- children: /* @__PURE__ */ v(m, { className: "h-4 w-4" })
547
- })
548
- ]
549
- })]
550
- })]
551
- }), /* @__PURE__ */ y("div", {
552
- className: "md:hidden flex items-center gap-4 mt-3 text-xs text-text-secondary",
553
- children: [
554
- /* @__PURE__ */ y("span", {
555
- className: "flex items-center gap-0.5",
556
- children: [/* @__PURE__ */ v(p, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), e.performance.rating]
557
- }),
558
- /* @__PURE__ */ y("span", { children: [e.performance.tasksCompleted, " tasks"] }),
559
- /* @__PURE__ */ y("span", { children: [e.performance.punctuality, "% on time"] }),
560
- e.currentShift && /* @__PURE__ */ y("span", {
561
- className: "flex items-center gap-0.5",
562
- children: [/* @__PURE__ */ v(c, { className: "h-3 w-3" }), e.currentShift]
563
- }),
564
- /* @__PURE__ */ y("span", { children: [e.shiftsThisWeek, " shifts/wk"] })
565
- ]
566
- })]
567
- }, e.id);
568
- })
569
- })
570
- ]
571
- }),
572
- L && /* @__PURE__ */ v("div", {
573
- className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/50 p-4",
574
- children: /* @__PURE__ */ v("div", {
575
- className: "w-full max-w-lg rounded-lg border border-border-seam bg-bg-surface shadow-xl",
576
- children: /* @__PURE__ */ y("div", {
577
- className: "p-6",
578
- children: [
579
- /* @__PURE__ */ y("div", {
580
- className: "flex items-center justify-between mb-4",
581
- children: [/* @__PURE__ */ v("h3", {
582
- className: "text-lg font-semibold text-text-primary",
583
- children: "Invite Staff Member"
584
- }), /* @__PURE__ */ v("button", {
585
- type: "button",
586
- onClick: () => R(!1),
587
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken",
588
- children: /* @__PURE__ */ v(_, { className: "h-5 w-5" })
589
- })]
590
- }),
591
- /* @__PURE__ */ y("div", {
592
- className: "space-y-4",
593
- children: [
594
- /* @__PURE__ */ y("div", {
595
- className: "grid grid-cols-2 gap-4",
596
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
597
- className: "block text-sm font-medium text-text-primary mb-1",
598
- children: "First Name *"
599
- }), /* @__PURE__ */ v("input", {
600
- type: "text",
601
- value: U.firstName,
602
- onChange: (e) => W((t) => ({
603
- ...t,
604
- firstName: e.target.value
605
- })),
606
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
607
- })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
608
- className: "block text-sm font-medium text-text-primary mb-1",
609
- children: "Last Name *"
610
- }), /* @__PURE__ */ v("input", {
611
- type: "text",
612
- value: U.lastName,
613
- onChange: (e) => W((t) => ({
614
- ...t,
615
- lastName: e.target.value
616
- })),
617
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
618
- })] })]
619
- }),
620
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
621
- className: "block text-sm font-medium text-text-primary mb-1",
622
- children: "Email *"
623
- }), /* @__PURE__ */ v("input", {
624
- type: "email",
625
- value: U.email,
626
- onChange: (e) => W((t) => ({
627
- ...t,
628
- email: e.target.value
629
- })),
630
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
631
- })] }),
632
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
633
- className: "block text-sm font-medium text-text-primary mb-1",
634
- children: "Phone"
635
- }), /* @__PURE__ */ v("input", {
636
- type: "tel",
637
- value: U.phone,
638
- onChange: (e) => W((t) => ({
639
- ...t,
640
- phone: e.target.value
641
- })),
642
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
643
- })] }),
644
- /* @__PURE__ */ y("div", {
645
- className: "grid grid-cols-2 gap-4",
646
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
647
- className: "block text-sm font-medium text-text-primary mb-1",
648
- children: "Role"
649
- }), /* @__PURE__ */ v("select", {
650
- value: U.role,
651
- onChange: (e) => W((t) => ({
652
- ...t,
653
- role: e.target.value
654
- })),
655
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
656
- children: Object.entries(w).map(([e, t]) => /* @__PURE__ */ v("option", {
657
- value: e,
658
- children: t.label
659
- }, e))
660
- })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
661
- className: "block text-sm font-medium text-text-primary mb-1",
662
- children: "Hourly Rate (₹)"
663
- }), /* @__PURE__ */ v("input", {
664
- type: "number",
665
- value: U.hourlyRate,
666
- onChange: (e) => W((t) => ({
667
- ...t,
668
- hourlyRate: parseInt(e.target.value) || 0
669
- })),
670
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
671
- })] })]
672
- })
673
- ]
674
- }),
675
- /* @__PURE__ */ y("div", {
676
- className: "flex gap-3 mt-6",
677
- children: [/* @__PURE__ */ v("button", {
678
- type: "button",
679
- onClick: () => R(!1),
680
- className: "flex-1 rounded-md border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
681
- children: "Cancel"
682
- }), /* @__PURE__ */ v("button", {
683
- type: "button",
684
- onClick: ee,
685
- className: "flex-1 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80",
686
- children: "Send Invite"
687
- })]
688
- })
689
- ]
690
- })
691
- })
692
- }),
693
- z && V && /* @__PURE__ */ v("div", {
694
- className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/50 p-4",
695
- children: /* @__PURE__ */ v("div", {
696
- className: "w-full max-w-lg rounded-lg border border-border-seam bg-bg-surface shadow-xl",
697
- children: /* @__PURE__ */ y("div", {
698
- className: "p-6",
699
- children: [
700
- /* @__PURE__ */ y("div", {
701
- className: "flex items-center justify-between mb-4",
702
- children: [/* @__PURE__ */ v("h3", {
703
- className: "text-lg font-semibold text-text-primary",
704
- children: "Edit Staff Member"
705
- }), /* @__PURE__ */ v("button", {
706
- type: "button",
707
- onClick: () => B(!1),
708
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken",
709
- children: /* @__PURE__ */ v(_, { className: "h-5 w-5" })
710
- })]
711
- }),
712
- /* @__PURE__ */ y("div", {
713
- className: "space-y-4",
714
- children: [
715
- /* @__PURE__ */ y("div", {
716
- className: "grid grid-cols-2 gap-4",
717
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
718
- className: "block text-sm font-medium text-text-primary mb-1",
719
- children: "First Name"
720
- }), /* @__PURE__ */ v("input", {
721
- type: "text",
722
- value: G.firstName,
723
- onChange: (e) => K((t) => ({
724
- ...t,
725
- firstName: e.target.value
726
- })),
727
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
728
- })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
729
- className: "block text-sm font-medium text-text-primary mb-1",
730
- children: "Last Name"
731
- }), /* @__PURE__ */ v("input", {
732
- type: "text",
733
- value: G.lastName,
734
- onChange: (e) => K((t) => ({
735
- ...t,
736
- lastName: e.target.value
737
- })),
738
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
739
- })] })]
740
- }),
741
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
742
- className: "block text-sm font-medium text-text-primary mb-1",
743
- children: "Email"
744
- }), /* @__PURE__ */ v("input", {
745
- type: "email",
746
- value: G.email,
747
- onChange: (e) => K((t) => ({
748
- ...t,
749
- email: e.target.value
750
- })),
751
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
752
- })] }),
753
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
754
- className: "block text-sm font-medium text-text-primary mb-1",
755
- children: "Phone"
756
- }), /* @__PURE__ */ v("input", {
757
- type: "tel",
758
- value: G.phone,
759
- onChange: (e) => K((t) => ({
760
- ...t,
761
- phone: e.target.value
762
- })),
763
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
764
- })] }),
765
- /* @__PURE__ */ y("div", {
766
- className: "grid grid-cols-3 gap-4",
767
- children: [
768
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
769
- className: "block text-sm font-medium text-text-primary mb-1",
770
- children: "Role"
771
- }), /* @__PURE__ */ v("select", {
772
- value: G.role,
773
- onChange: (e) => K((t) => ({
774
- ...t,
775
- role: e.target.value
776
- })),
777
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
778
- children: Object.entries(w).map(([e, t]) => /* @__PURE__ */ v("option", {
779
- value: e,
780
- children: t.label
781
- }, e))
782
- })] }),
783
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
784
- className: "block text-sm font-medium text-text-primary mb-1",
785
- children: "Rate (₹/hr)"
786
- }), /* @__PURE__ */ v("input", {
787
- type: "number",
788
- value: G.hourlyRate,
789
- onChange: (e) => K((t) => ({
790
- ...t,
791
- hourlyRate: parseInt(e.target.value) || 0
792
- })),
793
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
794
- })] }),
795
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
796
- className: "block text-sm font-medium text-text-primary mb-1",
797
- children: "Status"
798
- }), /* @__PURE__ */ v("select", {
799
- value: G.status,
800
- onChange: (e) => K((t) => ({
801
- ...t,
802
- status: e.target.value
803
- })),
804
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
805
- children: Object.entries(C).map(([e, t]) => /* @__PURE__ */ v("option", {
806
- value: e,
807
- children: t.label
808
- }, e))
809
- })] })
810
- ]
811
- })
812
- ]
813
- }),
814
- /* @__PURE__ */ y("div", {
815
- className: "flex gap-3 mt-6",
816
- children: [/* @__PURE__ */ v("button", {
817
- type: "button",
818
- onClick: () => B(!1),
819
- className: "flex-1 rounded-md border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
820
- children: "Cancel"
821
- }), /* @__PURE__ */ v("button", {
822
- type: "button",
823
- onClick: ne,
824
- className: "flex-1 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80",
825
- children: "Save Changes"
826
- })]
827
- })
828
- ]
829
- })
830
- })
831
- })
832
- ]
833
- });
834
- };
835
- //#endregion
836
- export { E as StaffManagementPage };
837
-
838
- //# sourceMappingURL=StaffManagementPage.js.map