@burdenoff/microfe-timecampus 2026.1205.1 → 2026.1206.2

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 (125) hide show
  1. package/dist/timecampus/components/DateFields.d.ts +53 -0
  2. package/dist/timecampus/components/DateFields.js +87 -0
  3. package/dist/timecampus/components/DateFields.js.map +1 -0
  4. package/dist/timecampus/components/ErrorBoundary.js +1 -1
  5. package/dist/timecampus/components/ErrorBoundary.js.map +1 -1
  6. package/dist/timecampus/components/StatusBadge.js +4 -4
  7. package/dist/timecampus/components/StatusBadge.js.map +1 -1
  8. package/dist/timecampus/components/Toast.js +4 -4
  9. package/dist/timecampus/components/Toast.js.map +1 -1
  10. package/dist/timecampus/components/dateFieldValues.d.ts +39 -0
  11. package/dist/timecampus/components/dateFieldValues.js +49 -0
  12. package/dist/timecampus/components/dateFieldValues.js.map +1 -0
  13. package/dist/timecampus/components/maps/LocationGeofenceMap.js +2 -2
  14. package/dist/timecampus/components/maps/LocationGeofenceMap.js.map +1 -1
  15. package/dist/timecampus/pages/HomePage.js +1 -1
  16. package/dist/timecampus/pages/HomePage.js.map +1 -1
  17. package/dist/timecampus/pages/admin/AdminPage.js +6 -6
  18. package/dist/timecampus/pages/admin/AdminPage.js.map +1 -1
  19. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +5 -5
  20. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
  21. package/dist/timecampus/pages/channels/ChannelsPage.js +1 -1
  22. package/dist/timecampus/pages/channels/ChannelsPage.js.map +1 -1
  23. package/dist/timecampus/pages/client-portal/ClientPortalPage.js +4 -4
  24. package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
  25. package/dist/timecampus/pages/dashboard/AnalyticsPage.js +3 -3
  26. package/dist/timecampus/pages/dashboard/AnalyticsPage.js.map +1 -1
  27. package/dist/timecampus/pages/dashboard/ReportsPage.js +4 -4
  28. package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
  29. package/dist/timecampus/pages/dashboard/ServerReportExports.js +1 -1
  30. package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
  31. package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js +121 -120
  32. package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js.map +1 -1
  33. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +71 -71
  34. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  35. package/dist/timecampus/pages/extend/AppletDeveloperPage.js +1 -1
  36. package/dist/timecampus/pages/extend/AppletDeveloperPage.js.map +1 -1
  37. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js +1 -1
  38. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js.map +1 -1
  39. package/dist/timecampus/pages/extend/TimeTriggersPage.js +1 -1
  40. package/dist/timecampus/pages/extend/TimeTriggersPage.js.map +1 -1
  41. package/dist/timecampus/pages/focus/FocusProtectionPage.js +250 -253
  42. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  43. package/dist/timecampus/pages/focus-score/FocusScorePage.js +1 -1
  44. package/dist/timecampus/pages/focus-score/FocusScorePage.js.map +1 -1
  45. package/dist/timecampus/pages/geofencing/GeofencingPage.js +5 -5
  46. package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
  47. package/dist/timecampus/pages/invoicing/InvoicingPage.js +264 -263
  48. package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
  49. package/dist/timecampus/pages/lifetime/DeadTimeRadarPage.js +1 -1
  50. package/dist/timecampus/pages/lifetime/DeadTimeRadarPage.js.map +1 -1
  51. package/dist/timecampus/pages/lifetime/FiniteLifePage.js +103 -103
  52. package/dist/timecampus/pages/lifetime/FiniteLifePage.js.map +1 -1
  53. package/dist/timecampus/pages/lifetime/LifeBalancePage.js +1 -1
  54. package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
  55. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +43 -43
  56. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
  57. package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js +3 -3
  58. package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js.map +1 -1
  59. package/dist/timecampus/pages/lifetime/RecommendationsPage.js +1 -1
  60. package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
  61. package/dist/timecampus/pages/lifetime/TimeWellSpentPage.js +2 -2
  62. package/dist/timecampus/pages/lifetime/TimeWellSpentPage.js.map +1 -1
  63. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +5 -5
  64. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js.map +1 -1
  65. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +223 -221
  66. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
  67. package/dist/timecampus/pages/meetings/ActionItemFormModal.js +65 -64
  68. package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
  69. package/dist/timecampus/pages/meetings/MeetingAnalyticsPage.js +1 -1
  70. package/dist/timecampus/pages/meetings/MeetingAnalyticsPage.js.map +1 -1
  71. package/dist/timecampus/pages/meetings/MeetingCreatePage.js +55 -55
  72. package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
  73. package/dist/timecampus/pages/meetings/MeetingDetailPage.js +8 -8
  74. package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
  75. package/dist/timecampus/pages/meetings/MeetingFormModal.js +99 -97
  76. package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
  77. package/dist/timecampus/pages/meetings/MeetingsPage.js +3 -3
  78. package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
  79. package/dist/timecampus/pages/meetings/ParticipantFormModal.js +1 -1
  80. package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -1
  81. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js +1 -1
  82. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js.map +1 -1
  83. package/dist/timecampus/pages/mobile/MobileTimelinePage.js +4 -4
  84. package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -1
  85. package/dist/timecampus/pages/mobile/MobileTimerPage.js +1 -1
  86. package/dist/timecampus/pages/mobile/MobileTimerPage.js.map +1 -1
  87. package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js +2 -2
  88. package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js.map +1 -1
  89. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +155 -154
  90. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  91. package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js +1 -1
  92. package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js.map +1 -1
  93. package/dist/timecampus/pages/projects/ProjectCreatePage.js +1 -1
  94. package/dist/timecampus/pages/projects/ProjectCreatePage.js.map +1 -1
  95. package/dist/timecampus/pages/projects/ProjectDetailPage.js +5 -5
  96. package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
  97. package/dist/timecampus/pages/projects/ProjectsPage.js +6 -6
  98. package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
  99. package/dist/timecampus/pages/projects/TasksPage.js +189 -188
  100. package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
  101. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +356 -361
  102. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
  103. package/dist/timecampus/pages/team/TeamAnalyticsPage.js +2 -2
  104. package/dist/timecampus/pages/team/TeamAnalyticsPage.js.map +1 -1
  105. package/dist/timecampus/pages/team/TeamMembersPage.js +3 -3
  106. package/dist/timecampus/pages/team/TeamMembersPage.js.map +1 -1
  107. package/dist/timecampus/pages/team/TeamPage.js +2 -2
  108. package/dist/timecampus/pages/team/TeamPage.js.map +1 -1
  109. package/dist/timecampus/pages/team-activity/TeamActivityPage.js +2 -2
  110. package/dist/timecampus/pages/team-activity/TeamActivityPage.js.map +1 -1
  111. package/dist/timecampus/pages/time/TimeEntriesPage.js +133 -131
  112. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  113. package/dist/timecampus/pages/time/TimeTrackingPage.js +1 -1
  114. package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
  115. package/dist/timecampus/pages/time/TimerPage.js +1 -1
  116. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  117. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js +47 -48
  118. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js.map +1 -1
  119. package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +8 -8
  120. package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
  121. package/dist/timecampus/pages/timeline/TimelinePage.js +237 -237
  122. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  123. package/dist/timecampus/pages/work-patterns/SustainedLoadCard.js +3 -3
  124. package/dist/timecampus/pages/work-patterns/SustainedLoadCard.js.map +1 -1
  125. package/package.json +1 -1
@@ -9,136 +9,137 @@ import { formatHours as a, getInitials as te } from "../../utils/helpers.js";
9
9
  import { ChartCard as o } from "../../components/ChartCard.js";
10
10
  import { DonutChart as ne } from "../../components/charts/DonutChart.js";
11
11
  import { RadialGauge as re } from "../../components/charts/RadialGauge.js";
12
- import { ProgressMeter as s } from "../../components/charts/ProgressMeter.js";
13
- import { useBulkCreateAllocationsMutation as ie, useCreateAllocationMutation as ae, useCreateResourcePlanMutation as oe, useDeleteAllocationMutation as se, useDeleteResourcePlanMutation as ce, useGetCapacityOverviewQuery as le, useListResourcePlansQuery as ue, useUpdateAllocationMutation as de, useUpdateResourcePlanMutation as fe } from "../../../generated/wspace-operations.js";
12
+ import { ProgressMeter as ie } from "../../components/charts/ProgressMeter.js";
13
+ import { useBulkCreateAllocationsMutation as ae, useCreateAllocationMutation as oe, useCreateResourcePlanMutation as se, useDeleteAllocationMutation as ce, useDeleteResourcePlanMutation as le, useGetCapacityOverviewQuery as ue, useListResourcePlansQuery as de, useUpdateAllocationMutation as fe, useUpdateResourcePlanMutation as pe } from "../../../generated/wspace-operations.js";
14
+ import { DateField as s } from "../../components/DateFields.js";
14
15
  import { useState as c } from "react";
15
- import { AlertTriangle as pe, CalendarRange as me, Pencil as l, Plus as u, Trash2 as he, TrendingUp as ge, UserPlus as _e, Users as ve } from "lucide-react";
16
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
17
- import { GlassCard as ye, ThemedSelect as be } from "@burdenoff/fe-libs/ui";
16
+ import { AlertTriangle as me, CalendarRange as he, Pencil as l, Plus as u, Trash2 as d, TrendingUp as ge, UserPlus as _e, Users as f } from "lucide-react";
17
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
18
+ import { GlassCard as ve, ThemedSelect as ye } from "@burdenoff/fe-libs/ui";
18
19
  // src/timecampus/pages/resource-planning/ResourcePlanningPage.tsx
19
- var m = 25, h = "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary", g = (e) => e.slice(0, 10), _ = (e) => new Date(e).toISOString(), v = () => {
20
+ var be = 25, g = "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary", _ = (e) => e.slice(0, 10), v = (e) => new Date(e).toISOString(), y = () => {
20
21
  let e = /* @__PURE__ */ new Date(), t = new Date(e.getFullYear(), e.getMonth(), e.getDate()), n = new Date(e.getFullYear(), e.getMonth(), e.getDate() + 7);
21
22
  return {
22
23
  name: "",
23
24
  description: "",
24
- startDate: g(t.toISOString()),
25
- endDate: g(n.toISOString()),
25
+ startDate: _(t.toISOString()),
26
+ endDate: _(n.toISOString()),
26
27
  status: "active"
27
28
  };
28
- }, y = (e) => ({
29
+ }, b = (e) => ({
29
30
  userId: "",
30
31
  allocatedHours: "",
31
- startDate: e ? g(e.startDate) : "",
32
- endDate: e ? g(e.endDate) : "",
32
+ startDate: e ? _(e.startDate) : "",
33
+ endDate: e ? _(e.endDate) : "",
33
34
  notes: ""
34
35
  });
35
- function b() {
36
- let b = /* @__PURE__ */ new Date(), xe = new Date(b.getFullYear(), b.getMonth(), b.getDate()).toISOString(), Se = new Date(b.getFullYear(), b.getMonth(), b.getDate() + 7).toISOString(), { data: x, loading: Ce, error: we, refetch: Te, fetchMore: Ee } = ue({ variables: { pagination: {
37
- limit: m,
36
+ function x() {
37
+ let x = /* @__PURE__ */ new Date(), xe = new Date(x.getFullYear(), x.getMonth(), x.getDate()).toISOString(), Se = new Date(x.getFullYear(), x.getMonth(), x.getDate() + 7).toISOString(), { data: S, loading: Ce, error: we, refetch: Te, fetchMore: Ee } = de({ variables: { pagination: {
38
+ limit: be,
38
39
  offset: 0
39
- } } }), { data: De, refetch: Oe } = le({ variables: {
40
+ } } }), { data: De, refetch: Oe } = ue({ variables: {
40
41
  startDate: xe,
41
42
  endDate: Se
42
- } }), [ke, { loading: S, error: Ae }] = oe(), [je, { loading: C, error: Me }] = fe(), [Ne, { loading: w }] = ce(), [Pe, { loading: T }] = ae(), [Fe, { loading: E }] = ie(), [Ie, { loading: D, error: Le }] = de(), [Re, { loading: O }] = se(), [ze, k] = c(!1), [A, j] = c(null), [M, N] = c(v()), [P, F] = c(null), [I, L] = c(null), [R, z] = c([]), [Be, B] = c(!1), [V, H] = c(null), [U, W] = c(null), [G, K] = c(null), [q, J] = c(!1), Y = x?.resourcePlans?.items ?? [], Ve = x?.resourcePlans?.hasMore ?? !1, X = De?.capacityOverview, Z = async () => {
43
+ } }), [ke, { loading: C, error: Ae }] = se(), [je, { loading: w, error: Me }] = pe(), [Ne, { loading: T }] = le(), [Pe, { loading: E }] = oe(), [Fe, { loading: D }] = ae(), [Ie, { loading: O, error: Le }] = fe(), [Re, { loading: k }] = ce(), [ze, A] = c(!1), [j, M] = c(null), [N, P] = c(y()), [F, I] = c(null), [L, R] = c(null), [z, B] = c([]), [Be, V] = c(!1), [H, U] = c(null), [W, G] = c(null), [K, q] = c(null), [Ve, He] = c(!1), J = S?.resourcePlans?.items ?? [], Ue = S?.resourcePlans?.hasMore ?? !1, Y = De?.capacityOverview, X = async () => {
43
44
  await Promise.all([Te(), Oe()]);
44
- }, He = () => {
45
- j(null), N(v()), k(!0);
46
- }, Ue = (e) => {
47
- j(e), N({
45
+ }, We = () => {
46
+ M(null), P(y()), A(!0);
47
+ }, Ge = (e) => {
48
+ M(e), P({
48
49
  name: e.name,
49
50
  description: e.description ?? "",
50
- startDate: g(e.startDate),
51
- endDate: g(e.endDate),
51
+ startDate: _(e.startDate),
52
+ endDate: _(e.endDate),
52
53
  status: e.status
53
- }), k(!0);
54
- }, We = async () => {
55
- M.name.trim() && (A ? await je({ variables: {
56
- id: A.id,
54
+ }), A(!0);
55
+ }, Ke = async () => {
56
+ N.name.trim() && (j ? await je({ variables: {
57
+ id: j.id,
57
58
  input: {
58
- name: M.name.trim(),
59
- description: M.description.trim() || void 0,
60
- startDate: _(M.startDate),
61
- endDate: _(M.endDate),
62
- status: M.status
59
+ name: N.name.trim(),
60
+ description: N.description.trim() || void 0,
61
+ startDate: v(N.startDate),
62
+ endDate: v(N.endDate),
63
+ status: N.status
63
64
  }
64
65
  } }) : await ke({ variables: { input: {
65
- name: M.name.trim(),
66
- description: M.description.trim() || void 0,
67
- startDate: _(M.startDate),
68
- endDate: _(M.endDate)
69
- } } }), k(!1), await Z());
70
- }, Ge = async () => {
71
- P && (await Ne({ variables: { id: P.id } }), F(null), await Z());
72
- }, Ke = (e) => {
73
- L(e), z([y(e)]), B(!1);
74
- }, Q = (e, t) => {
75
- z((n) => n.map((n, r) => r === e ? {
66
+ name: N.name.trim(),
67
+ description: N.description.trim() || void 0,
68
+ startDate: v(N.startDate),
69
+ endDate: v(N.endDate)
70
+ } } }), A(!1), await X());
71
+ }, qe = async () => {
72
+ F && (await Ne({ variables: { id: F.id } }), I(null), await X());
73
+ }, Je = (e) => {
74
+ R(e), B([b(e)]), V(!1);
75
+ }, Z = (e, t) => {
76
+ B((n) => n.map((n, r) => r === e ? {
76
77
  ...n,
77
78
  ...t
78
79
  } : n));
79
- }, qe = () => {
80
- z((e) => [...e, y(I ?? void 0)]);
81
- }, Je = (e) => {
82
- z((t) => t.filter((t, n) => n !== e));
83
- }, Ye = R.every((e) => e.userId.trim() !== "" && e.allocatedHours.trim() !== "" && e.startDate !== "" && e.endDate !== ""), Xe = async () => {
84
- if (I && Ye && R.length !== 0) {
85
- B(!1);
80
+ }, Ye = () => {
81
+ B((e) => [...e, b(L ?? void 0)]);
82
+ }, Xe = (e) => {
83
+ B((t) => t.filter((t, n) => n !== e));
84
+ }, Ze = z.every((e) => e.userId.trim() !== "" && e.allocatedHours.trim() !== "" && e.startDate !== "" && e.endDate !== ""), Qe = async () => {
85
+ if (L && Ze && z.length !== 0) {
86
+ V(!1);
86
87
  try {
87
- if (R.length === 1) {
88
- let e = R[0];
88
+ if (z.length === 1) {
89
+ let e = z[0];
89
90
  await Pe({ variables: { input: {
90
- resourcePlanId: I.id,
91
+ resourcePlanId: L.id,
91
92
  userId: e.userId.trim(),
92
93
  allocatedHours: Number(e.allocatedHours),
93
- startDate: _(e.startDate),
94
- endDate: _(e.endDate),
94
+ startDate: v(e.startDate),
95
+ endDate: v(e.endDate),
95
96
  notes: e.notes.trim() || void 0
96
97
  } } });
97
98
  } else await Fe({ variables: {
98
- planId: I.id,
99
- allocations: R.map((e) => ({
99
+ planId: L.id,
100
+ allocations: z.map((e) => ({
100
101
  userId: e.userId.trim(),
101
102
  allocatedHours: Number(e.allocatedHours),
102
- startDate: _(e.startDate),
103
- endDate: _(e.endDate),
103
+ startDate: v(e.startDate),
104
+ endDate: v(e.endDate),
104
105
  notes: e.notes.trim() || void 0
105
106
  }))
106
107
  } });
107
- L(null), await Z();
108
+ R(null), await X();
108
109
  } catch {
109
- B(!0);
110
+ V(!0);
110
111
  }
111
112
  }
112
- }, Ze = (e) => {
113
- H(e), W({
113
+ }, $e = (e) => {
114
+ U(e), G({
114
115
  userId: e.userId,
115
116
  allocatedHours: String(e.allocatedHours),
116
117
  actualHours: String(e.actualHours),
117
- startDate: g(e.startDate),
118
- endDate: g(e.endDate),
118
+ startDate: _(e.startDate),
119
+ endDate: _(e.endDate),
119
120
  notes: e.notes ?? ""
120
121
  });
121
- }, Qe = async () => {
122
- V && U && (await Ie({ variables: {
123
- id: V.id,
122
+ }, et = async () => {
123
+ H && W && (await Ie({ variables: {
124
+ id: H.id,
124
125
  input: {
125
- userId: U.userId.trim(),
126
- allocatedHours: Number(U.allocatedHours),
127
- actualHours: Number(U.actualHours),
128
- startDate: _(U.startDate),
129
- endDate: _(U.endDate),
130
- notes: U.notes.trim() || void 0
126
+ userId: W.userId.trim(),
127
+ allocatedHours: Number(W.allocatedHours),
128
+ actualHours: Number(W.actualHours),
129
+ startDate: v(W.startDate),
130
+ endDate: v(W.endDate),
131
+ notes: W.notes.trim() || void 0
131
132
  }
132
- } }), H(null), W(null), await Z());
133
- }, $e = async () => {
134
- G && (await Re({ variables: { id: G.id } }), K(null), await Z());
135
- }, et = async () => {
136
- J(!0);
133
+ } }), U(null), G(null), await X());
134
+ }, tt = async () => {
135
+ K && (await Re({ variables: { id: K.id } }), q(null), await X());
136
+ }, nt = async () => {
137
+ He(!0);
137
138
  try {
138
139
  await Ee({
139
140
  variables: { pagination: {
140
- limit: m,
141
- offset: Y.length
141
+ limit: be,
142
+ offset: J.length
142
143
  } },
143
144
  updateQuery: (e, { fetchMoreResult: t }) => t ? { resourcePlans: {
144
145
  ...t.resourcePlans,
@@ -146,142 +147,142 @@ function b() {
146
147
  } } : e
147
148
  });
148
149
  } finally {
149
- J(!1);
150
+ He(!1);
150
151
  }
151
- }, tt = /* @__PURE__ */ p("button", {
152
- onClick: He,
152
+ }, rt = /* @__PURE__ */ h("button", {
153
+ onClick: We,
153
154
  className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
154
- children: [/* @__PURE__ */ f(u, { className: "h-4 w-4" }), "New Resource Plan"]
155
+ children: [/* @__PURE__ */ m(u, { className: "h-4 w-4" }), "New Resource Plan"]
155
156
  });
156
- if (Ce) return /* @__PURE__ */ f(e, {
157
+ if (Ce) return /* @__PURE__ */ m(e, {
157
158
  title: "Resource Planning",
158
159
  description: "Plan and optimize team resource allocation",
159
- children: /* @__PURE__ */ f(r, {
160
+ children: /* @__PURE__ */ m(r, {
160
161
  variant: "list",
161
162
  count: 5
162
163
  })
163
164
  });
164
- if (we) return /* @__PURE__ */ f(e, {
165
+ if (we) return /* @__PURE__ */ m(e, {
165
166
  title: "Resource Planning",
166
167
  description: "Plan and optimize team resource allocation",
167
- children: /* @__PURE__ */ f("div", {
168
- className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
168
+ children: /* @__PURE__ */ m("div", {
169
+ className: "rounded-lg border border-status-error-border bg-status-error-bgSubtle p-4 text-sm text-status-error-text",
169
170
  children: "Failed to load resource planning data. Please try again later."
170
171
  })
171
172
  });
172
- let nt = X?.utilizationRate ?? 0, rt = X?.overallocatedUsers ?? [], $ = rt.length, it = X?.availableCapacity ?? 0, at = X?.allocatedCapacity ?? 0, ot = X?.totalCapacity ?? 0, st = !!X && (ot > 0 || at > 0 || $ > 0);
173
- return /* @__PURE__ */ p(e, {
173
+ let it = Y?.utilizationRate ?? 0, at = Y?.overallocatedUsers ?? [], Q = at.length, ot = Y?.availableCapacity ?? 0, st = Y?.allocatedCapacity ?? 0, $ = Y?.totalCapacity ?? 0, ct = !!Y && ($ > 0 || st > 0 || Q > 0);
174
+ return /* @__PURE__ */ h(e, {
174
175
  title: "Resource Planning",
175
176
  description: "Plan and optimize team resource allocation",
176
177
  purpose: "Match the work ahead to the people you have — see who's over- or under-booked and how much capacity is free this week — so you can commit to deadlines you can actually hit without burning anyone out.",
177
- actions: tt,
178
+ actions: rt,
178
179
  children: [
179
- /* @__PURE__ */ p("div", {
180
+ /* @__PURE__ */ h("div", {
180
181
  className: "space-y-6",
181
182
  children: [
182
- /* @__PURE__ */ p("div", {
183
+ /* @__PURE__ */ h("div", {
183
184
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
184
185
  children: [
185
- /* @__PURE__ */ f(t, {
186
+ /* @__PURE__ */ m(t, {
186
187
  featured: !0,
187
188
  title: "Team Utilization",
188
- value: `${Math.round(nt)}%`,
189
- icon: /* @__PURE__ */ f(ge, { className: "h-5 w-5" })
189
+ value: `${Math.round(it)}%`,
190
+ icon: /* @__PURE__ */ m(ge, { className: "h-5 w-5" })
190
191
  }),
191
- /* @__PURE__ */ f(t, {
192
+ /* @__PURE__ */ m(t, {
192
193
  title: "Over-allocated",
193
- value: String($),
194
- icon: /* @__PURE__ */ f(ve, { className: "h-5 w-5" }),
195
- iconBgColor: "bg-status-error-bg text-status-error-text"
194
+ value: String(Q),
195
+ icon: /* @__PURE__ */ m(f, { className: "h-5 w-5" }),
196
+ iconBgColor: "bg-status-error-bgSubtle text-status-error-text"
196
197
  }),
197
- /* @__PURE__ */ f(t, {
198
+ /* @__PURE__ */ m(t, {
198
199
  title: "Active Plans",
199
- value: String(Y.length),
200
- icon: /* @__PURE__ */ f(ve, { className: "h-5 w-5" })
200
+ value: String(J.length),
201
+ icon: /* @__PURE__ */ m(f, { className: "h-5 w-5" })
201
202
  }),
202
- /* @__PURE__ */ f(t, {
203
+ /* @__PURE__ */ m(t, {
203
204
  title: "Available Capacity",
204
- value: `${Math.round(it)}h`,
205
- icon: /* @__PURE__ */ f(me, { className: "h-5 w-5" }),
205
+ value: `${Math.round(ot)}h`,
206
+ icon: /* @__PURE__ */ m(he, { className: "h-5 w-5" }),
206
207
  description: "This week"
207
208
  })
208
209
  ]
209
210
  }),
210
- st && /* @__PURE__ */ p("div", {
211
+ ct && /* @__PURE__ */ h("div", {
211
212
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
212
- children: [/* @__PURE__ */ f(o, {
213
+ children: [/* @__PURE__ */ m(o, {
213
214
  title: "Capacity split",
214
215
  description: "Allocated vs available hours this week",
215
- children: /* @__PURE__ */ f(ne, {
216
+ children: /* @__PURE__ */ m(ne, {
216
217
  data: [{
217
218
  name: "Allocated",
218
- value: at
219
+ value: st
219
220
  }, {
220
221
  name: "Available",
221
- value: it
222
+ value: ot
222
223
  }],
223
224
  centerLabel: "Total",
224
- centerValue: `${Math.round(ot)}h`,
225
+ centerValue: `${Math.round($)}h`,
225
226
  valueFormat: (e) => `${Math.round(e)}h`,
226
227
  emptyLabel: "No capacity data yet"
227
228
  })
228
- }), /* @__PURE__ */ p(o, {
229
+ }), /* @__PURE__ */ h(o, {
229
230
  title: "Utilization & over-allocation",
230
231
  description: "Team utilization and who is over-booked this week",
231
- children: [/* @__PURE__ */ f(re, {
232
- value: Math.round(nt),
232
+ children: [/* @__PURE__ */ m(re, {
233
+ value: Math.round(it),
233
234
  max: 100,
234
235
  label: "Utilization",
235
236
  sublabel: "this week",
236
237
  format: (e) => `${Math.round(e)}%`
237
- }), /* @__PURE__ */ p("div", {
238
+ }), /* @__PURE__ */ h("div", {
238
239
  className: "mt-4",
239
- children: [/* @__PURE__ */ p("p", {
240
+ children: [/* @__PURE__ */ h("p", {
240
241
  className: "mb-2 text-xs font-medium text-text-secondary",
241
242
  children: [
242
243
  "Over-allocated (",
243
- $,
244
+ Q,
244
245
  ")"
245
246
  ]
246
- }), $ === 0 ? /* @__PURE__ */ f("p", {
247
+ }), Q === 0 ? /* @__PURE__ */ m("p", {
247
248
  className: "text-sm text-text-secondary",
248
249
  children: "No one is over-allocated this week."
249
- }) : /* @__PURE__ */ f("div", {
250
+ }) : /* @__PURE__ */ m("div", {
250
251
  className: "flex flex-wrap gap-2",
251
- children: rt.map((e) => /* @__PURE__ */ p("span", {
252
- className: "inline-flex items-center gap-1 rounded-full bg-status-warning-bg px-2.5 py-0.5 text-xs font-medium text-status-warning-text",
253
- children: [/* @__PURE__ */ f(pe, { className: "h-3.5 w-3.5" }), e]
252
+ children: at.map((e) => /* @__PURE__ */ h("span", {
253
+ className: "inline-flex items-center gap-1 rounded-full bg-status-warning-bgSubtle px-2.5 py-0.5 text-xs font-medium text-status-warning-text",
254
+ children: [/* @__PURE__ */ m(me, { className: "h-3.5 w-3.5" }), e]
254
255
  }, e))
255
256
  })]
256
257
  })]
257
258
  })]
258
259
  }),
259
- Y.length === 0 ? /* @__PURE__ */ f(n, {
260
+ J.length === 0 ? /* @__PURE__ */ m(n, {
260
261
  illustration: "empty-people",
261
262
  title: "No resource plans yet",
262
263
  description: "Create a resource plan to start allocating team members and balancing workload across the week.",
263
- action: tt
264
- }) : /* @__PURE__ */ p("div", {
264
+ action: rt
265
+ }) : /* @__PURE__ */ h("div", {
265
266
  className: "space-y-6",
266
- children: [Y.map((e) => /* @__PURE__ */ p(ye, {
267
+ children: [J.map((e) => /* @__PURE__ */ h(ve, {
267
268
  treatment: "glass",
268
269
  className: "overflow-hidden",
269
- children: [/* @__PURE__ */ p("div", {
270
+ children: [/* @__PURE__ */ h("div", {
270
271
  className: "flex flex-col gap-3 border-b border-border-seam p-5 sm:flex-row sm:items-start sm:justify-between",
271
- children: [/* @__PURE__ */ p("div", {
272
+ children: [/* @__PURE__ */ h("div", {
272
273
  className: "min-w-0",
273
274
  children: [
274
- /* @__PURE__ */ p("div", {
275
+ /* @__PURE__ */ h("div", {
275
276
  className: "flex flex-wrap items-center gap-2",
276
- children: [/* @__PURE__ */ f("p", {
277
+ children: [/* @__PURE__ */ m("p", {
277
278
  className: "text-sm font-semibold text-text-primary",
278
279
  children: e.name
279
- }), /* @__PURE__ */ f(ee, {
280
+ }), /* @__PURE__ */ m(ee, {
280
281
  label: e.status,
281
282
  status: e.status
282
283
  })]
283
284
  }),
284
- /* @__PURE__ */ p("p", {
285
+ /* @__PURE__ */ h("p", {
285
286
  className: "mt-0.5 text-xs text-text-secondary",
286
287
  children: [
287
288
  e.startDate.slice(0, 10),
@@ -295,9 +296,9 @@ function b() {
295
296
  e.allocations.length === 1 ? "person" : "people"
296
297
  ]
297
298
  }),
298
- /* @__PURE__ */ f("div", {
299
+ /* @__PURE__ */ m("div", {
299
300
  className: "mt-3 max-w-sm",
300
- children: /* @__PURE__ */ f(s, {
301
+ children: /* @__PURE__ */ m(ie, {
301
302
  size: "sm",
302
303
  label: "Logged vs allocated",
303
304
  value: e.totalActualHours,
@@ -306,82 +307,82 @@ function b() {
306
307
  })
307
308
  })
308
309
  ]
309
- }), /* @__PURE__ */ p("div", {
310
+ }), /* @__PURE__ */ h("div", {
310
311
  className: "flex flex-wrap items-center gap-2",
311
312
  children: [
312
- /* @__PURE__ */ p("button", {
313
- onClick: () => Ke(e),
313
+ /* @__PURE__ */ h("button", {
314
+ onClick: () => Je(e),
314
315
  className: "inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-2.5 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90",
315
- children: [/* @__PURE__ */ f(_e, { className: "h-3.5 w-3.5" }), "Add Allocation"]
316
+ children: [/* @__PURE__ */ m(_e, { className: "h-3.5 w-3.5" }), "Add Allocation"]
316
317
  }),
317
- /* @__PURE__ */ p("button", {
318
- onClick: () => Ue(e),
318
+ /* @__PURE__ */ h("button", {
319
+ onClick: () => Ge(e),
319
320
  className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2.5 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken/50",
320
- children: [/* @__PURE__ */ f(l, { className: "h-3.5 w-3.5" }), "Edit"]
321
+ children: [/* @__PURE__ */ m(l, { className: "h-3.5 w-3.5" }), "Edit"]
321
322
  }),
322
- /* @__PURE__ */ p("button", {
323
- onClick: () => F(e),
324
- className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2.5 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg",
325
- children: [/* @__PURE__ */ f(he, { className: "h-3.5 w-3.5" }), "Delete"]
323
+ /* @__PURE__ */ h("button", {
324
+ onClick: () => I(e),
325
+ className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2.5 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bgSubtle",
326
+ children: [/* @__PURE__ */ m(d, { className: "h-3.5 w-3.5" }), "Delete"]
326
327
  })
327
328
  ]
328
329
  })]
329
- }), e.allocations.length === 0 ? /* @__PURE__ */ f("div", {
330
+ }), e.allocations.length === 0 ? /* @__PURE__ */ m("div", {
330
331
  className: "p-5 text-sm text-text-secondary",
331
332
  children: "No allocations yet. Use “Add Allocation” to assign team members."
332
- }) : /* @__PURE__ */ f("div", {
333
+ }) : /* @__PURE__ */ m("div", {
333
334
  className: "overflow-x-auto",
334
- children: /* @__PURE__ */ p("table", {
335
+ children: /* @__PURE__ */ h("table", {
335
336
  className: "w-full text-sm",
336
- children: [/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", {
337
+ children: [/* @__PURE__ */ m("thead", { children: /* @__PURE__ */ h("tr", {
337
338
  className: "border-b border-border-seam text-start text-xs text-text-secondary",
338
339
  children: [
339
- /* @__PURE__ */ f("th", {
340
+ /* @__PURE__ */ m("th", {
340
341
  className: "whitespace-nowrap px-5 py-2.5 font-medium",
341
342
  children: "Member"
342
343
  }),
343
- /* @__PURE__ */ f("th", {
344
+ /* @__PURE__ */ m("th", {
344
345
  className: "whitespace-nowrap px-4 py-2.5 font-medium",
345
346
  children: "Window"
346
347
  }),
347
- /* @__PURE__ */ f("th", {
348
+ /* @__PURE__ */ m("th", {
348
349
  className: "whitespace-nowrap px-4 py-2.5 text-end font-medium",
349
350
  children: "Allocated"
350
351
  }),
351
- /* @__PURE__ */ f("th", {
352
+ /* @__PURE__ */ m("th", {
352
353
  className: "whitespace-nowrap px-4 py-2.5 text-end font-medium",
353
354
  children: "Actual"
354
355
  }),
355
- /* @__PURE__ */ f("th", {
356
+ /* @__PURE__ */ m("th", {
356
357
  className: "whitespace-nowrap px-4 py-2.5 font-medium",
357
358
  children: "Utilization"
358
359
  }),
359
- /* @__PURE__ */ f("th", {
360
+ /* @__PURE__ */ m("th", {
360
361
  className: "whitespace-nowrap px-5 py-2.5 text-end font-medium",
361
362
  children: "Actions"
362
363
  })
363
364
  ]
364
- }) }), /* @__PURE__ */ f("tbody", {
365
+ }) }), /* @__PURE__ */ m("tbody", {
365
366
  className: "divide-y divide-border-seam",
366
367
  children: e.allocations.map((e) => {
367
368
  let t = e.utilizationRate ?? (e.allocatedHours > 0 ? Math.round(e.actualHours / e.allocatedHours * 100) : 0), n = t > 100 ? "danger" : t < 70 ? "warning" : "success", r = n === "danger" ? "text-status-error-text" : n === "warning" ? "text-status-warning-text" : "text-status-success-text";
368
- return /* @__PURE__ */ p("tr", {
369
+ return /* @__PURE__ */ h("tr", {
369
370
  className: "transition-colors hover:bg-bg-sunken/50",
370
371
  children: [
371
- /* @__PURE__ */ f("td", {
372
+ /* @__PURE__ */ m("td", {
372
373
  className: "whitespace-nowrap px-5 py-3",
373
- children: /* @__PURE__ */ p("div", {
374
+ children: /* @__PURE__ */ h("div", {
374
375
  className: "flex items-center gap-3",
375
- children: [/* @__PURE__ */ f("div", {
376
+ children: [/* @__PURE__ */ m("div", {
376
377
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-sm font-medium text-primary",
377
378
  children: te(e.userId)
378
- }), /* @__PURE__ */ f("span", {
379
+ }), /* @__PURE__ */ m("span", {
379
380
  className: "font-medium text-text-primary",
380
381
  children: e.userId
381
382
  })]
382
383
  })
383
384
  }),
384
- /* @__PURE__ */ p("td", {
385
+ /* @__PURE__ */ h("td", {
385
386
  className: "whitespace-nowrap px-4 py-3 text-text-secondary",
386
387
  children: [
387
388
  e.startDate.slice(0, 10),
@@ -390,45 +391,45 @@ function b() {
390
391
  e.endDate.slice(0, 10)
391
392
  ]
392
393
  }),
393
- /* @__PURE__ */ f("td", {
394
+ /* @__PURE__ */ m("td", {
394
395
  className: "whitespace-nowrap px-4 py-3 text-end font-medium text-text-primary",
395
396
  children: a(e.allocatedHours)
396
397
  }),
397
- /* @__PURE__ */ f("td", {
398
+ /* @__PURE__ */ m("td", {
398
399
  className: "whitespace-nowrap px-4 py-3 text-end text-text-secondary",
399
400
  children: a(e.actualHours)
400
401
  }),
401
- /* @__PURE__ */ f("td", {
402
+ /* @__PURE__ */ m("td", {
402
403
  className: "px-4 py-3",
403
- children: /* @__PURE__ */ p("div", {
404
+ children: /* @__PURE__ */ h("div", {
404
405
  className: "flex w-40 items-center gap-2",
405
- children: [/* @__PURE__ */ f(s, {
406
+ children: [/* @__PURE__ */ m(ie, {
406
407
  size: "sm",
407
408
  value: t,
408
409
  max: 100,
409
410
  tone: n,
410
411
  showValue: !1,
411
412
  className: "flex-1"
412
- }), /* @__PURE__ */ p("span", {
413
+ }), /* @__PURE__ */ h("span", {
413
414
  className: `shrink-0 text-xs font-medium tabular-nums ${r}`,
414
415
  children: [t, "%"]
415
416
  })]
416
417
  })
417
418
  }),
418
- /* @__PURE__ */ f("td", {
419
+ /* @__PURE__ */ m("td", {
419
420
  className: "whitespace-nowrap px-5 py-3",
420
- children: /* @__PURE__ */ p("div", {
421
+ children: /* @__PURE__ */ h("div", {
421
422
  className: "flex items-center justify-end gap-1",
422
- children: [/* @__PURE__ */ f("button", {
423
- onClick: () => Ze(e),
423
+ children: [/* @__PURE__ */ m("button", {
424
+ onClick: () => $e(e),
424
425
  "aria-label": "Edit allocation",
425
426
  className: "rounded-md border border-border-subtle p-1.5 text-text-primary hover:bg-bg-sunken/50",
426
- children: /* @__PURE__ */ f(l, { className: "h-4 w-4" })
427
- }), /* @__PURE__ */ f("button", {
428
- onClick: () => K(e),
427
+ children: /* @__PURE__ */ m(l, { className: "h-4 w-4" })
428
+ }), /* @__PURE__ */ m("button", {
429
+ onClick: () => q(e),
429
430
  "aria-label": "Delete allocation",
430
- className: "rounded-md border border-border-subtle p-1.5 text-status-error-text hover:bg-status-error-bg",
431
- children: /* @__PURE__ */ f(he, { className: "h-4 w-4" })
431
+ className: "rounded-md border border-border-subtle p-1.5 text-status-error-text hover:bg-status-error-bgSubtle",
432
+ children: /* @__PURE__ */ m(d, { className: "h-4 w-4" })
432
433
  })]
433
434
  })
434
435
  })
@@ -438,116 +439,114 @@ function b() {
438
439
  })]
439
440
  })
440
441
  })]
441
- }, e.id)), Ve && /* @__PURE__ */ f("div", {
442
+ }, e.id)), Ue && /* @__PURE__ */ m("div", {
442
443
  className: "flex justify-center",
443
- children: /* @__PURE__ */ f("button", {
444
- onClick: et,
445
- disabled: q,
444
+ children: /* @__PURE__ */ m("button", {
445
+ onClick: nt,
446
+ disabled: Ve,
446
447
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50",
447
- children: q ? "Loading..." : "Load more"
448
+ children: Ve ? "Loading..." : "Load more"
448
449
  })
449
450
  })]
450
451
  })
451
452
  ]
452
453
  }),
453
- /* @__PURE__ */ p(i, {
454
+ /* @__PURE__ */ h(i, {
454
455
  open: ze,
455
- onClose: () => k(!1),
456
- title: A ? "Edit Resource Plan" : "New Resource Plan",
456
+ onClose: () => A(!1),
457
+ title: j ? "Edit Resource Plan" : "New Resource Plan",
457
458
  description: "Set the window this plan covers, then allocate people to it.",
458
459
  size: "lg",
459
- footer: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("button", {
460
- onClick: () => k(!1),
460
+ footer: /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("button", {
461
+ onClick: () => A(!1),
461
462
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
462
463
  children: "Cancel"
463
- }), /* @__PURE__ */ f("button", {
464
- onClick: We,
465
- disabled: S || C || !M.name.trim(),
464
+ }), /* @__PURE__ */ m("button", {
465
+ onClick: Ke,
466
+ disabled: C || w || !N.name.trim(),
466
467
  className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
467
- children: S || C ? "Saving..." : A ? "Save Changes" : "Create Plan"
468
+ children: C || w ? "Saving..." : j ? "Save Changes" : "Create Plan"
468
469
  })] }),
469
- children: [(Ae || Me) && /* @__PURE__ */ f("div", {
470
- className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
470
+ children: [(Ae || Me) && /* @__PURE__ */ m("div", {
471
+ className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bgSubtle p-3 text-sm text-status-error-text",
471
472
  children: "Failed to save resource plan. Please try again."
472
- }), /* @__PURE__ */ p("div", {
473
+ }), /* @__PURE__ */ h("div", {
473
474
  className: "space-y-4",
474
475
  children: [
475
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
476
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
476
477
  className: "block text-sm font-medium text-text-primary",
477
478
  children: "Plan Name"
478
- }), /* @__PURE__ */ f("input", {
479
+ }), /* @__PURE__ */ m("input", {
479
480
  type: "text",
480
481
  placeholder: "e.g. Q3 Delivery",
481
- value: M.name,
482
- onChange: (e) => N({
483
- ...M,
482
+ value: N.name,
483
+ onChange: (e) => P({
484
+ ...N,
484
485
  name: e.target.value
485
486
  }),
486
- className: h
487
+ className: g
487
488
  })] }),
488
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
489
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
489
490
  className: "block text-sm font-medium text-text-primary",
490
491
  children: "Description (optional)"
491
- }), /* @__PURE__ */ f("textarea", {
492
+ }), /* @__PURE__ */ m("textarea", {
492
493
  rows: 2,
493
494
  placeholder: "What this plan covers",
494
- value: M.description,
495
- onChange: (e) => N({
496
- ...M,
495
+ value: N.description,
496
+ onChange: (e) => P({
497
+ ...N,
497
498
  description: e.target.value
498
499
  }),
499
- className: h
500
+ className: g
500
501
  })] }),
501
- /* @__PURE__ */ p("div", {
502
+ /* @__PURE__ */ h("div", {
502
503
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
503
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
504
+ children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
504
505
  className: "block text-sm font-medium text-text-primary",
505
506
  children: "Start Date"
506
- }), /* @__PURE__ */ f("input", {
507
- type: "date",
508
- value: M.startDate,
509
- onChange: (e) => N({
510
- ...M,
511
- startDate: e.target.value
507
+ }), /* @__PURE__ */ m(s, {
508
+ value: N.startDate,
509
+ onChange: (e) => P({
510
+ ...N,
511
+ startDate: e
512
512
  }),
513
- className: h
514
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
513
+ label: "Start date"
514
+ })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
515
515
  className: "block text-sm font-medium text-text-primary",
516
516
  children: "End Date"
517
- }), /* @__PURE__ */ f("input", {
518
- type: "date",
519
- value: M.endDate,
520
- onChange: (e) => N({
521
- ...M,
522
- endDate: e.target.value
517
+ }), /* @__PURE__ */ m(s, {
518
+ value: N.endDate,
519
+ onChange: (e) => P({
520
+ ...N,
521
+ endDate: e
523
522
  }),
524
- className: h
523
+ label: "End date"
525
524
  })] })]
526
525
  }),
527
- A && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
526
+ j && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
528
527
  className: "block text-sm font-medium text-text-primary",
529
528
  children: "Status"
530
- }), /* @__PURE__ */ p(be, {
531
- value: M.status,
532
- onChange: (e) => N({
533
- ...M,
529
+ }), /* @__PURE__ */ h(ye, {
530
+ value: N.status,
531
+ onChange: (e) => P({
532
+ ...N,
534
533
  status: e.target.value
535
534
  }),
536
- className: h,
535
+ className: g,
537
536
  children: [
538
- /* @__PURE__ */ f("option", {
537
+ /* @__PURE__ */ m("option", {
539
538
  value: "active",
540
539
  children: "Active"
541
540
  }),
542
- /* @__PURE__ */ f("option", {
541
+ /* @__PURE__ */ m("option", {
543
542
  value: "draft",
544
543
  children: "Draft"
545
544
  }),
546
- /* @__PURE__ */ f("option", {
545
+ /* @__PURE__ */ m("option", {
547
546
  value: "completed",
548
547
  children: "Completed"
549
548
  }),
550
- /* @__PURE__ */ f("option", {
549
+ /* @__PURE__ */ m("option", {
551
550
  value: "archived",
552
551
  children: "Archived"
553
552
  })
@@ -556,257 +555,253 @@ function b() {
556
555
  ]
557
556
  })]
558
557
  }),
559
- /* @__PURE__ */ p(i, {
560
- open: I !== null,
561
- onClose: () => L(null),
558
+ /* @__PURE__ */ h(i, {
559
+ open: L !== null,
560
+ onClose: () => R(null),
562
561
  title: "Add Allocation",
563
- description: I ? `Assign team members to "${I.name}".` : void 0,
562
+ description: L ? `Assign team members to "${L.name}".` : void 0,
564
563
  size: "xl",
565
- footer: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("button", {
566
- onClick: () => L(null),
564
+ footer: /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("button", {
565
+ onClick: () => R(null),
567
566
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
568
567
  children: "Cancel"
569
- }), /* @__PURE__ */ f("button", {
570
- onClick: Xe,
571
- disabled: T || E || !Ye,
568
+ }), /* @__PURE__ */ m("button", {
569
+ onClick: Qe,
570
+ disabled: E || D || !Ze,
572
571
  className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
573
- children: T || E ? "Saving..." : R.length > 1 ? `Add ${R.length} Allocations` : "Add Allocation"
572
+ children: E || D ? "Saving..." : z.length > 1 ? `Add ${z.length} Allocations` : "Add Allocation"
574
573
  })] }),
575
- children: [Be && /* @__PURE__ */ f("div", {
576
- className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
574
+ children: [Be && /* @__PURE__ */ m("div", {
575
+ className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bgSubtle p-3 text-sm text-status-error-text",
577
576
  children: "Failed to add allocations. Please check the values and try again."
578
- }), /* @__PURE__ */ p("div", {
577
+ }), /* @__PURE__ */ h("div", {
579
578
  className: "space-y-4",
580
- children: [R.map((e, t) => /* @__PURE__ */ p("div", {
579
+ children: [z.map((e, t) => /* @__PURE__ */ h("div", {
581
580
  className: "rounded-lg border border-border-subtle p-3",
582
- children: [/* @__PURE__ */ p("div", {
581
+ children: [/* @__PURE__ */ h("div", {
583
582
  className: "mb-2 flex items-center justify-between",
584
- children: [/* @__PURE__ */ p("span", {
583
+ children: [/* @__PURE__ */ h("span", {
585
584
  className: "text-xs font-medium text-text-secondary",
586
585
  children: ["Allocation ", t + 1]
587
- }), R.length > 1 && /* @__PURE__ */ f("button", {
588
- onClick: () => Je(t),
586
+ }), z.length > 1 && /* @__PURE__ */ m("button", {
587
+ onClick: () => Xe(t),
589
588
  className: "text-xs font-medium text-status-error-text hover:underline",
590
589
  children: "Remove"
591
590
  })]
592
- }), /* @__PURE__ */ p("div", {
591
+ }), /* @__PURE__ */ h("div", {
593
592
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
594
593
  children: [
595
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
594
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
596
595
  className: "block text-xs font-medium text-text-primary",
597
596
  children: "User ID"
598
- }), /* @__PURE__ */ f("input", {
597
+ }), /* @__PURE__ */ m("input", {
599
598
  type: "text",
600
599
  placeholder: "User identifier",
601
600
  value: e.userId,
602
- onChange: (e) => Q(t, { userId: e.target.value }),
603
- className: h
601
+ onChange: (e) => Z(t, { userId: e.target.value }),
602
+ className: g
604
603
  })] }),
605
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
604
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
606
605
  className: "block text-xs font-medium text-text-primary",
607
606
  children: "Allocated Hours"
608
- }), /* @__PURE__ */ f("input", {
607
+ }), /* @__PURE__ */ m("input", {
609
608
  type: "number",
610
609
  placeholder: "0",
611
610
  value: e.allocatedHours,
612
- onChange: (e) => Q(t, { allocatedHours: e.target.value }),
613
- className: h
611
+ onChange: (e) => Z(t, { allocatedHours: e.target.value }),
612
+ className: g
614
613
  })] }),
615
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
614
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
616
615
  className: "block text-xs font-medium text-text-primary",
617
616
  children: "Start Date"
618
- }), /* @__PURE__ */ f("input", {
619
- type: "date",
617
+ }), /* @__PURE__ */ m(s, {
620
618
  value: e.startDate,
621
- onChange: (e) => Q(t, { startDate: e.target.value }),
622
- className: h
619
+ onChange: (e) => Z(t, { startDate: e }),
620
+ label: "Start date"
623
621
  })] }),
624
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
622
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
625
623
  className: "block text-xs font-medium text-text-primary",
626
624
  children: "End Date"
627
- }), /* @__PURE__ */ f("input", {
628
- type: "date",
625
+ }), /* @__PURE__ */ m(s, {
629
626
  value: e.endDate,
630
- onChange: (e) => Q(t, { endDate: e.target.value }),
631
- className: h
627
+ onChange: (e) => Z(t, { endDate: e }),
628
+ label: "End date"
632
629
  })] }),
633
- /* @__PURE__ */ p("div", {
630
+ /* @__PURE__ */ h("div", {
634
631
  className: "sm:col-span-2",
635
- children: [/* @__PURE__ */ f("label", {
632
+ children: [/* @__PURE__ */ m("label", {
636
633
  className: "block text-xs font-medium text-text-primary",
637
634
  children: "Notes (optional)"
638
- }), /* @__PURE__ */ f("input", {
635
+ }), /* @__PURE__ */ m("input", {
639
636
  type: "text",
640
637
  placeholder: "Context for this allocation",
641
638
  value: e.notes,
642
- onChange: (e) => Q(t, { notes: e.target.value }),
643
- className: h
639
+ onChange: (e) => Z(t, { notes: e.target.value }),
640
+ className: g
644
641
  })]
645
642
  })
646
643
  ]
647
644
  })]
648
- }, t)), /* @__PURE__ */ p("button", {
649
- onClick: qe,
645
+ }, t)), /* @__PURE__ */ h("button", {
646
+ onClick: Ye,
650
647
  className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
651
- children: [/* @__PURE__ */ f(u, { className: "h-4 w-4" }), "Add another person"]
648
+ children: [/* @__PURE__ */ m(u, { className: "h-4 w-4" }), "Add another person"]
652
649
  })]
653
650
  })]
654
651
  }),
655
- /* @__PURE__ */ p(i, {
656
- open: V !== null && U !== null,
652
+ /* @__PURE__ */ h(i, {
653
+ open: H !== null && W !== null,
657
654
  onClose: () => {
658
- H(null), W(null);
655
+ U(null), G(null);
659
656
  },
660
657
  title: "Edit Allocation",
661
658
  size: "lg",
662
- footer: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("button", {
659
+ footer: /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("button", {
663
660
  onClick: () => {
664
- H(null), W(null);
661
+ U(null), G(null);
665
662
  },
666
663
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
667
664
  children: "Cancel"
668
- }), /* @__PURE__ */ f("button", {
669
- onClick: Qe,
670
- disabled: D,
665
+ }), /* @__PURE__ */ m("button", {
666
+ onClick: et,
667
+ disabled: O,
671
668
  className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
672
- children: D ? "Saving..." : "Save Changes"
669
+ children: O ? "Saving..." : "Save Changes"
673
670
  })] }),
674
- children: [Le && /* @__PURE__ */ f("div", {
675
- className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
671
+ children: [Le && /* @__PURE__ */ m("div", {
672
+ className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bgSubtle p-3 text-sm text-status-error-text",
676
673
  children: "Failed to update allocation. Please try again."
677
- }), U && /* @__PURE__ */ p("div", {
674
+ }), W && /* @__PURE__ */ h("div", {
678
675
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
679
676
  children: [
680
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
677
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
681
678
  className: "block text-sm font-medium text-text-primary",
682
679
  children: "User ID"
683
- }), /* @__PURE__ */ f("input", {
680
+ }), /* @__PURE__ */ m("input", {
684
681
  type: "text",
685
- value: U.userId,
686
- onChange: (e) => W({
687
- ...U,
682
+ value: W.userId,
683
+ onChange: (e) => G({
684
+ ...W,
688
685
  userId: e.target.value
689
686
  }),
690
- className: h
687
+ className: g
691
688
  })] }),
692
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
689
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
693
690
  className: "block text-sm font-medium text-text-primary",
694
691
  children: "Allocated Hours"
695
- }), /* @__PURE__ */ f("input", {
692
+ }), /* @__PURE__ */ m("input", {
696
693
  type: "number",
697
- value: U.allocatedHours,
698
- onChange: (e) => W({
699
- ...U,
694
+ value: W.allocatedHours,
695
+ onChange: (e) => G({
696
+ ...W,
700
697
  allocatedHours: e.target.value
701
698
  }),
702
- className: h
699
+ className: g
703
700
  })] }),
704
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
701
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
705
702
  className: "block text-sm font-medium text-text-primary",
706
703
  children: "Actual Hours"
707
- }), /* @__PURE__ */ f("input", {
704
+ }), /* @__PURE__ */ m("input", {
708
705
  type: "number",
709
- value: U.actualHours,
710
- onChange: (e) => W({
711
- ...U,
706
+ value: W.actualHours,
707
+ onChange: (e) => G({
708
+ ...W,
712
709
  actualHours: e.target.value
713
710
  }),
714
- className: h
711
+ className: g
715
712
  })] }),
716
- /* @__PURE__ */ f("div", {}),
717
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
713
+ /* @__PURE__ */ m("div", {}),
714
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
718
715
  className: "block text-sm font-medium text-text-primary",
719
716
  children: "Start Date"
720
- }), /* @__PURE__ */ f("input", {
721
- type: "date",
722
- value: U.startDate,
723
- onChange: (e) => W({
724
- ...U,
725
- startDate: e.target.value
717
+ }), /* @__PURE__ */ m(s, {
718
+ value: W.startDate,
719
+ onChange: (e) => G({
720
+ ...W,
721
+ startDate: e
726
722
  }),
727
- className: h
723
+ label: "Start date"
728
724
  })] }),
729
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
725
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
730
726
  className: "block text-sm font-medium text-text-primary",
731
727
  children: "End Date"
732
- }), /* @__PURE__ */ f("input", {
733
- type: "date",
734
- value: U.endDate,
735
- onChange: (e) => W({
736
- ...U,
737
- endDate: e.target.value
728
+ }), /* @__PURE__ */ m(s, {
729
+ value: W.endDate,
730
+ onChange: (e) => G({
731
+ ...W,
732
+ endDate: e
738
733
  }),
739
- className: h
734
+ label: "End date"
740
735
  })] }),
741
- /* @__PURE__ */ p("div", {
736
+ /* @__PURE__ */ h("div", {
742
737
  className: "sm:col-span-2",
743
- children: [/* @__PURE__ */ f("label", {
738
+ children: [/* @__PURE__ */ m("label", {
744
739
  className: "block text-sm font-medium text-text-primary",
745
740
  children: "Notes (optional)"
746
- }), /* @__PURE__ */ f("input", {
741
+ }), /* @__PURE__ */ m("input", {
747
742
  type: "text",
748
- value: U.notes,
749
- onChange: (e) => W({
750
- ...U,
743
+ value: W.notes,
744
+ onChange: (e) => G({
745
+ ...W,
751
746
  notes: e.target.value
752
747
  }),
753
- className: h
748
+ className: g
754
749
  })]
755
750
  })
756
751
  ]
757
752
  })]
758
753
  }),
759
- /* @__PURE__ */ f(i, {
760
- open: P !== null,
761
- onClose: () => F(null),
754
+ /* @__PURE__ */ m(i, {
755
+ open: F !== null,
756
+ onClose: () => I(null),
762
757
  title: "Delete Resource Plan",
763
758
  description: "This action cannot be undone.",
764
- footer: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("button", {
765
- onClick: () => F(null),
759
+ footer: /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("button", {
760
+ onClick: () => I(null),
766
761
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
767
762
  children: "Cancel"
768
- }), /* @__PURE__ */ f("button", {
769
- onClick: Ge,
770
- disabled: w,
771
- className: "rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50",
772
- children: w ? "Deleting..." : "Delete"
763
+ }), /* @__PURE__ */ m("button", {
764
+ onClick: qe,
765
+ disabled: T,
766
+ className: "rounded-md bg-status-error-bgSubtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bgSubtle/70 disabled:opacity-50",
767
+ children: T ? "Deleting..." : "Delete"
773
768
  })] }),
774
- children: /* @__PURE__ */ p("p", {
769
+ children: /* @__PURE__ */ h("p", {
775
770
  className: "text-sm text-text-secondary",
776
771
  children: [
777
772
  "Are you sure you want to delete",
778
773
  " ",
779
- /* @__PURE__ */ f("span", {
774
+ /* @__PURE__ */ m("span", {
780
775
  className: "font-medium text-text-primary",
781
- children: P?.name
776
+ children: F?.name
782
777
  }),
783
778
  "? All its allocations will be removed."
784
779
  ]
785
780
  })
786
781
  }),
787
- /* @__PURE__ */ f(i, {
788
- open: G !== null,
789
- onClose: () => K(null),
782
+ /* @__PURE__ */ m(i, {
783
+ open: K !== null,
784
+ onClose: () => q(null),
790
785
  title: "Delete Allocation",
791
786
  description: "This action cannot be undone.",
792
- footer: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("button", {
793
- onClick: () => K(null),
787
+ footer: /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("button", {
788
+ onClick: () => q(null),
794
789
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
795
790
  children: "Cancel"
796
- }), /* @__PURE__ */ f("button", {
797
- onClick: $e,
798
- disabled: O,
799
- className: "rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50",
800
- children: O ? "Deleting..." : "Delete"
791
+ }), /* @__PURE__ */ m("button", {
792
+ onClick: tt,
793
+ disabled: k,
794
+ className: "rounded-md bg-status-error-bgSubtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bgSubtle/70 disabled:opacity-50",
795
+ children: k ? "Deleting..." : "Delete"
801
796
  })] }),
802
- children: /* @__PURE__ */ p("p", {
797
+ children: /* @__PURE__ */ h("p", {
803
798
  className: "text-sm text-text-secondary",
804
799
  children: [
805
800
  "Remove the allocation for",
806
801
  " ",
807
- /* @__PURE__ */ f("span", {
802
+ /* @__PURE__ */ m("span", {
808
803
  className: "font-medium text-text-primary",
809
- children: G?.userId
804
+ children: K?.userId
810
805
  }),
811
806
  "?"
812
807
  ]
@@ -815,6 +810,6 @@ function b() {
815
810
  ]
816
811
  });
817
812
  }
818
- export { b as ResourcePlanningPage };
813
+ export { x as ResourcePlanningPage };
819
814
 
820
815
  //# sourceMappingURL=ResourcePlanningPage.js.map