@burdenoff/microfe-timecampus 2026.1031.9 → 2026.1031.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-operations.d.ts +45 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +710 -672
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +731 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +14 -12
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/timecampus/analytics/index.d.ts +3 -0
- package/dist/timecampus/analytics/index.d.ts.map +1 -0
- package/dist/timecampus/analytics/index.js +3 -0
- package/dist/timecampus/analytics/timecampusAnalytics.d.ts +83 -0
- package/dist/timecampus/analytics/timecampusAnalytics.d.ts.map +1 -0
- package/dist/timecampus/analytics/timecampusAnalytics.js +175 -0
- package/dist/timecampus/analytics/timecampusAnalytics.js.map +1 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts +16 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts.map +1 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.js +48 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.js.map +1 -0
- package/dist/timecampus/components/ActivationCard.d.ts +3 -0
- package/dist/timecampus/components/ActivationCard.d.ts.map +1 -0
- package/dist/timecampus/components/ActivationCard.js +156 -0
- package/dist/timecampus/components/ActivationCard.js.map +1 -0
- package/dist/timecampus/index.js +7 -7
- package/dist/timecampus/pages/HomePage.d.ts.map +1 -1
- package/dist/timecampus/pages/HomePage.js +142 -139
- package/dist/timecampus/pages/HomePage.js.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.d.ts.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js +244 -228
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/AnalyticsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/AnalyticsPage.js +117 -112
- package/dist/timecampus/pages/dashboard/AnalyticsPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.js +105 -102
- package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +209 -192
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/focus-score/FocusScorePage.d.ts.map +1 -1
- package/dist/timecampus/pages/focus-score/FocusScorePage.js +71 -68
- package/dist/timecampus/pages/focus-score/FocusScorePage.js.map +1 -1
- package/dist/timecampus/pages/invoicing/InvoicingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/invoicing/InvoicingPage.js +157 -150
- package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingCreatePage.d.ts.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js +58 -52
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.js +51 -45
- package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.d.ts.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js +55 -51
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectCreatePage.d.ts.map +1 -1
- package/dist/timecampus/pages/projects/ProjectCreatePage.js +59 -49
- package/dist/timecampus/pages/projects/ProjectCreatePage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.js +165 -155
- package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.js +194 -186
- package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.js +139 -126
- package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.js +48 -35
- package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +60 -50
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.d.ts.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.js +223 -219
- package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
- package/dist/timecampus/pages/work-patterns/WorkPatternsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/work-patterns/WorkPatternsPage.js +1 -5
- package/dist/timecampus/pages/work-patterns/WorkPatternsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,267 +4,270 @@ import { StatCard as r } from "../components/StatCard.js";
|
|
|
4
4
|
import { LoadingSkeleton as i } from "../components/LoadingSkeleton.js";
|
|
5
5
|
import { EmptyState as a } from "../components/EmptyState.js";
|
|
6
6
|
import { useGetTimeEntryStatsQuery as o, useListTimeEntriesQuery as s } from "../../generated/wspace-operations.js";
|
|
7
|
-
import {
|
|
7
|
+
import { usePageViewed as c } from "../analytics/useTimeCampusAnalytics.js";
|
|
8
|
+
import "../analytics/index.js";
|
|
9
|
+
import { useTr as l } from "../shared/hooks/useTr.js";
|
|
8
10
|
import "../hooks/index.js";
|
|
9
|
-
import { ArrowRight as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { AuroraBackground as
|
|
11
|
+
import { ArrowRight as u, BarChart3 as d, CheckCircle as f, Clock as p, FolderOpen as m, Play as h, TrendingUp as g, Users as _ } from "lucide-react";
|
|
12
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
13
|
+
import { AuroraBackground as x, CTAOverflowMenu as S, EmphasisPanel as C, GlassCard as w, GradientText as T } from "@burdenoff/fe-libs/ui";
|
|
12
14
|
//#region src/timecampus/pages/HomePage.tsx
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
+
var E = () => {
|
|
16
|
+
c("dashboard");
|
|
17
|
+
let E = l(), D = e(), { data: O, loading: k } = o(), { data: A, loading: j } = s({ variables: { pagination: { limit: 4 } } }), M = O?.timeEntryStats, N = A?.timeEntries?.items ?? [], P = !k && !j && (M?.totalEntries ?? 0) === 0, F = /* @__PURE__ */ y(S, {
|
|
15
18
|
primary: {
|
|
16
|
-
label:
|
|
17
|
-
onSelect: () =>
|
|
18
|
-
icon: /* @__PURE__ */
|
|
19
|
+
label: E("timecampus.home.actions.startTimer", "Start Timer"),
|
|
20
|
+
onSelect: () => D("/time/timer"),
|
|
21
|
+
icon: /* @__PURE__ */ y(h, { className: "h-4 w-4" })
|
|
19
22
|
},
|
|
20
23
|
actions: [{
|
|
21
|
-
label:
|
|
22
|
-
onSelect: () =>
|
|
23
|
-
icon: /* @__PURE__ */
|
|
24
|
+
label: E("timecampus.home.quickActions.viewProjects.label", "View Projects"),
|
|
25
|
+
onSelect: () => D("/projects"),
|
|
26
|
+
icon: /* @__PURE__ */ y(m, { className: "h-4 w-4" })
|
|
24
27
|
}, {
|
|
25
|
-
label:
|
|
26
|
-
onSelect: () =>
|
|
27
|
-
icon: /* @__PURE__ */
|
|
28
|
+
label: E("timecampus.home.quickActions.reports.label", "Reports"),
|
|
29
|
+
onSelect: () => D("/reports"),
|
|
30
|
+
icon: /* @__PURE__ */ y(d, { className: "h-4 w-4" })
|
|
28
31
|
}]
|
|
29
|
-
}),
|
|
32
|
+
}), I = () => /* @__PURE__ */ b("div", {
|
|
30
33
|
className: "relative overflow-hidden rounded-2xl border border-border-seam bg-gloss-card p-5 sm:p-6",
|
|
31
|
-
children: [/* @__PURE__ */
|
|
34
|
+
children: [/* @__PURE__ */ y(x, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
|
|
32
35
|
className: "relative flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ b("div", {
|
|
34
37
|
className: "min-w-0",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ y("h1", {
|
|
36
39
|
className: "text-2xl font-bold text-text-primary",
|
|
37
|
-
children: /* @__PURE__ */
|
|
38
|
-
}), /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ y(T, { children: E("timecampus.home.title", "Dashboard") })
|
|
41
|
+
}), /* @__PURE__ */ y("p", {
|
|
39
42
|
className: "mt-1 text-sm text-text-secondary",
|
|
40
|
-
children:
|
|
43
|
+
children: E("timecampus.home.description", "Overview of your time tracking and productivity")
|
|
41
44
|
})]
|
|
42
|
-
}),
|
|
45
|
+
}), F]
|
|
43
46
|
})]
|
|
44
47
|
});
|
|
45
|
-
return
|
|
48
|
+
return k && j ? /* @__PURE__ */ b("div", {
|
|
46
49
|
className: "min-h-full space-y-6 p-4 sm:p-6",
|
|
47
|
-
children: [
|
|
50
|
+
children: [I(), /* @__PURE__ */ y(i, {
|
|
48
51
|
variant: "card",
|
|
49
52
|
count: 4
|
|
50
53
|
})]
|
|
51
|
-
}) : /* @__PURE__ */
|
|
54
|
+
}) : /* @__PURE__ */ b("div", {
|
|
52
55
|
className: "min-h-full space-y-6 p-4 sm:p-6",
|
|
53
56
|
children: [
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
I(),
|
|
58
|
+
P ? /* @__PURE__ */ b("div", {
|
|
56
59
|
className: "flex flex-col items-center gap-3",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ y(a, {
|
|
58
61
|
illustration: "empty-data",
|
|
59
|
-
title:
|
|
60
|
-
description:
|
|
61
|
-
action: /* @__PURE__ */
|
|
62
|
+
title: E("timecampus.home.gettingStarted.title", "Let's get you started"),
|
|
63
|
+
description: E("timecampus.home.gettingStarted.description", "TimeCampus tracks your time when you start a timer — stop it when you're done, and everything else (your Timeline, Focus Score, and Reports) fills in automatically from what you track. No extra setup needed."),
|
|
64
|
+
action: /* @__PURE__ */ b("button", {
|
|
62
65
|
type: "button",
|
|
63
|
-
onClick: () =>
|
|
66
|
+
onClick: () => D("/time/timer"),
|
|
64
67
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), E("timecampus.home.gettingStarted.action", "Start your first timer")]
|
|
66
69
|
})
|
|
67
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ y("p", {
|
|
68
71
|
className: "max-w-md text-center text-xs text-text-secondary",
|
|
69
|
-
children:
|
|
72
|
+
children: E("timecampus.home.gettingStarted.footnote", "That's the only thing to set up. Pomodoro, Life tracking, reports and everything else in the sidebar are there whenever you're curious — nothing else needs configuring first.")
|
|
70
73
|
})]
|
|
71
|
-
}) : /* @__PURE__ */
|
|
74
|
+
}) : /* @__PURE__ */ b("div", {
|
|
72
75
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
73
76
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ y(r, {
|
|
75
78
|
featured: !0,
|
|
76
|
-
title:
|
|
77
|
-
value: n(
|
|
78
|
-
icon: /* @__PURE__ */
|
|
79
|
+
title: E("timecampus.home.stats.today", "Today"),
|
|
80
|
+
value: n(M?.totalHours ?? 0),
|
|
81
|
+
icon: /* @__PURE__ */ y(p, { className: "h-5 w-5" }),
|
|
79
82
|
trend: {
|
|
80
83
|
value: 12.5,
|
|
81
|
-
label:
|
|
84
|
+
label: E("timecampus.home.stats.vsYesterday", "vs yesterday")
|
|
82
85
|
}
|
|
83
86
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
title:
|
|
86
|
-
value: n(
|
|
87
|
-
icon: /* @__PURE__ */
|
|
88
|
-
description: `${
|
|
87
|
+
/* @__PURE__ */ y(r, {
|
|
88
|
+
title: E("timecampus.home.stats.billable", "Billable"),
|
|
89
|
+
value: n(M?.billableHours ?? 0),
|
|
90
|
+
icon: /* @__PURE__ */ y(g, { className: "h-5 w-5" }),
|
|
91
|
+
description: `${M?.totalEntries ?? 0} ${E("timecampus.home.stats.entries", "entries")}`
|
|
89
92
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
title:
|
|
92
|
-
value:
|
|
93
|
-
icon: /* @__PURE__ */
|
|
94
|
-
description:
|
|
93
|
+
/* @__PURE__ */ y(r, {
|
|
94
|
+
title: E("timecampus.home.stats.activeTimers", "Active Timers"),
|
|
95
|
+
value: M?.activeTimers ?? 0,
|
|
96
|
+
icon: /* @__PURE__ */ y(m, { className: "h-5 w-5" }),
|
|
97
|
+
description: E("timecampus.home.stats.currentlyRunning", "Currently running")
|
|
95
98
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
title:
|
|
98
|
-
value:
|
|
99
|
-
icon: /* @__PURE__ */
|
|
100
|
-
description:
|
|
99
|
+
/* @__PURE__ */ y(r, {
|
|
100
|
+
title: E("timecampus.home.stats.totalEntries", "Entries"),
|
|
101
|
+
value: M?.totalEntries ?? 0,
|
|
102
|
+
icon: /* @__PURE__ */ y(d, { className: "h-5 w-5" }),
|
|
103
|
+
description: E("timecampus.home.stats.totalEntriesDescription", "Total time entries")
|
|
101
104
|
})
|
|
102
105
|
]
|
|
103
106
|
}),
|
|
104
|
-
!
|
|
107
|
+
!P && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b("div", {
|
|
105
108
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ b(w, {
|
|
107
110
|
treatment: "plain",
|
|
108
111
|
className: "border-border-seam p-6 lg:col-span-2",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ b("div", {
|
|
110
113
|
className: "mb-4 flex items-center justify-between",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
112
115
|
className: "text-sm font-semibold text-text-primary",
|
|
113
|
-
children:
|
|
114
|
-
}), /* @__PURE__ */
|
|
116
|
+
children: E("timecampus.home.recentEntries.title", "Recent Time Entries")
|
|
117
|
+
}), /* @__PURE__ */ y("p", {
|
|
115
118
|
className: "text-xs text-text-secondary",
|
|
116
|
-
children:
|
|
117
|
-
})] }), /* @__PURE__ */
|
|
118
|
-
onClick: () =>
|
|
119
|
+
children: E("timecampus.home.recentEntries.description", "Your latest tracked activities")
|
|
120
|
+
})] }), /* @__PURE__ */ b("button", {
|
|
121
|
+
onClick: () => D("/time/entries"),
|
|
119
122
|
className: "inline-flex min-h-[2.75rem] items-center gap-1 rounded-md px-2 text-xs font-medium text-primary transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
|
|
120
123
|
children: [
|
|
121
|
-
|
|
124
|
+
E("timecampus.home.recentEntries.viewAll", "View all"),
|
|
122
125
|
" ",
|
|
123
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ y(u, { className: "h-3 w-3" })
|
|
124
127
|
]
|
|
125
128
|
})]
|
|
126
|
-
}),
|
|
129
|
+
}), j ? /* @__PURE__ */ y(i, {
|
|
127
130
|
variant: "list",
|
|
128
131
|
count: 4
|
|
129
|
-
}) : /* @__PURE__ */
|
|
132
|
+
}) : /* @__PURE__ */ b("div", {
|
|
130
133
|
className: "flex flex-col gap-3",
|
|
131
|
-
children: [
|
|
134
|
+
children: [N.map((e) => /* @__PURE__ */ b("div", {
|
|
132
135
|
className: "flex items-center justify-between rounded-lg border border-border-seam p-3 transition-colors hover:bg-bg-sunken/50",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ b("div", {
|
|
134
137
|
className: "min-w-0 flex-1",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ y("p", {
|
|
136
139
|
className: "text-sm font-medium text-text-primary",
|
|
137
|
-
children: e.project?.name ??
|
|
138
|
-
}), /* @__PURE__ */
|
|
140
|
+
children: e.project?.name ?? E("timecampus.home.recentEntries.noProject", "No Project")
|
|
141
|
+
}), /* @__PURE__ */ y("p", {
|
|
139
142
|
className: "text-xs text-text-secondary",
|
|
140
|
-
children: e.description ??
|
|
143
|
+
children: e.description ?? E("timecampus.home.recentEntries.noDescription", "No description")
|
|
141
144
|
})]
|
|
142
|
-
}), /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ b("div", {
|
|
143
146
|
className: "ml-4 text-right",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ y("p", {
|
|
145
148
|
className: "font-mono text-sm font-medium tabular-nums text-text-primary",
|
|
146
149
|
children: n((e.duration ?? 0) / 3600)
|
|
147
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ b("span", {
|
|
148
151
|
className: t("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium", e.isRunning ? "bg-status-info-bg text-status-info-text" : "bg-status-success-bg text-status-success-text"),
|
|
149
|
-
children: [e.isRunning && /* @__PURE__ */
|
|
152
|
+
children: [e.isRunning && /* @__PURE__ */ y("span", { className: "h-1.5 w-1.5 rounded-full bg-status-info-text motion-safe:animate-vc-glow-pulse" }), e.isRunning ? E("timecampus.home.recentEntries.status.running", "running") : E("timecampus.home.recentEntries.status.completed", "completed")]
|
|
150
153
|
})]
|
|
151
154
|
})]
|
|
152
|
-
}, e.id)),
|
|
155
|
+
}, e.id)), N.length === 0 && /* @__PURE__ */ y("p", {
|
|
153
156
|
className: "py-4 text-center text-sm text-text-secondary",
|
|
154
|
-
children:
|
|
157
|
+
children: E("timecampus.home.recentEntries.empty", "No time entries yet")
|
|
155
158
|
})]
|
|
156
159
|
})]
|
|
157
|
-
}), /* @__PURE__ */
|
|
160
|
+
}), /* @__PURE__ */ b(C, {
|
|
158
161
|
className: "p-6",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ b("div", {
|
|
160
163
|
className: "mb-4",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ y("h3", {
|
|
162
165
|
className: "text-sm font-semibold text-text-primary",
|
|
163
|
-
children:
|
|
164
|
-
}), /* @__PURE__ */
|
|
166
|
+
children: E("timecampus.home.summary.title", "Quick Summary")
|
|
167
|
+
}), /* @__PURE__ */ y("p", {
|
|
165
168
|
className: "text-xs text-text-secondary",
|
|
166
|
-
children:
|
|
169
|
+
children: E("timecampus.home.summary.description", "Time tracking overview")
|
|
167
170
|
})]
|
|
168
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ b("div", {
|
|
169
172
|
className: "flex flex-col gap-4",
|
|
170
173
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ b("div", {
|
|
172
175
|
className: "flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
174
177
|
className: "text-xs font-medium text-text-secondary",
|
|
175
|
-
children:
|
|
176
|
-
}), /* @__PURE__ */
|
|
178
|
+
children: E("timecampus.home.summary.totalHours", "Total Hours")
|
|
179
|
+
}), /* @__PURE__ */ y("p", {
|
|
177
180
|
className: "mt-1 text-xl font-bold tabular-nums text-text-primary",
|
|
178
|
-
children: n(
|
|
179
|
-
})] }), /* @__PURE__ */
|
|
181
|
+
children: n(M?.totalHours ?? 0)
|
|
182
|
+
})] }), /* @__PURE__ */ y(p, { className: "h-5 w-5 text-text-secondary" })]
|
|
180
183
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ b("div", {
|
|
182
185
|
className: "flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
184
187
|
className: "text-xs font-medium text-text-secondary",
|
|
185
|
-
children:
|
|
186
|
-
}), /* @__PURE__ */
|
|
188
|
+
children: E("timecampus.home.summary.billableHours", "Billable Hours")
|
|
189
|
+
}), /* @__PURE__ */ y("p", {
|
|
187
190
|
className: "mt-1 text-xl font-bold tabular-nums text-text-primary",
|
|
188
|
-
children: n(
|
|
189
|
-
})] }), /* @__PURE__ */
|
|
191
|
+
children: n(M?.billableHours ?? 0)
|
|
192
|
+
})] }), /* @__PURE__ */ y(g, { className: "h-5 w-5 text-text-secondary" })]
|
|
190
193
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ b("div", {
|
|
192
195
|
className: "flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
194
197
|
className: "text-xs font-medium text-text-secondary",
|
|
195
|
-
children:
|
|
196
|
-
}), /* @__PURE__ */
|
|
198
|
+
children: E("timecampus.home.summary.activeTimers", "Active Timers")
|
|
199
|
+
}), /* @__PURE__ */ y("p", {
|
|
197
200
|
className: "mt-1 text-xl font-bold tabular-nums text-text-primary",
|
|
198
|
-
children:
|
|
199
|
-
})] }), /* @__PURE__ */
|
|
201
|
+
children: M?.activeTimers ?? 0
|
|
202
|
+
})] }), /* @__PURE__ */ y(_, { className: "h-5 w-5 text-text-secondary" })]
|
|
200
203
|
})
|
|
201
204
|
]
|
|
202
205
|
})]
|
|
203
206
|
})]
|
|
204
|
-
}), /* @__PURE__ */
|
|
207
|
+
}), /* @__PURE__ */ b(w, {
|
|
205
208
|
treatment: "plain",
|
|
206
209
|
className: "border-border-seam p-6",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ b("div", {
|
|
208
211
|
className: "mb-4",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ y("h3", {
|
|
210
213
|
className: "text-sm font-semibold text-text-primary",
|
|
211
|
-
children:
|
|
212
|
-
}), /* @__PURE__ */
|
|
214
|
+
children: E("timecampus.home.quickActions.title", "Quick Actions")
|
|
215
|
+
}), /* @__PURE__ */ y("p", {
|
|
213
216
|
className: "text-xs text-text-secondary",
|
|
214
|
-
children:
|
|
217
|
+
children: E("timecampus.home.quickActions.description", "Frequently used features")
|
|
215
218
|
})]
|
|
216
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ y("div", {
|
|
217
220
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",
|
|
218
221
|
children: [
|
|
219
222
|
{
|
|
220
|
-
label:
|
|
221
|
-
icon:
|
|
223
|
+
label: E("timecampus.home.quickActions.startTimer.label", "Start Timer"),
|
|
224
|
+
icon: h,
|
|
222
225
|
route: "/time/timer",
|
|
223
|
-
description:
|
|
226
|
+
description: E("timecampus.home.quickActions.startTimer.description", "Track your time")
|
|
224
227
|
},
|
|
225
228
|
{
|
|
226
|
-
label:
|
|
227
|
-
icon:
|
|
229
|
+
label: E("timecampus.home.quickActions.viewProjects.label", "View Projects"),
|
|
230
|
+
icon: m,
|
|
228
231
|
route: "/projects",
|
|
229
|
-
description:
|
|
232
|
+
description: E("timecampus.home.quickActions.viewProjects.description", "Manage projects")
|
|
230
233
|
},
|
|
231
234
|
{
|
|
232
|
-
label:
|
|
233
|
-
icon:
|
|
235
|
+
label: E("timecampus.home.quickActions.timeEntries.label", "Time Entries"),
|
|
236
|
+
icon: p,
|
|
234
237
|
route: "/time/entries",
|
|
235
|
-
description:
|
|
238
|
+
description: E("timecampus.home.quickActions.timeEntries.description", "View all entries")
|
|
236
239
|
},
|
|
237
240
|
{
|
|
238
|
-
label:
|
|
239
|
-
icon:
|
|
241
|
+
label: E("timecampus.home.quickActions.teamActivity.label", "Team Activity"),
|
|
242
|
+
icon: _,
|
|
240
243
|
route: "/team-activity",
|
|
241
|
-
description:
|
|
244
|
+
description: E("timecampus.home.quickActions.teamActivity.description", "See team status")
|
|
242
245
|
},
|
|
243
246
|
{
|
|
244
|
-
label:
|
|
245
|
-
icon:
|
|
247
|
+
label: E("timecampus.home.quickActions.reports.label", "Reports"),
|
|
248
|
+
icon: d,
|
|
246
249
|
route: "/reports",
|
|
247
|
-
description:
|
|
250
|
+
description: E("timecampus.home.quickActions.reports.description", "Generate reports")
|
|
248
251
|
},
|
|
249
252
|
{
|
|
250
|
-
label:
|
|
251
|
-
icon:
|
|
253
|
+
label: E("timecampus.home.quickActions.approvals.label", "Approvals"),
|
|
254
|
+
icon: f,
|
|
252
255
|
route: "/time-approval",
|
|
253
|
-
description:
|
|
256
|
+
description: E("timecampus.home.quickActions.approvals.description", "Review timesheets")
|
|
254
257
|
}
|
|
255
|
-
].map(({ label: e, icon: t, description: n, route: r }) => /* @__PURE__ */
|
|
256
|
-
onClick: () =>
|
|
258
|
+
].map(({ label: e, icon: t, description: n, route: r }) => /* @__PURE__ */ b("button", {
|
|
259
|
+
onClick: () => D(r),
|
|
257
260
|
className: "flex min-h-[2.75rem] flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
|
|
258
261
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ y("div", {
|
|
260
263
|
className: "rounded-full bg-action-primary-bg/10 p-3",
|
|
261
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ y(t, { className: "h-5 w-5 text-primary" })
|
|
262
265
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ y("span", {
|
|
264
267
|
className: "text-sm font-medium text-text-primary",
|
|
265
268
|
children: e
|
|
266
269
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ y("span", {
|
|
268
271
|
className: "text-xs text-text-secondary",
|
|
269
272
|
children: n
|
|
270
273
|
})
|
|
@@ -276,6 +279,6 @@ var T = () => {
|
|
|
276
279
|
});
|
|
277
280
|
};
|
|
278
281
|
//#endregion
|
|
279
|
-
export {
|
|
282
|
+
export { E as HomePage };
|
|
280
283
|
|
|
281
284
|
//# sourceMappingURL=HomePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomePage.js","names":[],"sources":["../../../src/timecampus/pages/HomePage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport {\n Clock,\n FolderOpen,\n Users,\n TrendingUp,\n CheckCircle,\n BarChart3,\n Play,\n ArrowRight,\n} from \"lucide-react\";\nimport {\n GlassCard,\n EmphasisPanel,\n AuroraBackground,\n GradientText,\n CTAOverflowMenu,\n} from \"@burdenoff/fe-libs/ui\";\nimport { StatCard } from \"../components/StatCard\";\nimport { LoadingSkeleton } from \"../components/LoadingSkeleton\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport { cn, formatHours } from \"../utils/helpers\";\nimport { useTimeCampusNavigate } from \"../providers/TimeCampusProvider\";\nimport {\n useGetTimeEntryStatsQuery,\n useListTimeEntriesQuery,\n type TimeEntryFieldsFragment,\n} from \"@/generated/wspace-operations\";\nimport { useTr } from \"../hooks\";\n\nexport const HomePage: FC = () => {\n const t = useTr();\n const navigate = useTimeCampusNavigate();\n\n const { data: statsData, loading: statsLoading } =\n useGetTimeEntryStatsQuery();\n const { data: entriesData, loading: entriesLoading } =\n useListTimeEntriesQuery({\n variables: { pagination: { limit: 4 } },\n });\n\n const stats = statsData?.timeEntryStats;\n const recentEntries = entriesData?.timeEntries?.items ?? [];\n\n // No time entries at all yet — a genuinely new user, not just a quiet day.\n // Swap the stat grid (which would otherwise read as four confusing zeroes)\n // for a single, honest explanation of the core loop before anything else.\n const isNewUser =\n !statsLoading && !entriesLoading && (stats?.totalEntries ?? 0) === 0;\n\n const headerActions = (\n <CTAOverflowMenu\n primary={{\n label: t(\"timecampus.home.actions.startTimer\", \"Start Timer\"),\n onSelect: () => navigate(\"/time/timer\"),\n icon: <Play className=\"h-4 w-4\" />,\n }}\n actions={[\n {\n label: t(\n \"timecampus.home.quickActions.viewProjects.label\",\n \"View Projects\",\n ),\n onSelect: () => navigate(\"/projects\"),\n icon: <FolderOpen className=\"h-4 w-4\" />,\n },\n {\n label: t(\"timecampus.home.quickActions.reports.label\", \"Reports\"),\n onSelect: () => navigate(\"/reports\"),\n icon: <BarChart3 className=\"h-4 w-4\" />,\n },\n ]}\n />\n );\n\n const renderHeader = () => (\n <div className=\"relative overflow-hidden rounded-2xl border border-border-seam bg-gloss-card p-5 sm:p-6\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"relative flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"min-w-0\">\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>\n {t(\"timecampus.home.title\", \"Dashboard\")}\n </GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {t(\n \"timecampus.home.description\",\n \"Overview of your time tracking and productivity\",\n )}\n </p>\n </div>\n {headerActions}\n </div>\n </div>\n );\n\n if (statsLoading && entriesLoading) {\n return (\n <div className=\"min-h-full space-y-6 p-4 sm:p-6\">\n {renderHeader()}\n <LoadingSkeleton variant=\"card\" count={4} />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full space-y-6 p-4 sm:p-6\">\n {renderHeader()}\n\n {/* Hero metric + supporting metrics — or, for a genuinely new user with\n no time entries yet, a single honest explanation of the core loop\n instead of a grid of confusing zeroes. */}\n {isNewUser ? (\n <div className=\"flex flex-col items-center gap-3\">\n <EmptyState\n illustration=\"empty-data\"\n title={t(\n \"timecampus.home.gettingStarted.title\",\n \"Let's get you started\",\n )}\n description={t(\n \"timecampus.home.gettingStarted.description\",\n \"TimeCampus tracks your time when you start a timer — stop it when you're done, and everything else (your Timeline, Focus Score, and Reports) fills in automatically from what you track. No extra setup needed.\",\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate(\"/time/timer\")}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n <Play className=\"h-4 w-4\" />\n {t(\n \"timecampus.home.gettingStarted.action\",\n \"Start your first timer\",\n )}\n </button>\n }\n />\n <p className=\"max-w-md text-center text-xs text-text-secondary\">\n {t(\n \"timecampus.home.gettingStarted.footnote\",\n \"That's the only thing to set up. Pomodoro, Life tracking, reports and everything else in the sidebar are there whenever you're curious — nothing else needs configuring first.\",\n )}\n </p>\n </div>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4\">\n <StatCard\n featured\n title={t(\"timecampus.home.stats.today\", \"Today\")}\n value={formatHours(stats?.totalHours ?? 0)}\n icon={<Clock className=\"h-5 w-5\" />}\n trend={{\n value: 12.5,\n label: t(\"timecampus.home.stats.vsYesterday\", \"vs yesterday\"),\n }}\n />\n <StatCard\n title={t(\"timecampus.home.stats.billable\", \"Billable\")}\n value={formatHours(stats?.billableHours ?? 0)}\n icon={<TrendingUp className=\"h-5 w-5\" />}\n description={`${stats?.totalEntries ?? 0} ${t(\"timecampus.home.stats.entries\", \"entries\")}`}\n />\n <StatCard\n title={t(\"timecampus.home.stats.activeTimers\", \"Active Timers\")}\n value={stats?.activeTimers ?? 0}\n icon={<FolderOpen className=\"h-5 w-5\" />}\n description={t(\n \"timecampus.home.stats.currentlyRunning\",\n \"Currently running\",\n )}\n />\n <StatCard\n title={t(\"timecampus.home.stats.totalEntries\", \"Entries\")}\n value={stats?.totalEntries ?? 0}\n icon={<BarChart3 className=\"h-5 w-5\" />}\n description={t(\n \"timecampus.home.stats.totalEntriesDescription\",\n \"Total time entries\",\n )}\n />\n </div>\n )}\n\n {/* Everything below is exploration/secondary surface — Recent Entries,\n Quick Summary, and the 6-button Quick Actions grid (which includes\n Team Activity and Approvals, not relevant before someone has\n tracked anything). Showing it alongside the single-CTA getting-\n started card undercuts \"just do this one thing\"; hold it back\n until the user has a first entry, then it appears exactly as\n before — same order, same content, no other pages changed. */}\n {!isNewUser && (\n <>\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Recent Time Entries */}\n <GlassCard\n treatment=\"plain\"\n className=\"border-border-seam p-6 lg:col-span-2\"\n >\n <div className=\"mb-4 flex items-center justify-between\">\n <div>\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\n \"timecampus.home.recentEntries.title\",\n \"Recent Time Entries\",\n )}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.recentEntries.description\",\n \"Your latest tracked activities\",\n )}\n </p>\n </div>\n <button\n onClick={() => navigate(\"/time/entries\")}\n className=\"inline-flex min-h-[2.75rem] items-center gap-1 rounded-md px-2 text-xs font-medium text-primary transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border\"\n >\n {t(\"timecampus.home.recentEntries.viewAll\", \"View all\")}{\" \"}\n <ArrowRight className=\"h-3 w-3\" />\n </button>\n </div>\n {entriesLoading ? (\n <LoadingSkeleton variant=\"list\" count={4} />\n ) : (\n <div className=\"flex flex-col gap-3\">\n {recentEntries.map((entry: TimeEntryFieldsFragment) => (\n <div\n key={entry.id}\n className=\"flex items-center justify-between rounded-lg border border-border-seam p-3 transition-colors hover:bg-bg-sunken/50\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium text-text-primary\">\n {entry.project?.name ??\n t(\n \"timecampus.home.recentEntries.noProject\",\n \"No Project\",\n )}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {entry.description ??\n t(\n \"timecampus.home.recentEntries.noDescription\",\n \"No description\",\n )}\n </p>\n </div>\n <div className=\"ml-4 text-right\">\n <p className=\"font-mono text-sm font-medium tabular-nums text-text-primary\">\n {formatHours((entry.duration ?? 0) / 3600)}\n </p>\n <span\n className={cn(\n \"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium\",\n entry.isRunning\n ? \"bg-status-info-bg text-status-info-text\"\n : \"bg-status-success-bg text-status-success-text\",\n )}\n >\n {entry.isRunning && (\n <span className=\"h-1.5 w-1.5 rounded-full bg-status-info-text motion-safe:animate-vc-glow-pulse\" />\n )}\n {entry.isRunning\n ? t(\n \"timecampus.home.recentEntries.status.running\",\n \"running\",\n )\n : t(\n \"timecampus.home.recentEntries.status.completed\",\n \"completed\",\n )}\n </span>\n </div>\n </div>\n ))}\n {recentEntries.length === 0 && (\n <p className=\"py-4 text-center text-sm text-text-secondary\">\n {t(\n \"timecampus.home.recentEntries.empty\",\n \"No time entries yet\",\n )}\n </p>\n )}\n </div>\n )}\n </GlassCard>\n\n {/* Quick Summary — the one emphasis zone */}\n <EmphasisPanel className=\"p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\"timecampus.home.summary.title\", \"Quick Summary\")}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.summary.description\",\n \"Time tracking overview\",\n )}\n </p>\n </div>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\"timecampus.home.summary.totalHours\", \"Total Hours\")}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatHours(stats?.totalHours ?? 0)}\n </p>\n </div>\n <Clock className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\n \"timecampus.home.summary.billableHours\",\n \"Billable Hours\",\n )}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatHours(stats?.billableHours ?? 0)}\n </p>\n </div>\n <TrendingUp className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\n \"timecampus.home.summary.activeTimers\",\n \"Active Timers\",\n )}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {stats?.activeTimers ?? 0}\n </p>\n </div>\n <Users className=\"h-5 w-5 text-text-secondary\" />\n </div>\n </div>\n </EmphasisPanel>\n </div>\n\n {/* Quick Actions */}\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\"timecampus.home.quickActions.title\", \"Quick Actions\")}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.quickActions.description\",\n \"Frequently used features\",\n )}\n </p>\n </div>\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6\">\n {[\n {\n label: t(\n \"timecampus.home.quickActions.startTimer.label\",\n \"Start Timer\",\n ),\n icon: Play,\n route: \"/time/timer\",\n description: t(\n \"timecampus.home.quickActions.startTimer.description\",\n \"Track your time\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.viewProjects.label\",\n \"View Projects\",\n ),\n icon: FolderOpen,\n route: \"/projects\",\n description: t(\n \"timecampus.home.quickActions.viewProjects.description\",\n \"Manage projects\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.timeEntries.label\",\n \"Time Entries\",\n ),\n icon: Clock,\n route: \"/time/entries\",\n description: t(\n \"timecampus.home.quickActions.timeEntries.description\",\n \"View all entries\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.teamActivity.label\",\n \"Team Activity\",\n ),\n icon: Users,\n route: \"/team-activity\",\n description: t(\n \"timecampus.home.quickActions.teamActivity.description\",\n \"See team status\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.reports.label\",\n \"Reports\",\n ),\n icon: BarChart3,\n route: \"/reports\",\n description: t(\n \"timecampus.home.quickActions.reports.description\",\n \"Generate reports\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.approvals.label\",\n \"Approvals\",\n ),\n icon: CheckCircle,\n route: \"/time-approval\",\n description: t(\n \"timecampus.home.quickActions.approvals.description\",\n \"Review timesheets\",\n ),\n },\n ].map(({ label, icon: Icon, description, route }) => (\n <button\n key={label}\n onClick={() => navigate(route)}\n className=\"flex min-h-[2.75rem] flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border\"\n >\n <div className=\"rounded-full bg-action-primary-bg/10 p-3\">\n <Icon className=\"h-5 w-5 text-primary\" />\n </div>\n <span className=\"text-sm font-medium text-text-primary\">\n {label}\n </span>\n <span className=\"text-xs text-text-secondary\">\n {description}\n </span>\n </button>\n ))}\n </div>\n </GlassCard>\n </>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;AA8BA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EAAM,WAAU,uBAAwB,CAAA;OACrC,CAAA;OACL,kBAAC,QAAD;QAAM,WAAU;QACb,UAAA;OACG,CAAA;OACN,kBAAC,QAAD;QAAM,WAAU;QACb,UAAA;OACG,CAAA;MACA;KAbD,GAAA,CAaC,CACT;IACE,CAAA,CACI;GACX,CAAA,CAAA,EAAA,CAAA;EAED;;AAET"}
|
|
1
|
+
{"version":3,"file":"HomePage.js","names":[],"sources":["../../../src/timecampus/pages/HomePage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport {\n Clock,\n FolderOpen,\n Users,\n TrendingUp,\n CheckCircle,\n BarChart3,\n Play,\n ArrowRight,\n} from \"lucide-react\";\nimport {\n GlassCard,\n EmphasisPanel,\n AuroraBackground,\n GradientText,\n CTAOverflowMenu,\n} from \"@burdenoff/fe-libs/ui\";\nimport { StatCard } from \"../components/StatCard\";\nimport { LoadingSkeleton } from \"../components/LoadingSkeleton\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport { cn, formatHours } from \"../utils/helpers\";\nimport { useTimeCampusNavigate } from \"../providers/TimeCampusProvider\";\nimport {\n useGetTimeEntryStatsQuery,\n useListTimeEntriesQuery,\n type TimeEntryFieldsFragment,\n} from \"@/generated/wspace-operations\";\nimport { usePageViewed } from \"../analytics\";\nimport { useTr } from \"../hooks\";\n\nexport const HomePage: FC = () => {\n usePageViewed(\"dashboard\");\n const t = useTr();\n const navigate = useTimeCampusNavigate();\n\n const { data: statsData, loading: statsLoading } =\n useGetTimeEntryStatsQuery();\n const { data: entriesData, loading: entriesLoading } =\n useListTimeEntriesQuery({\n variables: { pagination: { limit: 4 } },\n });\n\n const stats = statsData?.timeEntryStats;\n const recentEntries = entriesData?.timeEntries?.items ?? [];\n\n // No time entries at all yet — a genuinely new user, not just a quiet day.\n // Swap the stat grid (which would otherwise read as four confusing zeroes)\n // for a single, honest explanation of the core loop before anything else.\n const isNewUser =\n !statsLoading && !entriesLoading && (stats?.totalEntries ?? 0) === 0;\n\n const headerActions = (\n <CTAOverflowMenu\n primary={{\n label: t(\"timecampus.home.actions.startTimer\", \"Start Timer\"),\n onSelect: () => navigate(\"/time/timer\"),\n icon: <Play className=\"h-4 w-4\" />,\n }}\n actions={[\n {\n label: t(\n \"timecampus.home.quickActions.viewProjects.label\",\n \"View Projects\",\n ),\n onSelect: () => navigate(\"/projects\"),\n icon: <FolderOpen className=\"h-4 w-4\" />,\n },\n {\n label: t(\"timecampus.home.quickActions.reports.label\", \"Reports\"),\n onSelect: () => navigate(\"/reports\"),\n icon: <BarChart3 className=\"h-4 w-4\" />,\n },\n ]}\n />\n );\n\n const renderHeader = () => (\n <div className=\"relative overflow-hidden rounded-2xl border border-border-seam bg-gloss-card p-5 sm:p-6\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"relative flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"min-w-0\">\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>\n {t(\"timecampus.home.title\", \"Dashboard\")}\n </GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {t(\n \"timecampus.home.description\",\n \"Overview of your time tracking and productivity\",\n )}\n </p>\n </div>\n {headerActions}\n </div>\n </div>\n );\n\n if (statsLoading && entriesLoading) {\n return (\n <div className=\"min-h-full space-y-6 p-4 sm:p-6\">\n {renderHeader()}\n <LoadingSkeleton variant=\"card\" count={4} />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full space-y-6 p-4 sm:p-6\">\n {renderHeader()}\n\n {/* Hero metric + supporting metrics — or, for a genuinely new user with\n no time entries yet, a single honest explanation of the core loop\n instead of a grid of confusing zeroes. */}\n {isNewUser ? (\n <div className=\"flex flex-col items-center gap-3\">\n <EmptyState\n illustration=\"empty-data\"\n title={t(\n \"timecampus.home.gettingStarted.title\",\n \"Let's get you started\",\n )}\n description={t(\n \"timecampus.home.gettingStarted.description\",\n \"TimeCampus tracks your time when you start a timer — stop it when you're done, and everything else (your Timeline, Focus Score, and Reports) fills in automatically from what you track. No extra setup needed.\",\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate(\"/time/timer\")}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n <Play className=\"h-4 w-4\" />\n {t(\n \"timecampus.home.gettingStarted.action\",\n \"Start your first timer\",\n )}\n </button>\n }\n />\n <p className=\"max-w-md text-center text-xs text-text-secondary\">\n {t(\n \"timecampus.home.gettingStarted.footnote\",\n \"That's the only thing to set up. Pomodoro, Life tracking, reports and everything else in the sidebar are there whenever you're curious — nothing else needs configuring first.\",\n )}\n </p>\n </div>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4\">\n <StatCard\n featured\n title={t(\"timecampus.home.stats.today\", \"Today\")}\n value={formatHours(stats?.totalHours ?? 0)}\n icon={<Clock className=\"h-5 w-5\" />}\n trend={{\n value: 12.5,\n label: t(\"timecampus.home.stats.vsYesterday\", \"vs yesterday\"),\n }}\n />\n <StatCard\n title={t(\"timecampus.home.stats.billable\", \"Billable\")}\n value={formatHours(stats?.billableHours ?? 0)}\n icon={<TrendingUp className=\"h-5 w-5\" />}\n description={`${stats?.totalEntries ?? 0} ${t(\"timecampus.home.stats.entries\", \"entries\")}`}\n />\n <StatCard\n title={t(\"timecampus.home.stats.activeTimers\", \"Active Timers\")}\n value={stats?.activeTimers ?? 0}\n icon={<FolderOpen className=\"h-5 w-5\" />}\n description={t(\n \"timecampus.home.stats.currentlyRunning\",\n \"Currently running\",\n )}\n />\n <StatCard\n title={t(\"timecampus.home.stats.totalEntries\", \"Entries\")}\n value={stats?.totalEntries ?? 0}\n icon={<BarChart3 className=\"h-5 w-5\" />}\n description={t(\n \"timecampus.home.stats.totalEntriesDescription\",\n \"Total time entries\",\n )}\n />\n </div>\n )}\n\n {/* Everything below is exploration/secondary surface — Recent Entries,\n Quick Summary, and the 6-button Quick Actions grid (which includes\n Team Activity and Approvals, not relevant before someone has\n tracked anything). Showing it alongside the single-CTA getting-\n started card undercuts \"just do this one thing\"; hold it back\n until the user has a first entry, then it appears exactly as\n before — same order, same content, no other pages changed. */}\n {!isNewUser && (\n <>\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Recent Time Entries */}\n <GlassCard\n treatment=\"plain\"\n className=\"border-border-seam p-6 lg:col-span-2\"\n >\n <div className=\"mb-4 flex items-center justify-between\">\n <div>\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\n \"timecampus.home.recentEntries.title\",\n \"Recent Time Entries\",\n )}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.recentEntries.description\",\n \"Your latest tracked activities\",\n )}\n </p>\n </div>\n <button\n onClick={() => navigate(\"/time/entries\")}\n className=\"inline-flex min-h-[2.75rem] items-center gap-1 rounded-md px-2 text-xs font-medium text-primary transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border\"\n >\n {t(\"timecampus.home.recentEntries.viewAll\", \"View all\")}{\" \"}\n <ArrowRight className=\"h-3 w-3\" />\n </button>\n </div>\n {entriesLoading ? (\n <LoadingSkeleton variant=\"list\" count={4} />\n ) : (\n <div className=\"flex flex-col gap-3\">\n {recentEntries.map((entry: TimeEntryFieldsFragment) => (\n <div\n key={entry.id}\n className=\"flex items-center justify-between rounded-lg border border-border-seam p-3 transition-colors hover:bg-bg-sunken/50\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium text-text-primary\">\n {entry.project?.name ??\n t(\n \"timecampus.home.recentEntries.noProject\",\n \"No Project\",\n )}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {entry.description ??\n t(\n \"timecampus.home.recentEntries.noDescription\",\n \"No description\",\n )}\n </p>\n </div>\n <div className=\"ml-4 text-right\">\n <p className=\"font-mono text-sm font-medium tabular-nums text-text-primary\">\n {formatHours((entry.duration ?? 0) / 3600)}\n </p>\n <span\n className={cn(\n \"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium\",\n entry.isRunning\n ? \"bg-status-info-bg text-status-info-text\"\n : \"bg-status-success-bg text-status-success-text\",\n )}\n >\n {entry.isRunning && (\n <span className=\"h-1.5 w-1.5 rounded-full bg-status-info-text motion-safe:animate-vc-glow-pulse\" />\n )}\n {entry.isRunning\n ? t(\n \"timecampus.home.recentEntries.status.running\",\n \"running\",\n )\n : t(\n \"timecampus.home.recentEntries.status.completed\",\n \"completed\",\n )}\n </span>\n </div>\n </div>\n ))}\n {recentEntries.length === 0 && (\n <p className=\"py-4 text-center text-sm text-text-secondary\">\n {t(\n \"timecampus.home.recentEntries.empty\",\n \"No time entries yet\",\n )}\n </p>\n )}\n </div>\n )}\n </GlassCard>\n\n {/* Quick Summary — the one emphasis zone */}\n <EmphasisPanel className=\"p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\"timecampus.home.summary.title\", \"Quick Summary\")}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.summary.description\",\n \"Time tracking overview\",\n )}\n </p>\n </div>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\"timecampus.home.summary.totalHours\", \"Total Hours\")}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatHours(stats?.totalHours ?? 0)}\n </p>\n </div>\n <Clock className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\n \"timecampus.home.summary.billableHours\",\n \"Billable Hours\",\n )}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatHours(stats?.billableHours ?? 0)}\n </p>\n </div>\n <TrendingUp className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\n \"timecampus.home.summary.activeTimers\",\n \"Active Timers\",\n )}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {stats?.activeTimers ?? 0}\n </p>\n </div>\n <Users className=\"h-5 w-5 text-text-secondary\" />\n </div>\n </div>\n </EmphasisPanel>\n </div>\n\n {/* Quick Actions */}\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\"timecampus.home.quickActions.title\", \"Quick Actions\")}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.quickActions.description\",\n \"Frequently used features\",\n )}\n </p>\n </div>\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6\">\n {[\n {\n label: t(\n \"timecampus.home.quickActions.startTimer.label\",\n \"Start Timer\",\n ),\n icon: Play,\n route: \"/time/timer\",\n description: t(\n \"timecampus.home.quickActions.startTimer.description\",\n \"Track your time\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.viewProjects.label\",\n \"View Projects\",\n ),\n icon: FolderOpen,\n route: \"/projects\",\n description: t(\n \"timecampus.home.quickActions.viewProjects.description\",\n \"Manage projects\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.timeEntries.label\",\n \"Time Entries\",\n ),\n icon: Clock,\n route: \"/time/entries\",\n description: t(\n \"timecampus.home.quickActions.timeEntries.description\",\n \"View all entries\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.teamActivity.label\",\n \"Team Activity\",\n ),\n icon: Users,\n route: \"/team-activity\",\n description: t(\n \"timecampus.home.quickActions.teamActivity.description\",\n \"See team status\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.reports.label\",\n \"Reports\",\n ),\n icon: BarChart3,\n route: \"/reports\",\n description: t(\n \"timecampus.home.quickActions.reports.description\",\n \"Generate reports\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.approvals.label\",\n \"Approvals\",\n ),\n icon: CheckCircle,\n route: \"/time-approval\",\n description: t(\n \"timecampus.home.quickActions.approvals.description\",\n \"Review timesheets\",\n ),\n },\n ].map(({ label, icon: Icon, description, route }) => (\n <button\n key={label}\n onClick={() => navigate(route)}\n className=\"flex min-h-[2.75rem] flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border\"\n >\n <div className=\"rounded-full bg-action-primary-bg/10 p-3\">\n <Icon className=\"h-5 w-5 text-primary\" />\n </div>\n <span className=\"text-sm font-medium text-text-primary\">\n {label}\n </span>\n <span className=\"text-xs text-text-secondary\">\n {description}\n </span>\n </button>\n ))}\n </div>\n </GlassCard>\n </>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA+BA,IAAa,UAAqB;CAChC,EAAc,WAAW;CACzB,IAAM,IAAI,EAAM,GACV,IAAW,EAAsB,GAEjC,EAAE,MAAM,GAAW,SAAS,MAChC,EAA0B,GACtB,EAAE,MAAM,GAAa,SAAS,MAClC,EAAwB,EACtB,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EACxC,CAAC,GAEG,IAAQ,GAAW,gBACnB,IAAgB,GAAa,aAAa,SAAS,CAAC,GAKpD,IACJ,CAAC,KAAgB,CAAC,MAAmB,GAAO,gBAAgB,OAAO,GAE/D,IACJ,kBAAC,GAAD;EACE,SAAS;GACP,OAAO,EAAE,sCAAsC,aAAa;GAC5D,gBAAgB,EAAS,aAAa;GACtC,MAAM,kBAAC,GAAD,EAAM,WAAU,UAAW,CAAA;EACnC;EACA,SAAS,CACP;GACE,OAAO,EACL,mDACA,eACF;G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AAK,WAAU;KACZ,UAAA;MACC;OACE,OAAO,EACL,iDACA,aACF;OACA,MAAM;OACN,OAAO;OACP,aAAa,EACX,uDACA,iBACF;MACF;MACA;OACE,OAAO,EACL,mDACA,eACF;OACA,MAAM;OACN,OAAO;OACP,aAAa,EACX,yDACA,iBACF;MACF;MACA;OACE,OAAO,EACL,kDACA,cACF;OACA,MAAM;OACN,OAAO;OACP,aAAa,EACX,wDACA,kBACF;MACF;MACA;OACE,OAAO,EACL,mDACA,eACF;OACA,MAAM;OACN,OAAO;OACP,aAAa,EACX,yDACA,iBACF;MACF;MACA;OACE,OAAO,EACL,8CACA,SACF;OACA,MAAM;OACN,OAAO;OACP,aAAa,EACX,oDACA,kBACF;MACF;MACA;OACE,OAAO,EACL,gDACA,WACF;OACA,MAAM;OACN,OAAO;OACP,aAAa,EACX,sDACA,mBACF;MACF;KACF,CAAC,CAAC,KAAK,EAAE,UAAO,MAAM,GAAM,gBAAa,eACvC,kBAAC,UAAD;MAEE,eAAe,EAAS,CAAK;MAC7B,WAAU;MAHZ,UAAA;OAKE,kBAAC,OAAD;QAAK,WAAU;QACb,UAAA,kBAAC,GAAD,EAAM,WAAU,uBAAwB,CAAA;OACrC,CAAA;OACL,kBAAC,QAAD;QAAM,WAAU;QACb,UAAA;OACG,CAAA;OACN,kBAAC,QAAD;QAAM,WAAU;QACb,UAAA;OACG,CAAA;MACA;KAbD,GAAA,CAaC,CACT;IACE,CAAA,CACI;GACX,CAAA,CAAA,EAAA,CAAA;EAED;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientPortalPage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/client-portal/ClientPortalPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClientPortalPage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/client-portal/ClientPortalPage.tsx"],"names":[],"mappings":"AAkGA,wBAAgB,gBAAgB,gCA2sB/B"}
|