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