@acorex-platform/module-human-capital-management-client 0.0.53 → 0.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/fesm2022/{acorex-platform-module-human-capital-management-client-acorex-platform-module-human-capital-management-client-BGYF6PWx.mjs → acorex-platform-module-human-capital-management-client-acorex-platform-module-human-capital-management-client-CUzVvgPy.mjs} +11 -11
  2. package/fesm2022/{acorex-platform-module-human-capital-management-client-acorex-platform-module-human-capital-management-client-BGYF6PWx.mjs.map → acorex-platform-module-human-capital-management-client-acorex-platform-module-human-capital-management-client-CUzVvgPy.mjs.map} +1 -1
  3. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-employee.mjs +1 -1
  4. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-employee.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-employment-type.mjs +1 -1
  6. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-employment-type.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-leave-request.mjs +1 -1
  8. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-leave-request.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-leave-type.mjs +1 -1
  10. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-leave-type.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-lifecycle-event-type.mjs +1 -1
  12. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-lifecycle-event-type.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-lifecycle-event.mjs +1 -1
  14. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-lifecycle-event.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-position-assignment.mjs +1 -1
  16. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entities-position-assignment.mjs.map +1 -1
  17. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-acorex-platform-module-human-capital-management-client-contracts-entity-catalog-CVP3I1L7.mjs → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-acorex-platform-module-human-capital-management-client-contracts-entity-catalog-BfyBSWhl.mjs} +8 -8
  18. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-acorex-platform-module-human-capital-management-client-contracts-entity-catalog-CVP3I1L7.mjs.map → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-acorex-platform-module-human-capital-management-client-contracts-entity-catalog-BfyBSWhl.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-employee.entity-Bm2XMoMa.mjs → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-employee.entity-CmPHaE8E.mjs} +3 -3
  20. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-employee.entity-CmPHaE8E.mjs.map +1 -0
  21. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-employment-type.entity-BRgx5_BF.mjs → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-employment-type.entity-CjskJQbk.mjs} +3 -3
  22. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-employment-type.entity-CjskJQbk.mjs.map +1 -0
  23. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-leave-request.entity-FBkbZ-o4.mjs → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-leave-request.entity-iNPV_Bg-.mjs} +3 -3
  24. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-leave-request.entity-iNPV_Bg-.mjs.map +1 -0
  25. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-leave-type.entity-BFygPrW9.mjs → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-leave-type.entity-DwZOUYjX.mjs} +3 -3
  26. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-leave-type.entity-DwZOUYjX.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-lifecycle-event-type.entity-70UYqOrV.mjs → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-lifecycle-event-type.entity-CzervtDB.mjs} +3 -3
  28. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-lifecycle-event-type.entity-CzervtDB.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-lifecycle-event.entity-USkId1WB.mjs → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-lifecycle-event.entity-BBdsfSfU.mjs} +3 -3
  30. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-lifecycle-event.entity-BBdsfSfU.mjs.map +1 -0
  31. package/fesm2022/{acorex-platform-module-human-capital-management-client-contracts-entity-catalog-position-assignment.entity-CkSHA7Rz.mjs → acorex-platform-module-human-capital-management-client-contracts-entity-catalog-position-assignment.entity-B4LtCcVL.mjs} +3 -3
  32. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-position-assignment.entity-B4LtCcVL.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog.mjs +1 -1
  34. package/fesm2022/{acorex-platform-module-human-capital-management-client-edit-personal-info.command-BVFquL4g.mjs → acorex-platform-module-human-capital-management-client-edit-personal-info.command-B6GjEK6C.mjs} +2 -2
  35. package/fesm2022/{acorex-platform-module-human-capital-management-client-edit-personal-info.command-BVFquL4g.mjs.map → acorex-platform-module-human-capital-management-client-edit-personal-info.command-B6GjEK6C.mjs.map} +1 -1
  36. package/fesm2022/{acorex-platform-module-human-capital-management-client-edit-signature.command-S8EuJzkb.mjs → acorex-platform-module-human-capital-management-client-edit-signature.command-B-XH1P1-.mjs} +2 -2
  37. package/fesm2022/{acorex-platform-module-human-capital-management-client-edit-signature.command-S8EuJzkb.mjs.map → acorex-platform-module-human-capital-management-client-edit-signature.command-B-XH1P1-.mjs.map} +1 -1
  38. package/fesm2022/{acorex-platform-module-human-capital-management-client-profile-documents-panel.component-md5iBTci.mjs → acorex-platform-module-human-capital-management-client-profile-documents-panel.component-YvZyK6Y9.mjs} +2 -2
  39. package/fesm2022/{acorex-platform-module-human-capital-management-client-profile-documents-panel.component-md5iBTci.mjs.map → acorex-platform-module-human-capital-management-client-profile-documents-panel.component-YvZyK6Y9.mjs.map} +1 -1
  40. package/fesm2022/{acorex-platform-module-human-capital-management-client-profile-documents-panel.component.provider--21c47Ug.mjs → acorex-platform-module-human-capital-management-client-profile-documents-panel.component.provider-DkM1NHzm.mjs} +3 -3
  41. package/fesm2022/{acorex-platform-module-human-capital-management-client-profile-documents-panel.component.provider--21c47Ug.mjs.map → acorex-platform-module-human-capital-management-client-profile-documents-panel.component.provider-DkM1NHzm.mjs.map} +1 -1
  42. package/fesm2022/{acorex-platform-module-human-capital-management-client-start-leave-request-flow.command-BcyCI_vr.mjs → acorex-platform-module-human-capital-management-client-start-leave-request-flow.command-CkJjBkth.mjs} +7 -4
  43. package/fesm2022/acorex-platform-module-human-capital-management-client-start-leave-request-flow.command-CkJjBkth.mjs.map +1 -0
  44. package/fesm2022/{acorex-platform-module-human-capital-management-client-start-lifecycle-event-flow.command-Cp_7ZyWU.mjs → acorex-platform-module-human-capital-management-client-start-lifecycle-event-flow.command-CIHvo2QS.mjs} +7 -4
  45. package/fesm2022/acorex-platform-module-human-capital-management-client-start-lifecycle-event-flow.command-CIHvo2QS.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-module-human-capital-management-client.mjs +1 -1
  47. package/i18n/en-AU/human-capital-management.json +675 -0
  48. package/i18n/en-US/human-capital-management.json +675 -0
  49. package/i18n/fa-IR/human-capital-management.json +675 -0
  50. package/package.json +2 -2
  51. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-employee.entity-Bm2XMoMa.mjs.map +0 -1
  52. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-employment-type.entity-BRgx5_BF.mjs.map +0 -1
  53. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-leave-request.entity-FBkbZ-o4.mjs.map +0 -1
  54. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-leave-type.entity-BFygPrW9.mjs.map +0 -1
  55. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-lifecycle-event-type.entity-70UYqOrV.mjs.map +0 -1
  56. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-lifecycle-event.entity-USkId1WB.mjs.map +0 -1
  57. package/fesm2022/acorex-platform-module-human-capital-management-client-contracts-entity-catalog-position-assignment.entity-CkSHA7Rz.mjs.map +0 -1
  58. package/fesm2022/acorex-platform-module-human-capital-management-client-start-leave-request-flow.command-BcyCI_vr.mjs.map +0 -1
  59. package/fesm2022/acorex-platform-module-human-capital-management-client-start-lifecycle-event-flow.command-Cp_7ZyWU.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-human-capital-management-client-profile-documents-panel.component-md5iBTci.mjs","sources":["../../../../libs/modules/human-capital-management/client/src/lib/features/profile-page/profile-documents-panel.component.ts","../../../../libs/modules/human-capital-management/client/src/lib/features/profile-page/profile-documents-panel.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport {\n AXPPageComponentRendererDirective,\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex-platform/framework-client/layout/views';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { runtimeQueryPayloadData } from '@acorex-platform/framework-shared/core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n AXPHumanCapitalManagementQueryKeys,\n type AXMHcmProfileDocumentDriveContext,\n} from '@acorex-platform/module-human-capital-management-client/contracts';\nimport { DOCUMENT_DRIVE_PAGE_COMPONENT_KEY } from './profile-documents-panel.constants';\n\n//#endregion\n\n//#region ----- Component -----\n\n/** Fetches the employee document-drive context, then mounts the EDMS page. */\n@Component({\n selector: 'axm-hcm-profile-documents-panel',\n imports: [AsyncPipe, AXLoadingModule, AXTranslationModule, AXPPageComponentRendererDirective],\n templateUrl: './profile-documents-panel.component.html',\n styleUrl: './profile-documents-panel.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'axm-hcm-profile-documents-panel' },\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMHcmProfileDocumentsPanelComponent,\n },\n ],\n})\nexport class AXMHcmProfileDocumentsPanelComponent extends AXPPageLayoutBaseComponent {\n //#region ----- Inputs -----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n options = input<Record<string, unknown>>({});\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n private readonly queryService = inject(AXPQueryService);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly isLoading = signal(true);\n protected readonly drivePageConfig = signal<Record<string, unknown> | null>(null);\n protected readonly driveComponentKey = DOCUMENT_DRIVE_PAGE_COMPONENT_KEY;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n override async ngOnInit(): Promise<void> {\n await this.loadDriveContext();\n }\n\n protected override getPageTitle(): string {\n return '';\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadDriveContext(): Promise<void> {\n this.isLoading.set(true);\n try {\n const result = await this.queryService.fetch<void, AXMHcmProfileDocumentDriveContext | null>(\n AXPHumanCapitalManagementQueryKeys.Profile.GetMyDocumentDriveContext,\n undefined as void,\n );\n const context = runtimeQueryPayloadData(result);\n if (!context?.refType || !context?.refId) {\n this.drivePageConfig.set(null);\n return;\n }\n\n this.drivePageConfig.set({\n refType: context.refType,\n refId: context.refId,\n allowedDocumentTypeNames: context.documentTypeNames,\n });\n } finally {\n this.isLoading.set(false);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","@if (isLoading()) {\n <div class=\"__loading\">\n <ax-loading></ax-loading>\n </div>\n} @else if (drivePageConfig(); as config) {\n <div\n axp-page-component-renderer\n [componentKey]=\"driveComponentKey\"\n [pageConfig]=\"config\"\n [rootContext]=\"rootContext()\"\n [options]=\"options()\"\n ></div>\n} @else {\n <p class=\"__empty\">{{ '@human-capital-management:profile-page.groups.documents.empty' | translate | async }}</p>\n}\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;AAAA;AA0BA;AAEA;AAEA;AAgBM,MAAO,oCAAqC,SAAQ,0BAA0B,CAAA;AAfpF,IAAA,WAAA,GAAA;;;QAkBE,IAAA,CAAA,WAAW,GAAG,KAAK,CAA0B,EAAE;wFAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;QAC7C,IAAA,CAAA,OAAO,GAAG,KAAK,CAA0B,EAAE;oFAAC;;;AAM3B,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC;;;QAMpC,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,IAAI;sFAAC;QACxB,IAAA,CAAA,eAAe,GAAG,MAAM,CAAiC,IAAI;4FAAC;QAC9D,IAAA,CAAA,iBAAiB,GAAG,iCAAiC;AA0CzE,IAAA;;;AApCU,IAAA,MAAM,QAAQ,GAAA;AACrB,QAAA,MAAM,IAAI,CAAC,gBAAgB,EAAE;IAC/B;IAEmB,YAAY,GAAA;AAC7B,QAAA,OAAO,EAAE;IACX;;;AAMQ,IAAA,MAAM,gBAAgB,GAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;AACxB,QAAA,IAAI;AACF,YAAA,MAAM,MAAM,GAAG,MA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ACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,oCAAsC;AAClD,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,2cAAA,EAAA,MAAA,EAAA,CAAA,gwFAAA,CAAA,EAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-human-capital-management-client-profile-documents-panel.component-YvZyK6Y9.mjs","sources":["../../../../libs/modules/human-capital-management/client/src/lib/features/profile-page/profile-documents-panel.component.ts","../../../../libs/modules/human-capital-management/client/src/lib/features/profile-page/profile-documents-panel.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport {\n AXPPageComponentRendererDirective,\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex-platform/framework-client/layout/views';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { runtimeQueryPayloadData } from '@acorex-platform/framework-shared/core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n AXPHumanCapitalManagementQueryKeys,\n type AXMHcmProfileDocumentDriveContext,\n} from '@acorex-platform/module-human-capital-management-client/contracts';\nimport { DOCUMENT_DRIVE_PAGE_COMPONENT_KEY } from './profile-documents-panel.constants';\n\n//#endregion\n\n//#region ----- Component -----\n\n/** Fetches the employee document-drive context, then mounts the EDMS page. */\n@Component({\n selector: 'axm-hcm-profile-documents-panel',\n imports: [AsyncPipe, AXLoadingModule, AXTranslationModule, AXPPageComponentRendererDirective],\n templateUrl: './profile-documents-panel.component.html',\n styleUrl: './profile-documents-panel.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'axm-hcm-profile-documents-panel' },\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMHcmProfileDocumentsPanelComponent,\n },\n ],\n})\nexport class AXMHcmProfileDocumentsPanelComponent extends AXPPageLayoutBaseComponent {\n //#region ----- Inputs -----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n options = input<Record<string, unknown>>({});\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n private readonly queryService = inject(AXPQueryService);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly isLoading = signal(true);\n protected readonly drivePageConfig = signal<Record<string, unknown> | null>(null);\n protected readonly driveComponentKey = DOCUMENT_DRIVE_PAGE_COMPONENT_KEY;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n override async ngOnInit(): Promise<void> {\n await this.loadDriveContext();\n }\n\n protected override getPageTitle(): string {\n return '';\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadDriveContext(): Promise<void> {\n this.isLoading.set(true);\n try {\n const result = await this.queryService.fetch<void, AXMHcmProfileDocumentDriveContext | null>(\n AXPHumanCapitalManagementQueryKeys.Profile.GetMyDocumentDriveContext,\n undefined as void,\n );\n const context = runtimeQueryPayloadData(result);\n if (!context?.refType || !context?.refId) {\n this.drivePageConfig.set(null);\n return;\n }\n\n this.drivePageConfig.set({\n refType: context.refType,\n refId: context.refId,\n allowedDocumentTypeNames: context.documentTypeNames,\n });\n } finally {\n this.isLoading.set(false);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","@if (isLoading()) {\n <div class=\"__loading\">\n <ax-loading></ax-loading>\n </div>\n} @else if (drivePageConfig(); as config) {\n <div\n axp-page-component-renderer\n [componentKey]=\"driveComponentKey\"\n [pageConfig]=\"config\"\n [rootContext]=\"rootContext()\"\n [options]=\"options()\"\n ></div>\n} @else {\n <p class=\"__empty\">{{ '@human-capital-management:profile-page.groups.documents.empty' | translate | async }}</p>\n}\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;AAAA;AA0BA;AAEA;AAEA;AAgBM,MAAO,oCAAqC,SAAQ,0BAA0B,CAAA;AA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AA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iCAAiC,oKAAlF,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAaR,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAfhD,SAAS;+BACE,iCAAiC,EAAA,OAAA,EAClC,CAAC,SAAS,EAAE,eAAe,EAAE,mBAAmB,EAAE,iCAAiC,CAAC,EAAA,eAAA,EAG5E,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,KAAK,EAAE,iCAAiC,EAAE,EAAA,SAAA,EACvC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,oCAAsC;AAClD,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,2cAAA,EAAA,MAAA,EAAA,CAAA,gwFAAA,CAAA,EAAA;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable } from '@angular/core';
3
- import { P as PROFILE_DOCUMENTS_PANEL_COMPONENT_KEY } from './acorex-platform-module-human-capital-management-client-acorex-platform-module-human-capital-management-client-BGYF6PWx.mjs';
3
+ import { P as PROFILE_DOCUMENTS_PANEL_COMPONENT_KEY } from './acorex-platform-module-human-capital-management-client-acorex-platform-module-human-capital-management-client-CUzVvgPy.mjs';
4
4
 
5
5
  //#region ----- Profile documents panel provider -----
6
6
  class AXMHcmProfileDocumentsPanelComponentProvider {
@@ -8,7 +8,7 @@ class AXMHcmProfileDocumentsPanelComponentProvider {
8
8
  return [
9
9
  {
10
10
  key: PROFILE_DOCUMENTS_PANEL_COMPONENT_KEY,
11
- loader: () => import('./acorex-platform-module-human-capital-management-client-profile-documents-panel.component-md5iBTci.mjs').then((module) => module.AXMHcmProfileDocumentsPanelComponent),
11
+ loader: () => import('./acorex-platform-module-human-capital-management-client-profile-documents-panel.component-YvZyK6Y9.mjs').then((module) => module.AXMHcmProfileDocumentsPanelComponent),
12
12
  },
13
13
  ];
14
14
  }
@@ -20,4 +20,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
20
20
  }] });
21
21
 
22
22
  export { AXMHcmProfileDocumentsPanelComponentProvider };
23
- //# sourceMappingURL=acorex-platform-module-human-capital-management-client-profile-documents-panel.component.provider--21c47Ug.mjs.map
23
+ //# sourceMappingURL=acorex-platform-module-human-capital-management-client-profile-documents-panel.component.provider-DkM1NHzm.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-human-capital-management-client-profile-documents-panel.component.provider--21c47Ug.mjs","sources":["../../../../libs/modules/human-capital-management/client/src/lib/features/profile-page/profile-documents-panel.component.provider.ts"],"sourcesContent":["import {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport { PROFILE_DOCUMENTS_PANEL_COMPONENT_KEY } from './profile-documents-panel.constants';\n\n//#region ----- Profile documents panel provider -----\n\n@Injectable()\nexport class AXMHcmProfileDocumentsPanelComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: PROFILE_DOCUMENTS_PANEL_COMPONENT_KEY,\n loader: () =>\n import('./profile-documents-panel.component').then((module) => module.AXMHcmProfileDocumentsPanelComponent),\n },\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAOA;MAGa,4CAA4C,CAAA;AACvD,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,qCAAqC;AAC1C,gBAAA,MAAM,EAAE,MACN,OAAO,yGAAqC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,oCAAoC,CAAC;AAC9G,aAAA;SACF;IACH;8GATW,4CAA4C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA5C,4CAA4C,EAAA,CAAA,CAAA;;2FAA5C,4CAA4C,EAAA,UAAA,EAAA,CAAA;kBADxD;;;"}
1
+ {"version":3,"file":"acorex-platform-module-human-capital-management-client-profile-documents-panel.component.provider-DkM1NHzm.mjs","sources":["../../../../libs/modules/human-capital-management/client/src/lib/features/profile-page/profile-documents-panel.component.provider.ts"],"sourcesContent":["import {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport { PROFILE_DOCUMENTS_PANEL_COMPONENT_KEY } from './profile-documents-panel.constants';\n\n//#region ----- Profile documents panel provider -----\n\n@Injectable()\nexport class AXMHcmProfileDocumentsPanelComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: PROFILE_DOCUMENTS_PANEL_COMPONENT_KEY,\n loader: () =>\n import('./profile-documents-panel.component').then((module) => module.AXMHcmProfileDocumentsPanelComponent),\n },\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAOA;MAGa,4CAA4C,CAAA;AACvD,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,qCAAqC;AAC1C,gBAAA,MAAM,EAAE,MACN,OAAO,yGAAqC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,oCAAoC,CAAC;AAC9G,aAAA;SACF;IACH;8GATW,4CAA4C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA5C,4CAA4C,EAAA,CAAA,CAAA;;2FAA5C,4CAA4C,EAAA,UAAA,EAAA,CAAA;kBADxD;;;"}
@@ -39,7 +39,10 @@ class StartLeaveRequestFlowCommand {
39
39
  const leaveTypeTitleForWorkflow = this.coerceLeaveTypeTitleForWorkflow(flowInput?.leaveTypeTitle);
40
40
  const leaveTypeTitleDisplay = this.resolveFlowText(flowInput?.leaveTypeTitle);
41
41
  if (!workflowId || !leaveTypeId) {
42
- return { success: false, message: { text: 'Missing workflow or leave type context.' } };
42
+ return {
43
+ success: false,
44
+ message: { text: '@human-capital-management:leave-requests.messages.missing-workflow-context' },
45
+ };
43
46
  }
44
47
  try {
45
48
  const openRequests = employeeId
@@ -73,7 +76,7 @@ class StartLeaveRequestFlowCommand {
73
76
  if (!startResult.success) {
74
77
  this.toastService.show({
75
78
  color: 'danger',
76
- title: 'Workflow Execution Failed',
79
+ title: await this.translationService.translateAsync('@human-capital-management:leave-requests.messages.workflow-failed-title'),
77
80
  content: startResult.error ?? 'Unknown error',
78
81
  closeButton: true,
79
82
  timeOut: 5000,
@@ -87,7 +90,7 @@ class StartLeaveRequestFlowCommand {
87
90
  console.error('[StartLeaveRequestFlowCommand]', error);
88
91
  this.toastService.show({
89
92
  color: 'danger',
90
- title: 'Workflow Execution Error',
93
+ title: await this.translationService.translateAsync('@human-capital-management:leave-requests.messages.workflow-error-title'),
91
94
  content: message,
92
95
  closeButton: true,
93
96
  timeOut: 5000,
@@ -245,4 +248,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
245
248
  }] });
246
249
 
247
250
  export { StartLeaveRequestFlowCommand };
248
- //# sourceMappingURL=acorex-platform-module-human-capital-management-client-start-leave-request-flow.command-BcyCI_vr.mjs.map
251
+ //# sourceMappingURL=acorex-platform-module-human-capital-management-client-start-leave-request-flow.command-CkJjBkth.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-human-capital-management-client-start-leave-request-flow.command-CkJjBkth.mjs","sources":["../../../../libs/modules/human-capital-management/client/src/lib/features/leave-request/commands/start-leave-request-flow.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPRuntimeCommandResult,\n AXPSystemStatusType,\n runtimeQueryCollectionData,\n} from '@acorex-platform/framework-shared/core';\nimport { getRecordWorkflowInstanceId } from '@acorex-platform/framework-shared/entity';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXMultiLanguageString, AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService, AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport { ENTITY_QUERY_DEFAULT, ENTITY_UPDATE_DEFAULT } from '@acorex-platform/framework-shared/runtime';\n\nimport {\n AXP_WORKFLOW_ENGINE,\n AXPWorkflowEngine,\n AXPWorkflowManager,\n} from '@acorex-platform/framework-client/workflow';\nimport { inject, Injectable } from '@angular/core';\nimport { RootConfig } from '@acorex-platform/module-human-capital-management-client/contracts';\nimport { AXMLeaveRequestOpenStatusIds } from '@acorex-platform/module-human-capital-management-client/contracts';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface StartLeaveRequestFlowInput {\n workflowId?: string;\n employeeId?: string;\n employeeDisplayName?: string;\n leaveTypeId?: string;\n leaveTypeTitle?: AXMultiLanguageString | string;\n options?: StartLeaveRequestFlowOptions;\n}\n\nexport interface StartLeaveRequestFlowOptions {\n workflowId: string;\n input: {\n employeeId?: string;\n employeeDisplayName?: string;\n leaveTypeId: string;\n leaveTypeTitle?: AXMultiLanguageString | string;\n };\n}\n\ninterface OpenLeaveRequestRow {\n id: string;\n workflowInfo?: { instanceId?: string | null; correlationId?: string | null };\n leaveType?: { title?: AXMultiLanguageString | string };\n}\n\n//#endregion\n\n/**\n * Starts the leave request workflow after ensuring at most one pending request per employee and leave type.\n */\n@Injectable({ providedIn: 'root' })\nexport class StartLeaveRequestFlowCommand implements AXPCommand<StartLeaveRequestFlowInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly dialogService = inject(AXDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly entityService = inject(AXPEntityService);\n private readonly queryService = inject(AXPQueryService);\n private readonly commandService = inject(AXPCommandService);\n private readonly workflowManager = inject(AXPWorkflowManager);\n private readonly workflowEngine = inject(AXP_WORKFLOW_ENGINE, { optional: true });\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(input: StartLeaveRequestFlowInput): AXPCommandExecuteResultPromise<void> {\n const options = (input?.options ?? input) as StartLeaveRequestFlowOptions;\n const flowInput = options.input;\n const workflowId = options.workflowId?.trim();\n const leaveTypeId = flowInput?.leaveTypeId?.trim();\n const employeeId = this.resolveFlowText(flowInput?.employeeId);\n const employeeDisplayName = this.resolveFlowText(flowInput?.employeeDisplayName);\n const leaveTypeTitleForWorkflow = this.coerceLeaveTypeTitleForWorkflow(flowInput?.leaveTypeTitle);\n const leaveTypeTitleDisplay = this.resolveFlowText(flowInput?.leaveTypeTitle);\n\n if (!workflowId || !leaveTypeId) {\n return {\n success: false,\n message: { text: '@human-capital-management:leave-requests.messages.missing-workflow-context' },\n };\n }\n\n try {\n const openRequests = employeeId\n ? await this.findOpenLeaveRequests(employeeId, leaveTypeId)\n : [];\n const orphanInstanceIds = employeeId\n ? await this.findOrphanRunningWorkflowInstanceIds(\n employeeId,\n leaveTypeId,\n workflowId,\n openRequests,\n )\n : [];\n\n if (openRequests.length > 0 || orphanInstanceIds.length > 0) {\n const confirmed = await this.confirmReplace(leaveTypeTitleDisplay);\n if (!confirmed) {\n return { success: false };\n }\n await this.closeOpenRuns(openRequests, orphanInstanceIds);\n }\n\n const correlationId = employeeId\n ? this.buildCorrelationId(employeeId, leaveTypeId, workflowId)\n : undefined;\n\n const startResult = await this.workflowManager.start(workflowId, {\n leaveTypeId,\n ...(leaveTypeTitleForWorkflow != null ? { leaveTypeTitle: leaveTypeTitleForWorkflow } : {}),\n ...(employeeId ? { employeeId, employeeDisplayName } : {}),\n ...(employeeId\n ? {\n refId: employeeId,\n refType: `${RootConfig.module.name}.Employee`,\n correlationId,\n }\n : {}),\n });\n\n if (!startResult.success) {\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync(\n '@human-capital-management:leave-requests.messages.workflow-failed-title',\n ),\n content: startResult.error ?? 'Unknown error',\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: startResult.error ?? 'Unknown error' } };\n }\n\n return { success: true, kind: 'object', data: undefined };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Unknown error';\n console.error('[StartLeaveRequestFlowCommand]', error);\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync(\n '@human-capital-management:leave-requests.messages.workflow-error-title',\n ),\n content: message,\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: message } };\n }\n }\n\n //#endregion\n\n //#region ---- Open-run detection ----\n\n private async findOpenLeaveRequests(\n employeeId: string,\n leaveTypeId: string,\n ): Promise<OpenLeaveRequestRow[]> {\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.leaveRequest.name)\n .data()\n .query({\n skip: 0,\n take: 10,\n filter: {\n logic: 'and',\n filters: [\n { field: 'employeeId', operator: { type: 'equal' }, value: employeeId },\n { field: 'leaveTypeId', operator: { type: 'equal' }, value: leaveTypeId },\n {\n field: 'statusId',\n operator: { type: 'in' },\n value: [...AXMLeaveRequestOpenStatusIds],\n },\n ],\n },\n });\n\n return (page.items ?? []) as OpenLeaveRequestRow[];\n }\n\n private async findOrphanRunningWorkflowInstanceIds(\n employeeId: string,\n leaveTypeId: string,\n workflowId: string,\n openRequests: OpenLeaveRequestRow[],\n ): Promise<string[]> {\n const linkedInstanceIds = new Set(\n openRequests\n .map((row) => getRecordWorkflowInstanceId(row))\n .filter((id): id is string => !!id),\n );\n\n try {\n const result = await this.queryService.fetch(ENTITY_QUERY_DEFAULT, {\n entity: 'WorkflowManagement.WorkflowInstance',\n skip: 0,\n take: 50,\n filter: {\n logic: 'and',\n filters: [\n {\n field: 'definitionId',\n operator: { type: 'equal' },\n value: workflowId,\n },\n { field: 'status', operator: { type: 'equal' }, value: 'Running' },\n ],\n },\n });\n\n const items = (runtimeQueryCollectionData(result)?.items ?? []) as Array<{\n id?: string;\n workflowInstance?: { workflowState?: { input?: Record<string, unknown> } };\n }>;\n\n return items\n .filter((row) => {\n const id = row.id?.trim();\n if (!id || linkedInstanceIds.has(id)) {\n return false;\n }\n const runInput = row.workflowInstance?.workflowState?.input ?? {};\n return runInput['employeeId'] === employeeId && runInput['leaveTypeId'] === leaveTypeId;\n })\n .map((row) => row.id as string);\n } catch {\n return [];\n }\n }\n\n //#endregion\n\n //#region ---- Close and replace ----\n\n private async confirmReplace(leaveTypeTitle: string | undefined): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@human-capital-management:leave-requests.messages.replace-open.confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@human-capital-management:leave-requests.messages.replace-open.confirm.message',\n {\n params: {\n leaveTypeTitle: String(leaveTypeTitle ?? '').trim() || '—',\n },\n },\n );\n const result = await this.dialogService.confirm(title, message, 'warning', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n private async closeOpenRuns(\n openRequests: OpenLeaveRequestRow[],\n orphanInstanceIds: string[],\n ): Promise<void> {\n const data = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.leaveRequest.name)\n .data();\n\n const supersedeNote = 'Closed to start a new leave request run.';\n\n for (const request of openRequests) {\n await data.update(request.id, {\n statusId: AXPSystemStatusType.Cancelled,\n reason: supersedeNote,\n } as never);\n\n const instanceId = getRecordWorkflowInstanceId(request);\n if (instanceId) {\n await this.cancelWorkflowInstance(instanceId);\n }\n }\n\n for (const instanceId of orphanInstanceIds) {\n await this.cancelWorkflowInstance(instanceId);\n }\n }\n\n private async cancelWorkflowInstance(instanceId: string): Promise<void> {\n const engine = this.workflowEngine as AXPWorkflowEngine | null;\n if (engine?.cancelInstance) {\n await engine.cancelInstance(instanceId, 'superseded');\n return;\n }\n\n const now = new Date().toISOString();\n try {\n await this.commandService.execute(ENTITY_UPDATE_DEFAULT, {\n entity: 'WorkflowManagement.WorkflowInstance',\n id: instanceId,\n status: 'Finished',\n subStatus: 'Cancelled',\n finishedAt: now,\n updatedAt: now,\n });\n } catch (error: unknown) {\n console.warn('[StartLeaveRequestFlowCommand] Failed to cancel workflow instance:', instanceId, error);\n }\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n private resolveFlowText(value: unknown): string {\n if (value == null || value === false) {\n return '';\n }\n if (typeof value === 'string') {\n return value.trim();\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value).trim();\n }\n return resolveMultiLanguageString(value as never, this.translationService.getActiveLang()).trim();\n }\n\n /** Preserves multi-language leave type titles on the workflow instance for locale-aware task labels. */\n private coerceLeaveTypeTitleForWorkflow(\n value: AXMultiLanguageString | string | undefined,\n ): AXMultiLanguageString | string | undefined {\n if (value == null) {\n return undefined;\n }\n if (typeof value === 'object') {\n return value;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n }\n\n private buildCorrelationId(employeeId: string, leaveTypeId: string, workflowId: string): string {\n return `${RootConfig.module.name}.Employee:${employeeId}:${leaveTypeId}:${workflowId}`;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuDA;AAEA;;AAEG;MAEU,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QA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AE,UAAkB,EAAA;AACpF,QAAA,OAAO,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,UAAA,EAAa,UAAU,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA,EAAI,UAAU,EAAE;IACxF;8GA5RW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADf,MAAM,EAAA,CAAA,CAAA;;2FACnB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -41,7 +41,10 @@ class StartLifecycleEventFlowCommand {
41
41
  const assessmentCaseTitle = this.resolveFlowText(flowInput?.assessmentCaseTitle) ||
42
42
  this.buildAssessmentCaseTitle(eventTypeTitleDisplay, employeeDisplayName);
43
43
  if (!workflowId || !employeeId || !eventTypeId) {
44
- return { success: false, message: { text: 'Missing workflow or employee context.' } };
44
+ return {
45
+ success: false,
46
+ message: { text: '@human-capital-management:lifecycle-events.messages.missing-workflow-context' },
47
+ };
45
48
  }
46
49
  try {
47
50
  const openEvents = await this.findOpenLifecycleEvents(employeeId, eventTypeId);
@@ -68,7 +71,7 @@ class StartLifecycleEventFlowCommand {
68
71
  if (!startResult.success) {
69
72
  this.toastService.show({
70
73
  color: 'danger',
71
- title: 'Workflow Execution Failed',
74
+ title: await this.translationService.translateAsync('@human-capital-management:lifecycle-events.messages.workflow-failed-title'),
72
75
  content: startResult.error ?? 'Unknown error',
73
76
  closeButton: true,
74
77
  timeOut: 5000,
@@ -82,7 +85,7 @@ class StartLifecycleEventFlowCommand {
82
85
  console.error('[StartLifecycleEventFlowCommand]', error);
83
86
  this.toastService.show({
84
87
  color: 'danger',
85
- title: 'Workflow Execution Error',
88
+ title: await this.translationService.translateAsync('@human-capital-management:lifecycle-events.messages.workflow-error-title'),
86
89
  content: message,
87
90
  closeButton: true,
88
91
  timeOut: 5000,
@@ -247,4 +250,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
247
250
  }] });
248
251
 
249
252
  export { StartLifecycleEventFlowCommand };
250
- //# sourceMappingURL=acorex-platform-module-human-capital-management-client-start-lifecycle-event-flow.command-Cp_7ZyWU.mjs.map
253
+ //# sourceMappingURL=acorex-platform-module-human-capital-management-client-start-lifecycle-event-flow.command-CIHvo2QS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-human-capital-management-client-start-lifecycle-event-flow.command-CIHvo2QS.mjs","sources":["../../../../libs/modules/human-capital-management/client/src/lib/features/lifecycle-event/commands/start-lifecycle-event-flow.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPRuntimeCommandResult,\n AXPSystemStatusType,\n runtimeQueryCollectionData,\n} from '@acorex-platform/framework-shared/core';\nimport { getRecordWorkflowInstanceId } from '@acorex-platform/framework-shared/entity';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService, resolveMultiLanguageString, type AXMultiLanguageString } from '@acorex/core/translation';\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService, AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport { ENTITY_QUERY_DEFAULT, ENTITY_UPDATE_DEFAULT } from '@acorex-platform/framework-shared/runtime';\n\nimport {\n AXP_WORKFLOW_ENGINE,\n AXPWorkflowEngine,\n AXPWorkflowManager,\n} from '@acorex-platform/framework-client/workflow';\nimport { inject, Injectable } from '@angular/core';\nimport { RootConfig } from '@acorex-platform/module-human-capital-management-client/contracts';\nimport {\n AXMLifecycleEventOpenStatusIds,\n} from '@acorex-platform/module-human-capital-management-client/contracts';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface StartLifecycleEventFlowInput {\n workflowId?: string;\n employeeId?: string;\n employeeDisplayName?: string;\n eventTypeId?: string;\n eventTypeTitle?: AXMultiLanguageString | string;\n questionnaireId?: string;\n targetEmployeeStatusId?: string;\n effectiveDate?: string;\n options?: StartLifecycleEventFlowOptions;\n}\n\nexport interface StartLifecycleEventFlowOptions {\n workflowId: string;\n input: {\n employeeId: string;\n employeeDisplayName: string;\n eventTypeId: string;\n eventTypeTitle?: AXMultiLanguageString | string;\n questionnaireId: string;\n effectiveDate?: string;\n /** Precomposed case/popup title; computed by StartFlow when omitted. */\n assessmentCaseTitle?: string;\n };\n}\n\ninterface OpenLifecycleEventRow {\n id: string;\n workflowInfo?: { instanceId?: string | null; correlationId?: string | null };\n eventType?: { title?: unknown };\n}\n\n//#endregion\n\n/**\n * Starts the guided lifecycle workflow after ensuring at most one in-progress event per employee and event type.\n */\n@Injectable({ providedIn: 'root' })\nexport class StartLifecycleEventFlowCommand implements AXPCommand<StartLifecycleEventFlowInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly dialogService = inject(AXDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly entityService = inject(AXPEntityService);\n private readonly queryService = inject(AXPQueryService);\n private readonly commandService = inject(AXPCommandService);\n private readonly workflowManager = inject(AXPWorkflowManager);\n private readonly workflowEngine = inject(AXP_WORKFLOW_ENGINE, { optional: true });\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(input: StartLifecycleEventFlowInput): AXPCommandExecuteResultPromise<void> {\n const options = (input?.options ?? input) as StartLifecycleEventFlowOptions;\n const flowInput = options.input;\n const workflowId = options.workflowId?.trim();\n const employeeId = this.resolveFlowText(flowInput?.employeeId);\n const eventTypeId = flowInput?.eventTypeId?.trim();\n const employeeDisplayName = this.resolveFlowText(flowInput?.employeeDisplayName);\n const eventTypeTitleForWorkflow = this.coerceEventTypeTitleForWorkflow(flowInput?.eventTypeTitle);\n const eventTypeTitleDisplay = this.resolveFlowText(flowInput?.eventTypeTitle);\n const assessmentCaseTitle =\n this.resolveFlowText(flowInput?.assessmentCaseTitle) ||\n this.buildAssessmentCaseTitle(eventTypeTitleDisplay, employeeDisplayName);\n\n if (!workflowId || !employeeId || !eventTypeId) {\n return {\n success: false,\n message: { text: '@human-capital-management:lifecycle-events.messages.missing-workflow-context' },\n };\n }\n\n try {\n const openEvents = await this.findOpenLifecycleEvents(employeeId, eventTypeId);\n const orphanInstanceIds = await this.findOrphanRunningWorkflowInstanceIds(\n employeeId,\n eventTypeId,\n workflowId,\n openEvents,\n );\n\n if (openEvents.length > 0 || orphanInstanceIds.length > 0) {\n const confirmed = await this.confirmReplace(eventTypeTitleDisplay);\n if (!confirmed) {\n return { success: false };\n }\n await this.closeOpenRuns(openEvents, orphanInstanceIds);\n }\n\n const startResult = await this.workflowManager.start(workflowId, {\n employeeId,\n employeeDisplayName,\n eventTypeId: flowInput.eventTypeId,\n ...(eventTypeTitleForWorkflow != null ? { eventTypeTitle: eventTypeTitleForWorkflow } : {}),\n assessmentCaseTitle,\n questionnaireId: flowInput.questionnaireId,\n ...(flowInput.effectiveDate ? { effectiveDate: flowInput.effectiveDate } : {}),\n refId: employeeId,\n refType: `${RootConfig.module.name}.Employee`,\n correlationId: this.buildCorrelationId(employeeId, eventTypeId, workflowId),\n });\n\n if (!startResult.success) {\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync(\n '@human-capital-management:lifecycle-events.messages.workflow-failed-title',\n ),\n content: startResult.error ?? 'Unknown error',\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: startResult.error ?? 'Unknown error' } };\n }\n\n return { success: true, kind: 'object', data: undefined };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Unknown error';\n console.error('[StartLifecycleEventFlowCommand]', error);\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync(\n '@human-capital-management:lifecycle-events.messages.workflow-error-title',\n ),\n content: message,\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: message } };\n }\n }\n\n //#endregion\n\n //#region ---- Open-run detection ----\n\n private async findOpenLifecycleEvents(\n employeeId: string,\n eventTypeId: string,\n ): Promise<OpenLifecycleEventRow[]> {\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.lifecycleEvent.name)\n .data()\n .query({\n skip: 0,\n take: 10,\n filter: {\n logic: 'and',\n filters: [\n { field: 'employeeId', operator: { type: 'equal' }, value: employeeId },\n { field: 'eventTypeId', operator: { type: 'equal' }, value: eventTypeId },\n {\n field: 'statusId',\n operator: { type: 'in' },\n value: [...AXMLifecycleEventOpenStatusIds],\n },\n ],\n },\n });\n\n return (page.items ?? []) as OpenLifecycleEventRow[];\n }\n\n private async findOrphanRunningWorkflowInstanceIds(\n employeeId: string,\n eventTypeId: string,\n workflowId: string,\n openEvents: OpenLifecycleEventRow[],\n ): Promise<string[]> {\n const linkedInstanceIds = new Set(\n openEvents\n .map((row) => getRecordWorkflowInstanceId(row))\n .filter((id): id is string => !!id),\n );\n\n try {\n const result = await this.queryService.fetch(ENTITY_QUERY_DEFAULT, {\n entity: 'WorkflowManagement.WorkflowInstance',\n skip: 0,\n take: 50,\n filter: {\n logic: 'and',\n filters: [\n {\n field: 'definitionId',\n operator: { type: 'equal' },\n value: workflowId,\n },\n { field: 'status', operator: { type: 'equal' }, value: 'Running' },\n ],\n },\n });\n\n const items = (runtimeQueryCollectionData(result)?.items ?? []) as Array<{\n id?: string;\n workflowInstance?: { workflowState?: { input?: Record<string, unknown> } };\n }>;\n\n return items\n .filter((row) => {\n const id = row.id?.trim();\n if (!id || linkedInstanceIds.has(id)) {\n return false;\n }\n const runInput = row.workflowInstance?.workflowState?.input ?? {};\n return runInput['employeeId'] === employeeId && runInput['eventTypeId'] === eventTypeId;\n })\n .map((row) => row.id as string);\n } catch {\n return [];\n }\n }\n\n //#endregion\n\n //#region ---- Close and replace ----\n\n private async confirmReplace(eventTypeTitle: string | undefined): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@human-capital-management:lifecycle-events.messages.replace-open.confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@human-capital-management:lifecycle-events.messages.replace-open.confirm.message',\n {\n params: {\n eventTypeTitle: String(eventTypeTitle ?? '').trim() || '—',\n },\n },\n );\n const result = await this.dialogService.confirm(title, message, 'warning', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n private async closeOpenRuns(\n openEvents: OpenLifecycleEventRow[],\n orphanInstanceIds: string[],\n ): Promise<void> {\n const data = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.lifecycleEvent.name)\n .data();\n\n const supersedeNote = 'Closed to start a new lifecycle run.';\n\n for (const event of openEvents) {\n await data.update(event.id, {\n statusId: AXPSystemStatusType.Cancelled,\n notes: supersedeNote,\n } as never);\n\n const instanceId = getRecordWorkflowInstanceId(event);\n if (instanceId) {\n await this.cancelWorkflowInstance(instanceId);\n }\n }\n\n for (const instanceId of orphanInstanceIds) {\n await this.cancelWorkflowInstance(instanceId);\n }\n }\n\n private async cancelWorkflowInstance(instanceId: string): Promise<void> {\n const engine = this.workflowEngine as AXPWorkflowEngine | null;\n if (engine?.cancelInstance) {\n await engine.cancelInstance(instanceId, 'superseded');\n return;\n }\n\n const now = new Date().toISOString();\n try {\n await this.commandService.execute(ENTITY_UPDATE_DEFAULT, {\n entity: 'WorkflowManagement.WorkflowInstance',\n id: instanceId,\n status: 'Finished',\n subStatus: 'Cancelled',\n finishedAt: now,\n updatedAt: now,\n });\n } catch (error: unknown) {\n console.warn('[StartLifecycleEventFlowCommand] Failed to cancel workflow instance:', instanceId, error);\n }\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /** Normalizes workflow start input that may be plain text, ML, or a failed expression (`false`). */\n private resolveFlowText(value: unknown): string {\n if (value == null || value === false) {\n return '';\n }\n if (typeof value === 'string') {\n return value.trim();\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value).trim();\n }\n return resolveMultiLanguageString(value as never, this.translationService.getActiveLang()).trim();\n }\n\n /** Preserves multi-language event type titles on the workflow instance for locale-aware task labels. */\n private coerceEventTypeTitleForWorkflow(\n value: AXMultiLanguageString | string | undefined,\n ): AXMultiLanguageString | string | undefined {\n if (value == null) {\n return undefined;\n }\n if (typeof value === 'object') {\n return value;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n }\n\n private buildAssessmentCaseTitle(eventTypeTitle: string, employeeDisplayName: string): string {\n if (eventTypeTitle && employeeDisplayName) {\n return `${eventTypeTitle} — ${employeeDisplayName}`;\n }\n return eventTypeTitle || employeeDisplayName;\n }\n\n private buildCorrelationId(employeeId: string, eventTypeId: string, workflowId: string): string {\n return `${RootConfig.module.name}.Employee:${employeeId}:${eventTypeId}:${workflowId}`;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgEA;AAEA;;AAEG;MAEU,8BAA8B,CAAA;AAD3C,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC;AACtC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAC5C,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mBAAmB,EAAE,EA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EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,UAAA,EAAa,UAAU,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA,EAAI,UAAU,EAAE;IACxF;8GA/RW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cADjB,MAAM,EAAA,CAAA,CAAA;;2FACnB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -1,3 +1,3 @@
1
- export { a as AXMHumanCapitalManagementModule, b as AXMLeaveRequestBadgeProvider, c as AXMLeaveRequestResourceAppointmentProvider, d as AXMLeaveRequestTaskPopoverComponent, e as AXPHumanCapitalManagementFeatureDefinitionProvider, f as AXPLeaveRequestDialogService } from './acorex-platform-module-human-capital-management-client-acorex-platform-module-human-capital-management-client-BGYF6PWx.mjs';
1
+ export { a as AXMHumanCapitalManagementModule, b as AXMLeaveRequestBadgeProvider, c as AXMLeaveRequestResourceAppointmentProvider, d as AXMLeaveRequestTaskPopoverComponent, e as AXPHumanCapitalManagementFeatureDefinitionProvider, f as AXPLeaveRequestDialogService } from './acorex-platform-module-human-capital-management-client-acorex-platform-module-human-capital-management-client-CUzVvgPy.mjs';
2
2
  export { HumanCapitalManagementManifest } from '@acorex-platform/module-human-capital-management-client/contracts';
3
3
  //# sourceMappingURL=acorex-platform-module-human-capital-management-client.mjs.map