@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.
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -1
- package/dist/proserviceworld/ProServiceWorldRoot.d.ts +5 -0
- package/dist/proserviceworld/ProServiceWorldRoot.d.ts.map +1 -0
- package/dist/proserviceworld/ProServiceWorldRoutes.d.ts +2 -0
- package/dist/proserviceworld/ProServiceWorldRoutes.d.ts.map +1 -0
- package/dist/proserviceworld/components/DiscussionThread.d.ts +12 -0
- package/dist/proserviceworld/components/DiscussionThread.d.ts.map +1 -0
- package/dist/proserviceworld/components/ui.d.ts +82 -0
- package/dist/proserviceworld/components/ui.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useAnalytics.d.ts +18 -0
- package/dist/proserviceworld/hooks/useAnalytics.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useAnalytics.js +21 -0
- package/dist/proserviceworld/hooks/useAnalytics.js.map +1 -0
- package/dist/proserviceworld/hooks/useEntityComments.d.ts +27 -0
- package/dist/proserviceworld/hooks/useEntityComments.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useFiles.d.ts +23 -0
- package/dist/proserviceworld/hooks/useFiles.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts +351 -0
- package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.map +1 -0
- package/dist/proserviceworld/index.d.ts +5 -0
- package/dist/proserviceworld/index.d.ts.map +1 -0
- package/dist/proserviceworld/index.js +1 -0
- package/dist/proserviceworld/pages/AnalyticsPage.d.ts +4 -0
- package/dist/proserviceworld/pages/AnalyticsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/ClientDetailPage.d.ts +4 -0
- package/dist/proserviceworld/pages/ClientDetailPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/ClientsPage.d.ts +9 -0
- package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/ClientsPage.js +157 -146
- package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
- package/dist/proserviceworld/pages/CompliancePage.d.ts +4 -0
- package/dist/proserviceworld/pages/CompliancePage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/ConflictsPage.d.ts +4 -0
- package/dist/proserviceworld/pages/ConflictsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/DashboardPage.d.ts +4 -0
- package/dist/proserviceworld/pages/DashboardPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/DocumentsPage.d.ts +4 -0
- package/dist/proserviceworld/pages/DocumentsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/EngagementDetailPage.d.ts +4 -0
- package/dist/proserviceworld/pages/EngagementDetailPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/EngagementDetailPage.js +162 -156
- package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.d.ts +4 -0
- package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/EngagementsPage.js +141 -128
- package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
- package/dist/proserviceworld/pages/InvoicesPage.d.ts +4 -0
- package/dist/proserviceworld/pages/InvoicesPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/MattersPage.d.ts +4 -0
- package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/MattersPage.js +165 -150
- package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
- package/dist/proserviceworld/pages/PracticeAreasPage.d.ts +4 -0
- package/dist/proserviceworld/pages/PracticeAreasPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/TimePage.d.ts +4 -0
- package/dist/proserviceworld/pages/TimePage.d.ts.map +1 -0
- package/dist/proserviceworld/providers/ProServiceWorldProvider.d.ts +6 -0
- package/dist/proserviceworld/providers/ProServiceWorldProvider.d.ts.map +1 -0
- package/dist/proserviceworld/services/assistantApi.d.ts +74 -0
- package/dist/proserviceworld/services/assistantApi.d.ts.map +1 -0
- package/dist/proserviceworld/services/assistantApi.js +203 -0
- package/dist/proserviceworld/services/assistantApi.js.map +1 -0
- package/dist/proserviceworld/services/createSandboxAssistantTransport.d.ts +28 -0
- package/dist/proserviceworld/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/proserviceworld/services/createSandboxAssistantTransport.js +120 -0
- package/dist/proserviceworld/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/proserviceworld/types/index.d.ts +57 -0
- package/dist/proserviceworld/types/index.d.ts.map +1 -0
- package/dist/proserviceworld/utils/cn.d.ts +4 -0
- package/dist/proserviceworld/utils/cn.d.ts.map +1 -0
- package/dist/proserviceworld/utils/nav.d.ts +6 -0
- package/dist/proserviceworld/utils/nav.d.ts.map +1 -0
- package/dist/proserviceworld/utils/navigation.d.ts +2 -0
- package/dist/proserviceworld/utils/navigation.d.ts.map +1 -0
- package/dist/proserviceworld/utils/pageContext.d.ts +12 -0
- package/dist/proserviceworld/utils/pageContext.d.ts.map +1 -0
- package/dist/proserviceworld/utils/pageContext.js +74 -0
- package/dist/proserviceworld/utils/pageContext.js.map +1 -0
- package/package.json +1 -1
|
@@ -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 @@
|
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
|
|
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
|
-
},
|
|
25
|
+
}, H = [
|
|
25
26
|
"DRAFT",
|
|
26
27
|
"INTERNAL_REVIEW",
|
|
27
28
|
"CLIENT_REVIEW",
|
|
28
29
|
"ACCEPTED",
|
|
29
30
|
"REJECTED"
|
|
30
|
-
],
|
|
31
|
-
let { id: e = "" } =
|
|
32
|
-
if (
|
|
33
|
-
if (
|
|
34
|
-
error:
|
|
35
|
-
onRetry: () => void
|
|
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 (!
|
|
38
|
-
let
|
|
39
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
47
|
+
children: [/* @__PURE__ */ R(O, { className: "h-4 w-4" }), " Back to engagements"]
|
|
47
48
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
title:
|
|
50
|
-
subtitle:
|
|
51
|
-
actions: /* @__PURE__ */
|
|
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
|
-
|
|
54
|
-
tone:
|
|
55
|
-
onClose: () =>
|
|
56
|
-
children:
|
|
54
|
+
J && /* @__PURE__ */ R(c, {
|
|
55
|
+
tone: J.tone,
|
|
56
|
+
onClose: () => Y(null),
|
|
57
|
+
children: J.text
|
|
57
58
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ z("div", {
|
|
59
60
|
className: "grid grid-cols-2 gap-3 lg:grid-cols-4",
|
|
60
61
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ R(p, {
|
|
62
63
|
label: "Fee",
|
|
63
|
-
value: C(
|
|
64
|
-
hint: w(
|
|
65
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
69
|
+
/* @__PURE__ */ R(p, {
|
|
69
70
|
label: "Deliverables",
|
|
70
|
-
value:
|
|
71
|
-
icon: /* @__PURE__ */
|
|
71
|
+
value: a.deliverables.length,
|
|
72
|
+
icon: /* @__PURE__ */ R(N, { className: "h-4 w-4" }),
|
|
72
73
|
tone: "info"
|
|
73
74
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ R(p, {
|
|
75
76
|
label: "Milestones",
|
|
76
|
-
value:
|
|
77
|
-
icon: /* @__PURE__ */
|
|
77
|
+
value: a.milestones.length,
|
|
78
|
+
icon: /* @__PURE__ */ R(P, { className: "h-4 w-4" }),
|
|
78
79
|
tone: "accent"
|
|
79
80
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ R(p, {
|
|
81
82
|
label: "Time logged",
|
|
82
|
-
value: S(
|
|
83
|
-
hint: `${
|
|
84
|
-
icon: /* @__PURE__ */
|
|
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
|
-
|
|
90
|
+
X.length > 0 && /* @__PURE__ */ R(_, {
|
|
90
91
|
title: "Advance lifecycle",
|
|
91
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
94
|
+
children: [/* @__PURE__ */ z("div", {
|
|
94
95
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
96
|
-
}), /* @__PURE__ */
|
|
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:
|
|
99
|
+
children: X.map((e) => {
|
|
99
100
|
let t = e === "CANCELLED";
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ z(B, {
|
|
101
102
|
size: "sm",
|
|
102
103
|
variant: t ? "outline" : "default",
|
|
103
|
-
disabled:
|
|
104
|
-
onClick: () =>
|
|
105
|
-
id:
|
|
104
|
+
disabled: b.isPending,
|
|
105
|
+
onClick: () => b.mutate({
|
|
106
|
+
id: a.id,
|
|
106
107
|
status: e
|
|
107
108
|
}, {
|
|
108
|
-
onSuccess: () =>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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__ */
|
|
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__ */
|
|
129
|
+
/* @__PURE__ */ z("div", {
|
|
124
130
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ R(_, {
|
|
126
132
|
title: "Deliverables",
|
|
127
|
-
action: /* @__PURE__ */
|
|
133
|
+
action: /* @__PURE__ */ z(B, {
|
|
128
134
|
size: "sm",
|
|
129
135
|
variant: "outline",
|
|
130
|
-
onClick: () =>
|
|
131
|
-
children: [/* @__PURE__ */
|
|
136
|
+
onClick: () => L(!0),
|
|
137
|
+
children: [/* @__PURE__ */ R(F, { className: "mr-1.5 h-4 w-4" }), "Add"]
|
|
132
138
|
}),
|
|
133
|
-
children:
|
|
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__ */
|
|
137
|
-
}) : /* @__PURE__ */
|
|
142
|
+
icon: /* @__PURE__ */ R(N, { className: "h-7 w-7" })
|
|
143
|
+
}) : /* @__PURE__ */ R("ul", {
|
|
138
144
|
className: "space-y-2.5",
|
|
139
|
-
children:
|
|
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__ */
|
|
147
|
+
children: /* @__PURE__ */ z("div", {
|
|
142
148
|
className: "flex items-start justify-between gap-3",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
149
|
+
children: [/* @__PURE__ */ z("div", {
|
|
144
150
|
className: "min-w-0",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ z("div", {
|
|
146
152
|
className: "flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ R("span", {
|
|
148
154
|
className: "truncate",
|
|
149
155
|
children: e.name
|
|
150
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
164
|
+
}), /* @__PURE__ */ R(W, {
|
|
159
165
|
id: e.id,
|
|
160
|
-
engagementId:
|
|
166
|
+
engagementId: a.id,
|
|
161
167
|
status: e.status,
|
|
162
|
-
onDone: () => void
|
|
168
|
+
onDone: () => void h()
|
|
163
169
|
})]
|
|
164
170
|
})
|
|
165
171
|
}, e.id))
|
|
166
172
|
})
|
|
167
|
-
}), /* @__PURE__ */
|
|
173
|
+
}), /* @__PURE__ */ R(_, {
|
|
168
174
|
title: "Milestones",
|
|
169
|
-
action: /* @__PURE__ */
|
|
175
|
+
action: /* @__PURE__ */ z(B, {
|
|
170
176
|
size: "sm",
|
|
171
177
|
variant: "outline",
|
|
172
|
-
onClick: () =>
|
|
173
|
-
children: [/* @__PURE__ */
|
|
178
|
+
onClick: () => U(!0),
|
|
179
|
+
children: [/* @__PURE__ */ R(F, { className: "mr-1.5 h-4 w-4" }), "Add"]
|
|
174
180
|
}),
|
|
175
|
-
children:
|
|
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__ */
|
|
179
|
-
}) : /* @__PURE__ */
|
|
184
|
+
icon: /* @__PURE__ */ R(P, { className: "h-7 w-7" })
|
|
185
|
+
}) : /* @__PURE__ */ R("ul", {
|
|
180
186
|
className: "space-y-2.5",
|
|
181
|
-
children:
|
|
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__ */
|
|
189
|
+
children: [/* @__PURE__ */ z("div", {
|
|
184
190
|
className: "min-w-0",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ R("div", {
|
|
186
192
|
className: "truncate text-sm font-medium text-text-primary",
|
|
187
193
|
children: e.name
|
|
188
|
-
}), /* @__PURE__ */
|
|
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,
|
|
197
|
+
e.triggersInvoice ? `Bills ${C(e.triggerAmount, a.currency)} · ` : "",
|
|
192
198
|
"Due ",
|
|
193
199
|
x(e.dueDate)
|
|
194
200
|
]
|
|
195
201
|
})]
|
|
196
|
-
}), /* @__PURE__ */
|
|
202
|
+
}), /* @__PURE__ */ z("div", {
|
|
197
203
|
className: "flex shrink-0 items-center gap-2",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ R(v, { status: e.status }), e.status !== "COMPLETED" && e.status !== "CANCELLED" && /* @__PURE__ */ R(G, {
|
|
199
205
|
id: e.id,
|
|
200
|
-
engagementId:
|
|
201
|
-
onDone: () => void
|
|
206
|
+
engagementId: a.id,
|
|
207
|
+
onDone: () => void h()
|
|
202
208
|
})]
|
|
203
209
|
})]
|
|
204
210
|
}, e.id))
|
|
205
211
|
})
|
|
206
212
|
})]
|
|
207
213
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ z("div", {
|
|
209
215
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ R("div", {
|
|
211
217
|
className: "lg:col-span-2",
|
|
212
|
-
children: /* @__PURE__ */
|
|
218
|
+
children: /* @__PURE__ */ R(T, {
|
|
213
219
|
entityType: "proserviceworld-engagement",
|
|
214
|
-
entityId:
|
|
220
|
+
entityId: a.id
|
|
215
221
|
})
|
|
216
|
-
}), /* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ R(_, {
|
|
217
223
|
title: "Time logged",
|
|
218
|
-
description: S(
|
|
219
|
-
action: /* @__PURE__ */
|
|
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__ */
|
|
229
|
+
children: [/* @__PURE__ */ R(j, { className: "mr-1.5 h-4 w-4" }), "Log time"]
|
|
224
230
|
}),
|
|
225
|
-
children:
|
|
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__ */
|
|
229
|
-
}) : /* @__PURE__ */
|
|
234
|
+
icon: /* @__PURE__ */ R(j, { className: "h-7 w-7" })
|
|
235
|
+
}) : /* @__PURE__ */ R("ul", {
|
|
230
236
|
className: "space-y-2",
|
|
231
|
-
children:
|
|
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__ */
|
|
239
|
+
children: [/* @__PURE__ */ z("div", {
|
|
234
240
|
className: "flex items-center justify-between gap-2",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ R("span", {
|
|
236
242
|
className: "whitespace-nowrap text-xs text-text-tertiary",
|
|
237
243
|
children: x(e.date)
|
|
238
|
-
}), /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ z("span", {
|
|
239
245
|
className: "flex items-center gap-2",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ R("span", {
|
|
241
247
|
className: "font-medium text-text-primary",
|
|
242
248
|
children: S(e.minutes)
|
|
243
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ R(v, { status: e.status })]
|
|
244
250
|
})]
|
|
245
|
-
}), /* @__PURE__ */
|
|
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
|
-
|
|
254
|
-
engagementId:
|
|
255
|
-
onClose: () =>
|
|
259
|
+
A && /* @__PURE__ */ R(K, {
|
|
260
|
+
engagementId: a.id,
|
|
261
|
+
onClose: () => L(!1),
|
|
256
262
|
onDone: () => {
|
|
257
|
-
|
|
263
|
+
h(), Y({
|
|
258
264
|
tone: "success",
|
|
259
265
|
text: "Deliverable added."
|
|
260
266
|
});
|
|
261
267
|
}
|
|
262
268
|
}),
|
|
263
|
-
|
|
264
|
-
engagementId:
|
|
265
|
-
onClose: () =>
|
|
269
|
+
H && /* @__PURE__ */ R(q, {
|
|
270
|
+
engagementId: a.id,
|
|
271
|
+
onClose: () => U(!1),
|
|
266
272
|
onDone: () => {
|
|
267
|
-
|
|
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
|
-
},
|
|
281
|
+
}, W = ({ id: e, engagementId: t, status: n, onDone: r }) => {
|
|
276
282
|
let i = a();
|
|
277
|
-
return /* @__PURE__ */
|
|
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:
|
|
292
|
+
children: H.map((e) => /* @__PURE__ */ R("option", {
|
|
287
293
|
value: e,
|
|
288
294
|
children: w(e)
|
|
289
295
|
}, e))
|
|
290
296
|
});
|
|
291
|
-
},
|
|
297
|
+
}, G = ({ id: t, engagementId: n, onDone: r }) => {
|
|
292
298
|
let i = e();
|
|
293
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
308
|
+
children: /* @__PURE__ */ R(A, { className: "h-4 w-4" })
|
|
303
309
|
});
|
|
304
|
-
},
|
|
305
|
-
let i = t(), [a, o] =
|
|
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] =
|
|
316
|
+
}), [s, l] = D(null), u = (e) => (t) => o((n) => ({
|
|
311
317
|
...n,
|
|
312
318
|
[e]: t.target.value
|
|
313
319
|
}));
|
|
314
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ R(m, {
|
|
315
321
|
open: !0,
|
|
316
322
|
onClose: n,
|
|
317
323
|
title: "Add deliverable",
|
|
318
|
-
footer: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
348
|
+
children: /* @__PURE__ */ z("div", {
|
|
343
349
|
className: "space-y-3",
|
|
344
350
|
children: [
|
|
345
|
-
s && /* @__PURE__ */
|
|
351
|
+
s && /* @__PURE__ */ R(c, {
|
|
346
352
|
tone: "danger",
|
|
347
353
|
children: s
|
|
348
354
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ R(d, {
|
|
350
356
|
label: "Name",
|
|
351
357
|
required: !0,
|
|
352
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
364
|
+
/* @__PURE__ */ R(d, {
|
|
359
365
|
label: "Due date",
|
|
360
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
372
|
+
/* @__PURE__ */ R(d, {
|
|
367
373
|
label: "Acceptance criteria",
|
|
368
|
-
children: /* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ R(y, {
|
|
369
375
|
value: a.acceptanceCriteria,
|
|
370
376
|
onChange: u("acceptanceCriteria")
|
|
371
377
|
})
|
|
372
378
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ R(d, {
|
|
374
380
|
label: "Description",
|
|
375
|
-
children: /* @__PURE__ */
|
|
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
|
-
},
|
|
384
|
-
let i = n(), [a, o] =
|
|
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] =
|
|
390
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
424
|
+
children: /* @__PURE__ */ z("div", {
|
|
419
425
|
className: "space-y-3",
|
|
420
426
|
children: [
|
|
421
|
-
s && /* @__PURE__ */
|
|
427
|
+
s && /* @__PURE__ */ R(c, {
|
|
422
428
|
tone: "danger",
|
|
423
429
|
children: s
|
|
424
430
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ R(d, {
|
|
426
432
|
label: "Name",
|
|
427
433
|
required: !0,
|
|
428
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
443
|
+
/* @__PURE__ */ R(d, {
|
|
438
444
|
label: "Due date",
|
|
439
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
467
|
+
/* @__PURE__ */ z("label", {
|
|
462
468
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
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 {
|
|
483
|
+
export { U as EngagementDetailPage };
|
|
478
484
|
|
|
479
485
|
//# sourceMappingURL=EngagementDetailPage.js.map
|