@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.5

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 (145) hide show
  1. package/dist/kadaikodi/KadaikodiRoutes.js +34 -26
  2. package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
  3. package/dist/kadaikodi/components/viz/AllocationBar.js +68 -0
  4. package/dist/kadaikodi/components/viz/AllocationBar.js.map +1 -0
  5. package/dist/kadaikodi/components/viz/AreaChart.js +102 -0
  6. package/dist/kadaikodi/components/viz/AreaChart.js.map +1 -0
  7. package/dist/kadaikodi/components/viz/AvatarStack.js +36 -0
  8. package/dist/kadaikodi/components/viz/AvatarStack.js.map +1 -0
  9. package/dist/kadaikodi/components/viz/BarChart.js +83 -0
  10. package/dist/kadaikodi/components/viz/BarChart.js.map +1 -0
  11. package/dist/kadaikodi/components/viz/CertificateCard.js +4 -0
  12. package/dist/kadaikodi/components/viz/DonutChart.js +109 -0
  13. package/dist/kadaikodi/components/viz/DonutChart.js.map +1 -0
  14. package/dist/kadaikodi/components/viz/HBarFunnel.js +54 -0
  15. package/dist/kadaikodi/components/viz/HBarFunnel.js.map +1 -0
  16. package/dist/kadaikodi/components/viz/Heatmap.js +3 -0
  17. package/dist/kadaikodi/components/viz/KanbanBoard.js +50 -0
  18. package/dist/kadaikodi/components/viz/KanbanBoard.js.map +1 -0
  19. package/dist/kadaikodi/components/viz/LineChart.js +4 -0
  20. package/dist/kadaikodi/components/viz/OrgTree.js +2 -0
  21. package/dist/kadaikodi/components/viz/PathSteps.js +3 -0
  22. package/dist/kadaikodi/components/viz/ProgressRing.js +68 -0
  23. package/dist/kadaikodi/components/viz/ProgressRing.js.map +1 -0
  24. package/dist/kadaikodi/components/viz/RatingStars.js +51 -0
  25. package/dist/kadaikodi/components/viz/RatingStars.js.map +1 -0
  26. package/dist/kadaikodi/components/viz/SegmentedTabs.js +69 -0
  27. package/dist/kadaikodi/components/viz/SegmentedTabs.js.map +1 -0
  28. package/dist/kadaikodi/components/viz/SkillBar.js +3 -0
  29. package/dist/kadaikodi/components/viz/Sparkline.js +74 -0
  30. package/dist/kadaikodi/components/viz/Sparkline.js.map +1 -0
  31. package/dist/kadaikodi/components/viz/StatCard.js +60 -0
  32. package/dist/kadaikodi/components/viz/StatCard.js.map +1 -0
  33. package/dist/kadaikodi/components/viz/StepProgress.js +64 -0
  34. package/dist/kadaikodi/components/viz/StepProgress.js.map +1 -0
  35. package/dist/kadaikodi/components/viz/Timeline.js +66 -0
  36. package/dist/kadaikodi/components/viz/Timeline.js.map +1 -0
  37. package/dist/kadaikodi/components/viz/index.js +23 -0
  38. package/dist/kadaikodi/components/viz/lib/Avatar.js +30 -0
  39. package/dist/kadaikodi/components/viz/lib/Avatar.js.map +1 -0
  40. package/dist/kadaikodi/components/viz/lib/CartesianFrame.js +119 -0
  41. package/dist/kadaikodi/components/viz/lib/CartesianFrame.js.map +1 -0
  42. package/dist/kadaikodi/components/viz/lib/ResponsiveSvg.js +35 -0
  43. package/dist/kadaikodi/components/viz/lib/ResponsiveSvg.js.map +1 -0
  44. package/dist/kadaikodi/components/viz/lib/format.js +21 -0
  45. package/dist/kadaikodi/components/viz/lib/format.js.map +1 -0
  46. package/dist/kadaikodi/components/viz/lib/geometry.js +61 -0
  47. package/dist/kadaikodi/components/viz/lib/geometry.js.map +1 -0
  48. package/dist/kadaikodi/components/viz/lib/hooks.js +39 -0
  49. package/dist/kadaikodi/components/viz/lib/hooks.js.map +1 -0
  50. package/dist/kadaikodi/components/viz/lib/palette.js +27 -0
  51. package/dist/kadaikodi/components/viz/lib/palette.js.map +1 -0
  52. package/dist/kadaikodi/hooks/useKadaikodiApi.js +84 -6
  53. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  54. package/dist/kadaikodi/pages/HomePage.js +373 -631
  55. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  56. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +304 -169
  57. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/admin/AdminDashboard.js +255 -271
  59. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  60. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +185 -125
  61. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +141 -102
  63. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  65. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
  66. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  67. package/dist/kadaikodi/pages/admin/CartManagementPage.js +564 -729
  68. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  69. package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
  70. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  71. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +201 -120
  72. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  73. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
  74. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  75. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +173 -194
  76. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  77. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
  78. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  79. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
  80. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  81. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +428 -347
  82. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  83. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +332 -0
  84. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
  85. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js +373 -0
  86. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js.map +1 -0
  87. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +294 -162
  88. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  89. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +180 -181
  90. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  91. package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
  92. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  93. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  94. package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
  95. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  96. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +239 -156
  97. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  98. package/dist/kadaikodi/pages/customer/CartDetailPage.js +405 -248
  99. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  100. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +258 -232
  101. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  102. package/dist/kadaikodi/pages/customer/CheckoutPage.js +254 -205
  103. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  104. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +5 -5
  105. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  106. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
  107. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  108. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +272 -230
  109. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  110. package/dist/kadaikodi/pages/customer/FavoritesPage.js +150 -413
  111. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  112. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +173 -134
  113. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  114. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +411 -305
  115. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  116. package/dist/kadaikodi/pages/customer/ReviewsPage.js +310 -406
  117. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  118. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  119. package/dist/kadaikodi/pages/customer/shared.js +181 -0
  120. package/dist/kadaikodi/pages/customer/shared.js.map +1 -0
  121. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +438 -311
  122. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  123. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +320 -293
  124. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  125. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +159 -91
  126. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  127. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +137 -107
  128. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  129. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +157 -135
  130. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  131. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +280 -206
  132. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  133. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
  134. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  135. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +428 -431
  136. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  137. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +328 -445
  138. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  139. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +141 -164
  140. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  141. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +360 -288
  142. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  143. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +303 -281
  144. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  145. package/package.json +1 -1
@@ -3,252 +3,251 @@ import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
5
  import { useCreateProviderWorker as i, useProviderWorkers as a, useProviders as o } from "../../hooks/useKadaikodiApi.js";
6
- import { useMemo as s, useState as c } from "react";
7
- import { AlertCircle as l, CheckCircle2 as u, Mail as d, Phone as f, Search as p, UserPlus as m, X as h } from "lucide-react";
8
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
9
- import { EmphasisPanel as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
6
+ import { StatCard as s } from "../../components/viz/StatCard.js";
7
+ import { AvatarStack as c } from "../../components/viz/AvatarStack.js";
8
+ import "../../components/viz/index.js";
9
+ import { useMemo as l, useState as u } from "react";
10
+ import { AlertCircle as d, Briefcase as f, CheckCircle2 as p, Clock as m, Mail as h, Phone as g, Search as _, UserPlus as v, Users as y, X as b } from "lucide-react";
11
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
12
+ import { EmphasisPanel as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
10
13
  //#region src/kadaikodi/pages/cart-owner/StaffManagementPage.tsx
11
- var x = [
14
+ var ee = [
12
15
  "MANAGER",
13
16
  "CHEF",
14
17
  "SERVER",
15
18
  "DELIVERY",
16
19
  "CASHIER"
17
- ], S = (e) => e.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()), C = (e) => {
20
+ ], E = (e) => e.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()), D = (e) => {
18
21
  let t = e.toUpperCase();
19
22
  return t === "ACTIVE" ? {
20
- label: S(e),
23
+ label: E(e),
21
24
  color: "text-status-success-text",
22
25
  dot: "bg-status-success-text"
23
26
  } : t === "ON_LEAVE" || t === "ON-LEAVE" ? {
24
- label: S(e),
27
+ label: E(e),
25
28
  color: "text-status-warning-text",
26
29
  dot: "bg-status-warning-text"
27
30
  } : {
28
- label: S(e),
31
+ label: E(e),
29
32
  color: "text-text-secondary",
30
33
  dot: "bg-muted-foreground"
31
34
  };
32
- }, w = (e) => {
35
+ }, O = (e) => {
33
36
  if (!e || typeof e != "object") return {};
34
37
  let t = e;
35
38
  return {
36
39
  email: typeof t.email == "string" ? t.email : void 0,
37
40
  phone: typeof t.phone == "string" ? t.phone : void 0
38
41
  };
39
- }, T = {
42
+ }, k = {
40
43
  name: "",
41
44
  email: "",
42
45
  phone: "",
43
46
  role: "SERVER"
44
- }, E = () => {
45
- let { currentUser: E } = e(), { data: D = [], isLoading: O } = o(), k = s(() => D.find((e) => e.ownerId === E?.id) ?? D[0], [D, E?.id]), A = k?.id, { data: j = [], isLoading: M } = a(A), N = i(), [P, F] = c(""), [I, L] = c(""), [R, z] = c(""), [B, V] = c(!1), [H, U] = c(T), [W, G] = c(null), K = (e, t) => {
46
- G({
47
+ }, A = () => {
48
+ let { currentUser: A } = e(), { data: j = [], isLoading: M } = o(), N = l(() => j.find((e) => e.ownerId === A?.id) ?? j[0], [j, A?.id]), P = N?.id, { data: F = [], isLoading: I } = a(P), L = i(), [R, z] = u(""), [B, V] = u(""), [H, U] = u(""), [W, G] = u(!1), [K, q] = u(k), [J, Y] = u(null), X = (e, t) => {
49
+ Y({
47
50
  text: e,
48
51
  type: t
49
- }), setTimeout(() => G(null), 3e3);
50
- }, q = s(() => [...new Set(j.map((e) => e.role))].sort(), [j]), J = s(() => [...new Set(j.map((e) => e.status))].sort(), [j]), Y = j.filter((e) => e.status.toUpperCase() === "ACTIVE").length, X = j.filter((e) => {
52
+ }), setTimeout(() => Y(null), 3e3);
53
+ }, Z = l(() => [...new Set(F.map((e) => e.role))].sort(), [F]), te = l(() => [...new Set(F.map((e) => e.status))].sort(), [F]), ne = F.filter((e) => e.status.toUpperCase() === "ACTIVE").length, re = F.filter((e) => {
51
54
  let t = e.status.toUpperCase();
52
55
  return t === "ON_LEAVE" || t === "ON-LEAVE";
53
- }).length, Z = s(() => {
54
- let e = [...j];
55
- if (P) {
56
- let t = P.toLowerCase();
56
+ }).length, Q = l(() => {
57
+ let e = [...F];
58
+ if (R) {
59
+ let t = R.toLowerCase();
57
60
  e = e.filter((e) => {
58
- let n = w(e.metadata);
61
+ let n = O(e.metadata);
59
62
  return e.name.toLowerCase().includes(t) || e.role.toLowerCase().includes(t) || (n.email ?? "").toLowerCase().includes(t) || (n.phone ?? "").includes(t);
60
63
  });
61
64
  }
62
- return I && (e = e.filter((e) => e.role === I)), R && (e = e.filter((e) => e.status === R)), e.sort((e, t) => e.name.localeCompare(t.name)), e;
65
+ return B && (e = e.filter((e) => e.role === B)), H && (e = e.filter((e) => e.status === H)), e.sort((e, t) => e.name.localeCompare(t.name)), e;
63
66
  }, [
64
- j,
65
- P,
66
- I,
67
- R
68
- ]), Q = !!(P || I || R);
69
- return /* @__PURE__ */ v(n, {
67
+ F,
68
+ R,
69
+ B,
70
+ H
71
+ ]), $ = !!(R || B || H);
72
+ return /* @__PURE__ */ C(n, {
70
73
  title: "Staff Management",
71
74
  description: "Manage your workers and delivery partners",
72
- actions: /* @__PURE__ */ v("button", {
75
+ actions: /* @__PURE__ */ C("button", {
73
76
  type: "button",
74
77
  onClick: () => {
75
- U(T), V(!0);
78
+ q(k), G(!0);
76
79
  },
77
- disabled: !A,
78
- className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", A ? "bg-accent text-text-primary hover:bg-accent/80" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
79
- children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), "Add Staff"]
80
+ disabled: !P,
81
+ className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", P ? "bg-accent text-text-primary hover:bg-accent/80" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
82
+ children: [/* @__PURE__ */ S(v, { className: "h-4 w-4" }), "Add Staff"]
80
83
  }),
81
84
  children: [
82
- /* @__PURE__ */ _(b, {
85
+ /* @__PURE__ */ S(T, {
83
86
  className: "mb-6",
84
87
  children: "Your team in one place. Use this page to add workers and delivery partners to your cart, see who's active, and keep your roster organised so orders go out on time. Build a reliable crew around your cart."
85
88
  }),
86
- /* @__PURE__ */ v("div", {
89
+ /* @__PURE__ */ C("div", {
87
90
  className: "space-y-4",
88
- children: [W && /* @__PURE__ */ v("div", {
89
- className: t("flex items-center gap-2 rounded-lg border p-3", W.type === "success" ? "border-status-success-text/30 bg-status-success-bg-subtle" : "border-status-error-text/30 bg-status-error-bg-subtle"),
90
- children: [W.type === "success" ? /* @__PURE__ */ _(u, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ _(l, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ _("span", {
91
- className: t("text-sm font-medium", W.type === "success" ? "text-status-success-text" : "text-status-error-text"),
92
- children: W.text
91
+ children: [J && /* @__PURE__ */ C("div", {
92
+ className: t("flex items-center gap-2 rounded-lg border p-3", J.type === "success" ? "border-status-success-text/30 bg-status-success-bg-subtle" : "border-status-error-text/30 bg-status-error-bg-subtle"),
93
+ children: [J.type === "success" ? /* @__PURE__ */ S(p, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ S(d, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ S("span", {
94
+ className: t("text-sm font-medium", J.type === "success" ? "text-status-success-text" : "text-status-error-text"),
95
+ children: J.text
93
96
  })]
94
- }), O ? /* @__PURE__ */ _("div", {
97
+ }), M ? /* @__PURE__ */ S("div", {
95
98
  className: "flex items-center justify-center py-24",
96
- children: /* @__PURE__ */ _("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
97
- }) : k ? /* @__PURE__ */ v(g, { children: [
98
- /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _("h2", {
99
- className: "mb-4 text-base font-semibold text-text-primary",
100
- children: "Team Overview"
101
- }), /* @__PURE__ */ v("div", {
99
+ children: /* @__PURE__ */ S("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
100
+ }) : N ? /* @__PURE__ */ C(x, { children: [
101
+ /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ C("div", {
102
+ className: "mb-4 flex items-center justify-between gap-3",
103
+ children: [/* @__PURE__ */ S("h2", {
104
+ className: "text-base font-semibold text-text-primary",
105
+ children: "Team Overview"
106
+ }), F.length > 0 && /* @__PURE__ */ S(c, {
107
+ people: F.map((e) => ({
108
+ name: e.name,
109
+ role: e.role
110
+ })),
111
+ max: 6,
112
+ size: 30
113
+ })]
114
+ }), /* @__PURE__ */ C("div", {
102
115
  className: "grid grid-cols-2 sm:grid-cols-4 gap-3",
103
116
  children: [
104
- /* @__PURE__ */ v("div", {
105
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
106
- children: [/* @__PURE__ */ _("p", {
107
- className: "text-2xl font-bold text-text-primary",
108
- children: j.length
109
- }), /* @__PURE__ */ _("p", {
110
- className: "text-xs text-text-secondary",
111
- children: "Total Staff"
112
- })]
117
+ /* @__PURE__ */ S(s, {
118
+ label: "Total Staff",
119
+ value: F.length,
120
+ icon: /* @__PURE__ */ S(y, { className: "h-4 w-4" })
113
121
  }),
114
- /* @__PURE__ */ v("div", {
115
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
116
- children: [/* @__PURE__ */ _("p", {
117
- className: "text-2xl font-bold text-status-success-text",
118
- children: Y
119
- }), /* @__PURE__ */ _("p", {
120
- className: "text-xs text-text-secondary",
121
- children: "Active"
122
- })]
122
+ /* @__PURE__ */ S(s, {
123
+ label: "Active",
124
+ value: /* @__PURE__ */ S("span", {
125
+ className: "text-status-success-text",
126
+ children: ne
127
+ }),
128
+ icon: /* @__PURE__ */ S(p, { className: "h-4 w-4" })
123
129
  }),
124
- /* @__PURE__ */ v("div", {
125
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
126
- children: [/* @__PURE__ */ _("p", {
127
- className: "text-2xl font-bold text-status-warning-text",
128
- children: X
129
- }), /* @__PURE__ */ _("p", {
130
- className: "text-xs text-text-secondary",
131
- children: "On Leave"
132
- })]
130
+ /* @__PURE__ */ S(s, {
131
+ label: "On Leave",
132
+ value: /* @__PURE__ */ S("span", {
133
+ className: "text-status-warning-text",
134
+ children: re
135
+ }),
136
+ icon: /* @__PURE__ */ S(m, { className: "h-4 w-4" })
133
137
  }),
134
- /* @__PURE__ */ v("div", {
135
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
136
- children: [/* @__PURE__ */ _("p", {
137
- className: "text-2xl font-bold text-text-primary",
138
- children: q.length
139
- }), /* @__PURE__ */ _("p", {
140
- className: "text-xs text-text-secondary",
141
- children: "Roles"
142
- })]
138
+ /* @__PURE__ */ S(s, {
139
+ label: "Roles",
140
+ value: Z.length,
141
+ icon: /* @__PURE__ */ S(f, { className: "h-4 w-4" })
143
142
  })
144
143
  ]
145
144
  })] }),
146
- /* @__PURE__ */ _("div", {
145
+ /* @__PURE__ */ S("div", {
147
146
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
148
- children: /* @__PURE__ */ v("div", {
147
+ children: /* @__PURE__ */ C("div", {
149
148
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",
150
149
  children: [
151
- /* @__PURE__ */ v("div", {
150
+ /* @__PURE__ */ C("div", {
152
151
  className: "relative",
153
- children: [/* @__PURE__ */ _(p, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ _("input", {
152
+ children: [/* @__PURE__ */ S(_, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ S("input", {
154
153
  type: "text",
155
154
  placeholder: "Search staff...",
156
- value: P,
157
- onChange: (e) => F(e.target.value),
155
+ value: R,
156
+ onChange: (e) => z(e.target.value),
158
157
  className: "w-full rounded-md border border-border-subtle 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)]"
159
158
  })]
160
159
  }),
161
- /* @__PURE__ */ v("select", {
162
- value: I,
163
- onChange: (e) => L(e.target.value),
160
+ /* @__PURE__ */ C("select", {
161
+ value: B,
162
+ onChange: (e) => V(e.target.value),
164
163
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
165
- children: [/* @__PURE__ */ _("option", {
164
+ children: [/* @__PURE__ */ S("option", {
166
165
  value: "",
167
166
  children: "All Roles"
168
- }), q.map((e) => /* @__PURE__ */ _("option", {
167
+ }), Z.map((e) => /* @__PURE__ */ S("option", {
169
168
  value: e,
170
- children: S(e)
169
+ children: E(e)
171
170
  }, e))]
172
171
  }),
173
- /* @__PURE__ */ v("select", {
174
- value: R,
175
- onChange: (e) => z(e.target.value),
172
+ /* @__PURE__ */ C("select", {
173
+ value: H,
174
+ onChange: (e) => U(e.target.value),
176
175
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
177
- children: [/* @__PURE__ */ _("option", {
176
+ children: [/* @__PURE__ */ S("option", {
178
177
  value: "",
179
178
  children: "All Status"
180
- }), J.map((e) => /* @__PURE__ */ _("option", {
179
+ }), te.map((e) => /* @__PURE__ */ S("option", {
181
180
  value: e,
182
- children: S(e)
181
+ children: E(e)
183
182
  }, e))]
184
183
  })
185
184
  ]
186
185
  })
187
186
  }),
188
- M ? /* @__PURE__ */ _("div", {
187
+ I ? /* @__PURE__ */ S("div", {
189
188
  className: "flex items-center justify-center py-16",
190
- children: /* @__PURE__ */ _("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
191
- }) : Z.length === 0 ? /* @__PURE__ */ _(r, {
192
- illustration: Q ? "empty-search" : "empty-people",
189
+ children: /* @__PURE__ */ S("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
190
+ }) : Q.length === 0 ? /* @__PURE__ */ S(r, {
191
+ illustration: $ ? "empty-search" : "empty-people",
193
192
  title: "No staff members found",
194
- description: Q ? "No team members match your current filters. Try clearing them or searching for a different name." : "You have no staff yet. Add your first worker or delivery partner to start building your team.",
195
- action: Q ? /* @__PURE__ */ _("button", {
193
+ description: $ ? "No team members match your current filters. Try clearing them or searching for a different name." : "You have no staff yet. Add your first worker or delivery partner to start building your team.",
194
+ action: $ ? /* @__PURE__ */ S("button", {
196
195
  type: "button",
197
196
  onClick: () => {
198
- F(""), L(""), z("");
197
+ z(""), V(""), U("");
199
198
  },
200
199
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken",
201
200
  children: "Clear filters"
202
- }) : /* @__PURE__ */ v("button", {
201
+ }) : /* @__PURE__ */ C("button", {
203
202
  type: "button",
204
203
  onClick: () => {
205
- U(T), V(!0);
204
+ q(k), G(!0);
206
205
  },
207
206
  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",
208
- children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), "Add Staff"]
207
+ children: [/* @__PURE__ */ S(v, { className: "h-4 w-4" }), "Add Staff"]
209
208
  })
210
- }) : /* @__PURE__ */ _("div", {
209
+ }) : /* @__PURE__ */ S("div", {
211
210
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm divide-y divide-border",
212
- children: Z.map((e) => {
213
- let n = C(e.status), r = w(e.metadata);
214
- return /* @__PURE__ */ _("div", {
211
+ children: Q.map((e) => {
212
+ let n = D(e.status), r = O(e.metadata);
213
+ return /* @__PURE__ */ S("div", {
215
214
  className: "p-4 sm:p-5 hover:bg-bg-sunken/30 transition-colors",
216
- children: /* @__PURE__ */ _("div", {
215
+ children: /* @__PURE__ */ S("div", {
217
216
  className: "flex flex-col sm:flex-row sm:items-center gap-4",
218
- children: /* @__PURE__ */ v("div", {
217
+ children: /* @__PURE__ */ C("div", {
219
218
  className: "flex items-center gap-4 flex-1 min-w-0",
220
- children: [/* @__PURE__ */ v("div", {
219
+ children: [/* @__PURE__ */ C("div", {
221
220
  className: "relative shrink-0",
222
- children: [/* @__PURE__ */ _("div", {
221
+ children: [/* @__PURE__ */ S("div", {
223
222
  className: "flex h-12 w-12 items-center justify-center rounded-full bg-bg-sunken text-sm font-semibold text-text-primary",
224
223
  children: e.name.split(" ").map((e) => e[0]).filter(Boolean).slice(0, 2).join("").toUpperCase() || "?"
225
- }), /* @__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) })]
226
- }), /* @__PURE__ */ v("div", {
224
+ }), /* @__PURE__ */ S("span", { className: t("absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full border-2 border-card", n.dot) })]
225
+ }), /* @__PURE__ */ C("div", {
227
226
  className: "flex-1 min-w-0",
228
- children: [/* @__PURE__ */ v("div", {
227
+ children: [/* @__PURE__ */ C("div", {
229
228
  className: "flex items-center gap-2 flex-wrap",
230
229
  children: [
231
- /* @__PURE__ */ _("p", {
230
+ /* @__PURE__ */ S("p", {
232
231
  className: "text-sm font-medium text-text-primary",
233
232
  children: e.name
234
233
  }),
235
- /* @__PURE__ */ _("span", {
234
+ /* @__PURE__ */ S("span", {
236
235
  className: "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium bg-[var(--color-accent-soft)] text-text-primary",
237
- children: S(e.role)
236
+ children: E(e.role)
238
237
  }),
239
- /* @__PURE__ */ _("span", {
238
+ /* @__PURE__ */ S("span", {
240
239
  className: t("text-xs", n.color),
241
240
  children: n.label
242
241
  })
243
242
  ]
244
- }), (r.email || r.phone) && /* @__PURE__ */ v("div", {
243
+ }), (r.email || r.phone) && /* @__PURE__ */ C("div", {
245
244
  className: "flex items-center gap-3 mt-1 text-xs text-text-secondary flex-wrap",
246
- children: [r.email && /* @__PURE__ */ v("span", {
245
+ children: [r.email && /* @__PURE__ */ C("span", {
247
246
  className: "flex items-center gap-1",
248
- children: [/* @__PURE__ */ _(d, { className: "h-3 w-3" }), r.email]
249
- }), r.phone && /* @__PURE__ */ v("span", {
247
+ children: [/* @__PURE__ */ S(h, { className: "h-3 w-3" }), r.email]
248
+ }), r.phone && /* @__PURE__ */ C("span", {
250
249
  className: "flex items-center gap-1",
251
- children: [/* @__PURE__ */ _(f, { className: "h-3 w-3" }), r.phone]
250
+ children: [/* @__PURE__ */ S(g, { className: "h-3 w-3" }), r.phone]
252
251
  })]
253
252
  })]
254
253
  })]
@@ -257,126 +256,126 @@ var x = [
257
256
  }, e.id);
258
257
  })
259
258
  })
260
- ] }) : /* @__PURE__ */ _(r, {
259
+ ] }) : /* @__PURE__ */ S(r, {
261
260
  illustration: "empty-people",
262
261
  title: "Create your cart first",
263
262
  description: "You need a service provider before you can add staff. Set up your cart to get started."
264
263
  })]
265
264
  }),
266
- B && /* @__PURE__ */ _("div", {
265
+ W && /* @__PURE__ */ S("div", {
267
266
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
268
- children: /* @__PURE__ */ _("div", {
267
+ children: /* @__PURE__ */ S("div", {
269
268
  className: "w-full max-w-lg rounded-lg border border-border-subtle bg-bg-surface shadow-xl",
270
- children: /* @__PURE__ */ v("div", {
269
+ children: /* @__PURE__ */ C("div", {
271
270
  className: "p-6",
272
271
  children: [
273
- /* @__PURE__ */ v("div", {
272
+ /* @__PURE__ */ C("div", {
274
273
  className: "flex items-center justify-between mb-4",
275
- children: [/* @__PURE__ */ _("h3", {
274
+ children: [/* @__PURE__ */ S("h3", {
276
275
  className: "text-lg font-semibold text-text-primary",
277
276
  children: "Add Staff Member"
278
- }), /* @__PURE__ */ _("button", {
277
+ }), /* @__PURE__ */ S("button", {
279
278
  type: "button",
280
- onClick: () => V(!1),
279
+ onClick: () => G(!1),
281
280
  className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken",
282
- children: /* @__PURE__ */ _(h, { className: "h-5 w-5" })
281
+ children: /* @__PURE__ */ S(b, { className: "h-5 w-5" })
283
282
  })]
284
283
  }),
285
- /* @__PURE__ */ v("div", {
284
+ /* @__PURE__ */ C("div", {
286
285
  className: "space-y-4",
287
286
  children: [
288
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
287
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
289
288
  className: "block text-sm font-medium text-text-primary mb-1",
290
289
  children: "Full Name *"
291
- }), /* @__PURE__ */ _("input", {
290
+ }), /* @__PURE__ */ S("input", {
292
291
  type: "text",
293
- value: H.name,
294
- onChange: (e) => U((t) => ({
292
+ value: K.name,
293
+ onChange: (e) => q((t) => ({
295
294
  ...t,
296
295
  name: e.target.value
297
296
  })),
298
297
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
299
298
  })] }),
300
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
299
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
301
300
  className: "block text-sm font-medium text-text-primary mb-1",
302
301
  children: "Email"
303
- }), /* @__PURE__ */ _("input", {
302
+ }), /* @__PURE__ */ S("input", {
304
303
  type: "email",
305
- value: H.email,
306
- onChange: (e) => U((t) => ({
304
+ value: K.email,
305
+ onChange: (e) => q((t) => ({
307
306
  ...t,
308
307
  email: e.target.value
309
308
  })),
310
309
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
311
310
  })] }),
312
- /* @__PURE__ */ v("div", {
311
+ /* @__PURE__ */ C("div", {
313
312
  className: "grid grid-cols-2 gap-4",
314
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
313
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
315
314
  className: "block text-sm font-medium text-text-primary mb-1",
316
315
  children: "Phone"
317
- }), /* @__PURE__ */ _("input", {
316
+ }), /* @__PURE__ */ S("input", {
318
317
  type: "tel",
319
- value: H.phone,
320
- onChange: (e) => U((t) => ({
318
+ value: K.phone,
319
+ onChange: (e) => q((t) => ({
321
320
  ...t,
322
321
  phone: e.target.value
323
322
  })),
324
323
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
325
- })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
324
+ })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
326
325
  className: "block text-sm font-medium text-text-primary mb-1",
327
326
  children: "Role *"
328
- }), /* @__PURE__ */ _("select", {
329
- value: H.role,
330
- onChange: (e) => U((t) => ({
327
+ }), /* @__PURE__ */ S("select", {
328
+ value: K.role,
329
+ onChange: (e) => q((t) => ({
331
330
  ...t,
332
331
  role: e.target.value
333
332
  })),
334
333
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
335
- children: x.map((e) => /* @__PURE__ */ _("option", {
334
+ children: ee.map((e) => /* @__PURE__ */ S("option", {
336
335
  value: e,
337
- children: S(e)
336
+ children: E(e)
338
337
  }, e))
339
338
  })] })]
340
339
  })
341
340
  ]
342
341
  }),
343
- /* @__PURE__ */ v("div", {
342
+ /* @__PURE__ */ C("div", {
344
343
  className: "flex gap-3 mt-6",
345
- children: [/* @__PURE__ */ _("button", {
344
+ children: [/* @__PURE__ */ S("button", {
346
345
  type: "button",
347
- onClick: () => V(!1),
346
+ onClick: () => G(!1),
348
347
  className: "flex-1 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
349
348
  children: "Cancel"
350
- }), /* @__PURE__ */ _("button", {
349
+ }), /* @__PURE__ */ S("button", {
351
350
  type: "button",
352
351
  onClick: () => {
353
- if (!H.name.trim() || !H.role) {
354
- K("Please provide a name and role", "error");
352
+ if (!K.name.trim() || !K.role) {
353
+ X("Please provide a name and role", "error");
355
354
  return;
356
355
  }
357
- if (!A) {
358
- K("No cart found to add staff to", "error");
356
+ if (!P) {
357
+ X("No cart found to add staff to", "error");
359
358
  return;
360
359
  }
361
- N.mutate({
362
- providerId: A,
363
- name: H.name.trim(),
364
- role: H.role,
365
- workerId: H.email.trim() || H.name.trim(),
360
+ L.mutate({
361
+ providerId: P,
362
+ name: K.name.trim(),
363
+ role: K.role,
364
+ workerId: K.email.trim() || K.name.trim(),
366
365
  metadata: {
367
- email: H.email.trim() || void 0,
368
- phone: H.phone.trim() || void 0
366
+ email: K.email.trim() || void 0,
367
+ phone: K.phone.trim() || void 0
369
368
  }
370
369
  }, {
371
370
  onSuccess: () => {
372
- V(!1), U(T), K("Staff member added successfully", "success");
371
+ G(!1), q(k), X("Staff member added successfully", "success");
373
372
  },
374
- onError: () => K("Could not add staff member. Please try again.", "error")
373
+ onError: () => X("Could not add staff member. Please try again.", "error")
375
374
  });
376
375
  },
377
- disabled: N.isPending,
378
- className: t("flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors", N.isPending ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
379
- children: N.isPending ? "Adding..." : "Add Staff"
376
+ disabled: L.isPending,
377
+ className: t("flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors", L.isPending ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
378
+ children: L.isPending ? "Adding..." : "Add Staff"
380
379
  })]
381
380
  })
382
381
  ]
@@ -387,6 +386,6 @@ var x = [
387
386
  });
388
387
  };
389
388
  //#endregion
390
- export { E as StaffManagementPage };
389
+ export { A as StaffManagementPage };
391
390
 
392
391
  //# sourceMappingURL=StaffManagementPage.js.map