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