@burdenoff/microfe-proserviceworld 2026.801.1 → 2026.830.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/proserviceworld/hooks/useActorNames.d.ts +16 -0
- package/dist/proserviceworld/hooks/useActorNames.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useActorNames.js +18 -0
- package/dist/proserviceworld/hooks/useActorNames.js.map +1 -0
- package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts +53 -0
- package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.map +1 -1
- package/dist/proserviceworld/hooks/useProServiceWorldApi.js +289 -227
- package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -1
- package/dist/proserviceworld/hooks/useTr.d.ts +19 -0
- package/dist/proserviceworld/hooks/useTr.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useTr.js +33 -0
- package/dist/proserviceworld/hooks/useTr.js.map +1 -0
- package/dist/proserviceworld/i18n/index.d.ts +1 -1
- package/dist/proserviceworld/i18n/index.d.ts.map +1 -1
- package/dist/proserviceworld/i18n/index.js +723 -18
- package/dist/proserviceworld/i18n/index.js.map +1 -1
- package/dist/proserviceworld/index.js +4 -4
- package/dist/proserviceworld/pages/ClientDetailPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/ClientDetailPage.js +268 -144
- 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 +324 -241
- package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
- package/dist/proserviceworld/pages/DashboardPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/DashboardPage.js +152 -142
- package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementDetailPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/EngagementDetailPage.js +420 -186
- 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 +135 -135
- package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.js +204 -197
- package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,224 +1,231 @@
|
|
|
1
1
|
import { useClients as e, useCloseMatter as t, useCreateMatter as n, useMatters as r, usePracticeAreas as i, useUpdateMatter as a } from "../hooks/useProServiceWorldApi.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useTr as o } from "../hooks/useTr.js";
|
|
3
|
+
import { Banner as s, Empty as c, ErrorState as l, Field as u, LoadingBlock as d, MetricCard 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";
|
|
4
4
|
import { useAnalytics as T } from "../hooks/useAnalytics.js";
|
|
5
|
-
import { impactFeedback as
|
|
6
|
-
import { TagPicker as
|
|
7
|
-
import { LoadMore as
|
|
8
|
-
import { useMemo as
|
|
9
|
-
import { AlertTriangle as te, CheckCircle2 as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { Button as
|
|
5
|
+
import { impactFeedback as E } from "../utils/native.js";
|
|
6
|
+
import { TagPicker as D } from "../components/TagPicker.js";
|
|
7
|
+
import { LoadMore as O } from "../components/LoadMore.js";
|
|
8
|
+
import { useMemo as ee, useState as k } from "react";
|
|
9
|
+
import { AlertTriangle as te, CheckCircle2 as ne, CircleDot as A, FolderKanban as j, Lock as M, Plus as N, Search as P } from "lucide-react";
|
|
10
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
11
|
+
import { Button as R } from "@burdenoff/fe-libs/ui";
|
|
12
12
|
//#region src/proserviceworld/pages/MattersPage.tsx
|
|
13
|
-
var
|
|
13
|
+
var z = [
|
|
14
14
|
"OPEN",
|
|
15
15
|
"ON_HOLD",
|
|
16
16
|
"CLOSED",
|
|
17
17
|
"ARCHIVED"
|
|
18
|
-
],
|
|
18
|
+
], B = [
|
|
19
19
|
"LOW",
|
|
20
20
|
"MEDIUM",
|
|
21
21
|
"HIGH",
|
|
22
22
|
"CRITICAL"
|
|
23
|
-
],
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
], re = () => {
|
|
24
|
+
let e = o();
|
|
25
|
+
return /* @__PURE__ */ I("span", {
|
|
26
|
+
className: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md bg-status-warning-bg-subtle text-status-warning-text",
|
|
27
|
+
title: e("psw.matters.privilegedLabel", "Privileged / confidential"),
|
|
28
|
+
"aria-label": e("psw.matters.privilegedAria", "Privileged"),
|
|
29
|
+
children: /* @__PURE__ */ I(M, { className: "h-3 w-3" })
|
|
30
|
+
});
|
|
31
|
+
}, V = 25, H = () => {
|
|
32
|
+
let e = o(), { emitIntent: n, emitFact: i } = T(), [u, p] = k(""), [b, B] = k(""), [H, U] = k(!1), [W, G] = k(null), [ae, K] = k({
|
|
33
|
+
limit: V,
|
|
31
34
|
offset: 0
|
|
32
35
|
}), { data: q, isLoading: J, error: Y, refetch: X } = r({
|
|
33
|
-
search:
|
|
34
|
-
status:
|
|
35
|
-
pagination:
|
|
36
|
-
}), Z = t(),
|
|
37
|
-
return /* @__PURE__ */
|
|
36
|
+
search: u.trim() || void 0,
|
|
37
|
+
status: b || void 0,
|
|
38
|
+
pagination: ae
|
|
39
|
+
}), Z = t(), oe = a(), Q = ee(() => q?.items ?? [], [q]), se = Q.filter((e) => e.status === "OPEN").length, ce = Q.filter((e) => e.isPrivileged).length, $ = Q.filter((e) => e.priority === "HIGH" || e.priority === "CRITICAL").length;
|
|
40
|
+
return /* @__PURE__ */ L("div", {
|
|
38
41
|
className: "space-y-6",
|
|
39
42
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
title:
|
|
42
|
-
subtitle:
|
|
43
|
-
icon: /* @__PURE__ */
|
|
44
|
-
actions: /* @__PURE__ */ R
|
|
43
|
+
/* @__PURE__ */ I(h, {
|
|
44
|
+
title: e("psw.matters.title", "Matters"),
|
|
45
|
+
subtitle: e("psw.matters.subtitle", "The regulated threads of work — legal matters, audits, filings — with their own deadlines and sensitive-document handling."),
|
|
46
|
+
icon: /* @__PURE__ */ I(j, { className: "h-6 w-6" }),
|
|
47
|
+
actions: /* @__PURE__ */ L(R, {
|
|
45
48
|
onClick: () => {
|
|
46
|
-
|
|
49
|
+
E("light"), n("psw.matter.create_clicked"), U(!0);
|
|
47
50
|
},
|
|
48
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ I(N, { className: "mr-1.5 h-4 w-4" }), e("psw.matters.new", "New matter")]
|
|
49
52
|
})
|
|
50
53
|
}),
|
|
51
|
-
W && /* @__PURE__ */
|
|
54
|
+
W && /* @__PURE__ */ I(s, {
|
|
52
55
|
tone: W.tone,
|
|
53
56
|
onClose: () => G(null),
|
|
54
57
|
children: W.text
|
|
55
58
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ L("div", {
|
|
57
60
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ L("div", {
|
|
59
62
|
className: "relative flex-1",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
61
|
-
placeholder:
|
|
62
|
-
value:
|
|
63
|
+
children: [/* @__PURE__ */ I(P, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ I(x, {
|
|
64
|
+
placeholder: e("psw.matters.searchPlaceholder", "Search matters…"),
|
|
65
|
+
value: u,
|
|
63
66
|
onChange: (e) => {
|
|
64
|
-
|
|
65
|
-
limit:
|
|
67
|
+
p(e.target.value), K({
|
|
68
|
+
limit: V,
|
|
66
69
|
offset: 0
|
|
67
70
|
});
|
|
68
71
|
},
|
|
69
72
|
onKeyDown: (e) => {
|
|
70
|
-
e.key === "Enter" &&
|
|
73
|
+
e.key === "Enter" && u.trim() && i("psw.search.performed", {
|
|
71
74
|
entityType: "matter",
|
|
72
|
-
queryLength:
|
|
75
|
+
queryLength: u.trim().length
|
|
73
76
|
});
|
|
74
77
|
},
|
|
75
78
|
className: "pl-9"
|
|
76
79
|
})]
|
|
77
|
-
}), /* @__PURE__ */
|
|
78
|
-
value:
|
|
80
|
+
}), /* @__PURE__ */ L(m, {
|
|
81
|
+
value: b,
|
|
79
82
|
onChange: (e) => {
|
|
80
|
-
|
|
81
|
-
limit:
|
|
83
|
+
B(e.target.value), K({
|
|
84
|
+
limit: V,
|
|
82
85
|
offset: 0
|
|
83
86
|
});
|
|
84
87
|
},
|
|
85
88
|
className: "sm:w-48",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ I("option", {
|
|
87
90
|
value: "",
|
|
88
|
-
children:
|
|
89
|
-
}),
|
|
91
|
+
children: e("psw.matters.allStatuses", "All statuses")
|
|
92
|
+
}), C(z)]
|
|
90
93
|
})]
|
|
91
94
|
}),
|
|
92
|
-
J ? /* @__PURE__ */
|
|
95
|
+
J ? /* @__PURE__ */ I(d, {}) : Y ? /* @__PURE__ */ I(l, {
|
|
93
96
|
error: Y,
|
|
94
97
|
onRetry: () => void X()
|
|
95
|
-
}) : !q || q.items.length === 0 ? /* @__PURE__ */
|
|
96
|
-
title:
|
|
97
|
-
description:
|
|
98
|
-
icon: /* @__PURE__ */
|
|
99
|
-
action: /* @__PURE__ */ R
|
|
98
|
+
}) : !q || q.items.length === 0 ? /* @__PURE__ */ I(c, {
|
|
99
|
+
title: e("psw.matters.emptyTitle", "No matters yet"),
|
|
100
|
+
description: e("psw.matters.emptyDescription", "Create your first matter to track deadlines, privileged documents, and status."),
|
|
101
|
+
icon: /* @__PURE__ */ I(j, { className: "h-8 w-8" }),
|
|
102
|
+
action: /* @__PURE__ */ L(R, {
|
|
100
103
|
onClick: () => U(!0),
|
|
101
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ I(N, { className: "mr-1.5 h-4 w-4" }), e("psw.matters.new", "New matter")]
|
|
102
105
|
})
|
|
103
|
-
}) : /* @__PURE__ */
|
|
106
|
+
}) : /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ L("div", {
|
|
104
107
|
className: "grid grid-cols-2 gap-3 lg:grid-cols-4",
|
|
105
108
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
label: "Matters",
|
|
109
|
+
/* @__PURE__ */ I(f, {
|
|
110
|
+
label: e("psw.matters.metricTotal", "Matters"),
|
|
108
111
|
value: q.totalCount,
|
|
109
|
-
icon: /* @__PURE__ */
|
|
112
|
+
icon: /* @__PURE__ */ I(j, { className: "h-4 w-4" })
|
|
110
113
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
label: "Open",
|
|
113
|
-
value:
|
|
114
|
-
icon: /* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ I(f, {
|
|
115
|
+
label: e("psw.matters.metricOpen", "Open"),
|
|
116
|
+
value: se,
|
|
117
|
+
icon: /* @__PURE__ */ I(A, { className: "h-4 w-4" }),
|
|
115
118
|
tone: "accent"
|
|
116
119
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
label: "Privileged",
|
|
119
|
-
value:
|
|
120
|
-
icon: /* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ I(f, {
|
|
121
|
+
label: e("psw.matters.metricPrivileged", "Privileged"),
|
|
122
|
+
value: ce,
|
|
123
|
+
icon: /* @__PURE__ */ I(M, { className: "h-4 w-4" }),
|
|
121
124
|
tone: "warning"
|
|
122
125
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
label: "High priority",
|
|
126
|
+
/* @__PURE__ */ I(f, {
|
|
127
|
+
label: e("psw.matters.metricHighPriority", "High priority"),
|
|
125
128
|
value: $,
|
|
126
|
-
icon: /* @__PURE__ */
|
|
129
|
+
icon: /* @__PURE__ */ I(te, { className: "h-4 w-4" }),
|
|
127
130
|
tone: $ ? "danger" : "neutral"
|
|
128
131
|
})
|
|
129
132
|
]
|
|
130
|
-
}), /* @__PURE__ */
|
|
131
|
-
title:
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ L(g, {
|
|
134
|
+
title: q.totalCount === 1 ? e("psw.matters.count", "{{count}} matter", { count: q.totalCount }) : e("psw.matters.countPlural", "{{count}} matters", { count: q.totalCount }),
|
|
135
|
+
children: [/* @__PURE__ */ L(v, { children: [/* @__PURE__ */ I("thead", { children: /* @__PURE__ */ L("tr", { children: [
|
|
136
|
+
/* @__PURE__ */ I(S, { children: e("psw.matters.tableMatter", "Matter") }),
|
|
137
|
+
/* @__PURE__ */ I(S, { children: e("psw.matters.tableClient", "Client") }),
|
|
138
|
+
/* @__PURE__ */ I(S, { children: e("psw.matters.tablePriority", "Priority") }),
|
|
139
|
+
/* @__PURE__ */ I(S, { children: e("psw.matters.tableStatus", "Status") }),
|
|
140
|
+
/* @__PURE__ */ I(S, { children: e("psw.matters.tableDue", "Due") }),
|
|
141
|
+
/* @__PURE__ */ I(S, { children: e("psw.matters.tableTags", "Tags") }),
|
|
142
|
+
/* @__PURE__ */ I(S, {
|
|
140
143
|
className: "text-right",
|
|
141
|
-
children:
|
|
144
|
+
children: e("psw.common.actions", "Actions")
|
|
142
145
|
})
|
|
143
|
-
] }) }), /* @__PURE__ */
|
|
146
|
+
] }) }), /* @__PURE__ */ I("tbody", { children: q.items.map((t) => /* @__PURE__ */ L("tr", {
|
|
144
147
|
className: "transition-colors hover:bg-bg-sunken/60",
|
|
145
148
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ L(y, { children: [/* @__PURE__ */ L("span", {
|
|
147
150
|
className: "flex items-center gap-2 font-medium text-text-primary",
|
|
148
|
-
children: [
|
|
151
|
+
children: [t.isPrivileged && /* @__PURE__ */ I(re, {}), /* @__PURE__ */ I("span", {
|
|
149
152
|
className: "truncate",
|
|
150
|
-
children:
|
|
153
|
+
children: t.title
|
|
151
154
|
})]
|
|
152
|
-
}),
|
|
155
|
+
}), t.reference ? /* @__PURE__ */ I("div", {
|
|
153
156
|
className: "mt-0.5 pl-0 text-xs text-text-tertiary",
|
|
154
|
-
children:
|
|
157
|
+
children: e("psw.matters.reference", "Ref: {{reference}}", { reference: t.reference })
|
|
155
158
|
}) : null] }),
|
|
156
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ I(y, {
|
|
157
160
|
className: "text-text-primary",
|
|
158
|
-
children:
|
|
161
|
+
children: t.client?.name ?? e("psw.common.dash", "—")
|
|
159
162
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ I(y, { children: /* @__PURE__ */ I(_, { status: t.priority }) }),
|
|
164
|
+
/* @__PURE__ */ I(y, { children: /* @__PURE__ */ I(_, { status: t.status }) }),
|
|
165
|
+
/* @__PURE__ */ I(y, { children: w(t.dueDate) }),
|
|
166
|
+
/* @__PURE__ */ I(y, { children: /* @__PURE__ */ I(D, {
|
|
164
167
|
entityType: "PswMatter",
|
|
165
|
-
entityId:
|
|
166
|
-
tags:
|
|
167
|
-
onChange: async (
|
|
168
|
-
await
|
|
169
|
-
id:
|
|
170
|
-
input: { tags:
|
|
168
|
+
entityId: t.id,
|
|
169
|
+
tags: t.tags ?? [],
|
|
170
|
+
onChange: async (e) => {
|
|
171
|
+
await oe.mutateAsync({
|
|
172
|
+
id: t.id,
|
|
173
|
+
input: { tags: e }
|
|
171
174
|
}), X();
|
|
172
175
|
},
|
|
173
176
|
maxTags: 5
|
|
174
177
|
}) }),
|
|
175
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ I(y, {
|
|
176
179
|
className: "text-right",
|
|
177
|
-
children:
|
|
180
|
+
children: t.status !== "CLOSED" && t.status !== "ARCHIVED" ? /* @__PURE__ */ L(R, {
|
|
178
181
|
variant: "ghost",
|
|
179
182
|
size: "sm",
|
|
180
183
|
disabled: Z.isPending,
|
|
181
|
-
onClick: () => Z.mutate(
|
|
184
|
+
onClick: () => Z.mutate(t.id, {
|
|
182
185
|
onSuccess: () => {
|
|
183
|
-
|
|
186
|
+
i("psw.matter.closed", { matterId: t.id }), G({
|
|
184
187
|
tone: "success",
|
|
185
|
-
text:
|
|
188
|
+
text: e("psw.matters.closed", "{{title}} closed.", { title: t.title })
|
|
186
189
|
});
|
|
187
190
|
},
|
|
188
|
-
onError: (
|
|
191
|
+
onError: (t) => G({
|
|
189
192
|
tone: "danger",
|
|
190
|
-
text:
|
|
193
|
+
text: t instanceof Error ? t.message : e("psw.matters.createFailed", "Failed.")
|
|
191
194
|
})
|
|
192
195
|
}),
|
|
193
|
-
children: [
|
|
194
|
-
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ I(ne, { className: "mr-1 h-4 w-4" }),
|
|
198
|
+
" ",
|
|
199
|
+
e("psw.matters.close", "Close")
|
|
200
|
+
]
|
|
201
|
+
}) : /* @__PURE__ */ I("span", {
|
|
195
202
|
className: "text-xs text-text-tertiary",
|
|
196
|
-
children:
|
|
203
|
+
children: t.closedAt ? e("psw.matters.closedAt", "Closed {{date}}", { date: w(t.closedAt) }) : e("psw.common.dash", "—")
|
|
197
204
|
})
|
|
198
205
|
})
|
|
199
206
|
]
|
|
200
|
-
},
|
|
207
|
+
}, t.id)) })] }), /* @__PURE__ */ I(O, {
|
|
201
208
|
hasMore: q?.pageInfo?.hasMore ?? !1,
|
|
202
209
|
loading: J,
|
|
203
210
|
loadedCount: Q.length,
|
|
204
211
|
totalCount: q?.totalCount ?? Q.length,
|
|
205
212
|
onLoadMore: () => K((e) => ({
|
|
206
|
-
limit:
|
|
207
|
-
offset: e.offset +
|
|
213
|
+
limit: V,
|
|
214
|
+
offset: e.offset + V
|
|
208
215
|
}))
|
|
209
216
|
})]
|
|
210
217
|
})] }),
|
|
211
|
-
|
|
218
|
+
H && /* @__PURE__ */ I(ie, {
|
|
212
219
|
onClose: () => U(!1),
|
|
213
|
-
onSaved: (
|
|
220
|
+
onSaved: (t) => G({
|
|
214
221
|
tone: "success",
|
|
215
|
-
text:
|
|
222
|
+
text: e("psw.matters.opened", "{{title}} opened.", { title: t })
|
|
216
223
|
})
|
|
217
224
|
})
|
|
218
225
|
]
|
|
219
226
|
});
|
|
220
|
-
},
|
|
221
|
-
let a = n(), { emitFact:
|
|
227
|
+
}, ie = ({ onClose: t, onSaved: r }) => {
|
|
228
|
+
let a = o(), c = n(), { emitFact: l } = T(), d = e({ pagination: { limit: 100 } }), f = i(), [h, g] = k({
|
|
222
229
|
clientId: "",
|
|
223
230
|
practiceAreaId: "",
|
|
224
231
|
title: "",
|
|
@@ -227,138 +234,138 @@ var B = [
|
|
|
227
234
|
priority: "MEDIUM",
|
|
228
235
|
dueDate: "",
|
|
229
236
|
isPrivileged: !1
|
|
230
|
-
}), [
|
|
237
|
+
}), [_, v] = k(null), y = (e) => (t) => g((n) => ({
|
|
231
238
|
...n,
|
|
232
239
|
[e]: t.target.value
|
|
233
240
|
}));
|
|
234
|
-
return /* @__PURE__ */
|
|
241
|
+
return /* @__PURE__ */ I(p, {
|
|
235
242
|
open: !0,
|
|
236
243
|
onClose: t,
|
|
237
|
-
title:
|
|
238
|
-
footer: /* @__PURE__ */
|
|
244
|
+
title: a("psw.matters.newTitle", "New matter"),
|
|
245
|
+
footer: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(R, {
|
|
239
246
|
variant: "outline",
|
|
240
247
|
onClick: t,
|
|
241
|
-
disabled:
|
|
242
|
-
children: "Cancel"
|
|
243
|
-
}), /* @__PURE__ */
|
|
248
|
+
disabled: c.isPending,
|
|
249
|
+
children: a("psw.common.cancel", "Cancel")
|
|
250
|
+
}), /* @__PURE__ */ I(R, {
|
|
244
251
|
onClick: () => {
|
|
245
|
-
if (
|
|
246
|
-
if (!
|
|
247
|
-
|
|
248
|
-
clientId:
|
|
249
|
-
practiceAreaId:
|
|
250
|
-
title:
|
|
251
|
-
reference:
|
|
252
|
-
description:
|
|
253
|
-
priority:
|
|
254
|
-
isPrivileged:
|
|
255
|
-
dueDate:
|
|
252
|
+
if (v(null), !h.clientId) return v(a("psw.matters.selectClient", "Select a client."));
|
|
253
|
+
if (!h.title.trim()) return v(a("psw.matters.titleRequired", "Matter title is required."));
|
|
254
|
+
c.mutate({
|
|
255
|
+
clientId: h.clientId,
|
|
256
|
+
practiceAreaId: h.practiceAreaId || null,
|
|
257
|
+
title: h.title.trim(),
|
|
258
|
+
reference: h.reference.trim() || null,
|
|
259
|
+
description: h.description.trim() || null,
|
|
260
|
+
priority: h.priority,
|
|
261
|
+
isPrivileged: h.isPrivileged,
|
|
262
|
+
dueDate: h.dueDate ? new Date(h.dueDate).toISOString() : null
|
|
256
263
|
}, {
|
|
257
264
|
onSuccess: (e) => {
|
|
258
265
|
let n = e.pswCreateMatter;
|
|
259
|
-
|
|
266
|
+
l("psw.matter.created", {
|
|
260
267
|
matterId: n.id,
|
|
261
|
-
clientId:
|
|
262
|
-
}), r(
|
|
268
|
+
clientId: h.clientId
|
|
269
|
+
}), r(h.title.trim()), t();
|
|
263
270
|
},
|
|
264
|
-
onError: (e) =>
|
|
271
|
+
onError: (e) => v(e instanceof Error ? e.message : a("psw.matters.createFailed", "Failed."))
|
|
265
272
|
});
|
|
266
273
|
},
|
|
267
|
-
disabled:
|
|
268
|
-
children:
|
|
274
|
+
disabled: c.isPending,
|
|
275
|
+
children: c.isPending ? a("psw.common.opening", "Opening…") : a("psw.common.create", "Open matter")
|
|
269
276
|
})] }),
|
|
270
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ L("div", {
|
|
271
278
|
className: "space-y-3",
|
|
272
279
|
children: [
|
|
273
|
-
|
|
280
|
+
_ && /* @__PURE__ */ I(s, {
|
|
274
281
|
tone: "danger",
|
|
275
|
-
children:
|
|
282
|
+
children: _
|
|
276
283
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
label: "Client",
|
|
284
|
+
/* @__PURE__ */ I(u, {
|
|
285
|
+
label: a("psw.matters.client", "Client"),
|
|
279
286
|
required: !0,
|
|
280
|
-
children: /* @__PURE__ */
|
|
281
|
-
value:
|
|
282
|
-
onChange:
|
|
283
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ L(m, {
|
|
288
|
+
value: h.clientId,
|
|
289
|
+
onChange: y("clientId"),
|
|
290
|
+
children: [/* @__PURE__ */ I("option", {
|
|
284
291
|
value: "",
|
|
285
|
-
children: "Select a client…"
|
|
286
|
-
}),
|
|
292
|
+
children: a("psw.engagements.selectClientPlaceholder", "Select a client…")
|
|
293
|
+
}), d.data?.items.map((e) => /* @__PURE__ */ I("option", {
|
|
287
294
|
value: e.id,
|
|
288
295
|
children: e.name
|
|
289
296
|
}, e.id))]
|
|
290
297
|
})
|
|
291
298
|
}),
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
label: "Title",
|
|
299
|
+
/* @__PURE__ */ I(u, {
|
|
300
|
+
label: a("psw.matters.titleLabel", "Title"),
|
|
294
301
|
required: !0,
|
|
295
|
-
children: /* @__PURE__ */
|
|
296
|
-
value:
|
|
297
|
-
onChange:
|
|
298
|
-
placeholder: "Regulatory investigation — SEC inquiry"
|
|
302
|
+
children: /* @__PURE__ */ I(x, {
|
|
303
|
+
value: h.title,
|
|
304
|
+
onChange: y("title"),
|
|
305
|
+
placeholder: a("psw.matters.titlePlaceholder", "Regulatory investigation — SEC inquiry")
|
|
299
306
|
})
|
|
300
307
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ L("div", {
|
|
302
309
|
className: "grid grid-cols-2 gap-3",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
304
|
-
label: "Reference",
|
|
305
|
-
children: /* @__PURE__ */
|
|
306
|
-
value:
|
|
307
|
-
onChange:
|
|
308
|
-
placeholder: "MAT-2026-014"
|
|
310
|
+
children: [/* @__PURE__ */ I(u, {
|
|
311
|
+
label: a("psw.matters.referenceLabel", "Reference"),
|
|
312
|
+
children: /* @__PURE__ */ I(x, {
|
|
313
|
+
value: h.reference,
|
|
314
|
+
onChange: y("reference"),
|
|
315
|
+
placeholder: a("psw.matters.referencePlaceholder", "MAT-2026-014")
|
|
309
316
|
})
|
|
310
|
-
}), /* @__PURE__ */
|
|
311
|
-
label: "Priority",
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
-
value:
|
|
314
|
-
onChange:
|
|
315
|
-
children:
|
|
317
|
+
}), /* @__PURE__ */ I(u, {
|
|
318
|
+
label: a("psw.matters.priority", "Priority"),
|
|
319
|
+
children: /* @__PURE__ */ I(m, {
|
|
320
|
+
value: h.priority,
|
|
321
|
+
onChange: y("priority"),
|
|
322
|
+
children: C(B)
|
|
316
323
|
})
|
|
317
324
|
})]
|
|
318
325
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ L("div", {
|
|
320
327
|
className: "grid grid-cols-2 gap-3",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
322
|
-
label: "Practice area",
|
|
323
|
-
children: /* @__PURE__ */
|
|
324
|
-
value:
|
|
325
|
-
onChange:
|
|
326
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ I(u, {
|
|
329
|
+
label: a("psw.matters.practiceArea", "Practice area"),
|
|
330
|
+
children: /* @__PURE__ */ L(m, {
|
|
331
|
+
value: h.practiceAreaId,
|
|
332
|
+
onChange: y("practiceAreaId"),
|
|
333
|
+
children: [/* @__PURE__ */ I("option", {
|
|
327
334
|
value: "",
|
|
328
|
-
children: "Unassigned"
|
|
329
|
-
}),
|
|
335
|
+
children: a("psw.engagements.unassigned", "Unassigned")
|
|
336
|
+
}), f.data?.items.map((e) => /* @__PURE__ */ I("option", {
|
|
330
337
|
value: e.id,
|
|
331
338
|
children: e.name
|
|
332
339
|
}, e.id))]
|
|
333
340
|
})
|
|
334
|
-
}), /* @__PURE__ */
|
|
335
|
-
label: "Due date",
|
|
336
|
-
children: /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ I(u, {
|
|
342
|
+
label: a("psw.matters.dueDate", "Due date"),
|
|
343
|
+
children: /* @__PURE__ */ I(x, {
|
|
337
344
|
type: "date",
|
|
338
|
-
value:
|
|
339
|
-
onChange:
|
|
345
|
+
value: h.dueDate,
|
|
346
|
+
onChange: y("dueDate")
|
|
340
347
|
})
|
|
341
348
|
})]
|
|
342
349
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
label: "Description",
|
|
345
|
-
children: /* @__PURE__ */
|
|
346
|
-
value:
|
|
347
|
-
onChange:
|
|
350
|
+
/* @__PURE__ */ I(u, {
|
|
351
|
+
label: a("psw.matters.description", "Description"),
|
|
352
|
+
children: /* @__PURE__ */ I(b, {
|
|
353
|
+
value: h.description,
|
|
354
|
+
onChange: y("description")
|
|
348
355
|
})
|
|
349
356
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ L("label", {
|
|
351
358
|
className: "flex items-center gap-2.5 rounded-lg border border-border-seam bg-bg-canvas px-3 py-2.5 text-sm text-text-secondary",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ I("input", {
|
|
353
360
|
type: "checkbox",
|
|
354
|
-
checked:
|
|
355
|
-
onChange: (e) =>
|
|
361
|
+
checked: h.isPrivileged,
|
|
362
|
+
onChange: (e) => g((t) => ({
|
|
356
363
|
...t,
|
|
357
364
|
isPrivileged: e.target.checked
|
|
358
365
|
}))
|
|
359
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ L("span", {
|
|
360
367
|
className: "flex items-center gap-1.5",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ I(M, { className: "h-3.5 w-3.5 text-status-warning-text" }), a("psw.matters.privilegedLabel", "Privileged / confidential matter")]
|
|
362
369
|
})]
|
|
363
370
|
})
|
|
364
371
|
]
|
|
@@ -366,6 +373,6 @@ var B = [
|
|
|
366
373
|
});
|
|
367
374
|
};
|
|
368
375
|
//#endregion
|
|
369
|
-
export {
|
|
376
|
+
export { H as MattersPage };
|
|
370
377
|
|
|
371
378
|
//# sourceMappingURL=MattersPage.js.map
|