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