@burdenoff/microfe-timecampus 2026.830.2 → 2026.904.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/index.js +4 -4
- package/dist/timecampus/pages/HomePage.d.ts.map +1 -1
- package/dist/timecampus/pages/HomePage.js +149 -133
- package/dist/timecampus/pages/HomePage.js.map +1 -1
- package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +7 -7
- package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js +7 -7
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.js +13 -13
- package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js +7 -7
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +7 -7
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/focus-score/FocusScorePage.js +13 -13
- package/dist/timecampus/pages/geofencing/GeofencingPage.js +135 -135
- package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
- package/dist/timecampus/pages/invoicing/InvoicingPage.js +7 -7
- package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/DeadTimeRadarPage.js +8 -8
- package/dist/timecampus/pages/lifetime/FiniteLifePage.js +4 -4
- package/dist/timecampus/pages/lifetime/FiniteLifePage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeBalancePage.js +104 -104
- package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +7 -7
- package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js +33 -33
- package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/RecommendationsPage.js +80 -80
- package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/TimeWellSpentPage.js +16 -16
- package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +11 -11
- package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +11 -11
- package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingDetailPage.js +14 -14
- package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.js +12 -12
- package/dist/timecampus/pages/projects/ProjectsPage.js +5 -5
- package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
- package/dist/timecampus/pages/projects/TasksPage.js +8 -8
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +8 -8
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
- package/dist/timecampus/pages/team/TeamMembersPage.js +8 -8
- package/dist/timecampus/pages/team-activity/TeamActivityPage.js +13 -13
- package/dist/timecampus/pages/time/TimeEntriesPage.js +5 -5
- package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.js +138 -138
- package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.js +14 -14
- package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +26 -26
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.js +8 -8
- package/dist/timecampus/pages/work-patterns/WorkPatternsPage.js +79 -79
- package/dist/timecampus/pages/work-patterns/WorkPatternsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,27 +2,27 @@ import { useTimeCampusNavigate as e } from "../../providers/TimeCampusProvider.j
|
|
|
2
2
|
import { formatHours as t, formatTimerDuration as n, getInitials as ee } from "../../utils/helpers.js";
|
|
3
3
|
import { StatCard as r } from "../../components/StatCard.js";
|
|
4
4
|
import { LoadingSkeleton as i } from "../../components/LoadingSkeleton.js";
|
|
5
|
+
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
5
6
|
import { GetTimeEntryStatsDocument as te, ListRunningTimersDocument as ne, ListTimeEntriesDocument as re, useGetTimeEntryStatsQuery as ie, useListProjectsQuery as ae, useListRunningTimersQuery as oe, useListTimeEntriesQuery as se, useStartTimerMutation as ce, useStopTimerMutation as le } from "../../../generated/wspace-operations.js";
|
|
6
|
-
import { PageLayout as
|
|
7
|
+
import { PageLayout as o } from "../../components/PageLayout.js";
|
|
7
8
|
import { useTimeCampusStore as ue } from "../../store/timecampusStore.js";
|
|
8
|
-
import { StatusBadge as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { DonutChart as pe } from "../../components/charts/DonutChart.js";
|
|
9
|
+
import { StatusBadge as s } from "../../components/StatusBadge.js";
|
|
10
|
+
import { Modal as c } from "../../components/Modal.js";
|
|
11
|
+
import { ChartCard as l } from "../../components/ChartCard.js";
|
|
12
|
+
import { BarsChart as de } from "../../components/charts/BarsChart.js";
|
|
13
|
+
import { DonutChart as fe } from "../../components/charts/DonutChart.js";
|
|
14
14
|
import "../../components/index.js";
|
|
15
|
-
import { useEffect as
|
|
16
|
-
import { Clock as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
import { GlassCard as
|
|
19
|
-
import { useI18n as
|
|
15
|
+
import { useEffect as u, useState as d } from "react";
|
|
16
|
+
import { Clock as f, Pause as p, Play as m, Square as h } from "lucide-react";
|
|
17
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
18
|
+
import { GlassCard as y } from "@burdenoff/fe-libs/ui";
|
|
19
|
+
import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
20
|
//#region src/timecampus/pages/time/TimeTrackingPage.tsx
|
|
21
|
-
function
|
|
22
|
-
let { t:
|
|
23
|
-
let n =
|
|
21
|
+
function x() {
|
|
22
|
+
let { t: x } = b(), S = (e, t) => {
|
|
23
|
+
let n = x(e);
|
|
24
24
|
return n === e ? t : n;
|
|
25
|
-
}, { activeTimer:
|
|
25
|
+
}, { activeTimer: C, tickTimer: w, syncTimerFromServer: T } = ue(), E = e(), [pe, D] = d(!1), [O, k] = d(""), [A, j] = d(""), [M, N] = d(!1), { data: P, loading: F } = ie(), { data: I, loading: L } = se({ variables: { pagination: { limit: 10 } } }), { data: R, loading: z, refetch: B } = oe({ fetchPolicy: "cache-and-network" }), { data: me } = ae({ variables: { pagination: { limit: 50 } } }), he = me?.projects?.items ?? [], V = R?.runningTimers?.[0] ?? null, H = [
|
|
26
26
|
{ query: ne },
|
|
27
27
|
{
|
|
28
28
|
query: re,
|
|
@@ -30,23 +30,23 @@ function b() {
|
|
|
30
30
|
},
|
|
31
31
|
{ query: te }
|
|
32
32
|
], [ge, { loading: U, error: _e }] = ce({ refetchQueries: H }), [ve, { loading: W }] = le({ refetchQueries: H });
|
|
33
|
-
|
|
34
|
-
V ?
|
|
33
|
+
u(() => {
|
|
34
|
+
V ? T({
|
|
35
35
|
timeEntryId: V.timeEntry.id,
|
|
36
36
|
elapsedSeconds: V.elapsedSeconds,
|
|
37
37
|
projectId: V.timeEntry.projectId ?? void 0,
|
|
38
38
|
taskId: V.timeEntry.taskId ?? void 0,
|
|
39
39
|
description: V.timeEntry.description ?? void 0
|
|
40
|
-
}) : z ||
|
|
40
|
+
}) : z || T(null);
|
|
41
41
|
}, [
|
|
42
42
|
V?.timeEntry.id,
|
|
43
43
|
V?.elapsedSeconds,
|
|
44
44
|
z
|
|
45
|
-
]),
|
|
46
|
-
if (!
|
|
47
|
-
let e = setInterval(() =>
|
|
45
|
+
]), u(() => {
|
|
46
|
+
if (!C?.isRunning) return;
|
|
47
|
+
let e = setInterval(() => w(), 1e3);
|
|
48
48
|
return () => clearInterval(e);
|
|
49
|
-
}, [
|
|
49
|
+
}, [C?.isRunning, w]);
|
|
50
50
|
let G = !!V, ye = async () => {
|
|
51
51
|
await ge({ variables: { input: {
|
|
52
52
|
description: O.trim() || void 0,
|
|
@@ -56,11 +56,11 @@ function b() {
|
|
|
56
56
|
} } }), D(!1), k(""), j(""), N(!1), await B();
|
|
57
57
|
}, K = async () => {
|
|
58
58
|
V && (await ve({ variables: { id: V.timeEntry.id } }), await B());
|
|
59
|
-
}, q = P?.timeEntryStats, J = I?.timeEntries?.items ?? [], Y =
|
|
60
|
-
name:
|
|
59
|
+
}, q = P?.timeEntryStats, J = I?.timeEntries?.items ?? [], Y = S("timecampus.timeTracking.entries.noProject", "No Project"), X = q?.billableHours ?? 0, Z = q?.totalHours ?? 0, be = Math.max(0, Z - X), Q = Z > 0 ? Math.round(X / Z * 100) : 0, xe = [{
|
|
60
|
+
name: S("timecampus.timeTracking.charts.billable", "Billable"),
|
|
61
61
|
value: Number(X.toFixed(2))
|
|
62
62
|
}, {
|
|
63
|
-
name:
|
|
63
|
+
name: S("timecampus.timeTracking.charts.nonBillable", "Non-billable"),
|
|
64
64
|
value: Number(be.toFixed(2))
|
|
65
65
|
}], $ = /* @__PURE__ */ new Map();
|
|
66
66
|
for (let e of J) {
|
|
@@ -71,254 +71,254 @@ function b() {
|
|
|
71
71
|
name: e,
|
|
72
72
|
hours: Number(t.toFixed(2))
|
|
73
73
|
})).filter((e) => e.hours > 0).sort((e, t) => t.hours - e.hours).slice(0, 6);
|
|
74
|
-
return F ? /* @__PURE__ */
|
|
75
|
-
title:
|
|
76
|
-
description:
|
|
77
|
-
children: /* @__PURE__ */
|
|
74
|
+
return F ? /* @__PURE__ */ _(o, {
|
|
75
|
+
title: S("timecampus.timeTracking.title", "Time Tracking"),
|
|
76
|
+
description: S("timecampus.timeTracking.description", "Track and manage your work hours"),
|
|
77
|
+
children: /* @__PURE__ */ _(i, {
|
|
78
78
|
variant: "card",
|
|
79
79
|
count: 4
|
|
80
80
|
})
|
|
81
|
-
}) : /* @__PURE__ */
|
|
82
|
-
title:
|
|
83
|
-
description:
|
|
84
|
-
purpose:
|
|
85
|
-
actions: /* @__PURE__ */
|
|
81
|
+
}) : /* @__PURE__ */ v(o, {
|
|
82
|
+
title: S("timecampus.timeTracking.title", "Time Tracking"),
|
|
83
|
+
description: S("timecampus.timeTracking.description", "Track and manage your work hours"),
|
|
84
|
+
purpose: S("timecampus.timeTracking.purpose", "Start a timer the moment you begin work and your hours are captured automatically — review today's totals, see what's billable, and stop guessing where your day went."),
|
|
85
|
+
actions: /* @__PURE__ */ _("button", {
|
|
86
86
|
onClick: () => G ? K() : D(!0),
|
|
87
87
|
disabled: U || W,
|
|
88
88
|
className: `inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium disabled:opacity-50 ${G ? "bg-action-danger-bg text-action-primary-text hover:bg-action-danger-bg/90" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"}`,
|
|
89
|
-
children: G ? /* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
|
|
89
|
+
children: G ? /* @__PURE__ */ v(g, { children: [
|
|
90
|
+
/* @__PURE__ */ _(h, { className: "h-4 w-4" }),
|
|
91
|
+
S("timecampus.timeTracking.actions.stop", "Stop"),
|
|
92
92
|
" (",
|
|
93
|
-
n(
|
|
93
|
+
n(C?.seconds ?? 0),
|
|
94
94
|
")"
|
|
95
|
-
] }) : /* @__PURE__ */
|
|
95
|
+
] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), S("timecampus.timeTracking.actions.startTimer", "Start Timer")] })
|
|
96
96
|
}),
|
|
97
97
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ _(y, {
|
|
99
99
|
treatment: "glass",
|
|
100
100
|
glow: !0,
|
|
101
101
|
className: "p-6 sm:p-8",
|
|
102
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ v("div", {
|
|
103
103
|
className: "flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ v("div", {
|
|
105
105
|
className: "min-w-0",
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ v("div", {
|
|
108
108
|
className: "flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ _("span", { className: `h-2 w-2 rounded-full ${G ? "bg-status-success-text motion-safe:animate-vc-glow-pulse" : "bg-muted-foreground"}` }), G ? S("timecampus.timeTracking.hero.running", "Timer running") : S("timecampus.timeTracking.hero.idle", "Timer idle")]
|
|
110
110
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ _("p", {
|
|
112
112
|
className: "mt-3 font-mono text-5xl font-bold tabular-nums text-text-primary sm:text-6xl",
|
|
113
|
-
children: n(
|
|
113
|
+
children: n(C?.seconds ?? 0)
|
|
114
114
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ v("div", {
|
|
116
116
|
className: "mt-3 flex flex-wrap items-center gap-2 text-sm text-text-secondary",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ _("span", {
|
|
118
118
|
className: "min-w-0 truncate",
|
|
119
|
-
children:
|
|
120
|
-
}), V?.timeEntry.project?.name && /* @__PURE__ */
|
|
119
|
+
children: C?.description || (G ? S("timecampus.timeTracking.entries.noDescription", "No description") : S("timecampus.timeTracking.hero.prompt", "Start a timer to begin tracking"))
|
|
120
|
+
}), V?.timeEntry.project?.name && /* @__PURE__ */ _(s, {
|
|
121
121
|
label: V.timeEntry.project.name,
|
|
122
122
|
variant: "default"
|
|
123
123
|
})]
|
|
124
124
|
})
|
|
125
125
|
]
|
|
126
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ _("div", {
|
|
127
127
|
className: "flex shrink-0 items-center gap-3",
|
|
128
|
-
children: G ? /* @__PURE__ */
|
|
128
|
+
children: G ? /* @__PURE__ */ v("button", {
|
|
129
129
|
onClick: K,
|
|
130
130
|
disabled: W,
|
|
131
131
|
className: "inline-flex items-center gap-2 rounded-md bg-action-danger-bg px-6 py-3 text-sm font-medium text-action-primary-text hover:bg-action-danger-bg/90 disabled:opacity-50",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
-
}) : /* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), W ? S("timecampus.timeTracking.hero.stopping", "Stopping...") : S("timecampus.timeTracking.actions.stop", "Stop")]
|
|
133
|
+
}) : /* @__PURE__ */ v("button", {
|
|
134
134
|
onClick: () => D(!0),
|
|
135
135
|
disabled: U,
|
|
136
136
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-6 py-3 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), S("timecampus.timeTracking.actions.startTimer", "Start Timer")]
|
|
138
138
|
})
|
|
139
139
|
})]
|
|
140
140
|
})
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ v("div", {
|
|
143
143
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
144
144
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ _(r, {
|
|
146
146
|
featured: !0,
|
|
147
|
-
title:
|
|
147
|
+
title: S("timecampus.timeTracking.stats.today", "Today"),
|
|
148
148
|
value: t(Z),
|
|
149
|
-
icon: /* @__PURE__ */
|
|
150
|
-
description: `${Q}% ${
|
|
149
|
+
icon: /* @__PURE__ */ _(f, { className: "h-5 w-5" }),
|
|
150
|
+
description: `${Q}% ${S("timecampus.timeTracking.stats.billableSuffix", "billable")}`
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
title:
|
|
152
|
+
/* @__PURE__ */ _(r, {
|
|
153
|
+
title: S("timecampus.timeTracking.stats.billable", "Billable"),
|
|
154
154
|
value: t(q?.billableHours ?? 0),
|
|
155
|
-
icon: /* @__PURE__ */
|
|
156
|
-
description: `${q?.totalEntries ?? 0} ${
|
|
155
|
+
icon: /* @__PURE__ */ _(f, { className: "h-5 w-5" }),
|
|
156
|
+
description: `${q?.totalEntries ?? 0} ${S("timecampus.timeTracking.stats.entries", "entries")}`
|
|
157
157
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
title:
|
|
158
|
+
/* @__PURE__ */ _(r, {
|
|
159
|
+
title: S("timecampus.timeTracking.stats.activeTimers", "Active Timers"),
|
|
160
160
|
value: q?.activeTimers ?? 0,
|
|
161
|
-
icon: /* @__PURE__ */
|
|
162
|
-
description:
|
|
161
|
+
icon: /* @__PURE__ */ _(f, { className: "h-5 w-5" }),
|
|
162
|
+
description: S("timecampus.timeTracking.stats.currentlyRunning", "Currently running")
|
|
163
163
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
title:
|
|
166
|
-
value:
|
|
167
|
-
icon:
|
|
164
|
+
/* @__PURE__ */ _(r, {
|
|
165
|
+
title: S("timecampus.timeTracking.stats.activeTimer", "Active Timer"),
|
|
166
|
+
value: C ? n(C.seconds) : S("timecampus.timeTracking.stats.stopped", "Stopped"),
|
|
167
|
+
icon: _(C ? p : m, { className: "h-5 w-5" })
|
|
168
168
|
})
|
|
169
169
|
]
|
|
170
170
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ v("div", {
|
|
172
172
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
174
|
-
title:
|
|
175
|
-
description:
|
|
176
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ _(l, {
|
|
174
|
+
title: S("timecampus.timeTracking.charts.billableTitle", "Billable mix"),
|
|
175
|
+
description: S("timecampus.timeTracking.charts.billableDesc", "Billable vs non-billable hours"),
|
|
176
|
+
children: /* @__PURE__ */ _(fe, {
|
|
177
177
|
data: xe,
|
|
178
178
|
centerValue: `${Q}%`,
|
|
179
|
-
centerLabel:
|
|
179
|
+
centerLabel: S("timecampus.timeTracking.charts.billableCenter", "billable"),
|
|
180
180
|
valueFormat: (e) => t(e),
|
|
181
|
-
emptyLabel:
|
|
181
|
+
emptyLabel: S("timecampus.timeTracking.charts.noHours", "No hours tracked yet"),
|
|
182
182
|
height: 240
|
|
183
183
|
})
|
|
184
|
-
}), /* @__PURE__ */
|
|
185
|
-
title:
|
|
186
|
-
description:
|
|
187
|
-
children: /* @__PURE__ */
|
|
184
|
+
}), /* @__PURE__ */ _(l, {
|
|
185
|
+
title: S("timecampus.timeTracking.charts.projectTitle", "Hours by project"),
|
|
186
|
+
description: S("timecampus.timeTracking.charts.projectDesc", "Where your recent tracked time went"),
|
|
187
|
+
children: /* @__PURE__ */ _(de, {
|
|
188
188
|
data: Se,
|
|
189
189
|
xKey: "name",
|
|
190
190
|
series: [{
|
|
191
191
|
key: "hours",
|
|
192
|
-
label:
|
|
192
|
+
label: S("timecampus.timeTracking.charts.hours", "Hours")
|
|
193
193
|
}],
|
|
194
194
|
orientation: "horizontal",
|
|
195
195
|
valueFormat: (e) => t(e),
|
|
196
196
|
categoryWidth: 110,
|
|
197
|
-
emptyLabel:
|
|
197
|
+
emptyLabel: S("timecampus.timeTracking.charts.noProjectHours", "No project time yet"),
|
|
198
198
|
height: 240
|
|
199
199
|
})
|
|
200
200
|
})]
|
|
201
201
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ v(y, {
|
|
203
203
|
treatment: "glass",
|
|
204
204
|
className: "p-6",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ v("div", {
|
|
206
206
|
className: "mb-4 flex items-center justify-between",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ _("h3", {
|
|
208
208
|
className: "text-sm font-semibold text-text-primary",
|
|
209
|
-
children:
|
|
210
|
-
}), /* @__PURE__ */
|
|
211
|
-
onClick: () =>
|
|
209
|
+
children: S("timecampus.timeTracking.entries.title", "Today's Entries")
|
|
210
|
+
}), /* @__PURE__ */ _("button", {
|
|
211
|
+
onClick: () => E("/time/entries"),
|
|
212
212
|
className: "text-sm font-medium text-primary hover:underline",
|
|
213
|
-
children:
|
|
213
|
+
children: S("timecampus.timeTracking.entries.viewAll", "View all")
|
|
214
214
|
})]
|
|
215
|
-
}), L ? /* @__PURE__ */
|
|
215
|
+
}), L ? /* @__PURE__ */ _(i, {
|
|
216
216
|
variant: "list",
|
|
217
217
|
count: 4
|
|
218
|
-
}) : J.length === 0 ? /* @__PURE__ */
|
|
218
|
+
}) : J.length === 0 ? /* @__PURE__ */ _(a, {
|
|
219
219
|
illustration: "empty-data",
|
|
220
|
-
title:
|
|
221
|
-
description:
|
|
222
|
-
action: /* @__PURE__ */
|
|
220
|
+
title: S("timecampus.timeTracking.entries.empty.title", "No time entries yet"),
|
|
221
|
+
description: S("timecampus.timeTracking.entries.empty", "No time entries yet. Start a timer to begin tracking."),
|
|
222
|
+
action: /* @__PURE__ */ v("button", {
|
|
223
223
|
onClick: () => D(!0),
|
|
224
224
|
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",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), S("timecampus.timeTracking.actions.startTimer", "Start Timer")]
|
|
226
226
|
})
|
|
227
|
-
}) : /* @__PURE__ */
|
|
227
|
+
}) : /* @__PURE__ */ _("div", {
|
|
228
228
|
className: "flex flex-col gap-2",
|
|
229
|
-
children: J.map((e) => /* @__PURE__ */
|
|
229
|
+
children: J.map((e) => /* @__PURE__ */ v("div", {
|
|
230
230
|
className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface p-3 transition-colors hover:bg-bg-sunken/50",
|
|
231
231
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ _("span", {
|
|
233
233
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-xs font-semibold text-primary",
|
|
234
234
|
children: ee(e.project?.name ?? Y)
|
|
235
235
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ v("div", {
|
|
237
237
|
className: "min-w-0 flex-1",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ v("div", {
|
|
239
239
|
className: "flex items-center gap-2",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ _("p", {
|
|
241
241
|
className: "min-w-0 truncate text-sm font-medium text-text-primary",
|
|
242
242
|
children: e.project?.name ?? Y
|
|
243
|
-
}), e.billable && /* @__PURE__ */
|
|
244
|
-
label:
|
|
243
|
+
}), e.billable && /* @__PURE__ */ _(s, {
|
|
244
|
+
label: S("timecampus.timeTracking.charts.billable", "Billable"),
|
|
245
245
|
variant: "success",
|
|
246
246
|
className: "shrink-0"
|
|
247
247
|
})]
|
|
248
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ _("p", {
|
|
249
249
|
className: "truncate text-xs text-text-secondary",
|
|
250
|
-
children: e.task?.title ?? e.description ??
|
|
250
|
+
children: e.task?.title ?? e.description ?? S("timecampus.timeTracking.entries.noDescription", "No description")
|
|
251
251
|
})]
|
|
252
252
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ v("div", {
|
|
254
254
|
className: "flex shrink-0 flex-col items-end gap-1",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ _("p", {
|
|
256
256
|
className: "font-mono text-sm font-medium text-text-primary",
|
|
257
257
|
children: t((e.duration ?? 0) / 3600)
|
|
258
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ _(s, {
|
|
259
259
|
status: e.isRunning ? "running" : "completed",
|
|
260
260
|
dot: e.isRunning,
|
|
261
|
-
label: e.isRunning ?
|
|
261
|
+
label: e.isRunning ? S("timecampus.timeTracking.entries.status.running", "running") : S("timecampus.timeTracking.entries.status.completed", "completed")
|
|
262
262
|
})]
|
|
263
263
|
})
|
|
264
264
|
]
|
|
265
265
|
}, e.id))
|
|
266
266
|
})]
|
|
267
267
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
open:
|
|
268
|
+
/* @__PURE__ */ v(c, {
|
|
269
|
+
open: pe,
|
|
270
270
|
onClose: () => D(!1),
|
|
271
|
-
title:
|
|
272
|
-
description:
|
|
273
|
-
footer: /* @__PURE__ */
|
|
271
|
+
title: S("timecampus.timeTracking.startModal.title", "Start a timer"),
|
|
272
|
+
description: S("timecampus.timeTracking.startModal.description", "Track the task you're working on right now."),
|
|
273
|
+
footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
|
|
274
274
|
onClick: () => D(!1),
|
|
275
275
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
276
|
-
children:
|
|
277
|
-
}), /* @__PURE__ */
|
|
276
|
+
children: S("timecampus.common.cancel", "Cancel")
|
|
277
|
+
}), /* @__PURE__ */ _("button", {
|
|
278
278
|
onClick: ye,
|
|
279
279
|
disabled: U,
|
|
280
280
|
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",
|
|
281
|
-
children: U ?
|
|
281
|
+
children: U ? S("timecampus.timeTracking.startModal.starting", "Starting...") : S("timecampus.timeTracking.actions.startTimer", "Start Timer")
|
|
282
282
|
})] }),
|
|
283
|
-
children: [_e && /* @__PURE__ */
|
|
283
|
+
children: [_e && /* @__PURE__ */ _("div", {
|
|
284
284
|
className: "mb-4 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
|
|
285
|
-
children:
|
|
286
|
-
}), /* @__PURE__ */
|
|
285
|
+
children: S("timecampus.timeTracking.startModal.error", "Failed to start the timer. Please try again.")
|
|
286
|
+
}), /* @__PURE__ */ v("div", {
|
|
287
287
|
className: "space-y-4",
|
|
288
288
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
290
290
|
className: "block text-sm font-medium text-text-primary",
|
|
291
|
-
children:
|
|
292
|
-
}), /* @__PURE__ */
|
|
291
|
+
children: S("timecampus.timeTracking.startModal.descriptionLabel", "What are you working on?")
|
|
292
|
+
}), /* @__PURE__ */ _("input", {
|
|
293
293
|
type: "text",
|
|
294
|
-
placeholder:
|
|
294
|
+
placeholder: S("timecampus.timeTracking.startModal.descriptionPlaceholder", "Description"),
|
|
295
295
|
value: O,
|
|
296
296
|
onChange: (e) => k(e.target.value),
|
|
297
297
|
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"
|
|
298
298
|
})] }),
|
|
299
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
300
300
|
className: "block text-sm font-medium text-text-primary",
|
|
301
|
-
children:
|
|
302
|
-
}), /* @__PURE__ */
|
|
301
|
+
children: S("timecampus.timeTracking.startModal.projectLabel", "Project")
|
|
302
|
+
}), /* @__PURE__ */ v("select", {
|
|
303
303
|
value: A,
|
|
304
304
|
onChange: (e) => j(e.target.value),
|
|
305
305
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ _("option", {
|
|
307
307
|
value: "",
|
|
308
|
-
children:
|
|
309
|
-
}), he.map((e) => /* @__PURE__ */
|
|
308
|
+
children: S("timecampus.timeTracking.entries.noProject", "No Project")
|
|
309
|
+
}), he.map((e) => /* @__PURE__ */ _("option", {
|
|
310
310
|
value: e.id,
|
|
311
311
|
children: e.name
|
|
312
312
|
}, e.id))]
|
|
313
313
|
})] }),
|
|
314
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ v("label", {
|
|
315
315
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ _("input", {
|
|
317
317
|
type: "checkbox",
|
|
318
318
|
checked: M,
|
|
319
319
|
onChange: (e) => N(e.target.checked),
|
|
320
320
|
className: "h-4 w-4 rounded border-border-subtle"
|
|
321
|
-
}),
|
|
321
|
+
}), S("timecampus.timeTracking.startModal.billable", "Billable")]
|
|
322
322
|
})
|
|
323
323
|
]
|
|
324
324
|
})]
|
|
@@ -327,6 +327,6 @@ function b() {
|
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
//#endregion
|
|
330
|
-
export {
|
|
330
|
+
export { x as TimeTrackingPage };
|
|
331
331
|
|
|
332
332
|
//# sourceMappingURL=TimeTrackingPage.js.map
|