@burdenoff/microfe-timecampus 2026.1031.10 → 2026.1031.12
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/TimeCampusRoot.d.ts.map +1 -1
- package/dist/timecampus/TimeCampusRoot.js +121 -80
- package/dist/timecampus/TimeCampusRoot.js.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.d.ts.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.js +24 -5
- package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
- 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/lifetime/LifeBalancePage.d.ts.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeBalancePage.js +34 -31
- package/dist/timecampus/pages/lifetime/LifeBalancePage.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/mobile/MobileLifeBalancePage.d.ts +8 -0
- package/dist/timecampus/pages/mobile/MobileLifeBalancePage.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js +224 -0
- package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js.map +1 -0
- package/dist/timecampus/pages/mobile/MobileScreen.d.ts +32 -0
- package/dist/timecampus/pages/mobile/MobileScreen.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/MobileScreen.js +89 -0
- package/dist/timecampus/pages/mobile/MobileScreen.js.map +1 -0
- package/dist/timecampus/pages/mobile/MobileTimelinePage.d.ts +8 -0
- package/dist/timecampus/pages/mobile/MobileTimelinePage.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/MobileTimelinePage.js +341 -0
- package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -0
- package/dist/timecampus/pages/mobile/MobileTimerPage.d.ts +8 -0
- package/dist/timecampus/pages/mobile/MobileTimerPage.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/MobileTimerPage.js +226 -0
- package/dist/timecampus/pages/mobile/MobileTimerPage.js.map +1 -0
- package/dist/timecampus/pages/mobile/mobileModel.d.ts +121 -0
- package/dist/timecampus/pages/mobile/mobileModel.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/mobileModel.js +127 -0
- package/dist/timecampus/pages/mobile/mobileModel.js.map +1 -0
- package/dist/timecampus/pages/pomodoro/PomodoroPage.d.ts.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js +57 -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 +54 -39
- 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 +306 -297
- package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
- package/dist/timecampus/types/index.d.ts +5 -0
- package/dist/timecampus/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,25 +2,27 @@ import { cn as e, formatDate as t, formatHours as n, getInitials as ee } from ".
|
|
|
2
2
|
import { StatCard as r } from "../../components/StatCard.js";
|
|
3
3
|
import { LoadingSkeleton as i } from "../../components/LoadingSkeleton.js";
|
|
4
4
|
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
5
|
-
import { useApproveRequestMutation as o, useGetApprovalStatsQuery as s, useListApprovalRequestsQuery as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { useApproveRequestMutation as o, useGetApprovalStatsQuery as s, useListApprovalRequestsQuery as te, useRejectRequestMutation as c, useRequestRevisionMutation as ne, useWithdrawRequestMutation as l } from "../../../generated/wspace-operations.js";
|
|
6
|
+
import { useTimeCampusAnalytics as u } from "../../analytics/useTimeCampusAnalytics.js";
|
|
7
|
+
import "../../analytics/index.js";
|
|
8
|
+
import { PageLayout as d } from "../../components/PageLayout.js";
|
|
9
|
+
import { StatusBadge as re } from "../../components/StatusBadge.js";
|
|
10
|
+
import { Modal as f } from "../../components/Modal.js";
|
|
11
|
+
import { ChartCard as ie } from "../../components/ChartCard.js";
|
|
12
|
+
import { ToastContainer as ae, useToast as oe } from "../../components/Toast.js";
|
|
13
|
+
import { DonutChart as se } from "../../components/charts/DonutChart.js";
|
|
14
|
+
import { ProgressMeter as ce } from "../../components/charts/ProgressMeter.js";
|
|
13
15
|
import "../../components/index.js";
|
|
14
|
-
import { ApprovalStatus as
|
|
15
|
-
import { useState as
|
|
16
|
-
import { CheckCircle as
|
|
16
|
+
import { ApprovalStatus as le } from "../../../generated/wspace-types.js";
|
|
17
|
+
import { useState as p } from "react";
|
|
18
|
+
import { CheckCircle as m, Clock as ue, MessageSquare as de, MessagesSquare as h, Undo2 as fe, X as pe, XCircle as g } from "lucide-react";
|
|
17
19
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
18
20
|
import { GlassCard as b } from "@burdenoff/fe-libs/ui";
|
|
19
21
|
import { ContextConversationWidget as x } from "@burdenoff/fe-libs/shared";
|
|
20
22
|
import { useRegisterPageConversationContext as S } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
21
23
|
//#region src/timecampus/pages/time-approval/TimeApprovalPage.tsx
|
|
22
24
|
var C = 25;
|
|
23
|
-
function
|
|
25
|
+
function me({ request: e }) {
|
|
24
26
|
return S({
|
|
25
27
|
entityType: "TIMECAMPUS_APPROVAL_REQUEST",
|
|
26
28
|
entityId: e.id,
|
|
@@ -29,13 +31,13 @@ function pe({ request: e }) {
|
|
|
29
31
|
}
|
|
30
32
|
var w = "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";
|
|
31
33
|
function T() {
|
|
32
|
-
let { toasts: x, addToast: S, dismissToast: T } =
|
|
34
|
+
let { toasts: x, addToast: S, dismissToast: T } = oe(), { data: E, loading: D, error: he, refetch: ge, fetchMore: _e } = te({
|
|
33
35
|
variables: { pagination: {
|
|
34
36
|
limit: C,
|
|
35
37
|
offset: 0
|
|
36
38
|
} },
|
|
37
39
|
notifyOnNetworkStatusChange: !0
|
|
38
|
-
}), { data:
|
|
40
|
+
}), { data: ve, loading: ye, error: O, refetch: k } = s(), [A] = o(), [j, { loading: M }] = c(), [N, { loading: P }] = ne(), [be] = l(), F = u(), I = E?.approvalRequests?.items ?? [], xe = E?.approvalRequests?.total ?? 0, Se = E?.approvalRequests?.hasMore ?? !1, L = ve?.approvalStats, Ce = [
|
|
39
41
|
{
|
|
40
42
|
name: "Pending",
|
|
41
43
|
value: L?.pendingCount ?? 0
|
|
@@ -48,12 +50,16 @@ function T() {
|
|
|
48
50
|
name: "Rejected",
|
|
49
51
|
value: L?.rejectedCount ?? 0
|
|
50
52
|
}
|
|
51
|
-
], [R, z] =
|
|
52
|
-
await Promise.all([
|
|
53
|
-
},
|
|
53
|
+
], [R, z] = p(!1), [we, B] = p(null), [V, H] = p(null), [U, W] = p(""), [G, K] = p(null), [q, J] = p(""), [Y, X] = p(null), [Z, Q] = p(null), $ = async () => {
|
|
54
|
+
await Promise.all([ge(), k()]);
|
|
55
|
+
}, Te = async (e) => {
|
|
54
56
|
B(e);
|
|
55
57
|
try {
|
|
56
|
-
await
|
|
58
|
+
if (!(await A({ variables: { id: e } })).data?.approveRequest) throw Error("approveRequest failed");
|
|
59
|
+
F.approvalDecided({
|
|
60
|
+
approvalId: e,
|
|
61
|
+
decision: "approved"
|
|
62
|
+
}), S({
|
|
57
63
|
title: "Timesheet approved",
|
|
58
64
|
variant: "success"
|
|
59
65
|
}), await $();
|
|
@@ -66,21 +72,21 @@ function T() {
|
|
|
66
72
|
B(null);
|
|
67
73
|
}
|
|
68
74
|
};
|
|
69
|
-
return D &&
|
|
75
|
+
return D && ye && I.length === 0 ? /* @__PURE__ */ v(d, {
|
|
70
76
|
title: "Time Approval",
|
|
71
77
|
description: "Review and approve team timesheets",
|
|
72
78
|
children: /* @__PURE__ */ v(i, {
|
|
73
79
|
variant: "list",
|
|
74
80
|
count: 4
|
|
75
81
|
})
|
|
76
|
-
}) :
|
|
82
|
+
}) : he && O ? /* @__PURE__ */ v(d, {
|
|
77
83
|
title: "Time Approval",
|
|
78
84
|
description: "Review and approve team timesheets",
|
|
79
85
|
children: /* @__PURE__ */ v("div", {
|
|
80
86
|
className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
|
|
81
87
|
children: "Failed to load approval data. Please try again later."
|
|
82
88
|
})
|
|
83
|
-
}) : /* @__PURE__ */ y(
|
|
89
|
+
}) : /* @__PURE__ */ y(d, {
|
|
84
90
|
title: "Time Approval",
|
|
85
91
|
description: "Review and approve team timesheets",
|
|
86
92
|
purpose: "The reviewer's queue for signing off team timesheets before they're billed or paid — approve, reject or request changes in one place so payroll and invoices go out accurate and on time.",
|
|
@@ -92,13 +98,13 @@ function T() {
|
|
|
92
98
|
featured: !0,
|
|
93
99
|
title: "Pending Approvals",
|
|
94
100
|
value: String(L?.pendingCount ?? 0),
|
|
95
|
-
icon: /* @__PURE__ */ v(
|
|
101
|
+
icon: /* @__PURE__ */ v(ue, { className: "h-5 w-5" }),
|
|
96
102
|
iconBgColor: "bg-status-warning-bg text-status-warning-text"
|
|
97
103
|
}),
|
|
98
104
|
/* @__PURE__ */ v(r, {
|
|
99
105
|
title: "Approved This Week",
|
|
100
106
|
value: String(L?.approvedCount ?? 0),
|
|
101
|
-
icon: /* @__PURE__ */ v(
|
|
107
|
+
icon: /* @__PURE__ */ v(m, { className: "h-5 w-5" }),
|
|
102
108
|
iconBgColor: "bg-status-success-bg text-status-success-text"
|
|
103
109
|
}),
|
|
104
110
|
/* @__PURE__ */ v(r, {
|
|
@@ -129,7 +135,7 @@ function T() {
|
|
|
129
135
|
"Showing ",
|
|
130
136
|
I.length,
|
|
131
137
|
" of ",
|
|
132
|
-
|
|
138
|
+
xe
|
|
133
139
|
]
|
|
134
140
|
})]
|
|
135
141
|
}), I.length === 0 && !D ? /* @__PURE__ */ v(a, {
|
|
@@ -139,7 +145,7 @@ function T() {
|
|
|
139
145
|
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
|
|
140
146
|
className: "space-y-3",
|
|
141
147
|
children: I.map((r) => {
|
|
142
|
-
let i = r.status ===
|
|
148
|
+
let i = r.status === le.Pending, a = we === r.id, o = Z?.id === r.id, s = r.totalHours > 0 ? Math.round(r.billableHours / r.totalHours * 100) : 0;
|
|
143
149
|
return /* @__PURE__ */ y(b, {
|
|
144
150
|
treatment: "plain",
|
|
145
151
|
glow: o,
|
|
@@ -186,16 +192,16 @@ function T() {
|
|
|
186
192
|
}), /* @__PURE__ */ y("div", {
|
|
187
193
|
className: "flex flex-wrap items-center gap-2",
|
|
188
194
|
children: [
|
|
189
|
-
/* @__PURE__ */ v(
|
|
195
|
+
/* @__PURE__ */ v(re, {
|
|
190
196
|
label: r.status.toLowerCase(),
|
|
191
197
|
status: r.status.toLowerCase()
|
|
192
198
|
}),
|
|
193
199
|
i && /* @__PURE__ */ y(_, { children: [
|
|
194
200
|
/* @__PURE__ */ y("button", {
|
|
195
|
-
onClick: () =>
|
|
201
|
+
onClick: () => Te(r.id),
|
|
196
202
|
disabled: a,
|
|
197
203
|
className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg px-3 py-1.5 text-sm font-medium text-status-success-text hover:bg-status-success-bg/80 disabled:opacity-50",
|
|
198
|
-
children: [/* @__PURE__ */ v(
|
|
204
|
+
children: [/* @__PURE__ */ v(m, { className: "h-4 w-4" }), "Approve"]
|
|
199
205
|
}),
|
|
200
206
|
/* @__PURE__ */ y("button", {
|
|
201
207
|
onClick: () => {
|
|
@@ -212,14 +218,14 @@ function T() {
|
|
|
212
218
|
disabled: a,
|
|
213
219
|
title: "Request revision",
|
|
214
220
|
className: "rounded-md border border-border-seam bg-bg-surface p-1.5 text-status-warning-text hover:bg-status-warning-bg disabled:opacity-50",
|
|
215
|
-
children: /* @__PURE__ */ v(
|
|
221
|
+
children: /* @__PURE__ */ v(de, { className: "h-4 w-4" })
|
|
216
222
|
}),
|
|
217
223
|
/* @__PURE__ */ v("button", {
|
|
218
224
|
onClick: () => X(r),
|
|
219
225
|
disabled: a,
|
|
220
226
|
title: "Withdraw request",
|
|
221
227
|
className: "rounded-md border border-border-seam bg-bg-surface p-1.5 text-text-secondary hover:bg-bg-sunken disabled:opacity-50",
|
|
222
|
-
children: /* @__PURE__ */ v(
|
|
228
|
+
children: /* @__PURE__ */ v(fe, { className: "h-4 w-4" })
|
|
223
229
|
})
|
|
224
230
|
] }),
|
|
225
231
|
/* @__PURE__ */ v("button", {
|
|
@@ -233,7 +239,7 @@ function T() {
|
|
|
233
239
|
})]
|
|
234
240
|
}), r.totalHours > 0 && /* @__PURE__ */ v("div", {
|
|
235
241
|
className: "mt-4",
|
|
236
|
-
children: /* @__PURE__ */ v(
|
|
242
|
+
children: /* @__PURE__ */ v(ce, {
|
|
237
243
|
value: s,
|
|
238
244
|
max: 100,
|
|
239
245
|
tone: "success",
|
|
@@ -244,13 +250,13 @@ function T() {
|
|
|
244
250
|
})]
|
|
245
251
|
}, r.id);
|
|
246
252
|
})
|
|
247
|
-
}),
|
|
253
|
+
}), Se && /* @__PURE__ */ v("div", {
|
|
248
254
|
className: "flex justify-center",
|
|
249
255
|
children: /* @__PURE__ */ v("button", {
|
|
250
256
|
onClick: async () => {
|
|
251
257
|
z(!0);
|
|
252
258
|
try {
|
|
253
|
-
await
|
|
259
|
+
await _e({
|
|
254
260
|
variables: { pagination: {
|
|
255
261
|
limit: C,
|
|
256
262
|
offset: I.length
|
|
@@ -276,11 +282,11 @@ function T() {
|
|
|
276
282
|
className: "lg:col-span-1",
|
|
277
283
|
children: /* @__PURE__ */ y("div", {
|
|
278
284
|
className: "space-y-4 lg:sticky lg:top-4",
|
|
279
|
-
children: [/* @__PURE__ */ v(
|
|
285
|
+
children: [/* @__PURE__ */ v(ie, {
|
|
280
286
|
title: "Approval mix",
|
|
281
287
|
description: "Requests by current status",
|
|
282
|
-
children: /* @__PURE__ */ v(
|
|
283
|
-
data:
|
|
288
|
+
children: /* @__PURE__ */ v(se, {
|
|
289
|
+
data: Ce,
|
|
284
290
|
centerLabel: "Total",
|
|
285
291
|
centerValue: L?.totalRequests ?? 0,
|
|
286
292
|
height: 220,
|
|
@@ -298,7 +304,7 @@ function T() {
|
|
|
298
304
|
onClick: () => Q(null),
|
|
299
305
|
title: "Close thread",
|
|
300
306
|
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-bg-sunken",
|
|
301
|
-
children: [/* @__PURE__ */ v(
|
|
307
|
+
children: [/* @__PURE__ */ v(pe, { className: "h-3.5 w-3.5" }), "Clear"]
|
|
302
308
|
})]
|
|
303
309
|
}), Z ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("p", {
|
|
304
310
|
className: "px-1 text-xs text-text-secondary",
|
|
@@ -309,7 +315,7 @@ function T() {
|
|
|
309
315
|
" ",
|
|
310
316
|
Z.period
|
|
311
317
|
]
|
|
312
|
-
}), /* @__PURE__ */ v(
|
|
318
|
+
}), /* @__PURE__ */ v(me, { request: Z })] }) : /* @__PURE__ */ v(b, {
|
|
313
319
|
treatment: "insight",
|
|
314
320
|
className: "border-border-seam p-6",
|
|
315
321
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -331,7 +337,7 @@ function T() {
|
|
|
331
337
|
})
|
|
332
338
|
})]
|
|
333
339
|
}),
|
|
334
|
-
/* @__PURE__ */ y(
|
|
340
|
+
/* @__PURE__ */ y(f, {
|
|
335
341
|
open: V !== null,
|
|
336
342
|
onClose: () => H(null),
|
|
337
343
|
title: "Reject timesheet",
|
|
@@ -344,10 +350,14 @@ function T() {
|
|
|
344
350
|
}), /* @__PURE__ */ v("button", {
|
|
345
351
|
onClick: async () => {
|
|
346
352
|
if (!(!V || !U.trim())) try {
|
|
347
|
-
await
|
|
353
|
+
if (!(await j({ variables: {
|
|
348
354
|
id: V.id,
|
|
349
355
|
reason: U.trim()
|
|
350
|
-
} })
|
|
356
|
+
} })).data?.rejectRequest) throw Error("rejectRequest failed");
|
|
357
|
+
F.approvalDecided({
|
|
358
|
+
approvalId: V.id,
|
|
359
|
+
decision: "rejected"
|
|
360
|
+
}), S({
|
|
351
361
|
title: "Timesheet rejected",
|
|
352
362
|
variant: "success"
|
|
353
363
|
}), H(null), W(""), await $();
|
|
@@ -358,9 +368,9 @@ function T() {
|
|
|
358
368
|
});
|
|
359
369
|
}
|
|
360
370
|
},
|
|
361
|
-
disabled:
|
|
371
|
+
disabled: M || !U.trim(),
|
|
362
372
|
className: "rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50",
|
|
363
|
-
children:
|
|
373
|
+
children: M ? "Rejecting..." : "Reject"
|
|
364
374
|
})] }),
|
|
365
375
|
children: [/* @__PURE__ */ v("label", {
|
|
366
376
|
className: "block text-sm font-medium text-text-primary",
|
|
@@ -373,7 +383,7 @@ function T() {
|
|
|
373
383
|
className: w
|
|
374
384
|
})]
|
|
375
385
|
}),
|
|
376
|
-
/* @__PURE__ */ y(
|
|
386
|
+
/* @__PURE__ */ y(f, {
|
|
377
387
|
open: G !== null,
|
|
378
388
|
onClose: () => K(null),
|
|
379
389
|
title: "Request revision",
|
|
@@ -386,7 +396,7 @@ function T() {
|
|
|
386
396
|
}), /* @__PURE__ */ v("button", {
|
|
387
397
|
onClick: async () => {
|
|
388
398
|
if (!(!G || !q.trim())) try {
|
|
389
|
-
await
|
|
399
|
+
await N({ variables: {
|
|
390
400
|
id: G.id,
|
|
391
401
|
notes: q.trim()
|
|
392
402
|
} }), S({
|
|
@@ -400,9 +410,9 @@ function T() {
|
|
|
400
410
|
});
|
|
401
411
|
}
|
|
402
412
|
},
|
|
403
|
-
disabled:
|
|
413
|
+
disabled: P || !q.trim(),
|
|
404
414
|
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",
|
|
405
|
-
children:
|
|
415
|
+
children: P ? "Sending..." : "Request Revision"
|
|
406
416
|
})] }),
|
|
407
417
|
children: [/* @__PURE__ */ v("label", {
|
|
408
418
|
className: "block text-sm font-medium text-text-primary",
|
|
@@ -415,7 +425,7 @@ function T() {
|
|
|
415
425
|
className: w
|
|
416
426
|
})]
|
|
417
427
|
}),
|
|
418
|
-
/* @__PURE__ */ v(
|
|
428
|
+
/* @__PURE__ */ v(f, {
|
|
419
429
|
open: Y !== null,
|
|
420
430
|
onClose: () => X(null),
|
|
421
431
|
title: "Withdraw request?",
|
|
@@ -428,7 +438,7 @@ function T() {
|
|
|
428
438
|
}), /* @__PURE__ */ v("button", {
|
|
429
439
|
onClick: async () => {
|
|
430
440
|
if (Y) try {
|
|
431
|
-
await
|
|
441
|
+
await be({ variables: { id: Y.id } }), S({
|
|
432
442
|
title: "Request withdrawn",
|
|
433
443
|
variant: "success"
|
|
434
444
|
}), X(null), await $();
|
|
@@ -447,7 +457,7 @@ function T() {
|
|
|
447
457
|
children: "Withdrawing removes the request from the approval queue. It can be resubmitted later."
|
|
448
458
|
})
|
|
449
459
|
}),
|
|
450
|
-
/* @__PURE__ */ v(
|
|
460
|
+
/* @__PURE__ */ v(ae, {
|
|
451
461
|
toasts: x,
|
|
452
462
|
onDismiss: T
|
|
453
463
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeApprovalPage.js","names":[],"sources":["../../../../src/timecampus/pages/time-approval/TimeApprovalPage.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport {\n CheckCircle,\n XCircle,\n X,\n Clock,\n MessageSquare,\n MessagesSquare,\n Undo2,\n} from \"lucide-react\";\nimport { ContextConversationWidget } from \"@burdenoff/fe-libs/shared\";\nimport { useRegisterPageConversationContext } from \"@burdenoff/fe-libs/shared/providers/shell\";\nimport { GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport { PageLayout } from \"../../components/PageLayout\";\nimport { StatCard } from \"../../components/StatCard\";\nimport { EmptyState } from \"../../components/EmptyState\";\nimport { LoadingSkeleton } from \"../../components/LoadingSkeleton\";\nimport { StatusBadge } from \"../../components/StatusBadge\";\nimport { Modal } from \"../../components/Modal\";\nimport { ToastContainer, useToast } from \"../../components/Toast\";\nimport { ChartCard, DonutChart, ProgressMeter } from \"../../components\";\nimport { getInitials, formatHours, formatDate, cn } from \"../../utils/helpers\";\nimport {\n useListApprovalRequestsQuery,\n useGetApprovalStatsQuery,\n useApproveRequestMutation,\n useRejectRequestMutation,\n useRequestRevisionMutation,\n useWithdrawRequestMutation,\n type ApprovalRequestFieldsFragment,\n type ListApprovalRequestsQuery,\n} from \"@/generated/wspace-operations\";\nimport { ApprovalStatus } from \"@/generated/wspace-types\";\n\nconst PAGE_SIZE = 25;\n\n// Rendered as a child of the review Modal so the registration hook only runs\n// while the modal is mounted — it scopes the shared page-conversation widget to\n// the selected approval request, then releases the context on close/unmount.\nfunction ApprovalReviewThread({\n request,\n}: {\n request: ApprovalRequestFieldsFragment;\n}) {\n useRegisterPageConversationContext({\n entityType: \"TIMECAMPUS_APPROVAL_REQUEST\",\n entityId: request.id,\n contextTitle: `Approval · ${request.period ?? request.id}`,\n });\n\n return <ContextConversationWidget widgetKey=\"approval-review\" />;\n}\n\nconst inputClass =\n \"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\";\n\nexport function TimeApprovalPage() {\n const { toasts, addToast, dismissToast } = useToast();\n\n const {\n data: requestsData,\n loading: requestsLoading,\n error: requestsError,\n refetch,\n fetchMore,\n } = useListApprovalRequestsQuery({\n variables: { pagination: { limit: PAGE_SIZE, offset: 0 } },\n notifyOnNetworkStatusChange: true,\n });\n const {\n data: statsData,\n loading: statsLoading,\n error: statsError,\n refetch: refetchStats,\n } = useGetApprovalStatsQuery();\n\n const [approveRequest] = useApproveRequestMutation();\n const [rejectRequest, { loading: rejecting }] = useRejectRequestMutation();\n const [requestRevision, { loading: requestingRevision }] =\n useRequestRevisionMutation();\n const [withdrawRequest] = useWithdrawRequestMutation();\n\n const requests = requestsData?.approvalRequests?.items ?? [];\n const total = requestsData?.approvalRequests?.total ?? 0;\n const hasMore = requestsData?.approvalRequests?.hasMore ?? false;\n const stats = statsData?.approvalStats;\n\n const approvalMix = [\n { name: \"Pending\", value: stats?.pendingCount ?? 0 },\n { name: \"Approved\", value: stats?.approvedCount ?? 0 },\n { name: \"Rejected\", value: stats?.rejectedCount ?? 0 },\n ];\n\n const [loadingMore, setLoadingMore] = useState(false);\n const [busyId, setBusyId] = useState<string | null>(null);\n\n // Reject reason modal\n const [rejectTarget, setRejectTarget] =\n useState<ApprovalRequestFieldsFragment | null>(null);\n const [rejectReason, setRejectReason] = useState(\"\");\n\n // Request revision modal\n const [revisionTarget, setRevisionTarget] =\n useState<ApprovalRequestFieldsFragment | null>(null);\n const [revisionNotes, setRevisionNotes] = useState(\"\");\n\n // Withdraw confirm modal\n const [withdrawTarget, setWithdrawTarget] =\n useState<ApprovalRequestFieldsFragment | null>(null);\n\n // Review / discussion thread modal\n const [reviewTarget, setReviewTarget] =\n useState<ApprovalRequestFieldsFragment | null>(null);\n\n const refreshAll = async () => {\n await Promise.all([refetch(), refetchStats()]);\n };\n\n const handleApprove = async (id: string) => {\n setBusyId(id);\n try {\n await approveRequest({ variables: { id } });\n addToast({ title: \"Timesheet approved\", variant: \"success\" });\n await refreshAll();\n } catch {\n addToast({ title: \"Failed to approve timesheet\", variant: \"error\" });\n } finally {\n setBusyId(null);\n }\n };\n\n const handleReject = async () => {\n if (!rejectTarget || !rejectReason.trim()) return;\n try {\n await rejectRequest({\n variables: { id: rejectTarget.id, reason: rejectReason.trim() },\n });\n addToast({ title: \"Timesheet rejected\", variant: \"success\" });\n setRejectTarget(null);\n setRejectReason(\"\");\n await refreshAll();\n } catch {\n addToast({ title: \"Failed to reject timesheet\", variant: \"error\" });\n }\n };\n\n const handleRequestRevision = async () => {\n if (!revisionTarget || !revisionNotes.trim()) return;\n try {\n await requestRevision({\n variables: { id: revisionTarget.id, notes: revisionNotes.trim() },\n });\n addToast({ title: \"Revision requested\", variant: \"success\" });\n setRevisionTarget(null);\n setRevisionNotes(\"\");\n await refreshAll();\n } catch {\n addToast({ title: \"Failed to request revision\", variant: \"error\" });\n }\n };\n\n const handleWithdraw = async () => {\n if (!withdrawTarget) return;\n try {\n await withdrawRequest({ variables: { id: withdrawTarget.id } });\n addToast({ title: \"Request withdrawn\", variant: \"success\" });\n setWithdrawTarget(null);\n await refreshAll();\n } catch {\n addToast({ title: \"Failed to withdraw request\", variant: \"error\" });\n }\n };\n\n const handleLoadMore = async () => {\n setLoadingMore(true);\n try {\n await fetchMore({\n variables: {\n pagination: { limit: PAGE_SIZE, offset: requests.length },\n },\n updateQuery: (\n prev: ListApprovalRequestsQuery,\n { fetchMoreResult }: { fetchMoreResult?: ListApprovalRequestsQuery },\n ) => {\n if (!fetchMoreResult) return prev;\n return {\n ...prev,\n approvalRequests: {\n ...fetchMoreResult.approvalRequests,\n items: [\n ...prev.approvalRequests.items,\n ...fetchMoreResult.approvalRequests.items,\n ],\n },\n };\n },\n });\n } finally {\n setLoadingMore(false);\n }\n };\n\n if (requestsLoading && statsLoading && requests.length === 0) {\n return (\n <PageLayout\n title=\"Time Approval\"\n description=\"Review and approve team timesheets\"\n >\n <LoadingSkeleton variant=\"list\" count={4} />\n </PageLayout>\n );\n }\n\n if (requestsError && statsError) {\n return (\n <PageLayout\n title=\"Time Approval\"\n description=\"Review and approve team timesheets\"\n >\n <div className=\"rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text\">\n Failed to load approval data. Please try again later.\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title=\"Time Approval\"\n description=\"Review and approve team timesheets\"\n purpose=\"The reviewer's queue for signing off team timesheets before they're billed or paid — approve, reject or request changes in one place so payroll and invoices go out accurate and on time.\"\n >\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <StatCard\n featured\n title=\"Pending Approvals\"\n value={String(stats?.pendingCount ?? 0)}\n icon={<Clock className=\"h-5 w-5\" />}\n iconBgColor=\"bg-status-warning-bg text-status-warning-text\"\n />\n <StatCard\n title=\"Approved This Week\"\n value={String(stats?.approvedCount ?? 0)}\n icon={<CheckCircle className=\"h-5 w-5\" />}\n iconBgColor=\"bg-status-success-bg text-status-success-text\"\n />\n <StatCard\n title=\"Rejected\"\n value={String(stats?.rejectedCount ?? 0)}\n icon={<XCircle className=\"h-5 w-5\" />}\n iconBgColor=\"bg-status-error-bg text-status-error-text\"\n />\n <StatCard\n title=\"Avg. Review Time\"\n value={\n stats?.averageReviewTime\n ? `${Math.round(stats.averageReviewTime)}h`\n : \"N/A\"\n }\n description=\"Target: 24h\"\n />\n </div>\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <div className=\"space-y-4 lg:col-span-2\">\n <div className=\"flex items-center justify-between gap-3\">\n <h2 className=\"text-sm font-semibold text-text-primary\">\n Pending Requests\n </h2>\n <p className=\"text-xs text-text-secondary\">\n Showing {requests.length} of {total}\n </p>\n </div>\n\n {requests.length === 0 && !requestsLoading ? (\n <EmptyState\n illustration=\"empty-notifications\"\n title=\"No approval requests found\"\n description=\"You're all caught up — submitted timesheets waiting on your review will appear here.\"\n />\n ) : (\n <>\n <div className=\"space-y-3\">\n {requests.map((request: ApprovalRequestFieldsFragment) => {\n const isPending = request.status === ApprovalStatus.Pending;\n const rowBusy = busyId === request.id;\n const selected = reviewTarget?.id === request.id;\n const billablePct =\n request.totalHours > 0\n ? Math.round(\n (request.billableHours / request.totalHours) * 100,\n )\n : 0;\n return (\n <GlassCard\n key={request.id}\n treatment=\"plain\"\n glow={selected}\n className={cn(\n \"p-4\",\n selected && \"border-action-primary-bg/50\",\n )}\n >\n <div className=\"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between\">\n <div className=\"flex min-w-0 items-center gap-3\">\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-sm font-medium text-primary\">\n {getInitials(request.userId)}\n </div>\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {request.userId}\n </p>\n <p className=\"truncate text-xs text-text-secondary\">\n {request.period} · Submitted{\" \"}\n {formatDate(request.submittedAt)}\n </p>\n </div>\n </div>\n\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-5\">\n <div className=\"flex items-center gap-6\">\n <div>\n <p className=\"text-[11px] font-medium uppercase tracking-wide text-text-secondary\">\n Total submitted\n </p>\n <p className=\"text-lg font-semibold tabular-nums text-text-primary\">\n {formatHours(request.totalHours)}\n </p>\n </div>\n <div>\n <p className=\"text-[11px] font-medium uppercase tracking-wide text-text-secondary\">\n Billable\n </p>\n <p className=\"text-lg font-semibold tabular-nums text-text-primary\">\n {formatHours(request.billableHours)}\n </p>\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <StatusBadge\n label={request.status.toLowerCase()}\n status={request.status.toLowerCase()}\n />\n {isPending && (\n <>\n <button\n onClick={() => handleApprove(request.id)}\n disabled={rowBusy}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-status-success-bg px-3 py-1.5 text-sm font-medium text-status-success-text hover:bg-status-success-bg/80 disabled:opacity-50\"\n >\n <CheckCircle className=\"h-4 w-4\" />\n Approve\n </button>\n <button\n onClick={() => {\n setRejectTarget(request);\n setRejectReason(\"\");\n }}\n disabled={rowBusy}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-status-error-bg px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50\"\n >\n <XCircle className=\"h-4 w-4\" />\n Reject\n </button>\n <button\n onClick={() => {\n setRevisionTarget(request);\n setRevisionNotes(\"\");\n }}\n disabled={rowBusy}\n title=\"Request revision\"\n className=\"rounded-md border border-border-seam bg-bg-surface p-1.5 text-status-warning-text hover:bg-status-warning-bg disabled:opacity-50\"\n >\n <MessageSquare className=\"h-4 w-4\" />\n </button>\n <button\n onClick={() => setWithdrawTarget(request)}\n disabled={rowBusy}\n title=\"Withdraw request\"\n className=\"rounded-md border border-border-seam bg-bg-surface p-1.5 text-text-secondary hover:bg-bg-sunken disabled:opacity-50\"\n >\n <Undo2 className=\"h-4 w-4\" />\n </button>\n </>\n )}\n <button\n onClick={() =>\n setReviewTarget(selected ? null : request)\n }\n title=\"Review / Discussion\"\n className={cn(\n \"rounded-md border p-1.5\",\n selected\n ? \"border-action-primary-bg bg-action-primary-bg/10 text-primary\"\n : \"border-border-seam bg-bg-surface text-text-secondary hover:bg-bg-sunken\",\n )}\n >\n <MessagesSquare className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </div>\n\n {request.totalHours > 0 && (\n <div className=\"mt-4\">\n <ProgressMeter\n value={billablePct}\n max={100}\n tone=\"success\"\n size=\"sm\"\n showValue={false}\n label={`Billable share · ${billablePct}%`}\n />\n </div>\n )}\n </GlassCard>\n );\n })}\n </div>\n\n {hasMore && (\n <div className=\"flex justify-center\">\n <button\n onClick={handleLoadMore}\n disabled={loadingMore}\n 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\"\n >\n {loadingMore ? \"Loading...\" : \"Load more\"}\n </button>\n </div>\n )}\n </>\n )}\n </div>\n\n <div className=\"lg:col-span-1\">\n <div className=\"space-y-4 lg:sticky lg:top-4\">\n <ChartCard\n title=\"Approval mix\"\n description=\"Requests by current status\"\n >\n <DonutChart\n data={approvalMix}\n centerLabel=\"Total\"\n centerValue={stats?.totalRequests ?? 0}\n height={220}\n emptyLabel=\"No requests to summarise yet.\"\n ariaLabel=\"Approval requests by status\"\n />\n </ChartCard>\n\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between px-1\">\n <h3 className=\"text-sm font-medium text-text-primary\">\n Review discussion\n </h3>\n {reviewTarget && (\n <button\n onClick={() => setReviewTarget(null)}\n title=\"Close thread\"\n className=\"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-bg-sunken\"\n >\n <X className=\"h-3.5 w-3.5\" />\n Clear\n </button>\n )}\n </div>\n {reviewTarget ? (\n <>\n <p className=\"px-1 text-xs text-text-secondary\">\n Discussing {reviewTarget.userId} ·{\" \"}\n {reviewTarget.period}\n </p>\n <ApprovalReviewThread request={reviewTarget} />\n </>\n ) : (\n <GlassCard\n treatment=\"insight\"\n className=\"border-border-seam p-6\"\n >\n <div className=\"flex flex-col items-center justify-center gap-2 text-center\">\n <MessagesSquare className=\"h-6 w-6 text-text-secondary\" />\n <p className=\"text-sm font-medium text-text-primary\">\n No timesheet selected\n </p>\n <p className=\"text-xs text-text-secondary\">\n Open a request's discussion icon to review it with the\n submitter.\n </p>\n </div>\n </GlassCard>\n )}\n </div>\n </div>\n </div>\n </div>\n\n <Modal\n open={rejectTarget !== null}\n onClose={() => setRejectTarget(null)}\n title=\"Reject timesheet\"\n description={\n rejectTarget\n ? `Rejecting ${rejectTarget.userId}'s ${rejectTarget.period} timesheet.`\n : undefined\n }\n size=\"sm\"\n footer={\n <>\n <button\n onClick={() => setRejectTarget(null)}\n className=\"rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\"\n >\n Cancel\n </button>\n <button\n onClick={handleReject}\n disabled={rejecting || !rejectReason.trim()}\n className=\"rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50\"\n >\n {rejecting ? \"Rejecting...\" : \"Reject\"}\n </button>\n </>\n }\n >\n <label className=\"block text-sm font-medium text-text-primary\">\n Rejection reason\n </label>\n <textarea\n rows={3}\n placeholder=\"Explain why this timesheet is being rejected\"\n value={rejectReason}\n onChange={(e) => setRejectReason(e.target.value)}\n className={inputClass}\n />\n </Modal>\n\n <Modal\n open={revisionTarget !== null}\n onClose={() => setRevisionTarget(null)}\n title=\"Request revision\"\n description={\n revisionTarget\n ? `Ask ${revisionTarget.userId} to revise their ${revisionTarget.period} timesheet.`\n : undefined\n }\n size=\"sm\"\n footer={\n <>\n <button\n onClick={() => setRevisionTarget(null)}\n className=\"rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\"\n >\n Cancel\n </button>\n <button\n onClick={handleRequestRevision}\n disabled={requestingRevision || !revisionNotes.trim()}\n 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\"\n >\n {requestingRevision ? \"Sending...\" : \"Request Revision\"}\n </button>\n </>\n }\n >\n <label className=\"block text-sm font-medium text-text-primary\">\n What needs changing?\n </label>\n <textarea\n rows={3}\n placeholder=\"Describe the changes needed before this can be approved\"\n value={revisionNotes}\n onChange={(e) => setRevisionNotes(e.target.value)}\n className={inputClass}\n />\n </Modal>\n\n <Modal\n open={withdrawTarget !== null}\n onClose={() => setWithdrawTarget(null)}\n title=\"Withdraw request?\"\n description={\n withdrawTarget\n ? `${withdrawTarget.userId}'s ${withdrawTarget.period} timesheet will be pulled from the review queue.`\n : undefined\n }\n size=\"sm\"\n footer={\n <>\n <button\n onClick={() => setWithdrawTarget(null)}\n className=\"rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\"\n >\n Cancel\n </button>\n <button\n onClick={handleWithdraw}\n 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\"\n >\n Withdraw\n </button>\n </>\n }\n >\n <p className=\"text-sm text-text-secondary\">\n Withdrawing removes the request from the approval queue. It can be\n resubmitted later.\n </p>\n </Modal>\n\n <ToastContainer toasts={toasts} onDismiss={dismissToast} />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkCA,IAAM,IAAY;AAKlB,SAAS,GAAqB,EAC5B,cAGC;CAOD,OANA,EAAmC;EACjC,YAAY;EACZ,UAAU,EAAQ;EAClB,cAAc,cAAc,EAAQ,UAAU,EAAQ;CACxD,CAAC,GAEM,kBAAC,GAAD,EAA2B,WAAU,kBAAmB,CAAA;AACjE;AAEA,IAAM,IACJ;AAEF,SAAgB,IAAmB;CACjC,IAAM,EAAE,WAAQ,aAAU,oBAAiB,GAAS,GAE9C,EACJ,MAAM,GACN,SAAS,GACT,OAAO,IACP,aACA,kBACE,EAA6B;EAC/B,WAAW,EAAE,YAAY;GAAE,OAAO;GAAW,QAAQ;EAAE,EAAE;EACzD,6BAA6B;CAC/B,CAAC,GACK,EACJ,MAAM,IACN,SAAS,GACT,OAAO,GACP,SAAS,MACP,EAAyB,GAEvB,CAAC,KAAkB,EAA0B,GAC7C,CAAC,GAAe,EAAE,SAAS,OAAe,GAAyB,GACnE,CAAC,GAAiB,EAAE,SAAS,OACjC,GAA2B,GACvB,CAAC,MAAmB,GAA2B,GAE/C,IAAW,GAAc,kBAAkB,SAAS,CAAC,GACrD,KAAQ,GAAc,kBAAkB,SAAS,GACjD,KAAU,GAAc,kBAAkB,WAAW,IACrD,IAAQ,IAAW,eAEnB,KAAc;EAClB;GAAE,MAAM;GAAW,OAAO,GAAO,gBAAgB;EAAE;EACnD;GAAE,MAAM;GAAY,OAAO,GAAO,iBAAiB;EAAE;EACrD;GAAE,MAAM;GAAY,OAAO,GAAO,iBAAiB;EAAE;CACvD,GAEM,CAAC,GAAa,KAAkB,EAAS,EAAK,GAC9C,CAAC,IAAQ,KAAa,EAAwB,IAAI,GAGlD,CAAC,GAAc,KACnB,EAA+C,IAAI,GAC/C,CAAC,G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../../src/timecampus/pages/time-approval/TimeApprovalPage.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport {\n CheckCircle,\n XCircle,\n X,\n Clock,\n MessageSquare,\n MessagesSquare,\n Undo2,\n} from \"lucide-react\";\nimport { ContextConversationWidget } from \"@burdenoff/fe-libs/shared\";\nimport { useRegisterPageConversationContext } from \"@burdenoff/fe-libs/shared/providers/shell\";\nimport { GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport { PageLayout } from \"../../components/PageLayout\";\nimport { StatCard } from \"../../components/StatCard\";\nimport { EmptyState } from \"../../components/EmptyState\";\nimport { LoadingSkeleton } from \"../../components/LoadingSkeleton\";\nimport { StatusBadge } from \"../../components/StatusBadge\";\nimport { Modal } from \"../../components/Modal\";\nimport { ToastContainer, useToast } from \"../../components/Toast\";\nimport { ChartCard, DonutChart, ProgressMeter } from \"../../components\";\nimport { getInitials, formatHours, formatDate, cn } from \"../../utils/helpers\";\nimport {\n useListApprovalRequestsQuery,\n useGetApprovalStatsQuery,\n useApproveRequestMutation,\n useRejectRequestMutation,\n useRequestRevisionMutation,\n useWithdrawRequestMutation,\n type ApprovalRequestFieldsFragment,\n type ListApprovalRequestsQuery,\n} from \"@/generated/wspace-operations\";\nimport { useTimeCampusAnalytics } from \"../../analytics\";\nimport { ApprovalStatus } from \"@/generated/wspace-types\";\n\nconst PAGE_SIZE = 25;\n\n// Rendered as a child of the review Modal so the registration hook only runs\n// while the modal is mounted — it scopes the shared page-conversation widget to\n// the selected approval request, then releases the context on close/unmount.\nfunction ApprovalReviewThread({\n request,\n}: {\n request: ApprovalRequestFieldsFragment;\n}) {\n useRegisterPageConversationContext({\n entityType: \"TIMECAMPUS_APPROVAL_REQUEST\",\n entityId: request.id,\n contextTitle: `Approval · ${request.period ?? request.id}`,\n });\n\n return <ContextConversationWidget widgetKey=\"approval-review\" />;\n}\n\nconst inputClass =\n \"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\";\n\nexport function TimeApprovalPage() {\n const { toasts, addToast, dismissToast } = useToast();\n\n const {\n data: requestsData,\n loading: requestsLoading,\n error: requestsError,\n refetch,\n fetchMore,\n } = useListApprovalRequestsQuery({\n variables: { pagination: { limit: PAGE_SIZE, offset: 0 } },\n notifyOnNetworkStatusChange: true,\n });\n const {\n data: statsData,\n loading: statsLoading,\n error: statsError,\n refetch: refetchStats,\n } = useGetApprovalStatsQuery();\n\n const [approveRequest] = useApproveRequestMutation();\n const [rejectRequest, { loading: rejecting }] = useRejectRequestMutation();\n const [requestRevision, { loading: requestingRevision }] =\n useRequestRevisionMutation();\n const [withdrawRequest] = useWithdrawRequestMutation();\n const analytics = useTimeCampusAnalytics();\n\n const requests = requestsData?.approvalRequests?.items ?? [];\n const total = requestsData?.approvalRequests?.total ?? 0;\n const hasMore = requestsData?.approvalRequests?.hasMore ?? false;\n const stats = statsData?.approvalStats;\n\n const approvalMix = [\n { name: \"Pending\", value: stats?.pendingCount ?? 0 },\n { name: \"Approved\", value: stats?.approvedCount ?? 0 },\n { name: \"Rejected\", value: stats?.rejectedCount ?? 0 },\n ];\n\n const [loadingMore, setLoadingMore] = useState(false);\n const [busyId, setBusyId] = useState<string | null>(null);\n\n // Reject reason modal\n const [rejectTarget, setRejectTarget] =\n useState<ApprovalRequestFieldsFragment | null>(null);\n const [rejectReason, setRejectReason] = useState(\"\");\n\n // Request revision modal\n const [revisionTarget, setRevisionTarget] =\n useState<ApprovalRequestFieldsFragment | null>(null);\n const [revisionNotes, setRevisionNotes] = useState(\"\");\n\n // Withdraw confirm modal\n const [withdrawTarget, setWithdrawTarget] =\n useState<ApprovalRequestFieldsFragment | null>(null);\n\n // Review / discussion thread modal\n const [reviewTarget, setReviewTarget] =\n useState<ApprovalRequestFieldsFragment | null>(null);\n\n const refreshAll = async () => {\n await Promise.all([refetch(), refetchStats()]);\n };\n\n const handleApprove = async (id: string) => {\n setBusyId(id);\n try {\n const result = await approveRequest({ variables: { id } });\n if (!result.data?.approveRequest)\n throw new Error(\"approveRequest failed\");\n analytics.approvalDecided({ approvalId: id, decision: \"approved\" });\n addToast({ title: \"Timesheet approved\", variant: \"success\" });\n await refreshAll();\n } catch {\n addToast({ title: \"Failed to approve timesheet\", variant: \"error\" });\n } finally {\n setBusyId(null);\n }\n };\n\n const handleReject = async () => {\n if (!rejectTarget || !rejectReason.trim()) return;\n try {\n const result = await rejectRequest({\n variables: { id: rejectTarget.id, reason: rejectReason.trim() },\n });\n if (!result.data?.rejectRequest) throw new Error(\"rejectRequest failed\");\n analytics.approvalDecided({\n approvalId: rejectTarget.id,\n decision: \"rejected\",\n });\n addToast({ title: \"Timesheet rejected\", variant: \"success\" });\n setRejectTarget(null);\n setRejectReason(\"\");\n await refreshAll();\n } catch {\n addToast({ title: \"Failed to reject timesheet\", variant: \"error\" });\n }\n };\n\n const handleRequestRevision = async () => {\n if (!revisionTarget || !revisionNotes.trim()) return;\n try {\n await requestRevision({\n variables: { id: revisionTarget.id, notes: revisionNotes.trim() },\n });\n addToast({ title: \"Revision requested\", variant: \"success\" });\n setRevisionTarget(null);\n setRevisionNotes(\"\");\n await refreshAll();\n } catch {\n addToast({ title: \"Failed to request revision\", variant: \"error\" });\n }\n };\n\n const handleWithdraw = async () => {\n if (!withdrawTarget) return;\n try {\n await withdrawRequest({ variables: { id: withdrawTarget.id } });\n addToast({ title: \"Request withdrawn\", variant: \"success\" });\n setWithdrawTarget(null);\n await refreshAll();\n } catch {\n addToast({ title: \"Failed to withdraw request\", variant: \"error\" });\n }\n };\n\n const handleLoadMore = async () => {\n setLoadingMore(true);\n try {\n await fetchMore({\n variables: {\n pagination: { limit: PAGE_SIZE, offset: requests.length },\n },\n updateQuery: (\n prev: ListApprovalRequestsQuery,\n { fetchMoreResult }: { fetchMoreResult?: ListApprovalRequestsQuery },\n ) => {\n if (!fetchMoreResult) return prev;\n return {\n ...prev,\n approvalRequests: {\n ...fetchMoreResult.approvalRequests,\n items: [\n ...prev.approvalRequests.items,\n ...fetchMoreResult.approvalRequests.items,\n ],\n },\n };\n },\n });\n } finally {\n setLoadingMore(false);\n }\n };\n\n if (requestsLoading && statsLoading && requests.length === 0) {\n return (\n <PageLayout\n title=\"Time Approval\"\n description=\"Review and approve team timesheets\"\n >\n <LoadingSkeleton variant=\"list\" count={4} />\n </PageLayout>\n );\n }\n\n if (requestsError && statsError) {\n return (\n <PageLayout\n title=\"Time Approval\"\n description=\"Review and approve team timesheets\"\n >\n <div className=\"rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text\">\n Failed to load approval data. Please try again later.\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title=\"Time Approval\"\n description=\"Review and approve team timesheets\"\n purpose=\"The reviewer's queue for signing off team timesheets before they're billed or paid — approve, reject or request changes in one place so payroll and invoices go out accurate and on time.\"\n >\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <StatCard\n featured\n title=\"Pending Approvals\"\n value={String(stats?.pendingCount ?? 0)}\n icon={<Clock className=\"h-5 w-5\" />}\n iconBgColor=\"bg-status-warning-bg text-status-warning-text\"\n />\n <StatCard\n title=\"Approved This Week\"\n value={String(stats?.approvedCount ?? 0)}\n icon={<CheckCircle className=\"h-5 w-5\" />}\n iconBgColor=\"bg-status-success-bg text-status-success-text\"\n />\n <StatCard\n title=\"Rejected\"\n value={String(stats?.rejectedCount ?? 0)}\n icon={<XCircle className=\"h-5 w-5\" />}\n iconBgColor=\"bg-status-error-bg text-status-error-text\"\n />\n <StatCard\n title=\"Avg. Review Time\"\n value={\n stats?.averageReviewTime\n ? `${Math.round(stats.averageReviewTime)}h`\n : \"N/A\"\n }\n description=\"Target: 24h\"\n />\n </div>\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <div className=\"space-y-4 lg:col-span-2\">\n <div className=\"flex items-center justify-between gap-3\">\n <h2 className=\"text-sm font-semibold text-text-primary\">\n Pending Requests\n </h2>\n <p className=\"text-xs text-text-secondary\">\n Showing {requests.length} of {total}\n </p>\n </div>\n\n {requests.length === 0 && !requestsLoading ? (\n <EmptyState\n illustration=\"empty-notifications\"\n title=\"No approval requests found\"\n description=\"You're all caught up — submitted timesheets waiting on your review will appear here.\"\n />\n ) : (\n <>\n <div className=\"space-y-3\">\n {requests.map((request: ApprovalRequestFieldsFragment) => {\n const isPending = request.status === ApprovalStatus.Pending;\n const rowBusy = busyId === request.id;\n const selected = reviewTarget?.id === request.id;\n const billablePct =\n request.totalHours > 0\n ? Math.round(\n (request.billableHours / request.totalHours) * 100,\n )\n : 0;\n return (\n <GlassCard\n key={request.id}\n treatment=\"plain\"\n glow={selected}\n className={cn(\n \"p-4\",\n selected && \"border-action-primary-bg/50\",\n )}\n >\n <div className=\"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between\">\n <div className=\"flex min-w-0 items-center gap-3\">\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-sm font-medium text-primary\">\n {getInitials(request.userId)}\n </div>\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {request.userId}\n </p>\n <p className=\"truncate text-xs text-text-secondary\">\n {request.period} · Submitted{\" \"}\n {formatDate(request.submittedAt)}\n </p>\n </div>\n </div>\n\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-5\">\n <div className=\"flex items-center gap-6\">\n <div>\n <p className=\"text-[11px] font-medium uppercase tracking-wide text-text-secondary\">\n Total submitted\n </p>\n <p className=\"text-lg font-semibold tabular-nums text-text-primary\">\n {formatHours(request.totalHours)}\n </p>\n </div>\n <div>\n <p className=\"text-[11px] font-medium uppercase tracking-wide text-text-secondary\">\n Billable\n </p>\n <p className=\"text-lg font-semibold tabular-nums text-text-primary\">\n {formatHours(request.billableHours)}\n </p>\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <StatusBadge\n label={request.status.toLowerCase()}\n status={request.status.toLowerCase()}\n />\n {isPending && (\n <>\n <button\n onClick={() => handleApprove(request.id)}\n disabled={rowBusy}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-status-success-bg px-3 py-1.5 text-sm font-medium text-status-success-text hover:bg-status-success-bg/80 disabled:opacity-50\"\n >\n <CheckCircle className=\"h-4 w-4\" />\n Approve\n </button>\n <button\n onClick={() => {\n setRejectTarget(request);\n setRejectReason(\"\");\n }}\n disabled={rowBusy}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-status-error-bg px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50\"\n >\n <XCircle className=\"h-4 w-4\" />\n Reject\n </button>\n <button\n onClick={() => {\n setRevisionTarget(request);\n setRevisionNotes(\"\");\n }}\n disabled={rowBusy}\n title=\"Request revision\"\n className=\"rounded-md border border-border-seam bg-bg-surface p-1.5 text-status-warning-text hover:bg-status-warning-bg disabled:opacity-50\"\n >\n <MessageSquare className=\"h-4 w-4\" />\n </button>\n <button\n onClick={() => setWithdrawTarget(request)}\n disabled={rowBusy}\n title=\"Withdraw request\"\n className=\"rounded-md border border-border-seam bg-bg-surface p-1.5 text-text-secondary hover:bg-bg-sunken disabled:opacity-50\"\n >\n <Undo2 className=\"h-4 w-4\" />\n </button>\n </>\n )}\n <button\n onClick={() =>\n setReviewTarget(selected ? null : request)\n }\n title=\"Review / Discussion\"\n className={cn(\n \"rounded-md border p-1.5\",\n selected\n ? \"border-action-primary-bg bg-action-primary-bg/10 text-primary\"\n : \"border-border-seam bg-bg-surface text-text-secondary hover:bg-bg-sunken\",\n )}\n >\n <MessagesSquare className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </div>\n\n {request.totalHours > 0 && (\n <div className=\"mt-4\">\n <ProgressMeter\n value={billablePct}\n max={100}\n tone=\"success\"\n size=\"sm\"\n showValue={false}\n label={`Billable share · ${billablePct}%`}\n />\n </div>\n )}\n </GlassCard>\n );\n })}\n </div>\n\n {hasMore && (\n <div className=\"flex justify-center\">\n <button\n onClick={handleLoadMore}\n disabled={loadingMore}\n 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\"\n >\n {loadingMore ? \"Loading...\" : \"Load more\"}\n </button>\n </div>\n )}\n </>\n )}\n </div>\n\n <div className=\"lg:col-span-1\">\n <div className=\"space-y-4 lg:sticky lg:top-4\">\n <ChartCard\n title=\"Approval mix\"\n description=\"Requests by current status\"\n >\n <DonutChart\n data={approvalMix}\n centerLabel=\"Total\"\n centerValue={stats?.totalRequests ?? 0}\n height={220}\n emptyLabel=\"No requests to summarise yet.\"\n ariaLabel=\"Approval requests by status\"\n />\n </ChartCard>\n\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between px-1\">\n <h3 className=\"text-sm font-medium text-text-primary\">\n Review discussion\n </h3>\n {reviewTarget && (\n <button\n onClick={() => setReviewTarget(null)}\n title=\"Close thread\"\n className=\"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-bg-sunken\"\n >\n <X className=\"h-3.5 w-3.5\" />\n Clear\n </button>\n )}\n </div>\n {reviewTarget ? (\n <>\n <p className=\"px-1 text-xs text-text-secondary\">\n Discussing {reviewTarget.userId} ·{\" \"}\n {reviewTarget.period}\n </p>\n <ApprovalReviewThread request={reviewTarget} />\n </>\n ) : (\n <GlassCard\n treatment=\"insight\"\n className=\"border-border-seam p-6\"\n >\n <div className=\"flex flex-col items-center justify-center gap-2 text-center\">\n <MessagesSquare className=\"h-6 w-6 text-text-secondary\" />\n <p className=\"text-sm font-medium text-text-primary\">\n No timesheet selected\n </p>\n <p className=\"text-xs text-text-secondary\">\n Open a request's discussion icon to review it with the\n submitter.\n </p>\n </div>\n </GlassCard>\n )}\n </div>\n </div>\n </div>\n </div>\n\n <Modal\n open={rejectTarget !== null}\n onClose={() => setRejectTarget(null)}\n title=\"Reject timesheet\"\n description={\n rejectTarget\n ? `Rejecting ${rejectTarget.userId}'s ${rejectTarget.period} timesheet.`\n : undefined\n }\n size=\"sm\"\n footer={\n <>\n <button\n onClick={() => setRejectTarget(null)}\n className=\"rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\"\n >\n Cancel\n </button>\n <button\n onClick={handleReject}\n disabled={rejecting || !rejectReason.trim()}\n className=\"rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50\"\n >\n {rejecting ? \"Rejecting...\" : \"Reject\"}\n </button>\n </>\n }\n >\n <label className=\"block text-sm font-medium text-text-primary\">\n Rejection reason\n </label>\n <textarea\n rows={3}\n placeholder=\"Explain why this timesheet is being rejected\"\n value={rejectReason}\n onChange={(e) => setRejectReason(e.target.value)}\n className={inputClass}\n />\n </Modal>\n\n <Modal\n open={revisionTarget !== null}\n onClose={() => setRevisionTarget(null)}\n title=\"Request revision\"\n description={\n revisionTarget\n ? `Ask ${revisionTarget.userId} to revise their ${revisionTarget.period} timesheet.`\n : undefined\n }\n size=\"sm\"\n footer={\n <>\n <button\n onClick={() => setRevisionTarget(null)}\n className=\"rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\"\n >\n Cancel\n </button>\n <button\n onClick={handleRequestRevision}\n disabled={requestingRevision || !revisionNotes.trim()}\n 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\"\n >\n {requestingRevision ? \"Sending...\" : \"Request Revision\"}\n </button>\n </>\n }\n >\n <label className=\"block text-sm font-medium text-text-primary\">\n What needs changing?\n </label>\n <textarea\n rows={3}\n placeholder=\"Describe the changes needed before this can be approved\"\n value={revisionNotes}\n onChange={(e) => setRevisionNotes(e.target.value)}\n className={inputClass}\n />\n </Modal>\n\n <Modal\n open={withdrawTarget !== null}\n onClose={() => setWithdrawTarget(null)}\n title=\"Withdraw request?\"\n description={\n withdrawTarget\n ? `${withdrawTarget.userId}'s ${withdrawTarget.period} timesheet will be pulled from the review queue.`\n : undefined\n }\n size=\"sm\"\n footer={\n <>\n <button\n onClick={() => setWithdrawTarget(null)}\n className=\"rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50\"\n >\n Cancel\n </button>\n <button\n onClick={handleWithdraw}\n 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\"\n >\n Withdraw\n </button>\n </>\n }\n >\n <p className=\"text-sm text-text-secondary\">\n Withdrawing removes the request from the approval queue. It can be\n resubmitted later.\n </p>\n </Modal>\n\n <ToastContainer toasts={toasts} onDismiss={dismissToast} />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmCA,IAAM,IAAY;AAKlB,SAAS,GAAqB,EAC5B,cAGC;CAOD,OANA,EAAmC;EACjC,YAAY;EACZ,UAAU,EAAQ;EAClB,cAAc,cAAc,EAAQ,UAAU,EAAQ;CACxD,CAAC,GAEM,kBAAC,GAAD,EAA2B,WAAU,kBAAmB,CAAA;AACjE;AAEA,IAAM,IACJ;AAEF,SAAgB,IAAmB;CACjC,IAAM,EAAE,WAAQ,aAAU,oBAAiB,GAAS,GAE9C,EACJ,MAAM,GACN,SAAS,GACT,OAAO,IACP,aACA,kBACE,GAA6B;EAC/B,WAAW,EAAE,YAAY;GAAE,OAAO;GAAW,QAAQ;EAAE,EAAE;EACzD,6BAA6B;CAC/B,CAAC,GACK,EACJ,MAAM,IACN,SAAS,IACT,OAAO,GACP,SAAS,MACP,EAAyB,GAEvB,CAAC,KAAkB,EAA0B,GAC7C,CAAC,GAAe,EAAE,SAAS,OAAe,EAAyB,GACnE,CAAC,GAAiB,EAAE,SAAS,OACjC,GAA2B,GACvB,CAAC,MAAmB,EAA2B,GAC/C,IAAY,EAAuB,GAEnC,IAAW,GAAc,kBAAkB,SAAS,CAAC,GACrD,KAAQ,GAAc,kBAAkB,SAAS,GAC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,EAAkB,IAAI;KACrC,WAAU;KACX,UAAA;IAEO,CAAA,GACR,kBAAC,UAAD;KACE,SAAS,YApbc;MAC5B,OACL,IAAI;OAIF,AAHA,MAAM,GAAgB,EAAE,WAAW,EAAE,IAAI,EAAe,GAAG,EAAE,CAAC,GAC9D,EAAS;QAAE,OAAO;QAAqB,SAAS;OAAU,CAAC,GAC3D,EAAkB,IAAI,GACtB,MAAM,EAAW;MACnB,QAAQ;OACN,EAAS;QAAE,OAAO;QAA8B,SAAS;OAAQ,CAAC;MACpE;KACF;KA2aY,WAAU;KACX,UAAA;IAEO,CAAA,CACR,EAAA,CAAA;IAGJ,UAAA,kBAAC,KAAD;KAAG,WAAU;KAA8B,UAAA;IAGxC,CAAA;GACE,CAAA;GAEP,kBAAC,IAAD;IAAwB;IAAQ,WAAW;GAAe,CAAA;EAChD;;AAEhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelinePage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/timeline/TimelinePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimelinePage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/timeline/TimelinePage.tsx"],"names":[],"mappings":"AAqiBA,wBAAgB,YAAY,gCAqa3B"}
|