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