@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.
- package/dist/proserviceworld/components/DiscussionThread.js +76 -0
- package/dist/proserviceworld/components/DiscussionThread.js.map +1 -0
- package/dist/proserviceworld/components/ui.js +18 -18
- package/dist/proserviceworld/components/ui.js.map +1 -1
- package/dist/proserviceworld/hooks/useEntityComments.js +56 -0
- package/dist/proserviceworld/hooks/useEntityComments.js.map +1 -0
- package/dist/proserviceworld/pages/AnalyticsPage.js +277 -111
- package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ClientDetailPage.js +222 -149
- package/dist/proserviceworld/pages/ClientDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/ClientsPage.js +148 -127
- package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
- package/dist/proserviceworld/pages/CompliancePage.js +140 -96
- package/dist/proserviceworld/pages/CompliancePage.js.map +1 -1
- package/dist/proserviceworld/pages/DashboardPage.js +221 -104
- package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementDetailPage.js +217 -182
- package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.js +144 -106
- package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
- package/dist/proserviceworld/pages/InvoicesPage.js +144 -129
- package/dist/proserviceworld/pages/InvoicesPage.js.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.js +163 -122
- package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
- package/dist/proserviceworld/pages/TimePage.js +112 -92
- package/dist/proserviceworld/pages/TimePage.js.map +1 -1
- 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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
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
|
-
},
|
|
24
|
+
}, V = [
|
|
24
25
|
"DRAFT",
|
|
25
26
|
"INTERNAL_REVIEW",
|
|
26
27
|
"CLIENT_REVIEW",
|
|
27
28
|
"ACCEPTED",
|
|
28
29
|
"REJECTED"
|
|
29
|
-
],
|
|
30
|
-
let { id: e = "" } =
|
|
31
|
-
if (a) return /* @__PURE__ */
|
|
32
|
-
if (d) return /* @__PURE__ */
|
|
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__ */
|
|
37
|
-
let
|
|
38
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
51
|
+
actions: /* @__PURE__ */ L(v, { status: n.status })
|
|
51
52
|
}),
|
|
52
|
-
|
|
53
|
-
tone:
|
|
54
|
-
onClose: () =>
|
|
55
|
-
children:
|
|
53
|
+
H && /* @__PURE__ */ L(c, {
|
|
54
|
+
tone: H.tone,
|
|
55
|
+
onClose: () => q(null),
|
|
56
|
+
children: H.text
|
|
56
57
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ R("div", {
|
|
58
59
|
className: "grid grid-cols-2 gap-3 lg:grid-cols-4",
|
|
59
60
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
80
|
+
/* @__PURE__ */ L(p, {
|
|
74
81
|
label: "Time logged",
|
|
75
|
-
value: S(
|
|
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
|
-
|
|
89
|
+
J.length > 0 && /* @__PURE__ */ L(_, {
|
|
81
90
|
title: "Advance lifecycle",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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__ */
|
|
123
|
+
/* @__PURE__ */ R("div", {
|
|
107
124
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ L(_, {
|
|
109
126
|
title: "Deliverables",
|
|
110
|
-
action: /* @__PURE__ */
|
|
127
|
+
action: /* @__PURE__ */ R(z, {
|
|
111
128
|
size: "sm",
|
|
112
129
|
variant: "outline",
|
|
113
|
-
onClick: () =>
|
|
114
|
-
children: [/* @__PURE__ */ P
|
|
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__ */
|
|
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__ */
|
|
120
|
-
}) : /* @__PURE__ */
|
|
121
|
-
className: "space-y-2",
|
|
122
|
-
children: n.deliverables.map((e) => /* @__PURE__ */
|
|
123
|
-
className: "rounded-
|
|
124
|
-
children: /* @__PURE__ */
|
|
125
|
-
className: "flex items-start justify-between gap-
|
|
126
|
-
children: [/* @__PURE__ */
|
|
127
|
-
className: "
|
|
128
|
-
children: [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
})
|
|
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__ */
|
|
167
|
+
}), /* @__PURE__ */ L(_, {
|
|
149
168
|
title: "Milestones",
|
|
150
|
-
action: /* @__PURE__ */
|
|
169
|
+
action: /* @__PURE__ */ R(z, {
|
|
151
170
|
size: "sm",
|
|
152
171
|
variant: "outline",
|
|
153
|
-
onClick: () =>
|
|
154
|
-
children: [/* @__PURE__ */ P
|
|
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__ */
|
|
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__ */
|
|
160
|
-
}) : /* @__PURE__ */
|
|
161
|
-
className: "space-y-2",
|
|
162
|
-
children: n.milestones.map((e) => /* @__PURE__ */
|
|
163
|
-
className: "flex items-center justify-between rounded-
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
-
className: "
|
|
166
|
-
children:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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__ */
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
title: "
|
|
196
|
-
description:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
children: [/* @__PURE__ */
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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__ */
|
|
253
|
+
b && /* @__PURE__ */ L(G, {
|
|
219
254
|
engagementId: n.id,
|
|
220
|
-
onClose: () =>
|
|
255
|
+
onClose: () => k(!1),
|
|
221
256
|
onDone: () => {
|
|
222
|
-
m(),
|
|
257
|
+
m(), q({
|
|
223
258
|
tone: "success",
|
|
224
259
|
text: "Deliverable added."
|
|
225
260
|
});
|
|
226
261
|
}
|
|
227
262
|
}),
|
|
228
|
-
|
|
263
|
+
I && /* @__PURE__ */ L(K, {
|
|
229
264
|
engagementId: n.id,
|
|
230
|
-
onClose: () =>
|
|
265
|
+
onClose: () => V(!1),
|
|
231
266
|
onDone: () => {
|
|
232
|
-
m(),
|
|
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
|
-
},
|
|
275
|
+
}, U = ({ id: e, engagementId: t, status: n, onDone: r }) => {
|
|
241
276
|
let i = a();
|
|
242
|
-
return /* @__PURE__ */
|
|
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:
|
|
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
|
-
},
|
|
291
|
+
}, W = ({ id: t, engagementId: n, onDone: r }) => {
|
|
257
292
|
let i = e();
|
|
258
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
302
|
+
children: /* @__PURE__ */ L(k, { className: "h-4 w-4" })
|
|
268
303
|
});
|
|
269
|
-
},
|
|
270
|
-
let i = t(), [a, o] =
|
|
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] =
|
|
310
|
+
}), [s, l] = E(null), u = (e) => (t) => o((n) => ({
|
|
276
311
|
...n,
|
|
277
312
|
[e]: t.target.value
|
|
278
313
|
}));
|
|
279
|
-
return /* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ L(m, {
|
|
280
315
|
open: !0,
|
|
281
316
|
onClose: n,
|
|
282
317
|
title: "Add deliverable",
|
|
283
|
-
footer: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
342
|
+
children: /* @__PURE__ */ R("div", {
|
|
308
343
|
className: "space-y-3",
|
|
309
344
|
children: [
|
|
310
|
-
s && /* @__PURE__ */
|
|
345
|
+
s && /* @__PURE__ */ L(c, {
|
|
311
346
|
tone: "danger",
|
|
312
347
|
children: s
|
|
313
348
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ L(d, {
|
|
315
350
|
label: "Name",
|
|
316
351
|
required: !0,
|
|
317
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
358
|
+
/* @__PURE__ */ L(d, {
|
|
324
359
|
label: "Due date",
|
|
325
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
366
|
+
/* @__PURE__ */ L(d, {
|
|
332
367
|
label: "Acceptance criteria",
|
|
333
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ L(y, {
|
|
334
369
|
value: a.acceptanceCriteria,
|
|
335
370
|
onChange: u("acceptanceCriteria")
|
|
336
371
|
})
|
|
337
372
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ L(d, {
|
|
339
374
|
label: "Description",
|
|
340
|
-
children: /* @__PURE__ */
|
|
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
|
-
},
|
|
349
|
-
let i = n(), [a, o] =
|
|
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] =
|
|
355
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
418
|
+
children: /* @__PURE__ */ R("div", {
|
|
384
419
|
className: "space-y-3",
|
|
385
420
|
children: [
|
|
386
|
-
s && /* @__PURE__ */
|
|
421
|
+
s && /* @__PURE__ */ L(c, {
|
|
387
422
|
tone: "danger",
|
|
388
423
|
children: s
|
|
389
424
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ L(d, {
|
|
391
426
|
label: "Name",
|
|
392
427
|
required: !0,
|
|
393
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
437
|
+
/* @__PURE__ */ L(d, {
|
|
403
438
|
label: "Due date",
|
|
404
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
461
|
+
/* @__PURE__ */ R("label", {
|
|
427
462
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
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 {
|
|
477
|
+
export { H as EngagementDetailPage };
|
|
443
478
|
|
|
444
479
|
//# sourceMappingURL=EngagementDetailPage.js.map
|