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