@burdenoff/microfe-timecampus 2026.1203.2 → 2026.1204.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,371 +5,372 @@ import { Modal as r } from "../../components/Modal.js";
|
|
|
5
5
|
import { useTimeCampusNavigate as i } from "../../providers/TimeCampusProvider.js";
|
|
6
6
|
import { useTimeCampusAnalytics as a } from "../../analytics/useTimeCampusAnalytics.js";
|
|
7
7
|
import "../../analytics/index.js";
|
|
8
|
-
import { formatHours as o, getStatusColor as
|
|
9
|
-
import { useArchiveProjectMutation as
|
|
10
|
-
import { useState as
|
|
11
|
-
import { Archive as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import {
|
|
8
|
+
import { formatHours as o, getStatusColor as s } from "../../utils/helpers.js";
|
|
9
|
+
import { useArchiveProjectMutation as c, useCreateProjectMutation as l, useDeleteProjectMutation as u, useListProjectsQuery as d, useUpdateProjectMutation as f } from "../../../generated/wspace-operations.js";
|
|
10
|
+
import { useState as p } from "react";
|
|
11
|
+
import { Archive as m, Pencil as h, Plus as g, Trash2 as ee } from "lucide-react";
|
|
12
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
13
|
+
import { ThemedSelect as b } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { useI18n as x } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
15
|
// src/timecampus/pages/projects/ProjectsPage.tsx
|
|
15
|
-
var
|
|
16
|
+
var S = 25, C = [
|
|
16
17
|
"active",
|
|
17
18
|
"on-hold",
|
|
18
19
|
"completed",
|
|
19
20
|
"archived"
|
|
20
|
-
],
|
|
21
|
+
], w = {
|
|
21
22
|
name: "",
|
|
22
23
|
clientId: "",
|
|
23
24
|
description: "",
|
|
24
25
|
status: "active",
|
|
25
26
|
estimatedHours: "",
|
|
26
27
|
hourlyRate: ""
|
|
27
|
-
},
|
|
28
|
-
function
|
|
29
|
-
let { t:
|
|
30
|
-
let n =
|
|
28
|
+
}, T = "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", E = "block text-sm font-medium text-text-primary";
|
|
29
|
+
function D() {
|
|
30
|
+
let { t: D } = x(), O = (e, t) => {
|
|
31
|
+
let n = D(e);
|
|
31
32
|
return n === e ? t : n;
|
|
32
|
-
},
|
|
33
|
+
}, k = i(), [te, ne] = p(S), { data: A, loading: j, error: M, refetch: N } = d({
|
|
33
34
|
variables: { pagination: {
|
|
34
|
-
limit:
|
|
35
|
+
limit: te,
|
|
35
36
|
offset: 0
|
|
36
37
|
} },
|
|
37
38
|
notifyOnNetworkStatusChange: !0
|
|
38
|
-
}),
|
|
39
|
-
|
|
39
|
+
}), P = A?.projects?.items ?? [], F = A?.projects?.hasMore ?? !1, [I, L] = p(!1), [R, z] = p(null), [B, V] = p(null), [H, U] = p(w), [W, { loading: G, error: K }] = l(), q = a(), [J, { loading: Y, error: X }] = f(), [re, { loading: ie }] = c(), [ae, { loading: Z, error: oe }] = u(), Q = () => {
|
|
40
|
+
U(w), L(!0);
|
|
40
41
|
}, se = (e) => {
|
|
41
|
-
|
|
42
|
+
U({
|
|
42
43
|
name: e.name,
|
|
43
44
|
clientId: e.clientId ?? "",
|
|
44
45
|
description: e.description ?? "",
|
|
45
46
|
status: e.status,
|
|
46
47
|
estimatedHours: e.estimatedHours == null ? "" : String(e.estimatedHours),
|
|
47
48
|
hourlyRate: e.hourlyRate == null ? "" : String(e.hourlyRate)
|
|
48
|
-
}),
|
|
49
|
+
}), z(e);
|
|
49
50
|
}, ce = async () => {
|
|
50
|
-
if (!
|
|
51
|
+
if (!H.name.trim()) return;
|
|
51
52
|
let e = {
|
|
52
|
-
name:
|
|
53
|
-
description:
|
|
54
|
-
clientId:
|
|
55
|
-
status:
|
|
56
|
-
estimatedHours:
|
|
57
|
-
hourlyRate:
|
|
58
|
-
}, t = (await
|
|
59
|
-
t && (
|
|
53
|
+
name: H.name.trim(),
|
|
54
|
+
description: H.description.trim() || void 0,
|
|
55
|
+
clientId: H.clientId.trim() || void 0,
|
|
56
|
+
status: H.status,
|
|
57
|
+
estimatedHours: H.estimatedHours ? Number(H.estimatedHours) : void 0,
|
|
58
|
+
hourlyRate: H.hourlyRate ? Number(H.hourlyRate) : void 0
|
|
59
|
+
}, t = (await W({ variables: { input: e } })).data?.createTimeCampusProject;
|
|
60
|
+
t && (q.projectCreated({
|
|
60
61
|
projectId: t.id,
|
|
61
62
|
surface: "projects_page",
|
|
62
63
|
clientId: e.clientId,
|
|
63
64
|
estimatedHours: e.estimatedHours,
|
|
64
65
|
hourlyRate: e.hourlyRate
|
|
65
|
-
}),
|
|
66
|
+
}), L(!1), await N());
|
|
66
67
|
}, le = async () => {
|
|
67
|
-
|
|
68
|
-
id:
|
|
68
|
+
R && H.name.trim() && (await J({ variables: {
|
|
69
|
+
id: R.id,
|
|
69
70
|
input: {
|
|
70
|
-
name:
|
|
71
|
-
description:
|
|
72
|
-
clientId:
|
|
73
|
-
status:
|
|
74
|
-
estimatedHours:
|
|
75
|
-
hourlyRate:
|
|
71
|
+
name: H.name.trim(),
|
|
72
|
+
description: H.description.trim() || void 0,
|
|
73
|
+
clientId: H.clientId.trim() || void 0,
|
|
74
|
+
status: H.status,
|
|
75
|
+
estimatedHours: H.estimatedHours ? Number(H.estimatedHours) : void 0,
|
|
76
|
+
hourlyRate: H.hourlyRate ? Number(H.hourlyRate) : void 0
|
|
76
77
|
}
|
|
77
|
-
} }),
|
|
78
|
+
} }), z(null), await N());
|
|
78
79
|
}, ue = async (e) => {
|
|
79
|
-
await
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
}, $ = /* @__PURE__ */
|
|
80
|
+
await re({ variables: { id: e.id } }), await N();
|
|
81
|
+
}, de = async () => {
|
|
82
|
+
B && (await ae({ variables: { id: B.id } }), V(null), await N());
|
|
83
|
+
}, $ = /* @__PURE__ */ y("div", {
|
|
83
84
|
className: "space-y-4",
|
|
84
85
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
className:
|
|
87
|
-
children:
|
|
88
|
-
}), /* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
87
|
+
className: E,
|
|
88
|
+
children: O("timecampus.projects.form.name", "Project Name")
|
|
89
|
+
}), /* @__PURE__ */ v("input", {
|
|
89
90
|
type: "text",
|
|
90
91
|
placeholder: "Enter project name",
|
|
91
|
-
value:
|
|
92
|
-
onChange: (e) =>
|
|
93
|
-
...
|
|
92
|
+
value: H.name,
|
|
93
|
+
onChange: (e) => U({
|
|
94
|
+
...H,
|
|
94
95
|
name: e.target.value
|
|
95
96
|
}),
|
|
96
|
-
className:
|
|
97
|
+
className: T
|
|
97
98
|
})] }),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ y("div", {
|
|
99
100
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
101
|
-
className:
|
|
102
|
-
children:
|
|
103
|
-
}), /* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
102
|
+
className: E,
|
|
103
|
+
children: O("timecampus.projects.form.client", "Client")
|
|
104
|
+
}), /* @__PURE__ */ v("input", {
|
|
104
105
|
type: "text",
|
|
105
106
|
placeholder: "Client name",
|
|
106
|
-
value:
|
|
107
|
-
onChange: (e) =>
|
|
108
|
-
...
|
|
107
|
+
value: H.clientId,
|
|
108
|
+
onChange: (e) => U({
|
|
109
|
+
...H,
|
|
109
110
|
clientId: e.target.value
|
|
110
111
|
}),
|
|
111
|
-
className:
|
|
112
|
-
})] }), /* @__PURE__ */
|
|
113
|
-
className:
|
|
114
|
-
children:
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
-
value:
|
|
117
|
-
onChange: (e) =>
|
|
118
|
-
...
|
|
112
|
+
className: T
|
|
113
|
+
})] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
114
|
+
className: E,
|
|
115
|
+
children: O("timecampus.projects.form.status", "Status")
|
|
116
|
+
}), /* @__PURE__ */ v(b, {
|
|
117
|
+
value: H.status,
|
|
118
|
+
onChange: (e) => U({
|
|
119
|
+
...H,
|
|
119
120
|
status: e.target.value
|
|
120
121
|
}),
|
|
121
|
-
className:
|
|
122
|
-
children:
|
|
122
|
+
className: T,
|
|
123
|
+
children: C.map((e) => /* @__PURE__ */ v("option", {
|
|
123
124
|
value: e,
|
|
124
125
|
children: e
|
|
125
126
|
}, e))
|
|
126
127
|
})] })]
|
|
127
128
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
className:
|
|
130
|
-
children:
|
|
131
|
-
}), /* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
130
|
+
className: E,
|
|
131
|
+
children: O("timecampus.projects.form.description", "Description")
|
|
132
|
+
}), /* @__PURE__ */ v("textarea", {
|
|
132
133
|
placeholder: "Project description",
|
|
133
134
|
rows: 3,
|
|
134
|
-
value:
|
|
135
|
-
onChange: (e) =>
|
|
136
|
-
...
|
|
135
|
+
value: H.description,
|
|
136
|
+
onChange: (e) => U({
|
|
137
|
+
...H,
|
|
137
138
|
description: e.target.value
|
|
138
139
|
}),
|
|
139
|
-
className:
|
|
140
|
+
className: T
|
|
140
141
|
})] }),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ y("div", {
|
|
142
143
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
144
|
-
className:
|
|
145
|
-
children:
|
|
146
|
-
}), /* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
145
|
+
className: E,
|
|
146
|
+
children: O("timecampus.projects.form.estimatedHours", "Estimated Hours")
|
|
147
|
+
}), /* @__PURE__ */ v("input", {
|
|
147
148
|
type: "number",
|
|
148
149
|
placeholder: "0",
|
|
149
|
-
value:
|
|
150
|
-
onChange: (e) =>
|
|
151
|
-
...
|
|
150
|
+
value: H.estimatedHours,
|
|
151
|
+
onChange: (e) => U({
|
|
152
|
+
...H,
|
|
152
153
|
estimatedHours: e.target.value
|
|
153
154
|
}),
|
|
154
|
-
className:
|
|
155
|
-
})] }), /* @__PURE__ */
|
|
156
|
-
className:
|
|
157
|
-
children:
|
|
158
|
-
}), /* @__PURE__ */
|
|
155
|
+
className: T
|
|
156
|
+
})] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
157
|
+
className: E,
|
|
158
|
+
children: O("timecampus.projects.form.hourlyRate", "Hourly Rate")
|
|
159
|
+
}), /* @__PURE__ */ v("input", {
|
|
159
160
|
type: "number",
|
|
160
161
|
placeholder: "0.00",
|
|
161
|
-
value:
|
|
162
|
-
onChange: (e) =>
|
|
163
|
-
...
|
|
162
|
+
value: H.hourlyRate,
|
|
163
|
+
onChange: (e) => U({
|
|
164
|
+
...H,
|
|
164
165
|
hourlyRate: e.target.value
|
|
165
166
|
}),
|
|
166
|
-
className:
|
|
167
|
+
className: T
|
|
167
168
|
})] })]
|
|
168
169
|
})
|
|
169
170
|
]
|
|
170
171
|
});
|
|
171
|
-
return
|
|
172
|
-
title:
|
|
173
|
-
description:
|
|
174
|
-
children: /* @__PURE__ */
|
|
172
|
+
return M ? /* @__PURE__ */ v(e, {
|
|
173
|
+
title: O("timecampus.projects.title", "Projects"),
|
|
174
|
+
description: O("timecampus.projects.description", "Manage and track project time"),
|
|
175
|
+
children: /* @__PURE__ */ v("div", {
|
|
175
176
|
className: "rounded-xl border border-status-error-bg/40 bg-status-error-bg p-6 text-sm text-status-error-text",
|
|
176
|
-
children:
|
|
177
|
+
children: O("timecampus.projects.error.loadFailed", "Failed to load projects. Please try again later.")
|
|
177
178
|
})
|
|
178
|
-
}) : /* @__PURE__ */
|
|
179
|
-
title:
|
|
180
|
-
description:
|
|
181
|
-
purpose:
|
|
182
|
-
actions: /* @__PURE__ */
|
|
183
|
-
onClick:
|
|
179
|
+
}) : /* @__PURE__ */ y(e, {
|
|
180
|
+
title: O("timecampus.projects.title", "Projects"),
|
|
181
|
+
description: O("timecampus.projects.description", "Manage and track project time"),
|
|
182
|
+
purpose: O("timecampus.projects.purpose", "Group your work into projects so every hour you track rolls up to the right client and budget — use it to estimate effort, watch progress against the plan, and bill accurately."),
|
|
183
|
+
actions: /* @__PURE__ */ y("button", {
|
|
184
|
+
onClick: Q,
|
|
184
185
|
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",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ v(g, { className: "h-4 w-4" }), O("timecampus.projects.actions.newProject", "New Project")]
|
|
186
187
|
}),
|
|
187
188
|
children: [
|
|
188
|
-
|
|
189
|
+
j && P.length === 0 ? /* @__PURE__ */ v(n, {
|
|
189
190
|
variant: "card",
|
|
190
191
|
count: 4
|
|
191
|
-
}) :
|
|
192
|
+
}) : P.length === 0 ? /* @__PURE__ */ v(t, {
|
|
192
193
|
illustration: "empty-generic",
|
|
193
|
-
title:
|
|
194
|
-
description:
|
|
195
|
-
action: /* @__PURE__ */
|
|
196
|
-
onClick:
|
|
194
|
+
title: O("timecampus.projects.empty.title", "No projects yet"),
|
|
195
|
+
description: O("timecampus.projects.empty", "No projects yet. Create your first project to get started."),
|
|
196
|
+
action: /* @__PURE__ */ y("button", {
|
|
197
|
+
onClick: Q,
|
|
197
198
|
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",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ v(g, { className: "h-4 w-4" }), O("timecampus.projects.actions.newProject", "New Project")]
|
|
199
200
|
})
|
|
200
|
-
}) : /* @__PURE__ */
|
|
201
|
+
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
|
|
201
202
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
202
|
-
children:
|
|
203
|
+
children: P.map((e) => /* @__PURE__ */ y("div", {
|
|
203
204
|
role: "button",
|
|
204
205
|
tabIndex: 0,
|
|
205
|
-
onClick: () =>
|
|
206
|
+
onClick: () => k(`/projects/${e.id}`),
|
|
206
207
|
onKeyDown: (t) => {
|
|
207
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
208
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), k(`/projects/${e.id}`));
|
|
208
209
|
},
|
|
209
210
|
className: "rounded-xl border border-border-seam bg-gloss-card shadow-pop p-5 transition-colors hover:bg-bg-sunken/50 cursor-pointer",
|
|
210
211
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ y("div", {
|
|
212
213
|
className: "flex items-start justify-between",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ y("div", {
|
|
214
215
|
className: "flex items-center gap-3",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ v("div", {
|
|
216
217
|
className: "h-3 w-3 rounded-full",
|
|
217
218
|
style: { backgroundColor: e.color ?? "var(--color-accent-blue)" }
|
|
218
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
219
220
|
className: "text-sm font-semibold text-text-primary",
|
|
220
221
|
children: e.name
|
|
221
|
-
}), /* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ v("p", {
|
|
222
223
|
className: "text-xs text-text-secondary",
|
|
223
|
-
children: e.clientId ??
|
|
224
|
+
children: e.clientId ?? O("timecampus.projects.card.noClient", "No client")
|
|
224
225
|
})] })]
|
|
225
|
-
}), /* @__PURE__ */
|
|
226
|
-
className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${
|
|
226
|
+
}), /* @__PURE__ */ v("span", {
|
|
227
|
+
className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${s(e.status)}`,
|
|
227
228
|
children: e.status
|
|
228
229
|
})]
|
|
229
230
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ y("div", {
|
|
231
232
|
className: "mt-4",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
233
|
+
children: [/* @__PURE__ */ y("div", {
|
|
233
234
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
234
|
-
children: [/* @__PURE__ */
|
|
235
|
-
}), /* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ v("span", { children: O("timecampus.projects.card.progress", "Progress") }), /* @__PURE__ */ y("span", { children: [e.estimatedHours ? Math.round(e.trackedHours / e.estimatedHours * 100) : 0, "%"] })]
|
|
236
|
+
}), /* @__PURE__ */ v("div", {
|
|
236
237
|
className: "mt-1 h-2 rounded-full bg-bg-sunken",
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ v("div", {
|
|
238
239
|
className: "h-2 rounded-full bg-action-primary-bg",
|
|
239
240
|
style: { width: `${e.estimatedHours ? Math.min(Math.round(e.trackedHours / e.estimatedHours * 100), 100) : 0}%` }
|
|
240
241
|
})
|
|
241
242
|
})]
|
|
242
243
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ y("div", {
|
|
244
245
|
className: "mt-3 flex items-center justify-between text-xs text-text-secondary",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ y("span", { children: [
|
|
246
247
|
o(e.trackedHours),
|
|
247
248
|
" /",
|
|
248
249
|
" ",
|
|
249
250
|
o(e.estimatedHours ?? 0)
|
|
250
|
-
] }), /* @__PURE__ */
|
|
251
|
+
] }), /* @__PURE__ */ y("span", { children: [
|
|
251
252
|
e.tasks?.length ?? 0,
|
|
252
253
|
" ",
|
|
253
|
-
|
|
254
|
+
O("timecampus.projects.card.tasks", "tasks")
|
|
254
255
|
] })]
|
|
255
256
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ y("div", {
|
|
257
258
|
className: "mt-4 flex items-center justify-end gap-1 border-t border-border-subtle pt-3",
|
|
258
259
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ y("button", {
|
|
260
261
|
onClick: (t) => {
|
|
261
262
|
t.stopPropagation(), se(e);
|
|
262
263
|
},
|
|
263
264
|
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
|
|
264
|
-
"aria-label":
|
|
265
|
-
children: [/* @__PURE__ */
|
|
265
|
+
"aria-label": O("timecampus.projects.actions.edit", "Edit"),
|
|
266
|
+
children: [/* @__PURE__ */ v(h, { className: "h-3.5 w-3.5" }), O("timecampus.projects.actions.edit", "Edit")]
|
|
266
267
|
}),
|
|
267
|
-
e.status !== "archived" && /* @__PURE__ */
|
|
268
|
+
e.status !== "archived" && /* @__PURE__ */ y("button", {
|
|
268
269
|
onClick: (t) => {
|
|
269
270
|
t.stopPropagation(), ue(e);
|
|
270
271
|
},
|
|
271
272
|
disabled: ie,
|
|
272
273
|
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-text-secondary hover:bg-bg-sunken hover:text-text-primary disabled:opacity-50",
|
|
273
|
-
"aria-label":
|
|
274
|
-
children: [/* @__PURE__ */
|
|
274
|
+
"aria-label": O("timecampus.projects.actions.archive", "Archive"),
|
|
275
|
+
children: [/* @__PURE__ */ v(m, { className: "h-3.5 w-3.5" }), O("timecampus.projects.actions.archive", "Archive")]
|
|
275
276
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ y("button", {
|
|
277
278
|
onClick: (t) => {
|
|
278
|
-
t.stopPropagation(),
|
|
279
|
+
t.stopPropagation(), V(e);
|
|
279
280
|
},
|
|
280
281
|
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-status-error-text hover:bg-status-error-bg",
|
|
281
|
-
"aria-label":
|
|
282
|
-
children: [/* @__PURE__ */
|
|
282
|
+
"aria-label": O("timecampus.projects.actions.delete", "Delete"),
|
|
283
|
+
children: [/* @__PURE__ */ v(ee, { className: "h-3.5 w-3.5" }), O("timecampus.projects.actions.delete", "Delete")]
|
|
283
284
|
})
|
|
284
285
|
]
|
|
285
286
|
})
|
|
286
287
|
]
|
|
287
288
|
}, e.id))
|
|
288
|
-
}),
|
|
289
|
+
}), F && /* @__PURE__ */ v("div", {
|
|
289
290
|
className: "mt-6 flex justify-center",
|
|
290
|
-
children: /* @__PURE__ */
|
|
291
|
-
onClick: () =>
|
|
292
|
-
disabled:
|
|
291
|
+
children: /* @__PURE__ */ v("button", {
|
|
292
|
+
onClick: () => ne((e) => e + S),
|
|
293
|
+
disabled: j,
|
|
293
294
|
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",
|
|
294
|
-
children:
|
|
295
|
+
children: j ? O("timecampus.common.loading", "Loading…") : O("timecampus.common.loadMore", "Load more")
|
|
295
296
|
})
|
|
296
297
|
})] }),
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
open:
|
|
299
|
-
onClose: () =>
|
|
300
|
-
title:
|
|
301
|
-
description:
|
|
298
|
+
/* @__PURE__ */ y(r, {
|
|
299
|
+
open: I,
|
|
300
|
+
onClose: () => L(!1),
|
|
301
|
+
title: O("timecampus.projects.actions.newProject", "New Project"),
|
|
302
|
+
description: O("timecampus.projects.form.createHint", "Define a new project for time tracking."),
|
|
302
303
|
size: "xl",
|
|
303
|
-
footer: /* @__PURE__ */
|
|
304
|
-
onClick: () =>
|
|
304
|
+
footer: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
|
|
305
|
+
onClick: () => L(!1),
|
|
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",
|
|
306
|
-
children:
|
|
307
|
-
}), /* @__PURE__ */
|
|
307
|
+
children: O("timecampus.common.cancel", "Cancel")
|
|
308
|
+
}), /* @__PURE__ */ v("button", {
|
|
308
309
|
onClick: ce,
|
|
309
|
-
disabled:
|
|
310
|
+
disabled: G || !H.name.trim(),
|
|
310
311
|
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",
|
|
311
|
-
children:
|
|
312
|
+
children: G ? O("timecampus.common.creating", "Creating…") : O("timecampus.projects.actions.create", "Create Project")
|
|
312
313
|
})] }),
|
|
313
|
-
children: [
|
|
314
|
+
children: [K && /* @__PURE__ */ v("div", {
|
|
314
315
|
className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
|
|
315
|
-
children:
|
|
316
|
+
children: O("timecampus.projects.error.createFailed", "Failed to create project. Please try again.")
|
|
316
317
|
}), $]
|
|
317
318
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
open:
|
|
320
|
-
onClose: () =>
|
|
321
|
-
title:
|
|
319
|
+
/* @__PURE__ */ y(r, {
|
|
320
|
+
open: R !== null,
|
|
321
|
+
onClose: () => z(null),
|
|
322
|
+
title: O("timecampus.projects.actions.editProject", "Edit Project"),
|
|
322
323
|
size: "xl",
|
|
323
|
-
footer: /* @__PURE__ */
|
|
324
|
-
onClick: () =>
|
|
324
|
+
footer: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
|
|
325
|
+
onClick: () => z(null),
|
|
325
326
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
326
|
-
children:
|
|
327
|
-
}), /* @__PURE__ */
|
|
327
|
+
children: O("timecampus.common.cancel", "Cancel")
|
|
328
|
+
}), /* @__PURE__ */ v("button", {
|
|
328
329
|
onClick: le,
|
|
329
|
-
disabled:
|
|
330
|
+
disabled: Y || !H.name.trim(),
|
|
330
331
|
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",
|
|
331
|
-
children:
|
|
332
|
+
children: Y ? O("timecampus.common.saving", "Saving…") : O("timecampus.common.saveChanges", "Save Changes")
|
|
332
333
|
})] }),
|
|
333
|
-
children: [
|
|
334
|
+
children: [X && /* @__PURE__ */ v("div", {
|
|
334
335
|
className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
|
|
335
|
-
children:
|
|
336
|
+
children: O("timecampus.projects.error.updateFailed", "Failed to update project. Please try again.")
|
|
336
337
|
}), $]
|
|
337
338
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
-
open:
|
|
340
|
-
onClose: () =>
|
|
341
|
-
title:
|
|
339
|
+
/* @__PURE__ */ y(r, {
|
|
340
|
+
open: B !== null,
|
|
341
|
+
onClose: () => V(null),
|
|
342
|
+
title: O("timecampus.projects.actions.deleteProject", "Delete Project"),
|
|
342
343
|
size: "sm",
|
|
343
|
-
footer: /* @__PURE__ */
|
|
344
|
-
onClick: () =>
|
|
344
|
+
footer: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
|
|
345
|
+
onClick: () => V(null),
|
|
345
346
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
346
|
-
children:
|
|
347
|
-
}), /* @__PURE__ */
|
|
348
|
-
onClick:
|
|
349
|
-
disabled:
|
|
347
|
+
children: O("timecampus.common.cancel", "Cancel")
|
|
348
|
+
}), /* @__PURE__ */ v("button", {
|
|
349
|
+
onClick: de,
|
|
350
|
+
disabled: Z,
|
|
350
351
|
className: "rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50",
|
|
351
|
-
children:
|
|
352
|
+
children: Z ? O("timecampus.common.deleting", "Deleting…") : O("timecampus.common.delete", "Delete")
|
|
352
353
|
})] }),
|
|
353
|
-
children: [oe && /* @__PURE__ */
|
|
354
|
+
children: [oe && /* @__PURE__ */ v("div", {
|
|
354
355
|
className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
|
|
355
|
-
children:
|
|
356
|
-
}), /* @__PURE__ */
|
|
356
|
+
children: O("timecampus.projects.error.deleteFailed", "Failed to delete project. Please try again.")
|
|
357
|
+
}), /* @__PURE__ */ y("p", {
|
|
357
358
|
className: "text-sm text-text-secondary",
|
|
358
359
|
children: [
|
|
359
|
-
|
|
360
|
+
O("timecampus.projects.deleteConfirm", "Are you sure you want to delete"),
|
|
360
361
|
" ",
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ v("span", {
|
|
362
363
|
className: "font-semibold text-text-primary",
|
|
363
|
-
children:
|
|
364
|
+
children: B?.name
|
|
364
365
|
}),
|
|
365
366
|
"? ",
|
|
366
|
-
|
|
367
|
+
O("timecampus.common.cannotUndo", "This action cannot be undone.")
|
|
367
368
|
]
|
|
368
369
|
})]
|
|
369
370
|
})
|
|
370
371
|
]
|
|
371
372
|
});
|
|
372
373
|
}
|
|
373
|
-
export {
|
|
374
|
+
export { D as ProjectsPage };
|
|
374
375
|
|
|
375
376
|
//# sourceMappingURL=ProjectsPage.js.map
|