@burdenoff/microfe-timecampus 2026.1031.9 → 2026.1031.11

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 (80) hide show
  1. package/dist/generated/wspace-operations.d.ts +45 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +710 -672
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +731 -0
  6. package/dist/generated/wspace-types.d.ts.map +1 -1
  7. package/dist/generated/wspace-types.js +14 -12
  8. package/dist/generated/wspace-types.js.map +1 -1
  9. package/dist/index.js +7 -7
  10. package/dist/timecampus/analytics/index.d.ts +3 -0
  11. package/dist/timecampus/analytics/index.d.ts.map +1 -0
  12. package/dist/timecampus/analytics/index.js +3 -0
  13. package/dist/timecampus/analytics/timecampusAnalytics.d.ts +83 -0
  14. package/dist/timecampus/analytics/timecampusAnalytics.d.ts.map +1 -0
  15. package/dist/timecampus/analytics/timecampusAnalytics.js +175 -0
  16. package/dist/timecampus/analytics/timecampusAnalytics.js.map +1 -0
  17. package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts +16 -0
  18. package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts.map +1 -0
  19. package/dist/timecampus/analytics/useTimeCampusAnalytics.js +48 -0
  20. package/dist/timecampus/analytics/useTimeCampusAnalytics.js.map +1 -0
  21. package/dist/timecampus/components/ActivationCard.d.ts +3 -0
  22. package/dist/timecampus/components/ActivationCard.d.ts.map +1 -0
  23. package/dist/timecampus/components/ActivationCard.js +156 -0
  24. package/dist/timecampus/components/ActivationCard.js.map +1 -0
  25. package/dist/timecampus/index.js +7 -7
  26. package/dist/timecampus/pages/HomePage.d.ts.map +1 -1
  27. package/dist/timecampus/pages/HomePage.js +142 -139
  28. package/dist/timecampus/pages/HomePage.js.map +1 -1
  29. package/dist/timecampus/pages/client-portal/ClientPortalPage.d.ts.map +1 -1
  30. package/dist/timecampus/pages/client-portal/ClientPortalPage.js +244 -228
  31. package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
  32. package/dist/timecampus/pages/dashboard/AnalyticsPage.d.ts.map +1 -1
  33. package/dist/timecampus/pages/dashboard/AnalyticsPage.js +117 -112
  34. package/dist/timecampus/pages/dashboard/AnalyticsPage.js.map +1 -1
  35. package/dist/timecampus/pages/dashboard/ReportsPage.d.ts.map +1 -1
  36. package/dist/timecampus/pages/dashboard/ReportsPage.js +105 -102
  37. package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
  38. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.d.ts.map +1 -1
  39. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +209 -192
  40. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  41. package/dist/timecampus/pages/focus-score/FocusScorePage.d.ts.map +1 -1
  42. package/dist/timecampus/pages/focus-score/FocusScorePage.js +71 -68
  43. package/dist/timecampus/pages/focus-score/FocusScorePage.js.map +1 -1
  44. package/dist/timecampus/pages/invoicing/InvoicingPage.d.ts.map +1 -1
  45. package/dist/timecampus/pages/invoicing/InvoicingPage.js +157 -150
  46. package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
  47. package/dist/timecampus/pages/meetings/MeetingCreatePage.d.ts.map +1 -1
  48. package/dist/timecampus/pages/meetings/MeetingCreatePage.js +58 -52
  49. package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
  50. package/dist/timecampus/pages/meetings/MeetingsPage.d.ts.map +1 -1
  51. package/dist/timecampus/pages/meetings/MeetingsPage.js +51 -45
  52. package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
  53. package/dist/timecampus/pages/pomodoro/PomodoroPage.d.ts.map +1 -1
  54. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +55 -51
  55. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  56. package/dist/timecampus/pages/projects/ProjectCreatePage.d.ts.map +1 -1
  57. package/dist/timecampus/pages/projects/ProjectCreatePage.js +59 -49
  58. package/dist/timecampus/pages/projects/ProjectCreatePage.js.map +1 -1
  59. package/dist/timecampus/pages/projects/ProjectsPage.d.ts.map +1 -1
  60. package/dist/timecampus/pages/projects/ProjectsPage.js +165 -155
  61. package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
  62. package/dist/timecampus/pages/time/TimeEntriesPage.d.ts.map +1 -1
  63. package/dist/timecampus/pages/time/TimeEntriesPage.js +194 -186
  64. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  65. package/dist/timecampus/pages/time/TimeTrackingPage.d.ts.map +1 -1
  66. package/dist/timecampus/pages/time/TimeTrackingPage.js +139 -126
  67. package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
  68. package/dist/timecampus/pages/time/TimerPage.d.ts.map +1 -1
  69. package/dist/timecampus/pages/time/TimerPage.js +48 -35
  70. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  71. package/dist/timecampus/pages/time-approval/TimeApprovalPage.d.ts.map +1 -1
  72. package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +60 -50
  73. package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
  74. package/dist/timecampus/pages/timeline/TimelinePage.d.ts.map +1 -1
  75. package/dist/timecampus/pages/timeline/TimelinePage.js +223 -219
  76. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  77. package/dist/timecampus/pages/work-patterns/WorkPatternsPage.d.ts.map +1 -1
  78. package/dist/timecampus/pages/work-patterns/WorkPatternsPage.js +1 -5
  79. package/dist/timecampus/pages/work-patterns/WorkPatternsPage.js.map +1 -1
  80. package/package.json +1 -1
@@ -1,27 +1,29 @@
1
1
  import { formatDate as e, formatHours as t, getInitials as n } from "../../utils/helpers.js";
2
2
  import { LoadingSkeleton as r } from "../../components/LoadingSkeleton.js";
3
3
  import { EmptyState as i } from "../../components/EmptyState.js";
4
- import { useCreateTimeEntryMutation as a, useDeleteTimeEntryMutation as o, useDuplicateTimeEntryMutation as s, useListProjectsQuery as ee, useListTimeEntriesQuery as te, useUpdateTimeEntryMutation as ne } from "../../../generated/wspace-operations.js";
5
- import { PageLayout as c } from "../../components/PageLayout.js";
6
- import { StatusBadge as l } from "../../components/StatusBadge.js";
7
- import { Modal as u } from "../../components/Modal.js";
8
- import { useMemo as re, useState as d } from "react";
9
- import { Copy as ie, Download as ae, Filter as oe, Pencil as f, Plus as p, Trash2 as se } from "lucide-react";
10
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
11
- import { GlassCard as ce } from "@burdenoff/fe-libs/ui";
4
+ import { useCreateTimeEntryMutation as a, useDeleteTimeEntryMutation as o, useDuplicateTimeEntryMutation as s, useListProjectsQuery as ee, useListTimeEntriesQuery as c, useUpdateTimeEntryMutation as te } from "../../../generated/wspace-operations.js";
5
+ import { useTimeCampusAnalytics as ne } from "../../analytics/useTimeCampusAnalytics.js";
6
+ import "../../analytics/index.js";
7
+ import { PageLayout as l } from "../../components/PageLayout.js";
8
+ import { StatusBadge as u } from "../../components/StatusBadge.js";
9
+ import { Modal as d } from "../../components/Modal.js";
10
+ import { useMemo as re, useState as f } from "react";
11
+ import { Copy as ie, Download as ae, Filter as p, Pencil as m, Plus as h, Trash2 as oe } from "lucide-react";
12
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
13
+ import { GlassCard as se } from "@burdenoff/fe-libs/ui";
12
14
  //#region src/timecampus/pages/time/TimeEntriesPage.tsx
13
- var _ = 50;
14
- function v(e) {
15
+ var y = 50;
16
+ function b(e) {
15
17
  if (!e) return "";
16
18
  let t = new Date(e);
17
19
  return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
18
20
  }
19
- function y(e) {
21
+ function x(e) {
20
22
  if (!e) return;
21
23
  let t = new Date(e);
22
24
  if (!Number.isNaN(t.getTime())) return t.toISOString();
23
25
  }
24
- function b() {
26
+ function S() {
25
27
  let e = /* @__PURE__ */ new Date();
26
28
  return {
27
29
  description: "",
@@ -31,58 +33,58 @@ function b() {
31
33
  billable: !1
32
34
  };
33
35
  }
34
- function x({ form: e, onChange: t, projects: n }) {
35
- return /* @__PURE__ */ g("div", {
36
+ function C({ form: e, onChange: t, projects: n }) {
37
+ return /* @__PURE__ */ v("div", {
36
38
  className: "space-y-4",
37
39
  children: [
38
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
40
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
39
41
  className: "block text-sm font-medium text-text-primary",
40
42
  children: "Description"
41
- }), /* @__PURE__ */ h("input", {
43
+ }), /* @__PURE__ */ _("input", {
42
44
  type: "text",
43
45
  placeholder: "What did you work on?",
44
46
  value: e.description,
45
47
  onChange: (e) => t({ description: e.target.value }),
46
48
  className: "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"
47
49
  })] }),
48
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
50
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
49
51
  className: "block text-sm font-medium text-text-primary",
50
52
  children: "Project"
51
- }), /* @__PURE__ */ g("select", {
53
+ }), /* @__PURE__ */ v("select", {
52
54
  value: e.projectId,
53
55
  onChange: (e) => t({ projectId: e.target.value }),
54
56
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
55
- children: [/* @__PURE__ */ h("option", {
57
+ children: [/* @__PURE__ */ _("option", {
56
58
  value: "",
57
59
  children: "No Project"
58
- }), n.map((e) => /* @__PURE__ */ h("option", {
60
+ }), n.map((e) => /* @__PURE__ */ _("option", {
59
61
  value: e.id,
60
62
  children: e.name
61
63
  }, e.id))]
62
64
  })] }),
63
- /* @__PURE__ */ g("div", {
65
+ /* @__PURE__ */ v("div", {
64
66
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
65
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
67
+ children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
66
68
  className: "block text-sm font-medium text-text-primary",
67
69
  children: "Start"
68
- }), /* @__PURE__ */ h("input", {
70
+ }), /* @__PURE__ */ _("input", {
69
71
  type: "datetime-local",
70
72
  value: e.startTime,
71
73
  onChange: (e) => t({ startTime: e.target.value }),
72
74
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
73
- })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
75
+ })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
74
76
  className: "block text-sm font-medium text-text-primary",
75
77
  children: "End"
76
- }), /* @__PURE__ */ h("input", {
78
+ }), /* @__PURE__ */ _("input", {
77
79
  type: "datetime-local",
78
80
  value: e.endTime,
79
81
  onChange: (e) => t({ endTime: e.target.value }),
80
82
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
81
83
  })] })]
82
84
  }),
83
- /* @__PURE__ */ g("label", {
85
+ /* @__PURE__ */ v("label", {
84
86
  className: "flex items-center gap-2 text-sm text-text-primary",
85
- children: [/* @__PURE__ */ h("input", {
87
+ children: [/* @__PURE__ */ _("input", {
86
88
  type: "checkbox",
87
89
  checked: e.billable,
88
90
  onChange: (e) => t({ billable: e.target.checked }),
@@ -92,23 +94,23 @@ function x({ form: e, onChange: t, projects: n }) {
92
94
  ]
93
95
  });
94
96
  }
95
- function S() {
96
- let [S, C] = d({}), [le, w] = d(!1), [T, E] = d("all"), [D, O] = d(""), [k, A] = d(""), [j, M] = d(!1), [N, P] = d(b), [F, I] = d(null), [L, R] = d(b), [z, B] = d(null), V = Object.keys(S).length > 0, { data: H, loading: U, error: ue, fetchMore: de, refetch: W } = te({
97
+ function w() {
98
+ let [w, T] = f({}), [ce, E] = f(!1), [D, O] = f("all"), [k, A] = f(""), [j, M] = f(""), [le, N] = f(!1), [P, F] = f(S), [I, L] = f(null), [R, z] = f(S), [B, V] = f(null), H = Object.keys(w).length > 0, { data: U, loading: ue, error: de, fetchMore: fe, refetch: W } = c({
97
99
  variables: {
98
100
  pagination: {
99
- limit: _,
101
+ limit: y,
100
102
  offset: 0
101
103
  },
102
- filter: V ? S : void 0
104
+ filter: H ? w : void 0
103
105
  },
104
106
  notifyOnNetworkStatusChange: !0
105
- }), { data: fe } = ee({ variables: { pagination: { limit: 100 } } }), G = fe?.projects?.items ?? [], K = re(() => H?.timeEntries?.items ?? [], [H?.timeEntries?.items]), pe = H?.timeEntries?.hasMore ?? !1, me = H?.timeEntries?.total ?? 0, [he, { loading: q, error: ge }] = a(), [_e, { loading: J, error: ve }] = ne(), [ye, { loading: Y }] = o(), [be, { loading: X }] = s(), [Z, Q] = d(!1), xe = async () => {
107
+ }), { data: G } = ee({ variables: { pagination: { limit: 100 } } }), K = G?.projects?.items ?? [], q = re(() => U?.timeEntries?.items ?? [], [U?.timeEntries?.items]), pe = U?.timeEntries?.hasMore ?? !1, me = U?.timeEntries?.total ?? 0, [he, { loading: J, error: ge }] = a(), _e = ne(), [ve, { loading: Y, error: ye }] = te(), [be, { loading: X }] = o(), [xe, { loading: Se }] = s(), [Z, Q] = f(!1), Ce = async () => {
106
108
  Q(!0);
107
109
  try {
108
- await de({
110
+ await fe({
109
111
  variables: { pagination: {
110
- limit: _,
111
- offset: K.length
112
+ limit: y,
113
+ offset: q.length
112
114
  } },
113
115
  updateQuery: (e, { fetchMoreResult: t }) => t ? {
114
116
  ...t,
@@ -122,67 +124,73 @@ function S() {
122
124
  Q(!1);
123
125
  }
124
126
  }, $ = () => {
125
- P(b()), M(!0);
126
- }, Se = async () => {
127
- let e = y(N.startTime);
128
- e && (await he({ variables: { input: {
129
- description: N.description.trim() || void 0,
130
- projectId: N.projectId || void 0,
127
+ F(S()), N(!0);
128
+ }, we = async () => {
129
+ let e = x(P.startTime);
130
+ if (!e) return;
131
+ let t = (await he({ variables: { input: {
132
+ description: P.description.trim() || void 0,
133
+ projectId: P.projectId || void 0,
131
134
  startTime: e,
132
- endTime: y(N.endTime),
133
- billable: N.billable,
135
+ endTime: x(P.endTime),
136
+ billable: P.billable,
134
137
  source: "manual"
135
- } } }), M(!1), await W());
136
- }, Ce = (e) => {
137
- I(e), R({
138
+ } } })).data?.createTimeEntry;
139
+ t && (_e.timeEntryCreated({
140
+ timeEntryId: t.id,
141
+ surface: "time_entries_page",
142
+ hasProject: !!t.projectId
143
+ }), N(!1), await W());
144
+ }, Te = (e) => {
145
+ L(e), z({
138
146
  description: e.description ?? "",
139
147
  projectId: e.projectId ?? "",
140
- startTime: v(e.startTime),
141
- endTime: v(e.endTime),
148
+ startTime: b(e.startTime),
149
+ endTime: b(e.endTime),
142
150
  billable: e.billable
143
151
  });
144
- }, we = async () => {
145
- if (!F) return;
146
- let e = y(L.startTime);
147
- e && (await _e({ variables: {
148
- id: F.id,
152
+ }, Ee = async () => {
153
+ if (!I) return;
154
+ let e = x(R.startTime);
155
+ e && (await ve({ variables: {
156
+ id: I.id,
149
157
  input: {
150
- description: L.description.trim() || void 0,
151
- projectId: L.projectId || void 0,
158
+ description: R.description.trim() || void 0,
159
+ projectId: R.projectId || void 0,
152
160
  startTime: e,
153
- endTime: y(L.endTime),
154
- billable: L.billable
161
+ endTime: x(R.endTime),
162
+ billable: R.billable
155
163
  }
156
- } }), I(null), await W());
157
- }, Te = async (e) => {
158
- await be({ variables: { id: e.id } }), await W();
164
+ } }), L(null), await W());
165
+ }, De = async (e) => {
166
+ await xe({ variables: { id: e.id } }), await W();
159
167
  };
160
- return ue ? /* @__PURE__ */ h(c, {
168
+ return de ? /* @__PURE__ */ _(l, {
161
169
  title: "Time Entries",
162
170
  description: "View and manage all time entries",
163
- children: /* @__PURE__ */ h("div", {
171
+ children: /* @__PURE__ */ _("div", {
164
172
  className: "rounded-xl border border-status-error-bg/40 bg-status-error-bg p-6 text-sm text-status-error-text",
165
173
  children: "Failed to load time entries. Please try again later."
166
174
  })
167
- }) : /* @__PURE__ */ g(c, {
175
+ }) : /* @__PURE__ */ v(l, {
168
176
  title: "Time Entries",
169
177
  description: "View and manage all time entries",
170
178
  purpose: "Every tracked block of work in one auditable list — filter, correct and confirm entries here before they roll into timesheets, approvals and client invoices.",
171
- actions: /* @__PURE__ */ g("div", {
179
+ actions: /* @__PURE__ */ v("div", {
172
180
  className: "flex items-center gap-2",
173
181
  children: [
174
- /* @__PURE__ */ g("button", {
182
+ /* @__PURE__ */ v("button", {
175
183
  onClick: () => {
176
- E(S.billable === void 0 ? "all" : S.billable ? "yes" : "no"), O(S.projectId ?? ""), A(S.search ?? ""), w(!0);
184
+ O(w.billable === void 0 ? "all" : w.billable ? "yes" : "no"), A(w.projectId ?? ""), M(w.search ?? ""), E(!0);
177
185
  },
178
- className: `inline-flex items-center gap-1.5 rounded-md border px-3 py-2 text-sm font-medium hover:bg-bg-sunken/50 ${V ? "border-action-primary-border text-primary" : "border-border-subtle text-text-primary"}`,
186
+ className: `inline-flex items-center gap-1.5 rounded-md border px-3 py-2 text-sm font-medium hover:bg-bg-sunken/50 ${H ? "border-action-primary-border text-primary" : "border-border-subtle text-text-primary"}`,
179
187
  children: [
180
- /* @__PURE__ */ h(oe, { className: "h-4 w-4" }),
188
+ /* @__PURE__ */ _(p, { className: "h-4 w-4" }),
181
189
  "Filter",
182
- V ? ` (${Object.keys(S).length})` : ""
190
+ H ? ` (${Object.keys(w).length})` : ""
183
191
  ]
184
192
  }),
185
- /* @__PURE__ */ g("button", {
193
+ /* @__PURE__ */ v("button", {
186
194
  onClick: () => {
187
195
  let t = [
188
196
  "Date",
@@ -191,7 +199,7 @@ function S() {
191
199
  "Duration (hours)",
192
200
  "Billable",
193
201
  "Status"
194
- ], n = K.map((t) => [
202
+ ], n = q.map((t) => [
195
203
  e(t.startTime),
196
204
  t.project?.name ?? "No Project",
197
205
  t.task?.title ?? t.description ?? "",
@@ -201,139 +209,139 @@ function S() {
201
209
  ]), r = (e) => `"${e.replace(/"/g, "\"\"")}"`, i = [t, ...n].map((e) => e.map((e) => r(String(e))).join(",")).join("\n"), a = new Blob([i], { type: "text/csv;charset=utf-8;" }), o = URL.createObjectURL(a), s = document.createElement("a");
202
210
  s.href = o, s.download = `time-entries-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
203
211
  },
204
- disabled: K.length === 0,
212
+ disabled: q.length === 0,
205
213
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50",
206
- children: [/* @__PURE__ */ h(ae, { className: "h-4 w-4" }), "Export"]
214
+ children: [/* @__PURE__ */ _(ae, { className: "h-4 w-4" }), "Export"]
207
215
  }),
208
- /* @__PURE__ */ g("button", {
216
+ /* @__PURE__ */ v("button", {
209
217
  onClick: $,
210
218
  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",
211
- children: [/* @__PURE__ */ h(p, { className: "h-4 w-4" }), "New Entry"]
219
+ children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), "New Entry"]
212
220
  })
213
221
  ]
214
222
  }),
215
223
  children: [
216
- U && K.length === 0 ? /* @__PURE__ */ h(r, {
224
+ ue && q.length === 0 ? /* @__PURE__ */ _(r, {
217
225
  variant: "table",
218
226
  count: 5
219
- }) : K.length === 0 ? /* @__PURE__ */ h(i, {
227
+ }) : q.length === 0 ? /* @__PURE__ */ _(i, {
220
228
  illustration: "empty-data",
221
229
  title: "No time entries found",
222
230
  description: "Track time with a timer or add a manual entry — your entries will appear here.",
223
- action: /* @__PURE__ */ g("button", {
231
+ action: /* @__PURE__ */ v("button", {
224
232
  onClick: $,
225
233
  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",
226
- children: [/* @__PURE__ */ h(p, { className: "h-4 w-4" }), "New Entry"]
234
+ children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), "New Entry"]
227
235
  })
228
- }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(ce, {
236
+ }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(se, {
229
237
  treatment: "glass",
230
238
  glow: !0,
231
239
  className: "overflow-hidden",
232
- children: /* @__PURE__ */ h("div", {
240
+ children: /* @__PURE__ */ _("div", {
233
241
  className: "overflow-x-auto",
234
- children: /* @__PURE__ */ g("table", {
242
+ children: /* @__PURE__ */ v("table", {
235
243
  className: "w-full",
236
- children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
244
+ children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ v("tr", {
237
245
  className: "border-b border-border-subtle",
238
246
  children: [
239
- /* @__PURE__ */ h("th", {
247
+ /* @__PURE__ */ _("th", {
240
248
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary",
241
249
  children: "Entry"
242
250
  }),
243
- /* @__PURE__ */ h("th", {
251
+ /* @__PURE__ */ _("th", {
244
252
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary",
245
253
  children: "Project"
246
254
  }),
247
- /* @__PURE__ */ h("th", {
255
+ /* @__PURE__ */ _("th", {
248
256
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary",
249
257
  children: "Duration"
250
258
  }),
251
- /* @__PURE__ */ h("th", {
259
+ /* @__PURE__ */ _("th", {
252
260
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary",
253
261
  children: "Billable"
254
262
  }),
255
- /* @__PURE__ */ h("th", {
263
+ /* @__PURE__ */ _("th", {
256
264
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary",
257
265
  children: "Status"
258
266
  }),
259
- /* @__PURE__ */ h("th", {
267
+ /* @__PURE__ */ _("th", {
260
268
  className: "px-4 py-3 text-right text-xs font-medium text-text-secondary",
261
269
  children: "Actions"
262
270
  })
263
271
  ]
264
- }) }), /* @__PURE__ */ h("tbody", {
272
+ }) }), /* @__PURE__ */ _("tbody", {
265
273
  className: "divide-y divide-border",
266
- children: K.map((r) => /* @__PURE__ */ g("tr", {
274
+ children: q.map((r) => /* @__PURE__ */ v("tr", {
267
275
  className: "hover:bg-bg-sunken/50 transition-colors",
268
276
  children: [
269
- /* @__PURE__ */ g("td", {
277
+ /* @__PURE__ */ v("td", {
270
278
  className: "px-4 py-3",
271
- children: [/* @__PURE__ */ h("p", {
279
+ children: [/* @__PURE__ */ _("p", {
272
280
  className: "text-sm font-medium text-text-primary",
273
281
  children: r.task?.title ?? r.description ?? "No description"
274
- }), /* @__PURE__ */ h("p", {
282
+ }), /* @__PURE__ */ _("p", {
275
283
  className: "text-xs text-text-secondary",
276
284
  children: e(r.startTime)
277
285
  })]
278
286
  }),
279
- /* @__PURE__ */ h("td", {
287
+ /* @__PURE__ */ _("td", {
280
288
  className: "px-4 py-3",
281
- children: /* @__PURE__ */ g("div", {
289
+ children: /* @__PURE__ */ v("div", {
282
290
  className: "flex items-center gap-2",
283
- children: [/* @__PURE__ */ h("span", {
291
+ children: [/* @__PURE__ */ _("span", {
284
292
  className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-action-primary-bg/10 text-xs font-semibold text-primary",
285
293
  children: n(r.project?.name ?? "No Project")
286
- }), /* @__PURE__ */ h("span", {
294
+ }), /* @__PURE__ */ _("span", {
287
295
  className: "text-sm font-medium text-text-primary",
288
296
  children: r.project?.name ?? "No Project"
289
297
  })]
290
298
  })
291
299
  }),
292
- /* @__PURE__ */ h("td", {
300
+ /* @__PURE__ */ _("td", {
293
301
  className: "px-4 py-3 text-sm font-mono text-text-primary",
294
302
  children: t((r.duration ?? 0) / 3600)
295
303
  }),
296
- /* @__PURE__ */ h("td", {
304
+ /* @__PURE__ */ _("td", {
297
305
  className: "px-4 py-3",
298
- children: /* @__PURE__ */ h(l, {
306
+ children: /* @__PURE__ */ _(u, {
299
307
  label: r.billable ? "Billable" : "Non-billable",
300
308
  variant: r.billable ? "success" : "muted"
301
309
  })
302
310
  }),
303
- /* @__PURE__ */ h("td", {
311
+ /* @__PURE__ */ _("td", {
304
312
  className: "px-4 py-3",
305
- children: /* @__PURE__ */ h(l, {
313
+ children: /* @__PURE__ */ _(u, {
306
314
  status: r.isRunning ? "running" : "completed",
307
315
  dot: r.isRunning,
308
316
  label: r.isRunning ? "running" : "completed"
309
317
  })
310
318
  }),
311
- /* @__PURE__ */ h("td", {
319
+ /* @__PURE__ */ _("td", {
312
320
  className: "px-4 py-3",
313
- children: /* @__PURE__ */ g("div", {
321
+ children: /* @__PURE__ */ v("div", {
314
322
  className: "flex items-center justify-end gap-1",
315
323
  children: [
316
- /* @__PURE__ */ h("button", {
317
- onClick: () => Ce(r),
324
+ /* @__PURE__ */ _("button", {
325
+ onClick: () => Te(r),
318
326
  title: "Edit entry",
319
327
  "aria-label": "Edit entry",
320
328
  className: "rounded-md p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
321
- children: /* @__PURE__ */ h(f, { className: "h-4 w-4" })
329
+ children: /* @__PURE__ */ _(m, { className: "h-4 w-4" })
322
330
  }),
323
- /* @__PURE__ */ h("button", {
324
- onClick: () => Te(r),
325
- disabled: X,
331
+ /* @__PURE__ */ _("button", {
332
+ onClick: () => De(r),
333
+ disabled: Se,
326
334
  title: "Duplicate entry",
327
335
  "aria-label": "Duplicate entry",
328
336
  className: "rounded-md p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary disabled:opacity-50",
329
- children: /* @__PURE__ */ h(ie, { className: "h-4 w-4" })
337
+ children: /* @__PURE__ */ _(ie, { className: "h-4 w-4" })
330
338
  }),
331
- /* @__PURE__ */ h("button", {
332
- onClick: () => B(r),
339
+ /* @__PURE__ */ _("button", {
340
+ onClick: () => V(r),
333
341
  title: "Delete entry",
334
342
  "aria-label": "Delete entry",
335
343
  className: "rounded-md p-1.5 text-status-error-text hover:bg-status-error-bg",
336
- children: /* @__PURE__ */ h(se, { className: "h-4 w-4" })
344
+ children: /* @__PURE__ */ _(oe, { className: "h-4 w-4" })
337
345
  })
338
346
  ]
339
347
  })
@@ -343,173 +351,173 @@ function S() {
343
351
  })]
344
352
  })
345
353
  })
346
- }), /* @__PURE__ */ g("div", {
354
+ }), /* @__PURE__ */ v("div", {
347
355
  className: "mt-4 flex items-center justify-between",
348
- children: [/* @__PURE__ */ g("p", {
356
+ children: [/* @__PURE__ */ v("p", {
349
357
  className: "text-xs text-text-secondary",
350
358
  children: [
351
359
  "Showing ",
352
- K.length,
360
+ q.length,
353
361
  " of ",
354
362
  me
355
363
  ]
356
- }), pe && /* @__PURE__ */ h("button", {
357
- onClick: xe,
364
+ }), pe && /* @__PURE__ */ _("button", {
365
+ onClick: Ce,
358
366
  disabled: Z,
359
367
  className: "inline-flex items-center gap-1.5 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",
360
368
  children: Z ? "Loading..." : "Load more"
361
369
  })]
362
370
  })] }),
363
- /* @__PURE__ */ g(u, {
364
- open: j,
365
- onClose: () => M(!1),
371
+ /* @__PURE__ */ v(d, {
372
+ open: le,
373
+ onClose: () => N(!1),
366
374
  title: "New Time Entry",
367
375
  description: "Manually log a block of work.",
368
376
  size: "lg",
369
- footer: /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
370
- onClick: () => M(!1),
377
+ footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
378
+ onClick: () => N(!1),
371
379
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
372
380
  children: "Cancel"
373
- }), /* @__PURE__ */ h("button", {
374
- onClick: Se,
375
- disabled: q || !N.startTime,
381
+ }), /* @__PURE__ */ _("button", {
382
+ onClick: we,
383
+ disabled: J || !P.startTime,
376
384
  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",
377
- children: q ? "Saving..." : "Create Entry"
385
+ children: J ? "Saving..." : "Create Entry"
378
386
  })] }),
379
- children: [ge && /* @__PURE__ */ h("div", {
387
+ children: [ge && /* @__PURE__ */ _("div", {
380
388
  className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
381
389
  children: "Failed to create entry. Please try again."
382
- }), /* @__PURE__ */ h(x, {
383
- form: N,
384
- onChange: (e) => P((t) => ({
390
+ }), /* @__PURE__ */ _(C, {
391
+ form: P,
392
+ onChange: (e) => F((t) => ({
385
393
  ...t,
386
394
  ...e
387
395
  })),
388
- projects: G
396
+ projects: K
389
397
  })]
390
398
  }),
391
- /* @__PURE__ */ g(u, {
392
- open: !!F,
393
- onClose: () => I(null),
399
+ /* @__PURE__ */ v(d, {
400
+ open: !!I,
401
+ onClose: () => L(null),
394
402
  title: "Edit Time Entry",
395
403
  description: "Correct the details of this logged block.",
396
404
  size: "lg",
397
- footer: /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
398
- onClick: () => I(null),
405
+ footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
406
+ onClick: () => L(null),
399
407
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
400
408
  children: "Cancel"
401
- }), /* @__PURE__ */ h("button", {
402
- onClick: we,
403
- disabled: J || !L.startTime,
409
+ }), /* @__PURE__ */ _("button", {
410
+ onClick: Ee,
411
+ disabled: Y || !R.startTime,
404
412
  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",
405
- children: J ? "Saving..." : "Save Changes"
413
+ children: Y ? "Saving..." : "Save Changes"
406
414
  })] }),
407
- children: [ve && /* @__PURE__ */ h("div", {
415
+ children: [ye && /* @__PURE__ */ _("div", {
408
416
  className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
409
417
  children: "Failed to update entry. Please try again."
410
- }), /* @__PURE__ */ h(x, {
411
- form: L,
412
- onChange: (e) => R((t) => ({
418
+ }), /* @__PURE__ */ _(C, {
419
+ form: R,
420
+ onChange: (e) => z((t) => ({
413
421
  ...t,
414
422
  ...e
415
423
  })),
416
- projects: G
424
+ projects: K
417
425
  })]
418
426
  }),
419
- /* @__PURE__ */ h(u, {
420
- open: !!z,
421
- onClose: () => B(null),
427
+ /* @__PURE__ */ _(d, {
428
+ open: !!B,
429
+ onClose: () => V(null),
422
430
  title: "Delete time entry?",
423
431
  description: "This permanently removes the entry. It cannot be undone.",
424
- footer: /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
425
- onClick: () => B(null),
432
+ footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
433
+ onClick: () => V(null),
426
434
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
427
435
  children: "Cancel"
428
- }), /* @__PURE__ */ h("button", {
436
+ }), /* @__PURE__ */ _("button", {
429
437
  onClick: async () => {
430
- z && (await ye({ variables: { id: z.id } }), B(null), await W());
438
+ B && (await be({ variables: { id: B.id } }), V(null), await W());
431
439
  },
432
- disabled: Y,
440
+ disabled: X,
433
441
  className: "rounded-md bg-action-danger-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-danger-bg/90 disabled:opacity-50",
434
- children: Y ? "Deleting..." : "Delete"
442
+ children: X ? "Deleting..." : "Delete"
435
443
  })] }),
436
- children: /* @__PURE__ */ g("p", {
444
+ children: /* @__PURE__ */ v("p", {
437
445
  className: "text-sm text-text-secondary",
438
446
  children: [
439
447
  "Delete the entry for",
440
448
  " ",
441
- /* @__PURE__ */ h("span", {
449
+ /* @__PURE__ */ _("span", {
442
450
  className: "font-medium text-text-primary",
443
- children: z?.project?.name ?? z?.description ?? "this block of work"
451
+ children: B?.project?.name ?? B?.description ?? "this block of work"
444
452
  }),
445
453
  "?"
446
454
  ]
447
455
  })
448
456
  }),
449
- /* @__PURE__ */ h(u, {
450
- open: le,
451
- onClose: () => w(!1),
457
+ /* @__PURE__ */ _(d, {
458
+ open: ce,
459
+ onClose: () => E(!1),
452
460
  title: "Filter entries",
453
461
  description: "Narrow the list to what you need.",
454
- footer: /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("button", {
462
+ footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
455
463
  onClick: () => {
456
- E("all"), O(""), A(""), C({}), w(!1);
464
+ O("all"), A(""), M(""), T({}), E(!1);
457
465
  },
458
466
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
459
467
  children: "Clear"
460
- }), /* @__PURE__ */ h("button", {
468
+ }), /* @__PURE__ */ _("button", {
461
469
  onClick: () => {
462
470
  let e = {};
463
- T !== "all" && (e.billable = T === "yes"), D && (e.projectId = D), k.trim() && (e.search = k.trim()), C(e), w(!1);
471
+ D !== "all" && (e.billable = D === "yes"), k && (e.projectId = k), j.trim() && (e.search = j.trim()), T(e), E(!1);
464
472
  },
465
473
  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",
466
474
  children: "Apply"
467
475
  })] }),
468
- children: /* @__PURE__ */ g("div", {
476
+ children: /* @__PURE__ */ v("div", {
469
477
  className: "space-y-4",
470
478
  children: [
471
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
479
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
472
480
  className: "block text-sm font-medium text-text-primary",
473
481
  children: "Search"
474
- }), /* @__PURE__ */ h("input", {
482
+ }), /* @__PURE__ */ _("input", {
475
483
  type: "text",
476
484
  placeholder: "Description contains...",
477
- value: k,
478
- onChange: (e) => A(e.target.value),
485
+ value: j,
486
+ onChange: (e) => M(e.target.value),
479
487
  className: "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"
480
488
  })] }),
481
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
489
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
482
490
  className: "block text-sm font-medium text-text-primary",
483
491
  children: "Project"
484
- }), /* @__PURE__ */ g("select", {
485
- value: D,
486
- onChange: (e) => O(e.target.value),
492
+ }), /* @__PURE__ */ v("select", {
493
+ value: k,
494
+ onChange: (e) => A(e.target.value),
487
495
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
488
- children: [/* @__PURE__ */ h("option", {
496
+ children: [/* @__PURE__ */ _("option", {
489
497
  value: "",
490
498
  children: "All Projects"
491
- }), G.map((e) => /* @__PURE__ */ h("option", {
499
+ }), K.map((e) => /* @__PURE__ */ _("option", {
492
500
  value: e.id,
493
501
  children: e.name
494
502
  }, e.id))]
495
503
  })] }),
496
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
504
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
497
505
  className: "block text-sm font-medium text-text-primary",
498
506
  children: "Billable"
499
- }), /* @__PURE__ */ g("select", {
500
- value: T,
501
- onChange: (e) => E(e.target.value),
507
+ }), /* @__PURE__ */ v("select", {
508
+ value: D,
509
+ onChange: (e) => O(e.target.value),
502
510
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
503
511
  children: [
504
- /* @__PURE__ */ h("option", {
512
+ /* @__PURE__ */ _("option", {
505
513
  value: "all",
506
514
  children: "All"
507
515
  }),
508
- /* @__PURE__ */ h("option", {
516
+ /* @__PURE__ */ _("option", {
509
517
  value: "yes",
510
518
  children: "Billable only"
511
519
  }),
512
- /* @__PURE__ */ h("option", {
520
+ /* @__PURE__ */ _("option", {
513
521
  value: "no",
514
522
  children: "Non-billable only"
515
523
  })
@@ -522,6 +530,6 @@ function S() {
522
530
  });
523
531
  }
524
532
  //#endregion
525
- export { S as TimeEntriesPage };
533
+ export { w as TimeEntriesPage };
526
534
 
527
535
  //# sourceMappingURL=TimeEntriesPage.js.map