@burdenoff/microfe-timecampus 2026.1031.10 → 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/package.json +1 -1
|
@@ -3,112 +3,119 @@ import { StatCard as i } from "../../components/StatCard.js";
|
|
|
3
3
|
import { LoadingSkeleton as a } from "../../components/LoadingSkeleton.js";
|
|
4
4
|
import { EmptyState as o } from "../../components/EmptyState.js";
|
|
5
5
|
import { useCreateClientPortalConfigMutation as s, useDeleteClientPortalConfigMutation as ee, useGetClientPortalStatsQuery as te, useListClientPortalConfigsQuery as ne, useRegenerateClientPortalShareTokenMutation as re, useToggleClientPortalMutation as ie, useUpdateClientPortalConfigMutation as ae } from "../../../generated/wspace-operations.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useTimeCampusAnalytics as c } from "../../analytics/useTimeCampusAnalytics.js";
|
|
7
|
+
import "../../analytics/index.js";
|
|
8
|
+
import { PageLayout as l } from "../../components/PageLayout.js";
|
|
7
9
|
import { StatusBadge as oe } from "../../components/StatusBadge.js";
|
|
8
|
-
import { Modal as
|
|
9
|
-
import { ChartCard as
|
|
10
|
+
import { Modal as u } from "../../components/Modal.js";
|
|
11
|
+
import { ChartCard as d } from "../../components/ChartCard.js";
|
|
10
12
|
import { ToastContainer as se, useToast as ce } from "../../components/Toast.js";
|
|
11
13
|
import { BarsChart as le } from "../../components/charts/BarsChart.js";
|
|
12
14
|
import { DonutChart as ue } from "../../components/charts/DonutChart.js";
|
|
13
15
|
import { ProgressMeter as de } from "../../components/charts/ProgressMeter.js";
|
|
14
16
|
import "../../components/index.js";
|
|
15
|
-
import { useState as
|
|
16
|
-
import { Building2 as fe, Check as pe, FolderOpen as me, Link2 as he, Pencil as
|
|
17
|
-
import { gql as
|
|
18
|
-
import { useApolloClient as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { GlassCard as
|
|
21
|
-
import { uploadBlobToFiles as
|
|
17
|
+
import { useState as f } from "react";
|
|
18
|
+
import { Building2 as fe, Check as pe, FolderOpen as me, Link2 as he, Pencil as ge, Plus as _e, Power as ve, PowerOff as ye, RefreshCw as p, Trash2 as be, Users as xe } from "lucide-react";
|
|
19
|
+
import { gql as m } from "@apollo/client";
|
|
20
|
+
import { useApolloClient as Se } from "@apollo/client/react";
|
|
21
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
22
|
+
import { GlassCard as Ce } from "@burdenoff/fe-libs/ui";
|
|
23
|
+
import { uploadBlobToFiles as we } from "@burdenoff/fe-libs/storage";
|
|
22
24
|
//#region src/timecampus/pages/client-portal/ClientPortalPage.tsx
|
|
23
|
-
var
|
|
25
|
+
var v = 25, y = "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", Te = "mt-1 block w-full text-sm text-text-secondary file:mr-3 file:rounded-md file:border-0 file:bg-action-primary-bg file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-action-primary-text hover:file:bg-action-primary-bg/90", Ee = m`
|
|
24
26
|
query TimeCampus_GetFileDownloadUrl($id: ID!, $expiresIn: Int) {
|
|
25
27
|
getFileDownloadUrl(id: $id, expiresIn: $expiresIn)
|
|
26
28
|
}
|
|
27
|
-
`,
|
|
29
|
+
`, De = m`
|
|
28
30
|
mutation TimeCampusClient_EnsureFolder($path: String!) {
|
|
29
31
|
ensureFolderByPath(path: $path) {
|
|
30
32
|
id
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
`;
|
|
34
|
-
function
|
|
36
|
+
function Oe(e) {
|
|
35
37
|
return `${typeof window < "u" ? window.location.origin : ""}/portal/${e}`;
|
|
36
38
|
}
|
|
37
|
-
var
|
|
39
|
+
var b = {
|
|
38
40
|
clientName: "",
|
|
39
41
|
contactEmail: "",
|
|
40
42
|
contactPhone: "",
|
|
41
43
|
description: "",
|
|
42
44
|
logoUrl: ""
|
|
43
45
|
};
|
|
44
|
-
function
|
|
45
|
-
let { toasts:
|
|
46
|
+
function x() {
|
|
47
|
+
let { toasts: m, addToast: x, dismissToast: S } = ce(), C = Se(), [w, T] = f(null), [E, D] = f(!1), { data: O, loading: ke, error: Ae, refetch: k, fetchMore: je } = ne({
|
|
46
48
|
variables: { pagination: {
|
|
47
|
-
limit:
|
|
49
|
+
limit: v,
|
|
48
50
|
offset: 0
|
|
49
51
|
} },
|
|
50
52
|
notifyOnNetworkStatusChange: !0
|
|
51
|
-
}), { data:
|
|
53
|
+
}), { data: Me, refetch: Ne } = te(), [Pe, { loading: A }] = re(), [Fe, { loading: j }] = s(), [Ie, { loading: M }] = ae(), [Le, { loading: N }] = ee(), [Re] = ie(), P = c(), F = O?.clientPortalConfigs?.items ?? [], ze = O?.clientPortalConfigs?.hasMore ?? !1, I = Me?.clientPortalStats, L = (e) => e.projects.reduce((e, t) => e + t.trackedHours, 0), R = (I?.totalClients ?? 0) - (I?.activeClients ?? 0), Be = F.map((e) => ({
|
|
52
54
|
name: e.clientName,
|
|
53
|
-
hours:
|
|
54
|
-
})).filter((e) => e.hours > 0).sort((e, t) => t.hours - e.hours).slice(0, 8),
|
|
55
|
+
hours: L(e)
|
|
56
|
+
})).filter((e) => e.hours > 0).sort((e, t) => t.hours - e.hours).slice(0, 8), z = F.reduce((e, t) => Math.max(e, L(t)), 0), Ve = [{
|
|
55
57
|
name: "Active",
|
|
56
|
-
value:
|
|
58
|
+
value: I?.activeClients ?? 0
|
|
57
59
|
}, {
|
|
58
60
|
name: "Inactive",
|
|
59
|
-
value: Math.max(
|
|
60
|
-
}], [
|
|
61
|
-
await Promise.all([
|
|
62
|
-
},
|
|
61
|
+
value: Math.max(R, 0)
|
|
62
|
+
}], [B, V] = f(!1), [He, H] = f(!1), [U, W] = f(null), [G, K] = f(b), [q, J] = f(null), [Ue, Y] = f(null), X = async () => {
|
|
63
|
+
await Promise.all([k(), Ne()]);
|
|
64
|
+
}, We = async (e) => {
|
|
63
65
|
if (e.shareToken) try {
|
|
64
|
-
await navigator.clipboard.writeText(
|
|
66
|
+
await navigator.clipboard.writeText(Oe(e.shareToken)), T(e.id), window.setTimeout(() => T(null), 2e3);
|
|
65
67
|
} catch {
|
|
66
|
-
|
|
68
|
+
x({
|
|
67
69
|
title: "Clipboard unavailable",
|
|
68
70
|
variant: "error"
|
|
69
71
|
});
|
|
70
72
|
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
+
}, Z = async (e) => {
|
|
74
|
+
Y(e.id);
|
|
73
75
|
try {
|
|
74
|
-
await
|
|
76
|
+
let t = (await Pe({ variables: { id: e.id } })).data?.regenerateClientPortalShareToken;
|
|
77
|
+
if (!t) throw Error("regenerateClientPortalShareToken failed");
|
|
78
|
+
P.clientPortalShared({
|
|
79
|
+
portalId: t.id,
|
|
80
|
+
action: "link_regenerated"
|
|
81
|
+
}), x({
|
|
75
82
|
title: "Share link regenerated",
|
|
76
83
|
variant: "success"
|
|
77
|
-
}), await
|
|
84
|
+
}), await k();
|
|
78
85
|
} catch {
|
|
79
|
-
|
|
86
|
+
x({
|
|
80
87
|
title: "Failed to regenerate link",
|
|
81
88
|
variant: "error"
|
|
82
89
|
});
|
|
83
90
|
} finally {
|
|
84
|
-
|
|
91
|
+
Y(null);
|
|
85
92
|
}
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
|
|
93
|
+
}, Ge = () => {
|
|
94
|
+
W(null), K(b), H(!0);
|
|
95
|
+
}, Ke = (e) => {
|
|
96
|
+
W(e), K({
|
|
90
97
|
clientName: e.clientName,
|
|
91
98
|
contactEmail: e.contactEmail ?? "",
|
|
92
99
|
contactPhone: e.contactPhone ?? "",
|
|
93
100
|
description: e.description ?? "",
|
|
94
101
|
logoUrl: e.logoUrl ?? ""
|
|
95
|
-
}),
|
|
96
|
-
},
|
|
97
|
-
|
|
102
|
+
}), H(!0);
|
|
103
|
+
}, qe = async (e) => {
|
|
104
|
+
D(!0);
|
|
98
105
|
try {
|
|
99
|
-
let { data: t } = await
|
|
100
|
-
mutation:
|
|
106
|
+
let { data: t } = await C.mutate({
|
|
107
|
+
mutation: De,
|
|
101
108
|
variables: { path: "/TimeCampus/ClientLogos" }
|
|
102
109
|
}), n = t?.ensureFolderByPath?.id;
|
|
103
110
|
if (!n) throw Error("Could not resolve upload folder");
|
|
104
|
-
let r = await
|
|
105
|
-
client:
|
|
111
|
+
let r = await we({
|
|
112
|
+
client: C,
|
|
106
113
|
blob: e,
|
|
107
114
|
filename: e.name,
|
|
108
115
|
mimeType: e.type || "application/octet-stream",
|
|
109
116
|
folderId: n
|
|
110
|
-
}), { data: i } = await
|
|
111
|
-
query:
|
|
117
|
+
}), { data: i } = await C.query({
|
|
118
|
+
query: Ee,
|
|
112
119
|
variables: {
|
|
113
120
|
id: r.id,
|
|
114
121
|
expiresIn: 604800
|
|
@@ -116,88 +123,97 @@ function S() {
|
|
|
116
123
|
fetchPolicy: "no-cache"
|
|
117
124
|
}), a = i?.getFileDownloadUrl;
|
|
118
125
|
if (!a) throw Error("No download URL returned");
|
|
119
|
-
|
|
126
|
+
K((e) => ({
|
|
120
127
|
...e,
|
|
121
128
|
logoUrl: a
|
|
122
129
|
}));
|
|
123
130
|
} catch {
|
|
124
|
-
|
|
131
|
+
x({
|
|
125
132
|
title: "Failed to upload logo",
|
|
126
133
|
variant: "error"
|
|
127
134
|
});
|
|
128
135
|
} finally {
|
|
129
|
-
|
|
136
|
+
D(!1);
|
|
130
137
|
}
|
|
131
138
|
}, Q = () => {
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
id:
|
|
139
|
+
H(!1), W(null);
|
|
140
|
+
}, Je = async () => {
|
|
141
|
+
if (G.clientName.trim()) try {
|
|
142
|
+
if (U) await Ie({ variables: {
|
|
143
|
+
id: U.id,
|
|
137
144
|
input: {
|
|
138
|
-
clientName:
|
|
139
|
-
contactEmail:
|
|
140
|
-
contactPhone:
|
|
141
|
-
description:
|
|
142
|
-
logoUrl:
|
|
145
|
+
clientName: G.clientName.trim(),
|
|
146
|
+
contactEmail: G.contactEmail.trim() || void 0,
|
|
147
|
+
contactPhone: G.contactPhone.trim() || void 0,
|
|
148
|
+
description: G.description.trim() || void 0,
|
|
149
|
+
logoUrl: G.logoUrl || void 0
|
|
143
150
|
}
|
|
144
|
-
} }),
|
|
151
|
+
} }), x({
|
|
145
152
|
title: "Client updated",
|
|
146
153
|
variant: "success"
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
});
|
|
155
|
+
else {
|
|
156
|
+
let e = (await Fe({ variables: { input: {
|
|
157
|
+
clientName: G.clientName.trim(),
|
|
158
|
+
contactEmail: G.contactEmail.trim() || void 0,
|
|
159
|
+
contactPhone: G.contactPhone.trim() || void 0,
|
|
160
|
+
description: G.description.trim() || void 0,
|
|
161
|
+
logoUrl: G.logoUrl || void 0,
|
|
162
|
+
isActive: !0
|
|
163
|
+
} } })).data?.createClientPortalConfig;
|
|
164
|
+
if (!e) throw Error("createClientPortalConfig failed");
|
|
165
|
+
P.clientPortalShared({
|
|
166
|
+
portalId: e.id,
|
|
167
|
+
action: "created"
|
|
168
|
+
}), x({
|
|
169
|
+
title: "Client added",
|
|
170
|
+
variant: "success"
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
Q(), await X();
|
|
158
174
|
} catch {
|
|
159
|
-
|
|
160
|
-
title:
|
|
175
|
+
x({
|
|
176
|
+
title: U ? "Failed to update client" : "Failed to add client",
|
|
161
177
|
variant: "error"
|
|
162
178
|
});
|
|
163
179
|
}
|
|
164
|
-
},
|
|
165
|
-
if (
|
|
166
|
-
await
|
|
180
|
+
}, Ye = async () => {
|
|
181
|
+
if (q) try {
|
|
182
|
+
await Le({ variables: { id: q.id } }), x({
|
|
167
183
|
title: "Client deleted",
|
|
168
184
|
variant: "success"
|
|
169
|
-
}),
|
|
185
|
+
}), J(null), await X();
|
|
170
186
|
} catch {
|
|
171
|
-
|
|
187
|
+
x({
|
|
172
188
|
title: "Failed to delete client",
|
|
173
189
|
variant: "error"
|
|
174
190
|
});
|
|
175
191
|
}
|
|
176
|
-
},
|
|
177
|
-
|
|
192
|
+
}, Xe = async (e) => {
|
|
193
|
+
Y(e.id);
|
|
178
194
|
try {
|
|
179
|
-
await
|
|
195
|
+
await Re({ variables: {
|
|
180
196
|
id: e.id,
|
|
181
197
|
isActive: !e.isActive
|
|
182
|
-
} }),
|
|
198
|
+
} }), x({
|
|
183
199
|
title: e.isActive ? "Client deactivated" : "Client activated",
|
|
184
200
|
variant: "success"
|
|
185
|
-
}), await
|
|
201
|
+
}), await X();
|
|
186
202
|
} catch {
|
|
187
|
-
|
|
203
|
+
x({
|
|
188
204
|
title: "Failed to toggle client",
|
|
189
205
|
variant: "error"
|
|
190
206
|
});
|
|
191
207
|
} finally {
|
|
192
|
-
|
|
208
|
+
Y(null);
|
|
193
209
|
}
|
|
194
|
-
},
|
|
195
|
-
|
|
210
|
+
}, Ze = async () => {
|
|
211
|
+
V(!0);
|
|
196
212
|
try {
|
|
197
|
-
await
|
|
213
|
+
await je({
|
|
198
214
|
variables: { pagination: {
|
|
199
|
-
limit:
|
|
200
|
-
offset:
|
|
215
|
+
limit: v,
|
|
216
|
+
offset: F.length
|
|
201
217
|
} },
|
|
202
218
|
updateQuery: (e, { fetchMoreResult: t }) => t ? {
|
|
203
219
|
...e,
|
|
@@ -208,78 +224,78 @@ function S() {
|
|
|
208
224
|
} : e
|
|
209
225
|
});
|
|
210
226
|
} finally {
|
|
211
|
-
|
|
227
|
+
V(!1);
|
|
212
228
|
}
|
|
213
229
|
};
|
|
214
|
-
if (
|
|
230
|
+
if (ke && F.length === 0) return /* @__PURE__ */ g(l, {
|
|
215
231
|
title: "Client Portal",
|
|
216
232
|
description: "Manage clients and their projects",
|
|
217
|
-
children: /* @__PURE__ */
|
|
233
|
+
children: /* @__PURE__ */ g(a, {
|
|
218
234
|
variant: "list",
|
|
219
235
|
count: 4
|
|
220
236
|
})
|
|
221
237
|
});
|
|
222
|
-
if (
|
|
238
|
+
if (Ae) return /* @__PURE__ */ g(l, {
|
|
223
239
|
title: "Client Portal",
|
|
224
240
|
description: "Manage clients and their projects",
|
|
225
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ g("div", {
|
|
226
242
|
className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
|
|
227
243
|
children: "Failed to load client portal data. Please try again later."
|
|
228
244
|
})
|
|
229
245
|
});
|
|
230
|
-
let $ = /* @__PURE__ */
|
|
231
|
-
onClick:
|
|
246
|
+
let $ = /* @__PURE__ */ _("button", {
|
|
247
|
+
onClick: Ge,
|
|
232
248
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ g(_e, { className: "h-4 w-4" }), "Add Client"]
|
|
234
250
|
});
|
|
235
|
-
return /* @__PURE__ */
|
|
251
|
+
return /* @__PURE__ */ _(l, {
|
|
236
252
|
title: "Client Portal",
|
|
237
253
|
description: "Manage clients and their projects",
|
|
238
254
|
purpose: "Give clients a transparent window into the work you do for them — the projects, hours and progress tied to each one — so billing conversations are backed by data and trust, not spreadsheets.",
|
|
239
255
|
actions: $,
|
|
240
256
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ _("div", {
|
|
242
258
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
243
259
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ g(i, {
|
|
245
261
|
featured: !0,
|
|
246
262
|
title: "Active Clients",
|
|
247
|
-
value: String(
|
|
248
|
-
icon: /* @__PURE__ */
|
|
263
|
+
value: String(I?.activeClients ?? 0),
|
|
264
|
+
icon: /* @__PURE__ */ g(fe, { className: "h-5 w-5" })
|
|
249
265
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ g(i, {
|
|
251
267
|
title: "Total Projects",
|
|
252
|
-
value: String(
|
|
253
|
-
icon: /* @__PURE__ */
|
|
268
|
+
value: String(I?.totalProjectsShared ?? 0),
|
|
269
|
+
icon: /* @__PURE__ */ g(me, { className: "h-5 w-5" })
|
|
254
270
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ g(i, {
|
|
256
272
|
title: "Total Clients",
|
|
257
|
-
value: String(
|
|
258
|
-
icon: /* @__PURE__ */
|
|
273
|
+
value: String(I?.totalClients ?? 0),
|
|
274
|
+
icon: /* @__PURE__ */ g(xe, { className: "h-5 w-5" })
|
|
259
275
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ g(i, {
|
|
261
277
|
title: "Inactive",
|
|
262
|
-
value: String(Math.max(
|
|
263
|
-
icon: /* @__PURE__ */
|
|
278
|
+
value: String(Math.max(R, 0)),
|
|
279
|
+
icon: /* @__PURE__ */ g(ye, { className: "h-5 w-5" }),
|
|
264
280
|
iconBgColor: "bg-bg-sunken text-text-secondary",
|
|
265
281
|
description: "portals turned off"
|
|
266
282
|
})
|
|
267
283
|
]
|
|
268
284
|
}),
|
|
269
|
-
|
|
285
|
+
F.length === 0 ? /* @__PURE__ */ g(o, {
|
|
270
286
|
illustration: "empty-people",
|
|
271
287
|
title: "No clients configured yet",
|
|
272
288
|
description: "Add your first client to share projects and tracked hours with them.",
|
|
273
289
|
action: $
|
|
274
|
-
}) : /* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
290
|
+
}) : /* @__PURE__ */ _(h, { children: [
|
|
291
|
+
/* @__PURE__ */ _("div", {
|
|
276
292
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ g(d, {
|
|
278
294
|
title: "Tracked hours by client",
|
|
279
295
|
description: "Top clients by logged hours (loaded page)",
|
|
280
296
|
className: "lg:col-span-2",
|
|
281
|
-
children: /* @__PURE__ */
|
|
282
|
-
data:
|
|
297
|
+
children: /* @__PURE__ */ g(le, {
|
|
298
|
+
data: Be,
|
|
283
299
|
xKey: "name",
|
|
284
300
|
series: [{
|
|
285
301
|
key: "hours",
|
|
@@ -292,130 +308,130 @@ function S() {
|
|
|
292
308
|
emptyLabel: "No tracked hours logged yet.",
|
|
293
309
|
ariaLabel: "Tracked hours by client"
|
|
294
310
|
})
|
|
295
|
-
}), /* @__PURE__ */
|
|
311
|
+
}), /* @__PURE__ */ g(d, {
|
|
296
312
|
title: "Portal status",
|
|
297
313
|
description: "Shared vs. private clients",
|
|
298
|
-
children: /* @__PURE__ */
|
|
299
|
-
data:
|
|
314
|
+
children: /* @__PURE__ */ g(ue, {
|
|
315
|
+
data: Ve,
|
|
300
316
|
centerLabel: "Clients",
|
|
301
|
-
centerValue:
|
|
317
|
+
centerValue: I?.totalClients ?? 0,
|
|
302
318
|
height: 260,
|
|
303
319
|
emptyLabel: "No clients yet.",
|
|
304
320
|
ariaLabel: "Clients by portal status"
|
|
305
321
|
})
|
|
306
322
|
})]
|
|
307
323
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ g("div", {
|
|
309
325
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
|
|
310
|
-
children:
|
|
311
|
-
let a =
|
|
312
|
-
return /* @__PURE__ */
|
|
326
|
+
children: F.map((i) => {
|
|
327
|
+
let a = L(i), o = Ue === i.id, s = w === i.id;
|
|
328
|
+
return /* @__PURE__ */ _(Ce, {
|
|
313
329
|
treatment: "insight",
|
|
314
330
|
glow: i.isActive,
|
|
315
331
|
className: "p-4",
|
|
316
332
|
children: [
|
|
317
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ _("div", {
|
|
318
334
|
className: "flex items-start justify-between gap-3",
|
|
319
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ _("div", {
|
|
320
336
|
className: "flex min-w-0 items-center gap-3",
|
|
321
|
-
children: [i.logoUrl ? /* @__PURE__ */
|
|
337
|
+
children: [i.logoUrl ? /* @__PURE__ */ g("img", {
|
|
322
338
|
src: i.logoUrl,
|
|
323
339
|
alt: `${i.clientName} logo`,
|
|
324
340
|
className: "h-11 w-11 shrink-0 rounded-lg border border-border-seam object-cover"
|
|
325
|
-
}) : /* @__PURE__ */
|
|
341
|
+
}) : /* @__PURE__ */ g("div", {
|
|
326
342
|
className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-sm font-semibold text-primary",
|
|
327
343
|
children: r(i.clientName)
|
|
328
|
-
}), /* @__PURE__ */
|
|
344
|
+
}), /* @__PURE__ */ _("div", {
|
|
329
345
|
className: "min-w-0",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ g("p", {
|
|
331
347
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
332
348
|
children: i.clientName
|
|
333
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ _("p", {
|
|
334
350
|
className: "truncate text-xs text-text-secondary",
|
|
335
351
|
children: ["Since ", t(i.createdAt)]
|
|
336
352
|
})]
|
|
337
353
|
})]
|
|
338
|
-
}), /* @__PURE__ */
|
|
354
|
+
}), /* @__PURE__ */ g(oe, {
|
|
339
355
|
label: i.isActive ? "active" : "inactive",
|
|
340
356
|
status: i.isActive ? "active" : "inactive"
|
|
341
357
|
})]
|
|
342
358
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ _("div", {
|
|
344
360
|
className: "mt-4 grid grid-cols-2 gap-3",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ _("div", {
|
|
346
362
|
className: "rounded-lg border border-border-seam bg-bg-sunken/40 px-3 py-2",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ g("p", {
|
|
348
364
|
className: "text-[11px] font-medium uppercase tracking-wide text-text-secondary",
|
|
349
365
|
children: "Projects"
|
|
350
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ g("p", {
|
|
351
367
|
className: "mt-0.5 text-lg font-semibold tabular-nums text-text-primary",
|
|
352
368
|
children: i.projects.length
|
|
353
369
|
})]
|
|
354
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ _("div", {
|
|
355
371
|
className: "rounded-lg border border-border-seam bg-bg-sunken/40 px-3 py-2",
|
|
356
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ g("p", {
|
|
357
373
|
className: "text-[11px] font-medium uppercase tracking-wide text-text-secondary",
|
|
358
374
|
children: "Tracked hours"
|
|
359
|
-
}), /* @__PURE__ */
|
|
375
|
+
}), /* @__PURE__ */ _("p", {
|
|
360
376
|
className: "mt-0.5 text-lg font-semibold tabular-nums text-text-primary",
|
|
361
377
|
children: [n(a), "h"]
|
|
362
378
|
})]
|
|
363
379
|
})]
|
|
364
380
|
}),
|
|
365
|
-
|
|
381
|
+
z > 0 && /* @__PURE__ */ g("div", {
|
|
366
382
|
className: "mt-3",
|
|
367
|
-
children: /* @__PURE__ */
|
|
383
|
+
children: /* @__PURE__ */ g(de, {
|
|
368
384
|
value: a,
|
|
369
|
-
max:
|
|
385
|
+
max: z,
|
|
370
386
|
tone: "success",
|
|
371
387
|
size: "sm",
|
|
372
388
|
showValue: !1,
|
|
373
389
|
label: "Tracked volume vs. top client"
|
|
374
390
|
})
|
|
375
391
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ _("div", {
|
|
377
393
|
className: "mt-4 flex items-center justify-between rounded-lg border border-border-seam bg-bg-sunken/40 px-3 py-2",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
394
|
+
children: [/* @__PURE__ */ g("span", {
|
|
379
395
|
className: "text-xs font-medium text-text-secondary",
|
|
380
396
|
children: "Public Access"
|
|
381
|
-
}), /* @__PURE__ */
|
|
397
|
+
}), /* @__PURE__ */ _("button", {
|
|
382
398
|
type: "button",
|
|
383
399
|
disabled: o,
|
|
384
|
-
onClick: () => void
|
|
400
|
+
onClick: () => void Xe(i),
|
|
385
401
|
title: i.isActive ? "Deactivate client portal" : "Activate client portal",
|
|
386
402
|
className: e("inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium transition-colors disabled:opacity-50", i.isActive ? "bg-status-success-bg text-status-success-text hover:bg-status-success-bg/80" : "border border-border-seam bg-bg-surface text-text-secondary hover:bg-bg-sunken/60"),
|
|
387
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ g(ve, { className: "h-3.5 w-3.5" }), i.isActive ? "Active" : "Inactive"]
|
|
388
404
|
})]
|
|
389
405
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ _("div", {
|
|
391
407
|
className: "mt-4 flex flex-wrap items-center gap-2 border-t border-border-seam pt-3",
|
|
392
|
-
children: [i.isActive && i.shareToken && /* @__PURE__ */
|
|
408
|
+
children: [i.isActive && i.shareToken && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("button", {
|
|
393
409
|
type: "button",
|
|
394
|
-
onClick: () => void
|
|
410
|
+
onClick: () => void We(i),
|
|
395
411
|
title: "Copy the client's private share link",
|
|
396
412
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-seam bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken/60",
|
|
397
|
-
children: s ? /* @__PURE__ */
|
|
398
|
-
}), /* @__PURE__ */
|
|
413
|
+
children: s ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(pe, { className: "h-3.5 w-3.5" }), " Copied"] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(he, { className: "h-3.5 w-3.5" }), " Share link"] })
|
|
414
|
+
}), /* @__PURE__ */ _("button", {
|
|
399
415
|
type: "button",
|
|
400
|
-
disabled: o &&
|
|
401
|
-
onClick: () => void
|
|
416
|
+
disabled: o && A,
|
|
417
|
+
onClick: () => void Z(i),
|
|
402
418
|
title: "Regenerate the link (invalidates the old one)",
|
|
403
419
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-seam bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken/60 disabled:opacity-50",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
405
|
-
})] }), /* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ g(p, { className: e("h-3.5 w-3.5", o && A && "animate-spin") }), "Regenerate"]
|
|
421
|
+
})] }), /* @__PURE__ */ _("div", {
|
|
406
422
|
className: "ml-auto flex items-center gap-1",
|
|
407
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ g("button", {
|
|
408
424
|
type: "button",
|
|
409
|
-
onClick: () =>
|
|
425
|
+
onClick: () => Ke(i),
|
|
410
426
|
title: "Edit client",
|
|
411
427
|
className: "inline-flex items-center rounded-md border border-border-seam bg-bg-surface p-1.5 text-text-secondary hover:bg-bg-sunken/60",
|
|
412
|
-
children: /* @__PURE__ */
|
|
413
|
-
}), /* @__PURE__ */
|
|
428
|
+
children: /* @__PURE__ */ g(ge, { className: "h-3.5 w-3.5" })
|
|
429
|
+
}), /* @__PURE__ */ g("button", {
|
|
414
430
|
type: "button",
|
|
415
|
-
onClick: () =>
|
|
431
|
+
onClick: () => J(i),
|
|
416
432
|
title: "Delete client",
|
|
417
433
|
className: "inline-flex items-center rounded-md border border-border-seam bg-bg-surface p-1.5 text-status-error-text hover:bg-status-error-bg",
|
|
418
|
-
children: /* @__PURE__ */
|
|
434
|
+
children: /* @__PURE__ */ g(be, { className: "h-3.5 w-3.5" })
|
|
419
435
|
})]
|
|
420
436
|
})]
|
|
421
437
|
})
|
|
@@ -423,109 +439,109 @@ function S() {
|
|
|
423
439
|
}, i.id);
|
|
424
440
|
})
|
|
425
441
|
}),
|
|
426
|
-
|
|
442
|
+
ze && /* @__PURE__ */ g("div", {
|
|
427
443
|
className: "flex justify-center",
|
|
428
|
-
children: /* @__PURE__ */
|
|
429
|
-
onClick:
|
|
430
|
-
disabled:
|
|
444
|
+
children: /* @__PURE__ */ g("button", {
|
|
445
|
+
onClick: Ze,
|
|
446
|
+
disabled: B,
|
|
431
447
|
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",
|
|
432
|
-
children:
|
|
448
|
+
children: B ? "Loading..." : "Load more"
|
|
433
449
|
})
|
|
434
450
|
})
|
|
435
451
|
] }),
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
open:
|
|
452
|
+
/* @__PURE__ */ g(u, {
|
|
453
|
+
open: He,
|
|
438
454
|
onClose: Q,
|
|
439
|
-
title:
|
|
440
|
-
description:
|
|
441
|
-
footer: /* @__PURE__ */
|
|
455
|
+
title: U ? "Edit Client" : "Add Client",
|
|
456
|
+
description: U ? "Update this client's portal details." : "Set up a client so you can share projects and tracked hours with them.",
|
|
457
|
+
footer: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("button", {
|
|
442
458
|
onClick: Q,
|
|
443
459
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
444
460
|
children: "Cancel"
|
|
445
|
-
}), /* @__PURE__ */
|
|
446
|
-
onClick:
|
|
447
|
-
disabled:
|
|
461
|
+
}), /* @__PURE__ */ g("button", {
|
|
462
|
+
onClick: Je,
|
|
463
|
+
disabled: j || M || !G.clientName.trim(),
|
|
448
464
|
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",
|
|
449
|
-
children:
|
|
465
|
+
children: j || M ? "Saving..." : U ? "Save Changes" : "Add Client"
|
|
450
466
|
})] }),
|
|
451
|
-
children: /* @__PURE__ */
|
|
467
|
+
children: /* @__PURE__ */ _("div", {
|
|
452
468
|
className: "space-y-4",
|
|
453
469
|
children: [
|
|
454
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
455
471
|
className: "block text-sm font-medium text-text-primary",
|
|
456
472
|
children: "Client Name"
|
|
457
|
-
}), /* @__PURE__ */
|
|
473
|
+
}), /* @__PURE__ */ g("input", {
|
|
458
474
|
type: "text",
|
|
459
475
|
placeholder: "e.g. Acme Corp",
|
|
460
|
-
value:
|
|
461
|
-
onChange: (e) =>
|
|
462
|
-
...
|
|
476
|
+
value: G.clientName,
|
|
477
|
+
onChange: (e) => K({
|
|
478
|
+
...G,
|
|
463
479
|
clientName: e.target.value
|
|
464
480
|
}),
|
|
465
|
-
className:
|
|
481
|
+
className: y
|
|
466
482
|
})] }),
|
|
467
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ _("div", {
|
|
468
484
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
469
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
470
486
|
className: "block text-sm font-medium text-text-primary",
|
|
471
487
|
children: "Contact Email"
|
|
472
|
-
}), /* @__PURE__ */
|
|
488
|
+
}), /* @__PURE__ */ g("input", {
|
|
473
489
|
type: "email",
|
|
474
490
|
placeholder: "contact@client.com",
|
|
475
|
-
value:
|
|
476
|
-
onChange: (e) =>
|
|
477
|
-
...
|
|
491
|
+
value: G.contactEmail,
|
|
492
|
+
onChange: (e) => K({
|
|
493
|
+
...G,
|
|
478
494
|
contactEmail: e.target.value
|
|
479
495
|
}),
|
|
480
|
-
className:
|
|
481
|
-
})] }), /* @__PURE__ */
|
|
496
|
+
className: y
|
|
497
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
482
498
|
className: "block text-sm font-medium text-text-primary",
|
|
483
499
|
children: "Contact Phone"
|
|
484
|
-
}), /* @__PURE__ */
|
|
500
|
+
}), /* @__PURE__ */ g("input", {
|
|
485
501
|
type: "tel",
|
|
486
502
|
placeholder: "Optional",
|
|
487
|
-
value:
|
|
488
|
-
onChange: (e) =>
|
|
489
|
-
...
|
|
503
|
+
value: G.contactPhone,
|
|
504
|
+
onChange: (e) => K({
|
|
505
|
+
...G,
|
|
490
506
|
contactPhone: e.target.value
|
|
491
507
|
}),
|
|
492
|
-
className:
|
|
508
|
+
className: y
|
|
493
509
|
})] })]
|
|
494
510
|
}),
|
|
495
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
496
512
|
className: "block text-sm font-medium text-text-primary",
|
|
497
513
|
children: "Description"
|
|
498
|
-
}), /* @__PURE__ */
|
|
514
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
499
515
|
rows: 3,
|
|
500
516
|
placeholder: "Notes about this client (optional)",
|
|
501
|
-
value:
|
|
502
|
-
onChange: (e) =>
|
|
503
|
-
...
|
|
517
|
+
value: G.description,
|
|
518
|
+
onChange: (e) => K({
|
|
519
|
+
...G,
|
|
504
520
|
description: e.target.value
|
|
505
521
|
}),
|
|
506
|
-
className:
|
|
522
|
+
className: y
|
|
507
523
|
})] }),
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ _("div", { children: [
|
|
525
|
+
/* @__PURE__ */ g("label", {
|
|
510
526
|
className: "block text-sm font-medium text-text-primary",
|
|
511
527
|
children: "Logo"
|
|
512
528
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ g("input", {
|
|
514
530
|
type: "file",
|
|
515
531
|
accept: "image/*",
|
|
516
|
-
disabled:
|
|
532
|
+
disabled: E,
|
|
517
533
|
onChange: (e) => {
|
|
518
534
|
let t = e.target.files?.[0];
|
|
519
|
-
t &&
|
|
535
|
+
t && qe(t), e.target.value = "";
|
|
520
536
|
},
|
|
521
|
-
className:
|
|
537
|
+
className: Te
|
|
522
538
|
}),
|
|
523
|
-
|
|
539
|
+
E && /* @__PURE__ */ g("p", {
|
|
524
540
|
className: "mt-1 text-xs text-text-secondary",
|
|
525
541
|
children: "Uploading…"
|
|
526
542
|
}),
|
|
527
|
-
|
|
528
|
-
src:
|
|
543
|
+
G.logoUrl && /* @__PURE__ */ g("img", {
|
|
544
|
+
src: G.logoUrl,
|
|
529
545
|
alt: "Client logo preview",
|
|
530
546
|
className: "mt-2 h-16 w-16 rounded-md border border-border-seam object-cover"
|
|
531
547
|
})
|
|
@@ -533,35 +549,35 @@ function S() {
|
|
|
533
549
|
]
|
|
534
550
|
})
|
|
535
551
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
open:
|
|
538
|
-
onClose: () =>
|
|
552
|
+
/* @__PURE__ */ g(u, {
|
|
553
|
+
open: q !== null,
|
|
554
|
+
onClose: () => J(null),
|
|
539
555
|
title: "Delete client?",
|
|
540
|
-
description:
|
|
556
|
+
description: q ? `"${q.clientName}" and its share link will be removed.` : void 0,
|
|
541
557
|
size: "sm",
|
|
542
|
-
footer: /* @__PURE__ */
|
|
543
|
-
onClick: () =>
|
|
558
|
+
footer: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("button", {
|
|
559
|
+
onClick: () => J(null),
|
|
544
560
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
|
|
545
561
|
children: "Cancel"
|
|
546
|
-
}), /* @__PURE__ */
|
|
547
|
-
onClick:
|
|
548
|
-
disabled:
|
|
562
|
+
}), /* @__PURE__ */ g("button", {
|
|
563
|
+
onClick: Ye,
|
|
564
|
+
disabled: N,
|
|
549
565
|
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",
|
|
550
|
-
children:
|
|
566
|
+
children: N ? "Deleting..." : "Delete"
|
|
551
567
|
})] }),
|
|
552
|
-
children: /* @__PURE__ */
|
|
568
|
+
children: /* @__PURE__ */ g("p", {
|
|
553
569
|
className: "text-sm text-text-secondary",
|
|
554
570
|
children: "The client will lose access to their shared portal immediately. This cannot be undone."
|
|
555
571
|
})
|
|
556
572
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
toasts:
|
|
559
|
-
onDismiss:
|
|
573
|
+
/* @__PURE__ */ g(se, {
|
|
574
|
+
toasts: m,
|
|
575
|
+
onDismiss: S
|
|
560
576
|
})
|
|
561
577
|
]
|
|
562
578
|
});
|
|
563
579
|
}
|
|
564
580
|
//#endregion
|
|
565
|
-
export {
|
|
581
|
+
export { x as ClientPortalPage };
|
|
566
582
|
|
|
567
583
|
//# sourceMappingURL=ClientPortalPage.js.map
|