@burdenoff/microfe-proserviceworld 2026.706.1 → 2026.706.3

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/proserviceworld/components/DiscussionThread.js +76 -0
  2. package/dist/proserviceworld/components/DiscussionThread.js.map +1 -0
  3. package/dist/proserviceworld/components/ui.js +18 -18
  4. package/dist/proserviceworld/components/ui.js.map +1 -1
  5. package/dist/proserviceworld/hooks/useEntityComments.js +56 -0
  6. package/dist/proserviceworld/hooks/useEntityComments.js.map +1 -0
  7. package/dist/proserviceworld/pages/AnalyticsPage.js +277 -111
  8. package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
  9. package/dist/proserviceworld/pages/ClientDetailPage.js +222 -149
  10. package/dist/proserviceworld/pages/ClientDetailPage.js.map +1 -1
  11. package/dist/proserviceworld/pages/ClientsPage.js +148 -127
  12. package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
  13. package/dist/proserviceworld/pages/CompliancePage.js +140 -96
  14. package/dist/proserviceworld/pages/CompliancePage.js.map +1 -1
  15. package/dist/proserviceworld/pages/DashboardPage.js +221 -104
  16. package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
  17. package/dist/proserviceworld/pages/EngagementDetailPage.js +217 -182
  18. package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -1
  19. package/dist/proserviceworld/pages/EngagementsPage.js +144 -106
  20. package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
  21. package/dist/proserviceworld/pages/InvoicesPage.js +144 -129
  22. package/dist/proserviceworld/pages/InvoicesPage.js.map +1 -1
  23. package/dist/proserviceworld/pages/MattersPage.js +163 -122
  24. package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
  25. package/dist/proserviceworld/pages/TimePage.js +112 -92
  26. package/dist/proserviceworld/pages/TimePage.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
1
  import { useCompleteMilestone as e, useCreateDeliverable as t, useCreateMilestone as n, useEngagement as r, useTimeEntries as i, useTransitionDeliverable as a, useTransitionEngagement as o } from "../hooks/useProServiceWorldApi.js";
2
2
  import { useNav as s } from "../utils/nav.js";
3
3
  import { Banner as c, Empty as l, ErrorState as u, Field as d, LoadingBlock as f, MetricCard as p, Modal as m, NativeSelect as h, PageHeader as g, SectionCard as _, StatusPill as v, TextArea as y, TextInput as b, fmtDate as x, fmtMinutesAsHours as S, fmtMoney as C, humanize as w } from "../components/ui.js";
4
- import { useState as T } from "react";
5
- import { ArrowLeft as E, CheckCircle2 as D, Clock as O, FileText as k, Flag as A, Plus as j } from "lucide-react";
6
- import { useParams as M } from "react-router-dom";
7
- import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
8
- import { Button as I } from "@burdenoff/fe-libs/ui";
4
+ import { DiscussionThread as T } from "../components/DiscussionThread.js";
5
+ import { useState as E } from "react";
6
+ import { ArrowLeft as D, ArrowRight as O, CheckCircle2 as k, Clock as A, DollarSign as j, FileText as M, Flag as N, Plus as P } from "lucide-react";
7
+ import { useParams as F } from "react-router-dom";
8
+ import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
9
+ import { Button as z } from "@burdenoff/fe-libs/ui";
9
10
  //#region src/proserviceworld/pages/EngagementDetailPage.tsx
10
- var L = {
11
+ var B = {
11
12
  PROPOSAL: ["ACCEPTED", "CANCELLED"],
12
13
  ACCEPTED: ["IN_PROGRESS", "CANCELLED"],
13
14
  IN_PROGRESS: ["REVIEW", "CANCELLED"],
@@ -20,123 +21,141 @@ var L = {
20
21
  INVOICED: ["CLOSED"],
21
22
  CLOSED: [],
22
23
  CANCELLED: []
23
- }, R = [
24
+ }, V = [
24
25
  "DRAFT",
25
26
  "INTERNAL_REVIEW",
26
27
  "CLIENT_REVIEW",
27
28
  "ACCEPTED",
28
29
  "REJECTED"
29
- ], z = () => {
30
- let { id: e = "" } = M(), t = s(), { data: n, isLoading: a, error: d, refetch: m } = r(e), h = i({ engagementId: e }), y = o(), [b, D] = T(!1), [N, R] = T(!1), [z, W] = T(null);
31
- if (a) return /* @__PURE__ */ P(f, {});
32
- if (d) return /* @__PURE__ */ P(u, {
30
+ ], H = () => {
31
+ let { id: e = "" } = F(), t = s(), { data: n, isLoading: a, error: d, refetch: m } = r(e), h = i({ engagementId: e }), y = o(), [b, k] = E(!1), [I, V] = E(!1), [H, q] = E(null);
32
+ if (a) return /* @__PURE__ */ L(f, {});
33
+ if (d) return /* @__PURE__ */ L(u, {
33
34
  error: d,
34
35
  onRetry: () => void m()
35
36
  });
36
- if (!n) return /* @__PURE__ */ P(l, { title: "Engagement not found" });
37
- let G = L[n.status] ?? [], K = (h.data?.items ?? []).reduce((e, t) => e + t.minutes, 0);
38
- return /* @__PURE__ */ F("div", {
37
+ if (!n) return /* @__PURE__ */ L(l, { title: "Engagement not found" });
38
+ let J = B[n.status] ?? [], Y = (h.data?.items ?? []).reduce((e, t) => e + t.minutes, 0);
39
+ return /* @__PURE__ */ R("div", {
39
40
  className: "space-y-6",
40
41
  children: [
41
- /* @__PURE__ */ F("button", {
42
+ /* @__PURE__ */ R("button", {
42
43
  type: "button",
43
44
  onClick: () => t("engagements"),
44
- className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-accent",
45
- children: [/* @__PURE__ */ P(E, { className: "h-4 w-4" }), " Back to engagements"]
45
+ className: "flex items-center gap-1.5 text-sm text-text-secondary transition-colors hover:text-accent",
46
+ children: [/* @__PURE__ */ L(D, { className: "h-4 w-4" }), " Back to engagements"]
46
47
  }),
47
- /* @__PURE__ */ P(g, {
48
+ /* @__PURE__ */ L(g, {
48
49
  title: n.name,
49
50
  subtitle: n.client ? `${n.client.name} · ${w(n.feeArrangement)}` : w(n.feeArrangement),
50
- actions: /* @__PURE__ */ P(v, { status: n.status })
51
+ actions: /* @__PURE__ */ L(v, { status: n.status })
51
52
  }),
52
- z && /* @__PURE__ */ P(c, {
53
- tone: z.tone,
54
- onClose: () => W(null),
55
- children: z.text
53
+ H && /* @__PURE__ */ L(c, {
54
+ tone: H.tone,
55
+ onClose: () => q(null),
56
+ children: H.text
56
57
  }),
57
- /* @__PURE__ */ F("div", {
58
+ /* @__PURE__ */ R("div", {
58
59
  className: "grid grid-cols-2 gap-3 lg:grid-cols-4",
59
60
  children: [
60
- /* @__PURE__ */ P(p, {
61
+ /* @__PURE__ */ L(p, {
61
62
  label: "Fee",
62
63
  value: C(n.feeAmount, n.currency),
63
- hint: w(n.feeArrangement)
64
+ hint: w(n.feeArrangement),
65
+ icon: /* @__PURE__ */ L(j, { className: "h-4 w-4" }),
66
+ tone: "success"
64
67
  }),
65
- /* @__PURE__ */ P(p, {
68
+ /* @__PURE__ */ L(p, {
66
69
  label: "Deliverables",
67
- value: n.deliverables.length
70
+ value: n.deliverables.length,
71
+ icon: /* @__PURE__ */ L(M, { className: "h-4 w-4" }),
72
+ tone: "info"
68
73
  }),
69
- /* @__PURE__ */ P(p, {
74
+ /* @__PURE__ */ L(p, {
70
75
  label: "Milestones",
71
- value: n.milestones.length
76
+ value: n.milestones.length,
77
+ icon: /* @__PURE__ */ L(N, { className: "h-4 w-4" }),
78
+ tone: "accent"
72
79
  }),
73
- /* @__PURE__ */ P(p, {
80
+ /* @__PURE__ */ L(p, {
74
81
  label: "Time logged",
75
- value: S(K),
76
- hint: `${h.data?.totalCount ?? 0} entries`
82
+ value: S(Y),
83
+ hint: `${h.data?.totalCount ?? 0} entries`,
84
+ icon: /* @__PURE__ */ L(A, { className: "h-4 w-4" }),
85
+ tone: "warning"
77
86
  })
78
87
  ]
79
88
  }),
80
- G.length > 0 && /* @__PURE__ */ P(_, {
89
+ J.length > 0 && /* @__PURE__ */ L(_, {
81
90
  title: "Advance lifecycle",
82
- description: `Current status: ${w(n.status)}`,
83
- children: /* @__PURE__ */ P("div", {
84
- className: "flex flex-wrap gap-2",
85
- children: G.map((e) => /* @__PURE__ */ P(I, {
86
- size: "sm",
87
- variant: e === "CANCELLED" ? "outline" : "default",
88
- disabled: y.isPending,
89
- onClick: () => y.mutate({
90
- id: n.id,
91
- status: e
92
- }, {
93
- onSuccess: () => W({
94
- tone: "success",
95
- text: `Moved to ${w(e)}.`
96
- }),
97
- onError: (e) => W({
98
- tone: "danger",
99
- text: e instanceof Error ? e.message : "Transition failed."
100
- })
101
- }),
102
- children: w(e)
103
- }, e))
91
+ children: /* @__PURE__ */ R("div", {
92
+ className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
93
+ children: [/* @__PURE__ */ R("div", {
94
+ className: "flex items-center gap-2 text-sm text-text-secondary",
95
+ children: [/* @__PURE__ */ L("span", { children: "Currently" }), /* @__PURE__ */ L(v, { status: n.status })]
96
+ }), /* @__PURE__ */ L("div", {
97
+ className: "flex flex-wrap gap-2",
98
+ children: J.map((e) => {
99
+ let t = e === "CANCELLED";
100
+ return /* @__PURE__ */ R(z, {
101
+ size: "sm",
102
+ variant: t ? "outline" : "default",
103
+ disabled: y.isPending,
104
+ onClick: () => y.mutate({
105
+ id: n.id,
106
+ status: e
107
+ }, {
108
+ onSuccess: () => q({
109
+ tone: "success",
110
+ text: `Moved to ${w(e)}.`
111
+ }),
112
+ onError: (e) => q({
113
+ tone: "danger",
114
+ text: e instanceof Error ? e.message : "Transition failed."
115
+ })
116
+ }),
117
+ children: [w(e), !t && /* @__PURE__ */ L(O, { className: "ml-1.5 h-4 w-4" })]
118
+ }, e);
119
+ })
120
+ })]
104
121
  })
105
122
  }),
106
- /* @__PURE__ */ F("div", {
123
+ /* @__PURE__ */ R("div", {
107
124
  className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
108
- children: [/* @__PURE__ */ P(_, {
125
+ children: [/* @__PURE__ */ L(_, {
109
126
  title: "Deliverables",
110
- action: /* @__PURE__ */ F(I, {
127
+ action: /* @__PURE__ */ R(z, {
111
128
  size: "sm",
112
129
  variant: "outline",
113
- onClick: () => D(!0),
114
- children: [/* @__PURE__ */ P(j, { className: "mr-1.5 h-4 w-4" }), "Add"]
130
+ onClick: () => k(!0),
131
+ children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), "Add"]
115
132
  }),
116
- children: n.deliverables.length === 0 ? /* @__PURE__ */ P(l, {
133
+ children: n.deliverables.length === 0 ? /* @__PURE__ */ L(l, {
117
134
  title: "No deliverables",
118
135
  description: "Track the tangible outputs of this engagement.",
119
- icon: /* @__PURE__ */ P(k, { className: "h-7 w-7" })
120
- }) : /* @__PURE__ */ P("ul", {
121
- className: "space-y-2",
122
- children: n.deliverables.map((e) => /* @__PURE__ */ P("li", {
123
- className: "rounded-lg border border-border-seam p-3",
124
- children: /* @__PURE__ */ F("div", {
125
- className: "flex items-start justify-between gap-2",
126
- children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ F("div", {
127
- className: "text-sm font-medium text-text-primary",
128
- children: [
129
- e.name,
130
- " ",
131
- /* @__PURE__ */ F("span", {
132
- className: "text-xs text-text-tertiary",
136
+ icon: /* @__PURE__ */ L(M, { className: "h-7 w-7" })
137
+ }) : /* @__PURE__ */ L("ul", {
138
+ className: "space-y-2.5",
139
+ children: n.deliverables.map((e) => /* @__PURE__ */ L("li", {
140
+ className: "rounded-xl border border-border-seam bg-bg-canvas p-3.5 transition-colors hover:border-accent/40",
141
+ children: /* @__PURE__ */ R("div", {
142
+ className: "flex items-start justify-between gap-3",
143
+ children: [/* @__PURE__ */ R("div", {
144
+ className: "min-w-0",
145
+ children: [/* @__PURE__ */ R("div", {
146
+ className: "flex items-center gap-2 text-sm font-medium text-text-primary",
147
+ children: [/* @__PURE__ */ L("span", {
148
+ className: "truncate",
149
+ children: e.name
150
+ }), /* @__PURE__ */ R("span", {
151
+ className: "shrink-0 rounded-md bg-bg-sunken px-1.5 py-0.5 text-[10px] font-semibold text-text-tertiary",
133
152
  children: ["v", e.version]
134
- })
135
- ]
136
- }), e.dueDate && /* @__PURE__ */ F("div", {
137
- className: "text-xs text-text-tertiary",
138
- children: ["Due ", x(e.dueDate)]
139
- })] }), /* @__PURE__ */ P(B, {
153
+ })]
154
+ }), e.dueDate && /* @__PURE__ */ R("div", {
155
+ className: "mt-0.5 text-xs text-text-tertiary",
156
+ children: ["Due ", x(e.dueDate)]
157
+ })]
158
+ }), /* @__PURE__ */ L(U, {
140
159
  id: e.id,
141
160
  engagementId: n.id,
142
161
  status: e.status,
@@ -145,35 +164,38 @@ var L = {
145
164
  })
146
165
  }, e.id))
147
166
  })
148
- }), /* @__PURE__ */ P(_, {
167
+ }), /* @__PURE__ */ L(_, {
149
168
  title: "Milestones",
150
- action: /* @__PURE__ */ F(I, {
169
+ action: /* @__PURE__ */ R(z, {
151
170
  size: "sm",
152
171
  variant: "outline",
153
- onClick: () => R(!0),
154
- children: [/* @__PURE__ */ P(j, { className: "mr-1.5 h-4 w-4" }), "Add"]
172
+ onClick: () => V(!0),
173
+ children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), "Add"]
155
174
  }),
156
- children: n.milestones.length === 0 ? /* @__PURE__ */ P(l, {
175
+ children: n.milestones.length === 0 ? /* @__PURE__ */ L(l, {
157
176
  title: "No milestones",
158
177
  description: "Add checkpoints — some can trigger billing.",
159
- icon: /* @__PURE__ */ P(A, { className: "h-7 w-7" })
160
- }) : /* @__PURE__ */ P("ul", {
161
- className: "space-y-2",
162
- children: n.milestones.map((e) => /* @__PURE__ */ F("li", {
163
- className: "flex items-center justify-between rounded-lg border border-border-seam p-3",
164
- children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("div", {
165
- className: "text-sm font-medium text-text-primary",
166
- children: e.name
167
- }), /* @__PURE__ */ F("div", {
168
- className: "text-xs text-text-tertiary",
169
- children: [
170
- e.triggersInvoice ? `Bills ${C(e.triggerAmount, n.currency)} · ` : "",
171
- "Due ",
172
- x(e.dueDate)
173
- ]
174
- })] }), /* @__PURE__ */ F("div", {
175
- className: "flex items-center gap-2",
176
- children: [/* @__PURE__ */ P(v, { status: e.status }), e.status !== "COMPLETED" && e.status !== "CANCELLED" && /* @__PURE__ */ P(V, {
178
+ icon: /* @__PURE__ */ L(N, { className: "h-7 w-7" })
179
+ }) : /* @__PURE__ */ L("ul", {
180
+ className: "space-y-2.5",
181
+ children: n.milestones.map((e) => /* @__PURE__ */ R("li", {
182
+ className: "flex items-center justify-between gap-3 rounded-xl border border-border-seam bg-bg-canvas p-3.5 transition-colors hover:border-accent/40",
183
+ children: [/* @__PURE__ */ R("div", {
184
+ className: "min-w-0",
185
+ children: [/* @__PURE__ */ L("div", {
186
+ className: "truncate text-sm font-medium text-text-primary",
187
+ children: e.name
188
+ }), /* @__PURE__ */ R("div", {
189
+ className: "mt-0.5 text-xs text-text-tertiary",
190
+ children: [
191
+ e.triggersInvoice ? `Bills ${C(e.triggerAmount, n.currency)} · ` : "",
192
+ "Due ",
193
+ x(e.dueDate)
194
+ ]
195
+ })]
196
+ }), /* @__PURE__ */ R("div", {
197
+ className: "flex shrink-0 items-center gap-2",
198
+ children: [/* @__PURE__ */ L(v, { status: e.status }), e.status !== "COMPLETED" && e.status !== "CANCELLED" && /* @__PURE__ */ L(W, {
177
199
  id: e.id,
178
200
  engagementId: n.id,
179
201
  onDone: () => void m()
@@ -183,53 +205,66 @@ var L = {
183
205
  })
184
206
  })]
185
207
  }),
186
- /* @__PURE__ */ P(_, {
187
- title: "Time logged",
188
- action: /* @__PURE__ */ F(I, {
189
- size: "sm",
190
- variant: "outline",
191
- onClick: () => t("time"),
192
- children: [/* @__PURE__ */ P(O, { className: "mr-1.5 h-4 w-4" }), "Log time"]
193
- }),
194
- children: h.isLoading ? /* @__PURE__ */ P(f, { label: "Loading…" }) : !h.data || h.data.items.length === 0 ? /* @__PURE__ */ P(l, {
195
- title: "No time logged",
196
- description: "Time logged against this engagement will appear here."
197
- }) : /* @__PURE__ */ P("ul", {
198
- className: "divide-y divide-border-seam",
199
- children: h.data.items.slice(0, 8).map((e) => /* @__PURE__ */ F("li", {
200
- className: "flex items-center justify-between py-2 text-sm",
201
- children: [/* @__PURE__ */ F("span", {
202
- className: "text-text-secondary",
203
- children: [
204
- x(e.date),
205
- " · ",
206
- e.narrative || "Time entry"
207
- ]
208
- }), /* @__PURE__ */ F("span", {
209
- className: "flex items-center gap-2",
210
- children: [/* @__PURE__ */ P("span", {
211
- className: "text-text-primary",
212
- children: S(e.minutes)
213
- }), /* @__PURE__ */ P(v, { status: e.status })]
214
- })]
215
- }, e.id))
216
- })
208
+ /* @__PURE__ */ R("div", {
209
+ className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
210
+ children: [/* @__PURE__ */ L("div", {
211
+ className: "lg:col-span-2",
212
+ children: /* @__PURE__ */ L(T, {
213
+ entityType: "proserviceworld-engagement",
214
+ entityId: n.id
215
+ })
216
+ }), /* @__PURE__ */ L(_, {
217
+ title: "Time logged",
218
+ description: S(Y),
219
+ action: /* @__PURE__ */ R(z, {
220
+ size: "sm",
221
+ variant: "outline",
222
+ onClick: () => t("time"),
223
+ children: [/* @__PURE__ */ L(A, { className: "mr-1.5 h-4 w-4" }), "Log time"]
224
+ }),
225
+ children: h.isLoading ? /* @__PURE__ */ L(f, { label: "Loading…" }) : !h.data || h.data.items.length === 0 ? /* @__PURE__ */ L(l, {
226
+ title: "No time logged",
227
+ description: "Time logged against this engagement will appear here.",
228
+ icon: /* @__PURE__ */ L(A, { className: "h-7 w-7" })
229
+ }) : /* @__PURE__ */ L("ul", {
230
+ className: "space-y-2",
231
+ children: h.data.items.slice(0, 8).map((e) => /* @__PURE__ */ R("li", {
232
+ className: "rounded-lg border border-border-seam bg-bg-canvas p-3 text-sm",
233
+ children: [/* @__PURE__ */ R("div", {
234
+ className: "flex items-center justify-between gap-2",
235
+ children: [/* @__PURE__ */ L("span", {
236
+ className: "whitespace-nowrap text-xs text-text-tertiary",
237
+ children: x(e.date)
238
+ }), /* @__PURE__ */ R("span", {
239
+ className: "flex items-center gap-2",
240
+ children: [/* @__PURE__ */ L("span", {
241
+ className: "font-medium text-text-primary",
242
+ children: S(e.minutes)
243
+ }), /* @__PURE__ */ L(v, { status: e.status })]
244
+ })]
245
+ }), /* @__PURE__ */ L("div", {
246
+ className: "mt-1 truncate text-text-secondary",
247
+ children: e.narrative || "Time entry"
248
+ })]
249
+ }, e.id))
250
+ })
251
+ })]
217
252
  }),
218
- b && /* @__PURE__ */ P(H, {
253
+ b && /* @__PURE__ */ L(G, {
219
254
  engagementId: n.id,
220
- onClose: () => D(!1),
255
+ onClose: () => k(!1),
221
256
  onDone: () => {
222
- m(), W({
257
+ m(), q({
223
258
  tone: "success",
224
259
  text: "Deliverable added."
225
260
  });
226
261
  }
227
262
  }),
228
- N && /* @__PURE__ */ P(U, {
263
+ I && /* @__PURE__ */ L(K, {
229
264
  engagementId: n.id,
230
- onClose: () => R(!1),
265
+ onClose: () => V(!1),
231
266
  onDone: () => {
232
- m(), W({
267
+ m(), q({
233
268
  tone: "success",
234
269
  text: "Milestone added."
235
270
  });
@@ -237,9 +272,9 @@ var L = {
237
272
  })
238
273
  ]
239
274
  });
240
- }, B = ({ id: e, engagementId: t, status: n, onDone: r }) => {
275
+ }, U = ({ id: e, engagementId: t, status: n, onDone: r }) => {
241
276
  let i = a();
242
- return /* @__PURE__ */ P(h, {
277
+ return /* @__PURE__ */ L(h, {
243
278
  value: n,
244
279
  disabled: i.isPending,
245
280
  onChange: (n) => i.mutate({
@@ -247,15 +282,15 @@ var L = {
247
282
  status: n.target.value,
248
283
  engagementId: t
249
284
  }, { onSuccess: r }),
250
- className: "w-40",
251
- children: R.map((e) => /* @__PURE__ */ P("option", {
285
+ className: "w-40 shrink-0",
286
+ children: V.map((e) => /* @__PURE__ */ L("option", {
252
287
  value: e,
253
288
  children: w(e)
254
289
  }, e))
255
290
  });
256
- }, V = ({ id: t, engagementId: n, onDone: r }) => {
291
+ }, W = ({ id: t, engagementId: n, onDone: r }) => {
257
292
  let i = e();
258
- return /* @__PURE__ */ P(I, {
293
+ return /* @__PURE__ */ L(z, {
259
294
  variant: "ghost",
260
295
  size: "sm",
261
296
  "aria-label": "Complete milestone",
@@ -264,28 +299,28 @@ var L = {
264
299
  id: t,
265
300
  engagementId: n
266
301
  }, { onSuccess: r }),
267
- children: /* @__PURE__ */ P(D, { className: "h-4 w-4" })
302
+ children: /* @__PURE__ */ L(k, { className: "h-4 w-4" })
268
303
  });
269
- }, H = ({ engagementId: e, onClose: n, onDone: r }) => {
270
- let i = t(), [a, o] = T({
304
+ }, G = ({ engagementId: e, onClose: n, onDone: r }) => {
305
+ let i = t(), [a, o] = E({
271
306
  name: "",
272
307
  description: "",
273
308
  dueDate: "",
274
309
  acceptanceCriteria: ""
275
- }), [s, l] = T(null), u = (e) => (t) => o((n) => ({
310
+ }), [s, l] = E(null), u = (e) => (t) => o((n) => ({
276
311
  ...n,
277
312
  [e]: t.target.value
278
313
  }));
279
- return /* @__PURE__ */ P(m, {
314
+ return /* @__PURE__ */ L(m, {
280
315
  open: !0,
281
316
  onClose: n,
282
317
  title: "Add deliverable",
283
- footer: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(I, {
318
+ footer: /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(z, {
284
319
  variant: "outline",
285
320
  onClick: n,
286
321
  disabled: i.isPending,
287
322
  children: "Cancel"
288
- }), /* @__PURE__ */ P(I, {
323
+ }), /* @__PURE__ */ L(z, {
289
324
  onClick: () => {
290
325
  if (l(null), !a.name.trim()) return l("Name is required.");
291
326
  i.mutate({
@@ -304,40 +339,40 @@ var L = {
304
339
  disabled: i.isPending,
305
340
  children: i.isPending ? "Adding…" : "Add"
306
341
  })] }),
307
- children: /* @__PURE__ */ F("div", {
342
+ children: /* @__PURE__ */ R("div", {
308
343
  className: "space-y-3",
309
344
  children: [
310
- s && /* @__PURE__ */ P(c, {
345
+ s && /* @__PURE__ */ L(c, {
311
346
  tone: "danger",
312
347
  children: s
313
348
  }),
314
- /* @__PURE__ */ P(d, {
349
+ /* @__PURE__ */ L(d, {
315
350
  label: "Name",
316
351
  required: !0,
317
- children: /* @__PURE__ */ P(b, {
352
+ children: /* @__PURE__ */ L(b, {
318
353
  value: a.name,
319
354
  onChange: u("name"),
320
355
  placeholder: "Draft audit report"
321
356
  })
322
357
  }),
323
- /* @__PURE__ */ P(d, {
358
+ /* @__PURE__ */ L(d, {
324
359
  label: "Due date",
325
- children: /* @__PURE__ */ P(b, {
360
+ children: /* @__PURE__ */ L(b, {
326
361
  type: "date",
327
362
  value: a.dueDate,
328
363
  onChange: u("dueDate")
329
364
  })
330
365
  }),
331
- /* @__PURE__ */ P(d, {
366
+ /* @__PURE__ */ L(d, {
332
367
  label: "Acceptance criteria",
333
- children: /* @__PURE__ */ P(y, {
368
+ children: /* @__PURE__ */ L(y, {
334
369
  value: a.acceptanceCriteria,
335
370
  onChange: u("acceptanceCriteria")
336
371
  })
337
372
  }),
338
- /* @__PURE__ */ P(d, {
373
+ /* @__PURE__ */ L(d, {
339
374
  label: "Description",
340
- children: /* @__PURE__ */ P(y, {
375
+ children: /* @__PURE__ */ L(y, {
341
376
  value: a.description,
342
377
  onChange: u("description")
343
378
  })
@@ -345,23 +380,23 @@ var L = {
345
380
  ]
346
381
  })
347
382
  });
348
- }, U = ({ engagementId: e, onClose: t, onDone: r }) => {
349
- let i = n(), [a, o] = T({
383
+ }, K = ({ engagementId: e, onClose: t, onDone: r }) => {
384
+ let i = n(), [a, o] = E({
350
385
  name: "",
351
386
  dueDate: "",
352
387
  triggerAmount: "",
353
388
  triggersInvoice: !1
354
- }), [s, l] = T(null);
355
- return /* @__PURE__ */ P(m, {
389
+ }), [s, l] = E(null);
390
+ return /* @__PURE__ */ L(m, {
356
391
  open: !0,
357
392
  onClose: t,
358
393
  title: "Add milestone",
359
- footer: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(I, {
394
+ footer: /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(z, {
360
395
  variant: "outline",
361
396
  onClick: t,
362
397
  disabled: i.isPending,
363
398
  children: "Cancel"
364
- }), /* @__PURE__ */ P(I, {
399
+ }), /* @__PURE__ */ L(z, {
365
400
  onClick: () => {
366
401
  if (l(null), !a.name.trim()) return l("Name is required.");
367
402
  i.mutate({
@@ -380,17 +415,17 @@ var L = {
380
415
  disabled: i.isPending,
381
416
  children: i.isPending ? "Adding…" : "Add"
382
417
  })] }),
383
- children: /* @__PURE__ */ F("div", {
418
+ children: /* @__PURE__ */ R("div", {
384
419
  className: "space-y-3",
385
420
  children: [
386
- s && /* @__PURE__ */ P(c, {
421
+ s && /* @__PURE__ */ L(c, {
387
422
  tone: "danger",
388
423
  children: s
389
424
  }),
390
- /* @__PURE__ */ P(d, {
425
+ /* @__PURE__ */ L(d, {
391
426
  label: "Name",
392
427
  required: !0,
393
- children: /* @__PURE__ */ P(b, {
428
+ children: /* @__PURE__ */ L(b, {
394
429
  value: a.name,
395
430
  onChange: (e) => o((t) => ({
396
431
  ...t,
@@ -399,9 +434,9 @@ var L = {
399
434
  placeholder: "Phase 1 sign-off"
400
435
  })
401
436
  }),
402
- /* @__PURE__ */ P(d, {
437
+ /* @__PURE__ */ L(d, {
403
438
  label: "Due date",
404
- children: /* @__PURE__ */ P(b, {
439
+ children: /* @__PURE__ */ L(b, {
405
440
  type: "date",
406
441
  value: a.dueDate,
407
442
  onChange: (e) => o((t) => ({
@@ -410,10 +445,10 @@ var L = {
410
445
  }))
411
446
  })
412
447
  }),
413
- /* @__PURE__ */ P(d, {
448
+ /* @__PURE__ */ L(d, {
414
449
  label: "Trigger amount",
415
450
  hint: "Amount billed when this milestone completes (if it triggers an invoice).",
416
- children: /* @__PURE__ */ P(b, {
451
+ children: /* @__PURE__ */ L(b, {
417
452
  type: "number",
418
453
  min: "0",
419
454
  value: a.triggerAmount,
@@ -423,9 +458,9 @@ var L = {
423
458
  }))
424
459
  })
425
460
  }),
426
- /* @__PURE__ */ F("label", {
461
+ /* @__PURE__ */ R("label", {
427
462
  className: "flex items-center gap-2 text-sm text-text-secondary",
428
- children: [/* @__PURE__ */ P("input", {
463
+ children: [/* @__PURE__ */ L("input", {
429
464
  type: "checkbox",
430
465
  checked: a.triggersInvoice,
431
466
  onChange: (e) => o((t) => ({
@@ -439,6 +474,6 @@ var L = {
439
474
  });
440
475
  };
441
476
  //#endregion
442
- export { z as EngagementDetailPage };
477
+ export { H as EngagementDetailPage };
443
478
 
444
479
  //# sourceMappingURL=EngagementDetailPage.js.map