@acorex/modules 20.3.0-next.19 → 20.3.0-next.20
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/common/index.d.ts +11 -2
- package/fesm2022/acorex-modules-common.mjs +913 -5
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-content-management.mjs +4 -4
- package/fesm2022/acorex-modules-content-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-data-management.mjs +0 -1
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-D39vzY_d.mjs → acorex-modules-human-capital-management-acorex-modules-human-capital-management-BwmZR-qY.mjs} +9 -9
- package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-D39vzY_d.mjs.map → acorex-modules-human-capital-management-acorex-modules-human-capital-management-BwmZR-qY.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-employee-skill.entity-Dd6cSked.mjs → acorex-modules-human-capital-management-employee-skill.entity-tBHFvJSk.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-employee-skill.entity-Dd6cSked.mjs.map → acorex-modules-human-capital-management-employee-skill.entity-tBHFvJSk.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-employee.entity-BtenRYTI.mjs → acorex-modules-human-capital-management-employee.entity-ycy1OPim.mjs} +3 -3
- package/fesm2022/acorex-modules-human-capital-management-employee.entity-ycy1OPim.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-employment-type.entity-D_jB5gh2.mjs → acorex-modules-human-capital-management-employment-type.entity-vBzJD4oD.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-employment-type.entity-D_jB5gh2.mjs.map → acorex-modules-human-capital-management-employment-type.entity-vBzJD4oD.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-iX5YQBQy.mjs → acorex-modules-human-capital-management-leave-request.entity-iVWdJM_r.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-iX5YQBQy.mjs.map → acorex-modules-human-capital-management-leave-request.entity-iVWdJM_r.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-BRPpSgMR.mjs → acorex-modules-human-capital-management-leave-type.entity-C_f9HA6B.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-BRPpSgMR.mjs.map → acorex-modules-human-capital-management-leave-type.entity-C_f9HA6B.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-position-assignment.entity-Bl5GznJG.mjs → acorex-modules-human-capital-management-position-assignment.entity-CQLcD6LO.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-position-assignment.entity-Bl5GznJG.mjs.map → acorex-modules-human-capital-management-position-assignment.entity-CQLcD6LO.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-skill-level.entity-C2JSzWDw.mjs → acorex-modules-human-capital-management-skill-level.entity-CoBQ9Jbt.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-skill-level.entity-C2JSzWDw.mjs.map → acorex-modules-human-capital-management-skill-level.entity-CoBQ9Jbt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-skill.entity-hW9jC2GU.mjs → acorex-modules-human-capital-management-skill.entity-BhKcpZiD.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-skill.entity-hW9jC2GU.mjs.map → acorex-modules-human-capital-management-skill.entity-BhKcpZiD.mjs.map} +1 -1
- package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
- package/fesm2022/acorex-modules-locale-management.mjs +12 -87
- package/fesm2022/acorex-modules-locale-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-location-management.mjs +7 -109
- package/fesm2022/acorex-modules-location-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-report-management.mjs +78 -50
- package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-task-management.mjs +12 -187
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-training-management.mjs +7 -0
- package/fesm2022/acorex-modules-training-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workflow-management-overview.command-BY_DtTDo.mjs +31 -0
- package/fesm2022/acorex-modules-workflow-management-overview.command-BY_DtTDo.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management.mjs +257 -81
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/package.json +6 -6
- package/report-management/index.d.ts +4 -4
- package/workflow-management/index.d.ts +1 -1
- package/fesm2022/acorex-modules-human-capital-management-employee.entity-BtenRYTI.mjs.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AXPEntityDynamicDialogService } from '@acorex/platform/layout/entity';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, Injectable } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
class AXMOverviewCommand {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.entityBuilder = inject(AXPEntityDynamicDialogService);
|
|
8
|
+
}
|
|
9
|
+
async execute(input) {
|
|
10
|
+
console.log(input.refId);
|
|
11
|
+
const dialog = await this.entityBuilder.entity(input.refType).update(input.refId).mode('view')
|
|
12
|
+
.field('promotion', 'signed', (f) => {
|
|
13
|
+
f.customWidget('signature', {
|
|
14
|
+
//path: 'signed',
|
|
15
|
+
}).mode('edit');
|
|
16
|
+
})
|
|
17
|
+
.show();
|
|
18
|
+
console.log(dialog.context());
|
|
19
|
+
}
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXMOverviewCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXMOverviewCommand, providedIn: 'root' }); }
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXMOverviewCommand, decorators: [{
|
|
24
|
+
type: Injectable,
|
|
25
|
+
args: [{
|
|
26
|
+
providedIn: 'root',
|
|
27
|
+
}]
|
|
28
|
+
}] });
|
|
29
|
+
|
|
30
|
+
export { AXMOverviewCommand };
|
|
31
|
+
//# sourceMappingURL=acorex-modules-workflow-management-overview.command-BY_DtTDo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-modules-workflow-management-overview.command-BY_DtTDo.mjs","sources":["../tmp-esm2022/workflow-management/lib/features/distribution/tasks/overview.command.js"],"sourcesContent":["import { AXPEntityDynamicDialogService } from '@acorex/platform/layout/entity';\nimport { inject, Injectable } from '@angular/core';\nimport * as i0 from \"@angular/core\";\nexport class AXMOverviewCommand {\n constructor() {\n this.entityBuilder = inject(AXPEntityDynamicDialogService);\n }\n async execute(input) {\n console.log(input.refId);\n const dialog = await this.entityBuilder.entity(input.refType).update(input.refId).mode('view')\n .field('promotion', 'signed', (f) => {\n f.customWidget('signature', {\n //path: 'signed',\n }).mode('edit');\n })\n .show();\n console.log(dialog.context());\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: AXMOverviewCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: AXMOverviewCommand, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: AXMOverviewCommand, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3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C,YAAY,CAAC,WAAW,EAAE;AACxC;AACA,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;AAC3B,QAAQ,CAAC;AACT,aAAa,IAAI,EAAE;AACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;AACrC,IAAI;AACJ,IAAI,SAAS,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;AACrL,IAAI,SAAS,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,qBAAqB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;AAC5J;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC;AAC5H,YAAY,IAAI,EAAE,UAAU;AAC5B,YAAY,IAAI,EAAE,CAAC;AACnB,oBAAoB,UAAU,EAAE,MAAM;AACtC,iBAAiB;AACjB,SAAS,CAAC,EAAE,CAAC;;;;"}
|
|
@@ -3,7 +3,7 @@ import { AXPEntityCommandScope, createAllQueryView, AXPEntityQueryType, AXP_MENU
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, Injector, runInInjectionContext, Injectable, NgModule } from '@angular/core';
|
|
5
5
|
import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
6
|
-
import { ensureListActions, actionExists, AXMEntityCrudServiceImpl, AXP_ENTITY_ACTION_PLUGIN, AXPEntityDefinitionRegistryService,
|
|
6
|
+
import { ensureListActions, actionExists, AXMEntityCrudServiceImpl, AXP_ENTITY_ACTION_PLUGIN, AXPEntityDefinitionRegistryService, entityMasterDeleteAction, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
7
7
|
import * as i2 from '@acorex/platform/layout/widget-core';
|
|
8
8
|
import { AXPWidgetGroupEnum, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule, AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
9
9
|
import * as i1 from '@acorex/platform/workflow';
|
|
@@ -12,6 +12,7 @@ import { AXTranslationService } from '@acorex/core/translation';
|
|
|
12
12
|
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
13
13
|
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY } from '@acorex/platform/layout/widgets';
|
|
14
14
|
import { AXPWorkflowTaskProvider, AXP_WORKFLOW_TASK_PROVIDER } from '@acorex/modules/task-management';
|
|
15
|
+
import { AXPCommandExecutor, provideCommandSetups } from '@acorex/platform/runtime';
|
|
15
16
|
|
|
16
17
|
class AXMMenuProvider {
|
|
17
18
|
async provide(context) { }
|
|
@@ -65,7 +66,7 @@ const signPlugin = {
|
|
|
65
66
|
priority: 'secondary',
|
|
66
67
|
type: 'sign',
|
|
67
68
|
scope: AXPEntityCommandScope.Individual,
|
|
68
|
-
|
|
69
|
+
disabled: "{{ (context.eval('signatures') ?? []).filter((x) => x.auditInfo.created.by.id === session.currentUser().id).length > 0 }}",
|
|
69
70
|
};
|
|
70
71
|
// Ensure group and section ids (unique per field)
|
|
71
72
|
const sectionId = `signatures-${field}`;
|
|
@@ -194,6 +195,7 @@ class AXMSignPopupAction extends AXPWorkflowAction {
|
|
|
194
195
|
const action = dialogRef.action();
|
|
195
196
|
if (action === 'cancel') {
|
|
196
197
|
context.setOutput('confirmed', 'cancelled');
|
|
198
|
+
dialogRef.close();
|
|
197
199
|
return;
|
|
198
200
|
}
|
|
199
201
|
const ctx = dialogRef.context();
|
|
@@ -428,14 +430,12 @@ class AXMEntityDistributionProvider {
|
|
|
428
430
|
],
|
|
429
431
|
properties: [
|
|
430
432
|
{
|
|
431
|
-
name: '
|
|
432
|
-
title: '@workflow:terms.distribution.assignedTo',
|
|
433
|
+
name: 'assignedId',
|
|
434
|
+
title: '@workflow-management:terms.distribution.assignedTo',
|
|
433
435
|
groupId: 'basic-info',
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
},
|
|
438
|
-
schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.lookup, options: {
|
|
436
|
+
schema: {
|
|
437
|
+
dataType: 'string', interface: {
|
|
438
|
+
type: AXPWidgetsCatalog.lookup, options: {
|
|
439
439
|
multiple: false,
|
|
440
440
|
entity: 'SecurityManagement.User',
|
|
441
441
|
textField: 'displayName',
|
|
@@ -446,7 +446,9 @@ class AXMEntityDistributionProvider {
|
|
|
446
446
|
{ source: 'username', target: 'assigned.username' },
|
|
447
447
|
{ source: 'displayName', target: 'assigned.displayName' },
|
|
448
448
|
],
|
|
449
|
-
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
},
|
|
450
452
|
validations: [{ rule: 'required' }],
|
|
451
453
|
},
|
|
452
454
|
{
|
|
@@ -487,14 +489,6 @@ class AXMEntityDistributionProvider {
|
|
|
487
489
|
},
|
|
488
490
|
interfaces: {
|
|
489
491
|
master: {
|
|
490
|
-
create: {
|
|
491
|
-
sections: [{ id: 'basic-info' }, ...(enableAppearance ? [{ id: 'appearance' }] : [])],
|
|
492
|
-
properties: [
|
|
493
|
-
{ name: 'assignedTo', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
|
|
494
|
-
{ name: 'viewAt', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
|
|
495
|
-
{ name: 'signedAt', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },
|
|
496
|
-
],
|
|
497
|
-
},
|
|
498
492
|
update: {
|
|
499
493
|
sections: [{ id: 'basic-info' }, ...(enableAppearance ? [{ id: 'appearance' }] : [])],
|
|
500
494
|
properties: [
|
|
@@ -517,7 +511,6 @@ class AXMEntityDistributionProvider {
|
|
|
517
511
|
actions: [entityMasterDeleteAction()],
|
|
518
512
|
},
|
|
519
513
|
list: {
|
|
520
|
-
actions: [...entityMasterCrudActions()],
|
|
521
514
|
views: [createAllQueryView({ sorts: [{ name: 'assignedTo', dir: 'asc' }] })],
|
|
522
515
|
},
|
|
523
516
|
},
|
|
@@ -542,7 +535,7 @@ const distributionPlugin = {
|
|
|
542
535
|
const baseEntityName = ctx.entity.name;
|
|
543
536
|
const distributionEntityName = `${moduleName}.${baseEntityName}Distribution`;
|
|
544
537
|
const action = {
|
|
545
|
-
title: '@
|
|
538
|
+
title: '@workflow-management:actions.distribution.title',
|
|
546
539
|
name: 'distribution-entity',
|
|
547
540
|
command: {
|
|
548
541
|
name: 'distribution',
|
|
@@ -553,7 +546,8 @@ const distributionPlugin = {
|
|
|
553
546
|
},
|
|
554
547
|
priority: 'secondary',
|
|
555
548
|
type: 'distribution',
|
|
556
|
-
scope: AXPEntityCommandScope.Individual
|
|
549
|
+
scope: AXPEntityCommandScope.Individual,
|
|
550
|
+
disabled: '{{ context.eval("stateInfo.isDistributed") }}'
|
|
557
551
|
};
|
|
558
552
|
ensureListActions(ctx);
|
|
559
553
|
ctx.interfaces.update((i) => {
|
|
@@ -569,7 +563,7 @@ const distributionPlugin = {
|
|
|
569
563
|
});
|
|
570
564
|
ctx.relatedEntities.add({
|
|
571
565
|
entity: distributionEntityName,
|
|
572
|
-
title: '@
|
|
566
|
+
title: '@workflow-management:terms.classification.distribution',
|
|
573
567
|
columns: ['assignedTo', 'viewAt', 'signedAt'],
|
|
574
568
|
conditions: [
|
|
575
569
|
{
|
|
@@ -603,7 +597,7 @@ class AXMCommonDistributionPopupAction extends AXPWorkflowAction {
|
|
|
603
597
|
.content(flex => {
|
|
604
598
|
flex
|
|
605
599
|
.setDirection('column')
|
|
606
|
-
.formField('@
|
|
600
|
+
.formField('@workflow-management:actions.distribution.title', field => {
|
|
607
601
|
field.path('assignedTo');
|
|
608
602
|
field.lookupBox({
|
|
609
603
|
entity: 'SecurityManagement.User',
|
|
@@ -616,7 +610,7 @@ class AXMCommonDistributionPopupAction extends AXPWorkflowAction {
|
|
|
616
610
|
.setActions(actions => {
|
|
617
611
|
actions.cancel('@general:actions.cancel.title');
|
|
618
612
|
const submitAction = {
|
|
619
|
-
title: '@
|
|
613
|
+
title: '@workflow-management:actions.distribution.title',
|
|
620
614
|
color: 'primary',
|
|
621
615
|
command: { name: 'submit', options: { validate: true } },
|
|
622
616
|
};
|
|
@@ -627,6 +621,7 @@ class AXMCommonDistributionPopupAction extends AXPWorkflowAction {
|
|
|
627
621
|
const action = dialogRef.action();
|
|
628
622
|
if (action === 'cancel') {
|
|
629
623
|
context.setOutput('confirmed', false);
|
|
624
|
+
dialogRef.close();
|
|
630
625
|
return;
|
|
631
626
|
}
|
|
632
627
|
const ctx = dialogRef.context();
|
|
@@ -649,28 +644,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
649
644
|
class AXMCommonCreateDistributionRecordsAction extends AXPWorkflowAction {
|
|
650
645
|
constructor() {
|
|
651
646
|
super(...arguments);
|
|
652
|
-
this.
|
|
647
|
+
this.commandExecutor = inject(AXPCommandExecutor);
|
|
653
648
|
}
|
|
654
649
|
async execute(context) {
|
|
655
650
|
const refId = context.getVariable('options.refId');
|
|
656
651
|
const refType = context.getVariable('options.refType');
|
|
657
652
|
const assignedTo = context.getOutput('assignedTo');
|
|
658
|
-
const
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
}
|
|
667
|
-
context.setOutput('success', true);
|
|
668
|
-
context.setOutput('distributionCount', assignedTo.length);
|
|
669
|
-
}
|
|
670
|
-
catch (error) {
|
|
671
|
-
context.setOutput('success', false);
|
|
672
|
-
context.setOutput('error', error);
|
|
673
|
-
}
|
|
653
|
+
const res = await this.commandExecutor.execute('Distribution:Record', {
|
|
654
|
+
refId,
|
|
655
|
+
refType,
|
|
656
|
+
assignedTo,
|
|
657
|
+
});
|
|
658
|
+
context.setOutput('success', res?.success);
|
|
659
|
+
context.setOutput('message', res?.message);
|
|
660
|
+
context.setOutput('distributionCount', assignedTo.length);
|
|
674
661
|
}
|
|
675
662
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXMCommonCreateDistributionRecordsAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
676
663
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXMCommonCreateDistributionRecordsAction }); }
|
|
@@ -739,6 +726,140 @@ const AXMCommonDistributionWorkflow = {
|
|
|
739
726
|
},
|
|
740
727
|
};
|
|
741
728
|
|
|
729
|
+
class AXMPromotionDistributionTaskProvider extends AXPWorkflowTaskProvider {
|
|
730
|
+
constructor() {
|
|
731
|
+
super();
|
|
732
|
+
this.injector = inject(Injector);
|
|
733
|
+
this.commandExecutor = inject(AXPCommandExecutor);
|
|
734
|
+
this.entityKey = 'ContentManagement.Promotion';
|
|
735
|
+
}
|
|
736
|
+
get name() {
|
|
737
|
+
return `${this.entityKey}-distribution`;
|
|
738
|
+
}
|
|
739
|
+
get title() {
|
|
740
|
+
return `${this.entityKey} Distribution`;
|
|
741
|
+
}
|
|
742
|
+
get icon() {
|
|
743
|
+
return 'fa-light fa-file-pen';
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Retrieves a list of tasks, optionally filtered by a date range.
|
|
747
|
+
* If a date range is provided in the options, only tasks that overlap with that range will be returned.
|
|
748
|
+
* @param options Filtering options, primarily containing a date range.
|
|
749
|
+
* @returns An array of filtered tasks.
|
|
750
|
+
*/
|
|
751
|
+
async getTasks(options) {
|
|
752
|
+
const dataService = runInInjectionContext(this.injector, () => new AXMEntityCrudServiceImpl(this.entityKey));
|
|
753
|
+
const dataServiceDistribution = runInInjectionContext(this.injector, () => new AXMEntityCrudServiceImpl(`${this.entityKey}Distribution`));
|
|
754
|
+
const baseFilter = {
|
|
755
|
+
logic: 'and',
|
|
756
|
+
filters: [],
|
|
757
|
+
};
|
|
758
|
+
baseFilter.filters?.push({
|
|
759
|
+
field: 'stateInfo.isDistributed',
|
|
760
|
+
operator: { type: 'equal' },
|
|
761
|
+
value: true,
|
|
762
|
+
});
|
|
763
|
+
// if (options?.range?.from) {
|
|
764
|
+
// baseFilter.filters?.push({
|
|
765
|
+
// field: 'distributionDate',
|
|
766
|
+
// operator: { type: 'gte' },
|
|
767
|
+
// value: options!.range!.from,
|
|
768
|
+
// });
|
|
769
|
+
// }
|
|
770
|
+
// if (options?.range?.end) {
|
|
771
|
+
// baseFilter.filters?.push({
|
|
772
|
+
// field: 'distributionDate',
|
|
773
|
+
// operator: { type: 'lte' },
|
|
774
|
+
// value: options!.range!.end,
|
|
775
|
+
// });
|
|
776
|
+
// }
|
|
777
|
+
const filteredList = await dataService.query({
|
|
778
|
+
skip: options?.skip ?? 0,
|
|
779
|
+
take: options?.take ?? 10,
|
|
780
|
+
filter: baseFilter,
|
|
781
|
+
});
|
|
782
|
+
const itemsDistribution = (await dataServiceDistribution.query({
|
|
783
|
+
skip: options?.skip ?? 0,
|
|
784
|
+
take: 1,
|
|
785
|
+
filter: {
|
|
786
|
+
logic: 'and',
|
|
787
|
+
filters: [
|
|
788
|
+
{
|
|
789
|
+
field: 'distributionRefId',
|
|
790
|
+
operator: { type: 'equal' },
|
|
791
|
+
value: filteredList.items[0].id,
|
|
792
|
+
},
|
|
793
|
+
],
|
|
794
|
+
},
|
|
795
|
+
})).items[0];
|
|
796
|
+
return {
|
|
797
|
+
items: filteredList.items.map((item) => ({
|
|
798
|
+
id: item.id,
|
|
799
|
+
title: `${item.distributionRefType} - ${item.distributionRefId}`,
|
|
800
|
+
startDate: itemsDistribution.auditInfo?.created?.at ?? new Date(),
|
|
801
|
+
endDate: itemsDistribution.dueDate ?? new Date(),
|
|
802
|
+
index: 0,
|
|
803
|
+
status: {
|
|
804
|
+
id: 0,
|
|
805
|
+
title: 'Pending',
|
|
806
|
+
},
|
|
807
|
+
priority: 'high',
|
|
808
|
+
reporter: {
|
|
809
|
+
id: item.auditInfo?.created?.by?.id ?? '',
|
|
810
|
+
type: 'user',
|
|
811
|
+
fullName: item.auditInfo?.created?.by?.fullName ?? '',
|
|
812
|
+
},
|
|
813
|
+
data: item,
|
|
814
|
+
})),
|
|
815
|
+
total: filteredList.total,
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Updates one or more tasks in the provider's list.
|
|
820
|
+
* This method finds each task by its ID and applies the new properties from the input.
|
|
821
|
+
* It also automatically recalculates the `allDay` flag based on the task's duration.
|
|
822
|
+
* @param tasksToUpdate An array of task objects to update. Each object must have an `id`.
|
|
823
|
+
* @returns An array of the tasks that were successfully updated.
|
|
824
|
+
*/
|
|
825
|
+
async updateTasks(tasksToUpdate) {
|
|
826
|
+
console.log(tasksToUpdate);
|
|
827
|
+
return tasksToUpdate;
|
|
828
|
+
}
|
|
829
|
+
async executeCommand(command) {
|
|
830
|
+
if (command.name === 'Distribution:Overview') {
|
|
831
|
+
this.commandExecutor.execute(command.name, command.options);
|
|
832
|
+
}
|
|
833
|
+
return { success: true };
|
|
834
|
+
}
|
|
835
|
+
async getActions(task) {
|
|
836
|
+
const edit = {
|
|
837
|
+
title: '@workflow-management:actions.distribution.sign',
|
|
838
|
+
command: {
|
|
839
|
+
name: 'Distribution:Overview',
|
|
840
|
+
options: {
|
|
841
|
+
id: task?.id,
|
|
842
|
+
title: task?.title,
|
|
843
|
+
refId: task?.data?.id,
|
|
844
|
+
refType: this.entityKey,
|
|
845
|
+
},
|
|
846
|
+
},
|
|
847
|
+
};
|
|
848
|
+
return [edit];
|
|
849
|
+
}
|
|
850
|
+
async getExtraFields() {
|
|
851
|
+
return [];
|
|
852
|
+
}
|
|
853
|
+
async getStatuses() {
|
|
854
|
+
return [
|
|
855
|
+
{ index: 0, key: 'pending', title: 'Pending' },
|
|
856
|
+
{ index: 1, key: 'in-progress', title: 'In Progress' },
|
|
857
|
+
{ index: 2, key: 'done', title: 'Done' },
|
|
858
|
+
{ index: 3, key: 'canceled', title: 'Canceled' },
|
|
859
|
+
];
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
742
863
|
class AXPDistributionPluginModule {
|
|
743
864
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPDistributionPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
744
865
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: AXPDistributionPluginModule, imports: [i1.AXPWorkflowModule] }); }
|
|
@@ -764,6 +885,31 @@ class AXPDistributionPluginModule {
|
|
|
764
885
|
useClass: AXMEntityDistributionProvider,
|
|
765
886
|
multi: true,
|
|
766
887
|
},
|
|
888
|
+
{
|
|
889
|
+
provide: AXP_WORKFLOW_TASK_PROVIDER,
|
|
890
|
+
useClass: AXMPromotionDistributionTaskProvider,
|
|
891
|
+
multi: true,
|
|
892
|
+
},
|
|
893
|
+
// Dynamic Distribution Task Providers from Registry
|
|
894
|
+
// {
|
|
895
|
+
// provide: AXP_WORKFLOW_TASK_PROVIDER,
|
|
896
|
+
// useFactory: (registry: AXMDistributionTaskProviderRegistry) => {
|
|
897
|
+
// debugger;
|
|
898
|
+
// // Return all registered providers from the registry
|
|
899
|
+
// const providers = registry.getAllProviders();
|
|
900
|
+
// console.log('Distribution Task Providers:', providers);
|
|
901
|
+
// return providers;
|
|
902
|
+
// },
|
|
903
|
+
// deps: [AXMDistributionTaskProviderRegistry],
|
|
904
|
+
// multi: true,
|
|
905
|
+
// },
|
|
906
|
+
// createDistributionTaskProviders(),
|
|
907
|
+
provideCommandSetups([
|
|
908
|
+
{
|
|
909
|
+
key: 'Distribution:Overview',
|
|
910
|
+
command: () => import('./acorex-modules-workflow-management-overview.command-BY_DtTDo.mjs').then((c) => c.AXMOverviewCommand),
|
|
911
|
+
},
|
|
912
|
+
])
|
|
767
913
|
], imports: [AXPWorkflowModule.forChild({
|
|
768
914
|
actions: {
|
|
769
915
|
AXMCommonDistributionPopupAction,
|
|
@@ -799,6 +945,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
799
945
|
useClass: AXMEntityDistributionProvider,
|
|
800
946
|
multi: true,
|
|
801
947
|
},
|
|
948
|
+
{
|
|
949
|
+
provide: AXP_WORKFLOW_TASK_PROVIDER,
|
|
950
|
+
useClass: AXMPromotionDistributionTaskProvider,
|
|
951
|
+
multi: true,
|
|
952
|
+
},
|
|
953
|
+
// Dynamic Distribution Task Providers from Registry
|
|
954
|
+
// {
|
|
955
|
+
// provide: AXP_WORKFLOW_TASK_PROVIDER,
|
|
956
|
+
// useFactory: (registry: AXMDistributionTaskProviderRegistry) => {
|
|
957
|
+
// debugger;
|
|
958
|
+
// // Return all registered providers from the registry
|
|
959
|
+
// const providers = registry.getAllProviders();
|
|
960
|
+
// console.log('Distribution Task Providers:', providers);
|
|
961
|
+
// return providers;
|
|
962
|
+
// },
|
|
963
|
+
// deps: [AXMDistributionTaskProviderRegistry],
|
|
964
|
+
// multi: true,
|
|
965
|
+
// },
|
|
966
|
+
// createDistributionTaskProviders(),
|
|
967
|
+
provideCommandSetups([
|
|
968
|
+
{
|
|
969
|
+
key: 'Distribution:Overview',
|
|
970
|
+
command: () => import('./acorex-modules-workflow-management-overview.command-BY_DtTDo.mjs').then((c) => c.AXMOverviewCommand),
|
|
971
|
+
},
|
|
972
|
+
])
|
|
802
973
|
],
|
|
803
974
|
imports: [
|
|
804
975
|
AXPWorkflowModule.forChild({
|
|
@@ -842,25 +1013,32 @@ class AXMDistributionTaskProvider extends AXPWorkflowTaskProvider {
|
|
|
842
1013
|
logic: 'and',
|
|
843
1014
|
filters: [],
|
|
844
1015
|
};
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
1016
|
+
debugger;
|
|
1017
|
+
baseFilter.filters?.push({
|
|
1018
|
+
field: 'stateInfo.isDistributed',
|
|
1019
|
+
operator: { type: 'equal' },
|
|
1020
|
+
value: true,
|
|
1021
|
+
});
|
|
1022
|
+
// if (options?.range?.from) {
|
|
1023
|
+
// baseFilter.filters?.push({
|
|
1024
|
+
// field: 'distributionDate',
|
|
1025
|
+
// operator: { type: 'gte' },
|
|
1026
|
+
// value: options!.range!.from,
|
|
1027
|
+
// });
|
|
1028
|
+
// }
|
|
1029
|
+
// if (options?.range?.end) {
|
|
1030
|
+
// baseFilter.filters?.push({
|
|
1031
|
+
// field: 'distributionDate',
|
|
1032
|
+
// operator: { type: 'lte' },
|
|
1033
|
+
// value: options!.range!.end,
|
|
1034
|
+
// });
|
|
1035
|
+
// }
|
|
859
1036
|
const filteredList = await dataService.query({
|
|
860
1037
|
skip: options?.skip ?? 0,
|
|
861
1038
|
take: options?.take ?? 10,
|
|
862
1039
|
filter: baseFilter,
|
|
863
1040
|
});
|
|
1041
|
+
console.log(filteredList);
|
|
864
1042
|
return {
|
|
865
1043
|
items: filteredList.items.map((item) => ({
|
|
866
1044
|
id: item.id,
|
|
@@ -895,8 +1073,8 @@ class AXMDistributionTaskProvider extends AXPWorkflowTaskProvider {
|
|
|
895
1073
|
return tasksToUpdate;
|
|
896
1074
|
}
|
|
897
1075
|
async executeCommand(command) {
|
|
898
|
-
if (command.name === '
|
|
899
|
-
this.workflowService.execute(command.name, command);
|
|
1076
|
+
if (command.name === 'Distribution:Overview') {
|
|
1077
|
+
this.workflowService.execute(command.name, command.options);
|
|
900
1078
|
}
|
|
901
1079
|
return { success: true };
|
|
902
1080
|
}
|
|
@@ -904,12 +1082,12 @@ class AXMDistributionTaskProvider extends AXPWorkflowTaskProvider {
|
|
|
904
1082
|
const edit = {
|
|
905
1083
|
title: '@workflow-management:actions.distribution.sign',
|
|
906
1084
|
command: {
|
|
907
|
-
name: '
|
|
1085
|
+
name: 'Distribution:Overview',
|
|
908
1086
|
options: {
|
|
909
1087
|
id: task?.id,
|
|
910
1088
|
title: task?.title,
|
|
911
|
-
distributionRefId: task?.data?.
|
|
912
|
-
distributionRefType:
|
|
1089
|
+
distributionRefId: task?.data?.id,
|
|
1090
|
+
distributionRefType: this.entityKey,
|
|
913
1091
|
},
|
|
914
1092
|
},
|
|
915
1093
|
};
|
|
@@ -992,26 +1170,28 @@ function createDistributionTaskProviders() {
|
|
|
992
1170
|
provide: AXP_WORKFLOW_TASK_PROVIDER,
|
|
993
1171
|
useFactory: async (injector) => {
|
|
994
1172
|
const providers = [];
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1005
|
-
|
|
1173
|
+
setTimeout(async () => {
|
|
1174
|
+
try {
|
|
1175
|
+
// Get discovery service
|
|
1176
|
+
const discoveryService = injector.get(AXMDistributionEntityDiscoveryService, null);
|
|
1177
|
+
if (discoveryService) {
|
|
1178
|
+
// Get all distribution entity keys
|
|
1179
|
+
const distributionEntityKeys = await discoveryService.getDistributionEntityKeys();
|
|
1180
|
+
// Create task providers for each distribution entity
|
|
1181
|
+
for (const entityKey of distributionEntityKeys) {
|
|
1182
|
+
const provider = new AXMDistributionTaskProvider(entityKey);
|
|
1183
|
+
providers.push(provider);
|
|
1184
|
+
console.log(`Created distribution task provider for entity: ${entityKey}`);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
else {
|
|
1188
|
+
console.warn('Distribution entity discovery service not available');
|
|
1006
1189
|
}
|
|
1007
1190
|
}
|
|
1008
|
-
|
|
1009
|
-
console.warn('
|
|
1191
|
+
catch (error) {
|
|
1192
|
+
console.warn('Could not create dynamic distribution task providers:', error);
|
|
1010
1193
|
}
|
|
1011
|
-
}
|
|
1012
|
-
catch (error) {
|
|
1013
|
-
console.warn('Could not create dynamic distribution task providers:', error);
|
|
1014
|
-
}
|
|
1194
|
+
}, 1000);
|
|
1015
1195
|
return providers;
|
|
1016
1196
|
},
|
|
1017
1197
|
deps: [Injector],
|
|
@@ -1078,8 +1258,6 @@ class AXMWorkflowManagementModule {
|
|
|
1078
1258
|
useClass: AXMMenuProvider,
|
|
1079
1259
|
multi: true,
|
|
1080
1260
|
},
|
|
1081
|
-
// Register dynamic distribution task providers
|
|
1082
|
-
createDistributionTaskProvidersFromEntityProvider(),
|
|
1083
1261
|
], imports: [AXMCalendarManagementModule, AXMSignPluginModule, AXPDistributionPluginModule] }); }
|
|
1084
1262
|
}
|
|
1085
1263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXMWorkflowManagementModule, decorators: [{
|
|
@@ -1092,8 +1270,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
1092
1270
|
useClass: AXMMenuProvider,
|
|
1093
1271
|
multi: true,
|
|
1094
1272
|
},
|
|
1095
|
-
// Register dynamic distribution task providers
|
|
1096
|
-
createDistributionTaskProvidersFromEntityProvider(),
|
|
1097
1273
|
],
|
|
1098
1274
|
}]
|
|
1099
1275
|
}] });
|