@acorex/modules 21.0.0-next.7 → 21.0.0-next.8
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/business-core/README.md +44 -1
- package/document-management/index.d.ts +1 -2
- package/fesm2022/acorex-modules-application-management.mjs +1 -0
- package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-D5jGjm6i.mjs → acorex-modules-auth-acorex-modules-auth-8XP9xX7L.mjs} +95 -51
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-8XP9xX7L.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BL3Fmc7y.mjs → acorex-modules-auth-app-chooser.component-BvbLYIXA.mjs} +6 -6
- package/fesm2022/acorex-modules-auth-app-chooser.component-BvbLYIXA.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-login.module-D8-GN_Hx.mjs → acorex-modules-auth-login.module-DLWlieUn.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-D8-GN_Hx.mjs.map → acorex-modules-auth-login.module-DLWlieUn.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-CgDrAbPS.mjs → acorex-modules-auth-master.layout-BzV1eUvM.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-CgDrAbPS.mjs.map → acorex-modules-auth-master.layout-BzV1eUvM.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-lEMWnVJL.mjs → acorex-modules-auth-oauth-callback.component-CqaXMQdp.mjs} +5 -5
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-lEMWnVJL.mjs.map → acorex-modules-auth-oauth-callback.component-CqaXMQdp.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-BQII_ltO.mjs → acorex-modules-auth-password.component-BR2qrph-.mjs} +9 -9
- package/fesm2022/{acorex-modules-auth-password.component-BQII_ltO.mjs.map → acorex-modules-auth-password.component-BR2qrph-.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth-password.component-DMmRFHgO.mjs +563 -0
- package/fesm2022/acorex-modules-auth-password.component-DMmRFHgO.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-routes-BGLnoGO4.mjs → acorex-modules-auth-routes-BRQJ6Mx_.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-BGLnoGO4.mjs.map → acorex-modules-auth-routes-BRQJ6Mx_.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-CptZLRwB.mjs +58 -0
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-CptZLRwB.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-two-factor-code.component-BmlUjtYC.mjs → acorex-modules-auth-two-factor-code.component-CvheFTK7.mjs} +6 -6
- package/fesm2022/{acorex-modules-auth-two-factor-code.component-BmlUjtYC.mjs.map → acorex-modules-auth-two-factor-code.component-CvheFTK7.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-D1UjsoB8.mjs → acorex-modules-auth-two-factor.module-TGGOwEpP.mjs} +3 -3
- package/fesm2022/{acorex-modules-auth-two-factor.module-D1UjsoB8.mjs.map → acorex-modules-auth-two-factor.module-TGGOwEpP.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-user-sessions.component-CIlGFT7H.mjs → acorex-modules-auth-user-sessions.component-C_JzCXUy.mjs} +6 -6
- package/fesm2022/{acorex-modules-auth-user-sessions.component-CIlGFT7H.mjs.map → acorex-modules-auth-user-sessions.component-C_JzCXUy.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/{acorex-modules-business-core-business-status.entity-DE3JJYdY.mjs → acorex-modules-business-core-business-status.entity-BYUneIcN.mjs} +2 -2
- package/fesm2022/acorex-modules-business-core-business-status.entity-BYUneIcN.mjs.map +1 -0
- package/fesm2022/{acorex-modules-business-core-business-type.entity-_IwOWQVA.mjs → acorex-modules-business-core-business-type.entity-DEy8LvEV.mjs} +2 -2
- package/fesm2022/acorex-modules-business-core-business-type.entity-DEy8LvEV.mjs.map +1 -0
- package/fesm2022/{acorex-modules-business-core-industry.entity-bwgPAZDk.mjs → acorex-modules-business-core-industry.entity-CGNfgpMs.mjs} +2 -2
- package/fesm2022/acorex-modules-business-core-industry.entity-CGNfgpMs.mjs.map +1 -0
- package/fesm2022/{acorex-modules-business-core-manufacturer.entity-CDlQlBUD.mjs → acorex-modules-business-core-manufacturer.entity-DhyMx-nJ.mjs} +2 -1
- package/fesm2022/acorex-modules-business-core-manufacturer.entity-DhyMx-nJ.mjs.map +1 -0
- package/fesm2022/acorex-modules-business-core.mjs +4 -4
- package/fesm2022/{acorex-modules-customer-management-customer-segment.entity-CUBg2GZp.mjs → acorex-modules-customer-management-customer-segment.entity-CoYAU5g3.mjs} +2 -1
- package/fesm2022/acorex-modules-customer-management-customer-segment.entity-CoYAU5g3.mjs.map +1 -0
- package/fesm2022/{acorex-modules-customer-management-customer-type.entity-rmq6BeCF.mjs → acorex-modules-customer-management-customer-type.entity-pt4gpOGq.mjs} +2 -1
- package/fesm2022/acorex-modules-customer-management-customer-type.entity-pt4gpOGq.mjs.map +1 -0
- package/fesm2022/acorex-modules-customer-management.mjs +2 -2
- package/fesm2022/acorex-modules-document-management.mjs +5 -2
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-financial-core.mjs +7 -5
- package/fesm2022/acorex-modules-financial-core.mjs.map +1 -1
- package/fesm2022/acorex-modules-human-capital-management-approve-leave-request.command-DN2T2hBp.mjs +59 -0
- package/fesm2022/acorex-modules-human-capital-management-approve-leave-request.command-DN2T2hBp.mjs.map +1 -0
- package/fesm2022/acorex-modules-human-capital-management-cancel-leave-request.command-CYMo0I8p.mjs +59 -0
- package/fesm2022/acorex-modules-human-capital-management-cancel-leave-request.command-CYMo0I8p.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-BDh7IX7_.mjs → acorex-modules-human-capital-management-leave-request.entity-Dm_IKrVw.mjs} +1 -2
- package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-Dm_IKrVw.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-DlCdAtaz.mjs → acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs} +11 -3
- package/fesm2022/acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs.map +1 -0
- package/fesm2022/acorex-modules-human-capital-management-reject-leave-request.command-1Bn0gaZi.mjs +62 -0
- package/fesm2022/acorex-modules-human-capital-management-reject-leave-request.command-1Bn0gaZi.mjs.map +1 -0
- package/fesm2022/acorex-modules-human-capital-management.mjs +114 -38
- package/fesm2022/acorex-modules-human-capital-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-learning-management-certificate-definition.entity-BVvSzl2b.mjs → acorex-modules-learning-management-certificate-definition.entity-27VKYxw1.mjs} +2 -2
- package/fesm2022/acorex-modules-learning-management-certificate-definition.entity-27VKYxw1.mjs.map +1 -0
- package/fesm2022/{acorex-modules-learning-management-course.entity-BYb3Mgyi.mjs → acorex-modules-learning-management-course.entity-BN8XHAPz.mjs} +2 -2
- package/fesm2022/acorex-modules-learning-management-course.entity-BN8XHAPz.mjs.map +1 -0
- package/fesm2022/{acorex-modules-learning-management-skill.entity-CK93JIPg.mjs → acorex-modules-learning-management-skill.entity-rfMFaOAJ.mjs} +2 -1
- package/fesm2022/acorex-modules-learning-management-skill.entity-rfMFaOAJ.mjs.map +1 -0
- package/fesm2022/{acorex-modules-learning-management-training-definition.entity-C5RVLTy7.mjs → acorex-modules-learning-management-training-definition.entity-NQqJ5avw.mjs} +2 -2
- package/fesm2022/acorex-modules-learning-management-training-definition.entity-NQqJ5avw.mjs.map +1 -0
- package/fesm2022/{acorex-modules-learning-management-training.entity-KfxtUHEK.mjs → acorex-modules-learning-management-training.entity-DHGSlVR3.mjs} +2 -2
- package/fesm2022/acorex-modules-learning-management-training.entity-DHGSlVR3.mjs.map +1 -0
- package/fesm2022/acorex-modules-learning-management.mjs +5 -5
- package/fesm2022/acorex-modules-notification-management.mjs +34 -16
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-order-management.mjs +4 -0
- package/fesm2022/acorex-modules-order-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-organization-management-job-definition.entity-Cki_0gIY.mjs → acorex-modules-organization-management-job-definition.entity-s-TfP412.mjs} +2 -2
- package/fesm2022/acorex-modules-organization-management-job-definition.entity-s-TfP412.mjs.map +1 -0
- package/fesm2022/{acorex-modules-organization-management-position.entity-m7QrOTgN.mjs → acorex-modules-organization-management-position.entity-vbmjSfyb.mjs} +2 -2
- package/fesm2022/acorex-modules-organization-management-position.entity-vbmjSfyb.mjs.map +1 -0
- package/fesm2022/acorex-modules-organization-management.mjs +2 -2
- package/fesm2022/{acorex-modules-person-management-person.entity-DWfnmtVe.mjs → acorex-modules-person-management-person.entity-BnliZw-K.mjs} +35 -33
- package/fesm2022/acorex-modules-person-management-person.entity-BnliZw-K.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-management.mjs +1 -1
- package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-BOo-XED8.mjs → acorex-modules-platform-management-acorex-modules-platform-management-CAntNN8Z.mjs} +4 -2
- package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-BOo-XED8.mjs.map → acorex-modules-platform-management-acorex-modules-platform-management-CAntNN8Z.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-platform-management-menu-list.component-BtQ0O4sx.mjs → acorex-modules-platform-management-menu-list.component-CWutHAb3.mjs} +2 -2
- package/fesm2022/{acorex-modules-platform-management-menu-list.component-BtQ0O4sx.mjs.map → acorex-modules-platform-management-menu-list.component-CWutHAb3.mjs.map} +1 -1
- package/fesm2022/acorex-modules-platform-management.mjs +1 -1
- package/fesm2022/{acorex-modules-product-catalog-brand.entity-DIv0bsiY.mjs → acorex-modules-product-catalog-brand.entity-C8VOfwF0.mjs} +2 -1
- package/fesm2022/acorex-modules-product-catalog-brand.entity-C8VOfwF0.mjs.map +1 -0
- package/fesm2022/{acorex-modules-product-catalog-product-sku.entity-CQw4VxjA.mjs → acorex-modules-product-catalog-product-sku.entity-Cxif--1E.mjs} +2 -1
- package/fesm2022/acorex-modules-product-catalog-product-sku.entity-Cxif--1E.mjs.map +1 -0
- package/fesm2022/{acorex-modules-product-catalog-product.entity-Cqye5OFr.mjs → acorex-modules-product-catalog-product.entity--aXivZUd.mjs} +2 -1
- package/fesm2022/acorex-modules-product-catalog-product.entity--aXivZUd.mjs.map +1 -0
- package/fesm2022/acorex-modules-product-catalog.mjs +3 -3
- package/fesm2022/acorex-modules-project-management.mjs +30 -1
- package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-report-management-report-runner-root-page.component-Cp5QCIll.mjs → acorex-modules-report-management-report-runner-root-page.component-DEX4VgHX.mjs} +9 -9
- package/fesm2022/acorex-modules-report-management-report-runner-root-page.component-DEX4VgHX.mjs.map +1 -0
- package/fesm2022/acorex-modules-report-management.mjs +1 -1
- package/fesm2022/acorex-modules-subscription-management.mjs +3 -0
- package/fesm2022/acorex-modules-subscription-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-supplier-management.mjs +1 -0
- package/fesm2022/acorex-modules-supplier-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-task-management-task-board.page-Cm8wJD-y.mjs → acorex-modules-task-management-task-board.page-6D76WpRB.mjs} +468 -42
- package/fesm2022/acorex-modules-task-management-task-board.page-6D76WpRB.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +9 -3
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-tenant-management.mjs +2 -0
- package/fesm2022/acorex-modules-tenant-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workflow-management.mjs +1692 -28
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/human-capital-management/index.d.ts +1 -0
- package/package.json +2 -2
- package/task-management/index.d.ts +1 -1
- package/workflow-management/index.d.ts +446 -11
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-D5jGjm6i.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-app-chooser.component-BL3Fmc7y.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-password.component-DKG8o8k8.mjs +0 -226
- package/fesm2022/acorex-modules-auth-password.component-DKG8o8k8.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-DNDhBKDp.mjs +0 -109
- package/fesm2022/acorex-modules-auth-tenant-chooser.component-DNDhBKDp.mjs.map +0 -1
- package/fesm2022/acorex-modules-business-core-business-status.entity-DE3JJYdY.mjs.map +0 -1
- package/fesm2022/acorex-modules-business-core-business-type.entity-_IwOWQVA.mjs.map +0 -1
- package/fesm2022/acorex-modules-business-core-industry.entity-bwgPAZDk.mjs.map +0 -1
- package/fesm2022/acorex-modules-business-core-manufacturer.entity-CDlQlBUD.mjs.map +0 -1
- package/fesm2022/acorex-modules-customer-management-customer-segment.entity-CUBg2GZp.mjs.map +0 -1
- package/fesm2022/acorex-modules-customer-management-customer-type.entity-rmq6BeCF.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-BDh7IX7_.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-type.entity-DlCdAtaz.mjs.map +0 -1
- package/fesm2022/acorex-modules-learning-management-certificate-definition.entity-BVvSzl2b.mjs.map +0 -1
- package/fesm2022/acorex-modules-learning-management-course.entity-BYb3Mgyi.mjs.map +0 -1
- package/fesm2022/acorex-modules-learning-management-skill.entity-CK93JIPg.mjs.map +0 -1
- package/fesm2022/acorex-modules-learning-management-training-definition.entity-C5RVLTy7.mjs.map +0 -1
- package/fesm2022/acorex-modules-learning-management-training.entity-KfxtUHEK.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-job-definition.entity-Cki_0gIY.mjs.map +0 -1
- package/fesm2022/acorex-modules-organization-management-position.entity-m7QrOTgN.mjs.map +0 -1
- package/fesm2022/acorex-modules-person-management-person.entity-DWfnmtVe.mjs.map +0 -1
- package/fesm2022/acorex-modules-product-catalog-brand.entity-DIv0bsiY.mjs.map +0 -1
- package/fesm2022/acorex-modules-product-catalog-product-sku.entity-CQw4VxjA.mjs.map +0 -1
- package/fesm2022/acorex-modules-product-catalog-product.entity-Cqye5OFr.mjs.map +0 -1
- package/fesm2022/acorex-modules-report-management-report-runner-root-page.component-Cp5QCIll.mjs.map +0 -1
- package/fesm2022/acorex-modules-task-management-task-board.page-Cm8wJD-y.mjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AXTranslationService } from '@acorex/core/translation';
|
|
2
2
|
import { AXPWorkflowTaskProvider, AXP_WORKFLOW_TASK_PROVIDER } from '@acorex/modules/task-management';
|
|
3
|
-
import {
|
|
3
|
+
import { AXPSystemStatuses, AXPStatusProvider, systemStatusToDefinition, AXPSystemStatusType, AXP_STATUS_PROVIDERS, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
|
4
|
+
import { AXPEntityService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
5
|
+
import { AXPCommandExecutor, AXPCommandEventsService, AXPRuntimeModule, provideCommandSetups } from '@acorex/platform/runtime';
|
|
4
6
|
import * as i0 from '@angular/core';
|
|
5
7
|
import { inject, Injectable, DestroyRef, signal, NgModule, Injector } from '@angular/core';
|
|
6
8
|
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
7
|
-
import { AXPEntityService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
8
|
-
import { AXPSystemStatuses, AXPStatusProvider, systemStatusToDefinition, AXPSystemStatusType, AXP_STATUS_PROVIDERS, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
|
9
9
|
import { AXPTaskBadgeProvider, AXP_TASK_BADGE_PROVIDERS } from '@acorex/platform/layout/components';
|
|
10
10
|
import { AXP_IDENTIFIER_RULES } from '@acorex/modules/identifier-management';
|
|
11
11
|
import { AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER } from '@acorex/platform/core';
|
|
@@ -221,11 +221,13 @@ class AXMLeaveRequestTaskProvider extends AXPWorkflowTaskProvider {
|
|
|
221
221
|
operator: { type: 'equal', negative: true },
|
|
222
222
|
value: AXPSystemStatuses.Cancelled.name,
|
|
223
223
|
});
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
224
|
+
// Filter for tasks that OVERLAP with the given date range
|
|
225
|
+
// A task overlaps if: task.startDate <= range.end AND task.endDate >= range.from
|
|
227
226
|
if (options?.range?.end) {
|
|
228
|
-
baseFilter.filters?.push({ field: '
|
|
227
|
+
baseFilter.filters?.push({ field: 'startDate', operator: { type: 'lte' }, value: options.range.end });
|
|
228
|
+
}
|
|
229
|
+
if (options?.range?.from) {
|
|
230
|
+
baseFilter.filters?.push({ field: 'endDate', operator: { type: 'gte' }, value: options.range.from });
|
|
229
231
|
}
|
|
230
232
|
if (options?.assigneeIds && options.assigneeIds.length > 0) {
|
|
231
233
|
// Filter by manager (assignee) of the employee requesting leave
|
|
@@ -250,6 +252,8 @@ class AXMLeaveRequestTaskProvider extends AXPWorkflowTaskProvider {
|
|
|
250
252
|
description: item.reason ?? '',
|
|
251
253
|
startDate: item.startDate ?? new Date(),
|
|
252
254
|
endDate: item.endDate ?? new Date(),
|
|
255
|
+
// Leave requests are all-day events by default (they span full days)
|
|
256
|
+
allDay: true,
|
|
253
257
|
assignee: {
|
|
254
258
|
id: item.employee?.userId ?? '',
|
|
255
259
|
type: 'user',
|
|
@@ -269,50 +273,94 @@ class AXMLeaveRequestTaskProvider extends AXPWorkflowTaskProvider {
|
|
|
269
273
|
return { items: tasks, total };
|
|
270
274
|
}
|
|
271
275
|
async updateTasks(tasksToUpdate) {
|
|
272
|
-
//
|
|
273
|
-
|
|
276
|
+
// Update each task in the backend
|
|
277
|
+
const updatedTasks = [];
|
|
278
|
+
for (const task of tasksToUpdate) {
|
|
279
|
+
try {
|
|
280
|
+
// Build update payload with all changed fields
|
|
281
|
+
const updatePayload = {};
|
|
282
|
+
// Update status if present
|
|
283
|
+
if (task.status?.id) {
|
|
284
|
+
const statusId = task.status.id;
|
|
285
|
+
updatePayload['statusId'] = statusId;
|
|
286
|
+
}
|
|
287
|
+
// Update dates if present
|
|
288
|
+
if (task.startDate) {
|
|
289
|
+
updatePayload['startDate'] = task.startDate;
|
|
290
|
+
}
|
|
291
|
+
if (task.endDate) {
|
|
292
|
+
updatePayload['endDate'] = task.endDate;
|
|
293
|
+
}
|
|
294
|
+
// Only update if there's something to update
|
|
295
|
+
if (Object.keys(updatePayload).length > 0) {
|
|
296
|
+
await this.leaveRequestData.update(String(task.id), updatePayload);
|
|
297
|
+
}
|
|
298
|
+
// Return the task as-is (already updated in the task object)
|
|
299
|
+
updatedTasks.push(task);
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
console.error(`[LeaveRequestTaskProvider] Failed to update task ${task.id}:`, error);
|
|
303
|
+
// Still include the task even if update failed
|
|
304
|
+
updatedTasks.push(task);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return updatedTasks;
|
|
274
308
|
}
|
|
275
309
|
async executeCommand(command) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
dialogResult = await this.dialogService.showApprovalDialog();
|
|
284
|
-
break;
|
|
285
|
-
case 'rejectLeave':
|
|
286
|
-
dialogResult = await this.dialogService.showRejectionDialog();
|
|
287
|
-
break;
|
|
288
|
-
case 'cancelLeave':
|
|
289
|
-
dialogResult = await this.dialogService.showCancellationDialog();
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
310
|
+
if (!command?.name)
|
|
311
|
+
return { success: true };
|
|
312
|
+
const leaveRequestId = command.options?.['id'] ?? '';
|
|
313
|
+
switch (command.name) {
|
|
314
|
+
case 'approveLeave': {
|
|
315
|
+
// Show approval dialog
|
|
316
|
+
const dialogResult = await this.dialogService.showApprovalDialog();
|
|
292
317
|
// If dialog was cancelled, return early
|
|
293
318
|
if (dialogResult?.cancelled) {
|
|
294
319
|
return { success: false };
|
|
295
320
|
}
|
|
296
|
-
|
|
297
|
-
const result = await this.commandExecutor.execute(
|
|
321
|
+
// Execute the command - use fallback pattern like JSA
|
|
322
|
+
const result = await this.commandExecutor.execute('HumanCapitalManagement.LeaveRequest:Approve', {
|
|
298
323
|
id: leaveRequestId,
|
|
299
324
|
reason: dialogResult?.reason,
|
|
300
325
|
note: dialogResult?.note,
|
|
301
326
|
});
|
|
302
|
-
if (
|
|
303
|
-
|
|
327
|
+
// Return result if exists, otherwise default to success (command might not be registered yet)
|
|
328
|
+
return result ?? { success: true };
|
|
329
|
+
}
|
|
330
|
+
case 'rejectLeave': {
|
|
331
|
+
// Show rejection dialog
|
|
332
|
+
const dialogResult = await this.dialogService.showRejectionDialog();
|
|
333
|
+
// If dialog was cancelled, return early
|
|
334
|
+
if (dialogResult?.cancelled) {
|
|
335
|
+
return { success: false };
|
|
304
336
|
}
|
|
305
|
-
|
|
337
|
+
// Execute the command - use fallback pattern like JSA
|
|
338
|
+
const result = await this.commandExecutor.execute('HumanCapitalManagement.LeaveRequest:Reject', {
|
|
339
|
+
id: leaveRequestId,
|
|
340
|
+
reason: dialogResult?.reason,
|
|
341
|
+
note: dialogResult?.note,
|
|
342
|
+
});
|
|
343
|
+
// Return result if exists, otherwise default to success (command might not be registered yet)
|
|
344
|
+
return result ?? { success: true };
|
|
345
|
+
}
|
|
346
|
+
case 'cancelLeave': {
|
|
347
|
+
// Show cancellation dialog
|
|
348
|
+
const dialogResult = await this.dialogService.showCancellationDialog();
|
|
349
|
+
// If dialog was cancelled, return early
|
|
350
|
+
if (dialogResult?.cancelled) {
|
|
306
351
|
return { success: false };
|
|
307
352
|
}
|
|
353
|
+
// Execute the command - use fallback pattern like JSA
|
|
354
|
+
const result = await this.commandExecutor.execute('HumanCapitalManagement.LeaveRequest:Cancel', {
|
|
355
|
+
id: leaveRequestId,
|
|
356
|
+
reason: dialogResult?.reason,
|
|
357
|
+
note: dialogResult?.note,
|
|
358
|
+
});
|
|
359
|
+
// Return result if exists, otherwise default to success (command might not be registered yet)
|
|
360
|
+
return result ?? { success: true };
|
|
308
361
|
}
|
|
309
|
-
return { success: true };
|
|
310
|
-
}
|
|
311
|
-
catch (error) {
|
|
312
|
-
return {
|
|
313
|
-
success: false,
|
|
314
|
-
};
|
|
315
362
|
}
|
|
363
|
+
return { success: true };
|
|
316
364
|
}
|
|
317
365
|
async getActions(task) {
|
|
318
366
|
const actions = [];
|
|
@@ -560,6 +608,20 @@ class AXMLeaveRequestFeatureModule {
|
|
|
560
608
|
useClass: AXMLeaveRequestStatusProvider,
|
|
561
609
|
multi: true,
|
|
562
610
|
},
|
|
611
|
+
provideCommandSetups([
|
|
612
|
+
{
|
|
613
|
+
key: 'HumanCapitalManagement.LeaveRequest:Approve',
|
|
614
|
+
command: () => import('./acorex-modules-human-capital-management-approve-leave-request.command-DN2T2hBp.mjs').then((c) => c.ApproveLeaveRequestCommand),
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
key: 'HumanCapitalManagement.LeaveRequest:Reject',
|
|
618
|
+
command: () => import('./acorex-modules-human-capital-management-reject-leave-request.command-1Bn0gaZi.mjs').then((c) => c.RejectLeaveRequestCommand),
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
key: 'HumanCapitalManagement.LeaveRequest:Cancel',
|
|
622
|
+
command: () => import('./acorex-modules-human-capital-management-cancel-leave-request.command-CYMo0I8p.mjs').then((c) => c.CancelLeaveRequestCommand),
|
|
623
|
+
},
|
|
624
|
+
]),
|
|
563
625
|
], imports: [CommonModule, AXPRuntimeModule] }); }
|
|
564
626
|
}
|
|
565
627
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMLeaveRequestFeatureModule, decorators: [{
|
|
@@ -582,6 +644,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
582
644
|
useClass: AXMLeaveRequestStatusProvider,
|
|
583
645
|
multi: true,
|
|
584
646
|
},
|
|
647
|
+
provideCommandSetups([
|
|
648
|
+
{
|
|
649
|
+
key: 'HumanCapitalManagement.LeaveRequest:Approve',
|
|
650
|
+
command: () => import('./acorex-modules-human-capital-management-approve-leave-request.command-DN2T2hBp.mjs').then((c) => c.ApproveLeaveRequestCommand),
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
key: 'HumanCapitalManagement.LeaveRequest:Reject',
|
|
654
|
+
command: () => import('./acorex-modules-human-capital-management-reject-leave-request.command-1Bn0gaZi.mjs').then((c) => c.RejectLeaveRequestCommand),
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
key: 'HumanCapitalManagement.LeaveRequest:Cancel',
|
|
658
|
+
command: () => import('./acorex-modules-human-capital-management-cancel-leave-request.command-CYMo0I8p.mjs').then((c) => c.CancelLeaveRequestCommand),
|
|
659
|
+
},
|
|
660
|
+
]),
|
|
585
661
|
],
|
|
586
662
|
}]
|
|
587
663
|
}] });
|
|
@@ -842,9 +918,9 @@ class AXMHumanCapitalModuleEntityProvider {
|
|
|
842
918
|
case RootConfig.entities.positionAssignment?.name:
|
|
843
919
|
return (await import('./acorex-modules-human-capital-management-position-assignment.entity-P-IN-w_1.mjs')).factory();
|
|
844
920
|
case RootConfig.entities.leaveType.name:
|
|
845
|
-
return (await import('./acorex-modules-human-capital-management-leave-type.entity-
|
|
921
|
+
return (await import('./acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs')).factory();
|
|
846
922
|
case RootConfig.entities.leaveRequest.name:
|
|
847
|
-
return (await import('./acorex-modules-human-capital-management-leave-request.entity-
|
|
923
|
+
return (await import('./acorex-modules-human-capital-management-leave-request.entity-Dm_IKrVw.mjs')).factory();
|
|
848
924
|
}
|
|
849
925
|
}
|
|
850
926
|
return null;
|