@acorex-platform/module-organization-management-client 0.0.21
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-organization-management-client-acorex-platform-module-organization-management-client-Dn8Ss1nL.mjs +433 -0
- package/fesm2022/acorex-platform-module-organization-management-client-acorex-platform-module-organization-management-client-Dn8Ss1nL.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-add-business-unit-to-business-unit.command-CA2uZQyC.mjs +161 -0
- package/fesm2022/acorex-platform-module-organization-management-client-add-business-unit-to-business-unit.command-CA2uZQyC.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-add-position-to-business-unit.command-F7jD3jKs.mjs +137 -0
- package/fesm2022/acorex-platform-module-organization-management-client-add-position-to-business-unit.command-F7jD3jKs.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-add-team-to-business-unit.command-BLQFjhS5.mjs +127 -0
- package/fesm2022/acorex-platform-module-organization-management-client-add-team-to-business-unit.command-BLQFjhS5.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-contracts.mjs +468 -0
- package/fesm2022/acorex-platform-module-organization-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-feature-definition.provider-BQKtvXOM.mjs +19 -0
- package/fesm2022/acorex-platform-module-organization-management-client-feature-definition.provider-BQKtvXOM.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-generate-org-chart.command-DJnFJKuo.mjs +91 -0
- package/fesm2022/acorex-platform-module-organization-management-client-generate-org-chart.command-DJnFJKuo.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-job-definition-matrix-page.utils-DD3jLujN.mjs +61 -0
- package/fesm2022/acorex-platform-module-organization-management-client-job-definition-matrix-page.utils-DD3jLujN.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-job-definition-pages-component.provider-BNhXJfjr.mjs +28 -0
- package/fesm2022/acorex-platform-module-organization-management-client-job-definition-pages-component.provider-BNhXJfjr.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-job-definition-responsibilities-page.component-BlUzsSy3.mjs +237 -0
- package/fesm2022/acorex-platform-module-organization-management-client-job-definition-responsibilities-page.component-BlUzsSy3.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-job-definition-skills-page.component--pyAaXB4.mjs +233 -0
- package/fesm2022/acorex-platform-module-organization-management-client-job-definition-skills-page.component--pyAaXB4.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-menu.provider-BgRoEC48.mjs +175 -0
- package/fesm2022/acorex-platform-module-organization-management-client-menu.provider-BgRoEC48.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart-default-node-contribution.provider-BQ0ihb43.mjs +229 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart-default-node-contribution.provider-BQ0ihb43.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart-employee-flyout-contribution.provider-Bz8nVm04.mjs +179 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart-employee-flyout-contribution.provider-Bz8nVm04.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart-position-employee-node-contribution.provider-BTicXn9n.mjs +168 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart-position-employee-node-contribution.provider-BTicXn9n.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart-ux-node-contribution.provider-C5TItnOp.mjs +338 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart-ux-node-contribution.provider-C5TItnOp.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart.page-g_3oPPH0.mjs +3744 -0
- package/fesm2022/acorex-platform-module-organization-management-client-org-chart.page-g_3oPPH0.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-permission-definition.provider-CiCdTBGo.mjs +43 -0
- package/fesm2022/acorex-platform-module-organization-management-client-permission-definition.provider-CiCdTBGo.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-remove-position-from-business-unit.command-BFQVTpfy.mjs +91 -0
- package/fesm2022/acorex-platform-module-organization-management-client-remove-position-from-business-unit.command-BFQVTpfy.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-replace-position-assignee.command-CSgERqLG.mjs +64 -0
- package/fesm2022/acorex-platform-module-organization-management-client-replace-position-assignee.command-CSgERqLG.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix-widget-edit.component-DHmUxlnu.mjs +143 -0
- package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix-widget-edit.component-DHmUxlnu.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix-widget-view.component-BkLZhXhM.mjs +65 -0
- package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix-widget-view.component-BkLZhXhM.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix.component-DqO6xE2p.mjs +400 -0
- package/fesm2022/acorex-platform-module-organization-management-client-responsibilities-matrix.component-DqO6xE2p.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client-settings.provider-Dnrkq9Ku.mjs +432 -0
- package/fesm2022/acorex-platform-module-organization-management-client-settings.provider-Dnrkq9Ku.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-organization-management-client.mjs +2 -0
- package/fesm2022/acorex-platform-module-organization-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-organization-management-client-contracts.d.ts +501 -0
- package/types/acorex-platform-module-organization-management-client.d.ts +273 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
|
|
2
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
3
|
+
import { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';
|
|
4
|
+
import { AXPCommandService } from '@acorex-platform/framework-client/runtime';
|
|
5
|
+
import { AXMOrganizationManagementServerCommands } from '@acorex-platform/module-organization-management-client/contracts';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { inject, Injectable } from '@angular/core';
|
|
8
|
+
|
|
9
|
+
//#region ---- Imports ----
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ---- Constants ----
|
|
12
|
+
/** Defer showing progress until work exceeds this duration (fast runs avoid flicker). */
|
|
13
|
+
const LOADING_DIALOG_SHOW_THRESHOLD_MS = 500;
|
|
14
|
+
/** Minimum time to keep the dialog visible after work completes once shown (smoother dismiss). */
|
|
15
|
+
const LOADING_DIALOG_CLOSE_DELAY_MS = 500;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ---- Client command ----
|
|
18
|
+
/**
|
|
19
|
+
* Client orchestration for org-chart generate: loading UI, then the distinct server command.
|
|
20
|
+
*/
|
|
21
|
+
class AXMGenerateOrgChartCommand {
|
|
22
|
+
constructor() {
|
|
23
|
+
//#region ---- Services & Dependencies ----
|
|
24
|
+
this.loadingDialog = inject(AXLoadingDialogService);
|
|
25
|
+
this.commandService = inject(AXPCommandService);
|
|
26
|
+
this.translation = inject(AXTranslationService);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region ---- Command ----
|
|
30
|
+
async execute(_input) {
|
|
31
|
+
const [loadingTitle, loadingDescription] = await Promise.all([
|
|
32
|
+
this.translation.translateAsync('@organization-management:organization-chart.commands.generate.loading.title'),
|
|
33
|
+
this.translation.translateAsync('@organization-management:organization-chart.commands.generate.loading.description'),
|
|
34
|
+
]);
|
|
35
|
+
let showTimer;
|
|
36
|
+
let progressDialog;
|
|
37
|
+
showTimer = setTimeout(() => {
|
|
38
|
+
showTimer = undefined;
|
|
39
|
+
progressDialog = this.loadingDialog.show({
|
|
40
|
+
title: loadingTitle,
|
|
41
|
+
mode: 'indeterminate',
|
|
42
|
+
progressColor: 'primary',
|
|
43
|
+
text: loadingDescription,
|
|
44
|
+
});
|
|
45
|
+
}, LOADING_DIALOG_SHOW_THRESHOLD_MS);
|
|
46
|
+
try {
|
|
47
|
+
const result = await this.commandService.execute(AXMOrganizationManagementServerCommands.OrganizationChart.Generate, {});
|
|
48
|
+
const data = runtimeCommandPayloadData(result);
|
|
49
|
+
if (!data) {
|
|
50
|
+
const fallbackText = await this.translation.translateAsync('@organization-management:organization-chart.commands.generate.messages.failed');
|
|
51
|
+
return {
|
|
52
|
+
success: false,
|
|
53
|
+
message: { text: result?.message?.text ?? fallbackText },
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return { success: true, kind: 'object',
|
|
57
|
+
data: data,
|
|
58
|
+
message: {
|
|
59
|
+
text: await this.translation.translateAsync('@organization-management:organization-chart.commands.generate.messages.success'),
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
const fallbackText = await this.translation.translateAsync('@organization-management:organization-chart.commands.generate.messages.failed');
|
|
65
|
+
return {
|
|
66
|
+
success: false,
|
|
67
|
+
message: {
|
|
68
|
+
text: error instanceof Error ? error.message : fallbackText,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
if (showTimer !== undefined) {
|
|
74
|
+
clearTimeout(showTimer);
|
|
75
|
+
}
|
|
76
|
+
if (progressDialog !== undefined) {
|
|
77
|
+
const dlg = progressDialog;
|
|
78
|
+
setTimeout(() => dlg.close(), LOADING_DIALOG_CLOSE_DELAY_MS);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMGenerateOrgChartCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
83
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMGenerateOrgChartCommand, providedIn: 'root' }); }
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMGenerateOrgChartCommand, decorators: [{
|
|
86
|
+
type: Injectable,
|
|
87
|
+
args: [{ providedIn: 'root' }]
|
|
88
|
+
}] });
|
|
89
|
+
|
|
90
|
+
export { AXMGenerateOrgChartCommand };
|
|
91
|
+
//# sourceMappingURL=acorex-platform-module-organization-management-client-generate-org-chart.command-DJnFJKuo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-organization-management-client-generate-org-chart.command-DJnFJKuo.mjs","sources":["../../../../libs/modules/organization-management/client/src/lib/features/organization-chart/commands/generate-org-chart.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult,\n runtimeCommandPayloadData} from '@acorex-platform/framework-shared/core';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport {\n AXMOrganizationManagementServerCommands,\n} from '@acorex-platform/module-organization-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\nimport type { OrgChartGenerateResult } from '../generation/org-chart.types';\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Defer showing progress until work exceeds this duration (fast runs avoid flicker). */\nconst LOADING_DIALOG_SHOW_THRESHOLD_MS = 500;\n\n/** Minimum time to keep the dialog visible after work completes once shown (smoother dismiss). */\nconst LOADING_DIALOG_CLOSE_DELAY_MS = 500;\n\n//#endregion\n\n//#region ---- Types ----\n\nexport type AXMGenerateOrgChartInput = {\n mode?: 'location' | 'structure' | 'reporting' | 'positionHierarchy';\n showVacantLeafSeats?: boolean;\n};\n\n//#endregion\n\n//#region ---- Client command ----\n\n/**\n * Client orchestration for org-chart generate: loading UI, then the distinct server command.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMGenerateOrgChartCommand\n implements AXPCommand<AXMGenerateOrgChartInput, OrgChartGenerateResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly commandService = inject(AXPCommandService);\n private readonly translation = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(_input?: AXMGenerateOrgChartInput): AXPCommandExecuteResultPromise<OrgChartGenerateResult> {\n const [loadingTitle, loadingDescription] = await Promise.all([\n this.translation.translateAsync('@organization-management:organization-chart.commands.generate.loading.title'),\n this.translation.translateAsync(\n '@organization-management:organization-chart.commands.generate.loading.description',\n ),\n ]);\n\n let showTimer: ReturnType<typeof setTimeout> | undefined;\n let progressDialog: { close: () => void } | undefined;\n\n showTimer = setTimeout(() => {\n showTimer = undefined;\n progressDialog = this.loadingDialog.show({\n title: loadingTitle,\n mode: 'indeterminate',\n progressColor: 'primary',\n text: loadingDescription,\n });\n }, LOADING_DIALOG_SHOW_THRESHOLD_MS);\n\n try {\n const result = await this.commandService.execute<Record<string, never>, OrgChartGenerateResult>(\n AXMOrganizationManagementServerCommands.OrganizationChart.Generate,\n {},\n );\n\n const data = runtimeCommandPayloadData(result);\n if (!data) {\n const fallbackText = await this.translation.translateAsync(\n '@organization-management:organization-chart.commands.generate.messages.failed',\n );\n return {\n success: false,\n message: { text: result?.message?.text ?? fallbackText },\n };\n }\n\n return { success: true, kind: 'object',\n data: data,\n message: {\n text: await this.translation.translateAsync(\n '@organization-management:organization-chart.commands.generate.messages.success',\n ),\n },\n };\n } catch (error) {\n const fallbackText = await this.translation.translateAsync(\n '@organization-management:organization-chart.commands.generate.messages.failed',\n );\n return {\n success: false,\n message: {\n text: error instanceof Error ? error.message : fallbackText,\n },\n };\n } finally {\n if (showTimer !== undefined) {\n clearTimeout(showTimer);\n }\n if (progressDialog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AAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//#region ---- Imports ----
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region ---- Job definition matrix page helpers ----
|
|
4
|
+
/**
|
|
5
|
+
* Overlays overview tab fields so matrix column headers track Required Job Levels while draft patches hold matrix data only.
|
|
6
|
+
*/
|
|
7
|
+
function mergeJobDefinitionMatrixPageContext(root, local) {
|
|
8
|
+
if (local == null) {
|
|
9
|
+
return root;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
...local,
|
|
13
|
+
jobLevels: root['jobLevels'],
|
|
14
|
+
jobLevelIds: root['jobLevelIds'],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Builds column titles for responsibility/skill matrices from exposed `jobLevels` on the record.
|
|
19
|
+
*/
|
|
20
|
+
function jobLevelsToSpreadsheetTitles(jobLevels, i18n) {
|
|
21
|
+
if (!Array.isArray(jobLevels) || jobLevels.length === 0) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const resolve = (v) => i18n.resolve(v);
|
|
25
|
+
return jobLevels.map((item) => {
|
|
26
|
+
if (typeof item === 'string') {
|
|
27
|
+
return { id: item, title: item };
|
|
28
|
+
}
|
|
29
|
+
const id = (item['id'] ?? item['value'] ?? String(item));
|
|
30
|
+
const rawTitle = (item['title'] ?? item['name'] ?? String(item));
|
|
31
|
+
const desc = item['description'];
|
|
32
|
+
return {
|
|
33
|
+
id,
|
|
34
|
+
title: resolve(rawTitle) || String(rawTitle),
|
|
35
|
+
description: desc != null && desc !== '' ? resolve(desc) : undefined,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Collects unique cell values from a spreadsheet matrix (e.g. responsibility level ids).
|
|
41
|
+
*/
|
|
42
|
+
function collectIdsFromSpreadsheetMatrix(matrix) {
|
|
43
|
+
const set = new Set();
|
|
44
|
+
if (!matrix || typeof matrix !== 'object') {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
for (const row of Object.values(matrix)) {
|
|
48
|
+
if (row && typeof row === 'object') {
|
|
49
|
+
for (const cell of Object.values(row)) {
|
|
50
|
+
if (cell != null && typeof cell === 'string') {
|
|
51
|
+
set.add(cell);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return Array.from(set);
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
|
|
60
|
+
export { collectIdsFromSpreadsheetMatrix as c, jobLevelsToSpreadsheetTitles as j, mergeJobDefinitionMatrixPageContext as m };
|
|
61
|
+
//# sourceMappingURL=acorex-platform-module-organization-management-client-job-definition-matrix-page.utils-DD3jLujN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-organization-management-client-job-definition-matrix-page.utils-DD3jLujN.mjs","sources":["../../../../libs/modules/organization-management/client/src/lib/features/job-definition-pages/job-definition-matrix-page.utils.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSpreadsheetData, AXPSpreadsheetItem } from '@acorex-platform/framework-client/layout/components';\n\n//#endregion\n\n//#region ---- Job definition matrix page helpers ----\n\n/**\n * Overlays overview tab fields so matrix column headers track Required Job Levels while draft patches hold matrix data only.\n */\nexport function mergeJobDefinitionMatrixPageContext(\n root: Record<string, unknown>,\n local: Record<string, unknown> | null | undefined,\n): Record<string, unknown> {\n if (local == null) {\n return root;\n }\n\n return {\n ...local,\n jobLevels: root['jobLevels'],\n jobLevelIds: root['jobLevelIds'],\n };\n}\n\n/**\n * Builds column titles for responsibility/skill matrices from exposed `jobLevels` on the record.\n */\nexport function jobLevelsToSpreadsheetTitles(\n jobLevels: unknown,\n i18n: AXTranslationService,\n): AXPSpreadsheetItem[] {\n if (!Array.isArray(jobLevels) || jobLevels.length === 0) {\n return [];\n }\n\n const resolve = (v: unknown) => i18n.resolve(v as never);\n\n return jobLevels.map((item: Record<string, unknown> | string) => {\n if (typeof item === 'string') {\n return { id: item, title: item };\n }\n const id = (item['id'] ?? item['value'] ?? String(item)) as string;\n const rawTitle = (item['title'] ?? item['name'] ?? String(item)) as string | Record<string, string>;\n const desc = item['description'];\n return {\n id,\n title: resolve(rawTitle) || String(rawTitle),\n description:\n desc != null && desc !== '' ? resolve(desc as string | Record<string, string>) : undefined,\n };\n });\n}\n\n/**\n * Collects unique cell values from a spreadsheet matrix (e.g. responsibility level ids).\n */\nexport function collectIdsFromSpreadsheetMatrix(matrix: AXPSpreadsheetData | null | undefined): string[] {\n const set = new Set<string>();\n if (!matrix || typeof matrix !== 'object') {\n return [];\n }\n\n for (const row of Object.values(matrix)) {\n if (row && typeof row === 'object') {\n for (const cell of Object.values(row as Record<string, unknown>)) {\n if (cell != null && typeof cell === 'string') {\n set.add(cell);\n }\n }\n }\n }\n\n return Array.from(set);\n}\n\n//#endregion\n"],"names":[],"mappings":"AAAA;AAKA;AAEA;AAEA;;AAEG;AACG,SAAU,mCAAmC,CACjD,IAA6B,EAC7B,KAAiD,EAAA;AAEjD,IAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,QAAA,OAAO,IAAI;IACb;IAEA,OAAO;AACL,QAAA,GAAG,KAAK;AACR,QAAA,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC;AAC5B,QAAA,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC;KACjC;AACH;AAEA;;AAEG;AACG,SAAU,4BAA4B,CAC1C,SAAkB,EAClB,IAA0B,EAAA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AI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAClC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,GAA8B,CAAC,EAAE;gBAChE,IAAI,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC5C,oBAAA,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;gBACf;YACF;QACF;IACF;AAEA,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AACxB;AAEA;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY, JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY } from '@acorex-platform/module-organization-management-client/contracts';
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region ---- Job definition entity page components provider ----
|
|
7
|
+
class AXMJobDefinitionPagesComponentProvider {
|
|
8
|
+
async components() {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
key: JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY,
|
|
12
|
+
loader: () => import('./acorex-platform-module-organization-management-client-job-definition-responsibilities-page.component-BlUzsSy3.mjs').then((m) => m.AXMJobDefinitionResponsibilitiesPageComponent),
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY,
|
|
16
|
+
loader: () => import('./acorex-platform-module-organization-management-client-job-definition-skills-page.component--pyAaXB4.mjs').then((m) => m.AXMJobDefinitionSkillsPageComponent),
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMJobDefinitionPagesComponentProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMJobDefinitionPagesComponentProvider }); }
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMJobDefinitionPagesComponentProvider, decorators: [{
|
|
24
|
+
type: Injectable
|
|
25
|
+
}] });
|
|
26
|
+
|
|
27
|
+
export { AXMJobDefinitionPagesComponentProvider };
|
|
28
|
+
//# sourceMappingURL=acorex-platform-module-organization-management-client-job-definition-pages-component.provider-BNhXJfjr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-organization-management-client-job-definition-pages-component.provider-BNhXJfjr.mjs","sources":["../../../../libs/modules/organization-management/client/src/lib/features/job-definition-pages/job-definition-pages-component.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport {\n JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY,\n JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY,\n} from '@acorex-platform/module-organization-management-client/contracts';\n\n//#endregion\n\n//#region ---- Job definition entity page components provider ----\n\n@Injectable()\nexport class AXMJobDefinitionPagesComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./job-definition-responsibilities-page.component').then(\n (m) => m.AXMJobDefinitionResponsibilitiesPageComponent,\n ),\n },\n {\n key: JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./job-definition-skills-page.component').then((m) => m.AXMJobDefinitionSkillsPageComponent),\n },\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAYA;AAEA;MAGa,sCAAsC,CAAA;AACjD,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,kDAAkD;AACvD,gBAAA,MAAM,EAAE,MACN,OAAO,qHAAkD,CAAC,CAAC,IAAI,CAC7D,CAAC,CAAC,KAAK,CAAC,CAAC,6CAA6C,CACvD;AACJ,aAAA;AACD,YAAA;AACE,gBAAA,GAAG,EAAE,wCAAwC;AAC7C,gBAAA,MAAM,EAAE,MACN,OAAO,2GAAwC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mCAAmC,CAAC;AACtG,aAAA;SACF;IACH;8GAhBW,sCAAsC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAtC,sCAAsC,EAAA,CAAA,CAAA;;2FAAtC,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBADlD;;;;;"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { AXPEntityEventsKeys } from '@acorex-platform/framework-shared/entity';
|
|
2
|
+
import { AXPBroadcastEventService } from '@acorex-platform/framework-client/core';
|
|
3
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
4
|
+
import { AXPPageLayoutBaseComponent, AXPPageLayoutBase } from '@acorex-platform/framework-client/layout/views';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { input, inject, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
7
|
+
import { cloneDeep, isEqual } from 'lodash';
|
|
8
|
+
import { RootConfig } from '@acorex-platform/module-organization-management-client/contracts';
|
|
9
|
+
import { A as AXMOrganizationManagementResponsibilitiesMatrixComponent } from './acorex-platform-module-organization-management-client-responsibilities-matrix.component-DqO6xE2p.mjs';
|
|
10
|
+
import { m as mergeJobDefinitionMatrixPageContext, j as jobLevelsToSpreadsheetTitles, c as collectIdsFromSpreadsheetMatrix } from './acorex-platform-module-organization-management-client-job-definition-matrix-page.utils-DD3jLujN.mjs';
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
const JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD = 'JobDefinition:Responsibilities:Discard';
|
|
14
|
+
const JOB_DEFINITION_RESPONSIBILITIES_SAVE = 'JobDefinition:Responsibilities:Save';
|
|
15
|
+
//#region ---- Component ----
|
|
16
|
+
class AXMJobDefinitionResponsibilitiesPageComponent extends AXPPageLayoutBaseComponent {
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ---- Constructor ----
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
//#region ---- Inputs ----
|
|
22
|
+
this.rootContext = input(/* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [undefined, { debugName: "rootContext" }] : /* istanbul ignore next */ []));
|
|
24
|
+
this.pageConfig = input(/* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [undefined, { debugName: "pageConfig" }] : /* istanbul ignore next */ []));
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ---- Services ----
|
|
28
|
+
this.entityService = inject(AXPEntityService);
|
|
29
|
+
this.eventService = inject(AXPBroadcastEventService);
|
|
30
|
+
this.hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region ---- State ----
|
|
33
|
+
this.localContext = signal(null, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "localContext" }] : /* istanbul ignore next */ []));
|
|
35
|
+
this.ignoreNextMatrixChange = signal(false, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "ignoreNextMatrixChange" }] : /* istanbul ignore next */ []));
|
|
37
|
+
this.baselineMatrix = signal(null, /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "baselineMatrix" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.isDirty = signal(false, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "isDirty" }] : /* istanbul ignore next */ []));
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ---- Computed ----
|
|
43
|
+
/** Canonical payload for matrix bindings; must be a `computed` so `titles` / `matrixValue` track inputs. */
|
|
44
|
+
this.mergedContext = computed(() => mergeJobDefinitionMatrixPageContext(this.rootContext() ?? {}, this.localContext()), /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "mergedContext" }] : /* istanbul ignore next */ []));
|
|
46
|
+
this.titles = computed(() => jobLevelsToSpreadsheetTitles(this.mergedContext()['jobLevels'], this.translateService), /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "titles" }] : /* istanbul ignore next */ []));
|
|
48
|
+
this.matrixValue = computed(() => {
|
|
49
|
+
const v = this.mergedContext()['responsibilities'];
|
|
50
|
+
if (v != null && typeof v === 'object') {
|
|
51
|
+
return v;
|
|
52
|
+
}
|
|
53
|
+
return {};
|
|
54
|
+
}, /* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "matrixValue" }] : /* istanbul ignore next */ []));
|
|
56
|
+
let previousRootId = undefined;
|
|
57
|
+
effect(() => {
|
|
58
|
+
const ctx = this.rootContext();
|
|
59
|
+
const currentId = ctx != null && typeof ctx === 'object' ? ctx['id'] : undefined;
|
|
60
|
+
if (currentId !== previousRootId) {
|
|
61
|
+
previousRootId = currentId;
|
|
62
|
+
this.localContext.set(null);
|
|
63
|
+
const responsibilities = ctx?.['responsibilities'];
|
|
64
|
+
const base = responsibilities != null && typeof responsibilities === 'object'
|
|
65
|
+
? cloneDeep(responsibilities)
|
|
66
|
+
: {};
|
|
67
|
+
this.baselineMatrix.set(base);
|
|
68
|
+
this.isDirty.set(false);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region ---- UI handlers ----
|
|
74
|
+
onMatrixChange(data) {
|
|
75
|
+
if (this.ignoreNextMatrixChange()) {
|
|
76
|
+
this.ignoreNextMatrixChange.set(false);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const base = this.localContext() ?? this.rootContext() ?? {};
|
|
80
|
+
const responsibilityLevelIds = collectIdsFromSpreadsheetMatrix(data);
|
|
81
|
+
this.localContext.set({
|
|
82
|
+
...base,
|
|
83
|
+
responsibilities: data,
|
|
84
|
+
responsibilityLevelIds,
|
|
85
|
+
});
|
|
86
|
+
const baseline = this.baselineMatrix() ?? {};
|
|
87
|
+
this.isDirty.set(!isEqual(baseline, data));
|
|
88
|
+
this.recompute();
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region ---- Unsaved Changes ----
|
|
92
|
+
hasUnsavedChanges() {
|
|
93
|
+
return this.isDirty();
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region ---- Page actions ----
|
|
97
|
+
async getPrimaryMenuItems() {
|
|
98
|
+
const discardTitle = (await this.translateService.translateAsync('@general:actions.discard.title')) || 'Discard';
|
|
99
|
+
const saveTitle = (await this.translateService.translateAsync('@general:actions.save.title')) || 'Save';
|
|
100
|
+
const discardAction = {
|
|
101
|
+
title: discardTitle,
|
|
102
|
+
icon: 'fa-light fa-rotate-left',
|
|
103
|
+
zone: 'footer',
|
|
104
|
+
priority: 'secondary',
|
|
105
|
+
color: 'default',
|
|
106
|
+
visible: this.isDirty(),
|
|
107
|
+
command: {
|
|
108
|
+
name: JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD,
|
|
109
|
+
options: {},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
const saveAction = {
|
|
113
|
+
title: saveTitle,
|
|
114
|
+
icon: 'fa-light fa-floppy-disk',
|
|
115
|
+
zone: 'footer',
|
|
116
|
+
priority: 'primary',
|
|
117
|
+
color: 'primary',
|
|
118
|
+
visible: this.isDirty(),
|
|
119
|
+
command: {
|
|
120
|
+
name: JOB_DEFINITION_RESPONSIBILITIES_SAVE,
|
|
121
|
+
options: {},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
return [discardAction, saveAction];
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region ---- Execute ----
|
|
128
|
+
execute(command) {
|
|
129
|
+
if (command.name === JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD) {
|
|
130
|
+
this.ignoreNextMatrixChange.set(true);
|
|
131
|
+
this.localContext.set(null);
|
|
132
|
+
const ctx = this.rootContext() ?? {};
|
|
133
|
+
const responsibilities = ctx['responsibilities'];
|
|
134
|
+
const base = responsibilities != null && typeof responsibilities === 'object'
|
|
135
|
+
? cloneDeep(responsibilities)
|
|
136
|
+
: {};
|
|
137
|
+
this.baselineMatrix.set(base);
|
|
138
|
+
this.isDirty.set(false);
|
|
139
|
+
this.recompute();
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (command.name !== JOB_DEFINITION_RESPONSIBILITIES_SAVE) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
return this.persistResponsibilities();
|
|
146
|
+
}
|
|
147
|
+
async persistResponsibilities() {
|
|
148
|
+
const ctx = this.mergedContext();
|
|
149
|
+
const id = ctx['id'];
|
|
150
|
+
if (typeof id !== 'string' || id.length === 0) {
|
|
151
|
+
return {
|
|
152
|
+
success: false,
|
|
153
|
+
message: {
|
|
154
|
+
text: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const responsibilities = ctx['responsibilities'] ?? {};
|
|
159
|
+
const responsibilityLevelIds = collectIdsFromSpreadsheetMatrix(responsibilities);
|
|
160
|
+
try {
|
|
161
|
+
await this.entityService
|
|
162
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.jobDefinition.name)
|
|
163
|
+
.data()
|
|
164
|
+
.update(id, {
|
|
165
|
+
responsibilities,
|
|
166
|
+
responsibilityLevelIds,
|
|
167
|
+
});
|
|
168
|
+
this.baselineMatrix.set(cloneDeep(responsibilities));
|
|
169
|
+
this.localContext.set(null);
|
|
170
|
+
this.isDirty.set(false);
|
|
171
|
+
this.recompute();
|
|
172
|
+
this.eventService.publish(AXPEntityEventsKeys.REFRESH_LAYOUT, {
|
|
173
|
+
name: `${RootConfig.module.name}.${RootConfig.entities.jobDefinition.name}`,
|
|
174
|
+
});
|
|
175
|
+
return { success: true, kind: 'object', data: undefined };
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
const text = error instanceof Error && error.message
|
|
179
|
+
? error.message
|
|
180
|
+
: (await this.translateService.translateAsync('@general:messages.entity.invalid-data')) ?? 'Save failed';
|
|
181
|
+
return {
|
|
182
|
+
success: false,
|
|
183
|
+
message: { text },
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region ---- Recompute ----
|
|
189
|
+
recompute() {
|
|
190
|
+
super.recompute();
|
|
191
|
+
const layout = this.hostPageLayout;
|
|
192
|
+
layout?.recompute?.();
|
|
193
|
+
}
|
|
194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMJobDefinitionResponsibilitiesPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: AXMJobDefinitionResponsibilitiesPageComponent, isStandalone: true, selector: "axm-job-definition-responsibilities-page", inputs: { rootContext: { classPropertyName: "rootContext", publicName: "rootContext", isSignal: true, isRequired: false, transformFunction: null }, pageConfig: { classPropertyName: "pageConfig", publicName: "pageConfig", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block w-full" }, providers: [
|
|
196
|
+
{
|
|
197
|
+
provide: AXPPageLayoutBase,
|
|
198
|
+
useExisting: AXMJobDefinitionResponsibilitiesPageComponent,
|
|
199
|
+
},
|
|
200
|
+
], usesInheritance: true, ngImport: i0, template: `
|
|
201
|
+
<axm-responsibilities-matrix
|
|
202
|
+
[titles]="titles()"
|
|
203
|
+
[value]="matrixValue()"
|
|
204
|
+
[readonly]="false"
|
|
205
|
+
(valueChange)="onMatrixChange($event)"
|
|
206
|
+
/>
|
|
207
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AXMOrganizationManagementResponsibilitiesMatrixComponent, selector: "axm-responsibilities-matrix", inputs: ["titles", "value", "readonly", "responsibilityIds"], outputs: ["valueChange", "cellChange", "responsibilityIdsChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
208
|
+
}
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMJobDefinitionResponsibilitiesPageComponent, decorators: [{
|
|
210
|
+
type: Component,
|
|
211
|
+
args: [{
|
|
212
|
+
selector: 'axm-job-definition-responsibilities-page',
|
|
213
|
+
standalone: true,
|
|
214
|
+
imports: [AXMOrganizationManagementResponsibilitiesMatrixComponent],
|
|
215
|
+
template: `
|
|
216
|
+
<axm-responsibilities-matrix
|
|
217
|
+
[titles]="titles()"
|
|
218
|
+
[value]="matrixValue()"
|
|
219
|
+
[readonly]="false"
|
|
220
|
+
(valueChange)="onMatrixChange($event)"
|
|
221
|
+
/>
|
|
222
|
+
`,
|
|
223
|
+
host: {
|
|
224
|
+
class: 'block w-full',
|
|
225
|
+
},
|
|
226
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
227
|
+
providers: [
|
|
228
|
+
{
|
|
229
|
+
provide: AXPPageLayoutBase,
|
|
230
|
+
useExisting: AXMJobDefinitionResponsibilitiesPageComponent,
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
}]
|
|
234
|
+
}], ctorParameters: () => [], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }] } });
|
|
235
|
+
|
|
236
|
+
export { AXMJobDefinitionResponsibilitiesPageComponent };
|
|
237
|
+
//# sourceMappingURL=acorex-platform-module-organization-management-client-job-definition-responsibilities-page.component-BlUzsSy3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-organization-management-client-job-definition-responsibilities-page.component-BlUzsSy3.mjs","sources":["../../../../libs/modules/organization-management/client/src/lib/features/job-definition-pages/job-definition-responsibilities-page.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPActionMenuItem, AXPExecuteCommand, AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityEventsKeys } from '@acorex-platform/framework-shared/entity';\n\nimport { AXPBroadcastEventService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPSpreadsheetData } from '@acorex-platform/framework-client/layout/components';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex-platform/framework-client/layout/views';\nimport type { AXPLayoutDetailsViewAction } from '@acorex-platform/framework-client/layout/views';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core';\nimport { cloneDeep, isEqual } from 'lodash';\nimport { RootConfig } from '@acorex-platform/module-organization-management-client/contracts';\nimport { AXMOrganizationManagementJobDefinitionEntityModel } from '@acorex-platform/module-organization-management-client/contracts';\nimport { AXMOrganizationManagementResponsibilitiesMatrixComponent } from '../responsibilities-matrix/responsibilities-matrix.component';\nimport type { AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n collectIdsFromSpreadsheetMatrix,\n jobLevelsToSpreadsheetTitles,\n mergeJobDefinitionMatrixPageContext,\n} from './job-definition-matrix-page.utils';\n\n//#endregion\n\nconst JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD = 'JobDefinition:Responsibilities:Discard';\nconst JOB_DEFINITION_RESPONSIBILITIES_SAVE = 'JobDefinition:Responsibilities:Save';\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-job-definition-responsibilities-page',\n standalone: true,\n imports: [AXMOrganizationManagementResponsibilitiesMatrixComponent],\n template: `\n <axm-responsibilities-matrix\n [titles]=\"titles()\"\n [value]=\"matrixValue()\"\n [readonly]=\"false\"\n (valueChange)=\"onMatrixChange($event)\"\n />\n `,\n host: {\n class: 'block w-full',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMJobDefinitionResponsibilitiesPageComponent,\n },\n ],\n})\nexport class AXMJobDefinitionResponsibilitiesPageComponent extends AXPPageLayoutBaseComponent {\n //#region ---- Inputs ----\n\n rootContext = input<Record<string, unknown>>();\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ---- Services ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly eventService = inject(AXPBroadcastEventService);\n private readonly hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });\n\n //#endregion\n\n //#region ---- State ----\n\n private readonly localContext = signal<Record<string, unknown> | null>(null);\n private readonly ignoreNextMatrixChange = signal(false);\n private readonly baselineMatrix = signal<AXPSpreadsheetData | null>(null);\n protected readonly isDirty = signal(false);\n\n //#endregion\n\n //#region ---- Constructor ----\n\n constructor() {\n super();\n let previousRootId: unknown = undefined;\n\n effect(() => {\n const ctx = this.rootContext();\n const currentId = ctx != null && typeof ctx === 'object' ? ctx['id'] : undefined;\n if (currentId !== previousRootId) {\n previousRootId = currentId;\n this.localContext.set(null);\n const responsibilities = ctx?.['responsibilities'];\n const base =\n responsibilities != null && typeof responsibilities === 'object'\n ? cloneDeep(responsibilities as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n }\n });\n }\n\n //#endregion\n\n //#region ---- Computed ----\n\n /** Canonical payload for matrix bindings; must be a `computed` so `titles` / `matrixValue` track inputs. */\n private readonly mergedContext = computed(() =>\n mergeJobDefinitionMatrixPageContext(this.rootContext() ?? {}, this.localContext()),\n );\n\n protected titles = computed(() =>\n jobLevelsToSpreadsheetTitles(this.mergedContext()['jobLevels'], this.translateService),\n );\n\n protected matrixValue = computed((): AXPSpreadsheetData => {\n const v = this.mergedContext()['responsibilities'];\n if (v != null && typeof v === 'object') {\n return v as AXPSpreadsheetData;\n }\n return {};\n });\n\n //#endregion\n\n //#region ---- UI handlers ----\n\n protected onMatrixChange(data: AXPSpreadsheetData): void {\n if (this.ignoreNextMatrixChange()) {\n this.ignoreNextMatrixChange.set(false);\n return;\n }\n\n const base = this.localContext() ?? this.rootContext() ?? {};\n const responsibilityLevelIds = collectIdsFromSpreadsheetMatrix(data);\n this.localContext.set({\n ...base,\n responsibilities: data,\n responsibilityLevelIds,\n });\n const baseline = this.baselineMatrix() ?? {};\n this.isDirty.set(!isEqual(baseline, data));\n this.recompute();\n }\n\n //#endregion\n\n //#region ---- Unsaved Changes ----\n\n override hasUnsavedChanges(): boolean {\n return this.isDirty();\n }\n\n //#endregion\n\n //#region ---- Page actions ----\n\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n const discardTitle =\n (await this.translateService.translateAsync('@general:actions.discard.title')) || 'Discard';\n const saveTitle = (await this.translateService.translateAsync('@general:actions.save.title')) || 'Save';\n\n const discardAction: AXPLayoutDetailsViewAction = {\n title: discardTitle,\n icon: 'fa-light fa-rotate-left',\n zone: 'footer',\n priority: 'secondary',\n color: 'default',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD,\n options: {},\n },\n };\n const saveAction: AXPLayoutDetailsViewAction = {\n title: saveTitle,\n icon: 'fa-light fa-floppy-disk',\n zone: 'footer',\n priority: 'primary',\n color: 'primary',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_RESPONSIBILITIES_SAVE,\n options: {},\n },\n };\n\n return [discardAction, saveAction];\n }\n\n //#endregion\n\n //#region ---- Execute ----\n\n override execute(command: AXPExecuteCommand): void | Promise<void> {\n if (command.name === JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD) {\n this.ignoreNextMatrixChange.set(true);\n this.localContext.set(null);\n const ctx = this.rootContext() ?? {};\n const responsibilities = ctx['responsibilities'];\n const base =\n responsibilities != null && typeof responsibilities === 'object'\n ? cloneDeep(responsibilities as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n this.recompute();\n return;\n }\n\n if (command.name !== JOB_DEFINITION_RESPONSIBILITIES_SAVE) {\n return;\n }\n\n return this.persistResponsibilities() as unknown as Promise<void>;\n }\n\n private async persistResponsibilities(): AXPCommandExecuteResultPromise {\n const ctx = this.mergedContext();\n const id = ctx['id'];\n if (typeof id !== 'string' || id.length === 0) {\n return {\n success: false,\n message: {\n text: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const responsibilities = (ctx['responsibilities'] as AXPSpreadsheetData) ?? {};\n const responsibilityLevelIds = collectIdsFromSpreadsheetMatrix(responsibilities);\n\n try {\n await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.jobDefinition.name)\n .data<string, AXMOrganizationManagementJobDefinitionEntityModel>()\n .update(id, {\n responsibilities,\n responsibilityLevelIds,\n });\n\n this.baselineMatrix.set(cloneDeep(responsibilities));\n this.localContext.set(null);\n this.isDirty.set(false);\n this.recompute();\n\n this.eventService.publish(AXPEntityEventsKeys.REFRESH_LAYOUT, {\n name: `${RootConfig.module.name}.${RootConfig.entities.jobDefinition.name}`,\n });\n\n return { success: true, kind: 'object', data: undefined };\n } catch (error: unknown) {\n const text =\n error instanceof Error && error.message\n ? error.message\n : (await this.translateService.translateAsync('@general:messages.entity.invalid-data')) ?? 'Save failed';\n return {\n success: false,\n message: { text },\n };\n }\n }\n\n //#endregion\n\n //#region ---- Recompute ----\n\n protected override recompute(): void {\n super.recompute();\n const layout = this.hostPageLay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