@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.
- package/dist/generated/wspace-operations.d.ts +45 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +710 -672
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +731 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +14 -12
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/timecampus/analytics/index.d.ts +3 -0
- package/dist/timecampus/analytics/index.d.ts.map +1 -0
- package/dist/timecampus/analytics/index.js +3 -0
- package/dist/timecampus/analytics/timecampusAnalytics.d.ts +83 -0
- package/dist/timecampus/analytics/timecampusAnalytics.d.ts.map +1 -0
- package/dist/timecampus/analytics/timecampusAnalytics.js +175 -0
- package/dist/timecampus/analytics/timecampusAnalytics.js.map +1 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts +16 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts.map +1 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.js +48 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.js.map +1 -0
- package/dist/timecampus/components/ActivationCard.d.ts +3 -0
- package/dist/timecampus/components/ActivationCard.d.ts.map +1 -0
- package/dist/timecampus/components/ActivationCard.js +156 -0
- package/dist/timecampus/components/ActivationCard.js.map +1 -0
- package/dist/timecampus/index.js +7 -7
- package/dist/timecampus/pages/HomePage.d.ts.map +1 -1
- package/dist/timecampus/pages/HomePage.js +142 -139
- package/dist/timecampus/pages/HomePage.js.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.d.ts.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js +244 -228
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/AnalyticsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/AnalyticsPage.js +117 -112
- package/dist/timecampus/pages/dashboard/AnalyticsPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.js +105 -102
- package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +209 -192
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/focus-score/FocusScorePage.d.ts.map +1 -1
- package/dist/timecampus/pages/focus-score/FocusScorePage.js +71 -68
- package/dist/timecampus/pages/focus-score/FocusScorePage.js.map +1 -1
- package/dist/timecampus/pages/invoicing/InvoicingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/invoicing/InvoicingPage.js +157 -150
- package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingCreatePage.d.ts.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js +58 -52
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.js +51 -45
- package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.d.ts.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js +55 -51
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectCreatePage.d.ts.map +1 -1
- package/dist/timecampus/pages/projects/ProjectCreatePage.js +59 -49
- package/dist/timecampus/pages/projects/ProjectCreatePage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.js +165 -155
- package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.js +194 -186
- package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.js +139 -126
- package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.js +48 -35
- package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +60 -50
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.d.ts.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.js +223 -219
- package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
- package/dist/timecampus/pages/work-patterns/WorkPatternsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/work-patterns/WorkPatternsPage.js +1 -5
- package/dist/timecampus/pages/work-patterns/WorkPatternsPage.js.map +1 -1
- 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
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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
|
|
14
|
-
function
|
|
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
|
|
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
|
|
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
|
|
35
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
40
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
39
41
|
className: "block text-sm font-medium text-text-primary",
|
|
40
42
|
children: "Description"
|
|
41
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
50
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
49
51
|
className: "block text-sm font-medium text-text-primary",
|
|
50
52
|
children: "Project"
|
|
51
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
57
|
+
children: [/* @__PURE__ */ _("option", {
|
|
56
58
|
value: "",
|
|
57
59
|
children: "No Project"
|
|
58
|
-
}), n.map((e) => /* @__PURE__ */
|
|
60
|
+
}), n.map((e) => /* @__PURE__ */ _("option", {
|
|
59
61
|
value: e.id,
|
|
60
62
|
children: e.name
|
|
61
63
|
}, e.id))]
|
|
62
64
|
})] }),
|
|
63
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ v("div", {
|
|
64
66
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
75
|
+
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
74
76
|
className: "block text-sm font-medium text-text-primary",
|
|
75
77
|
children: "End"
|
|
76
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
85
|
+
/* @__PURE__ */ v("label", {
|
|
84
86
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
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
|
|
96
|
-
let [
|
|
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:
|
|
104
|
+
filter: H ? w : void 0
|
|
103
105
|
},
|
|
104
106
|
notifyOnNetworkStatusChange: !0
|
|
105
|
-
}), { data:
|
|
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
|
|
110
|
+
await fe({
|
|
109
111
|
variables: { pagination: {
|
|
110
|
-
limit:
|
|
111
|
-
offset:
|
|
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
|
-
|
|
126
|
-
},
|
|
127
|
-
let e =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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:
|
|
133
|
-
billable:
|
|
135
|
+
endTime: x(P.endTime),
|
|
136
|
+
billable: P.billable,
|
|
134
137
|
source: "manual"
|
|
135
|
-
} } })
|
|
136
|
-
|
|
137
|
-
|
|
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:
|
|
141
|
-
endTime:
|
|
148
|
+
startTime: b(e.startTime),
|
|
149
|
+
endTime: b(e.endTime),
|
|
142
150
|
billable: e.billable
|
|
143
151
|
});
|
|
144
|
-
},
|
|
145
|
-
if (!
|
|
146
|
-
let e =
|
|
147
|
-
e && (await
|
|
148
|
-
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:
|
|
151
|
-
projectId:
|
|
158
|
+
description: R.description.trim() || void 0,
|
|
159
|
+
projectId: R.projectId || void 0,
|
|
152
160
|
startTime: e,
|
|
153
|
-
endTime:
|
|
154
|
-
billable:
|
|
161
|
+
endTime: x(R.endTime),
|
|
162
|
+
billable: R.billable
|
|
155
163
|
}
|
|
156
|
-
} }),
|
|
157
|
-
},
|
|
158
|
-
await
|
|
164
|
+
} }), L(null), await W());
|
|
165
|
+
}, De = async (e) => {
|
|
166
|
+
await xe({ variables: { id: e.id } }), await W();
|
|
159
167
|
};
|
|
160
|
-
return
|
|
168
|
+
return de ? /* @__PURE__ */ _(l, {
|
|
161
169
|
title: "Time Entries",
|
|
162
170
|
description: "View and manage all time entries",
|
|
163
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
179
|
+
actions: /* @__PURE__ */ v("div", {
|
|
172
180
|
className: "flex items-center gap-2",
|
|
173
181
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ v("button", {
|
|
175
183
|
onClick: () => {
|
|
176
|
-
|
|
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 ${
|
|
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__ */
|
|
188
|
+
/* @__PURE__ */ _(p, { className: "h-4 w-4" }),
|
|
181
189
|
"Filter",
|
|
182
|
-
|
|
190
|
+
H ? ` (${Object.keys(w).length})` : ""
|
|
183
191
|
]
|
|
184
192
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
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 =
|
|
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:
|
|
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__ */
|
|
214
|
+
children: [/* @__PURE__ */ _(ae, { className: "h-4 w-4" }), "Export"]
|
|
207
215
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
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
|
|
219
|
+
children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), "New Entry"]
|
|
212
220
|
})
|
|
213
221
|
]
|
|
214
222
|
}),
|
|
215
223
|
children: [
|
|
216
|
-
|
|
224
|
+
ue && q.length === 0 ? /* @__PURE__ */ _(r, {
|
|
217
225
|
variant: "table",
|
|
218
226
|
count: 5
|
|
219
|
-
}) :
|
|
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__ */
|
|
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
|
|
234
|
+
children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), "New Entry"]
|
|
227
235
|
})
|
|
228
|
-
}) : /* @__PURE__ */ g
|
|
236
|
+
}) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(se, {
|
|
229
237
|
treatment: "glass",
|
|
230
238
|
glow: !0,
|
|
231
239
|
className: "overflow-hidden",
|
|
232
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ _("div", {
|
|
233
241
|
className: "overflow-x-auto",
|
|
234
|
-
children: /* @__PURE__ */
|
|
242
|
+
children: /* @__PURE__ */ v("table", {
|
|
235
243
|
className: "w-full",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ v("tr", {
|
|
237
245
|
className: "border-b border-border-subtle",
|
|
238
246
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
272
|
+
}) }), /* @__PURE__ */ _("tbody", {
|
|
265
273
|
className: "divide-y divide-border",
|
|
266
|
-
children:
|
|
274
|
+
children: q.map((r) => /* @__PURE__ */ v("tr", {
|
|
267
275
|
className: "hover:bg-bg-sunken/50 transition-colors",
|
|
268
276
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ v("td", {
|
|
270
278
|
className: "px-4 py-3",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
282
|
+
}), /* @__PURE__ */ _("p", {
|
|
275
283
|
className: "text-xs text-text-secondary",
|
|
276
284
|
children: e(r.startTime)
|
|
277
285
|
})]
|
|
278
286
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ _("td", {
|
|
280
288
|
className: "px-4 py-3",
|
|
281
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ v("div", {
|
|
282
290
|
className: "flex items-center gap-2",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
304
|
+
/* @__PURE__ */ _("td", {
|
|
297
305
|
className: "px-4 py-3",
|
|
298
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
311
|
+
/* @__PURE__ */ _("td", {
|
|
304
312
|
className: "px-4 py-3",
|
|
305
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
319
|
+
/* @__PURE__ */ _("td", {
|
|
312
320
|
className: "px-4 py-3",
|
|
313
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ v("div", {
|
|
314
322
|
className: "flex items-center justify-end gap-1",
|
|
315
323
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
onClick: () =>
|
|
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__ */
|
|
329
|
+
children: /* @__PURE__ */ _(m, { className: "h-4 w-4" })
|
|
322
330
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
onClick: () =>
|
|
325
|
-
disabled:
|
|
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__ */
|
|
337
|
+
children: /* @__PURE__ */ _(ie, { className: "h-4 w-4" })
|
|
330
338
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
onClick: () =>
|
|
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__ */
|
|
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__ */
|
|
354
|
+
}), /* @__PURE__ */ v("div", {
|
|
347
355
|
className: "mt-4 flex items-center justify-between",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ v("p", {
|
|
349
357
|
className: "text-xs text-text-secondary",
|
|
350
358
|
children: [
|
|
351
359
|
"Showing ",
|
|
352
|
-
|
|
360
|
+
q.length,
|
|
353
361
|
" of ",
|
|
354
362
|
me
|
|
355
363
|
]
|
|
356
|
-
}), pe && /* @__PURE__ */
|
|
357
|
-
onClick:
|
|
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__ */
|
|
364
|
-
open:
|
|
365
|
-
onClose: () =>
|
|
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
|
|
370
|
-
onClick: () =>
|
|
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__ */
|
|
374
|
-
onClick:
|
|
375
|
-
disabled:
|
|
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:
|
|
385
|
+
children: J ? "Saving..." : "Create Entry"
|
|
378
386
|
})] }),
|
|
379
|
-
children: [ge && /* @__PURE__ */
|
|
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__ */
|
|
383
|
-
form:
|
|
384
|
-
onChange: (e) =>
|
|
390
|
+
}), /* @__PURE__ */ _(C, {
|
|
391
|
+
form: P,
|
|
392
|
+
onChange: (e) => F((t) => ({
|
|
385
393
|
...t,
|
|
386
394
|
...e
|
|
387
395
|
})),
|
|
388
|
-
projects:
|
|
396
|
+
projects: K
|
|
389
397
|
})]
|
|
390
398
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
open: !!
|
|
393
|
-
onClose: () =>
|
|
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
|
|
398
|
-
onClick: () =>
|
|
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__ */
|
|
402
|
-
onClick:
|
|
403
|
-
disabled:
|
|
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:
|
|
413
|
+
children: Y ? "Saving..." : "Save Changes"
|
|
406
414
|
})] }),
|
|
407
|
-
children: [
|
|
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__ */
|
|
411
|
-
form:
|
|
412
|
-
onChange: (e) =>
|
|
418
|
+
}), /* @__PURE__ */ _(C, {
|
|
419
|
+
form: R,
|
|
420
|
+
onChange: (e) => z((t) => ({
|
|
413
421
|
...t,
|
|
414
422
|
...e
|
|
415
423
|
})),
|
|
416
|
-
projects:
|
|
424
|
+
projects: K
|
|
417
425
|
})]
|
|
418
426
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
open: !!
|
|
421
|
-
onClose: () =>
|
|
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
|
|
425
|
-
onClick: () =>
|
|
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__ */
|
|
436
|
+
}), /* @__PURE__ */ _("button", {
|
|
429
437
|
onClick: async () => {
|
|
430
|
-
|
|
438
|
+
B && (await be({ variables: { id: B.id } }), V(null), await W());
|
|
431
439
|
},
|
|
432
|
-
disabled:
|
|
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:
|
|
442
|
+
children: X ? "Deleting..." : "Delete"
|
|
435
443
|
})] }),
|
|
436
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
449
|
+
/* @__PURE__ */ _("span", {
|
|
442
450
|
className: "font-medium text-text-primary",
|
|
443
|
-
children:
|
|
451
|
+
children: B?.project?.name ?? B?.description ?? "this block of work"
|
|
444
452
|
}),
|
|
445
453
|
"?"
|
|
446
454
|
]
|
|
447
455
|
})
|
|
448
456
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
open:
|
|
451
|
-
onClose: () =>
|
|
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
|
|
462
|
+
footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
|
|
455
463
|
onClick: () => {
|
|
456
|
-
|
|
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__ */
|
|
468
|
+
}), /* @__PURE__ */ _("button", {
|
|
461
469
|
onClick: () => {
|
|
462
470
|
let e = {};
|
|
463
|
-
|
|
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__ */
|
|
476
|
+
children: /* @__PURE__ */ v("div", {
|
|
469
477
|
className: "space-y-4",
|
|
470
478
|
children: [
|
|
471
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
472
480
|
className: "block text-sm font-medium text-text-primary",
|
|
473
481
|
children: "Search"
|
|
474
|
-
}), /* @__PURE__ */
|
|
482
|
+
}), /* @__PURE__ */ _("input", {
|
|
475
483
|
type: "text",
|
|
476
484
|
placeholder: "Description contains...",
|
|
477
|
-
value:
|
|
478
|
-
onChange: (e) =>
|
|
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__ */
|
|
489
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
482
490
|
className: "block text-sm font-medium text-text-primary",
|
|
483
491
|
children: "Project"
|
|
484
|
-
}), /* @__PURE__ */
|
|
485
|
-
value:
|
|
486
|
-
onChange: (e) =>
|
|
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__ */
|
|
496
|
+
children: [/* @__PURE__ */ _("option", {
|
|
489
497
|
value: "",
|
|
490
498
|
children: "All Projects"
|
|
491
|
-
}),
|
|
499
|
+
}), K.map((e) => /* @__PURE__ */ _("option", {
|
|
492
500
|
value: e.id,
|
|
493
501
|
children: e.name
|
|
494
502
|
}, e.id))]
|
|
495
503
|
})] }),
|
|
496
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
497
505
|
className: "block text-sm font-medium text-text-primary",
|
|
498
506
|
children: "Billable"
|
|
499
|
-
}), /* @__PURE__ */
|
|
500
|
-
value:
|
|
501
|
-
onChange: (e) =>
|
|
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__ */
|
|
512
|
+
/* @__PURE__ */ _("option", {
|
|
505
513
|
value: "all",
|
|
506
514
|
children: "All"
|
|
507
515
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ _("option", {
|
|
509
517
|
value: "yes",
|
|
510
518
|
children: "Billable only"
|
|
511
519
|
}),
|
|
512
|
-
/* @__PURE__ */
|
|
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 {
|
|
533
|
+
export { w as TimeEntriesPage };
|
|
526
534
|
|
|
527
535
|
//# sourceMappingURL=TimeEntriesPage.js.map
|