@acorex/modules 21.0.0-next.14 → 21.0.0-next.16
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/assessment-management/README.md +11 -0
- package/assessment-management/index.d.ts +122 -24
- package/common/index.d.ts +6 -1
- package/data-management/index.d.ts +67 -48
- package/document-management/index.d.ts +261 -76
- package/fesm2022/{acorex-modules-assessment-management-acorex-modules-assessment-management-ClgGS32i.mjs → acorex-modules-assessment-management-acorex-modules-assessment-management-HgaOIA2U.mjs} +950 -468
- package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-HgaOIA2U.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-column.component-UmXUT6Xn.mjs → acorex-modules-assessment-management-answers-viewer-widget-column.component-DyxE9Xec.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-column.component-UmXUT6Xn.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-column.component-DyxE9Xec.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-edit.component-vVfXtden.mjs → acorex-modules-assessment-management-answers-viewer-widget-edit.component-DC2Ep3r1.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-edit.component-vVfXtden.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-edit.component-DC2Ep3r1.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-view.component-C75zxKgV.mjs → acorex-modules-assessment-management-answers-viewer-widget-view.component-iKqac5PE.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-view.component-C75zxKgV.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-view.component-iKqac5PE.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-assessment-case.entity-CjhC5YAF.mjs → acorex-modules-assessment-management-assessment-case.entity-CsCMlcvF.mjs} +3 -3
- package/fesm2022/acorex-modules-assessment-management-assessment-case.entity-CsCMlcvF.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-B_IDiEzp.mjs → acorex-modules-assessment-management-assessment-session.entity-BkNVe3FO.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-B_IDiEzp.mjs.map → acorex-modules-assessment-management-assessment-session.entity-BkNVe3FO.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-zT5u3h_s.mjs → acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs} +32 -33
- package/fesm2022/acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-BIXy9eut.mjs → acorex-modules-assessment-management-preview-questionnaire.command-NcZlE6DU.mjs} +24 -8
- package/fesm2022/acorex-modules-assessment-management-preview-questionnaire.command-NcZlE6DU.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-BWYLXvCp.mjs → acorex-modules-assessment-management-question-bank-item.entity-vNxSmJuv.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-BWYLXvCp.mjs.map → acorex-modules-assessment-management-question-bank-item.entity-vNxSmJuv.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-edit.component-3wVcKQGE.mjs → acorex-modules-assessment-management-questionnaire-builder-edit.component-CbfHOFT1.mjs} +20 -4
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-edit.component-CbfHOFT1.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-view.component-meuUo7Vx.mjs → acorex-modules-assessment-management-questionnaire-builder-view.component-DDqDjzwH.mjs} +3 -3
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-view.component-DDqDjzwH.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder.component-CGgUUkOY.mjs → acorex-modules-assessment-management-questionnaire-builder.component-BOnwdWj7.mjs} +11 -5
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder.component-BOnwdWj7.mjs.map +1 -0
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-BX8Q2Kfn.mjs +392 -0
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-BX8Q2Kfn.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer.service-D3k3J93r.mjs → acorex-modules-assessment-management-questionnaire-viewer.service-CSdVNxV2.mjs} +21 -6
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer.service-CSdVNxV2.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-questionnaire.entity-C8sX0d_p.mjs → acorex-modules-assessment-management-questionnaire.entity-DFQIvlza.mjs} +138 -23
- package/fesm2022/acorex-modules-assessment-management-questionnaire.entity-DFQIvlza.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-Czq7cj9R.mjs → acorex-modules-assessment-management-view-session-answers.command-CMmE72Kt.mjs} +3 -3
- package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-Czq7cj9R.mjs.map → acorex-modules-assessment-management-view-session-answers.command-CMmE72Kt.mjs.map} +1 -1
- package/fesm2022/acorex-modules-assessment-management.mjs +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-DHSmTid9.mjs → acorex-modules-auth-acorex-modules-auth-CZuDhBx5.mjs} +15 -15
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-CZuDhBx5.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BgnYEXEl.mjs → acorex-modules-auth-app-chooser.component-DJE47I8p.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BgnYEXEl.mjs.map → acorex-modules-auth-app-chooser.component-DJE47I8p.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-BvhI4dAz.mjs → acorex-modules-auth-login.module-CI_lkyb7.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-BvhI4dAz.mjs.map → acorex-modules-auth-login.module-CI_lkyb7.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-D4zZR1Gr.mjs → acorex-modules-auth-master.layout-CdY380qS.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-D4zZR1Gr.mjs.map → acorex-modules-auth-master.layout-CdY380qS.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-DniYj9Tx.mjs → acorex-modules-auth-oauth-callback.component-BvPk9b3e.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-DniYj9Tx.mjs.map → acorex-modules-auth-oauth-callback.component-BvPk9b3e.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-mvQ4KY3g.mjs → acorex-modules-auth-password.component-CefISnvd.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-mvQ4KY3g.mjs.map → acorex-modules-auth-password.component-CefISnvd.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-CZkZAj32.mjs → acorex-modules-auth-password.component-Dw_v_EFQ.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-CZkZAj32.mjs.map → acorex-modules-auth-password.component-Dw_v_EFQ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-6Ulmk7si.mjs → acorex-modules-auth-routes-CwcJHbAi.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-6Ulmk7si.mjs.map → acorex-modules-auth-routes-CwcJHbAi.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-tenant-chooser.component-3OkOSTkm.mjs → acorex-modules-auth-tenant-chooser.component-DFhTYEDt.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-tenant-chooser.component-3OkOSTkm.mjs.map → acorex-modules-auth-tenant-chooser.component-DFhTYEDt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-DtrVmYAu.mjs → acorex-modules-auth-two-factor.module-BOZB6sLo.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-DtrVmYAu.mjs.map → acorex-modules-auth-two-factor.module-BOZB6sLo.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-user-sessions.component-Co18_D9H.mjs → acorex-modules-auth-user-sessions.component-BnrnXg4G.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-user-sessions.component-Co18_D9H.mjs.map → acorex-modules-auth-user-sessions.component-BnrnXg4G.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-calendar-management.mjs +4 -3
- package/fesm2022/acorex-modules-calendar-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-common.mjs +35 -29
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-data-management.mjs +333 -342
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-document-management.mjs +2716 -527
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs +381 -0
- package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs → acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs} +2 -2
- package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs → acorex-modules-human-capital-management-leave-type.entity-YitcNesR.mjs} +6 -2
- package/fesm2022/acorex-modules-human-capital-management-leave-type.entity-YitcNesR.mjs.map +1 -0
- package/fesm2022/acorex-modules-human-capital-management.mjs +696 -351
- package/fesm2022/acorex-modules-human-capital-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-locale-management.mjs +11 -2
- package/fesm2022/acorex-modules-locale-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-BRVfUYiM.mjs → acorex-modules-settings-management-acorex-modules-settings-management-Dpjfgmg9.mjs} +6 -6
- package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-BRVfUYiM.mjs.map → acorex-modules-settings-management-acorex-modules-settings-management-Dpjfgmg9.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-WSxrvAsV.mjs → acorex-modules-settings-management-permission-definition.provider-nYV8iDwJ.mjs} +2 -2
- package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-WSxrvAsV.mjs.map → acorex-modules-settings-management-permission-definition.provider-nYV8iDwJ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-page.component-MYnJYUxE.mjs → acorex-modules-settings-management-setting-page.component-B1lhCtl_.mjs} +2 -2
- package/fesm2022/{acorex-modules-settings-management-setting-page.component-MYnJYUxE.mjs.map → acorex-modules-settings-management-setting-page.component-B1lhCtl_.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-view.component-Cq80snth.mjs → acorex-modules-settings-management-setting-view.component-CAX1kFy2.mjs} +2 -2
- package/fesm2022/{acorex-modules-settings-management-setting-view.component-Cq80snth.mjs.map → acorex-modules-settings-management-setting-view.component-CAX1kFy2.mjs.map} +1 -1
- package/fesm2022/acorex-modules-settings-management.mjs +1 -1
- package/fesm2022/acorex-modules-system-insight.mjs +4 -3
- package/fesm2022/acorex-modules-system-insight.mjs.map +1 -1
- package/fesm2022/{acorex-modules-task-management-task-board.page-B_S373L-.mjs → acorex-modules-task-management-task-board.page-CuP9U1h8.mjs} +60 -53
- package/fesm2022/acorex-modules-task-management-task-board.page-CuP9U1h8.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +11 -39
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workflow-management-cartable-page.component-Bso0XRkJ.mjs +296 -0
- package/fesm2022/acorex-modules-workflow-management-cartable-page.component-Bso0XRkJ.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management-index-xB36g4F1.mjs +469 -0
- package/fesm2022/acorex-modules-workflow-management-index-xB36g4F1.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management.mjs +2507 -681
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/human-capital-management/index.d.ts +79 -19
- package/package.json +16 -16
- package/task-management/index.d.ts +1 -12
- package/workflow-management/index.d.ts +265 -220
- package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-ClgGS32i.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-assessment-case.entity-CjhC5YAF.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-fill-assessment-session.command-zT5u3h_s.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-preview-questionnaire.command-BIXy9eut.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-edit.component-3wVcKQGE.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-view.component-meuUo7Vx.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder.component-CGgUUkOY.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-kVnWtedV.mjs +0 -416
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-kVnWtedV.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer.service-D3k3J93r.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire.entity-C8sX0d_p.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-DHSmTid9.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs.map +0 -1
- package/fesm2022/acorex-modules-task-management-task-board.page-B_S373L-.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-activity-definition.entity-BbBEPTBa.mjs +0 -258
- package/fesm2022/acorex-modules-workflow-management-activity-definition.entity-BbBEPTBa.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-workflow-definition.entity-nJMBL0qt.mjs +0 -371
- package/fesm2022/acorex-modules-workflow-management-workflow-definition.entity-nJMBL0qt.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-workflow-instance.entity-Pso0oRN5.mjs +0 -313
- package/fesm2022/acorex-modules-workflow-management-workflow-instance.entity-Pso0oRN5.mjs.map +0 -1
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import * as i4 from '@acorex/core/translation';
|
|
6
|
-
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
1
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
2
|
+
import { AXPWorkflowTaskProvider, AXP_WORKFLOW_TASK_PROVIDER } from '@acorex/modules/task-management';
|
|
3
|
+
import { AXPSystemStatuses, AXPStatusProvider, systemStatusToDefinition, AXPSystemStatusType, AXP_STATUS_PROVIDERS, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
|
4
|
+
import { AXPEntityService, AXPEntityDefinitionRegistryService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
7
5
|
import { AXPCommandExecutor, AXPCommandEventsService, AXPRuntimeModule, provideCommandSetups } from '@acorex/platform/runtime';
|
|
8
|
-
import * as i3 from '@angular/common';
|
|
9
|
-
import { CommonModule } from '@angular/common';
|
|
10
6
|
import * as i0 from '@angular/core';
|
|
11
|
-
import { inject, Injectable,
|
|
7
|
+
import { inject, Injectable, DestroyRef, signal, NgModule, Injector } from '@angular/core';
|
|
12
8
|
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
13
|
-
import { AXPSystemStatuses, AXPStatusProvider, systemStatusToDefinition, AXPSystemStatusType, AXP_STATUS_PROVIDERS, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
|
14
9
|
import { AXPTaskBadgeProvider, AXP_TASK_BADGE_PROVIDERS } from '@acorex/platform/layout/components';
|
|
15
|
-
import { AXPEntityService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
16
10
|
import { AXP_IDENTIFIER_RULES } from '@acorex/modules/identifier-management';
|
|
17
11
|
import { AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER } from '@acorex/platform/core';
|
|
18
12
|
import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
13
|
+
import { CommonModule } from '@angular/common';
|
|
19
14
|
import { firstValueFrom } from 'rxjs';
|
|
20
15
|
|
|
21
16
|
const config = {
|
|
@@ -214,370 +209,710 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
214
209
|
}]
|
|
215
210
|
}] });
|
|
216
211
|
|
|
217
|
-
|
|
212
|
+
//#region ---- Imports ----
|
|
213
|
+
//#endregion
|
|
214
|
+
/**
|
|
215
|
+
* Leave Request Task Provider
|
|
216
|
+
*
|
|
217
|
+
* Integrates with workflow engine to show leave request tasks from work items.
|
|
218
|
+
* Uses work items created by workflow engine for human-task activities.
|
|
219
|
+
*
|
|
220
|
+
* Architecture:
|
|
221
|
+
* - Queries work items filtered by entityRefType = 'HumanCapitalManagement.LeaveRequest'
|
|
222
|
+
* - Loads related entity data from entityRefId
|
|
223
|
+
* - Maps work item status to task board status
|
|
224
|
+
* - Provides actions based on workflow activity definitions
|
|
225
|
+
*/
|
|
226
|
+
class AXMLeaveRequestTaskProvider extends AXPWorkflowTaskProvider {
|
|
218
227
|
constructor() {
|
|
219
|
-
|
|
228
|
+
//#region ---- Services & Dependencies ----
|
|
229
|
+
super(...arguments);
|
|
230
|
+
this.entityService = inject(AXPEntityService);
|
|
231
|
+
this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
|
|
232
|
+
this.workItemData = this.entityService
|
|
233
|
+
.withEntity('WorkflowManagement', 'WorkItem')
|
|
234
|
+
.data();
|
|
235
|
+
this.leaveRequestData = this.entityService
|
|
236
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.leaveRequest.name)
|
|
237
|
+
.data();
|
|
220
238
|
this.commandExecutor = inject(AXPCommandExecutor);
|
|
239
|
+
this.translationService = inject(AXTranslationService);
|
|
221
240
|
this.dialogService = inject(AXPLeaveRequestDialogService);
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
const data = this.taskData();
|
|
229
|
-
return data?.employee?.person?.displayName || this.task().reporter?.fullName || 'Unknown';
|
|
230
|
-
}, ...(ngDevMode ? [{ debugName: "employeeName" }] : []));
|
|
231
|
-
this.managerName = computed(() => {
|
|
232
|
-
const data = this.taskData();
|
|
233
|
-
return data?.employee?.manager?.person?.displayName || this.task().assignee?.fullName || '';
|
|
234
|
-
}, ...(ngDevMode ? [{ debugName: "managerName" }] : []));
|
|
235
|
-
this.leaveType = computed(() => {
|
|
236
|
-
const data = this.taskData();
|
|
237
|
-
// Extract leave type from task title or data
|
|
238
|
-
const title = this.task().title || '';
|
|
239
|
-
const parts = title.split(' - ');
|
|
240
|
-
return parts.length > 1 ? parts[1] : data?.leaveType?.title || 'N/A';
|
|
241
|
-
}, ...(ngDevMode ? [{ debugName: "leaveType" }] : []));
|
|
242
|
-
this.canApprove = computed(() => {
|
|
243
|
-
const statusId = this.task().status?.id;
|
|
244
|
-
return statusId === AXPSystemStatuses.Pending.name || statusId === AXPSystemStatuses.Rejected.name;
|
|
245
|
-
}, ...(ngDevMode ? [{ debugName: "canApprove" }] : []));
|
|
246
|
-
this.canReject = computed(() => {
|
|
247
|
-
const statusId = this.task().status?.id;
|
|
248
|
-
return statusId === AXPSystemStatuses.Pending.name || statusId === AXPSystemStatuses.Approved.name;
|
|
249
|
-
}, ...(ngDevMode ? [{ debugName: "canReject" }] : []));
|
|
250
|
-
this.canCancel = computed(() => {
|
|
251
|
-
const statusId = this.task().status?.id;
|
|
252
|
-
return statusId === AXPSystemStatuses.Pending.name || statusId === AXPSystemStatuses.Approved.name;
|
|
253
|
-
}, ...(ngDevMode ? [{ debugName: "canCancel" }] : []));
|
|
241
|
+
//#endregion
|
|
242
|
+
}
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region ---- Provider Metadata ----
|
|
245
|
+
get name() {
|
|
246
|
+
return 'leave-request';
|
|
254
247
|
}
|
|
255
|
-
|
|
256
|
-
return
|
|
257
|
-
year: 'numeric',
|
|
258
|
-
month: 'short',
|
|
259
|
-
day: 'numeric',
|
|
260
|
-
}).format(new Date(date));
|
|
248
|
+
get title() {
|
|
249
|
+
return RootConfig.entities.leaveRequest.titlePlural;
|
|
261
250
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
const end = new Date(this.task().endDate);
|
|
265
|
-
const diffTime = Math.abs(end.getTime() - start.getTime());
|
|
266
|
-
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
267
|
-
return diffDays + 1; // Include both start and end days
|
|
251
|
+
get icon() {
|
|
252
|
+
return 'fa-light fa-plane-departure';
|
|
268
253
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region ---- Task Retrieval ----
|
|
256
|
+
/**
|
|
257
|
+
* Get tasks from work items for leave requests.
|
|
258
|
+
*
|
|
259
|
+
* Queries work items filtered by:
|
|
260
|
+
* - entityRefType = 'HumanCapitalManagement.LeaveRequest'
|
|
261
|
+
* - status (Pending, Claimed, InProgress)
|
|
262
|
+
* - assignee/claimant (if filter provided)
|
|
263
|
+
* - date range (if provided)
|
|
264
|
+
*
|
|
265
|
+
* Then loads related entity data and maps to task board format.
|
|
266
|
+
*/
|
|
267
|
+
async getTasks(options) {
|
|
268
|
+
console.log(`[LeaveRequestTaskProvider] 🔍 getTasks called with options:`, {
|
|
269
|
+
skip: options?.skip,
|
|
270
|
+
take: options?.take,
|
|
271
|
+
assigneeIds: options?.assigneeIds,
|
|
272
|
+
range: options?.range,
|
|
273
|
+
types: options?.types,
|
|
274
|
+
});
|
|
275
|
+
// Build filter for work items
|
|
276
|
+
const baseFilter = { logic: 'and', filters: [] };
|
|
277
|
+
const entityTypeValue = `${RootConfig.module.name}.${RootConfig.entities.leaveRequest.name}`;
|
|
278
|
+
const workflowNameValue = 'create-leave-request';
|
|
279
|
+
console.log(`[LeaveRequestTaskProvider] 📋 Building filters:`, {
|
|
280
|
+
entityType: entityTypeValue,
|
|
281
|
+
workflowName: workflowNameValue,
|
|
282
|
+
});
|
|
283
|
+
// Filter by entity type OR workflow instance definitionId
|
|
284
|
+
// Primary: entityRefType (set after entity creation)
|
|
285
|
+
// Fallback: instanceId from workflow instances with definitionId = 'create-leave-request'
|
|
286
|
+
// We'll use OR logic to catch both cases
|
|
287
|
+
const entityTypeFilter = {
|
|
288
|
+
field: 'entityRefType',
|
|
289
|
+
operator: { type: 'equal' },
|
|
290
|
+
value: entityTypeValue,
|
|
291
|
+
};
|
|
292
|
+
// Try to get workflow instance IDs for fallback
|
|
293
|
+
let workflowInstanceIds = [];
|
|
272
294
|
try {
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
295
|
+
const workflowInstanceData = this.entityService
|
|
296
|
+
.withEntity('WorkflowManagement', 'WorkflowInstance')
|
|
297
|
+
.data();
|
|
298
|
+
const instances = await workflowInstanceData.query({
|
|
299
|
+
skip: 0,
|
|
300
|
+
take: 100,
|
|
301
|
+
filter: {
|
|
302
|
+
logic: 'and',
|
|
303
|
+
filters: [
|
|
304
|
+
{
|
|
305
|
+
field: 'definitionId',
|
|
306
|
+
operator: { type: 'equal' },
|
|
307
|
+
value: workflowNameValue,
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
},
|
|
282
311
|
});
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
console.log('Leave request approved successfully');
|
|
286
|
-
}
|
|
312
|
+
workflowInstanceIds = instances.items.map((inst) => inst.id);
|
|
313
|
+
console.log(`[LeaveRequestTaskProvider] 🔍 Found ${workflowInstanceIds.length} workflow instances for '${workflowNameValue}'`);
|
|
287
314
|
}
|
|
288
315
|
catch (error) {
|
|
289
|
-
console.
|
|
316
|
+
console.warn(`[LeaveRequestTaskProvider] ⚠️ Failed to query workflow instances:`, error);
|
|
290
317
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
reason: dialogResult?.reason,
|
|
304
|
-
note: dialogResult?.note,
|
|
318
|
+
// Build OR filter: entityRefType OR instanceId in workflowInstanceIds
|
|
319
|
+
if (workflowInstanceIds.length > 0) {
|
|
320
|
+
baseFilter.filters?.push({
|
|
321
|
+
logic: 'or',
|
|
322
|
+
filters: [
|
|
323
|
+
entityTypeFilter,
|
|
324
|
+
{
|
|
325
|
+
field: 'instanceId',
|
|
326
|
+
operator: { type: 'in' },
|
|
327
|
+
value: workflowInstanceIds,
|
|
328
|
+
},
|
|
329
|
+
],
|
|
305
330
|
});
|
|
306
|
-
|
|
307
|
-
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
// Only use entityRefType if no workflow instances found
|
|
334
|
+
baseFilter.filters?.push(entityTypeFilter);
|
|
335
|
+
}
|
|
336
|
+
// Filter by status (exclude completed/cancelled)
|
|
337
|
+
baseFilter.filters?.push({
|
|
338
|
+
field: 'status',
|
|
339
|
+
operator: { type: 'in' },
|
|
340
|
+
value: ['Pending', 'Claimed', 'InProgress'],
|
|
341
|
+
});
|
|
342
|
+
// Filter by date range if provided
|
|
343
|
+
// Work items don't have startDate/endDate directly, but we can filter by createdAt or dueDate
|
|
344
|
+
// For now, we'll skip date range filtering to ensure work items are found
|
|
345
|
+
// TODO: Implement proper date range filtering based on entity data (startDate/endDate)
|
|
346
|
+
// if (options?.range?.from || options?.range?.end) {
|
|
347
|
+
// if (options.range.from) {
|
|
348
|
+
// baseFilter.filters?.push({
|
|
349
|
+
// field: 'createdAt',
|
|
350
|
+
// operator: { type: 'gte' as const },
|
|
351
|
+
// value: options.range.from,
|
|
352
|
+
// });
|
|
353
|
+
// }
|
|
354
|
+
//
|
|
355
|
+
// if (options.range.end) {
|
|
356
|
+
// // For end date, we want: dueDate <= end OR dueDate is null
|
|
357
|
+
// // This allows work items without dueDate to still appear
|
|
358
|
+
// baseFilter.filters?.push({
|
|
359
|
+
// logic: 'or',
|
|
360
|
+
// filters: [
|
|
361
|
+
// {
|
|
362
|
+
// field: 'dueDate',
|
|
363
|
+
// operator: { type: 'lte' as const },
|
|
364
|
+
// value: options.range.end,
|
|
365
|
+
// },
|
|
366
|
+
// {
|
|
367
|
+
// field: 'dueDate',
|
|
368
|
+
// operator: { type: 'isNull' as const },
|
|
369
|
+
// },
|
|
370
|
+
// ],
|
|
371
|
+
// });
|
|
372
|
+
// }
|
|
373
|
+
// }
|
|
374
|
+
// Filter by assignee/claimant
|
|
375
|
+
if (options?.assigneeIds && options.assigneeIds.length > 0) {
|
|
376
|
+
baseFilter.filters?.push({
|
|
377
|
+
logic: 'or',
|
|
378
|
+
filters: [
|
|
379
|
+
{
|
|
380
|
+
field: 'assignedUserId',
|
|
381
|
+
operator: { type: 'in' },
|
|
382
|
+
value: options.assigneeIds,
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
field: 'claimedByUserId',
|
|
386
|
+
operator: { type: 'in' },
|
|
387
|
+
value: options.assigneeIds,
|
|
388
|
+
},
|
|
389
|
+
],
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
console.log(`[LeaveRequestTaskProvider] 🔎 Query filter:`, JSON.stringify(baseFilter, null, 2));
|
|
393
|
+
// Query work items
|
|
394
|
+
const { items: workItems, total } = await this.workItemData.query({
|
|
395
|
+
skip: options?.skip ?? 0,
|
|
396
|
+
take: options?.take ?? 20,
|
|
397
|
+
filter: baseFilter,
|
|
398
|
+
});
|
|
399
|
+
console.log(`[LeaveRequestTaskProvider] 📦 Query result:`, {
|
|
400
|
+
total,
|
|
401
|
+
itemsCount: workItems.length,
|
|
402
|
+
workItems: workItems.map((wi) => ({
|
|
403
|
+
id: wi.id,
|
|
404
|
+
title: wi.title,
|
|
405
|
+
status: wi.status,
|
|
406
|
+
entityRefType: wi.entityRefType,
|
|
407
|
+
entityRefId: wi.entityRefId,
|
|
408
|
+
instanceId: wi.instanceId,
|
|
409
|
+
instanceDefinitionId: wi.instance?.definitionId,
|
|
410
|
+
instanceName: wi.instance?.name,
|
|
411
|
+
activityNodeId: wi.activityNodeId,
|
|
412
|
+
activityName: wi.activityName,
|
|
413
|
+
createdAt: wi.createdAt,
|
|
414
|
+
dueDate: wi.dueDate,
|
|
415
|
+
})),
|
|
416
|
+
});
|
|
417
|
+
// Debug: Log if no work items found
|
|
418
|
+
if (workItems.length === 0) {
|
|
419
|
+
console.warn(`[LeaveRequestTaskProvider] ⚠️ No work items found!`, {
|
|
420
|
+
filter: baseFilter,
|
|
421
|
+
entityTypeValue: `${RootConfig.module.name}.${RootConfig.entities.leaveRequest.name}`,
|
|
422
|
+
workflowNameValue: 'create-leave-request',
|
|
423
|
+
suggestion: 'Check if: 1) Workflow was started, 2) Human-task activity exists, 3) Work item was created, 4) entityRefType was set after entity creation',
|
|
424
|
+
});
|
|
425
|
+
// Fallback: Try to query all work items to see what we have
|
|
426
|
+
const allWorkItems = await this.workItemData.query({
|
|
427
|
+
skip: 0,
|
|
428
|
+
take: 10,
|
|
429
|
+
filter: {
|
|
430
|
+
logic: 'and',
|
|
431
|
+
filters: [
|
|
432
|
+
{
|
|
433
|
+
field: 'status',
|
|
434
|
+
operator: { type: 'in' },
|
|
435
|
+
value: ['Pending', 'Claimed', 'InProgress'],
|
|
436
|
+
},
|
|
437
|
+
],
|
|
438
|
+
},
|
|
439
|
+
});
|
|
440
|
+
console.log(`[LeaveRequestTaskProvider] 🔍 Fallback: Found ${allWorkItems.items.length} work items total (any entity):`, {
|
|
441
|
+
workItems: allWorkItems.items.map((wi) => ({
|
|
442
|
+
id: wi.id,
|
|
443
|
+
title: wi.title,
|
|
444
|
+
entityRefType: wi.entityRefType,
|
|
445
|
+
entityRefId: wi.entityRefId,
|
|
446
|
+
instanceId: wi.instanceId,
|
|
447
|
+
status: wi.status,
|
|
448
|
+
})),
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
// Load entity data for each work item and map to tasks
|
|
452
|
+
const tasks = [];
|
|
453
|
+
console.log(`[LeaveRequestTaskProvider] 🔄 Processing ${workItems.length} work items...`);
|
|
454
|
+
for (const workItem of workItems) {
|
|
455
|
+
try {
|
|
456
|
+
console.log(`[LeaveRequestTaskProvider] 📝 Processing work item:`, {
|
|
457
|
+
id: workItem.id,
|
|
458
|
+
title: workItem.title,
|
|
459
|
+
entityRefId: workItem.entityRefId,
|
|
460
|
+
entityRefType: workItem.entityRefType,
|
|
461
|
+
instanceId: workItem.instanceId,
|
|
462
|
+
instanceDefinitionId: workItem.instance?.definitionId,
|
|
463
|
+
});
|
|
464
|
+
// Load entity data if entityRefId is available
|
|
465
|
+
let entityData = null;
|
|
466
|
+
if (workItem.entityRefId) {
|
|
467
|
+
try {
|
|
468
|
+
console.log(`[LeaveRequestTaskProvider] 🔍 Loading entity data for entityRefId: ${workItem.entityRefId}`);
|
|
469
|
+
entityData = await this.leaveRequestData.byKey(workItem.entityRefId);
|
|
470
|
+
console.log(`[LeaveRequestTaskProvider] ✅ Entity data loaded:`, {
|
|
471
|
+
id: entityData?.id,
|
|
472
|
+
employee: entityData?.employee?.person?.displayName,
|
|
473
|
+
startDate: entityData?.startDate,
|
|
474
|
+
endDate: entityData?.endDate,
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
catch (error) {
|
|
478
|
+
console.warn(`[LeaveRequestTaskProvider] ⚠️ Failed to load entity data for ${workItem.entityRefId}:`, error);
|
|
479
|
+
// Continue without entity data - use work item data only
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
console.log(`[LeaveRequestTaskProvider] ℹ️ No entityRefId, using work item data only`);
|
|
484
|
+
}
|
|
485
|
+
// Map work item to task
|
|
486
|
+
const task = this.mapWorkItemToTask(workItem, entityData);
|
|
487
|
+
console.log(`[LeaveRequestTaskProvider] ✅ Mapped to task:`, {
|
|
488
|
+
id: task.id,
|
|
489
|
+
title: task.title,
|
|
490
|
+
startDate: task.startDate,
|
|
491
|
+
endDate: task.endDate,
|
|
492
|
+
status: task.status,
|
|
493
|
+
});
|
|
494
|
+
tasks.push(task);
|
|
495
|
+
}
|
|
496
|
+
catch (error) {
|
|
497
|
+
console.error(`[LeaveRequestTaskProvider] ❌ Failed to process work item ${workItem.id}:`, error);
|
|
498
|
+
// Skip this work item and continue
|
|
308
499
|
}
|
|
309
500
|
}
|
|
310
|
-
|
|
311
|
-
|
|
501
|
+
console.log(`[LeaveRequestTaskProvider] ✅ Returning ${tasks.length} tasks (total: ${total})`);
|
|
502
|
+
return { items: tasks, total };
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Map work item to task board task format.
|
|
506
|
+
*/
|
|
507
|
+
mapWorkItemToTask(workItem, entityData) {
|
|
508
|
+
// Use entity data if available, otherwise use work item metadata
|
|
509
|
+
const statusId = entityData?.statusId ?? entityData?.status?.id ?? AXPSystemStatuses.Pending.name;
|
|
510
|
+
const statusTitle = entityData?.status?.title ??
|
|
511
|
+
this.translationService.translateSync(`@human-capital-management:leave-requests.states.${statusId}`);
|
|
512
|
+
// Extract dates from entity data or use work item dates
|
|
513
|
+
const startDate = entityData?.startDate
|
|
514
|
+
? new Date(entityData.startDate)
|
|
515
|
+
: (workItem.dueDate ? new Date(workItem.dueDate) : new Date());
|
|
516
|
+
const endDate = entityData?.endDate
|
|
517
|
+
? new Date(entityData.endDate)
|
|
518
|
+
: (workItem.dueDate ? new Date(workItem.dueDate) : new Date());
|
|
519
|
+
// Build title from entity data or work item
|
|
520
|
+
let title = workItem.title;
|
|
521
|
+
if (entityData) {
|
|
522
|
+
title = `${entityData.employee?.person?.displayName ?? ''} - ${this.translationService.translateSync(entityData.leaveType?.title ?? '')}`.trim();
|
|
523
|
+
if (!title)
|
|
524
|
+
title = workItem.title;
|
|
312
525
|
}
|
|
526
|
+
// Map work item status to task status
|
|
527
|
+
const taskStatus = this.mapWorkItemStatusToTaskStatus(workItem.status);
|
|
528
|
+
return {
|
|
529
|
+
id: workItem.id, // Use work item ID as task ID
|
|
530
|
+
title,
|
|
531
|
+
description: entityData?.reason ?? workItem.description ?? '',
|
|
532
|
+
startDate,
|
|
533
|
+
endDate,
|
|
534
|
+
allDay: true, // Leave requests are all-day events
|
|
535
|
+
assignee: workItem.assignedUser
|
|
536
|
+
? {
|
|
537
|
+
id: workItem.assignedUser.id,
|
|
538
|
+
type: 'user',
|
|
539
|
+
fullName: workItem.assignedUser.displayName,
|
|
540
|
+
}
|
|
541
|
+
: workItem.claimedByUser
|
|
542
|
+
? {
|
|
543
|
+
id: workItem.claimedByUser.id,
|
|
544
|
+
type: 'user',
|
|
545
|
+
fullName: workItem.claimedByUser.displayName,
|
|
546
|
+
}
|
|
547
|
+
: undefined,
|
|
548
|
+
index: 2,
|
|
549
|
+
status: taskStatus,
|
|
550
|
+
priority: this.mapWorkItemPriorityToTaskPriority(workItem.priority),
|
|
551
|
+
reporter: entityData?.employee
|
|
552
|
+
? {
|
|
553
|
+
id: entityData.employee.userId ?? entityData.employeeId,
|
|
554
|
+
type: 'user',
|
|
555
|
+
fullName: entityData.employee.person?.displayName ?? '',
|
|
556
|
+
}
|
|
557
|
+
: workItem.createdByUser
|
|
558
|
+
? {
|
|
559
|
+
id: workItem.createdByUser.id,
|
|
560
|
+
type: 'user',
|
|
561
|
+
fullName: workItem.createdByUser.displayName,
|
|
562
|
+
}
|
|
563
|
+
: {
|
|
564
|
+
id: '',
|
|
565
|
+
type: 'user',
|
|
566
|
+
fullName: '',
|
|
567
|
+
},
|
|
568
|
+
data: {
|
|
569
|
+
// Store entity data and work item metadata
|
|
570
|
+
entityData: entityData ?? null,
|
|
571
|
+
workItem: workItem,
|
|
572
|
+
workItemId: workItem.id,
|
|
573
|
+
instanceId: workItem.instanceId,
|
|
574
|
+
activityNodeId: workItem.activityNodeId,
|
|
575
|
+
entityRefId: workItem.entityRefId,
|
|
576
|
+
entityRefType: workItem.entityRefType,
|
|
577
|
+
}, // Additional metadata for task processing
|
|
578
|
+
};
|
|
313
579
|
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
580
|
+
/**
|
|
581
|
+
* Map work item status to task board status.
|
|
582
|
+
*/
|
|
583
|
+
mapWorkItemStatusToTaskStatus(workItemStatus) {
|
|
584
|
+
// Map work item status to entity status
|
|
585
|
+
switch (workItemStatus) {
|
|
586
|
+
case 'Pending':
|
|
587
|
+
return {
|
|
588
|
+
id: AXPSystemStatuses.Pending.name,
|
|
589
|
+
title: this.translationService.translateSync('@human-capital-management:leave-requests.states.pending'),
|
|
590
|
+
};
|
|
591
|
+
case 'Claimed':
|
|
592
|
+
case 'InProgress':
|
|
593
|
+
return {
|
|
594
|
+
id: AXPSystemStatuses.Pending.name, // Still pending from entity perspective
|
|
595
|
+
title: this.translationService.translateSync('@human-capital-management:leave-requests.states.pending'),
|
|
596
|
+
};
|
|
597
|
+
case 'Completed':
|
|
598
|
+
return {
|
|
599
|
+
id: AXPSystemStatuses.Approved.name, // Completed work item = approved
|
|
600
|
+
title: this.translationService.translateSync('@human-capital-management:leave-requests.states.approved'),
|
|
601
|
+
};
|
|
602
|
+
case 'Rejected':
|
|
603
|
+
return {
|
|
604
|
+
id: AXPSystemStatuses.Rejected.name,
|
|
605
|
+
title: this.translationService.translateSync('@human-capital-management:leave-requests.states.rejected'),
|
|
606
|
+
};
|
|
607
|
+
case 'Cancelled':
|
|
608
|
+
return {
|
|
609
|
+
id: AXPSystemStatuses.Cancelled.name,
|
|
610
|
+
title: this.translationService.translateSync('@human-capital-management:leave-requests.states.cancelled'),
|
|
611
|
+
};
|
|
612
|
+
default:
|
|
613
|
+
return {
|
|
614
|
+
id: AXPSystemStatuses.Pending.name,
|
|
615
|
+
title: this.translationService.translateSync('@human-capital-management:leave-requests.states.pending'),
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Map work item priority to task board priority.
|
|
621
|
+
*/
|
|
622
|
+
mapWorkItemPriorityToTaskPriority(workItemPriority) {
|
|
623
|
+
switch (workItemPriority) {
|
|
624
|
+
case 'Urgent':
|
|
625
|
+
return 'highest';
|
|
626
|
+
case 'High':
|
|
627
|
+
return 'high';
|
|
628
|
+
case 'Normal':
|
|
629
|
+
return 'medium';
|
|
630
|
+
case 'Low':
|
|
631
|
+
return 'low';
|
|
632
|
+
default:
|
|
633
|
+
return 'medium';
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region ---- Task Updates ----
|
|
638
|
+
/**
|
|
639
|
+
* Update tasks (work items and/or entity data).
|
|
640
|
+
*
|
|
641
|
+
* Updates both work item (if task ID is work item ID) and entity data (if entityRefId is available).
|
|
642
|
+
*/
|
|
643
|
+
async updateTasks(tasksToUpdate) {
|
|
644
|
+
const updatedTasks = [];
|
|
645
|
+
for (const task of tasksToUpdate) {
|
|
646
|
+
try {
|
|
647
|
+
const taskData = task.data;
|
|
648
|
+
const workItemId = taskData?.workItemId ?? task.id;
|
|
649
|
+
const entityRefId = taskData?.entityRefId;
|
|
650
|
+
// Update work item if task ID is work item ID
|
|
651
|
+
if (workItemId) {
|
|
652
|
+
const workItemUpdate = {};
|
|
653
|
+
if (task.status?.id) {
|
|
654
|
+
// Map task status back to work item status
|
|
655
|
+
const workItemStatus = this.mapTaskStatusToWorkItemStatus(String(task.status.id));
|
|
656
|
+
if (workItemStatus) {
|
|
657
|
+
workItemUpdate['status'] = workItemStatus;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
if (task.assignee?.id) {
|
|
661
|
+
workItemUpdate['assignedUserId'] = task.assignee.id;
|
|
662
|
+
}
|
|
663
|
+
if (Object.keys(workItemUpdate).length > 0) {
|
|
664
|
+
await this.workItemData.update(workItemId, workItemUpdate);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
// Update entity data if entityRefId is available
|
|
668
|
+
if (entityRefId) {
|
|
669
|
+
const entityUpdate = {};
|
|
670
|
+
if (task.status?.id) {
|
|
671
|
+
const statusId = task.status.id;
|
|
672
|
+
entityUpdate['statusId'] = statusId;
|
|
673
|
+
}
|
|
674
|
+
if (task.startDate) {
|
|
675
|
+
entityUpdate['startDate'] = task.startDate;
|
|
676
|
+
}
|
|
677
|
+
if (task.endDate) {
|
|
678
|
+
entityUpdate['endDate'] = task.endDate;
|
|
679
|
+
}
|
|
680
|
+
if (Object.keys(entityUpdate).length > 0) {
|
|
681
|
+
await this.leaveRequestData.update(entityRefId, entityUpdate);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
updatedTasks.push(task);
|
|
321
685
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
reason: dialogResult?.reason,
|
|
326
|
-
note: dialogResult?.note,
|
|
327
|
-
});
|
|
328
|
-
if (result?.success) {
|
|
329
|
-
console.log('Leave request cancelled successfully');
|
|
686
|
+
catch (error) {
|
|
687
|
+
console.error(`[LeaveRequestTaskProvider] Failed to update task ${task.id}:`, error);
|
|
688
|
+
updatedTasks.push(task); // Still include the task even if update failed
|
|
330
689
|
}
|
|
331
690
|
}
|
|
332
|
-
|
|
333
|
-
|
|
691
|
+
return updatedTasks;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Map task status to work item status.
|
|
695
|
+
*/
|
|
696
|
+
mapTaskStatusToWorkItemStatus(taskStatusId) {
|
|
697
|
+
switch (taskStatusId) {
|
|
698
|
+
case AXPSystemStatuses.Pending.name:
|
|
699
|
+
return 'Pending';
|
|
700
|
+
case AXPSystemStatuses.Approved.name:
|
|
701
|
+
return 'Completed';
|
|
702
|
+
case AXPSystemStatuses.Rejected.name:
|
|
703
|
+
return 'Rejected';
|
|
704
|
+
case AXPSystemStatuses.Cancelled.name:
|
|
705
|
+
return 'Cancelled';
|
|
706
|
+
default:
|
|
707
|
+
return null;
|
|
334
708
|
}
|
|
335
709
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
</div>
|
|
357
|
-
</div>
|
|
358
|
-
|
|
359
|
-
<!-- Leave Details -->
|
|
360
|
-
<div class="leave-request-popover__section">
|
|
361
|
-
<div class="leave-request-popover__section-header">
|
|
362
|
-
<i class="fa-light fa-calendar"></i>
|
|
363
|
-
<span>Leave Details</span>
|
|
364
|
-
</div>
|
|
365
|
-
<div class="leave-request-popover__section-content">
|
|
366
|
-
<div class="leave-request-popover__info-row">
|
|
367
|
-
<span class="leave-request-popover__label">Leave Type:</span>
|
|
368
|
-
<span class="leave-request-popover__value">{{ leaveType() }}</span>
|
|
369
|
-
</div>
|
|
370
|
-
<div class="leave-request-popover__info-row">
|
|
371
|
-
<span class="leave-request-popover__label">Start Date:</span>
|
|
372
|
-
<span class="leave-request-popover__value">{{ formatDate(task().startDate) }}</span>
|
|
373
|
-
</div>
|
|
374
|
-
<div class="leave-request-popover__info-row">
|
|
375
|
-
<span class="leave-request-popover__label">End Date:</span>
|
|
376
|
-
<span class="leave-request-popover__value">{{ formatDate(task().endDate) }}</span>
|
|
377
|
-
</div>
|
|
378
|
-
<div class="leave-request-popover__info-row">
|
|
379
|
-
<span class="leave-request-popover__label">Duration:</span>
|
|
380
|
-
<span class="leave-request-popover__value">{{ calculateDuration() }} days</span>
|
|
381
|
-
</div>
|
|
382
|
-
</div>
|
|
383
|
-
</div>
|
|
384
|
-
|
|
385
|
-
<!-- Reason -->
|
|
386
|
-
@if (task().description) {
|
|
387
|
-
<div class="leave-request-popover__section">
|
|
388
|
-
<div class="leave-request-popover__section-header">
|
|
389
|
-
<i class="fa-light fa-note-sticky"></i>
|
|
390
|
-
<span>Reason</span>
|
|
391
|
-
</div>
|
|
392
|
-
<div class="leave-request-popover__section-content">
|
|
393
|
-
<p class="leave-request-popover__reason">{{ task().description }}</p>
|
|
394
|
-
</div>
|
|
395
|
-
</div>
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
<!-- Status -->
|
|
399
|
-
<div class="leave-request-popover__section">
|
|
400
|
-
<div class="leave-request-popover__section-header">
|
|
401
|
-
<i class="fa-light fa-flag"></i>
|
|
402
|
-
<span>Status</span>
|
|
403
|
-
</div>
|
|
404
|
-
<div class="leave-request-popover__section-content">
|
|
405
|
-
<div class="leave-request-popover__status-badge" [attr.data-status]="task().status.id">
|
|
406
|
-
{{ task().status.title }}
|
|
407
|
-
</div>
|
|
408
|
-
</div>
|
|
409
|
-
</div>
|
|
410
|
-
|
|
411
|
-
<!-- Actions -->
|
|
412
|
-
<div class="leave-request-popover__actions">
|
|
413
|
-
@if (canApprove()) {
|
|
414
|
-
<ax-button
|
|
415
|
-
[color]="'success'"
|
|
416
|
-
[look]="'blank'"
|
|
417
|
-
[text]="'@general:actions.approve.title' | translate | async"
|
|
418
|
-
(onClick)="handleApprove()"
|
|
419
|
-
class="leave-request-popover__action-btn"
|
|
420
|
-
>
|
|
421
|
-
<ax-prefix>
|
|
422
|
-
<i class="fa-light fa-check"></i>
|
|
423
|
-
</ax-prefix>
|
|
424
|
-
</ax-button>
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region ---- Command Execution ----
|
|
712
|
+
/**
|
|
713
|
+
* Execute commands on tasks.
|
|
714
|
+
*
|
|
715
|
+
* Supports:
|
|
716
|
+
* - Workflow work item commands (Claim, Complete, Cancel)
|
|
717
|
+
* - Leave request business commands (Approve, Reject, Cancel)
|
|
718
|
+
*/
|
|
719
|
+
async executeCommand(command) {
|
|
720
|
+
if (!command?.name)
|
|
721
|
+
return { success: true };
|
|
722
|
+
const workItemId = command.options?.['workItemId'] ?? command.options?.['id'] ?? '';
|
|
723
|
+
const entityRefId = command.options?.['entityRefId'] ?? '';
|
|
724
|
+
// Handle workflow work item commands
|
|
725
|
+
if (command.name === 'WorkflowManagement.WorkItem:Claim') {
|
|
726
|
+
const result = await this.commandExecutor.execute('WorkflowManagement.WorkItem:Claim', {
|
|
727
|
+
id: workItemId,
|
|
728
|
+
});
|
|
729
|
+
return result ?? { success: true };
|
|
425
730
|
}
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
class="leave-request-popover__action-btn"
|
|
434
|
-
>
|
|
435
|
-
<ax-prefix>
|
|
436
|
-
<i class="fa-light fa-xmark"></i>
|
|
437
|
-
</ax-prefix>
|
|
438
|
-
</ax-button>
|
|
731
|
+
if (command.name === 'WorkflowManagement.WorkItem:Complete') {
|
|
732
|
+
const result = await this.commandExecutor.execute('WorkflowManagement.WorkItem:Complete', {
|
|
733
|
+
id: workItemId,
|
|
734
|
+
output: command.options?.['output'] ?? {},
|
|
735
|
+
outcome: command.options?.['outcome'] ?? 'Done',
|
|
736
|
+
});
|
|
737
|
+
return result ?? { success: true };
|
|
439
738
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
[text]="'@general:actions.cancel.title' | translate | async"
|
|
446
|
-
(onClick)="handleCancel()"
|
|
447
|
-
class="leave-request-popover__action-btn"
|
|
448
|
-
>
|
|
449
|
-
<ax-prefix>
|
|
450
|
-
<i class="fa-light fa-ban"></i>
|
|
451
|
-
</ax-prefix>
|
|
452
|
-
</ax-button>
|
|
739
|
+
if (command.name === 'WorkflowManagement.WorkItem:Cancel') {
|
|
740
|
+
const result = await this.commandExecutor.execute('WorkflowManagement.WorkItem:Cancel', {
|
|
741
|
+
id: workItemId,
|
|
742
|
+
});
|
|
743
|
+
return result ?? { success: true };
|
|
453
744
|
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
<!-- Status -->
|
|
522
|
-
<div class="leave-request-popover__section">
|
|
523
|
-
<div class="leave-request-popover__section-header">
|
|
524
|
-
<i class="fa-light fa-flag"></i>
|
|
525
|
-
<span>Status</span>
|
|
526
|
-
</div>
|
|
527
|
-
<div class="leave-request-popover__section-content">
|
|
528
|
-
<div class="leave-request-popover__status-badge" [attr.data-status]="task().status.id">
|
|
529
|
-
{{ task().status.title }}
|
|
530
|
-
</div>
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
|
|
534
|
-
<!-- Actions -->
|
|
535
|
-
<div class="leave-request-popover__actions">
|
|
536
|
-
@if (canApprove()) {
|
|
537
|
-
<ax-button
|
|
538
|
-
[color]="'success'"
|
|
539
|
-
[look]="'blank'"
|
|
540
|
-
[text]="'@general:actions.approve.title' | translate | async"
|
|
541
|
-
(onClick)="handleApprove()"
|
|
542
|
-
class="leave-request-popover__action-btn"
|
|
543
|
-
>
|
|
544
|
-
<ax-prefix>
|
|
545
|
-
<i class="fa-light fa-check"></i>
|
|
546
|
-
</ax-prefix>
|
|
547
|
-
</ax-button>
|
|
745
|
+
// Handle leave request business commands (for backward compatibility)
|
|
746
|
+
switch (command.name) {
|
|
747
|
+
case 'approveLeave': {
|
|
748
|
+
const dialogResult = await this.dialogService.showApprovalDialog();
|
|
749
|
+
if (dialogResult?.cancelled) {
|
|
750
|
+
return { success: false };
|
|
751
|
+
}
|
|
752
|
+
// Try to complete work item if available, otherwise use entity command
|
|
753
|
+
if (workItemId) {
|
|
754
|
+
const result = await this.commandExecutor.execute('WorkflowManagement.WorkItem:Complete', {
|
|
755
|
+
id: workItemId,
|
|
756
|
+
output: { reason: dialogResult?.reason, note: dialogResult?.note },
|
|
757
|
+
outcome: 'Approved',
|
|
758
|
+
});
|
|
759
|
+
return result ?? { success: true };
|
|
760
|
+
}
|
|
761
|
+
// Fallback to entity command
|
|
762
|
+
const result = await this.commandExecutor.execute('HumanCapitalManagement.LeaveRequest:Approve', {
|
|
763
|
+
id: entityRefId || workItemId,
|
|
764
|
+
reason: dialogResult?.reason,
|
|
765
|
+
note: dialogResult?.note,
|
|
766
|
+
});
|
|
767
|
+
return result ?? { success: true };
|
|
768
|
+
}
|
|
769
|
+
case 'rejectLeave': {
|
|
770
|
+
const dialogResult = await this.dialogService.showRejectionDialog();
|
|
771
|
+
if (dialogResult?.cancelled) {
|
|
772
|
+
return { success: false };
|
|
773
|
+
}
|
|
774
|
+
// Try to complete work item if available, otherwise use entity command
|
|
775
|
+
if (workItemId) {
|
|
776
|
+
const result = await this.commandExecutor.execute('WorkflowManagement.WorkItem:Complete', {
|
|
777
|
+
id: workItemId,
|
|
778
|
+
output: { reason: dialogResult?.reason, note: dialogResult?.note },
|
|
779
|
+
outcome: 'Rejected',
|
|
780
|
+
});
|
|
781
|
+
return result ?? { success: true };
|
|
782
|
+
}
|
|
783
|
+
// Fallback to entity command
|
|
784
|
+
const result = await this.commandExecutor.execute('HumanCapitalManagement.LeaveRequest:Reject', {
|
|
785
|
+
id: entityRefId || workItemId,
|
|
786
|
+
reason: dialogResult?.reason,
|
|
787
|
+
note: dialogResult?.note,
|
|
788
|
+
});
|
|
789
|
+
return result ?? { success: true };
|
|
790
|
+
}
|
|
791
|
+
case 'cancelLeave': {
|
|
792
|
+
const dialogResult = await this.dialogService.showCancellationDialog();
|
|
793
|
+
if (dialogResult?.cancelled) {
|
|
794
|
+
return { success: false };
|
|
795
|
+
}
|
|
796
|
+
// Try to cancel work item if available, otherwise use entity command
|
|
797
|
+
if (workItemId) {
|
|
798
|
+
const result = await this.commandExecutor.execute('WorkflowManagement.WorkItem:Cancel', {
|
|
799
|
+
id: workItemId,
|
|
800
|
+
});
|
|
801
|
+
return result ?? { success: true };
|
|
802
|
+
}
|
|
803
|
+
// Fallback to entity command
|
|
804
|
+
const result = await this.commandExecutor.execute('HumanCapitalManagement.LeaveRequest:Cancel', {
|
|
805
|
+
id: entityRefId || workItemId,
|
|
806
|
+
reason: dialogResult?.reason,
|
|
807
|
+
note: dialogResult?.note,
|
|
808
|
+
});
|
|
809
|
+
return result ?? { success: true };
|
|
810
|
+
}
|
|
548
811
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
812
|
+
return { success: true };
|
|
813
|
+
}
|
|
814
|
+
//#endregion
|
|
815
|
+
//#region ---- Actions & Statuses ----
|
|
816
|
+
/**
|
|
817
|
+
* Get available actions for a task.
|
|
818
|
+
*
|
|
819
|
+
* Provides actions based on work item status and workflow activity.
|
|
820
|
+
*/
|
|
821
|
+
async getActions(task) {
|
|
822
|
+
const actions = [];
|
|
823
|
+
if (!task)
|
|
824
|
+
return actions;
|
|
825
|
+
const taskData = task.data;
|
|
826
|
+
const workItemId = taskData?.workItemId ?? task.id;
|
|
827
|
+
const entityRefId = taskData?.entityRefId;
|
|
828
|
+
// Add workflow work item actions
|
|
829
|
+
if (task.status?.id === AXPSystemStatuses.Pending.name) {
|
|
830
|
+
// Claim action (if not already claimed)
|
|
831
|
+
actions.push({
|
|
832
|
+
name: 'WorkflowManagement.WorkItem:Claim',
|
|
833
|
+
title: this.translationService.translateSync('@workflow-management:work-items.actions.claim.title'),
|
|
834
|
+
icon: 'fa-light fa-hand',
|
|
835
|
+
color: 'primary',
|
|
836
|
+
command: {
|
|
837
|
+
name: 'WorkflowManagement.WorkItem:Claim',
|
|
838
|
+
options: { id: workItemId, workItemId },
|
|
839
|
+
},
|
|
840
|
+
});
|
|
841
|
+
// Complete action (with approve/reject outcomes)
|
|
842
|
+
actions.push({
|
|
843
|
+
name: 'approveLeave',
|
|
844
|
+
title: this.translationService.translateSync('@general:actions.approve.title'),
|
|
845
|
+
icon: 'fa-light fa-check',
|
|
846
|
+
color: 'success',
|
|
847
|
+
command: {
|
|
848
|
+
name: 'approveLeave',
|
|
849
|
+
options: { id: entityRefId || workItemId, workItemId, entityRefId },
|
|
850
|
+
},
|
|
851
|
+
});
|
|
852
|
+
actions.push({
|
|
853
|
+
name: 'rejectLeave',
|
|
854
|
+
title: this.translationService.translateSync('@general:actions.reject.title'),
|
|
855
|
+
icon: 'fa-light fa-xmark',
|
|
856
|
+
color: 'danger',
|
|
857
|
+
command: {
|
|
858
|
+
name: 'rejectLeave',
|
|
859
|
+
options: { id: entityRefId || workItemId, workItemId, entityRefId },
|
|
860
|
+
},
|
|
861
|
+
});
|
|
562
862
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
863
|
+
// Add cancel action
|
|
864
|
+
if (task.status?.id === AXPSystemStatuses.Pending.name ||
|
|
865
|
+
task.status?.id === AXPSystemStatuses.Approved.name) {
|
|
866
|
+
actions.push({
|
|
867
|
+
name: 'cancelLeave',
|
|
868
|
+
title: this.translationService.translateSync('@general:actions.cancel.title'),
|
|
869
|
+
icon: 'fa-light fa-ban',
|
|
870
|
+
color: 'secondary',
|
|
871
|
+
command: {
|
|
872
|
+
name: 'cancelLeave',
|
|
873
|
+
options: { id: entityRefId || workItemId, workItemId, entityRefId },
|
|
874
|
+
},
|
|
875
|
+
});
|
|
576
876
|
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
877
|
+
return actions;
|
|
878
|
+
}
|
|
879
|
+
async getExtraFields() {
|
|
880
|
+
return [];
|
|
881
|
+
}
|
|
882
|
+
async getStatuses() {
|
|
883
|
+
return [
|
|
884
|
+
{
|
|
885
|
+
index: 0,
|
|
886
|
+
key: AXPSystemStatuses.Pending.name,
|
|
887
|
+
title: await this.translationService.translateAsync('@human-capital-management:leave-requests.states.pending'),
|
|
888
|
+
color: 'warning',
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
index: 1,
|
|
892
|
+
key: AXPSystemStatuses.Approved.name,
|
|
893
|
+
title: await this.translationService.translateAsync('@human-capital-management:leave-requests.states.approved'),
|
|
894
|
+
color: 'success',
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
index: 2,
|
|
898
|
+
key: AXPSystemStatuses.Rejected.name,
|
|
899
|
+
title: await this.translationService.translateAsync('@human-capital-management:leave-requests.states.rejected'),
|
|
900
|
+
color: 'danger',
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
index: 3,
|
|
904
|
+
key: AXPSystemStatuses.Cancelled.name,
|
|
905
|
+
title: await this.translationService.translateAsync('@human-capital-management:leave-requests.states.cancelled'),
|
|
906
|
+
color: 'secondary',
|
|
907
|
+
},
|
|
908
|
+
];
|
|
909
|
+
}
|
|
910
|
+
//#endregion
|
|
911
|
+
//#region ---- Component ----
|
|
912
|
+
getComponent() {
|
|
913
|
+
return () => import('./acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs').then((m) => m.AXMLeaveRequestTaskPopoverComponent);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
581
916
|
|
|
582
917
|
//#endregion
|
|
583
918
|
//#region ---- Task Badge Provider ----
|
|
@@ -737,6 +1072,11 @@ class AXMLeaveRequestFeatureModule {
|
|
|
737
1072
|
useClass: AXMLeaveRequestBadgeProvider,
|
|
738
1073
|
multi: true,
|
|
739
1074
|
},
|
|
1075
|
+
{
|
|
1076
|
+
provide: AXP_WORKFLOW_TASK_PROVIDER,
|
|
1077
|
+
useClass: AXMLeaveRequestTaskProvider,
|
|
1078
|
+
multi: true,
|
|
1079
|
+
},
|
|
740
1080
|
{
|
|
741
1081
|
provide: AXP_STATUS_PROVIDERS,
|
|
742
1082
|
useClass: AXMLeaveRequestStatusProvider,
|
|
@@ -768,6 +1108,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
768
1108
|
useClass: AXMLeaveRequestBadgeProvider,
|
|
769
1109
|
multi: true,
|
|
770
1110
|
},
|
|
1111
|
+
{
|
|
1112
|
+
provide: AXP_WORKFLOW_TASK_PROVIDER,
|
|
1113
|
+
useClass: AXMLeaveRequestTaskProvider,
|
|
1114
|
+
multi: true,
|
|
1115
|
+
},
|
|
771
1116
|
{
|
|
772
1117
|
provide: AXP_STATUS_PROVIDERS,
|
|
773
1118
|
useClass: AXMLeaveRequestStatusProvider,
|
|
@@ -1046,9 +1391,9 @@ class AXMHumanCapitalModuleEntityProvider {
|
|
|
1046
1391
|
case RootConfig.entities.positionAssignment?.name:
|
|
1047
1392
|
return (await import('./acorex-modules-human-capital-management-position-assignment.entity-P-IN-w_1.mjs')).factory();
|
|
1048
1393
|
case RootConfig.entities.leaveType.name:
|
|
1049
|
-
return (await import('./acorex-modules-human-capital-management-leave-type.entity-
|
|
1394
|
+
return (await import('./acorex-modules-human-capital-management-leave-type.entity-YitcNesR.mjs')).factory();
|
|
1050
1395
|
case RootConfig.entities.leaveRequest.name:
|
|
1051
|
-
return (await import('./acorex-modules-human-capital-management-leave-request.entity-
|
|
1396
|
+
return (await import('./acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs')).factory();
|
|
1052
1397
|
}
|
|
1053
1398
|
}
|
|
1054
1399
|
return null;
|
|
@@ -1149,5 +1494,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
1149
1494
|
* Generated bundle index. Do not edit.
|
|
1150
1495
|
*/
|
|
1151
1496
|
|
|
1152
|
-
export { AXMHumanCapitalManagementModule, AXMLeaveRequestBadgeProvider,
|
|
1497
|
+
export { AXMHumanCapitalManagementModule, AXMLeaveRequestBadgeProvider, AXMLeaveRequestTaskProvider, AXMPermissionsKeys, AXPHumanCapitalManagementFeatureDefinitionProvider, AXPHumanCapitalManagementFeatureKeys, AXPHumanCapitalManagementMenuKeys, AXPLeaveRequestDialogService, HumanCapitalManagementManifest, RootConfig };
|
|
1153
1498
|
//# sourceMappingURL=acorex-modules-human-capital-management.mjs.map
|