@burdenoff/microfe-timecampus 2026.1206.1 → 2026.1206.2
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/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/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 +1 -1
|
@@ -3,24 +3,25 @@ import { EmptyState as t } from "../../components/EmptyState.js";
|
|
|
3
3
|
import { LoadingSkeleton as n } from "../../components/LoadingSkeleton.js";
|
|
4
4
|
import { Modal as r } from "../../components/Modal.js";
|
|
5
5
|
import { getPriorityColor as i } from "../../utils/helpers.js";
|
|
6
|
-
import { useCreateTaskMutation as a, useDeleteTaskMutation as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { useCreateTaskMutation as a, useDeleteTaskMutation as o, useListTasksQuery as s, useReorderTasksMutation as c, useUpdateTaskMutation as l, useUpdateTaskStatusMutation as u } from "../../../generated/wspace-operations.js";
|
|
7
|
+
import { DateField as d } from "../../components/DateFields.js";
|
|
8
|
+
import { useState as f } from "react";
|
|
9
|
+
import { ArrowDown as ee, ArrowUp as p, CheckSquare as m, Pencil as h, Plus as g, Trash2 as _ } from "lucide-react";
|
|
10
|
+
import { useParams as v } from "react-router";
|
|
11
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
|
+
import { GlassCard as S, ThemedSelect as C } from "@burdenoff/fe-libs/ui";
|
|
12
13
|
// src/timecampus/pages/projects/TasksPage.tsx
|
|
13
|
-
var
|
|
14
|
+
var w = 25, T = [
|
|
14
15
|
"todo",
|
|
15
16
|
"in-progress",
|
|
16
17
|
"review",
|
|
17
18
|
"done"
|
|
18
|
-
],
|
|
19
|
+
], te = [
|
|
19
20
|
"low",
|
|
20
21
|
"medium",
|
|
21
22
|
"high",
|
|
22
23
|
"urgent"
|
|
23
|
-
],
|
|
24
|
+
], E = {
|
|
24
25
|
title: "",
|
|
25
26
|
description: "",
|
|
26
27
|
status: "todo",
|
|
@@ -28,22 +29,22 @@ var x = 25, S = [
|
|
|
28
29
|
assigneeId: "",
|
|
29
30
|
estimatedHours: "",
|
|
30
31
|
dueDate: ""
|
|
31
|
-
},
|
|
32
|
-
function
|
|
33
|
-
let { projectId:
|
|
32
|
+
}, D = "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", O = "block text-sm font-medium text-text-primary";
|
|
33
|
+
function k() {
|
|
34
|
+
let { projectId: k } = v(), [ne, re] = f(w), { data: A, loading: j, error: ie, refetch: M } = s({
|
|
34
35
|
variables: {
|
|
35
|
-
projectId:
|
|
36
|
+
projectId: k,
|
|
36
37
|
pagination: {
|
|
37
|
-
limit:
|
|
38
|
+
limit: ne,
|
|
38
39
|
offset: 0
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
|
-
skip: !
|
|
42
|
+
skip: !k,
|
|
42
43
|
notifyOnNetworkStatusChange: !0
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
|
|
44
|
+
}), N = A?.tasks?.items ?? [], P = A?.tasks?.hasMore ?? !1, [F, I] = f(!1), [L, R] = f(null), [z, B] = f(null), [V, H] = f(E), [U, { loading: W, error: G }] = a(), [K, { loading: q, error: J }] = l(), [ae] = u(), [oe, { loading: Y, error: se }] = o(), [ce, { loading: X }] = c(), Z = () => {
|
|
45
|
+
H(E), I(!0);
|
|
46
|
+
}, le = (e) => {
|
|
47
|
+
H({
|
|
47
48
|
title: e.title,
|
|
48
49
|
description: e.description ?? "",
|
|
49
50
|
status: e.status,
|
|
@@ -51,196 +52,196 @@ function D() {
|
|
|
51
52
|
assigneeId: e.assigneeId ?? "",
|
|
52
53
|
estimatedHours: e.estimatedHours == null ? "" : String(e.estimatedHours),
|
|
53
54
|
dueDate: e.dueDate ? e.dueDate.slice(0, 10) : ""
|
|
54
|
-
}),
|
|
55
|
-
}, le = async () => {
|
|
56
|
-
D && z.title.trim() && (await V({ variables: { input: {
|
|
57
|
-
projectId: D,
|
|
58
|
-
title: z.title.trim(),
|
|
59
|
-
description: z.description.trim() || void 0,
|
|
60
|
-
status: z.status,
|
|
61
|
-
priority: z.priority,
|
|
62
|
-
assigneeId: z.assigneeId.trim() || void 0,
|
|
63
|
-
estimatedHours: z.estimatedHours ? Number(z.estimatedHours) : void 0,
|
|
64
|
-
dueDate: z.dueDate ? new Date(z.dueDate).toISOString() : void 0
|
|
65
|
-
} } }), P(!1), await A());
|
|
55
|
+
}), R(e);
|
|
66
56
|
}, ue = async () => {
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
k && V.title.trim() && (await U({ variables: { input: {
|
|
58
|
+
projectId: k,
|
|
59
|
+
title: V.title.trim(),
|
|
60
|
+
description: V.description.trim() || void 0,
|
|
61
|
+
status: V.status,
|
|
62
|
+
priority: V.priority,
|
|
63
|
+
assigneeId: V.assigneeId.trim() || void 0,
|
|
64
|
+
estimatedHours: V.estimatedHours ? Number(V.estimatedHours) : void 0,
|
|
65
|
+
dueDate: V.dueDate ? new Date(V.dueDate).toISOString() : void 0
|
|
66
|
+
} } }), I(!1), await M());
|
|
67
|
+
}, de = async () => {
|
|
68
|
+
L && V.title.trim() && (await K({ variables: {
|
|
69
|
+
id: L.id,
|
|
69
70
|
input: {
|
|
70
|
-
title:
|
|
71
|
-
description:
|
|
72
|
-
status:
|
|
73
|
-
priority:
|
|
74
|
-
assigneeId:
|
|
75
|
-
estimatedHours:
|
|
76
|
-
dueDate:
|
|
71
|
+
title: V.title.trim(),
|
|
72
|
+
description: V.description.trim() || void 0,
|
|
73
|
+
status: V.status,
|
|
74
|
+
priority: V.priority,
|
|
75
|
+
assigneeId: V.assigneeId.trim() || void 0,
|
|
76
|
+
estimatedHours: V.estimatedHours ? Number(V.estimatedHours) : void 0,
|
|
77
|
+
dueDate: V.dueDate ? new Date(V.dueDate).toISOString() : void 0
|
|
77
78
|
}
|
|
78
|
-
} }),
|
|
79
|
-
},
|
|
80
|
-
await
|
|
79
|
+
} }), R(null), await M());
|
|
80
|
+
}, fe = async (e, t) => {
|
|
81
|
+
await ae({ variables: {
|
|
81
82
|
id: e.id,
|
|
82
83
|
status: t
|
|
83
|
-
} }), await
|
|
84
|
-
},
|
|
85
|
-
|
|
84
|
+
} }), await M();
|
|
85
|
+
}, pe = async () => {
|
|
86
|
+
z && (await oe({ variables: { id: z.id } }), B(null), await M());
|
|
86
87
|
}, Q = async (e, t) => {
|
|
87
|
-
if (!
|
|
88
|
+
if (!k) return;
|
|
88
89
|
let n = e + t;
|
|
89
|
-
if (n < 0 || n >=
|
|
90
|
-
let r =
|
|
90
|
+
if (n < 0 || n >= N.length) return;
|
|
91
|
+
let r = N.map((e) => e.id), [i] = r.splice(e, 1);
|
|
91
92
|
r.splice(n, 0, i), await ce({ variables: {
|
|
92
|
-
projectId:
|
|
93
|
+
projectId: k,
|
|
93
94
|
taskIds: r
|
|
94
|
-
} }), await
|
|
95
|
-
}, $ = /* @__PURE__ */
|
|
95
|
+
} }), await M();
|
|
96
|
+
}, $ = /* @__PURE__ */ x("div", {
|
|
96
97
|
className: "space-y-4",
|
|
97
98
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
className:
|
|
99
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
100
|
+
className: O,
|
|
100
101
|
children: "Title"
|
|
101
|
-
}), /* @__PURE__ */
|
|
102
|
+
}), /* @__PURE__ */ b("input", {
|
|
102
103
|
type: "text",
|
|
103
104
|
placeholder: "Task title",
|
|
104
|
-
value:
|
|
105
|
-
onChange: (e) =>
|
|
106
|
-
...
|
|
105
|
+
value: V.title,
|
|
106
|
+
onChange: (e) => H({
|
|
107
|
+
...V,
|
|
107
108
|
title: e.target.value
|
|
108
109
|
}),
|
|
109
|
-
className:
|
|
110
|
+
className: D
|
|
110
111
|
})] }),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
className:
|
|
112
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
113
|
+
className: O,
|
|
113
114
|
children: "Description"
|
|
114
|
-
}), /* @__PURE__ */
|
|
115
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
115
116
|
placeholder: "Task description",
|
|
116
117
|
rows: 3,
|
|
117
|
-
value:
|
|
118
|
-
onChange: (e) =>
|
|
119
|
-
...
|
|
118
|
+
value: V.description,
|
|
119
|
+
onChange: (e) => H({
|
|
120
|
+
...V,
|
|
120
121
|
description: e.target.value
|
|
121
122
|
}),
|
|
122
|
-
className:
|
|
123
|
+
className: D
|
|
123
124
|
})] }),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ x("div", {
|
|
125
126
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
127
|
-
className:
|
|
127
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
128
|
+
className: O,
|
|
128
129
|
children: "Status"
|
|
129
|
-
}), /* @__PURE__ */
|
|
130
|
-
value:
|
|
131
|
-
onChange: (e) =>
|
|
132
|
-
...
|
|
130
|
+
}), /* @__PURE__ */ b(C, {
|
|
131
|
+
value: V.status,
|
|
132
|
+
onChange: (e) => H({
|
|
133
|
+
...V,
|
|
133
134
|
status: e.target.value
|
|
134
135
|
}),
|
|
135
|
-
className:
|
|
136
|
-
children:
|
|
136
|
+
className: D,
|
|
137
|
+
children: T.map((e) => /* @__PURE__ */ b("option", {
|
|
137
138
|
value: e,
|
|
138
139
|
children: e
|
|
139
140
|
}, e))
|
|
140
|
-
})] }), /* @__PURE__ */
|
|
141
|
-
className:
|
|
141
|
+
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
142
|
+
className: O,
|
|
142
143
|
children: "Priority"
|
|
143
|
-
}), /* @__PURE__ */
|
|
144
|
-
value:
|
|
145
|
-
onChange: (e) =>
|
|
146
|
-
...
|
|
144
|
+
}), /* @__PURE__ */ b(C, {
|
|
145
|
+
value: V.priority,
|
|
146
|
+
onChange: (e) => H({
|
|
147
|
+
...V,
|
|
147
148
|
priority: e.target.value
|
|
148
149
|
}),
|
|
149
|
-
className:
|
|
150
|
-
children:
|
|
150
|
+
className: D,
|
|
151
|
+
children: te.map((e) => /* @__PURE__ */ b("option", {
|
|
151
152
|
value: e,
|
|
152
153
|
children: e
|
|
153
154
|
}, e))
|
|
154
155
|
})] })]
|
|
155
156
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ x("div", {
|
|
157
158
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
158
159
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
className:
|
|
160
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
161
|
+
className: O,
|
|
161
162
|
children: "Assignee ID"
|
|
162
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ b("input", {
|
|
163
164
|
type: "text",
|
|
164
165
|
placeholder: "User ID",
|
|
165
|
-
value:
|
|
166
|
-
onChange: (e) =>
|
|
167
|
-
...
|
|
166
|
+
value: V.assigneeId,
|
|
167
|
+
onChange: (e) => H({
|
|
168
|
+
...V,
|
|
168
169
|
assigneeId: e.target.value
|
|
169
170
|
}),
|
|
170
|
-
className:
|
|
171
|
+
className: D
|
|
171
172
|
})] }),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
className:
|
|
173
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
174
|
+
className: O,
|
|
174
175
|
children: "Estimated Hours"
|
|
175
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ b("input", {
|
|
176
177
|
type: "number",
|
|
177
178
|
placeholder: "0",
|
|
178
|
-
value:
|
|
179
|
-
onChange: (e) =>
|
|
180
|
-
...
|
|
179
|
+
value: V.estimatedHours,
|
|
180
|
+
onChange: (e) => H({
|
|
181
|
+
...V,
|
|
181
182
|
estimatedHours: e.target.value
|
|
182
183
|
}),
|
|
183
|
-
className:
|
|
184
|
+
className: D
|
|
184
185
|
})] }),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
className:
|
|
186
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
187
|
+
className: O,
|
|
187
188
|
children: "Due Date"
|
|
188
|
-
}), /* @__PURE__ */
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
dueDate: e.target.value
|
|
189
|
+
}), /* @__PURE__ */ b(d, {
|
|
190
|
+
value: V.dueDate,
|
|
191
|
+
onChange: (e) => H({
|
|
192
|
+
...V,
|
|
193
|
+
dueDate: e
|
|
194
194
|
}),
|
|
195
|
-
|
|
195
|
+
label: "Due date",
|
|
196
|
+
clearable: !0
|
|
196
197
|
})] })
|
|
197
198
|
]
|
|
198
199
|
})
|
|
199
200
|
]
|
|
200
201
|
});
|
|
201
|
-
return
|
|
202
|
+
return ie ? /* @__PURE__ */ b(e, {
|
|
202
203
|
title: "Tasks",
|
|
203
|
-
description: `Tasks for project ${
|
|
204
|
-
children: /* @__PURE__ */
|
|
204
|
+
description: `Tasks for project ${k}`,
|
|
205
|
+
children: /* @__PURE__ */ b("div", {
|
|
205
206
|
className: "rounded-xl border border-status-error-border bg-status-error-bgSubtle p-6 text-sm text-status-error-text",
|
|
206
207
|
children: "Failed to load tasks. Please try again later."
|
|
207
208
|
})
|
|
208
|
-
}) : /* @__PURE__ */
|
|
209
|
+
}) : /* @__PURE__ */ x(e, {
|
|
209
210
|
title: "Tasks",
|
|
210
|
-
description: `Tasks for project ${
|
|
211
|
+
description: `Tasks for project ${k}`,
|
|
211
212
|
purpose: "Break a project down into the concrete pieces of work that need doing, then track hours against each one — so you can see what's done, what's blocking, and where effort is actually being spent.",
|
|
212
|
-
actions: /* @__PURE__ */
|
|
213
|
-
onClick:
|
|
213
|
+
actions: /* @__PURE__ */ x("button", {
|
|
214
|
+
onClick: Z,
|
|
214
215
|
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",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), "Add Task"]
|
|
216
217
|
}),
|
|
217
218
|
children: [
|
|
218
|
-
|
|
219
|
+
j && N.length === 0 ? /* @__PURE__ */ b(n, {
|
|
219
220
|
variant: "list",
|
|
220
221
|
count: 5
|
|
221
|
-
}) :
|
|
222
|
+
}) : N.length === 0 ? /* @__PURE__ */ b(t, {
|
|
222
223
|
illustration: "empty-generic",
|
|
223
224
|
title: "No tasks yet",
|
|
224
225
|
description: "Add a task to break this project into trackable work.",
|
|
225
|
-
action: /* @__PURE__ */
|
|
226
|
-
onClick:
|
|
226
|
+
action: /* @__PURE__ */ x("button", {
|
|
227
|
+
onClick: Z,
|
|
227
228
|
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",
|
|
228
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), "Add Task"]
|
|
229
230
|
})
|
|
230
|
-
}) : /* @__PURE__ */
|
|
231
|
+
}) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(S, {
|
|
231
232
|
treatment: "glass",
|
|
232
233
|
glow: !0,
|
|
233
234
|
className: "overflow-hidden",
|
|
234
|
-
children: /* @__PURE__ */
|
|
235
|
+
children: /* @__PURE__ */ b("div", {
|
|
235
236
|
className: "divide-y divide-border",
|
|
236
|
-
children:
|
|
237
|
+
children: N.map((e, t) => /* @__PURE__ */ x("div", {
|
|
237
238
|
className: "flex flex-col gap-3 p-4 transition-colors hover:bg-bg-sunken/50 sm:flex-row sm:items-center sm:justify-between",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ x("div", {
|
|
239
240
|
className: "flex items-center gap-3",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ b(m, { className: `h-5 w-5 shrink-0 ${e.status === "done" ? "text-status-success-text" : "text-text-secondary"}` }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
241
242
|
className: `text-sm font-medium ${e.status === "done" ? "text-text-secondary line-through" : "text-text-primary"}`,
|
|
242
243
|
children: e.title
|
|
243
|
-
}), /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ x("p", {
|
|
244
245
|
className: "text-xs text-text-secondary",
|
|
245
246
|
children: [
|
|
246
247
|
e.assigneeId ?? "Unassigned",
|
|
@@ -250,129 +251,129 @@ function D() {
|
|
|
250
251
|
"h tracked"
|
|
251
252
|
]
|
|
252
253
|
})] })]
|
|
253
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ x("div", {
|
|
254
255
|
className: "flex flex-wrap items-center gap-2",
|
|
255
256
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ b("span", {
|
|
257
258
|
className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${i(e.priority)}`,
|
|
258
259
|
children: e.priority
|
|
259
260
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ b(C, {
|
|
261
262
|
value: e.status,
|
|
262
|
-
onChange: (t) => void
|
|
263
|
+
onChange: (t) => void fe(e, t.target.value),
|
|
263
264
|
className: "rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs font-medium text-text-primary",
|
|
264
265
|
"aria-label": "Task status",
|
|
265
|
-
children:
|
|
266
|
+
children: T.map((e) => /* @__PURE__ */ b("option", {
|
|
266
267
|
value: e,
|
|
267
268
|
children: e
|
|
268
269
|
}, e))
|
|
269
270
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ b("button", {
|
|
271
272
|
onClick: () => void Q(t, -1),
|
|
272
|
-
disabled: t === 0 ||
|
|
273
|
+
disabled: t === 0 || X,
|
|
273
274
|
className: "rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary disabled:opacity-40",
|
|
274
275
|
"aria-label": "Move up",
|
|
275
|
-
children: /* @__PURE__ */
|
|
276
|
+
children: /* @__PURE__ */ b(p, { className: "h-4 w-4" })
|
|
276
277
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ b("button", {
|
|
278
279
|
onClick: () => void Q(t, 1),
|
|
279
|
-
disabled: t ===
|
|
280
|
+
disabled: t === N.length - 1 || X,
|
|
280
281
|
className: "rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary disabled:opacity-40",
|
|
281
282
|
"aria-label": "Move down",
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ b(ee, { className: "h-4 w-4" })
|
|
283
284
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
onClick: () =>
|
|
285
|
+
/* @__PURE__ */ b("button", {
|
|
286
|
+
onClick: () => le(e),
|
|
286
287
|
className: "rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
|
|
287
288
|
"aria-label": "Edit task",
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ b(h, { className: "h-4 w-4" })
|
|
289
290
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
onClick: () =>
|
|
291
|
+
/* @__PURE__ */ b("button", {
|
|
292
|
+
onClick: () => B(e),
|
|
292
293
|
className: "rounded-md p-1 text-status-error-text hover:bg-status-error-bgSubtle",
|
|
293
294
|
"aria-label": "Delete task",
|
|
294
|
-
children: /* @__PURE__ */ _
|
|
295
|
+
children: /* @__PURE__ */ b(_, { className: "h-4 w-4" })
|
|
295
296
|
})
|
|
296
297
|
]
|
|
297
298
|
})]
|
|
298
299
|
}, e.id))
|
|
299
300
|
})
|
|
300
|
-
}),
|
|
301
|
+
}), P && /* @__PURE__ */ b("div", {
|
|
301
302
|
className: "mt-6 flex justify-center",
|
|
302
|
-
children: /* @__PURE__ */
|
|
303
|
-
onClick: () =>
|
|
304
|
-
disabled:
|
|
303
|
+
children: /* @__PURE__ */ b("button", {
|
|
304
|
+
onClick: () => re((e) => e + w),
|
|
305
|
+
disabled: j,
|
|
305
306
|
className: "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",
|
|
306
|
-
children:
|
|
307
|
+
children: j ? "Loading…" : "Load more"
|
|
307
308
|
})
|
|
308
309
|
})] }),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
open:
|
|
311
|
-
onClose: () =>
|
|
310
|
+
/* @__PURE__ */ x(r, {
|
|
311
|
+
open: F,
|
|
312
|
+
onClose: () => I(!1),
|
|
312
313
|
title: "Add Task",
|
|
313
314
|
description: "Break this project into a trackable piece of work.",
|
|
314
315
|
size: "xl",
|
|
315
|
-
footer: /* @__PURE__ */
|
|
316
|
-
onClick: () =>
|
|
316
|
+
footer: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("button", {
|
|
317
|
+
onClick: () => I(!1),
|
|
317
318
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
318
319
|
children: "Cancel"
|
|
319
|
-
}), /* @__PURE__ */
|
|
320
|
-
onClick:
|
|
321
|
-
disabled:
|
|
320
|
+
}), /* @__PURE__ */ b("button", {
|
|
321
|
+
onClick: ue,
|
|
322
|
+
disabled: W || !V.title.trim(),
|
|
322
323
|
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",
|
|
323
|
-
children:
|
|
324
|
+
children: W ? "Creating…" : "Create Task"
|
|
324
325
|
})] }),
|
|
325
|
-
children: [
|
|
326
|
+
children: [G && /* @__PURE__ */ b("div", {
|
|
326
327
|
className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bgSubtle p-3 text-sm text-status-error-text",
|
|
327
328
|
children: "Failed to create task. Please try again."
|
|
328
329
|
}), $]
|
|
329
330
|
}),
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
open:
|
|
332
|
-
onClose: () =>
|
|
331
|
+
/* @__PURE__ */ x(r, {
|
|
332
|
+
open: L !== null,
|
|
333
|
+
onClose: () => R(null),
|
|
333
334
|
title: "Edit Task",
|
|
334
335
|
size: "xl",
|
|
335
|
-
footer: /* @__PURE__ */
|
|
336
|
-
onClick: () =>
|
|
336
|
+
footer: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("button", {
|
|
337
|
+
onClick: () => R(null),
|
|
337
338
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
338
339
|
children: "Cancel"
|
|
339
|
-
}), /* @__PURE__ */
|
|
340
|
-
onClick:
|
|
341
|
-
disabled:
|
|
340
|
+
}), /* @__PURE__ */ b("button", {
|
|
341
|
+
onClick: de,
|
|
342
|
+
disabled: q || !V.title.trim(),
|
|
342
343
|
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",
|
|
343
|
-
children:
|
|
344
|
+
children: q ? "Saving…" : "Save Changes"
|
|
344
345
|
})] }),
|
|
345
|
-
children: [
|
|
346
|
+
children: [J && /* @__PURE__ */ b("div", {
|
|
346
347
|
className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bgSubtle p-3 text-sm text-status-error-text",
|
|
347
348
|
children: "Failed to update task. Please try again."
|
|
348
349
|
}), $]
|
|
349
350
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
open:
|
|
352
|
-
onClose: () =>
|
|
351
|
+
/* @__PURE__ */ x(r, {
|
|
352
|
+
open: z !== null,
|
|
353
|
+
onClose: () => B(null),
|
|
353
354
|
title: "Delete Task",
|
|
354
355
|
size: "sm",
|
|
355
|
-
footer: /* @__PURE__ */
|
|
356
|
-
onClick: () =>
|
|
356
|
+
footer: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("button", {
|
|
357
|
+
onClick: () => B(null),
|
|
357
358
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
358
359
|
children: "Cancel"
|
|
359
|
-
}), /* @__PURE__ */
|
|
360
|
-
onClick:
|
|
361
|
-
disabled:
|
|
360
|
+
}), /* @__PURE__ */ b("button", {
|
|
361
|
+
onClick: pe,
|
|
362
|
+
disabled: Y,
|
|
362
363
|
className: "rounded-md bg-status-error-bgSubtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bgSubtle/70 disabled:opacity-50",
|
|
363
|
-
children:
|
|
364
|
+
children: Y ? "Deleting…" : "Delete"
|
|
364
365
|
})] }),
|
|
365
|
-
children: [se && /* @__PURE__ */
|
|
366
|
+
children: [se && /* @__PURE__ */ b("div", {
|
|
366
367
|
className: "mb-4 rounded-lg border border-status-error-border bg-status-error-bgSubtle p-3 text-sm text-status-error-text",
|
|
367
368
|
children: "Failed to delete task. Please try again."
|
|
368
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ x("p", {
|
|
369
370
|
className: "text-sm text-text-secondary",
|
|
370
371
|
children: [
|
|
371
372
|
"Are you sure you want to delete",
|
|
372
373
|
" ",
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ b("span", {
|
|
374
375
|
className: "font-semibold text-text-primary",
|
|
375
|
-
children:
|
|
376
|
+
children: z?.title
|
|
376
377
|
}),
|
|
377
378
|
"? This action cannot be undone."
|
|
378
379
|
]
|
|
@@ -381,6 +382,6 @@ function D() {
|
|
|
381
382
|
]
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
|
-
export {
|
|
385
|
+
export { k as TasksPage };
|
|
385
386
|
|
|
386
387
|
//# sourceMappingURL=TasksPage.js.map
|