@burdenoff/microfe-proserviceworld 2026.827.1 → 2026.1009.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.
Files changed (27) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/proserviceworld/components/ui.js +1 -1
  3. package/dist/proserviceworld/components/ui.js.map +1 -1
  4. package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.map +1 -1
  5. package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -1
  6. package/dist/proserviceworld/hooks/useTr.d.ts +19 -0
  7. package/dist/proserviceworld/hooks/useTr.d.ts.map +1 -0
  8. package/dist/proserviceworld/hooks/useTr.js +33 -0
  9. package/dist/proserviceworld/hooks/useTr.js.map +1 -0
  10. package/dist/proserviceworld/i18n/index.d.ts +1 -1
  11. package/dist/proserviceworld/i18n/index.d.ts.map +1 -1
  12. package/dist/proserviceworld/i18n/index.js +723 -18
  13. package/dist/proserviceworld/i18n/index.js.map +1 -1
  14. package/dist/proserviceworld/index.js +4 -4
  15. package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -1
  16. package/dist/proserviceworld/pages/ClientsPage.js +166 -164
  17. package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
  18. package/dist/proserviceworld/pages/DashboardPage.d.ts.map +1 -1
  19. package/dist/proserviceworld/pages/DashboardPage.js +152 -142
  20. package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
  21. package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -1
  22. package/dist/proserviceworld/pages/EngagementsPage.js +135 -135
  23. package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
  24. package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -1
  25. package/dist/proserviceworld/pages/MattersPage.js +204 -197
  26. package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
  27. package/package.json +1 -1
@@ -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 { Banner as o, Empty as s, ErrorState as c, Field as l, LoadingBlock as u, MetricCard as d, Modal as f, NativeSelect as p, PageHeader as m, SectionCard as h, StatusPill as g, TableWrap as _, Td as v, TextArea as y, TextInput as b, Th as x, enumOptions as S, fmtDate as C } from "../components/ui.js";
3
- import { t as w } from "../i18n/index.js";
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 ee } from "../utils/native.js";
6
- import { TagPicker as E } from "../components/TagPicker.js";
7
- import { LoadMore as D } from "../components/LoadMore.js";
8
- import { useMemo as O, useState as k } from "react";
9
- import { AlertTriangle as te, CheckCircle2 as A, CircleDot as j, FolderKanban as M, Lock as N, Plus as P, Search as F } from "lucide-react";
10
- import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
11
- import { Button as z } from "@burdenoff/fe-libs/ui";
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 B = [
13
+ var z = [
14
14
  "OPEN",
15
15
  "ON_HOLD",
16
16
  "CLOSED",
17
17
  "ARCHIVED"
18
- ], V = [
18
+ ], B = [
19
19
  "LOW",
20
20
  "MEDIUM",
21
21
  "HIGH",
22
22
  "CRITICAL"
23
- ], ne = () => /* @__PURE__ */ L("span", {
24
- className: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md bg-status-warning-bg-subtle text-status-warning-text",
25
- title: "Privileged / confidential",
26
- "aria-label": "Privileged",
27
- children: /* @__PURE__ */ L(N, { className: "h-3 w-3" })
28
- }), H = 25, U = () => {
29
- let { emitIntent: e, emitFact: n } = T(), [i, l] = k(""), [f, y] = k(""), [V, U] = k(!1), [W, G] = k(null), [ie, K] = k({
30
- limit: H,
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: i.trim() || void 0,
34
- status: f || void 0,
35
- pagination: ie
36
- }), Z = t(), ae = a(), Q = O(() => q?.items ?? [], [q]), oe = Q.filter((e) => e.status === "OPEN").length, se = Q.filter((e) => e.isPrivileged).length, $ = Q.filter((e) => e.priority === "HIGH" || e.priority === "CRITICAL").length;
37
- return /* @__PURE__ */ R("div", {
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__ */ L(m, {
41
- title: w("psw.matters.title"),
42
- subtitle: w("psw.matters.subtitle"),
43
- icon: /* @__PURE__ */ L(M, { className: "h-6 w-6" }),
44
- actions: /* @__PURE__ */ R(z, {
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
- ee("light"), e("psw.matter.create_clicked"), U(!0);
49
+ E("light"), n("psw.matter.create_clicked"), U(!0);
47
50
  },
48
- children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), w("psw.matters.new")]
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__ */ L(o, {
54
+ W && /* @__PURE__ */ I(s, {
52
55
  tone: W.tone,
53
56
  onClose: () => G(null),
54
57
  children: W.text
55
58
  }),
56
- /* @__PURE__ */ R("div", {
59
+ /* @__PURE__ */ L("div", {
57
60
  className: "flex flex-col gap-2 sm:flex-row sm:items-center",
58
- children: [/* @__PURE__ */ R("div", {
61
+ children: [/* @__PURE__ */ L("div", {
59
62
  className: "relative flex-1",
60
- children: [/* @__PURE__ */ L(F, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ L(b, {
61
- placeholder: w("psw.matters.searchPlaceholder"),
62
- value: i,
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
- l(e.target.value), K({
65
- limit: H,
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" && i.trim() && n("psw.search.performed", {
73
+ e.key === "Enter" && u.trim() && i("psw.search.performed", {
71
74
  entityType: "matter",
72
- queryLength: i.trim().length
75
+ queryLength: u.trim().length
73
76
  });
74
77
  },
75
78
  className: "pl-9"
76
79
  })]
77
- }), /* @__PURE__ */ R(p, {
78
- value: f,
80
+ }), /* @__PURE__ */ L(m, {
81
+ value: b,
79
82
  onChange: (e) => {
80
- y(e.target.value), K({
81
- limit: H,
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__ */ L("option", {
89
+ children: [/* @__PURE__ */ I("option", {
87
90
  value: "",
88
- children: w("psw.matters.allStatuses")
89
- }), S(B)]
91
+ children: e("psw.matters.allStatuses", "All statuses")
92
+ }), C(z)]
90
93
  })]
91
94
  }),
92
- J ? /* @__PURE__ */ L(u, {}) : Y ? /* @__PURE__ */ L(c, {
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__ */ L(s, {
96
- title: w("psw.matters.emptyTitle"),
97
- description: w("psw.matters.emptyDescription"),
98
- icon: /* @__PURE__ */ L(M, { className: "h-8 w-8" }),
99
- action: /* @__PURE__ */ R(z, {
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__ */ L(P, { className: "mr-1.5 h-4 w-4" }), w("psw.matters.new")]
104
+ children: [/* @__PURE__ */ I(N, { className: "mr-1.5 h-4 w-4" }), e("psw.matters.new", "New matter")]
102
105
  })
103
- }) : /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ R("div", {
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__ */ L(d, {
107
- label: "Matters",
109
+ /* @__PURE__ */ I(f, {
110
+ label: e("psw.matters.metricTotal", "Matters"),
108
111
  value: q.totalCount,
109
- icon: /* @__PURE__ */ L(M, { className: "h-4 w-4" })
112
+ icon: /* @__PURE__ */ I(j, { className: "h-4 w-4" })
110
113
  }),
111
- /* @__PURE__ */ L(d, {
112
- label: "Open",
113
- value: oe,
114
- icon: /* @__PURE__ */ L(j, { className: "h-4 w-4" }),
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__ */ L(d, {
118
- label: "Privileged",
119
- value: se,
120
- icon: /* @__PURE__ */ L(N, { className: "h-4 w-4" }),
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__ */ L(d, {
124
- label: "High priority",
126
+ /* @__PURE__ */ I(f, {
127
+ label: e("psw.matters.metricHighPriority", "High priority"),
125
128
  value: $,
126
- icon: /* @__PURE__ */ L(te, { className: "h-4 w-4" }),
129
+ icon: /* @__PURE__ */ I(te, { className: "h-4 w-4" }),
127
130
  tone: $ ? "danger" : "neutral"
128
131
  })
129
132
  ]
130
- }), /* @__PURE__ */ R(h, {
131
- title: `${q.totalCount} matter${q.totalCount === 1 ? "" : "s"}`,
132
- children: [/* @__PURE__ */ R(_, { children: [/* @__PURE__ */ L("thead", { children: /* @__PURE__ */ R("tr", { children: [
133
- /* @__PURE__ */ L(x, { children: w("psw.matters.tableMatter") }),
134
- /* @__PURE__ */ L(x, { children: w("psw.matters.tableClient") }),
135
- /* @__PURE__ */ L(x, { children: w("psw.matters.tablePriority") }),
136
- /* @__PURE__ */ L(x, { children: w("psw.matters.tableStatus") }),
137
- /* @__PURE__ */ L(x, { children: w("psw.matters.tableDue") }),
138
- /* @__PURE__ */ L(x, { children: w("psw.matters.tableTags") }),
139
- /* @__PURE__ */ L(x, {
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: w("psw.common.actions")
144
+ children: e("psw.common.actions", "Actions")
142
145
  })
143
- ] }) }), /* @__PURE__ */ L("tbody", { children: q.items.map((e) => /* @__PURE__ */ R("tr", {
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__ */ R(v, { children: [/* @__PURE__ */ R("span", {
149
+ /* @__PURE__ */ L(y, { children: [/* @__PURE__ */ L("span", {
147
150
  className: "flex items-center gap-2 font-medium text-text-primary",
148
- children: [e.isPrivileged && /* @__PURE__ */ L(ne, {}), /* @__PURE__ */ L("span", {
151
+ children: [t.isPrivileged && /* @__PURE__ */ I(re, {}), /* @__PURE__ */ I("span", {
149
152
  className: "truncate",
150
- children: e.title
153
+ children: t.title
151
154
  })]
152
- }), e.reference ? /* @__PURE__ */ R("div", {
155
+ }), t.reference ? /* @__PURE__ */ I("div", {
153
156
  className: "mt-0.5 pl-0 text-xs text-text-tertiary",
154
- children: ["Ref: ", e.reference]
157
+ children: e("psw.matters.reference", "Ref: {{reference}}", { reference: t.reference })
155
158
  }) : null] }),
156
- /* @__PURE__ */ L(v, {
159
+ /* @__PURE__ */ I(y, {
157
160
  className: "text-text-primary",
158
- children: e.client?.name ?? "—"
161
+ children: t.client?.name ?? e("psw.common.dash", "—")
159
162
  }),
160
- /* @__PURE__ */ L(v, { children: /* @__PURE__ */ L(g, { status: e.priority }) }),
161
- /* @__PURE__ */ L(v, { children: /* @__PURE__ */ L(g, { status: e.status }) }),
162
- /* @__PURE__ */ L(v, { children: C(e.dueDate) }),
163
- /* @__PURE__ */ L(v, { children: /* @__PURE__ */ L(E, {
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: e.id,
166
- tags: e.tags ?? [],
167
- onChange: async (t) => {
168
- await ae.mutateAsync({
169
- id: e.id,
170
- input: { tags: t }
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__ */ L(v, {
178
+ /* @__PURE__ */ I(y, {
176
179
  className: "text-right",
177
- children: e.status !== "CLOSED" && e.status !== "ARCHIVED" ? /* @__PURE__ */ R(z, {
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(e.id, {
184
+ onClick: () => Z.mutate(t.id, {
182
185
  onSuccess: () => {
183
- n("psw.matter.closed", { matterId: e.id }), G({
186
+ i("psw.matter.closed", { matterId: t.id }), G({
184
187
  tone: "success",
185
- text: `${e.title} closed.`
188
+ text: e("psw.matters.closed", "{{title}} closed.", { title: t.title })
186
189
  });
187
190
  },
188
- onError: (e) => G({
191
+ onError: (t) => G({
189
192
  tone: "danger",
190
- text: e instanceof Error ? e.message : "Failed."
193
+ text: t instanceof Error ? t.message : e("psw.matters.createFailed", "Failed.")
191
194
  })
192
195
  }),
193
- children: [/* @__PURE__ */ L(A, { className: "mr-1 h-4 w-4" }), " Close"]
194
- }) : /* @__PURE__ */ L("span", {
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: e.closedAt ? `Closed ${C(e.closedAt)}` : "—"
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
- }, e.id)) })] }), /* @__PURE__ */ L(D, {
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: H,
207
- offset: e.offset + H
213
+ limit: V,
214
+ offset: e.offset + V
208
215
  }))
209
216
  })]
210
217
  })] }),
211
- V && /* @__PURE__ */ L(re, {
218
+ H && /* @__PURE__ */ I(ie, {
212
219
  onClose: () => U(!1),
213
- onSaved: (e) => G({
220
+ onSaved: (t) => G({
214
221
  tone: "success",
215
- text: `${e} opened.`
222
+ text: e("psw.matters.opened", "{{title}} opened.", { title: t })
216
223
  })
217
224
  })
218
225
  ]
219
226
  });
220
- }, re = ({ onClose: t, onSaved: r }) => {
221
- let a = n(), { emitFact: s } = T(), c = e({ pagination: { limit: 100 } }), u = i(), [d, m] = k({
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
- }), [h, g] = k(null), _ = (e) => (t) => m((n) => ({
237
+ }), [_, v] = k(null), y = (e) => (t) => g((n) => ({
231
238
  ...n,
232
239
  [e]: t.target.value
233
240
  }));
234
- return /* @__PURE__ */ L(f, {
241
+ return /* @__PURE__ */ I(p, {
235
242
  open: !0,
236
243
  onClose: t,
237
- title: w("psw.matters.newTitle"),
238
- footer: /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(z, {
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: a.isPending,
242
- children: "Cancel"
243
- }), /* @__PURE__ */ L(z, {
248
+ disabled: c.isPending,
249
+ children: a("psw.common.cancel", "Cancel")
250
+ }), /* @__PURE__ */ I(R, {
244
251
  onClick: () => {
245
- if (g(null), !d.clientId) return g("Select a client.");
246
- if (!d.title.trim()) return g("Matter title is required.");
247
- a.mutate({
248
- clientId: d.clientId,
249
- practiceAreaId: d.practiceAreaId || null,
250
- title: d.title.trim(),
251
- reference: d.reference.trim() || null,
252
- description: d.description.trim() || null,
253
- priority: d.priority,
254
- isPrivileged: d.isPrivileged,
255
- dueDate: d.dueDate ? new Date(d.dueDate).toISOString() : null
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
- s("psw.matter.created", {
266
+ l("psw.matter.created", {
260
267
  matterId: n.id,
261
- clientId: d.clientId
262
- }), r(d.title.trim()), t();
268
+ clientId: h.clientId
269
+ }), r(h.title.trim()), t();
263
270
  },
264
- onError: (e) => g(e instanceof Error ? e.message : "Failed.")
271
+ onError: (e) => v(e instanceof Error ? e.message : a("psw.matters.createFailed", "Failed."))
265
272
  });
266
273
  },
267
- disabled: a.isPending,
268
- children: a.isPending ? "Opening…" : "Open matter"
274
+ disabled: c.isPending,
275
+ children: c.isPending ? a("psw.common.opening", "Opening…") : a("psw.common.create", "Open matter")
269
276
  })] }),
270
- children: /* @__PURE__ */ R("div", {
277
+ children: /* @__PURE__ */ L("div", {
271
278
  className: "space-y-3",
272
279
  children: [
273
- h && /* @__PURE__ */ L(o, {
280
+ _ && /* @__PURE__ */ I(s, {
274
281
  tone: "danger",
275
- children: h
282
+ children: _
276
283
  }),
277
- /* @__PURE__ */ L(l, {
278
- label: "Client",
284
+ /* @__PURE__ */ I(u, {
285
+ label: a("psw.matters.client", "Client"),
279
286
  required: !0,
280
- children: /* @__PURE__ */ R(p, {
281
- value: d.clientId,
282
- onChange: _("clientId"),
283
- children: [/* @__PURE__ */ L("option", {
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
- }), c.data?.items.map((e) => /* @__PURE__ */ L("option", {
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__ */ L(l, {
293
- label: "Title",
299
+ /* @__PURE__ */ I(u, {
300
+ label: a("psw.matters.titleLabel", "Title"),
294
301
  required: !0,
295
- children: /* @__PURE__ */ L(b, {
296
- value: d.title,
297
- onChange: _("title"),
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__ */ R("div", {
308
+ /* @__PURE__ */ L("div", {
302
309
  className: "grid grid-cols-2 gap-3",
303
- children: [/* @__PURE__ */ L(l, {
304
- label: "Reference",
305
- children: /* @__PURE__ */ L(b, {
306
- value: d.reference,
307
- onChange: _("reference"),
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__ */ L(l, {
311
- label: "Priority",
312
- children: /* @__PURE__ */ L(p, {
313
- value: d.priority,
314
- onChange: _("priority"),
315
- children: S(V)
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__ */ R("div", {
326
+ /* @__PURE__ */ L("div", {
320
327
  className: "grid grid-cols-2 gap-3",
321
- children: [/* @__PURE__ */ L(l, {
322
- label: "Practice area",
323
- children: /* @__PURE__ */ R(p, {
324
- value: d.practiceAreaId,
325
- onChange: _("practiceAreaId"),
326
- children: [/* @__PURE__ */ L("option", {
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
- }), u.data?.items.map((e) => /* @__PURE__ */ L("option", {
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__ */ L(l, {
335
- label: "Due date",
336
- children: /* @__PURE__ */ L(b, {
341
+ }), /* @__PURE__ */ I(u, {
342
+ label: a("psw.matters.dueDate", "Due date"),
343
+ children: /* @__PURE__ */ I(x, {
337
344
  type: "date",
338
- value: d.dueDate,
339
- onChange: _("dueDate")
345
+ value: h.dueDate,
346
+ onChange: y("dueDate")
340
347
  })
341
348
  })]
342
349
  }),
343
- /* @__PURE__ */ L(l, {
344
- label: "Description",
345
- children: /* @__PURE__ */ L(y, {
346
- value: d.description,
347
- onChange: _("description")
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__ */ R("label", {
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__ */ L("input", {
359
+ children: [/* @__PURE__ */ I("input", {
353
360
  type: "checkbox",
354
- checked: d.isPrivileged,
355
- onChange: (e) => m((t) => ({
361
+ checked: h.isPrivileged,
362
+ onChange: (e) => g((t) => ({
356
363
  ...t,
357
364
  isPrivileged: e.target.checked
358
365
  }))
359
- }), /* @__PURE__ */ R("span", {
366
+ }), /* @__PURE__ */ L("span", {
360
367
  className: "flex items-center gap-1.5",
361
- children: [/* @__PURE__ */ L(N, { className: "h-3.5 w-3.5 text-status-warning-text" }), "Privileged / confidential matter"]
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 { U as MattersPage };
376
+ export { H as MattersPage };
370
377
 
371
378
  //# sourceMappingURL=MattersPage.js.map