@acorex-platform/module-software-management-client 1.0.2 → 2.0.0-beta.0
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/fesm2022/{acorex-platform-module-software-management-client-accept-software-suggestion.command-DVcM5TTv.mjs → acorex-platform-module-software-management-client-accept-software-suggestion.command-BzPDjIw0.mjs} +7 -6
- package/fesm2022/acorex-platform-module-software-management-client-accept-software-suggestion.command-BzPDjIw0.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-behavior-specification.commands-4rkD2uP9.mjs +212 -0
- package/fesm2022/acorex-platform-module-software-management-client-behavior-specification.commands-4rkD2uP9.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-behavior-task.activities-WmCC3-3L.mjs +79 -0
- package/fesm2022/acorex-platform-module-software-management-client-behavior-task.activities-WmCC3-3L.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-complete-software-phase.activity-C61GUc78.mjs +512 -0
- package/fesm2022/acorex-platform-module-software-management-client-complete-software-phase.activity-C61GUc78.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-acceptance-criterion.entity-CHEusZ4z.mjs +62 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-acceptance-criterion.entity-CHEusZ4z.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-business-rule.entity-Cew1yY4A.mjs +76 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-business-rule.entity-Cew1yY4A.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-design-decision.entity-BDRnAUj9.mjs +94 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-design-decision.entity-BDRnAUj9.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-discovery-item.entity-Ah5hlc5n.mjs +71 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-discovery-item.entity-Ah5hlc5n.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-feature.entity-D9es0yAv.mjs +49 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-feature.entity-D9es0yAv.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-module.entity-E9XKlo1v.mjs +26 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-module.entity-E9XKlo1v.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-requirement.entity-DKr-En_J.mjs +86 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-requirement.entity-DKr-En_J.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-scope-item.entity-D25tkUvi.mjs +73 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-scope-item.entity-D25tkUvi.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-software-entity.util-sRHl21Jh.mjs +281 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-software-entity.util-sRHl21Jh.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-software.entity-DfeM7KfF.mjs +751 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-software.entity-DfeM7KfF.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-use-case.entity-dPBFz-xN.mjs +92 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-use-case.entity-dPBFz-xN.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts.mjs +2709 -156
- package/fesm2022/acorex-platform-module-software-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-software-management-client-delivery-plan.commands-ccrjppbE.mjs +212 -0
- package/fesm2022/acorex-platform-module-software-management-client-delivery-plan.commands-ccrjppbE.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-delivery-task.activities-L955X3RX.mjs +216 -0
- package/fesm2022/acorex-platform-module-software-management-client-delivery-task.activities-L955X3RX.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-design-document.commands-BDE3x0KG.mjs +212 -0
- package/fesm2022/acorex-platform-module-software-management-client-design-document.commands-BDE3x0KG.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-design-task.activities-Cra2LNal.mjs +79 -0
- package/fesm2022/acorex-platform-module-software-management-client-design-task.activities-Cra2LNal.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-software-management-client-discovery-kickoff.commands-gB0_htfF.mjs → acorex-platform-module-software-management-client-discovery-kickoff.commands-BZxzDJs9.mjs} +4 -2
- package/fesm2022/{acorex-platform-module-software-management-client-discovery-kickoff.commands-gB0_htfF.mjs.map → acorex-platform-module-software-management-client-discovery-kickoff.commands-BZxzDJs9.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-discovery-report.commands-D2ricLpq.mjs → acorex-platform-module-software-management-client-discovery-report.commands-C9GKrnHs.mjs} +3 -2
- package/fesm2022/acorex-platform-module-software-management-client-discovery-report.commands-C9GKrnHs.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-discovery-task.activities-PIJEUza7.mjs +228 -0
- package/fesm2022/acorex-platform-module-software-management-client-discovery-task.activities-PIJEUza7.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-software-management-client-introduction-exit-message.util-DShFM8MY.mjs → acorex-platform-module-software-management-client-introduction-exit-message.util-cYtN92HY.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-introduction-exit-message.util-DShFM8MY.mjs.map → acorex-platform-module-software-management-client-introduction-exit-message.util-cYtN92HY.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-introduction-task.activities-BOsJbeJe.mjs → acorex-platform-module-software-management-client-introduction-task.activities-DQPpsJaH.mjs} +78 -3
- package/fesm2022/acorex-platform-module-software-management-client-introduction-task.activities-DQPpsJaH.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-scope-document.commands-oLGsbLoA.mjs +212 -0
- package/fesm2022/acorex-platform-module-software-management-client-scope-document.commands-oLGsbLoA.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-scope-task.activities-BCSPq0eO.mjs +79 -0
- package/fesm2022/acorex-platform-module-software-management-client-scope-task.activities-BCSPq0eO.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-software-management-client-software-command.util-BsoKQCX5.mjs → acorex-platform-module-software-management-client-software-command.util-CvlYk7tC.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-software-command.util-BsoKQCX5.mjs.map → acorex-platform-module-software-management-client-software-command.util-CvlYk7tC.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-start-software-definition-flow.command-B0YCgv2V.mjs → acorex-platform-module-software-management-client-start-software-definition-flow.command-BfxtMIGb.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-software-management-client-start-software-definition-flow.command-B0YCgv2V.mjs.map → acorex-platform-module-software-management-client-start-software-definition-flow.command-BfxtMIGb.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-software-management-client.mjs +400 -32
- package/fesm2022/acorex-platform-module-software-management-client.mjs.map +1 -1
- package/i18n/en-AU/software-management.json +473 -24
- package/i18n/en-US/software-management.json +473 -24
- package/i18n/fa-IR/software-management.json +474 -25
- package/package.json +1 -1
- package/types/acorex-platform-module-software-management-client-contracts.d.ts +640 -11
- package/fesm2022/acorex-platform-module-software-management-client-accept-software-suggestion.command-DVcM5TTv.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-software-management-client-complete-software-phase.activity-C56HhK20.mjs +0 -182
- package/fesm2022/acorex-platform-module-software-management-client-complete-software-phase.activity-C56HhK20.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-software-management-client-discovery-report.commands-D2ricLpq.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-software-management-client-introduction-task.activities-BOsJbeJe.mjs.map +0 -1
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
2
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
3
|
+
import { resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';
|
|
4
|
+
import { RootConfig, canCompletePhase, completePhaseWorkflowOutcome, kickoffText, nextSoftwarePhase, kickoffPlainTextFromVersion, discoveryKickoffFingerprint, discoveryReportFingerprint, resolveDiscoveryEvidenceFromLookup, scopeDocumentFingerprint, behaviorDocumentFingerprint, designDocumentFingerprint, deliveryPlanFingerprint } from '@acorex-platform/module-software-management-client/contracts';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { inject, Injectable } from '@angular/core';
|
|
7
|
+
import { r as resolveSoftwareText } from './acorex-platform-module-software-management-client-software-command.util-CvlYk7tC.mjs';
|
|
8
|
+
import { l as loadIntroductionKickoffCheck, t as translateIntroductionExit } from './acorex-platform-module-software-management-client-introduction-exit-message.util-cYtN92HY.mjs';
|
|
9
|
+
|
|
10
|
+
//#region ---- Imports ----
|
|
11
|
+
//#endregion
|
|
12
|
+
class CompleteSoftwarePhaseActivity {
|
|
13
|
+
constructor() {
|
|
14
|
+
//#region ---- Services & Dependencies ----
|
|
15
|
+
this.entityService = inject(AXPEntityService);
|
|
16
|
+
this.i18n = inject(AXTranslationService);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region ---- Command Implementation ----
|
|
20
|
+
async execute(input) {
|
|
21
|
+
const softwareId = await this.resolveSoftwareId(input);
|
|
22
|
+
if (!softwareId) {
|
|
23
|
+
return {
|
|
24
|
+
success: false,
|
|
25
|
+
message: { text: 'softwareId is required' },
|
|
26
|
+
metadata: { outcome: 'Failed' },
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const software = (await this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.software.name).data().byKey(softwareId));
|
|
30
|
+
if (!software) {
|
|
31
|
+
return {
|
|
32
|
+
success: false,
|
|
33
|
+
message: { text: 'Software not found' },
|
|
34
|
+
metadata: { outcome: 'NotFound' },
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const phase = (resolveSoftwareText(input?.phase) || resolveSoftwareText(software.currentPhase) || 'introduction');
|
|
38
|
+
const kickoff = await loadIntroductionKickoffCheck(this.entityService, software);
|
|
39
|
+
const discovery = phase === 'discovery' ||
|
|
40
|
+
phase === 'first-version-scope' ||
|
|
41
|
+
phase === 'behavior-specification' ||
|
|
42
|
+
phase === 'design' ||
|
|
43
|
+
phase === 'delivery-planning'
|
|
44
|
+
? await this.loadDiscoveryCheck(software, kickoff)
|
|
45
|
+
: undefined;
|
|
46
|
+
const scope = phase === 'first-version-scope' ||
|
|
47
|
+
phase === 'behavior-specification' ||
|
|
48
|
+
phase === 'design' ||
|
|
49
|
+
phase === 'delivery-planning'
|
|
50
|
+
? await this.loadScopeCheck(software, kickoff, discovery)
|
|
51
|
+
: undefined;
|
|
52
|
+
const behavior = phase === 'behavior-specification' || phase === 'design' || phase === 'delivery-planning'
|
|
53
|
+
? await this.loadBehaviorCheck(software, kickoff, discovery, scope)
|
|
54
|
+
: undefined;
|
|
55
|
+
const design = phase === 'design' || phase === 'delivery-planning'
|
|
56
|
+
? await this.loadDesignCheck(software, kickoff, discovery, scope, behavior)
|
|
57
|
+
: undefined;
|
|
58
|
+
const delivery = phase === 'delivery-planning' ? await this.loadDeliveryCheck(software, kickoff, discovery, scope, behavior, design) : undefined;
|
|
59
|
+
const gate = canCompletePhase(phase, software, kickoff, discovery, scope, behavior, design, delivery);
|
|
60
|
+
if (!gate.ok) {
|
|
61
|
+
const text = phase === 'introduction'
|
|
62
|
+
? await translateIntroductionExit(this.i18n, gate)
|
|
63
|
+
: gate.message.startsWith('@')
|
|
64
|
+
? await this.i18n.translateAsync(gate.message)
|
|
65
|
+
: gate.message;
|
|
66
|
+
return {
|
|
67
|
+
success: false,
|
|
68
|
+
message: { text, type: 'warning' },
|
|
69
|
+
metadata: { outcome: 'Failed', currentPhase: software.currentPhase },
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const alreadyAdvanced = phase === 'introduction' ? Boolean(software.introductionCompletedAt) && software.currentPhase !== 'introduction' : software.currentPhase !== phase;
|
|
73
|
+
if (alreadyAdvanced) {
|
|
74
|
+
return {
|
|
75
|
+
success: true,
|
|
76
|
+
kind: 'object',
|
|
77
|
+
data: { valid: true, currentPhase: software.currentPhase },
|
|
78
|
+
metadata: { outcome: 'Done' },
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if (phase === 'discovery' && gate.advance === false) {
|
|
82
|
+
const outcome = completePhaseWorkflowOutcome(phase, gate, software.discoveryDecision);
|
|
83
|
+
return {
|
|
84
|
+
success: true,
|
|
85
|
+
kind: 'object',
|
|
86
|
+
data: { valid: true, currentPhase: software.currentPhase },
|
|
87
|
+
message: { text: gate.message },
|
|
88
|
+
metadata: { outcome },
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
if ((phase === 'first-version-scope' || phase === 'behavior-specification' || phase === 'design' || phase === 'delivery-planning') && gate.advance === false) {
|
|
92
|
+
return {
|
|
93
|
+
success: false,
|
|
94
|
+
message: { text: gate.message, type: 'warning' },
|
|
95
|
+
metadata: { outcome: 'Failed', currentPhase: software.currentPhase },
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
if (phase === 'delivery-planning' && kickoffText(software.definitionCompletedAt)) {
|
|
99
|
+
return {
|
|
100
|
+
success: true,
|
|
101
|
+
kind: 'object',
|
|
102
|
+
data: { valid: true, currentPhase: software.currentPhase },
|
|
103
|
+
metadata: { outcome: 'Done' },
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const nextPhase = nextSoftwarePhase(phase);
|
|
107
|
+
const now = new Date().toISOString();
|
|
108
|
+
const patch = {
|
|
109
|
+
currentPhase: nextPhase ?? phase,
|
|
110
|
+
};
|
|
111
|
+
if (phase === 'introduction') {
|
|
112
|
+
patch['introductionCompletedAt'] = now;
|
|
113
|
+
}
|
|
114
|
+
if (!nextPhase) {
|
|
115
|
+
patch['definitionCompletedAt'] = software.definitionCompletedAt || now;
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
await this.entityService
|
|
119
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.software.name)
|
|
120
|
+
.data()
|
|
121
|
+
.update(softwareId, patch);
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
const raw = error instanceof Error ? error.message : gate.message;
|
|
125
|
+
const text = raw.startsWith('@') ? await this.i18n.translateAsync(raw) : raw;
|
|
126
|
+
return {
|
|
127
|
+
success: false,
|
|
128
|
+
message: { text: text || gate.message, type: 'warning' },
|
|
129
|
+
metadata: { outcome: 'Failed', currentPhase: software.currentPhase },
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
success: true,
|
|
134
|
+
kind: 'object',
|
|
135
|
+
data: { valid: true, currentPhase: String(patch['currentPhase']) },
|
|
136
|
+
metadata: { outcome: 'Done' },
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region ---- Helpers ----
|
|
141
|
+
async resolveSoftwareId(input) {
|
|
142
|
+
const fromInput = resolveSoftwareText(input?.softwareId);
|
|
143
|
+
if (fromInput) {
|
|
144
|
+
return fromInput;
|
|
145
|
+
}
|
|
146
|
+
const resolved = resolveEntityActionRef(input);
|
|
147
|
+
return resolveSoftwareText(resolved?.refId);
|
|
148
|
+
}
|
|
149
|
+
async loadDiscoveryCheck(software, kickoff) {
|
|
150
|
+
const kickoffVersionId = kickoffText(software.kickoffApprovedVersionId);
|
|
151
|
+
let kickoffPlainText = '';
|
|
152
|
+
if (kickoffVersionId) {
|
|
153
|
+
try {
|
|
154
|
+
const version = (await this.entityService.withEntity('DocumentManagement', 'DocumentVersion').data().byKey(kickoffVersionId));
|
|
155
|
+
kickoffPlainText = kickoffPlainTextFromVersion(version);
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
kickoffPlainText = '';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
let findings = [];
|
|
162
|
+
try {
|
|
163
|
+
const page = await this.entityService
|
|
164
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.discoveryItem.name)
|
|
165
|
+
.data()
|
|
166
|
+
.query({
|
|
167
|
+
skip: 0,
|
|
168
|
+
take: 500,
|
|
169
|
+
filter: { field: 'softwareId', operator: { type: 'equal' }, value: software.id },
|
|
170
|
+
});
|
|
171
|
+
findings = (page.items ?? []);
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
findings = [];
|
|
175
|
+
}
|
|
176
|
+
const documentId = kickoffText(software.discoveryReportDocumentId);
|
|
177
|
+
let statusId = '';
|
|
178
|
+
let hostVersionId = '';
|
|
179
|
+
if (documentId) {
|
|
180
|
+
try {
|
|
181
|
+
const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId));
|
|
182
|
+
statusId = kickoffText(document?.statusId);
|
|
183
|
+
hostVersionId = kickoffText(document?.versionId);
|
|
184
|
+
}
|
|
185
|
+
catch {
|
|
186
|
+
statusId = '';
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const evidence = await this.loadDiscoveryEvidence(kickoffText(software.id), findings);
|
|
190
|
+
return {
|
|
191
|
+
currentPhase: software.currentPhase,
|
|
192
|
+
decision: software.discoveryDecision,
|
|
193
|
+
rationale: software.discoveryRationale,
|
|
194
|
+
kickoffApprovedVersionId: kickoffVersionId,
|
|
195
|
+
findings,
|
|
196
|
+
statusId,
|
|
197
|
+
hostVersionId,
|
|
198
|
+
approvedVersionId: software.discoveryApprovedVersionId,
|
|
199
|
+
approvedFingerprint: software.discoveryApprovedFingerprint,
|
|
200
|
+
reportFingerprint: discoveryReportFingerprint({
|
|
201
|
+
kickoffVersionId,
|
|
202
|
+
kickoffPlainText,
|
|
203
|
+
decision: kickoffText(software.discoveryDecision),
|
|
204
|
+
rationale: kickoffText(software.discoveryRationale),
|
|
205
|
+
findings,
|
|
206
|
+
}),
|
|
207
|
+
evidence,
|
|
208
|
+
kickoffStatusId: kickoff?.statusId ?? '',
|
|
209
|
+
kickoffHostVersionId: kickoff?.hostVersionId ?? '',
|
|
210
|
+
kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,
|
|
211
|
+
currentKickoffFingerprint: discoveryKickoffFingerprint(software),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
async loadDiscoveryEvidence(softwareId, findings) {
|
|
215
|
+
if (!softwareId) {
|
|
216
|
+
return { questionnaireCaseIds: [], questionnaireSessionIds: [], documentIds: [] };
|
|
217
|
+
}
|
|
218
|
+
return resolveDiscoveryEvidenceFromLookup(softwareId, findings, {
|
|
219
|
+
getCase: (id) => this.loadEntityById('AssessmentManagement', 'AssessmentCase', id),
|
|
220
|
+
getSession: (id) => this.loadEntityById('AssessmentManagement', 'AssessmentSession', id),
|
|
221
|
+
listSessionsForCase: async (caseId) => {
|
|
222
|
+
try {
|
|
223
|
+
const page = await this.entityService.withEntity('AssessmentManagement', 'AssessmentSession').data().query({
|
|
224
|
+
skip: 0,
|
|
225
|
+
take: 200,
|
|
226
|
+
filter: { field: 'caseId', operator: { type: 'equal' }, value: caseId },
|
|
227
|
+
});
|
|
228
|
+
return page.items ?? [];
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
return [];
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
getDocument: (id) => this.loadEntityById('DocumentManagement', 'Document', id),
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
async loadEntityById(module, entity, id) {
|
|
238
|
+
if (!id) {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
return await this.entityService.withEntity(module, entity).data().byKey(id);
|
|
243
|
+
}
|
|
244
|
+
catch {
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
async loadScopeCheck(software, kickoff, discovery) {
|
|
249
|
+
let items = [];
|
|
250
|
+
try {
|
|
251
|
+
const page = await this.entityService
|
|
252
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.scopeItem.name)
|
|
253
|
+
.data()
|
|
254
|
+
.query({
|
|
255
|
+
skip: 0,
|
|
256
|
+
take: 500,
|
|
257
|
+
filter: { field: 'softwareId', operator: { type: 'equal' }, value: software.id },
|
|
258
|
+
});
|
|
259
|
+
items = (page.items ?? []);
|
|
260
|
+
}
|
|
261
|
+
catch {
|
|
262
|
+
items = [];
|
|
263
|
+
}
|
|
264
|
+
const documentId = kickoffText(software.scopeDocumentId);
|
|
265
|
+
let statusId = '';
|
|
266
|
+
let hostVersionId = '';
|
|
267
|
+
if (documentId) {
|
|
268
|
+
try {
|
|
269
|
+
const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId));
|
|
270
|
+
statusId = kickoffText(document?.statusId);
|
|
271
|
+
hostVersionId = kickoffText(document?.versionId);
|
|
272
|
+
}
|
|
273
|
+
catch {
|
|
274
|
+
statusId = '';
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
const discoveryVersionId = kickoffText(software.discoveryApprovedVersionId);
|
|
278
|
+
return {
|
|
279
|
+
currentPhase: software.currentPhase,
|
|
280
|
+
discoveryApprovedVersionId: discoveryVersionId,
|
|
281
|
+
discoveryApprovedFingerprint: software.discoveryApprovedFingerprint,
|
|
282
|
+
items,
|
|
283
|
+
statusId,
|
|
284
|
+
hostVersionId,
|
|
285
|
+
approvedVersionId: software.scopeApprovedVersionId,
|
|
286
|
+
approvedFingerprint: software.scopeApprovedFingerprint,
|
|
287
|
+
reportFingerprint: scopeDocumentFingerprint({
|
|
288
|
+
discoveryVersionId,
|
|
289
|
+
discoveryFingerprint: kickoffText(software.discoveryApprovedFingerprint),
|
|
290
|
+
discoveryPlainText: '',
|
|
291
|
+
items,
|
|
292
|
+
}),
|
|
293
|
+
currentDiscoveryFingerprint: discovery?.reportFingerprint,
|
|
294
|
+
discoveryStatusId: discovery?.statusId ?? '',
|
|
295
|
+
discoveryHostVersionId: discovery?.hostVersionId ?? '',
|
|
296
|
+
kickoffApprovedVersionId: software.kickoffApprovedVersionId,
|
|
297
|
+
kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,
|
|
298
|
+
currentKickoffFingerprint: discoveryKickoffFingerprint(software),
|
|
299
|
+
kickoffStatusId: kickoff?.statusId ?? '',
|
|
300
|
+
kickoffHostVersionId: kickoff?.hostVersionId ?? '',
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
async loadBehaviorCheck(software, kickoff, discovery, scope) {
|
|
304
|
+
const requirements = await this.loadLinked(RootConfig.entities.requirement.name, software.id);
|
|
305
|
+
const acceptanceCriteria = await this.loadLinked(RootConfig.entities.acceptanceCriterion.name, software.id);
|
|
306
|
+
const businessRules = await this.loadLinked(RootConfig.entities.businessRule.name, software.id);
|
|
307
|
+
const useCases = await this.loadLinked(RootConfig.entities.useCase.name, software.id);
|
|
308
|
+
const documentId = kickoffText(software.behaviorDocumentId);
|
|
309
|
+
let statusId = '';
|
|
310
|
+
let hostVersionId = '';
|
|
311
|
+
if (documentId) {
|
|
312
|
+
try {
|
|
313
|
+
const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId));
|
|
314
|
+
statusId = kickoffText(document?.statusId);
|
|
315
|
+
hostVersionId = kickoffText(document?.versionId);
|
|
316
|
+
}
|
|
317
|
+
catch {
|
|
318
|
+
statusId = '';
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
const scopeVersionId = kickoffText(software.scopeApprovedVersionId);
|
|
322
|
+
return {
|
|
323
|
+
currentPhase: software.currentPhase,
|
|
324
|
+
items: scope?.items ?? [],
|
|
325
|
+
requirements,
|
|
326
|
+
acceptanceCriteria,
|
|
327
|
+
businessRules,
|
|
328
|
+
useCases,
|
|
329
|
+
statusId,
|
|
330
|
+
hostVersionId,
|
|
331
|
+
approvedVersionId: software.behaviorApprovedVersionId,
|
|
332
|
+
approvedFingerprint: software.behaviorApprovedFingerprint,
|
|
333
|
+
reportFingerprint: behaviorDocumentFingerprint({
|
|
334
|
+
scopeVersionId,
|
|
335
|
+
scopeFingerprint: kickoffText(software.scopeApprovedFingerprint),
|
|
336
|
+
scopePlainText: '',
|
|
337
|
+
requirements,
|
|
338
|
+
acceptanceCriteria,
|
|
339
|
+
businessRules,
|
|
340
|
+
useCases,
|
|
341
|
+
}),
|
|
342
|
+
scopeApprovedVersionId: scopeVersionId,
|
|
343
|
+
scopeApprovedFingerprint: software.scopeApprovedFingerprint,
|
|
344
|
+
currentScopeFingerprint: scope?.reportFingerprint,
|
|
345
|
+
scopeStatusId: scope?.statusId ?? '',
|
|
346
|
+
scopeHostVersionId: scope?.hostVersionId ?? '',
|
|
347
|
+
discoveryApprovedVersionId: software.discoveryApprovedVersionId,
|
|
348
|
+
discoveryApprovedFingerprint: software.discoveryApprovedFingerprint,
|
|
349
|
+
currentDiscoveryFingerprint: discovery?.reportFingerprint,
|
|
350
|
+
discoveryStatusId: discovery?.statusId ?? '',
|
|
351
|
+
discoveryHostVersionId: discovery?.hostVersionId ?? '',
|
|
352
|
+
kickoffApprovedVersionId: software.kickoffApprovedVersionId,
|
|
353
|
+
kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,
|
|
354
|
+
currentKickoffFingerprint: discovery?.currentKickoffFingerprint,
|
|
355
|
+
kickoffStatusId: kickoff?.statusId ?? '',
|
|
356
|
+
kickoffHostVersionId: kickoff?.hostVersionId ?? '',
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
async loadDesignCheck(software, kickoff, discovery, scope, behavior) {
|
|
360
|
+
const decisions = await this.loadLinked(RootConfig.entities.designDecision.name, software.id);
|
|
361
|
+
const documentId = kickoffText(software.designDocumentId);
|
|
362
|
+
let statusId = '';
|
|
363
|
+
let hostVersionId = '';
|
|
364
|
+
if (documentId) {
|
|
365
|
+
try {
|
|
366
|
+
const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId));
|
|
367
|
+
statusId = kickoffText(document?.statusId);
|
|
368
|
+
hostVersionId = kickoffText(document?.versionId);
|
|
369
|
+
}
|
|
370
|
+
catch {
|
|
371
|
+
statusId = '';
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
const behaviorVersionId = kickoffText(software.behaviorApprovedVersionId);
|
|
375
|
+
return {
|
|
376
|
+
currentPhase: software.currentPhase,
|
|
377
|
+
decisions,
|
|
378
|
+
requirements: behavior?.requirements ?? [],
|
|
379
|
+
statusId,
|
|
380
|
+
hostVersionId,
|
|
381
|
+
approvedVersionId: software.designApprovedVersionId,
|
|
382
|
+
approvedFingerprint: software.designApprovedFingerprint,
|
|
383
|
+
reportFingerprint: designDocumentFingerprint({
|
|
384
|
+
behaviorVersionId,
|
|
385
|
+
behaviorFingerprint: kickoffText(software.behaviorApprovedFingerprint),
|
|
386
|
+
behaviorPlainText: '',
|
|
387
|
+
decisions,
|
|
388
|
+
}),
|
|
389
|
+
behaviorApprovedVersionId: behaviorVersionId,
|
|
390
|
+
behaviorApprovedFingerprint: software.behaviorApprovedFingerprint,
|
|
391
|
+
currentBehaviorFingerprint: behavior?.reportFingerprint,
|
|
392
|
+
behaviorStatusId: behavior?.statusId ?? '',
|
|
393
|
+
behaviorHostVersionId: behavior?.hostVersionId ?? '',
|
|
394
|
+
scopeApprovedVersionId: software.scopeApprovedVersionId,
|
|
395
|
+
scopeApprovedFingerprint: software.scopeApprovedFingerprint,
|
|
396
|
+
currentScopeFingerprint: scope?.reportFingerprint,
|
|
397
|
+
scopeStatusId: scope?.statusId ?? '',
|
|
398
|
+
scopeHostVersionId: scope?.hostVersionId ?? '',
|
|
399
|
+
discoveryApprovedVersionId: software.discoveryApprovedVersionId,
|
|
400
|
+
discoveryApprovedFingerprint: software.discoveryApprovedFingerprint,
|
|
401
|
+
currentDiscoveryFingerprint: discovery?.reportFingerprint,
|
|
402
|
+
discoveryStatusId: discovery?.statusId ?? '',
|
|
403
|
+
discoveryHostVersionId: discovery?.hostVersionId ?? '',
|
|
404
|
+
kickoffApprovedVersionId: software.kickoffApprovedVersionId,
|
|
405
|
+
kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,
|
|
406
|
+
currentKickoffFingerprint: discovery?.currentKickoffFingerprint,
|
|
407
|
+
kickoffStatusId: kickoff?.statusId ?? '',
|
|
408
|
+
kickoffHostVersionId: kickoff?.hostVersionId ?? '',
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
async loadDeliveryCheck(software, kickoff, discovery, scope, behavior, design) {
|
|
412
|
+
const documentId = kickoffText(software.deliveryDocumentId);
|
|
413
|
+
let statusId = '';
|
|
414
|
+
let hostVersionId = '';
|
|
415
|
+
if (documentId) {
|
|
416
|
+
try {
|
|
417
|
+
const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId));
|
|
418
|
+
statusId = kickoffText(document?.statusId);
|
|
419
|
+
hostVersionId = kickoffText(document?.versionId);
|
|
420
|
+
}
|
|
421
|
+
catch {
|
|
422
|
+
statusId = '';
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
const designVersionId = kickoffText(software.designApprovedVersionId);
|
|
426
|
+
return {
|
|
427
|
+
currentPhase: software.currentPhase,
|
|
428
|
+
definitionCompletedAt: software.definitionCompletedAt,
|
|
429
|
+
workPackages: software.deliveryWorkPackages,
|
|
430
|
+
milestones: software.deliveryMilestones,
|
|
431
|
+
estimateAssumptions: software.deliveryEstimateAssumptions,
|
|
432
|
+
verificationCriteria: software.deliveryVerificationCriteria,
|
|
433
|
+
releaseCriteria: software.deliveryReleaseCriteria,
|
|
434
|
+
risks: software.deliveryRisks,
|
|
435
|
+
tracedRequirementId: software.deliveryTracedRequirementId,
|
|
436
|
+
tracedDesignDecisionId: software.deliveryTracedDesignDecisionId,
|
|
437
|
+
requirements: behavior?.requirements ?? [],
|
|
438
|
+
decisions: design?.decisions ?? [],
|
|
439
|
+
statusId,
|
|
440
|
+
hostVersionId,
|
|
441
|
+
approvedVersionId: software.deliveryApprovedVersionId,
|
|
442
|
+
approvedFingerprint: software.deliveryApprovedFingerprint,
|
|
443
|
+
reportFingerprint: deliveryPlanFingerprint({
|
|
444
|
+
designVersionId,
|
|
445
|
+
designFingerprint: kickoffText(software.designApprovedFingerprint),
|
|
446
|
+
designPlainText: '',
|
|
447
|
+
workPackages: software.deliveryWorkPackages,
|
|
448
|
+
milestones: software.deliveryMilestones,
|
|
449
|
+
estimateAssumptions: software.deliveryEstimateAssumptions,
|
|
450
|
+
verificationCriteria: software.deliveryVerificationCriteria,
|
|
451
|
+
releaseCriteria: software.deliveryReleaseCriteria,
|
|
452
|
+
risks: software.deliveryRisks,
|
|
453
|
+
tracedRequirementId: software.deliveryTracedRequirementId,
|
|
454
|
+
tracedDesignDecisionId: software.deliveryTracedDesignDecisionId,
|
|
455
|
+
projectId: software.projectId,
|
|
456
|
+
}),
|
|
457
|
+
designApprovedVersionId: designVersionId,
|
|
458
|
+
designApprovedFingerprint: software.designApprovedFingerprint,
|
|
459
|
+
currentDesignFingerprint: design?.reportFingerprint,
|
|
460
|
+
designStatusId: design?.statusId ?? '',
|
|
461
|
+
designHostVersionId: design?.hostVersionId ?? '',
|
|
462
|
+
behaviorApprovedVersionId: software.behaviorApprovedVersionId,
|
|
463
|
+
behaviorApprovedFingerprint: software.behaviorApprovedFingerprint,
|
|
464
|
+
currentBehaviorFingerprint: behavior?.reportFingerprint,
|
|
465
|
+
behaviorStatusId: behavior?.statusId ?? '',
|
|
466
|
+
behaviorHostVersionId: behavior?.hostVersionId ?? '',
|
|
467
|
+
scopeApprovedVersionId: software.scopeApprovedVersionId,
|
|
468
|
+
scopeApprovedFingerprint: software.scopeApprovedFingerprint,
|
|
469
|
+
currentScopeFingerprint: scope?.reportFingerprint,
|
|
470
|
+
scopeStatusId: scope?.statusId ?? '',
|
|
471
|
+
scopeHostVersionId: scope?.hostVersionId ?? '',
|
|
472
|
+
discoveryApprovedVersionId: software.discoveryApprovedVersionId,
|
|
473
|
+
discoveryApprovedFingerprint: software.discoveryApprovedFingerprint,
|
|
474
|
+
currentDiscoveryFingerprint: discovery?.reportFingerprint,
|
|
475
|
+
discoveryStatusId: discovery?.statusId ?? '',
|
|
476
|
+
discoveryHostVersionId: discovery?.hostVersionId ?? '',
|
|
477
|
+
kickoffApprovedVersionId: software.kickoffApprovedVersionId,
|
|
478
|
+
kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,
|
|
479
|
+
currentKickoffFingerprint: discovery?.currentKickoffFingerprint,
|
|
480
|
+
kickoffStatusId: kickoff?.statusId ?? '',
|
|
481
|
+
kickoffHostVersionId: kickoff?.hostVersionId ?? '',
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
async loadLinked(entity, softwareId) {
|
|
485
|
+
if (!softwareId) {
|
|
486
|
+
return [];
|
|
487
|
+
}
|
|
488
|
+
try {
|
|
489
|
+
const page = await this.entityService
|
|
490
|
+
.withEntity(RootConfig.module.name, entity)
|
|
491
|
+
.data()
|
|
492
|
+
.query({
|
|
493
|
+
skip: 0,
|
|
494
|
+
take: 500,
|
|
495
|
+
filter: { field: 'softwareId', operator: { type: 'equal' }, value: softwareId },
|
|
496
|
+
});
|
|
497
|
+
return (page.items ?? []);
|
|
498
|
+
}
|
|
499
|
+
catch {
|
|
500
|
+
return [];
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CompleteSoftwarePhaseActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
504
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CompleteSoftwarePhaseActivity, providedIn: 'root' }); }
|
|
505
|
+
}
|
|
506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CompleteSoftwarePhaseActivity, decorators: [{
|
|
507
|
+
type: Injectable,
|
|
508
|
+
args: [{ providedIn: 'root' }]
|
|
509
|
+
}] });
|
|
510
|
+
|
|
511
|
+
export { CompleteSoftwarePhaseActivity };
|
|
512
|
+
//# sourceMappingURL=acorex-platform-module-software-management-client-complete-software-phase.activity-C61GUc78.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-software-management-client-complete-software-phase.activity-C61GUc78.mjs","sources":["../../../../libs/modules/software-management/client/src/lib/workflows/activities/complete-software-phase.activity.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommand, resolveEntityActionRef, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n canCompletePhase,\n completePhaseWorkflowOutcome,\n discoveryKickoffFingerprint,\n discoveryReportFingerprint,\n behaviorDocumentFingerprint,\n designDocumentFingerprint,\n deliveryPlanFingerprint,\n kickoffPlainTextFromVersion,\n kickoffText,\n nextSoftwarePhase,\n resolveDiscoveryEvidenceFromLookup,\n RootConfig,\n scopeDocumentFingerprint,\n type AXMSoftwareManagementSoftwareEntityModel,\n type BehaviorAcceptanceCriterionRecord,\n type BehaviorBusinessRuleRecord,\n type BehaviorRequirementRecord,\n type BehaviorUseCaseRecord,\n type DesignDecisionRecord,\n type DiscoveryFindingRecord,\n type IntroductionKickoffCheck,\n type ScopeItemRecord,\n type SoftwarePhase,\n} from '@acorex-platform/module-software-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\nimport { resolveSoftwareText } from '../../commands/software-command.util';\nimport { loadIntroductionKickoffCheck } from './load-introduction-kickoff-check';\nimport { translateIntroductionExit } from './introduction-exit-message.util';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface CompleteSoftwarePhaseInput {\n softwareId?: string;\n phase?: SoftwarePhase;\n}\n\nexport interface CompleteSoftwarePhaseOutput {\n valid: boolean;\n currentPhase?: string;\n}\n\n//#endregion\n\n@Injectable({ providedIn: 'root' })\nexport class CompleteSoftwarePhaseActivity implements AXPCommand<CompleteSoftwarePhaseInput, CompleteSoftwarePhaseOutput> {\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly i18n = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(input: CompleteSoftwarePhaseInput): AXPCommandExecuteResultPromise<CompleteSoftwarePhaseOutput> {\n const softwareId = await this.resolveSoftwareId(input);\n if (!softwareId) {\n return {\n success: false,\n message: { text: 'softwareId is required' },\n metadata: { outcome: 'Failed' },\n };\n }\n\n const software = (await this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.software.name).data().byKey(softwareId)) as AXMSoftwareManagementSoftwareEntityModel | null;\n\n if (!software) {\n return {\n success: false,\n message: { text: 'Software not found' },\n metadata: { outcome: 'NotFound' },\n };\n }\n\n const phase = (resolveSoftwareText(input?.phase) || resolveSoftwareText(software.currentPhase) || 'introduction') as SoftwarePhase;\n\n const kickoff = await loadIntroductionKickoffCheck(this.entityService, software);\n const discovery =\n phase === 'discovery' ||\n phase === 'first-version-scope' ||\n phase === 'behavior-specification' ||\n phase === 'design' ||\n phase === 'delivery-planning'\n ? await this.loadDiscoveryCheck(software, kickoff)\n : undefined;\n const scope =\n phase === 'first-version-scope' ||\n phase === 'behavior-specification' ||\n phase === 'design' ||\n phase === 'delivery-planning'\n ? await this.loadScopeCheck(software, kickoff, discovery)\n : undefined;\n const behavior =\n phase === 'behavior-specification' || phase === 'design' || phase === 'delivery-planning'\n ? await this.loadBehaviorCheck(software, kickoff, discovery, scope)\n : undefined;\n const design =\n phase === 'design' || phase === 'delivery-planning'\n ? await this.loadDesignCheck(software, kickoff, discovery, scope, behavior)\n : undefined;\n const delivery =\n phase === 'delivery-planning' ? await this.loadDeliveryCheck(software, kickoff, discovery, scope, behavior, design) : undefined;\n const gate = canCompletePhase(phase, software, kickoff, discovery, scope, behavior, design, delivery);\n if (!gate.ok) {\n const text =\n phase === 'introduction'\n ? await translateIntroductionExit(this.i18n, gate)\n : gate.message.startsWith('@')\n ? await this.i18n.translateAsync(gate.message)\n : gate.message;\n return {\n success: false,\n message: { text, type: 'warning' },\n metadata: { outcome: 'Failed', currentPhase: software.currentPhase },\n };\n }\n\n const alreadyAdvanced = phase === 'introduction' ? Boolean(software.introductionCompletedAt) && software.currentPhase !== 'introduction' : software.currentPhase !== phase;\n\n if (alreadyAdvanced) {\n return {\n success: true,\n kind: 'object',\n data: { valid: true, currentPhase: software.currentPhase },\n metadata: { outcome: 'Done' },\n };\n }\n\n if (phase === 'discovery' && gate.advance === false) {\n const outcome = completePhaseWorkflowOutcome(phase, gate, software.discoveryDecision);\n return {\n success: true,\n kind: 'object',\n data: { valid: true, currentPhase: software.currentPhase },\n message: { text: gate.message },\n metadata: { outcome },\n };\n }\n\n if ((phase === 'first-version-scope' || phase === 'behavior-specification' || phase === 'design' || phase === 'delivery-planning') && gate.advance === false) {\n return {\n success: false,\n message: { text: gate.message, type: 'warning' },\n metadata: { outcome: 'Failed', currentPhase: software.currentPhase },\n };\n }\n\n if (phase === 'delivery-planning' && kickoffText(software.definitionCompletedAt)) {\n return {\n success: true,\n kind: 'object',\n data: { valid: true, currentPhase: software.currentPhase },\n metadata: { outcome: 'Done' },\n };\n }\n\n const nextPhase = nextSoftwarePhase(phase);\n const now = new Date().toISOString();\n const patch: Record<string, unknown> = {\n currentPhase: nextPhase ?? phase,\n };\n\n if (phase === 'introduction') {\n patch['introductionCompletedAt'] = now;\n }\n\n if (!nextPhase) {\n patch['definitionCompletedAt'] = software.definitionCompletedAt || now;\n }\n\n try {\n await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.software.name)\n .data()\n .update(softwareId, patch as never);\n } catch (error) {\n const raw = error instanceof Error ? error.message : gate.message;\n const text = raw.startsWith('@') ? await this.i18n.translateAsync(raw) : raw;\n return {\n success: false,\n message: { text: text || gate.message, type: 'warning' },\n metadata: { outcome: 'Failed', currentPhase: software.currentPhase },\n };\n }\n\n return {\n success: true,\n kind: 'object',\n data: { valid: true, currentPhase: String(patch['currentPhase']) },\n metadata: { outcome: 'Done' },\n };\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n private async resolveSoftwareId(input: CompleteSoftwarePhaseInput): Promise<string> {\n const fromInput = resolveSoftwareText(input?.softwareId);\n if (fromInput) {\n return fromInput;\n }\n\n const resolved = resolveEntityActionRef(input);\n return resolveSoftwareText(resolved?.refId);\n }\n\n private async loadDiscoveryCheck(\n software: AXMSoftwareManagementSoftwareEntityModel,\n kickoff: IntroductionKickoffCheck | null,\n ) {\n const kickoffVersionId = kickoffText(software.kickoffApprovedVersionId);\n let kickoffPlainText = '';\n if (kickoffVersionId) {\n try {\n const version = (await this.entityService.withEntity('DocumentManagement', 'DocumentVersion').data().byKey(kickoffVersionId)) as { metaDataForm?: unknown } | null;\n kickoffPlainText = kickoffPlainTextFromVersion(version);\n } catch {\n kickoffPlainText = '';\n }\n }\n\n let findings: DiscoveryFindingRecord[] = [];\n try {\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.discoveryItem.name)\n .data()\n .query({\n skip: 0,\n take: 500,\n filter: { field: 'softwareId', operator: { type: 'equal' }, value: software.id },\n });\n findings = (page.items ?? []) as DiscoveryFindingRecord[];\n } catch {\n findings = [];\n }\n\n const documentId = kickoffText(software.discoveryReportDocumentId);\n let statusId = '';\n let hostVersionId = '';\n if (documentId) {\n try {\n const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId)) as { statusId?: unknown; versionId?: unknown } | null;\n statusId = kickoffText(document?.statusId);\n hostVersionId = kickoffText(document?.versionId);\n } catch {\n statusId = '';\n }\n }\n\n const evidence = await this.loadDiscoveryEvidence(kickoffText(software.id), findings);\n\n return {\n currentPhase: software.currentPhase,\n decision: software.discoveryDecision,\n rationale: software.discoveryRationale,\n kickoffApprovedVersionId: kickoffVersionId,\n findings,\n statusId,\n hostVersionId,\n approvedVersionId: software.discoveryApprovedVersionId,\n approvedFingerprint: software.discoveryApprovedFingerprint,\n reportFingerprint: discoveryReportFingerprint({\n kickoffVersionId,\n kickoffPlainText,\n decision: kickoffText(software.discoveryDecision),\n rationale: kickoffText(software.discoveryRationale),\n findings,\n }),\n evidence,\n kickoffStatusId: kickoff?.statusId ?? '',\n kickoffHostVersionId: kickoff?.hostVersionId ?? '',\n kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,\n currentKickoffFingerprint: discoveryKickoffFingerprint(software),\n };\n }\n\n private async loadDiscoveryEvidence(softwareId: string, findings: DiscoveryFindingRecord[]) {\n if (!softwareId) {\n return { questionnaireCaseIds: [], questionnaireSessionIds: [], documentIds: [] };\n }\n return resolveDiscoveryEvidenceFromLookup(softwareId, findings, {\n getCase: (id) => this.loadEntityById('AssessmentManagement', 'AssessmentCase', id),\n getSession: (id) => this.loadEntityById('AssessmentManagement', 'AssessmentSession', id),\n listSessionsForCase: async (caseId) => {\n try {\n const page = await this.entityService.withEntity('AssessmentManagement', 'AssessmentSession').data().query({\n skip: 0,\n take: 200,\n filter: { field: 'caseId', operator: { type: 'equal' }, value: caseId },\n });\n return page.items ?? [];\n } catch {\n return [];\n }\n },\n getDocument: (id) => this.loadEntityById('DocumentManagement', 'Document', id),\n });\n }\n\n private async loadEntityById(module: string, entity: string, id: string): Promise<unknown> {\n if (!id) {\n return null;\n }\n try {\n return await this.entityService.withEntity(module, entity).data().byKey(id);\n } catch {\n return null;\n }\n }\n\n private async loadScopeCheck(\n software: AXMSoftwareManagementSoftwareEntityModel,\n kickoff: IntroductionKickoffCheck | null,\n discovery: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadDiscoveryCheck']>> | undefined,\n ) {\n let items: ScopeItemRecord[] = [];\n try {\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.scopeItem.name)\n .data()\n .query({\n skip: 0,\n take: 500,\n filter: { field: 'softwareId', operator: { type: 'equal' }, value: software.id },\n });\n items = (page.items ?? []) as ScopeItemRecord[];\n } catch {\n items = [];\n }\n\n const documentId = kickoffText(software.scopeDocumentId);\n let statusId = '';\n let hostVersionId = '';\n if (documentId) {\n try {\n const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId)) as { statusId?: unknown; versionId?: unknown } | null;\n statusId = kickoffText(document?.statusId);\n hostVersionId = kickoffText(document?.versionId);\n } catch {\n statusId = '';\n }\n }\n\n const discoveryVersionId = kickoffText(software.discoveryApprovedVersionId);\n return {\n currentPhase: software.currentPhase,\n discoveryApprovedVersionId: discoveryVersionId,\n discoveryApprovedFingerprint: software.discoveryApprovedFingerprint,\n items,\n statusId,\n hostVersionId,\n approvedVersionId: software.scopeApprovedVersionId,\n approvedFingerprint: software.scopeApprovedFingerprint,\n reportFingerprint: scopeDocumentFingerprint({\n discoveryVersionId,\n discoveryFingerprint: kickoffText(software.discoveryApprovedFingerprint),\n discoveryPlainText: '',\n items,\n }),\n currentDiscoveryFingerprint: discovery?.reportFingerprint,\n discoveryStatusId: discovery?.statusId ?? '',\n discoveryHostVersionId: discovery?.hostVersionId ?? '',\n kickoffApprovedVersionId: software.kickoffApprovedVersionId,\n kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,\n currentKickoffFingerprint: discoveryKickoffFingerprint(software),\n kickoffStatusId: kickoff?.statusId ?? '',\n kickoffHostVersionId: kickoff?.hostVersionId ?? '',\n };\n }\n\n private async loadBehaviorCheck(\n software: AXMSoftwareManagementSoftwareEntityModel,\n kickoff: IntroductionKickoffCheck | null,\n discovery: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadDiscoveryCheck']>> | undefined,\n scope: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadScopeCheck']>> | undefined,\n ) {\n const requirements = await this.loadLinked<BehaviorRequirementRecord>(RootConfig.entities.requirement.name, software.id);\n const acceptanceCriteria = await this.loadLinked<BehaviorAcceptanceCriterionRecord>(\n RootConfig.entities.acceptanceCriterion.name,\n software.id,\n );\n const businessRules = await this.loadLinked<BehaviorBusinessRuleRecord>(\n RootConfig.entities.businessRule.name,\n software.id,\n );\n const useCases = await this.loadLinked<BehaviorUseCaseRecord>(RootConfig.entities.useCase.name, software.id);\n\n const documentId = kickoffText(software.behaviorDocumentId);\n let statusId = '';\n let hostVersionId = '';\n if (documentId) {\n try {\n const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId)) as {\n statusId?: unknown;\n versionId?: unknown;\n } | null;\n statusId = kickoffText(document?.statusId);\n hostVersionId = kickoffText(document?.versionId);\n } catch {\n statusId = '';\n }\n }\n\n const scopeVersionId = kickoffText(software.scopeApprovedVersionId);\n return {\n currentPhase: software.currentPhase,\n items: scope?.items ?? [],\n requirements,\n acceptanceCriteria,\n businessRules,\n useCases,\n statusId,\n hostVersionId,\n approvedVersionId: software.behaviorApprovedVersionId,\n approvedFingerprint: software.behaviorApprovedFingerprint,\n reportFingerprint: behaviorDocumentFingerprint({\n scopeVersionId,\n scopeFingerprint: kickoffText(software.scopeApprovedFingerprint),\n scopePlainText: '',\n requirements,\n acceptanceCriteria,\n businessRules,\n useCases,\n }),\n scopeApprovedVersionId: scopeVersionId,\n scopeApprovedFingerprint: software.scopeApprovedFingerprint,\n currentScopeFingerprint: scope?.reportFingerprint,\n scopeStatusId: scope?.statusId ?? '',\n scopeHostVersionId: scope?.hostVersionId ?? '',\n discoveryApprovedVersionId: software.discoveryApprovedVersionId,\n discoveryApprovedFingerprint: software.discoveryApprovedFingerprint,\n currentDiscoveryFingerprint: discovery?.reportFingerprint,\n discoveryStatusId: discovery?.statusId ?? '',\n discoveryHostVersionId: discovery?.hostVersionId ?? '',\n kickoffApprovedVersionId: software.kickoffApprovedVersionId,\n kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,\n currentKickoffFingerprint: discovery?.currentKickoffFingerprint,\n kickoffStatusId: kickoff?.statusId ?? '',\n kickoffHostVersionId: kickoff?.hostVersionId ?? '',\n };\n }\n\n private async loadDesignCheck(\n software: AXMSoftwareManagementSoftwareEntityModel,\n kickoff: IntroductionKickoffCheck | null,\n discovery: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadDiscoveryCheck']>> | undefined,\n scope: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadScopeCheck']>> | undefined,\n behavior: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadBehaviorCheck']>> | undefined,\n ) {\n const decisions = await this.loadLinked<DesignDecisionRecord>(RootConfig.entities.designDecision.name, software.id);\n const documentId = kickoffText(software.designDocumentId);\n let statusId = '';\n let hostVersionId = '';\n if (documentId) {\n try {\n const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId)) as {\n statusId?: unknown;\n versionId?: unknown;\n } | null;\n statusId = kickoffText(document?.statusId);\n hostVersionId = kickoffText(document?.versionId);\n } catch {\n statusId = '';\n }\n }\n\n const behaviorVersionId = kickoffText(software.behaviorApprovedVersionId);\n return {\n currentPhase: software.currentPhase,\n decisions,\n requirements: behavior?.requirements ?? [],\n statusId,\n hostVersionId,\n approvedVersionId: software.designApprovedVersionId,\n approvedFingerprint: software.designApprovedFingerprint,\n reportFingerprint: designDocumentFingerprint({\n behaviorVersionId,\n behaviorFingerprint: kickoffText(software.behaviorApprovedFingerprint),\n behaviorPlainText: '',\n decisions,\n }),\n behaviorApprovedVersionId: behaviorVersionId,\n behaviorApprovedFingerprint: software.behaviorApprovedFingerprint,\n currentBehaviorFingerprint: behavior?.reportFingerprint,\n behaviorStatusId: behavior?.statusId ?? '',\n behaviorHostVersionId: behavior?.hostVersionId ?? '',\n scopeApprovedVersionId: software.scopeApprovedVersionId,\n scopeApprovedFingerprint: software.scopeApprovedFingerprint,\n currentScopeFingerprint: scope?.reportFingerprint,\n scopeStatusId: scope?.statusId ?? '',\n scopeHostVersionId: scope?.hostVersionId ?? '',\n discoveryApprovedVersionId: software.discoveryApprovedVersionId,\n discoveryApprovedFingerprint: software.discoveryApprovedFingerprint,\n currentDiscoveryFingerprint: discovery?.reportFingerprint,\n discoveryStatusId: discovery?.statusId ?? '',\n discoveryHostVersionId: discovery?.hostVersionId ?? '',\n kickoffApprovedVersionId: software.kickoffApprovedVersionId,\n kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,\n currentKickoffFingerprint: discovery?.currentKickoffFingerprint,\n kickoffStatusId: kickoff?.statusId ?? '',\n kickoffHostVersionId: kickoff?.hostVersionId ?? '',\n };\n }\n\n private async loadDeliveryCheck(\n software: AXMSoftwareManagementSoftwareEntityModel,\n kickoff: IntroductionKickoffCheck | null,\n discovery: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadDiscoveryCheck']>> | undefined,\n scope: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadScopeCheck']>> | undefined,\n behavior: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadBehaviorCheck']>> | undefined,\n design: Awaited<ReturnType<CompleteSoftwarePhaseActivity['loadDesignCheck']>> | undefined,\n ) {\n const documentId = kickoffText(software.deliveryDocumentId);\n let statusId = '';\n let hostVersionId = '';\n if (documentId) {\n try {\n const document = (await this.entityService.withEntity('DocumentManagement', 'Document').data().byKey(documentId)) as {\n statusId?: unknown;\n versionId?: unknown;\n } | null;\n statusId = kickoffText(document?.statusId);\n hostVersionId = kickoffText(document?.versionId);\n } catch {\n statusId = '';\n }\n }\n\n const designVersionId = kickoffText(software.designApprovedVersionId);\n return {\n currentPhase: software.currentPhase,\n definitionCompletedAt: software.definitionCompletedAt,\n workPackages: software.deliveryWorkPackages,\n milestones: software.deliveryMilestones,\n estimateAssumptions: software.deliveryEstimateAssumptions,\n verificationCriteria: software.deliveryVerificationCriteria,\n releaseCriteria: software.deliveryReleaseCriteria,\n risks: software.deliveryRisks,\n tracedRequirementId: software.deliveryTracedRequirementId,\n tracedDesignDecisionId: software.deliveryTracedDesignDecisionId,\n requirements: behavior?.requirements ?? [],\n decisions: design?.decisions ?? [],\n statusId,\n hostVersionId,\n approvedVersionId: software.deliveryApprovedVersionId,\n approvedFingerprint: software.deliveryApprovedFingerprint,\n reportFingerprint: deliveryPlanFingerprint({\n designVersionId,\n designFingerprint: kickoffText(software.designApprovedFingerprint),\n designPlainText: '',\n workPackages: software.deliveryWorkPackages,\n milestones: software.deliveryMilestones,\n estimateAssumptions: software.deliveryEstimateAssumptions,\n verificationCriteria: software.deliveryVerificationCriteria,\n releaseCriteria: software.deliveryReleaseCriteria,\n risks: software.deliveryRisks,\n tracedRequirementId: software.deliveryTracedRequirementId,\n tracedDesignDecisionId: software.deliveryTracedDesignDecisionId,\n projectId: software.projectId,\n }),\n designApprovedVersionId: designVersionId,\n designApprovedFingerprint: software.designApprovedFingerprint,\n currentDesignFingerprint: design?.reportFingerprint,\n designStatusId: design?.statusId ?? '',\n designHostVersionId: design?.hostVersionId ?? '',\n behaviorApprovedVersionId: software.behaviorApprovedVersionId,\n behaviorApprovedFingerprint: software.behaviorApprovedFingerprint,\n currentBehaviorFingerprint: behavior?.reportFingerprint,\n behaviorStatusId: behavior?.statusId ?? '',\n behaviorHostVersionId: behavior?.hostVersionId ?? '',\n scopeApprovedVersionId: software.scopeApprovedVersionId,\n scopeApprovedFingerprint: software.scopeApprovedFingerprint,\n currentScopeFingerprint: scope?.reportFingerprint,\n scopeStatusId: scope?.statusId ?? '',\n scopeHostVersionId: scope?.hostVersionId ?? '',\n discoveryApprovedVersionId: software.discoveryApprovedVersionId,\n discoveryApprovedFingerprint: software.discoveryApprovedFingerprint,\n currentDiscoveryFingerprint: discovery?.reportFingerprint,\n discoveryStatusId: discovery?.statusId ?? '',\n discoveryHostVersionId: discovery?.hostVersionId ?? '',\n kickoffApprovedVersionId: software.kickoffApprovedVersionId,\n kickoffApprovedFingerprint: software.kickoffApprovedFingerprint,\n currentKickoffFingerprint: discovery?.currentKickoffFingerprint,\n kickoffStatusId: kickoff?.statusId ?? '',\n kickoffHostVersionId: kickoff?.hostVersionId ?? '',\n };\n }\n\n private async loadLinked<T>(entity: string, softwareId: string | undefined): Promise<T[]> {\n if (!softwareId) {\n return [];\n }\n try {\n const page = await this.entityService\n .withEntity(RootConfig.module.name, entity)\n .data()\n .query({\n skip: 0,\n take: 500,\n filter: { field: 'softwareId', operator: { type: 'equal' }, value: softwareId },\n });\n return (page.items ?? []) as T[];\n } catch {\n return [];\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAkDA;MAGa,6BAA6B,CAAA;AAD1C,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAijBrD,IAAA;;;IA3iBC,MAAM,OAAO,CAAC,KAAiC,EAAA;QAC7C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;QACtD,IAAI,CAAC,UAAU,EAAE;YACf,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;AAC3C,gBAAA,QAAQ,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;aAChC;QACH;AAEA,QAAA,MAAM,QAAQ,IAAI,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAoD;QAE7L,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE;AACvC,gBAAA,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;aAClC;QACH;AAEA,QAAA,MAAM,KAAK,IAAI,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,mBAAmB,CAAC,QAAQ,CAAC,YAAY,CAAC,IAA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