@burdenoff/microfe-proserviceworld 2026.1028.1 → 2026.1031.2
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/global-types.d.ts +9699 -583
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.d.ts +18076 -2999
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/proserviceworld/__tests__/schemaStub.d.ts +20 -0
- package/dist/proserviceworld/__tests__/schemaStub.d.ts.map +1 -0
- package/dist/proserviceworld/components/CredentialDirectory.js +44 -43
- package/dist/proserviceworld/components/CredentialDirectory.js.map +1 -1
- package/dist/proserviceworld/components/CredentialReminderPanel.js +5 -4
- package/dist/proserviceworld/components/CredentialReminderPanel.js.map +1 -1
- package/dist/proserviceworld/components/ui.d.ts +7 -3
- package/dist/proserviceworld/components/ui.d.ts.map +1 -1
- package/dist/proserviceworld/components/ui.js +135 -121
- package/dist/proserviceworld/components/ui.js.map +1 -1
- package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.map +1 -1
- package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -1
- package/dist/proserviceworld/hooks/useTr.d.ts +49 -8
- package/dist/proserviceworld/hooks/useTr.d.ts.map +1 -1
- package/dist/proserviceworld/hooks/useTr.js +45 -21
- package/dist/proserviceworld/hooks/useTr.js.map +1 -1
- package/dist/proserviceworld/i18n/catalog/analytics.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/analytics.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/analytics.js +271 -0
- package/dist/proserviceworld/i18n/catalog/analytics.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/common.d.ts +9 -0
- package/dist/proserviceworld/i18n/catalog/common.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/common.js +163 -0
- package/dist/proserviceworld/i18n/catalog/common.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/compliance.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/compliance.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/compliance.js +157 -0
- package/dist/proserviceworld/i18n/catalog/compliance.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/conflicts.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/conflicts.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/conflicts.js +145 -0
- package/dist/proserviceworld/i18n/catalog/conflicts.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/documents.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/documents.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/documents.js +157 -0
- package/dist/proserviceworld/i18n/catalog/documents.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/enums.d.ts +10 -0
- package/dist/proserviceworld/i18n/catalog/enums.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/enums.js +481 -0
- package/dist/proserviceworld/i18n/catalog/enums.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/index.d.ts +9 -0
- package/dist/proserviceworld/i18n/catalog/index.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/index.js +25 -0
- package/dist/proserviceworld/i18n/catalog/index.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/invoices.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/invoices.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/invoices.js +247 -0
- package/dist/proserviceworld/i18n/catalog/invoices.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/practiceAreas.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/practiceAreas.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/practiceAreas.js +97 -0
- package/dist/proserviceworld/i18n/catalog/practiceAreas.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/time.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/time.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/time.js +301 -0
- package/dist/proserviceworld/i18n/catalog/time.js.map +1 -0
- package/dist/proserviceworld/i18n/index.d.ts +10 -9
- package/dist/proserviceworld/i18n/index.d.ts.map +1 -1
- package/dist/proserviceworld/i18n/index.js +16 -12
- package/dist/proserviceworld/i18n/index.js.map +1 -1
- package/dist/proserviceworld/i18n/types.d.ts +13 -0
- package/dist/proserviceworld/i18n/types.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/types.js +18 -0
- package/dist/proserviceworld/i18n/types.js.map +1 -0
- package/dist/proserviceworld/pages/AnalyticsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/AnalyticsPage.js +209 -197
- package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ClientDetailPage.js +99 -98
- package/dist/proserviceworld/pages/ClientDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/ClientsPage.js +181 -181
- package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
- package/dist/proserviceworld/pages/CompliancePage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/CompliancePage.js +210 -209
- package/dist/proserviceworld/pages/CompliancePage.js.map +1 -1
- package/dist/proserviceworld/pages/ConflictsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/ConflictsPage.js +139 -138
- package/dist/proserviceworld/pages/ConflictsPage.js.map +1 -1
- package/dist/proserviceworld/pages/DocumentsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/DocumentsPage.js +150 -149
- package/dist/proserviceworld/pages/DocumentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementDetailPage.js +105 -104
- package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.js +137 -137
- package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
- package/dist/proserviceworld/pages/InvoicesPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/InvoicesPage.js +257 -256
- package/dist/proserviceworld/pages/InvoicesPage.js.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.js +166 -166
- package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
- package/dist/proserviceworld/pages/PracticeAreasPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/PracticeAreasPage.js +100 -99
- package/dist/proserviceworld/pages/PracticeAreasPage.js.map +1 -1
- package/dist/proserviceworld/pages/PractitionerCredentialsPage.js +30 -29
- package/dist/proserviceworld/pages/PractitionerCredentialsPage.js.map +1 -1
- package/dist/proserviceworld/pages/TimePage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/TimePage.js +343 -350
- package/dist/proserviceworld/pages/TimePage.js.map +1 -1
- package/dist/proserviceworld/utils/humanize.d.ts +3 -0
- package/dist/proserviceworld/utils/humanize.d.ts.map +1 -0
- package/dist/proserviceworld/utils/humanize.js +6 -0
- package/dist/proserviceworld/utils/humanize.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useArchiveClient as e, useClients as t, useCreateClient as n, useUpdateClient as r } from "../hooks/useProServiceWorldApi.js";
|
|
2
2
|
import { useNav as i } from "../utils/nav.js";
|
|
3
3
|
import { cn as a } from "../utils/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
import { Banner as
|
|
6
|
-
import { useAnalytics as
|
|
7
|
-
import { impactFeedback as
|
|
8
|
-
import { TagPicker as
|
|
9
|
-
import { LoadMore as
|
|
4
|
+
import { useEnumLabel as o, useTr as s } from "../hooks/useTr.js";
|
|
5
|
+
import { Banner as c, Empty as l, ErrorState as u, Field as d, LoadingBlock as f, Modal as p, NativeSelect as m, PageHeader as h, SectionCard as g, StatusPill as _, TableWrap as v, Td as y, TextArea as b, TextInput as x, Th as S, enumOptions as C, fmtDate as w } from "../components/ui.js";
|
|
6
|
+
import { useAnalytics as T } from "../hooks/useAnalytics.js";
|
|
7
|
+
import { impactFeedback as E } from "../utils/native.js";
|
|
8
|
+
import { TagPicker as ee } from "../components/TagPicker.js";
|
|
9
|
+
import { LoadMore as te } from "../components/LoadMore.js";
|
|
10
10
|
import { useMemo as D, useState as O } from "react";
|
|
11
|
-
import { Archive as k, Building2 as
|
|
11
|
+
import { Archive as k, Building2 as ne, ChevronRight as A, Pencil as j, Plus as M, Search as re, User as ie, Users as N } from "lucide-react";
|
|
12
12
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
13
13
|
import { Button as L } from "@burdenoff/fe-libs/ui";
|
|
14
14
|
//#region src/proserviceworld/pages/ClientsPage.tsx
|
|
@@ -31,62 +31,62 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
31
31
|
contactPhone: "",
|
|
32
32
|
notes: ""
|
|
33
33
|
}, U = 25, W = () => {
|
|
34
|
-
let e =
|
|
34
|
+
let e = o(), n = i(), a = s(), { emitIntent: d, emitFact: p } = T(), [b, k] = O(""), [P, R] = O(""), [B, H] = O(null), [W, q] = O(!1), [J, Y] = O(null), [ae, X] = O({
|
|
35
35
|
limit: U,
|
|
36
36
|
offset: 0
|
|
37
|
-
}), { data:
|
|
38
|
-
search:
|
|
39
|
-
status:
|
|
40
|
-
pagination:
|
|
41
|
-
}),
|
|
37
|
+
}), { data: Z, isLoading: Q, error: oe, refetch: $ } = t({
|
|
38
|
+
search: b.trim() || void 0,
|
|
39
|
+
status: P || void 0,
|
|
40
|
+
pagination: ae
|
|
41
|
+
}), se = r(), ce = D(() => Z?.items ?? [], [Z]);
|
|
42
42
|
return /* @__PURE__ */ I("div", {
|
|
43
43
|
className: "space-y-6",
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */ F(
|
|
46
|
-
title:
|
|
47
|
-
subtitle:
|
|
45
|
+
/* @__PURE__ */ F(h, {
|
|
46
|
+
title: a("psw.clients.title", "Clients"),
|
|
47
|
+
subtitle: a("psw.clients.subtitle", "Every person or organization your firm serves."),
|
|
48
48
|
icon: /* @__PURE__ */ F(N, { className: "h-6 w-6" }),
|
|
49
49
|
actions: /* @__PURE__ */ I(L, {
|
|
50
50
|
onClick: () => {
|
|
51
|
-
|
|
51
|
+
E("light"), d("psw.client.create_clicked"), q(!0);
|
|
52
52
|
},
|
|
53
53
|
children: [
|
|
54
54
|
/* @__PURE__ */ F(M, { className: "mr-1.5 h-4 w-4" }),
|
|
55
55
|
" ",
|
|
56
|
-
|
|
56
|
+
a("psw.clients.new", "New client")
|
|
57
57
|
]
|
|
58
58
|
})
|
|
59
59
|
}),
|
|
60
|
-
|
|
61
|
-
tone:
|
|
62
|
-
onClose: () =>
|
|
63
|
-
children:
|
|
60
|
+
J && /* @__PURE__ */ F(c, {
|
|
61
|
+
tone: J.tone,
|
|
62
|
+
onClose: () => Y(null),
|
|
63
|
+
children: J.text
|
|
64
64
|
}),
|
|
65
65
|
/* @__PURE__ */ I("div", {
|
|
66
66
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
67
67
|
children: [/* @__PURE__ */ I("div", {
|
|
68
68
|
className: "relative flex-1",
|
|
69
|
-
children: [/* @__PURE__ */ F(
|
|
70
|
-
placeholder:
|
|
71
|
-
value:
|
|
69
|
+
children: [/* @__PURE__ */ F(re, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ F(x, {
|
|
70
|
+
placeholder: a("psw.clients.searchPlaceholder", "Search clients…"),
|
|
71
|
+
value: b,
|
|
72
72
|
onChange: (e) => {
|
|
73
|
-
|
|
73
|
+
k(e.target.value), X({
|
|
74
74
|
limit: U,
|
|
75
75
|
offset: 0
|
|
76
76
|
});
|
|
77
77
|
},
|
|
78
78
|
onKeyDown: (e) => {
|
|
79
|
-
e.key === "Enter" &&
|
|
79
|
+
e.key === "Enter" && b.trim() && p("psw.search.performed", {
|
|
80
80
|
entityType: "client",
|
|
81
|
-
queryLength:
|
|
81
|
+
queryLength: b.trim().length
|
|
82
82
|
});
|
|
83
83
|
},
|
|
84
84
|
className: "pl-9"
|
|
85
85
|
})]
|
|
86
|
-
}), /* @__PURE__ */ I(
|
|
87
|
-
value:
|
|
86
|
+
}), /* @__PURE__ */ I(m, {
|
|
87
|
+
value: P,
|
|
88
88
|
onChange: (e) => {
|
|
89
|
-
|
|
89
|
+
R(e.target.value), X({
|
|
90
90
|
limit: U,
|
|
91
91
|
offset: 0
|
|
92
92
|
});
|
|
@@ -94,41 +94,41 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
94
94
|
className: "sm:w-48",
|
|
95
95
|
children: [/* @__PURE__ */ F("option", {
|
|
96
96
|
value: "",
|
|
97
|
-
children:
|
|
98
|
-
}),
|
|
97
|
+
children: a("psw.clients.allStatuses", "All statuses")
|
|
98
|
+
}), C(z, e)]
|
|
99
99
|
})]
|
|
100
100
|
}),
|
|
101
|
-
|
|
102
|
-
error:
|
|
101
|
+
Q ? /* @__PURE__ */ F(f, {}) : oe ? /* @__PURE__ */ F(u, {
|
|
102
|
+
error: oe,
|
|
103
103
|
onRetry: () => void $()
|
|
104
|
-
}) : !
|
|
105
|
-
title:
|
|
106
|
-
description:
|
|
104
|
+
}) : !Z || Z.items.length === 0 ? /* @__PURE__ */ F(l, {
|
|
105
|
+
title: a("psw.clients.emptyTitle", "No clients yet"),
|
|
106
|
+
description: a("psw.clients.emptyDescription", "Add your first client to start scoping engagements and matters."),
|
|
107
107
|
icon: /* @__PURE__ */ F(N, { className: "h-8 w-8" }),
|
|
108
108
|
action: /* @__PURE__ */ I(L, {
|
|
109
|
-
onClick: () =>
|
|
109
|
+
onClick: () => q(!0),
|
|
110
110
|
children: [
|
|
111
111
|
/* @__PURE__ */ F(M, { className: "mr-1.5 h-4 w-4" }),
|
|
112
112
|
" ",
|
|
113
|
-
|
|
113
|
+
a("psw.clients.new", "New client")
|
|
114
114
|
]
|
|
115
115
|
})
|
|
116
|
-
}) : /* @__PURE__ */ I(
|
|
117
|
-
title:
|
|
116
|
+
}) : /* @__PURE__ */ I(g, {
|
|
117
|
+
title: Z.totalCount === 1 ? a("psw.clients.count", "{{count}} client", { count: Z.totalCount }) : a("psw.clients.countPlural", "{{count}} clients", { count: Z.totalCount }),
|
|
118
118
|
children: [
|
|
119
119
|
/* @__PURE__ */ F("ul", {
|
|
120
120
|
className: "space-y-2.5 sm:hidden",
|
|
121
|
-
children:
|
|
121
|
+
children: Z.items.map((e) => /* @__PURE__ */ I("li", {
|
|
122
122
|
className: "overflow-hidden rounded-xl border border-border-seam bg-bg-canvas",
|
|
123
123
|
children: [/* @__PURE__ */ I("button", {
|
|
124
124
|
type: "button",
|
|
125
125
|
onClick: () => {
|
|
126
|
-
|
|
126
|
+
E("light"), n(`clients/${e.id}`);
|
|
127
127
|
},
|
|
128
128
|
className: "flex w-full items-center gap-3 p-3.5 text-left transition-colors active:bg-bg-sunken/60",
|
|
129
129
|
children: [
|
|
130
130
|
/* @__PURE__ */ F(V, {
|
|
131
|
-
name:
|
|
131
|
+
name: e.name,
|
|
132
132
|
className: "h-11 w-11 text-sm"
|
|
133
133
|
}),
|
|
134
134
|
/* @__PURE__ */ I("span", {
|
|
@@ -136,18 +136,18 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
136
136
|
children: [
|
|
137
137
|
/* @__PURE__ */ F("span", {
|
|
138
138
|
className: "block truncate text-sm font-semibold text-text-primary",
|
|
139
|
-
children:
|
|
139
|
+
children: e.name
|
|
140
140
|
}),
|
|
141
141
|
/* @__PURE__ */ F("span", {
|
|
142
142
|
className: "mt-0.5 block truncate text-sm text-text-secondary",
|
|
143
|
-
children:
|
|
143
|
+
children: e.contactName || (e.type === "ORGANIZATION" ? a("psw.clients.typeOrganization", "Organization") : a("psw.clients.typeIndividual", "Individual"))
|
|
144
144
|
}),
|
|
145
145
|
/* @__PURE__ */ I("span", {
|
|
146
146
|
className: "mt-1.5 flex items-center gap-2",
|
|
147
147
|
children: [/* @__PURE__ */ F("span", {
|
|
148
148
|
className: "truncate text-xs text-text-tertiary",
|
|
149
|
-
children:
|
|
150
|
-
}), /* @__PURE__ */ F(
|
|
149
|
+
children: e.industry || w(e.createdAt)
|
|
150
|
+
}), /* @__PURE__ */ F(_, { status: e.status })]
|
|
151
151
|
})
|
|
152
152
|
]
|
|
153
153
|
}),
|
|
@@ -157,14 +157,14 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
157
157
|
className: "flex items-center justify-between gap-2 border-t border-border-seam px-3.5 py-2",
|
|
158
158
|
children: [/* @__PURE__ */ F("div", {
|
|
159
159
|
className: "min-w-0 flex-1",
|
|
160
|
-
children: /* @__PURE__ */ F(
|
|
160
|
+
children: /* @__PURE__ */ F(ee, {
|
|
161
161
|
entityType: "PswClient",
|
|
162
|
-
entityId:
|
|
163
|
-
tags:
|
|
164
|
-
onChange: async (
|
|
165
|
-
await
|
|
166
|
-
id:
|
|
167
|
-
input: { tags:
|
|
162
|
+
entityId: e.id,
|
|
163
|
+
tags: e.tags ?? [],
|
|
164
|
+
onChange: async (t) => {
|
|
165
|
+
await se.mutateAsync({
|
|
166
|
+
id: e.id,
|
|
167
|
+
input: { tags: t }
|
|
168
168
|
}), $();
|
|
169
169
|
},
|
|
170
170
|
maxTags: 5
|
|
@@ -174,84 +174,84 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
174
174
|
children: [/* @__PURE__ */ F(L, {
|
|
175
175
|
variant: "ghost",
|
|
176
176
|
size: "sm",
|
|
177
|
-
onClick: () =>
|
|
178
|
-
"aria-label":
|
|
177
|
+
onClick: () => H(e),
|
|
178
|
+
"aria-label": a("psw.common.edit", "Edit"),
|
|
179
179
|
children: /* @__PURE__ */ F(j, { className: "h-4 w-4" })
|
|
180
|
-
}),
|
|
181
|
-
id:
|
|
182
|
-
name:
|
|
183
|
-
onDone: (
|
|
180
|
+
}), e.status !== "ARCHIVED" && /* @__PURE__ */ F(G, {
|
|
181
|
+
id: e.id,
|
|
182
|
+
name: e.name,
|
|
183
|
+
onDone: (t) => Y(t ? {
|
|
184
184
|
tone: "success",
|
|
185
|
-
text:
|
|
185
|
+
text: a("psw.clients.archived", "{{name}} archived.", { name: e.name })
|
|
186
186
|
} : {
|
|
187
187
|
tone: "danger",
|
|
188
|
-
text:
|
|
188
|
+
text: a("psw.clients.archiveFailed", "Could not archive client.")
|
|
189
189
|
})
|
|
190
190
|
})]
|
|
191
191
|
})]
|
|
192
192
|
})]
|
|
193
|
-
},
|
|
193
|
+
}, e.id))
|
|
194
194
|
}),
|
|
195
195
|
/* @__PURE__ */ F("div", {
|
|
196
196
|
className: "hidden sm:block",
|
|
197
|
-
children: /* @__PURE__ */ I(
|
|
198
|
-
/* @__PURE__ */ F(
|
|
199
|
-
/* @__PURE__ */ F(
|
|
200
|
-
/* @__PURE__ */ F(
|
|
201
|
-
/* @__PURE__ */ F(
|
|
202
|
-
/* @__PURE__ */ F(
|
|
203
|
-
/* @__PURE__ */ F(
|
|
204
|
-
/* @__PURE__ */ F(
|
|
197
|
+
children: /* @__PURE__ */ I(v, { children: [/* @__PURE__ */ F("thead", { children: /* @__PURE__ */ I("tr", { children: [
|
|
198
|
+
/* @__PURE__ */ F(S, { children: a("psw.common.name", "Name") }),
|
|
199
|
+
/* @__PURE__ */ F(S, { children: a("psw.common.type", "Type") }),
|
|
200
|
+
/* @__PURE__ */ F(S, { children: a("psw.clients.tableIndustry", "Industry") }),
|
|
201
|
+
/* @__PURE__ */ F(S, { children: a("psw.common.status", "Status") }),
|
|
202
|
+
/* @__PURE__ */ F(S, { children: a("psw.common.added", "Added") }),
|
|
203
|
+
/* @__PURE__ */ F(S, { children: a("psw.clients.tableTags", "Tags") }),
|
|
204
|
+
/* @__PURE__ */ F(S, {
|
|
205
205
|
className: "text-right",
|
|
206
|
-
children:
|
|
206
|
+
children: a("psw.common.actions", "Actions")
|
|
207
207
|
})
|
|
208
|
-
] }) }), /* @__PURE__ */ F("tbody", { children:
|
|
208
|
+
] }) }), /* @__PURE__ */ F("tbody", { children: Z.items.map((e) => /* @__PURE__ */ I("tr", {
|
|
209
209
|
className: "group cursor-pointer transition-colors hover:bg-bg-sunken/60",
|
|
210
|
-
onClick: () =>
|
|
210
|
+
onClick: () => n(`clients/${e.id}`),
|
|
211
211
|
children: [
|
|
212
|
-
/* @__PURE__ */ F(
|
|
212
|
+
/* @__PURE__ */ F(y, { children: /* @__PURE__ */ I("div", {
|
|
213
213
|
className: "flex items-center gap-3",
|
|
214
|
-
children: [/* @__PURE__ */ F(V, { name:
|
|
214
|
+
children: [/* @__PURE__ */ F(V, { name: e.name }), /* @__PURE__ */ I("div", {
|
|
215
215
|
className: "min-w-0",
|
|
216
216
|
children: [/* @__PURE__ */ I("div", {
|
|
217
217
|
className: "flex items-center gap-1 font-medium text-text-primary transition-colors group-hover:text-accent",
|
|
218
218
|
children: [/* @__PURE__ */ F("span", {
|
|
219
219
|
className: "truncate",
|
|
220
|
-
children:
|
|
220
|
+
children: e.name
|
|
221
221
|
}), /* @__PURE__ */ F(A, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary opacity-0 transition-opacity group-hover:opacity-100" })]
|
|
222
|
-
}),
|
|
222
|
+
}), e.contactName ? /* @__PURE__ */ F("div", {
|
|
223
223
|
className: "truncate text-xs text-text-tertiary",
|
|
224
|
-
children:
|
|
224
|
+
children: e.contactName
|
|
225
225
|
}) : null]
|
|
226
226
|
})]
|
|
227
227
|
}) }),
|
|
228
|
-
/* @__PURE__ */ F(
|
|
228
|
+
/* @__PURE__ */ F(y, { children: /* @__PURE__ */ I("span", {
|
|
229
229
|
className: "inline-flex items-center gap-1.5 text-text-secondary",
|
|
230
|
-
children: [
|
|
230
|
+
children: [e.type === "ORGANIZATION" ? /* @__PURE__ */ F(ne, { className: "h-3.5 w-3.5 text-text-tertiary" }) : /* @__PURE__ */ F(ie, { className: "h-3.5 w-3.5 text-text-tertiary" }), e.type === "ORGANIZATION" ? a("psw.clients.typeOrganization", "Organization") : a("psw.clients.typeIndividual", "Individual")]
|
|
231
231
|
}) }),
|
|
232
|
-
/* @__PURE__ */ F(
|
|
233
|
-
/* @__PURE__ */ F(
|
|
234
|
-
/* @__PURE__ */ F(
|
|
232
|
+
/* @__PURE__ */ F(y, { children: e.industry || a("psw.common.dash", "—") }),
|
|
233
|
+
/* @__PURE__ */ F(y, { children: /* @__PURE__ */ F(_, { status: e.status }) }),
|
|
234
|
+
/* @__PURE__ */ F(y, {
|
|
235
235
|
className: "whitespace-nowrap",
|
|
236
|
-
children:
|
|
236
|
+
children: w(e.createdAt)
|
|
237
237
|
}),
|
|
238
|
-
/* @__PURE__ */ F(
|
|
238
|
+
/* @__PURE__ */ F(y, { children: /* @__PURE__ */ F("div", {
|
|
239
239
|
onClick: (e) => e.stopPropagation(),
|
|
240
240
|
role: "presentation",
|
|
241
|
-
children: /* @__PURE__ */ F(
|
|
241
|
+
children: /* @__PURE__ */ F(ee, {
|
|
242
242
|
entityType: "PswClient",
|
|
243
|
-
entityId:
|
|
244
|
-
tags:
|
|
245
|
-
onChange: async (
|
|
246
|
-
await
|
|
247
|
-
id:
|
|
248
|
-
input: { tags:
|
|
243
|
+
entityId: e.id,
|
|
244
|
+
tags: e.tags ?? [],
|
|
245
|
+
onChange: async (t) => {
|
|
246
|
+
await se.mutateAsync({
|
|
247
|
+
id: e.id,
|
|
248
|
+
input: { tags: t }
|
|
249
249
|
}), $();
|
|
250
250
|
},
|
|
251
251
|
maxTags: 5
|
|
252
252
|
})
|
|
253
253
|
}) }),
|
|
254
|
-
/* @__PURE__ */ F(
|
|
254
|
+
/* @__PURE__ */ F(y, {
|
|
255
255
|
className: "text-right",
|
|
256
256
|
children: /* @__PURE__ */ I("div", {
|
|
257
257
|
className: "flex justify-end gap-1",
|
|
@@ -260,56 +260,56 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
260
260
|
children: [/* @__PURE__ */ F(L, {
|
|
261
261
|
variant: "ghost",
|
|
262
262
|
size: "sm",
|
|
263
|
-
onClick: () =>
|
|
264
|
-
"aria-label":
|
|
263
|
+
onClick: () => H(e),
|
|
264
|
+
"aria-label": a("psw.common.edit", "Edit"),
|
|
265
265
|
children: /* @__PURE__ */ F(j, { className: "h-4 w-4" })
|
|
266
|
-
}),
|
|
267
|
-
id:
|
|
268
|
-
name:
|
|
269
|
-
onDone: (
|
|
266
|
+
}), e.status !== "ARCHIVED" && /* @__PURE__ */ F(G, {
|
|
267
|
+
id: e.id,
|
|
268
|
+
name: e.name,
|
|
269
|
+
onDone: (t) => Y(t ? {
|
|
270
270
|
tone: "success",
|
|
271
|
-
text:
|
|
271
|
+
text: a("psw.clients.archived", "{{name}} archived.", { name: e.name })
|
|
272
272
|
} : {
|
|
273
273
|
tone: "danger",
|
|
274
|
-
text:
|
|
274
|
+
text: a("psw.clients.archiveFailed", "Could not archive client.")
|
|
275
275
|
})
|
|
276
276
|
})]
|
|
277
277
|
})
|
|
278
278
|
})
|
|
279
279
|
]
|
|
280
|
-
},
|
|
280
|
+
}, e.id)) })] })
|
|
281
281
|
}),
|
|
282
|
-
/* @__PURE__ */ F(
|
|
283
|
-
hasMore:
|
|
284
|
-
loading:
|
|
285
|
-
loadedCount:
|
|
286
|
-
totalCount:
|
|
287
|
-
onLoadMore: () =>
|
|
282
|
+
/* @__PURE__ */ F(te, {
|
|
283
|
+
hasMore: Z?.pageInfo?.hasMore ?? !1,
|
|
284
|
+
loading: Q,
|
|
285
|
+
loadedCount: ce.length,
|
|
286
|
+
totalCount: Z?.totalCount ?? ce.length,
|
|
287
|
+
onLoadMore: () => X((e) => ({
|
|
288
288
|
limit: U,
|
|
289
289
|
offset: e.offset + U
|
|
290
290
|
}))
|
|
291
291
|
})
|
|
292
292
|
]
|
|
293
293
|
}),
|
|
294
|
-
|
|
295
|
-
onClose: () =>
|
|
296
|
-
onSaved: (e) =>
|
|
294
|
+
W && /* @__PURE__ */ F(K, {
|
|
295
|
+
onClose: () => q(!1),
|
|
296
|
+
onSaved: (e) => Y({
|
|
297
297
|
tone: "success",
|
|
298
|
-
text:
|
|
298
|
+
text: a("psw.clients.created", "{{name}} created.", { name: e })
|
|
299
299
|
})
|
|
300
300
|
}),
|
|
301
|
-
|
|
302
|
-
client:
|
|
303
|
-
onClose: () =>
|
|
304
|
-
onSaved: (e) =>
|
|
301
|
+
B && /* @__PURE__ */ F(K, {
|
|
302
|
+
client: B,
|
|
303
|
+
onClose: () => H(null),
|
|
304
|
+
onSaved: (e) => Y({
|
|
305
305
|
tone: "success",
|
|
306
|
-
text:
|
|
306
|
+
text: a("psw.clients.updated", "{{name}} updated.", { name: e })
|
|
307
307
|
})
|
|
308
308
|
})
|
|
309
309
|
]
|
|
310
310
|
});
|
|
311
311
|
}, G = ({ id: t, name: n, onDone: r }) => {
|
|
312
|
-
let i = e(), a =
|
|
312
|
+
let i = e(), a = s(), { emitFact: o } = T();
|
|
313
313
|
return /* @__PURE__ */ F(L, {
|
|
314
314
|
variant: "ghost",
|
|
315
315
|
size: "sm",
|
|
@@ -318,7 +318,7 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
318
318
|
onClick: () => {
|
|
319
319
|
window.confirm(a("psw.clients.archiveConfirm", "Archive this client? Their engagements and matters remain.")) && i.mutate(t, {
|
|
320
320
|
onSuccess: (e) => {
|
|
321
|
-
|
|
321
|
+
o("psw.client.archived", { clientId: t }), r(!!e);
|
|
322
322
|
},
|
|
323
323
|
onError: () => r(!1)
|
|
324
324
|
});
|
|
@@ -326,7 +326,7 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
326
326
|
children: /* @__PURE__ */ F(k, { className: "h-4 w-4" })
|
|
327
327
|
});
|
|
328
328
|
}, K = ({ client: e, onClose: t, onSaved: i }) => {
|
|
329
|
-
let a = o(),
|
|
329
|
+
let a = s(), l = o(), u = n(), f = r(), { emitFact: h } = T(), [g, _] = O(e ? {
|
|
330
330
|
name: e.name,
|
|
331
331
|
type: e.type,
|
|
332
332
|
status: e.status,
|
|
@@ -335,121 +335,121 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
335
335
|
contactEmail: e.contactEmail ?? "",
|
|
336
336
|
contactPhone: e.contactPhone ?? "",
|
|
337
337
|
notes: e.notes ?? ""
|
|
338
|
-
} : H), [
|
|
338
|
+
} : H), [v, y] = O(null), S = (e) => (t) => _((n) => ({
|
|
339
339
|
...n,
|
|
340
340
|
[e]: t.target.value
|
|
341
|
-
})),
|
|
342
|
-
name:
|
|
343
|
-
type:
|
|
344
|
-
status:
|
|
345
|
-
industry:
|
|
346
|
-
contactName:
|
|
347
|
-
contactEmail:
|
|
348
|
-
contactPhone:
|
|
349
|
-
notes:
|
|
350
|
-
}), [
|
|
351
|
-
return /* @__PURE__ */ F(
|
|
341
|
+
})), w = u.isPending || f.isPending, E = D(() => ({
|
|
342
|
+
name: g.name.trim(),
|
|
343
|
+
type: g.type,
|
|
344
|
+
status: g.status,
|
|
345
|
+
industry: g.industry.trim() || null,
|
|
346
|
+
contactName: g.contactName.trim() || null,
|
|
347
|
+
contactEmail: g.contactEmail.trim() || null,
|
|
348
|
+
contactPhone: g.contactPhone.trim() || null,
|
|
349
|
+
notes: g.notes.trim() || null
|
|
350
|
+
}), [g]);
|
|
351
|
+
return /* @__PURE__ */ F(p, {
|
|
352
352
|
open: !0,
|
|
353
353
|
onClose: t,
|
|
354
354
|
title: e ? a("psw.clients.edit", "Edit client") : a("psw.clients.newTitle", "New client"),
|
|
355
355
|
footer: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(L, {
|
|
356
356
|
variant: "outline",
|
|
357
357
|
onClick: t,
|
|
358
|
-
disabled:
|
|
358
|
+
disabled: w,
|
|
359
359
|
children: a("psw.common.cancel", "Cancel")
|
|
360
360
|
}), /* @__PURE__ */ F(L, {
|
|
361
361
|
onClick: () => {
|
|
362
|
-
if (
|
|
363
|
-
let n = (e) =>
|
|
364
|
-
e ?
|
|
362
|
+
if (y(null), !E.name) return y(a("psw.clients.nameRequired", "Client name is required."));
|
|
363
|
+
let n = (e) => y(e instanceof Error ? e.message : a("psw.clients.saveFailed", "Save failed."));
|
|
364
|
+
e ? f.mutate({
|
|
365
365
|
id: e.id,
|
|
366
|
-
input:
|
|
366
|
+
input: E
|
|
367
367
|
}, {
|
|
368
368
|
onSuccess: () => {
|
|
369
|
-
|
|
369
|
+
h("psw.client.updated", { clientId: e.id }), i(E.name), t();
|
|
370
370
|
},
|
|
371
371
|
onError: n
|
|
372
|
-
}) :
|
|
372
|
+
}) : u.mutate(E, {
|
|
373
373
|
onSuccess: (e) => {
|
|
374
|
-
|
|
374
|
+
h("psw.client.created", { clientId: e.pswCreateClient.id }), i(E.name), t();
|
|
375
375
|
},
|
|
376
376
|
onError: n
|
|
377
377
|
});
|
|
378
378
|
},
|
|
379
|
-
disabled:
|
|
380
|
-
children:
|
|
379
|
+
disabled: w,
|
|
380
|
+
children: w ? a("psw.common.saving", "Saving…") : e ? a("psw.clients.saveChanges", "Save changes") : a("psw.clients.create", "Create client")
|
|
381
381
|
})] }),
|
|
382
382
|
children: /* @__PURE__ */ I("div", {
|
|
383
383
|
className: "space-y-3",
|
|
384
384
|
children: [
|
|
385
|
-
|
|
385
|
+
v && /* @__PURE__ */ F(c, {
|
|
386
386
|
tone: "danger",
|
|
387
|
-
children:
|
|
387
|
+
children: v
|
|
388
388
|
}),
|
|
389
|
-
/* @__PURE__ */ F(
|
|
389
|
+
/* @__PURE__ */ F(d, {
|
|
390
390
|
label: a("psw.common.name", "Name"),
|
|
391
391
|
required: !0,
|
|
392
|
-
children: /* @__PURE__ */ F(
|
|
393
|
-
value:
|
|
394
|
-
onChange:
|
|
392
|
+
children: /* @__PURE__ */ F(x, {
|
|
393
|
+
value: g.name,
|
|
394
|
+
onChange: S("name"),
|
|
395
395
|
placeholder: "Acme Holdings Ltd."
|
|
396
396
|
})
|
|
397
397
|
}),
|
|
398
398
|
/* @__PURE__ */ I("div", {
|
|
399
399
|
className: "grid grid-cols-2 gap-3",
|
|
400
|
-
children: [/* @__PURE__ */ F(
|
|
400
|
+
children: [/* @__PURE__ */ F(d, {
|
|
401
401
|
label: a("psw.common.type", "Type"),
|
|
402
|
-
children: /* @__PURE__ */ F(
|
|
403
|
-
value:
|
|
404
|
-
onChange:
|
|
405
|
-
children:
|
|
402
|
+
children: /* @__PURE__ */ F(m, {
|
|
403
|
+
value: g.type,
|
|
404
|
+
onChange: S("type"),
|
|
405
|
+
children: C(R, l)
|
|
406
406
|
})
|
|
407
|
-
}), /* @__PURE__ */ F(
|
|
407
|
+
}), /* @__PURE__ */ F(d, {
|
|
408
408
|
label: a("psw.common.status", "Status"),
|
|
409
|
-
children: /* @__PURE__ */ F(
|
|
410
|
-
value:
|
|
411
|
-
onChange:
|
|
412
|
-
children:
|
|
409
|
+
children: /* @__PURE__ */ F(m, {
|
|
410
|
+
value: g.status,
|
|
411
|
+
onChange: S("status"),
|
|
412
|
+
children: C(z, l)
|
|
413
413
|
})
|
|
414
414
|
})]
|
|
415
415
|
}),
|
|
416
|
-
/* @__PURE__ */ F(
|
|
416
|
+
/* @__PURE__ */ F(d, {
|
|
417
417
|
label: a("psw.clients.industry", "Industry"),
|
|
418
|
-
children: /* @__PURE__ */ F(
|
|
419
|
-
value:
|
|
420
|
-
onChange:
|
|
418
|
+
children: /* @__PURE__ */ F(x, {
|
|
419
|
+
value: g.industry,
|
|
420
|
+
onChange: S("industry"),
|
|
421
421
|
placeholder: "Financial services"
|
|
422
422
|
})
|
|
423
423
|
}),
|
|
424
424
|
/* @__PURE__ */ I("div", {
|
|
425
425
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
426
|
-
children: [/* @__PURE__ */ F(
|
|
426
|
+
children: [/* @__PURE__ */ F(d, {
|
|
427
427
|
label: a("psw.clients.contactName", "Contact name"),
|
|
428
|
-
children: /* @__PURE__ */ F(
|
|
429
|
-
value:
|
|
430
|
-
onChange:
|
|
428
|
+
children: /* @__PURE__ */ F(x, {
|
|
429
|
+
value: g.contactName,
|
|
430
|
+
onChange: S("contactName")
|
|
431
431
|
})
|
|
432
|
-
}), /* @__PURE__ */ F(
|
|
432
|
+
}), /* @__PURE__ */ F(d, {
|
|
433
433
|
label: a("psw.clients.contactEmail", "Contact email"),
|
|
434
|
-
children: /* @__PURE__ */ F(
|
|
434
|
+
children: /* @__PURE__ */ F(x, {
|
|
435
435
|
type: "email",
|
|
436
|
-
value:
|
|
437
|
-
onChange:
|
|
436
|
+
value: g.contactEmail,
|
|
437
|
+
onChange: S("contactEmail")
|
|
438
438
|
})
|
|
439
439
|
})]
|
|
440
440
|
}),
|
|
441
|
-
/* @__PURE__ */ F(
|
|
441
|
+
/* @__PURE__ */ F(d, {
|
|
442
442
|
label: a("psw.clients.contactPhone", "Contact phone"),
|
|
443
|
-
children: /* @__PURE__ */ F(
|
|
444
|
-
value:
|
|
445
|
-
onChange:
|
|
443
|
+
children: /* @__PURE__ */ F(x, {
|
|
444
|
+
value: g.contactPhone,
|
|
445
|
+
onChange: S("contactPhone")
|
|
446
446
|
})
|
|
447
447
|
}),
|
|
448
|
-
/* @__PURE__ */ F(
|
|
448
|
+
/* @__PURE__ */ F(d, {
|
|
449
449
|
label: a("psw.clients.notes", "Notes"),
|
|
450
|
-
children: /* @__PURE__ */ F(
|
|
451
|
-
value:
|
|
452
|
-
onChange:
|
|
450
|
+
children: /* @__PURE__ */ F(b, {
|
|
451
|
+
value: g.notes,
|
|
452
|
+
onChange: S("notes")
|
|
453
453
|
})
|
|
454
454
|
})
|
|
455
455
|
]
|