@acorex/modules 21.0.0-next.15 → 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 +374 -167
- 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-calendar-management.mjs +4 -3
- package/fesm2022/acorex-modules-calendar-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-common.mjs +34 -28
- 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-drive-choose.component-BOeZ9mpL.mjs → acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs} +7 -3
- package/fesm2022/acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management.mjs +3014 -699
- 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-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-t-iBvKOh.mjs → acorex-modules-task-management-task-board.page-CuP9U1h8.mjs} +58 -51
- 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 +6 -6
- 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-document-management-drive-choose.component-BOeZ9mpL.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-t-iBvKOh.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,7 +1,7 @@
|
|
|
1
1
|
import { AXPSessionService, AXPAuthGuard, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
2
2
|
import { AXPEntityService, AXMEntityCrudServiceImpl, entityMasterCrudActions, entityMasterRecordActions, cloneLayoutArrays, ensureLayoutSection, ensureLayoutPropertyView, ensureListActions, actionExists, AXPEntityDefinitionRegistryService, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_STORAGE_MIDDLEWARE, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
3
3
|
import { AXPHookService, AXPPlatformScope, AXPDataGenerator, AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXPDeviceService, resolvePlatformScopeKey, resolvePlatformScopeName } from '@acorex/platform/core';
|
|
4
|
-
import { AXPSearchCommandProvider, createAllQueryView, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPFileStorageService, AXPFilterOperatorMiddlewareService, AXPSettingsService, AXPLockService, UploadFromComputerActionProvider, AXP_FILE_ACTION_PROVIDER,
|
|
4
|
+
import { AXPSearchCommandProvider, createAllQueryView, createQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPFileStorageService, AXPFilterOperatorMiddlewareService, AXPSettingsService, AXPLockService, UploadFromComputerActionProvider, AXP_FILE_ACTION_PROVIDER, AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { Injectable, inject, Injector, NgModule, ChangeDetectionStrategy, Component, signal, computed, viewChild, input, effect, ViewEncapsulation, untracked, HostListener } from '@angular/core';
|
|
7
7
|
import * as i3$2 from '@acorex/core/translation';
|
|
@@ -10,6 +10,7 @@ import { firstValueFrom } from 'rxjs';
|
|
|
10
10
|
import * as i6 from '@acorex/platform/layout/widget-core';
|
|
11
11
|
import { AXPWidgetsCatalog, AXPValueWidgetComponent, AXPWidgetCoreModule, AXP_WIDGETS_ADVANCE_CATEGORY } from '@acorex/platform/layout/widget-core';
|
|
12
12
|
import { RouterModule, ROUTES, Router, ActivatedRoute } from '@angular/router';
|
|
13
|
+
import { set, castArray, get as get$1 } from 'lodash-es';
|
|
13
14
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
14
15
|
import * as i7 from '@acorex/components/collapse';
|
|
15
16
|
import { AXCollapseModule } from '@acorex/components/collapse';
|
|
@@ -24,15 +25,8 @@ import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
|
24
25
|
import * as i2 from '@angular/forms';
|
|
25
26
|
import { FormsModule } from '@angular/forms';
|
|
26
27
|
import get from 'lodash-es/get';
|
|
27
|
-
import set from 'lodash-es/set';
|
|
28
|
+
import set$1 from 'lodash-es/set';
|
|
28
29
|
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY } from '@acorex/platform/layout/widgets';
|
|
29
|
-
import { AXDialogService } from '@acorex/components/dialog';
|
|
30
|
-
import { AXPopupService } from '@acorex/components/popup';
|
|
31
|
-
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
32
|
-
import * as i3$1 from '@acorex/platform/workflow';
|
|
33
|
-
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
34
|
-
import { AXFileService, AXFileModule } from '@acorex/core/file';
|
|
35
|
-
import { castArray, get as get$1, set as set$1 } from 'lodash-es';
|
|
36
30
|
import * as i2$2 from '@acorex/components/media-viewer';
|
|
37
31
|
import { AXMediaViewerModule } from '@acorex/components/media-viewer';
|
|
38
32
|
import * as i1$1 from '@acorex/components/button';
|
|
@@ -48,6 +42,12 @@ import { AXPStateMessageComponent, AXPThemeLayoutBlockComponent } from '@acorex/
|
|
|
48
42
|
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
49
43
|
import * as i1$2 from '@angular/common';
|
|
50
44
|
import { CommonModule } from '@angular/common';
|
|
45
|
+
import { AXDialogService } from '@acorex/components/dialog';
|
|
46
|
+
import { AXPopupService } from '@acorex/components/popup';
|
|
47
|
+
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
48
|
+
import * as i3$1 from '@acorex/platform/workflow';
|
|
49
|
+
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
50
|
+
import { AXFileService, AXFileModule } from '@acorex/core/file';
|
|
51
51
|
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
52
52
|
import { AXUploaderService } from '@acorex/cdk/uploader';
|
|
53
53
|
import { AXBadgeModule } from '@acorex/components/badge';
|
|
@@ -72,6 +72,18 @@ const RootConfig = {
|
|
|
72
72
|
icon: 'fa-light fa-books',
|
|
73
73
|
},
|
|
74
74
|
entities: {
|
|
75
|
+
documentRelated: {
|
|
76
|
+
name: 'DocumentRelated',
|
|
77
|
+
title: `@${config.i18n}:entities.document.title`,
|
|
78
|
+
titlePlural: `@${config.i18n}:entities.document.title-plural`,
|
|
79
|
+
icon: 'fa-light fa-default',
|
|
80
|
+
},
|
|
81
|
+
review: {
|
|
82
|
+
name: 'Review',
|
|
83
|
+
title: `@${config.i18n}:entities.review.title`,
|
|
84
|
+
titlePlural: `@${config.i18n}:entities.review.title-plural`,
|
|
85
|
+
icon: 'fa-light fa-file-pen',
|
|
86
|
+
},
|
|
75
87
|
folder: {
|
|
76
88
|
name: 'Folder',
|
|
77
89
|
title: `@${config.i18n}:entities.folder.title`,
|
|
@@ -90,6 +102,24 @@ const RootConfig = {
|
|
|
90
102
|
titlePlural: `@${config.i18n}:entities.document-type.title-plural`,
|
|
91
103
|
icon: 'fa-light fa-books',
|
|
92
104
|
},
|
|
105
|
+
documentTypeMetaDefinition: {
|
|
106
|
+
name: 'documentTypeMeta',
|
|
107
|
+
title: `@${config.i18n}:entities.document-type-meta.title`,
|
|
108
|
+
titlePlural: `@${config.i18n}:entities.document-type-meta.title-plural`,
|
|
109
|
+
icon: 'fa-light fa-meta',
|
|
110
|
+
},
|
|
111
|
+
documentTypeMetaValue: {
|
|
112
|
+
name: 'documentTypeMetaValue',
|
|
113
|
+
title: `@${config.i18n}:entities.document-type-meta-value.title`,
|
|
114
|
+
titlePlural: `@${config.i18n}:entities.document-type-meta-value.title-plural`,
|
|
115
|
+
icon: 'fa-light fa-meta',
|
|
116
|
+
},
|
|
117
|
+
documentTypeStatus: {
|
|
118
|
+
name: 'documentTypeStatus',
|
|
119
|
+
title: `@${config.i18n}:entities.document-type-status.title`,
|
|
120
|
+
titlePlural: `@${config.i18n}:entities.document-type-status.title-plural`,
|
|
121
|
+
icon: 'fa-light fa-status',
|
|
122
|
+
},
|
|
93
123
|
},
|
|
94
124
|
};
|
|
95
125
|
|
|
@@ -164,6 +194,13 @@ const AXMPermissionsKeys = {
|
|
|
164
194
|
Delete: 'DocumentManagement:Permission:Driver.Delete',
|
|
165
195
|
Create: 'DocumentManagement:Permission:Driver.Create',
|
|
166
196
|
},
|
|
197
|
+
Review: {
|
|
198
|
+
Management: 'DocumentManagement:Permission:Review.Management',
|
|
199
|
+
View: 'DocumentManagement:Permission:Review.View',
|
|
200
|
+
Edit: 'DocumentManagement:Permission:Review.Edit',
|
|
201
|
+
Delete: 'DocumentManagement:Permission:Review.Delete',
|
|
202
|
+
Create: 'DocumentManagement:Permission:Review.Create',
|
|
203
|
+
},
|
|
167
204
|
},
|
|
168
205
|
};
|
|
169
206
|
|
|
@@ -189,6 +226,13 @@ class AXMPermissionDefinitionProvider {
|
|
|
189
226
|
.addChild(keys.Driver.Edit, await trans('driver.edit.title'), await trans('driver.edit.description'))
|
|
190
227
|
.addChild(keys.Driver.Delete, await trans('driver.delete.title'), await trans('driver.delete.description'))
|
|
191
228
|
.addChild(keys.Driver.Create, await trans('driver.create.title'), await trans('driver.create.description'))
|
|
229
|
+
.endPermission()
|
|
230
|
+
//
|
|
231
|
+
.addPermission(keys.Review.Management, await trans('review.manage.title'), await trans('review.manage.description'))
|
|
232
|
+
.addChild(keys.Review.View, await trans('review.view.title'), await trans('review.view.description'))
|
|
233
|
+
.addChild(keys.Review.Edit, await trans('review.edit.title'), await trans('review.edit.description'))
|
|
234
|
+
.addChild(keys.Review.Delete, await trans('review.delete.title'), await trans('review.delete.description'))
|
|
235
|
+
.addChild(keys.Review.Create, await trans('review.create.title'), await trans('review.create.description'))
|
|
192
236
|
.endPermission();
|
|
193
237
|
//
|
|
194
238
|
}
|
|
@@ -289,21 +333,25 @@ class AXMEntityProvider {
|
|
|
289
333
|
}));
|
|
290
334
|
}
|
|
291
335
|
async get(moduleName, entityName) {
|
|
292
|
-
if (moduleName
|
|
336
|
+
if (moduleName == RootConfig.module.name) {
|
|
293
337
|
switch (entityName) {
|
|
338
|
+
case RootConfig.entities.document.name:
|
|
339
|
+
return (await Promise.resolve().then(function () { return index; })).documentFactory(this.injector);
|
|
294
340
|
case RootConfig.entities.documentType.name:
|
|
295
341
|
return (await Promise.resolve().then(function () { return index; })).documentTypeFactory(this.injector);
|
|
296
342
|
case RootConfig.entities.folder.name:
|
|
297
|
-
return (await Promise.resolve().then(function () { return
|
|
298
|
-
case RootConfig.entities.
|
|
299
|
-
return (await Promise.resolve().then(function () { return
|
|
343
|
+
return (await Promise.resolve().then(function () { return index; })).folderFactory(this.injector);
|
|
344
|
+
case RootConfig.entities.review.name:
|
|
345
|
+
return (await Promise.resolve().then(function () { return index; })).reviewFactory(this.injector);
|
|
346
|
+
case RootConfig.entities.documentRelated.name:
|
|
347
|
+
return (await Promise.resolve().then(function () { return index; })).documentRelatedFactory(this.injector);
|
|
300
348
|
}
|
|
301
349
|
}
|
|
302
350
|
return null;
|
|
303
351
|
}
|
|
304
352
|
async list() {
|
|
305
353
|
const m = RootConfig.module.name;
|
|
306
|
-
const entities =
|
|
354
|
+
const entities = Object.values(RootConfig.entities);
|
|
307
355
|
return Promise.resolve(entities.map((e) => ({ name: e.name, module: m })));
|
|
308
356
|
}
|
|
309
357
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -332,37 +380,6 @@ class AXMSearchCommandProvider extends AXPSearchCommandProvider {
|
|
|
332
380
|
}
|
|
333
381
|
}
|
|
334
382
|
|
|
335
|
-
/**
|
|
336
|
-
* Minimal entity definition for Document so the entity registry can resolve
|
|
337
|
-
* DocumentManagement.Document. Used by AXMDocumentService (AXMEntityCrudServiceImpl).
|
|
338
|
-
* No list/form UI; documents are handled by document-explorer.
|
|
339
|
-
*/
|
|
340
|
-
async function documentEntityFactory(_injector) {
|
|
341
|
-
const entityDef = {
|
|
342
|
-
module: RootConfig.module.name,
|
|
343
|
-
name: RootConfig.entities.document.name,
|
|
344
|
-
title: RootConfig.entities.document.title,
|
|
345
|
-
parentKey: 'parentId',
|
|
346
|
-
formats: {
|
|
347
|
-
individual: RootConfig.entities.document.title,
|
|
348
|
-
plural: RootConfig.entities.document.titlePlural,
|
|
349
|
-
searchResult: {
|
|
350
|
-
title: '{{ title }}',
|
|
351
|
-
description: RootConfig.module.title,
|
|
352
|
-
},
|
|
353
|
-
},
|
|
354
|
-
relatedEntities: [],
|
|
355
|
-
groups: [],
|
|
356
|
-
properties: [],
|
|
357
|
-
};
|
|
358
|
-
return entityDef;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
var document_entity = /*#__PURE__*/Object.freeze({
|
|
362
|
-
__proto__: null,
|
|
363
|
-
documentEntityFactory: documentEntityFactory
|
|
364
|
-
});
|
|
365
|
-
|
|
366
383
|
class AXMDocumentService extends AXMEntityCrudServiceImpl {
|
|
367
384
|
}
|
|
368
385
|
class AXMDocumentServiceImpl extends AXMDocumentService {
|
|
@@ -376,15 +393,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
376
393
|
type: Injectable
|
|
377
394
|
}], ctorParameters: () => [] });
|
|
378
395
|
|
|
379
|
-
|
|
396
|
+
var document_service = /*#__PURE__*/Object.freeze({
|
|
397
|
+
__proto__: null,
|
|
398
|
+
AXMDocumentService: AXMDocumentService,
|
|
399
|
+
AXMDocumentServiceImpl: AXMDocumentServiceImpl
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
async function documentFactory(injector) {
|
|
403
|
+
const dataService = injector.get(AXMDocumentService);
|
|
380
404
|
const i18n = RootConfig.config.i18n;
|
|
381
405
|
const entityDef = {
|
|
382
406
|
module: RootConfig.module.name,
|
|
383
|
-
name: RootConfig.entities.
|
|
384
|
-
title: RootConfig.entities.
|
|
407
|
+
name: RootConfig.entities.document.name,
|
|
408
|
+
title: RootConfig.entities.document.title,
|
|
409
|
+
icon: RootConfig.entities.document.icon,
|
|
385
410
|
formats: {
|
|
386
|
-
individual: RootConfig.entities.
|
|
387
|
-
plural: RootConfig.entities.
|
|
411
|
+
individual: RootConfig.entities.review.title,
|
|
412
|
+
plural: RootConfig.entities.review.titlePlural,
|
|
388
413
|
searchResult: {
|
|
389
414
|
title: '{{ title }}',
|
|
390
415
|
description: RootConfig.module.title,
|
|
@@ -393,50 +418,62 @@ async function documentTypeFactory(injector) {
|
|
|
393
418
|
plugins: [
|
|
394
419
|
{ name: 'history' },
|
|
395
420
|
{
|
|
396
|
-
name: '
|
|
421
|
+
name: 'attachments',
|
|
422
|
+
options: {
|
|
423
|
+
multiple: false,
|
|
424
|
+
field: 'fileId',
|
|
425
|
+
},
|
|
397
426
|
},
|
|
427
|
+
{ name: 'meta-data-form', options: { path: 'typeId' } }
|
|
398
428
|
],
|
|
399
|
-
relatedEntities: [
|
|
400
|
-
groups: [
|
|
429
|
+
relatedEntities: [
|
|
401
430
|
{
|
|
402
|
-
|
|
403
|
-
|
|
431
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.review.name}`,
|
|
432
|
+
conditions: [
|
|
433
|
+
{
|
|
434
|
+
name: 'documentId',
|
|
435
|
+
operator: {
|
|
436
|
+
type: 'equal',
|
|
437
|
+
},
|
|
438
|
+
value: '{{context.eval("id")}}',
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
// hidden: '{{context.eval("toggle")}}',
|
|
442
|
+
actions: [],
|
|
404
443
|
},
|
|
444
|
+
],
|
|
445
|
+
groups: [
|
|
405
446
|
{
|
|
406
|
-
id: '
|
|
407
|
-
title:
|
|
447
|
+
id: 'section',
|
|
448
|
+
title: RootConfig.entities.document.title,
|
|
408
449
|
},
|
|
409
450
|
],
|
|
410
451
|
properties: [
|
|
411
452
|
{
|
|
412
453
|
name: 'name',
|
|
413
454
|
title: '@general:terms.common.name',
|
|
414
|
-
groupId: '
|
|
455
|
+
groupId: 'section',
|
|
415
456
|
options: {
|
|
416
457
|
sort: {
|
|
417
458
|
enabled: true,
|
|
418
459
|
},
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
460
|
+
filter: {
|
|
461
|
+
inline: {
|
|
462
|
+
enabled: true,
|
|
463
|
+
},
|
|
464
|
+
advance: {
|
|
465
|
+
enabled: true,
|
|
466
|
+
},
|
|
424
467
|
},
|
|
425
468
|
},
|
|
426
|
-
validations: [
|
|
427
|
-
{
|
|
428
|
-
rule: 'required',
|
|
429
|
-
},
|
|
430
|
-
],
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
name: 'title',
|
|
434
|
-
title: '@general:terms.common.title',
|
|
435
|
-
groupId: 'basic-info',
|
|
436
469
|
schema: {
|
|
437
470
|
dataType: 'string',
|
|
471
|
+
readonly: true,
|
|
438
472
|
interface: {
|
|
439
473
|
type: AXPWidgetsCatalog.text,
|
|
474
|
+
options: {
|
|
475
|
+
placeholder: '@general:terms.common.name',
|
|
476
|
+
},
|
|
440
477
|
},
|
|
441
478
|
},
|
|
442
479
|
validations: [
|
|
@@ -446,34 +483,16 @@ async function documentTypeFactory(injector) {
|
|
|
446
483
|
],
|
|
447
484
|
},
|
|
448
485
|
{
|
|
449
|
-
name: '
|
|
450
|
-
title:
|
|
451
|
-
groupId: '
|
|
486
|
+
name: 'typeId',
|
|
487
|
+
title: '@general:terms.common.type',
|
|
488
|
+
groupId: 'section',
|
|
452
489
|
schema: {
|
|
453
|
-
dataType: '
|
|
490
|
+
dataType: 'string',
|
|
491
|
+
readonly: true,
|
|
454
492
|
interface: {
|
|
455
|
-
type: AXPWidgetsCatalog.
|
|
493
|
+
type: AXPWidgetsCatalog.lookup,
|
|
456
494
|
options: {
|
|
457
|
-
|
|
458
|
-
valueField: 'value',
|
|
459
|
-
dataSource: [
|
|
460
|
-
{
|
|
461
|
-
name: 'kb',
|
|
462
|
-
value: 'KB',
|
|
463
|
-
calUnit: 1,
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
name: 'mb',
|
|
467
|
-
value: 'MB',
|
|
468
|
-
calUnit: 1024,
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
name: 'gb',
|
|
472
|
-
value: 'GB',
|
|
473
|
-
calUnit: 1024 * 1024,
|
|
474
|
-
},
|
|
475
|
-
],
|
|
476
|
-
mainUnit: 'kb',
|
|
495
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.documentType.name}`,
|
|
477
496
|
},
|
|
478
497
|
},
|
|
479
498
|
},
|
|
@@ -484,181 +503,2485 @@ async function documentTypeFactory(injector) {
|
|
|
484
503
|
],
|
|
485
504
|
},
|
|
486
505
|
{
|
|
487
|
-
name: '
|
|
488
|
-
title: `@${i18n}:terms.
|
|
489
|
-
groupId: '
|
|
506
|
+
name: 'version',
|
|
507
|
+
title: `@${i18n}:terms.common.version`,
|
|
508
|
+
groupId: 'section',
|
|
490
509
|
schema: {
|
|
491
|
-
dataType: '
|
|
510
|
+
dataType: 'number',
|
|
511
|
+
readonly: true,
|
|
492
512
|
interface: {
|
|
493
|
-
type: AXPWidgetsCatalog.
|
|
513
|
+
type: AXPWidgetsCatalog.number,
|
|
514
|
+
options: {},
|
|
494
515
|
},
|
|
495
516
|
},
|
|
496
517
|
},
|
|
497
518
|
{
|
|
498
|
-
name: '
|
|
499
|
-
title: `@${i18n}:terms.
|
|
500
|
-
groupId: 'management',
|
|
519
|
+
name: 'size',
|
|
520
|
+
title: `@${i18n}:terms.common.size`,
|
|
501
521
|
schema: {
|
|
502
|
-
dataType: '
|
|
522
|
+
dataType: 'number',
|
|
523
|
+
readonly: true,
|
|
503
524
|
interface: {
|
|
504
|
-
type: AXPWidgetsCatalog.
|
|
525
|
+
type: AXPWidgetsCatalog.number,
|
|
526
|
+
options: {},
|
|
505
527
|
},
|
|
506
528
|
},
|
|
507
529
|
},
|
|
508
530
|
{
|
|
509
|
-
name: '
|
|
510
|
-
title: `@${i18n}:terms.
|
|
511
|
-
groupId: '
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
531
|
+
name: 'status',
|
|
532
|
+
title: `@${i18n}:terms.common.status`,
|
|
533
|
+
groupId: 'section',
|
|
534
|
+
options: {
|
|
535
|
+
sort: {
|
|
536
|
+
enabled: true,
|
|
537
|
+
},
|
|
538
|
+
filter: {
|
|
539
|
+
inline: {
|
|
540
|
+
enabled: true,
|
|
541
|
+
},
|
|
542
|
+
advance: {
|
|
543
|
+
enabled: true,
|
|
544
|
+
},
|
|
516
545
|
},
|
|
517
546
|
},
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
name: 'enableVersioning',
|
|
521
|
-
title: `@${i18n}:terms.document.enable-versioning`,
|
|
522
|
-
groupId: 'management',
|
|
523
547
|
schema: {
|
|
524
|
-
dataType: '
|
|
548
|
+
dataType: 'string',
|
|
549
|
+
readonly: true,
|
|
525
550
|
interface: {
|
|
526
|
-
type: AXPWidgetsCatalog.
|
|
551
|
+
type: AXPWidgetsCatalog.text,
|
|
527
552
|
options: {
|
|
528
|
-
|
|
553
|
+
content: `{{ context.eval('status') }}`,
|
|
529
554
|
},
|
|
530
|
-
triggers: [
|
|
531
|
-
{
|
|
532
|
-
event: "{{ events.context('requiresReview') }}",
|
|
533
|
-
action: "{{ context.set('enableVersioning', true) }}",
|
|
534
|
-
},
|
|
535
|
-
],
|
|
536
555
|
},
|
|
537
556
|
},
|
|
538
557
|
},
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
558
|
+
],
|
|
559
|
+
columns: [
|
|
560
|
+
{ name: 'name' },
|
|
561
|
+
{ name: 'status' },
|
|
562
|
+
{ name: 'version' },
|
|
563
|
+
],
|
|
564
|
+
queries: {
|
|
565
|
+
byKey: {
|
|
566
|
+
execute: async (id) => {
|
|
567
|
+
const x = await dataService.getOne(id);
|
|
568
|
+
x.fileId = [x.fileId];
|
|
569
|
+
set(x, 'typeId', x.documentType.id);
|
|
570
|
+
return x;
|
|
571
|
+
},
|
|
572
|
+
type: AXPEntityQueryType.Single,
|
|
573
|
+
},
|
|
574
|
+
list: {
|
|
575
|
+
execute: async (e) => {
|
|
576
|
+
const filter = e.filter;
|
|
577
|
+
// Base filter for requiresReview
|
|
578
|
+
const baseFilters = [
|
|
579
|
+
{
|
|
580
|
+
field: 'documentType.requiresReview',
|
|
581
|
+
operator: { type: 'equal' },
|
|
582
|
+
value: true,
|
|
583
|
+
},
|
|
584
|
+
];
|
|
585
|
+
// Check if e.filter has filters array with items
|
|
586
|
+
const hasAdditionalFilters = filter?.filters && Array.isArray(filter.filters) && filter.filters.length > 0;
|
|
587
|
+
// Combine filters if additional filters exist
|
|
588
|
+
const allFilters = hasAdditionalFilters
|
|
589
|
+
? [...baseFilters, ...filter.filters]
|
|
590
|
+
: baseFilters;
|
|
591
|
+
const x = await dataService.query({
|
|
592
|
+
skip: e.skip,
|
|
593
|
+
take: e.take,
|
|
594
|
+
filter: {
|
|
595
|
+
logic: 'and',
|
|
596
|
+
filters: allFilters,
|
|
597
|
+
},
|
|
598
|
+
});
|
|
599
|
+
return x;
|
|
600
|
+
},
|
|
601
|
+
type: AXPEntityQueryType.List,
|
|
602
|
+
},
|
|
603
|
+
},
|
|
604
|
+
interfaces: {
|
|
605
|
+
master: {
|
|
606
|
+
create: {
|
|
607
|
+
sections: [
|
|
608
|
+
{
|
|
609
|
+
id: 'section',
|
|
610
|
+
},
|
|
611
|
+
],
|
|
612
|
+
properties: [
|
|
613
|
+
{
|
|
614
|
+
name: 'name',
|
|
615
|
+
layout: {
|
|
616
|
+
positions: {
|
|
617
|
+
lg: {
|
|
618
|
+
colSpan: 6,
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
name: 'typeId',
|
|
625
|
+
layout: {
|
|
626
|
+
positions: {
|
|
627
|
+
lg: {
|
|
628
|
+
colSpan: 12,
|
|
629
|
+
},
|
|
630
|
+
},
|
|
631
|
+
},
|
|
632
|
+
},
|
|
633
|
+
],
|
|
634
|
+
},
|
|
635
|
+
// update: {
|
|
636
|
+
// sections: [
|
|
637
|
+
// {
|
|
638
|
+
// id: 'section',
|
|
639
|
+
// },
|
|
640
|
+
// ],
|
|
641
|
+
// properties: [
|
|
642
|
+
// {
|
|
643
|
+
// name: 'name',
|
|
644
|
+
// layout: {
|
|
645
|
+
// positions: {
|
|
646
|
+
// lg: {
|
|
647
|
+
// colSpan: 6,
|
|
648
|
+
// },
|
|
649
|
+
// },
|
|
650
|
+
// },
|
|
651
|
+
// },
|
|
652
|
+
// {
|
|
653
|
+
// name: 'type',
|
|
654
|
+
// layout: {
|
|
655
|
+
// positions: {
|
|
656
|
+
// lg: {
|
|
657
|
+
// colSpan: 12,
|
|
658
|
+
// },
|
|
659
|
+
// },
|
|
660
|
+
// },
|
|
661
|
+
// },
|
|
662
|
+
// {
|
|
663
|
+
// name: 'metaData',
|
|
664
|
+
// layout: {
|
|
665
|
+
// positions: {
|
|
666
|
+
// lg: {
|
|
667
|
+
// colSpan: 12,
|
|
668
|
+
// },
|
|
669
|
+
// },
|
|
670
|
+
// },
|
|
671
|
+
// },
|
|
672
|
+
// {
|
|
673
|
+
// name: 'file',
|
|
674
|
+
// layout: {
|
|
675
|
+
// positions: {
|
|
676
|
+
// lg: {
|
|
677
|
+
// colSpan: 12,
|
|
678
|
+
// },
|
|
679
|
+
// },
|
|
680
|
+
// },
|
|
681
|
+
// },
|
|
682
|
+
// ],
|
|
683
|
+
// },
|
|
684
|
+
single: {
|
|
685
|
+
title: '{{title}}',
|
|
686
|
+
sections: [
|
|
687
|
+
{
|
|
688
|
+
id: 'section',
|
|
689
|
+
layout: {
|
|
690
|
+
positions: {
|
|
691
|
+
lg: {
|
|
692
|
+
colSpan: 12,
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
},
|
|
696
|
+
},
|
|
697
|
+
],
|
|
698
|
+
properties: [
|
|
699
|
+
{
|
|
700
|
+
name: 'name',
|
|
701
|
+
layout: {
|
|
702
|
+
positions: {
|
|
703
|
+
lg: {
|
|
704
|
+
colSpan: 6,
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
},
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
name: 'typeId',
|
|
711
|
+
layout: {
|
|
712
|
+
positions: {
|
|
713
|
+
lg: {
|
|
714
|
+
colSpan: 6,
|
|
715
|
+
},
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
},
|
|
719
|
+
// {
|
|
720
|
+
// name: 'fileId',
|
|
721
|
+
// layout: {
|
|
722
|
+
// positions: {
|
|
723
|
+
// lg: {
|
|
724
|
+
// colSpan: 12,
|
|
725
|
+
// },
|
|
726
|
+
// },
|
|
727
|
+
// },
|
|
728
|
+
// },
|
|
729
|
+
// {
|
|
730
|
+
// name: 'file',
|
|
731
|
+
// layout: {
|
|
732
|
+
// positions: {
|
|
733
|
+
// lg: {
|
|
734
|
+
// colSpan: 12,
|
|
735
|
+
// },
|
|
736
|
+
// },
|
|
737
|
+
// },
|
|
738
|
+
// },
|
|
739
|
+
{
|
|
740
|
+
name: 'status',
|
|
741
|
+
layout: {
|
|
742
|
+
positions: {
|
|
743
|
+
lg: {
|
|
744
|
+
colSpan: 6,
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
},
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
name: 'version',
|
|
751
|
+
layout: {
|
|
752
|
+
positions: {
|
|
753
|
+
lg: {
|
|
754
|
+
colSpan: 6,
|
|
755
|
+
},
|
|
756
|
+
},
|
|
757
|
+
},
|
|
758
|
+
},
|
|
759
|
+
],
|
|
760
|
+
actions: [],
|
|
761
|
+
},
|
|
762
|
+
list: {
|
|
763
|
+
actions: [
|
|
764
|
+
{
|
|
765
|
+
title: '@general:actions.detail.title',
|
|
766
|
+
command: 'open-entity',
|
|
767
|
+
priority: 'secondary',
|
|
768
|
+
type: 'view',
|
|
769
|
+
default: true,
|
|
770
|
+
scope: AXPEntityCommandScope.Individual,
|
|
771
|
+
},
|
|
772
|
+
],
|
|
773
|
+
views: [
|
|
774
|
+
createAllQueryView({ sorts: [{ name: 'name', dir: 'asc' }] }),
|
|
775
|
+
createQueryView('Draft', `@${i18n}:terms.workflow.draft`, true, {
|
|
776
|
+
conditions: [
|
|
777
|
+
{
|
|
778
|
+
name: 'status',
|
|
779
|
+
operator: {
|
|
780
|
+
type: 'equal',
|
|
781
|
+
},
|
|
782
|
+
value: 'Draft',
|
|
783
|
+
},
|
|
784
|
+
],
|
|
785
|
+
}),
|
|
786
|
+
createQueryView('PendingReview', `@${i18n}:terms.workflow.pending`, true, {
|
|
787
|
+
conditions: [
|
|
788
|
+
{
|
|
789
|
+
name: 'status',
|
|
790
|
+
operator: {
|
|
791
|
+
type: 'equal',
|
|
792
|
+
},
|
|
793
|
+
value: 'PendingReview',
|
|
794
|
+
},
|
|
795
|
+
],
|
|
796
|
+
}),
|
|
797
|
+
createQueryView('Reviewed', `@${i18n}:terms.workflow.reviewed`, true, {
|
|
798
|
+
conditions: [
|
|
799
|
+
{
|
|
800
|
+
name: 'status',
|
|
801
|
+
operator: {
|
|
802
|
+
type: 'equal',
|
|
803
|
+
},
|
|
804
|
+
value: 'Reviewed',
|
|
805
|
+
},
|
|
806
|
+
],
|
|
807
|
+
}),
|
|
808
|
+
],
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
};
|
|
813
|
+
return entityDef;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
class AXMDocumentManagementDocumentEntityModule {
|
|
817
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
818
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule }); }
|
|
819
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, providers: [
|
|
820
|
+
{
|
|
821
|
+
provide: AXMDocumentService,
|
|
822
|
+
useClass: AXMDocumentServiceImpl,
|
|
823
|
+
},
|
|
824
|
+
] }); }
|
|
825
|
+
}
|
|
826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, decorators: [{
|
|
827
|
+
type: NgModule,
|
|
828
|
+
args: [{
|
|
829
|
+
imports: [],
|
|
830
|
+
exports: [],
|
|
831
|
+
declarations: [],
|
|
832
|
+
providers: [
|
|
833
|
+
{
|
|
834
|
+
provide: AXMDocumentService,
|
|
835
|
+
useClass: AXMDocumentServiceImpl,
|
|
836
|
+
},
|
|
837
|
+
],
|
|
838
|
+
}]
|
|
839
|
+
}] });
|
|
840
|
+
|
|
841
|
+
function getNextStatus(options) {
|
|
842
|
+
const { current, requiresReview, reviewFirst, reviewResult, } = options;
|
|
843
|
+
switch (current) {
|
|
844
|
+
case 'Draft':
|
|
845
|
+
if (requiresReview)
|
|
846
|
+
return 'PendingReview';
|
|
847
|
+
return 'Completed';
|
|
848
|
+
case 'PendingReview':
|
|
849
|
+
if (reviewResult === 'rejected')
|
|
850
|
+
return 'Rejected';
|
|
851
|
+
if (reviewResult === 'approved') {
|
|
852
|
+
return 'Completed';
|
|
853
|
+
}
|
|
854
|
+
return null;
|
|
855
|
+
case 'Reviewed':
|
|
856
|
+
return 'Completed';
|
|
857
|
+
default:
|
|
858
|
+
return null;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
const AXMDocumentWorkflowTransitionMap = {
|
|
862
|
+
Draft: ['PendingReview', 'Completed'],
|
|
863
|
+
PendingReview: ['Reviewed', 'Rejected'],
|
|
864
|
+
Rejected: ['PendingReview'], // پس از اصلاح
|
|
865
|
+
Reviewed: ['Completed', 'Distributed'],
|
|
866
|
+
Distributed: ['Completed'],
|
|
867
|
+
Completed: [],
|
|
868
|
+
};
|
|
869
|
+
function canTransition(from, to) {
|
|
870
|
+
return AXMDocumentWorkflowTransitionMap[from]?.includes(to) ?? false;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
async function documentTypeFactory(injector) {
|
|
874
|
+
const i18n = RootConfig.config.i18n;
|
|
875
|
+
const entityDef = {
|
|
876
|
+
module: RootConfig.module.name,
|
|
877
|
+
name: RootConfig.entities.documentType.name,
|
|
878
|
+
title: RootConfig.entities.documentType.title,
|
|
879
|
+
formats: {
|
|
880
|
+
individual: RootConfig.entities.documentType.title,
|
|
881
|
+
plural: RootConfig.entities.documentType.titlePlural,
|
|
882
|
+
searchResult: {
|
|
883
|
+
title: '{{ title }}',
|
|
884
|
+
description: RootConfig.module.title,
|
|
885
|
+
},
|
|
886
|
+
},
|
|
887
|
+
plugins: [
|
|
888
|
+
{ name: 'history' },
|
|
889
|
+
{
|
|
890
|
+
name: 'meta-data-selector'
|
|
891
|
+
},
|
|
892
|
+
],
|
|
893
|
+
relatedEntities: [],
|
|
894
|
+
groups: [
|
|
895
|
+
{
|
|
896
|
+
id: 'basic-info',
|
|
897
|
+
title: RootConfig.entities.documentType.title,
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
id: 'management',
|
|
901
|
+
title: `@${i18n}:terms.common.management`,
|
|
902
|
+
},
|
|
903
|
+
],
|
|
904
|
+
properties: [
|
|
905
|
+
{
|
|
906
|
+
name: 'name',
|
|
907
|
+
title: '@general:terms.common.name',
|
|
908
|
+
groupId: 'basic-info',
|
|
909
|
+
options: {
|
|
910
|
+
sort: {
|
|
911
|
+
enabled: true,
|
|
912
|
+
},
|
|
913
|
+
},
|
|
914
|
+
schema: {
|
|
915
|
+
dataType: 'string',
|
|
916
|
+
interface: {
|
|
917
|
+
type: AXPWidgetsCatalog.text,
|
|
918
|
+
},
|
|
919
|
+
},
|
|
920
|
+
validations: [
|
|
921
|
+
{
|
|
922
|
+
rule: 'required',
|
|
923
|
+
},
|
|
924
|
+
],
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
name: 'title',
|
|
928
|
+
title: '@general:terms.common.title',
|
|
929
|
+
groupId: 'basic-info',
|
|
930
|
+
schema: {
|
|
931
|
+
dataType: 'string',
|
|
932
|
+
interface: {
|
|
933
|
+
type: AXPWidgetsCatalog.text,
|
|
934
|
+
},
|
|
935
|
+
},
|
|
936
|
+
validations: [
|
|
937
|
+
{
|
|
938
|
+
rule: 'required',
|
|
939
|
+
},
|
|
940
|
+
],
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
name: 'maxSize',
|
|
944
|
+
title: `@${i18n}:terms.document.max-size`,
|
|
945
|
+
groupId: 'basic-info',
|
|
946
|
+
schema: {
|
|
947
|
+
dataType: 'number',
|
|
948
|
+
interface: {
|
|
949
|
+
type: AXPWidgetsCatalog.numberUnit,
|
|
950
|
+
options: {
|
|
951
|
+
textField: 'name',
|
|
952
|
+
valueField: 'value',
|
|
953
|
+
dataSource: [
|
|
954
|
+
{
|
|
955
|
+
name: 'kb',
|
|
956
|
+
value: 'KB',
|
|
957
|
+
calUnit: 1,
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
name: 'mb',
|
|
961
|
+
value: 'MB',
|
|
962
|
+
calUnit: 1024,
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
name: 'gb',
|
|
966
|
+
value: 'GB',
|
|
967
|
+
calUnit: 1024 * 1024,
|
|
968
|
+
},
|
|
969
|
+
],
|
|
970
|
+
mainUnit: 'kb',
|
|
971
|
+
},
|
|
972
|
+
},
|
|
973
|
+
},
|
|
974
|
+
validations: [
|
|
975
|
+
{
|
|
976
|
+
rule: 'required',
|
|
977
|
+
},
|
|
978
|
+
],
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
name: 'isEncrypted',
|
|
982
|
+
title: `@${i18n}:terms.document.is-encrypted`,
|
|
983
|
+
groupId: 'basic-info',
|
|
984
|
+
schema: {
|
|
985
|
+
dataType: 'boolean',
|
|
986
|
+
interface: {
|
|
987
|
+
type: AXPWidgetsCatalog.toggle,
|
|
988
|
+
},
|
|
989
|
+
},
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
name: 'enableExpiration',
|
|
993
|
+
title: `@${i18n}:terms.document.enable-expiration`,
|
|
994
|
+
groupId: 'management',
|
|
995
|
+
schema: {
|
|
996
|
+
dataType: 'boolean',
|
|
997
|
+
interface: {
|
|
998
|
+
type: AXPWidgetsCatalog.toggle,
|
|
999
|
+
},
|
|
1000
|
+
},
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
name: 'requiresReview',
|
|
1004
|
+
title: `@${i18n}:terms.document.requires-review`,
|
|
1005
|
+
groupId: 'management',
|
|
1006
|
+
schema: {
|
|
1007
|
+
dataType: 'boolean',
|
|
1008
|
+
interface: {
|
|
1009
|
+
type: AXPWidgetsCatalog.toggle,
|
|
1010
|
+
},
|
|
1011
|
+
},
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
name: 'enableVersioning',
|
|
1015
|
+
title: `@${i18n}:terms.document.enable-versioning`,
|
|
1016
|
+
groupId: 'management',
|
|
1017
|
+
schema: {
|
|
1018
|
+
dataType: 'boolean',
|
|
1019
|
+
interface: {
|
|
1020
|
+
type: AXPWidgetsCatalog.toggle,
|
|
1021
|
+
options: {
|
|
1022
|
+
disabled: '{{ !!context.eval("requiresReview") }}',
|
|
1023
|
+
},
|
|
1024
|
+
triggers: [
|
|
1025
|
+
{
|
|
1026
|
+
event: "{{ events.context('requiresReview') }}",
|
|
1027
|
+
action: "{{ context.set('enableVersioning', true) }}",
|
|
1028
|
+
},
|
|
1029
|
+
],
|
|
1030
|
+
},
|
|
1031
|
+
},
|
|
1032
|
+
},
|
|
1033
|
+
// {
|
|
1034
|
+
// name: 'meta',
|
|
1035
|
+
// title: `t("metaTitle", { scope: "${i18n}" })`,
|
|
1036
|
+
// groupId: 'section',
|
|
1037
|
+
// schema: {
|
|
1038
|
+
// dataType: 'object',
|
|
1039
|
+
// interface: {
|
|
1040
|
+
// type: 'meta-selector-editor',
|
|
1041
|
+
// },
|
|
1042
|
+
// },
|
|
1043
|
+
// },
|
|
1044
|
+
{
|
|
1045
|
+
name: 'type',
|
|
1046
|
+
title: `@${i18n}:terms.common.type`,
|
|
1047
|
+
groupId: 'basic-info',
|
|
1048
|
+
schema: {
|
|
1049
|
+
dataType: 'object',
|
|
1050
|
+
interface: {
|
|
1051
|
+
type: AXPWidgetsCatalog.fileTypeExtension,
|
|
1052
|
+
options: {},
|
|
1053
|
+
},
|
|
1054
|
+
},
|
|
1055
|
+
},
|
|
1056
|
+
],
|
|
1057
|
+
columns: [{ name: 'name' }, { name: 'title' }],
|
|
1058
|
+
interfaces: {
|
|
1059
|
+
master: {
|
|
1060
|
+
create: {
|
|
1061
|
+
sections: [
|
|
1062
|
+
{
|
|
1063
|
+
id: 'basic-info',
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
id: 'management',
|
|
1067
|
+
},
|
|
1068
|
+
],
|
|
1069
|
+
properties: [
|
|
1070
|
+
{
|
|
1071
|
+
name: 'name',
|
|
1072
|
+
layout: {
|
|
1073
|
+
positions: {
|
|
1074
|
+
lg: {
|
|
1075
|
+
colSpan: 6,
|
|
1076
|
+
},
|
|
1077
|
+
},
|
|
1078
|
+
},
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
name: 'title',
|
|
1082
|
+
layout: {
|
|
1083
|
+
positions: {
|
|
1084
|
+
lg: {
|
|
1085
|
+
colSpan: 6,
|
|
1086
|
+
},
|
|
1087
|
+
},
|
|
1088
|
+
},
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
name: 'maxSize',
|
|
1092
|
+
layout: {
|
|
1093
|
+
positions: {
|
|
1094
|
+
lg: {
|
|
1095
|
+
colSpan: 6,
|
|
1096
|
+
},
|
|
1097
|
+
},
|
|
1098
|
+
},
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
name: 'isEncrypted',
|
|
1102
|
+
layout: {
|
|
1103
|
+
positions: {
|
|
1104
|
+
lg: {
|
|
1105
|
+
colSpan: 6,
|
|
1106
|
+
},
|
|
1107
|
+
},
|
|
1108
|
+
},
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
name: 'enableExpiration',
|
|
1112
|
+
layout: {
|
|
1113
|
+
positions: {
|
|
1114
|
+
lg: {
|
|
1115
|
+
colSpan: 6,
|
|
1116
|
+
},
|
|
1117
|
+
},
|
|
1118
|
+
},
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
name: 'requiresReview',
|
|
1122
|
+
layout: {
|
|
1123
|
+
positions: {
|
|
1124
|
+
lg: {
|
|
1125
|
+
colSpan: 6,
|
|
1126
|
+
},
|
|
1127
|
+
},
|
|
1128
|
+
},
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
name: 'enableVersioning',
|
|
1132
|
+
layout: {
|
|
1133
|
+
positions: {
|
|
1134
|
+
lg: {
|
|
1135
|
+
colSpan: 6,
|
|
1136
|
+
},
|
|
1137
|
+
},
|
|
1138
|
+
},
|
|
1139
|
+
},
|
|
1140
|
+
// {
|
|
1141
|
+
// name: 'meta',
|
|
1142
|
+
// layout: {
|
|
1143
|
+
// positions: {
|
|
1144
|
+
// lg: {
|
|
1145
|
+
// colSpan: 12,
|
|
1146
|
+
// },
|
|
1147
|
+
// },
|
|
1148
|
+
// },
|
|
1149
|
+
// },
|
|
1150
|
+
{
|
|
1151
|
+
name: 'type',
|
|
1152
|
+
layout: {
|
|
1153
|
+
positions: {
|
|
1154
|
+
lg: {
|
|
1155
|
+
colSpan: 12,
|
|
1156
|
+
},
|
|
1157
|
+
},
|
|
1158
|
+
},
|
|
1159
|
+
},
|
|
1160
|
+
],
|
|
1161
|
+
},
|
|
1162
|
+
update: {
|
|
1163
|
+
sections: [
|
|
1164
|
+
{
|
|
1165
|
+
id: 'basic-info',
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
id: 'management',
|
|
1169
|
+
},
|
|
1170
|
+
],
|
|
1171
|
+
properties: [
|
|
1172
|
+
{
|
|
1173
|
+
name: 'name',
|
|
1174
|
+
layout: {
|
|
1175
|
+
positions: {
|
|
1176
|
+
lg: {
|
|
1177
|
+
colSpan: 6,
|
|
1178
|
+
},
|
|
1179
|
+
},
|
|
1180
|
+
},
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
name: 'title',
|
|
1184
|
+
layout: {
|
|
1185
|
+
positions: {
|
|
1186
|
+
lg: {
|
|
1187
|
+
colSpan: 6,
|
|
1188
|
+
},
|
|
1189
|
+
},
|
|
1190
|
+
},
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
name: 'maxSize',
|
|
1194
|
+
layout: {
|
|
1195
|
+
positions: {
|
|
1196
|
+
lg: {
|
|
1197
|
+
colSpan: 6,
|
|
1198
|
+
},
|
|
1199
|
+
},
|
|
1200
|
+
},
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
name: 'isEncrypted',
|
|
1204
|
+
layout: {
|
|
1205
|
+
positions: {
|
|
1206
|
+
lg: {
|
|
1207
|
+
colSpan: 6,
|
|
1208
|
+
},
|
|
1209
|
+
},
|
|
1210
|
+
},
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
name: 'enableExpiration',
|
|
1214
|
+
layout: {
|
|
1215
|
+
positions: {
|
|
1216
|
+
lg: {
|
|
1217
|
+
colSpan: 6,
|
|
1218
|
+
},
|
|
1219
|
+
},
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
name: 'requiresReview',
|
|
1224
|
+
layout: {
|
|
1225
|
+
positions: {
|
|
1226
|
+
lg: {
|
|
1227
|
+
colSpan: 6,
|
|
1228
|
+
},
|
|
1229
|
+
},
|
|
1230
|
+
},
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
name: 'enableVersioning',
|
|
1234
|
+
layout: {
|
|
1235
|
+
positions: {
|
|
1236
|
+
lg: {
|
|
1237
|
+
colSpan: 6,
|
|
1238
|
+
},
|
|
1239
|
+
},
|
|
1240
|
+
},
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
name: 'type',
|
|
1244
|
+
layout: {
|
|
1245
|
+
positions: {
|
|
1246
|
+
lg: {
|
|
1247
|
+
colSpan: 12,
|
|
1248
|
+
},
|
|
1249
|
+
},
|
|
1250
|
+
},
|
|
1251
|
+
},
|
|
1252
|
+
],
|
|
1253
|
+
},
|
|
1254
|
+
single: {
|
|
1255
|
+
title: '{{title}}',
|
|
1256
|
+
sections: [
|
|
1257
|
+
{
|
|
1258
|
+
id: 'basic-info',
|
|
1259
|
+
layout: {
|
|
1260
|
+
positions: {
|
|
1261
|
+
lg: {
|
|
1262
|
+
colSpan: 12,
|
|
1263
|
+
},
|
|
1264
|
+
},
|
|
1265
|
+
},
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
id: 'management',
|
|
1269
|
+
layout: {
|
|
1270
|
+
positions: {
|
|
1271
|
+
lg: {
|
|
1272
|
+
colSpan: 12,
|
|
1273
|
+
},
|
|
1274
|
+
},
|
|
1275
|
+
},
|
|
1276
|
+
},
|
|
1277
|
+
],
|
|
1278
|
+
properties: [
|
|
1279
|
+
{
|
|
1280
|
+
name: 'name',
|
|
1281
|
+
layout: {
|
|
1282
|
+
positions: {
|
|
1283
|
+
lg: {
|
|
1284
|
+
colSpan: 6,
|
|
1285
|
+
},
|
|
1286
|
+
},
|
|
1287
|
+
},
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
name: 'title',
|
|
1291
|
+
layout: {
|
|
1292
|
+
positions: {
|
|
1293
|
+
lg: {
|
|
1294
|
+
colSpan: 6,
|
|
1295
|
+
},
|
|
1296
|
+
},
|
|
1297
|
+
},
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
name: 'maxSize',
|
|
1301
|
+
layout: {
|
|
1302
|
+
positions: {
|
|
1303
|
+
lg: {
|
|
1304
|
+
colSpan: 6,
|
|
1305
|
+
},
|
|
1306
|
+
},
|
|
1307
|
+
},
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
name: 'isEncrypted',
|
|
1311
|
+
layout: {
|
|
1312
|
+
positions: {
|
|
1313
|
+
lg: {
|
|
1314
|
+
colSpan: 6,
|
|
1315
|
+
},
|
|
1316
|
+
},
|
|
1317
|
+
},
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
name: 'enableExpiration',
|
|
1321
|
+
layout: {
|
|
1322
|
+
positions: {
|
|
1323
|
+
lg: {
|
|
1324
|
+
colSpan: 6,
|
|
1325
|
+
},
|
|
1326
|
+
},
|
|
1327
|
+
},
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
name: 'requiresReview',
|
|
1331
|
+
layout: {
|
|
1332
|
+
positions: {
|
|
1333
|
+
lg: {
|
|
1334
|
+
colSpan: 6,
|
|
1335
|
+
},
|
|
1336
|
+
},
|
|
1337
|
+
},
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
name: 'enableVersioning',
|
|
1341
|
+
layout: {
|
|
1342
|
+
positions: {
|
|
1343
|
+
lg: {
|
|
1344
|
+
colSpan: 6,
|
|
1345
|
+
},
|
|
1346
|
+
},
|
|
1347
|
+
},
|
|
1348
|
+
},
|
|
1349
|
+
// {
|
|
1350
|
+
// name: 'meta',
|
|
1351
|
+
// layout: {
|
|
1352
|
+
// positions: {
|
|
1353
|
+
// lg: {
|
|
1354
|
+
// colSpan: 12,
|
|
1355
|
+
// },
|
|
1356
|
+
// },
|
|
1357
|
+
// },
|
|
1358
|
+
// },
|
|
1359
|
+
{
|
|
1360
|
+
name: 'type',
|
|
1361
|
+
layout: {
|
|
1362
|
+
positions: {
|
|
1363
|
+
lg: {
|
|
1364
|
+
colSpan: 12,
|
|
1365
|
+
},
|
|
1366
|
+
},
|
|
1367
|
+
},
|
|
1368
|
+
},
|
|
1369
|
+
],
|
|
1370
|
+
actions: [...entityMasterRecordActions()],
|
|
1371
|
+
},
|
|
1372
|
+
list: {
|
|
1373
|
+
actions: [...entityMasterCrudActions({ edit: true })],
|
|
1374
|
+
views: [createAllQueryView()],
|
|
1375
|
+
},
|
|
1376
|
+
},
|
|
1377
|
+
},
|
|
1378
|
+
};
|
|
1379
|
+
return entityDef;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
class AXMDocumentTypeService extends AXMEntityCrudServiceImpl {
|
|
1383
|
+
}
|
|
1384
|
+
class AXMDocumentTypeServiceImpl extends AXMDocumentTypeService {
|
|
1385
|
+
constructor() {
|
|
1386
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.documentType.name}`);
|
|
1387
|
+
}
|
|
1388
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1389
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl }); }
|
|
1390
|
+
}
|
|
1391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl, decorators: [{
|
|
1392
|
+
type: Injectable
|
|
1393
|
+
}], ctorParameters: () => [] });
|
|
1394
|
+
|
|
1395
|
+
class AXMDocumentManagementDocumentTypeEntityModule {
|
|
1396
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1397
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule }); }
|
|
1398
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, providers: [
|
|
1399
|
+
{
|
|
1400
|
+
provide: AXMDocumentTypeService,
|
|
1401
|
+
useClass: AXMDocumentTypeServiceImpl,
|
|
1402
|
+
},
|
|
1403
|
+
] }); }
|
|
1404
|
+
}
|
|
1405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, decorators: [{
|
|
1406
|
+
type: NgModule,
|
|
1407
|
+
args: [{
|
|
1408
|
+
imports: [],
|
|
1409
|
+
exports: [],
|
|
1410
|
+
declarations: [],
|
|
1411
|
+
providers: [
|
|
1412
|
+
{
|
|
1413
|
+
provide: AXMDocumentTypeService,
|
|
1414
|
+
useClass: AXMDocumentTypeServiceImpl,
|
|
1415
|
+
},
|
|
1416
|
+
],
|
|
1417
|
+
}]
|
|
1418
|
+
}] });
|
|
1419
|
+
|
|
1420
|
+
async function documentTypeMetaDefinitionfactory(injector) {
|
|
1421
|
+
const entityDef = {
|
|
1422
|
+
module: RootConfig.module.name,
|
|
1423
|
+
name: RootConfig.entities.document.name,
|
|
1424
|
+
title: RootConfig.entities.document.title,
|
|
1425
|
+
formats: {
|
|
1426
|
+
individual: RootConfig.entities.document.title,
|
|
1427
|
+
plural: RootConfig.entities.document.titlePlural,
|
|
1428
|
+
searchResult: {
|
|
1429
|
+
title: '{{ title }}',
|
|
1430
|
+
description: RootConfig.module.title,
|
|
1431
|
+
},
|
|
1432
|
+
},
|
|
1433
|
+
relatedEntities: [],
|
|
1434
|
+
groups: [
|
|
1435
|
+
{
|
|
1436
|
+
id: 'section',
|
|
1437
|
+
title: RootConfig.entities.document.title,
|
|
1438
|
+
},
|
|
1439
|
+
],
|
|
1440
|
+
properties: [
|
|
1441
|
+
{
|
|
1442
|
+
name: 'name',
|
|
1443
|
+
title: '@general:terms.common.name',
|
|
1444
|
+
groupId: 'section',
|
|
1445
|
+
options: {
|
|
1446
|
+
sort: {
|
|
1447
|
+
enabled: true,
|
|
1448
|
+
},
|
|
1449
|
+
},
|
|
1450
|
+
schema: {
|
|
1451
|
+
dataType: 'string',
|
|
1452
|
+
interface: {
|
|
1453
|
+
type: AXPWidgetsCatalog.text,
|
|
1454
|
+
},
|
|
1455
|
+
},
|
|
1456
|
+
validations: [
|
|
1457
|
+
{
|
|
1458
|
+
rule: 'required',
|
|
1459
|
+
},
|
|
1460
|
+
],
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
name: 'title',
|
|
1464
|
+
title: '@general:terms.common.title',
|
|
1465
|
+
groupId: 'section',
|
|
1466
|
+
schema: {
|
|
1467
|
+
dataType: 'string',
|
|
1468
|
+
interface: {
|
|
1469
|
+
type: AXPWidgetsCatalog.text,
|
|
1470
|
+
},
|
|
1471
|
+
},
|
|
1472
|
+
validations: [
|
|
1473
|
+
{
|
|
1474
|
+
rule: 'required',
|
|
1475
|
+
},
|
|
1476
|
+
],
|
|
1477
|
+
},
|
|
1478
|
+
],
|
|
1479
|
+
columns: [{ name: 'name' }, { name: 'title' }],
|
|
1480
|
+
interfaces: {
|
|
1481
|
+
master: {
|
|
1482
|
+
create: {
|
|
1483
|
+
sections: [
|
|
1484
|
+
{
|
|
1485
|
+
id: 'section',
|
|
1486
|
+
},
|
|
1487
|
+
],
|
|
1488
|
+
properties: [
|
|
1489
|
+
{
|
|
1490
|
+
name: 'name',
|
|
1491
|
+
layout: {
|
|
1492
|
+
positions: {
|
|
1493
|
+
lg: {
|
|
1494
|
+
colSpan: 6,
|
|
1495
|
+
},
|
|
1496
|
+
},
|
|
1497
|
+
},
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
name: 'title',
|
|
1501
|
+
layout: {
|
|
1502
|
+
positions: {
|
|
1503
|
+
lg: {
|
|
1504
|
+
colSpan: 6,
|
|
1505
|
+
},
|
|
1506
|
+
},
|
|
1507
|
+
},
|
|
1508
|
+
},
|
|
1509
|
+
],
|
|
1510
|
+
},
|
|
1511
|
+
update: {
|
|
1512
|
+
sections: [
|
|
1513
|
+
{
|
|
1514
|
+
id: 'section',
|
|
1515
|
+
},
|
|
1516
|
+
],
|
|
1517
|
+
properties: [
|
|
1518
|
+
{
|
|
1519
|
+
name: 'name',
|
|
1520
|
+
layout: {
|
|
1521
|
+
positions: {
|
|
1522
|
+
lg: {
|
|
1523
|
+
colSpan: 6,
|
|
1524
|
+
},
|
|
1525
|
+
},
|
|
1526
|
+
},
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
name: 'title',
|
|
1530
|
+
layout: {
|
|
1531
|
+
positions: {
|
|
1532
|
+
lg: {
|
|
1533
|
+
colSpan: 6,
|
|
1534
|
+
},
|
|
1535
|
+
},
|
|
1536
|
+
},
|
|
1537
|
+
},
|
|
1538
|
+
],
|
|
1539
|
+
},
|
|
1540
|
+
single: {
|
|
1541
|
+
title: '{{title}}',
|
|
1542
|
+
sections: [
|
|
1543
|
+
{
|
|
1544
|
+
id: 'section',
|
|
1545
|
+
layout: {
|
|
1546
|
+
positions: {
|
|
1547
|
+
lg: {
|
|
1548
|
+
colSpan: 12,
|
|
1549
|
+
},
|
|
1550
|
+
},
|
|
1551
|
+
},
|
|
1552
|
+
},
|
|
1553
|
+
],
|
|
1554
|
+
properties: [
|
|
1555
|
+
{
|
|
1556
|
+
name: 'name',
|
|
1557
|
+
layout: {
|
|
1558
|
+
positions: {
|
|
1559
|
+
lg: {
|
|
1560
|
+
colSpan: 6,
|
|
1561
|
+
},
|
|
1562
|
+
},
|
|
1563
|
+
},
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
name: 'title',
|
|
1567
|
+
layout: {
|
|
1568
|
+
positions: {
|
|
1569
|
+
lg: {
|
|
1570
|
+
colSpan: 6,
|
|
1571
|
+
},
|
|
1572
|
+
},
|
|
1573
|
+
},
|
|
1574
|
+
},
|
|
1575
|
+
],
|
|
1576
|
+
actions: [...entityMasterRecordActions()],
|
|
1577
|
+
},
|
|
1578
|
+
list: {
|
|
1579
|
+
actions: [...entityMasterCrudActions()],
|
|
1580
|
+
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
1581
|
+
},
|
|
1582
|
+
},
|
|
1583
|
+
},
|
|
1584
|
+
};
|
|
1585
|
+
return entityDef;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
class AXMDocumentManagementDocumentTypeMetaDefinitionEntityService extends AXMEntityCrudServiceImpl {
|
|
1589
|
+
}
|
|
1590
|
+
class AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl extends AXMDocumentManagementDocumentTypeMetaDefinitionEntityService {
|
|
1591
|
+
constructor() {
|
|
1592
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeMetaDefinition}`);
|
|
1593
|
+
}
|
|
1594
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1595
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl }); }
|
|
1596
|
+
}
|
|
1597
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, decorators: [{
|
|
1598
|
+
type: Injectable
|
|
1599
|
+
}], ctorParameters: () => [] });
|
|
1600
|
+
|
|
1601
|
+
class AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule {
|
|
1602
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1603
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule }); }
|
|
1604
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, providers: [
|
|
1605
|
+
{
|
|
1606
|
+
provide: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
|
|
1607
|
+
useClass: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
|
|
1608
|
+
},
|
|
1609
|
+
] }); }
|
|
1610
|
+
}
|
|
1611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, decorators: [{
|
|
1612
|
+
type: NgModule,
|
|
1613
|
+
args: [{
|
|
1614
|
+
imports: [],
|
|
1615
|
+
exports: [],
|
|
1616
|
+
declarations: [],
|
|
1617
|
+
providers: [
|
|
1618
|
+
{
|
|
1619
|
+
provide: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
|
|
1620
|
+
useClass: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
|
|
1621
|
+
},
|
|
1622
|
+
],
|
|
1623
|
+
}]
|
|
1624
|
+
}] });
|
|
1625
|
+
|
|
1626
|
+
async function documentTypeMetaValueFactory(injector) {
|
|
1627
|
+
const entityDef = {
|
|
1628
|
+
module: RootConfig.module.name,
|
|
1629
|
+
name: RootConfig.entities.document.name,
|
|
1630
|
+
title: RootConfig.entities.document.title,
|
|
1631
|
+
formats: {
|
|
1632
|
+
individual: RootConfig.entities.document.title,
|
|
1633
|
+
plural: RootConfig.entities.document.titlePlural,
|
|
1634
|
+
searchResult: {
|
|
1635
|
+
title: '{{ title }}',
|
|
1636
|
+
description: RootConfig.module.title,
|
|
1637
|
+
},
|
|
1638
|
+
},
|
|
1639
|
+
relatedEntities: [],
|
|
1640
|
+
groups: [
|
|
1641
|
+
{
|
|
1642
|
+
id: 'section',
|
|
1643
|
+
title: RootConfig.entities.document.title,
|
|
1644
|
+
},
|
|
1645
|
+
],
|
|
1646
|
+
properties: [
|
|
1647
|
+
{
|
|
1648
|
+
name: 'name',
|
|
1649
|
+
title: '@general:terms.common.name',
|
|
1650
|
+
groupId: 'section',
|
|
1651
|
+
options: {
|
|
1652
|
+
sort: {
|
|
1653
|
+
enabled: true,
|
|
1654
|
+
},
|
|
1655
|
+
},
|
|
1656
|
+
schema: {
|
|
1657
|
+
dataType: 'string',
|
|
1658
|
+
interface: {
|
|
1659
|
+
type: AXPWidgetsCatalog.text,
|
|
1660
|
+
},
|
|
1661
|
+
},
|
|
1662
|
+
validations: [
|
|
1663
|
+
{
|
|
1664
|
+
rule: 'required',
|
|
1665
|
+
},
|
|
1666
|
+
],
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
name: 'title',
|
|
1670
|
+
title: '@general:terms.common.title',
|
|
1671
|
+
groupId: 'section',
|
|
1672
|
+
schema: {
|
|
1673
|
+
dataType: 'string',
|
|
1674
|
+
interface: {
|
|
1675
|
+
type: AXPWidgetsCatalog.text,
|
|
1676
|
+
},
|
|
1677
|
+
},
|
|
1678
|
+
validations: [
|
|
1679
|
+
{
|
|
1680
|
+
rule: 'required',
|
|
1681
|
+
},
|
|
1682
|
+
],
|
|
1683
|
+
},
|
|
1684
|
+
],
|
|
1685
|
+
columns: [{ name: 'name' }, { name: 'title' }],
|
|
1686
|
+
interfaces: {
|
|
1687
|
+
master: {
|
|
1688
|
+
create: {
|
|
1689
|
+
sections: [
|
|
1690
|
+
{
|
|
1691
|
+
id: 'section',
|
|
1692
|
+
},
|
|
1693
|
+
],
|
|
1694
|
+
properties: [
|
|
1695
|
+
{
|
|
1696
|
+
name: 'name',
|
|
1697
|
+
layout: {
|
|
1698
|
+
positions: {
|
|
1699
|
+
lg: {
|
|
1700
|
+
colSpan: 6,
|
|
1701
|
+
},
|
|
1702
|
+
},
|
|
1703
|
+
},
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
name: 'title',
|
|
1707
|
+
layout: {
|
|
1708
|
+
positions: {
|
|
1709
|
+
lg: {
|
|
1710
|
+
colSpan: 6,
|
|
1711
|
+
},
|
|
1712
|
+
},
|
|
1713
|
+
},
|
|
1714
|
+
},
|
|
1715
|
+
],
|
|
1716
|
+
},
|
|
1717
|
+
update: {
|
|
1718
|
+
sections: [
|
|
1719
|
+
{
|
|
1720
|
+
id: 'section',
|
|
1721
|
+
},
|
|
1722
|
+
],
|
|
1723
|
+
properties: [
|
|
1724
|
+
{
|
|
1725
|
+
name: 'name',
|
|
1726
|
+
layout: {
|
|
1727
|
+
positions: {
|
|
1728
|
+
lg: {
|
|
1729
|
+
colSpan: 6,
|
|
1730
|
+
},
|
|
1731
|
+
},
|
|
1732
|
+
},
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
name: 'title',
|
|
1736
|
+
layout: {
|
|
1737
|
+
positions: {
|
|
1738
|
+
lg: {
|
|
1739
|
+
colSpan: 6,
|
|
1740
|
+
},
|
|
1741
|
+
},
|
|
1742
|
+
},
|
|
1743
|
+
},
|
|
1744
|
+
],
|
|
1745
|
+
},
|
|
1746
|
+
single: {
|
|
1747
|
+
title: '{{title}}',
|
|
1748
|
+
sections: [
|
|
1749
|
+
{
|
|
1750
|
+
id: 'section',
|
|
1751
|
+
layout: {
|
|
1752
|
+
positions: {
|
|
1753
|
+
lg: {
|
|
1754
|
+
colSpan: 12,
|
|
1755
|
+
},
|
|
1756
|
+
},
|
|
1757
|
+
},
|
|
1758
|
+
},
|
|
1759
|
+
],
|
|
1760
|
+
properties: [
|
|
1761
|
+
{
|
|
1762
|
+
name: 'name',
|
|
1763
|
+
layout: {
|
|
1764
|
+
positions: {
|
|
1765
|
+
lg: {
|
|
1766
|
+
colSpan: 6,
|
|
1767
|
+
},
|
|
1768
|
+
},
|
|
1769
|
+
},
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
name: 'title',
|
|
1773
|
+
layout: {
|
|
1774
|
+
positions: {
|
|
1775
|
+
lg: {
|
|
1776
|
+
colSpan: 6,
|
|
1777
|
+
},
|
|
1778
|
+
},
|
|
1779
|
+
},
|
|
1780
|
+
},
|
|
1781
|
+
],
|
|
1782
|
+
actions: [...entityMasterRecordActions()],
|
|
1783
|
+
},
|
|
1784
|
+
list: {
|
|
1785
|
+
actions: [...entityMasterCrudActions()],
|
|
1786
|
+
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
1787
|
+
},
|
|
1788
|
+
},
|
|
1789
|
+
},
|
|
1790
|
+
};
|
|
1791
|
+
return entityDef;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
class AXMDocumentManagementDocumentTypeMetaValueEntityService extends AXMEntityCrudServiceImpl {
|
|
1795
|
+
}
|
|
1796
|
+
class AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl extends AXMDocumentManagementDocumentTypeMetaValueEntityService {
|
|
1797
|
+
constructor() {
|
|
1798
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeMetaValue}`);
|
|
1799
|
+
}
|
|
1800
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1801
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl }); }
|
|
1802
|
+
}
|
|
1803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, decorators: [{
|
|
1804
|
+
type: Injectable
|
|
1805
|
+
}], ctorParameters: () => [] });
|
|
1806
|
+
|
|
1807
|
+
class AXMDocumentManagementDocumentTypeMetaValueEntityModule {
|
|
1808
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1809
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule }); }
|
|
1810
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, providers: [
|
|
1811
|
+
{
|
|
1812
|
+
provide: AXMDocumentManagementDocumentTypeMetaValueEntityService,
|
|
1813
|
+
useClass: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
|
|
1814
|
+
},
|
|
1815
|
+
] }); }
|
|
1816
|
+
}
|
|
1817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, decorators: [{
|
|
1818
|
+
type: NgModule,
|
|
1819
|
+
args: [{
|
|
1820
|
+
imports: [],
|
|
1821
|
+
exports: [],
|
|
1822
|
+
declarations: [],
|
|
1823
|
+
providers: [
|
|
1824
|
+
{
|
|
1825
|
+
provide: AXMDocumentManagementDocumentTypeMetaValueEntityService,
|
|
1826
|
+
useClass: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
|
|
1827
|
+
},
|
|
1828
|
+
],
|
|
1829
|
+
}]
|
|
1830
|
+
}] });
|
|
1831
|
+
|
|
1832
|
+
async function documentTypeStatusDefinitionFactory(injector) {
|
|
1833
|
+
const entityDef = {
|
|
1834
|
+
module: RootConfig.module.name,
|
|
1835
|
+
name: RootConfig.entities.document.name,
|
|
1836
|
+
title: RootConfig.entities.document.title,
|
|
1837
|
+
formats: {
|
|
1838
|
+
individual: RootConfig.entities.document.title,
|
|
1839
|
+
plural: RootConfig.entities.document.titlePlural,
|
|
1840
|
+
searchResult: {
|
|
1841
|
+
title: '{{ title }}',
|
|
1842
|
+
description: RootConfig.module.title,
|
|
1843
|
+
},
|
|
1844
|
+
},
|
|
1845
|
+
relatedEntities: [],
|
|
1846
|
+
groups: [
|
|
1847
|
+
{
|
|
1848
|
+
id: 'section',
|
|
1849
|
+
title: RootConfig.entities.document.title,
|
|
1850
|
+
},
|
|
1851
|
+
],
|
|
1852
|
+
properties: [
|
|
1853
|
+
{
|
|
1854
|
+
name: 'name',
|
|
1855
|
+
title: '@general:terms.common.name',
|
|
1856
|
+
groupId: 'section',
|
|
1857
|
+
options: {
|
|
1858
|
+
sort: {
|
|
1859
|
+
enabled: true,
|
|
1860
|
+
},
|
|
1861
|
+
},
|
|
1862
|
+
schema: {
|
|
1863
|
+
dataType: 'string',
|
|
1864
|
+
interface: {
|
|
1865
|
+
type: AXPWidgetsCatalog.text,
|
|
1866
|
+
},
|
|
1867
|
+
},
|
|
1868
|
+
validations: [
|
|
1869
|
+
{
|
|
1870
|
+
rule: 'required',
|
|
1871
|
+
},
|
|
1872
|
+
],
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
name: 'title',
|
|
1876
|
+
title: '@general:terms.common.title',
|
|
1877
|
+
groupId: 'section',
|
|
1878
|
+
schema: {
|
|
1879
|
+
dataType: 'string',
|
|
1880
|
+
interface: {
|
|
1881
|
+
type: AXPWidgetsCatalog.text,
|
|
1882
|
+
},
|
|
1883
|
+
},
|
|
1884
|
+
validations: [
|
|
1885
|
+
{
|
|
1886
|
+
rule: 'required',
|
|
1887
|
+
},
|
|
1888
|
+
],
|
|
1889
|
+
},
|
|
1890
|
+
],
|
|
1891
|
+
columns: [{ name: 'name' }, { name: 'title' }],
|
|
1892
|
+
interfaces: {
|
|
1893
|
+
master: {
|
|
1894
|
+
create: {
|
|
1895
|
+
sections: [
|
|
1896
|
+
{
|
|
1897
|
+
id: 'section',
|
|
1898
|
+
},
|
|
1899
|
+
],
|
|
1900
|
+
properties: [
|
|
1901
|
+
{
|
|
1902
|
+
name: 'name',
|
|
1903
|
+
layout: {
|
|
1904
|
+
positions: {
|
|
1905
|
+
lg: {
|
|
1906
|
+
colSpan: 6,
|
|
1907
|
+
},
|
|
1908
|
+
},
|
|
1909
|
+
},
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
name: 'title',
|
|
1913
|
+
layout: {
|
|
1914
|
+
positions: {
|
|
1915
|
+
lg: {
|
|
1916
|
+
colSpan: 6,
|
|
1917
|
+
},
|
|
1918
|
+
},
|
|
1919
|
+
},
|
|
1920
|
+
},
|
|
1921
|
+
],
|
|
1922
|
+
},
|
|
1923
|
+
update: {
|
|
1924
|
+
sections: [
|
|
1925
|
+
{
|
|
1926
|
+
id: 'section',
|
|
1927
|
+
},
|
|
1928
|
+
],
|
|
1929
|
+
properties: [
|
|
1930
|
+
{
|
|
1931
|
+
name: 'name',
|
|
1932
|
+
layout: {
|
|
1933
|
+
positions: {
|
|
1934
|
+
lg: {
|
|
1935
|
+
colSpan: 6,
|
|
1936
|
+
},
|
|
1937
|
+
},
|
|
1938
|
+
},
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
name: 'title',
|
|
1942
|
+
layout: {
|
|
1943
|
+
positions: {
|
|
1944
|
+
lg: {
|
|
1945
|
+
colSpan: 6,
|
|
1946
|
+
},
|
|
1947
|
+
},
|
|
1948
|
+
},
|
|
1949
|
+
},
|
|
1950
|
+
],
|
|
1951
|
+
},
|
|
1952
|
+
single: {
|
|
1953
|
+
title: '{{title}}',
|
|
1954
|
+
sections: [
|
|
1955
|
+
{
|
|
1956
|
+
id: 'section',
|
|
1957
|
+
layout: {
|
|
1958
|
+
positions: {
|
|
1959
|
+
lg: {
|
|
1960
|
+
colSpan: 12,
|
|
1961
|
+
},
|
|
1962
|
+
},
|
|
1963
|
+
},
|
|
1964
|
+
},
|
|
1965
|
+
],
|
|
1966
|
+
properties: [
|
|
1967
|
+
{
|
|
1968
|
+
name: 'name',
|
|
1969
|
+
layout: {
|
|
1970
|
+
positions: {
|
|
1971
|
+
lg: {
|
|
1972
|
+
colSpan: 6,
|
|
1973
|
+
},
|
|
1974
|
+
},
|
|
1975
|
+
},
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
name: 'title',
|
|
1979
|
+
layout: {
|
|
1980
|
+
positions: {
|
|
1981
|
+
lg: {
|
|
1982
|
+
colSpan: 6,
|
|
1983
|
+
},
|
|
1984
|
+
},
|
|
1985
|
+
},
|
|
1986
|
+
},
|
|
1987
|
+
],
|
|
1988
|
+
actions: [...entityMasterRecordActions()],
|
|
1989
|
+
},
|
|
1990
|
+
list: {
|
|
1991
|
+
actions: [...entityMasterCrudActions()],
|
|
1992
|
+
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
1993
|
+
},
|
|
1994
|
+
},
|
|
1995
|
+
},
|
|
1996
|
+
};
|
|
1997
|
+
return entityDef;
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
class AXMDocumentManagementDocumentTypeStatusDefinitionEntityService extends AXMEntityCrudServiceImpl {
|
|
2001
|
+
}
|
|
2002
|
+
class AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl extends AXMDocumentManagementDocumentTypeStatusDefinitionEntityService {
|
|
2003
|
+
constructor() {
|
|
2004
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeStatus}`);
|
|
2005
|
+
}
|
|
2006
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2007
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl }); }
|
|
2008
|
+
}
|
|
2009
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, decorators: [{
|
|
2010
|
+
type: Injectable
|
|
2011
|
+
}], ctorParameters: () => [] });
|
|
2012
|
+
|
|
2013
|
+
class AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule {
|
|
2014
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2015
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule }); }
|
|
2016
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, providers: [
|
|
2017
|
+
{
|
|
2018
|
+
provide: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
|
|
2019
|
+
useClass: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
|
|
2020
|
+
},
|
|
2021
|
+
] }); }
|
|
2022
|
+
}
|
|
2023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, decorators: [{
|
|
2024
|
+
type: NgModule,
|
|
2025
|
+
args: [{
|
|
2026
|
+
imports: [],
|
|
2027
|
+
exports: [],
|
|
2028
|
+
declarations: [],
|
|
2029
|
+
providers: [
|
|
2030
|
+
{
|
|
2031
|
+
provide: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
|
|
2032
|
+
useClass: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
|
|
2033
|
+
},
|
|
2034
|
+
],
|
|
2035
|
+
}]
|
|
2036
|
+
}] });
|
|
2037
|
+
|
|
2038
|
+
async function documentRelatedFactory(injector) {
|
|
2039
|
+
const i18n = RootConfig.config.i18n;
|
|
2040
|
+
const entityDef = {
|
|
2041
|
+
module: RootConfig.module.name,
|
|
2042
|
+
name: RootConfig.entities.documentRelated.name,
|
|
2043
|
+
title: RootConfig.entities.documentRelated.title,
|
|
2044
|
+
icon: RootConfig.entities.documentRelated.icon,
|
|
2045
|
+
formats: {
|
|
2046
|
+
individual: RootConfig.entities.documentRelated.title,
|
|
2047
|
+
plural: RootConfig.entities.documentRelated.titlePlural,
|
|
2048
|
+
searchResult: {
|
|
2049
|
+
title: '{{ title }}',
|
|
2050
|
+
description: RootConfig.module.title,
|
|
2051
|
+
},
|
|
2052
|
+
},
|
|
2053
|
+
relatedEntities: [],
|
|
2054
|
+
groups: [
|
|
2055
|
+
{
|
|
2056
|
+
id: 'section',
|
|
2057
|
+
title: RootConfig.entities.documentRelated.title,
|
|
2058
|
+
},
|
|
2059
|
+
],
|
|
2060
|
+
properties: [
|
|
2061
|
+
{
|
|
2062
|
+
name: 'name',
|
|
2063
|
+
title: '@general:terms.common.name',
|
|
2064
|
+
groupId: 'section',
|
|
2065
|
+
schema: {
|
|
2066
|
+
dataType: 'string',
|
|
2067
|
+
readonly: true,
|
|
2068
|
+
interface: {
|
|
2069
|
+
type: AXPWidgetsCatalog.text,
|
|
2070
|
+
options: {
|
|
2071
|
+
placeholder: '@general:terms.common.name',
|
|
2072
|
+
},
|
|
2073
|
+
},
|
|
2074
|
+
},
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
name: 'size',
|
|
2078
|
+
title: '@general:terms.common.size',
|
|
2079
|
+
groupId: 'section',
|
|
2080
|
+
schema: {
|
|
2081
|
+
dataType: 'string',
|
|
2082
|
+
readonly: true,
|
|
2083
|
+
interface: {
|
|
2084
|
+
type: AXPWidgetsCatalog.number,
|
|
2085
|
+
options: {},
|
|
2086
|
+
},
|
|
2087
|
+
},
|
|
2088
|
+
validations: [
|
|
2089
|
+
{
|
|
2090
|
+
rule: 'required',
|
|
2091
|
+
},
|
|
2092
|
+
],
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
name: 'type',
|
|
2096
|
+
title: '@general:terms.common.type',
|
|
2097
|
+
groupId: 'section',
|
|
2098
|
+
schema: {
|
|
2099
|
+
dataType: 'string',
|
|
2100
|
+
readonly: true,
|
|
2101
|
+
interface: {
|
|
2102
|
+
type: AXPWidgetsCatalog.lookup,
|
|
2103
|
+
options: {
|
|
2104
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.documentType.name}`,
|
|
2105
|
+
expose: 'type',
|
|
2106
|
+
},
|
|
2107
|
+
},
|
|
2108
|
+
},
|
|
2109
|
+
validations: [
|
|
2110
|
+
{
|
|
2111
|
+
rule: 'required',
|
|
2112
|
+
},
|
|
2113
|
+
],
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
name: 'metaData',
|
|
2117
|
+
title: `@${i18n}:terms.common.meta-data`,
|
|
2118
|
+
groupId: 'section',
|
|
2119
|
+
schema: {
|
|
2120
|
+
dataType: 'object',
|
|
2121
|
+
readonly: true,
|
|
2122
|
+
interface: {
|
|
2123
|
+
type: AXPWidgetsCatalog.blockLayout,
|
|
2124
|
+
options: {},
|
|
2125
|
+
// children: 'context.eval("type.meta")'
|
|
2126
|
+
children: []
|
|
2127
|
+
},
|
|
2128
|
+
},
|
|
2129
|
+
validations: [
|
|
2130
|
+
{
|
|
2131
|
+
rule: 'required',
|
|
2132
|
+
},
|
|
2133
|
+
],
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
name: 'fileId',
|
|
2137
|
+
title: `@${i18n}:terms.common.file`,
|
|
2138
|
+
groupId: 'section',
|
|
2139
|
+
schema: {
|
|
2140
|
+
dataType: 'string',
|
|
2141
|
+
readonly: true,
|
|
2142
|
+
interface: {
|
|
2143
|
+
type: AXPWidgetsCatalog.fileUploader,
|
|
2144
|
+
options: {
|
|
2145
|
+
maxFileSize: ` {{context.eval("type.maxSize")}} `,
|
|
2146
|
+
multiple: ` {{context.eval("type.multiple")}} `,
|
|
2147
|
+
// accept: ` {{context.eval("type.multiple")}} `,
|
|
2148
|
+
},
|
|
2149
|
+
},
|
|
2150
|
+
},
|
|
2151
|
+
validations: [
|
|
2152
|
+
{
|
|
2153
|
+
rule: 'required',
|
|
2154
|
+
},
|
|
2155
|
+
],
|
|
2156
|
+
},
|
|
2157
|
+
],
|
|
2158
|
+
columns: [
|
|
2159
|
+
{ name: 'name' },
|
|
2160
|
+
{ name: 'fileId' },
|
|
2161
|
+
{ name: 'type' },
|
|
2162
|
+
{ name: 'size' }
|
|
2163
|
+
],
|
|
2164
|
+
interfaces: {
|
|
2165
|
+
master: {
|
|
2166
|
+
create: {
|
|
2167
|
+
sections: [
|
|
2168
|
+
{
|
|
2169
|
+
id: 'section',
|
|
2170
|
+
},
|
|
2171
|
+
],
|
|
2172
|
+
properties: [
|
|
2173
|
+
{
|
|
2174
|
+
name: 'metaData',
|
|
2175
|
+
layout: {
|
|
2176
|
+
positions: {
|
|
2177
|
+
lg: {
|
|
2178
|
+
colSpan: 12,
|
|
2179
|
+
},
|
|
2180
|
+
},
|
|
2181
|
+
},
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
name: 'fileId',
|
|
2185
|
+
layout: {
|
|
2186
|
+
positions: {
|
|
2187
|
+
lg: {
|
|
2188
|
+
colSpan: 12,
|
|
2189
|
+
},
|
|
2190
|
+
},
|
|
2191
|
+
},
|
|
2192
|
+
},
|
|
2193
|
+
],
|
|
2194
|
+
},
|
|
2195
|
+
update: {
|
|
2196
|
+
sections: [
|
|
2197
|
+
{
|
|
2198
|
+
id: 'section',
|
|
2199
|
+
},
|
|
2200
|
+
],
|
|
2201
|
+
properties: [
|
|
2202
|
+
{
|
|
2203
|
+
name: 'name',
|
|
2204
|
+
layout: {
|
|
2205
|
+
positions: {
|
|
2206
|
+
lg: {
|
|
2207
|
+
colSpan: 6,
|
|
2208
|
+
},
|
|
2209
|
+
},
|
|
2210
|
+
},
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
name: 'type',
|
|
2214
|
+
layout: {
|
|
2215
|
+
positions: {
|
|
2216
|
+
lg: {
|
|
2217
|
+
colSpan: 12,
|
|
2218
|
+
},
|
|
2219
|
+
},
|
|
2220
|
+
},
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
name: 'metaData',
|
|
2224
|
+
layout: {
|
|
2225
|
+
positions: {
|
|
2226
|
+
lg: {
|
|
2227
|
+
colSpan: 12,
|
|
2228
|
+
},
|
|
2229
|
+
},
|
|
2230
|
+
},
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
name: 'file',
|
|
2234
|
+
layout: {
|
|
2235
|
+
positions: {
|
|
2236
|
+
lg: {
|
|
2237
|
+
colSpan: 12,
|
|
2238
|
+
},
|
|
2239
|
+
},
|
|
2240
|
+
},
|
|
2241
|
+
},
|
|
2242
|
+
],
|
|
2243
|
+
},
|
|
2244
|
+
single: {
|
|
2245
|
+
title: '{{title}}',
|
|
2246
|
+
sections: [
|
|
2247
|
+
{
|
|
2248
|
+
id: 'section',
|
|
2249
|
+
layout: {
|
|
2250
|
+
positions: {
|
|
2251
|
+
lg: {
|
|
2252
|
+
colSpan: 12,
|
|
2253
|
+
},
|
|
2254
|
+
},
|
|
2255
|
+
},
|
|
2256
|
+
},
|
|
2257
|
+
],
|
|
2258
|
+
properties: [
|
|
2259
|
+
{
|
|
2260
|
+
name: 'metaData',
|
|
2261
|
+
layout: {
|
|
2262
|
+
positions: {
|
|
2263
|
+
lg: {
|
|
2264
|
+
colSpan: 6,
|
|
2265
|
+
},
|
|
2266
|
+
}
|
|
2267
|
+
},
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
name: 'fileId',
|
|
2271
|
+
layout: {
|
|
2272
|
+
positions: {
|
|
2273
|
+
lg: {
|
|
2274
|
+
colSpan: 12,
|
|
2275
|
+
},
|
|
2276
|
+
},
|
|
2277
|
+
},
|
|
2278
|
+
},
|
|
2279
|
+
],
|
|
2280
|
+
actions: [],
|
|
2281
|
+
},
|
|
2282
|
+
list: {
|
|
2283
|
+
actions: [
|
|
2284
|
+
{
|
|
2285
|
+
title: '@general:actions.detail.title',
|
|
2286
|
+
command: 'open-entity',
|
|
2287
|
+
priority: 'secondary',
|
|
2288
|
+
type: 'view',
|
|
2289
|
+
default: true,
|
|
2290
|
+
scope: AXPEntityCommandScope.Individual,
|
|
2291
|
+
},
|
|
2292
|
+
],
|
|
2293
|
+
views: [
|
|
2294
|
+
createAllQueryView({ sorts: [{ name: 'name', dir: 'asc' }] }),
|
|
2295
|
+
createQueryView('Draft', `@${i18n}:terms.workflow.draft`, true, {
|
|
2296
|
+
conditions: [
|
|
2297
|
+
{
|
|
2298
|
+
name: 'status',
|
|
2299
|
+
operator: {
|
|
2300
|
+
type: 'equal',
|
|
2301
|
+
},
|
|
2302
|
+
value: 'Draft',
|
|
2303
|
+
},
|
|
2304
|
+
],
|
|
2305
|
+
}),
|
|
2306
|
+
createQueryView('PendingReview', `@${i18n}:terms.workflow.pending`, true, {
|
|
2307
|
+
conditions: [
|
|
2308
|
+
{
|
|
2309
|
+
name: 'status',
|
|
2310
|
+
operator: {
|
|
2311
|
+
type: 'equal',
|
|
2312
|
+
},
|
|
2313
|
+
value: 'PendingReview',
|
|
2314
|
+
},
|
|
2315
|
+
],
|
|
2316
|
+
}),
|
|
2317
|
+
createQueryView('Reviewed', `@${i18n}:terms.workflow.reviewed`, true, {
|
|
2318
|
+
conditions: [
|
|
2319
|
+
{
|
|
2320
|
+
name: 'status',
|
|
2321
|
+
operator: {
|
|
2322
|
+
type: 'equal',
|
|
2323
|
+
},
|
|
2324
|
+
value: 'Reviewed',
|
|
2325
|
+
},
|
|
2326
|
+
],
|
|
2327
|
+
}),
|
|
2328
|
+
],
|
|
2329
|
+
},
|
|
2330
|
+
},
|
|
2331
|
+
},
|
|
2332
|
+
};
|
|
2333
|
+
return entityDef;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
class AXMFolderService extends AXMEntityCrudServiceImpl {
|
|
2337
|
+
}
|
|
2338
|
+
class AXMFolderServiceImpl extends AXMFolderService {
|
|
2339
|
+
constructor() {
|
|
2340
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.folder.name}`);
|
|
2341
|
+
}
|
|
2342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2343
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl }); }
|
|
2344
|
+
}
|
|
2345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl, decorators: [{
|
|
2346
|
+
type: Injectable
|
|
2347
|
+
}], ctorParameters: () => [] });
|
|
2348
|
+
|
|
2349
|
+
async function folderFactory(injector) {
|
|
2350
|
+
const dataService = injector.get(AXMFolderService);
|
|
2351
|
+
const entityDef = {
|
|
2352
|
+
module: RootConfig.module.name,
|
|
2353
|
+
name: RootConfig.entities.folder.name,
|
|
2354
|
+
title: RootConfig.entities.folder.title,
|
|
2355
|
+
formats: {
|
|
2356
|
+
individual: RootConfig.entities.folder.title,
|
|
2357
|
+
plural: RootConfig.entities.folder.titlePlural,
|
|
2358
|
+
searchResult: {
|
|
2359
|
+
title: '{{ title }}',
|
|
2360
|
+
description: RootConfig.module.title,
|
|
2361
|
+
},
|
|
2362
|
+
},
|
|
2363
|
+
relatedEntities: [],
|
|
2364
|
+
groups: [
|
|
2365
|
+
{
|
|
2366
|
+
id: 'section',
|
|
2367
|
+
title: RootConfig.entities.folder.title,
|
|
2368
|
+
},
|
|
2369
|
+
],
|
|
2370
|
+
properties: [
|
|
2371
|
+
{
|
|
2372
|
+
name: 'name',
|
|
2373
|
+
title: '@general:terms.common.name',
|
|
2374
|
+
groupId: 'section',
|
|
2375
|
+
options: {
|
|
2376
|
+
sort: {
|
|
2377
|
+
enabled: true,
|
|
2378
|
+
},
|
|
2379
|
+
},
|
|
2380
|
+
schema: {
|
|
2381
|
+
dataType: 'string',
|
|
2382
|
+
interface: {
|
|
2383
|
+
type: AXPWidgetsCatalog.text,
|
|
2384
|
+
},
|
|
2385
|
+
},
|
|
2386
|
+
validations: [
|
|
2387
|
+
{
|
|
2388
|
+
rule: 'required',
|
|
2389
|
+
},
|
|
2390
|
+
],
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
name: 'title',
|
|
2394
|
+
title: '@general:terms.common.title',
|
|
2395
|
+
groupId: 'section',
|
|
2396
|
+
schema: {
|
|
2397
|
+
dataType: 'string',
|
|
2398
|
+
interface: {
|
|
2399
|
+
type: AXPWidgetsCatalog.text,
|
|
2400
|
+
},
|
|
2401
|
+
},
|
|
2402
|
+
validations: [
|
|
2403
|
+
{
|
|
2404
|
+
rule: 'required',
|
|
2405
|
+
},
|
|
2406
|
+
],
|
|
2407
|
+
},
|
|
2408
|
+
],
|
|
2409
|
+
columns: [{ name: 'name' }, { name: 'title' }],
|
|
2410
|
+
commands: {
|
|
2411
|
+
create: {
|
|
2412
|
+
execute: async (data) => {
|
|
2413
|
+
const res = await dataService.insertOne(data);
|
|
2414
|
+
return { id: res };
|
|
2415
|
+
},
|
|
2416
|
+
},
|
|
2417
|
+
delete: {
|
|
2418
|
+
execute: async (id) => {
|
|
2419
|
+
return await dataService.deleteOne(id);
|
|
2420
|
+
},
|
|
2421
|
+
},
|
|
2422
|
+
update: {
|
|
2423
|
+
execute: async (data) => {
|
|
2424
|
+
return await dataService.updateOne(data.id, data);
|
|
2425
|
+
},
|
|
2426
|
+
},
|
|
2427
|
+
},
|
|
2428
|
+
queries: {
|
|
2429
|
+
byKey: {
|
|
2430
|
+
execute: async (id) => {
|
|
2431
|
+
return await dataService.getOne(id);
|
|
2432
|
+
},
|
|
2433
|
+
type: AXPEntityQueryType.Single,
|
|
2434
|
+
},
|
|
2435
|
+
list: {
|
|
2436
|
+
execute: async (e) => {
|
|
2437
|
+
return await dataService.query(e);
|
|
2438
|
+
},
|
|
2439
|
+
type: AXPEntityQueryType.List,
|
|
2440
|
+
},
|
|
2441
|
+
},
|
|
2442
|
+
interfaces: {
|
|
2443
|
+
master: {
|
|
2444
|
+
create: {
|
|
2445
|
+
sections: [
|
|
2446
|
+
{
|
|
2447
|
+
id: 'section',
|
|
2448
|
+
},
|
|
2449
|
+
],
|
|
2450
|
+
properties: [
|
|
2451
|
+
{
|
|
2452
|
+
name: 'name',
|
|
2453
|
+
layout: {
|
|
2454
|
+
positions: {
|
|
2455
|
+
lg: {
|
|
2456
|
+
colSpan: 6,
|
|
2457
|
+
},
|
|
2458
|
+
},
|
|
2459
|
+
},
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
name: 'title',
|
|
2463
|
+
layout: {
|
|
2464
|
+
positions: {
|
|
2465
|
+
lg: {
|
|
2466
|
+
colSpan: 6,
|
|
2467
|
+
},
|
|
2468
|
+
},
|
|
2469
|
+
},
|
|
2470
|
+
},
|
|
2471
|
+
],
|
|
2472
|
+
},
|
|
2473
|
+
update: {
|
|
2474
|
+
sections: [
|
|
2475
|
+
{
|
|
2476
|
+
id: 'section',
|
|
2477
|
+
},
|
|
2478
|
+
],
|
|
2479
|
+
properties: [
|
|
2480
|
+
{
|
|
2481
|
+
name: 'name',
|
|
2482
|
+
layout: {
|
|
2483
|
+
positions: {
|
|
2484
|
+
lg: {
|
|
2485
|
+
colSpan: 6,
|
|
2486
|
+
},
|
|
2487
|
+
},
|
|
2488
|
+
},
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
name: 'title',
|
|
2492
|
+
layout: {
|
|
2493
|
+
positions: {
|
|
2494
|
+
lg: {
|
|
2495
|
+
colSpan: 6,
|
|
2496
|
+
},
|
|
2497
|
+
},
|
|
2498
|
+
},
|
|
2499
|
+
},
|
|
2500
|
+
],
|
|
2501
|
+
},
|
|
2502
|
+
single: {
|
|
2503
|
+
title: '{{title}}',
|
|
2504
|
+
sections: [
|
|
2505
|
+
{
|
|
2506
|
+
id: 'section',
|
|
2507
|
+
layout: {
|
|
2508
|
+
positions: {
|
|
2509
|
+
lg: {
|
|
2510
|
+
colSpan: 12,
|
|
2511
|
+
},
|
|
2512
|
+
},
|
|
2513
|
+
},
|
|
2514
|
+
},
|
|
2515
|
+
],
|
|
2516
|
+
properties: [
|
|
2517
|
+
{
|
|
2518
|
+
name: 'name',
|
|
2519
|
+
layout: {
|
|
2520
|
+
positions: {
|
|
2521
|
+
lg: {
|
|
2522
|
+
colSpan: 6,
|
|
2523
|
+
},
|
|
2524
|
+
},
|
|
2525
|
+
},
|
|
2526
|
+
},
|
|
2527
|
+
{
|
|
2528
|
+
name: 'title',
|
|
2529
|
+
layout: {
|
|
2530
|
+
positions: {
|
|
2531
|
+
lg: {
|
|
2532
|
+
colSpan: 6,
|
|
2533
|
+
},
|
|
2534
|
+
},
|
|
2535
|
+
},
|
|
2536
|
+
},
|
|
2537
|
+
],
|
|
2538
|
+
actions: [...entityMasterRecordActions()],
|
|
2539
|
+
},
|
|
2540
|
+
list: {
|
|
2541
|
+
actions: [...entityMasterCrudActions()],
|
|
2542
|
+
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
2543
|
+
},
|
|
2544
|
+
},
|
|
2545
|
+
},
|
|
2546
|
+
};
|
|
2547
|
+
return entityDef;
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
class AXMFolderEntityModule {
|
|
2551
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2552
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderEntityModule }); }
|
|
2553
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderEntityModule, providers: [
|
|
2554
|
+
{
|
|
2555
|
+
provide: AXMFolderService,
|
|
2556
|
+
useClass: AXMFolderServiceImpl,
|
|
2557
|
+
},
|
|
2558
|
+
] }); }
|
|
2559
|
+
}
|
|
2560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderEntityModule, decorators: [{
|
|
2561
|
+
type: NgModule,
|
|
2562
|
+
args: [{
|
|
2563
|
+
imports: [],
|
|
2564
|
+
exports: [],
|
|
2565
|
+
declarations: [],
|
|
2566
|
+
providers: [
|
|
2567
|
+
{
|
|
2568
|
+
provide: AXMFolderService,
|
|
2569
|
+
useClass: AXMFolderServiceImpl,
|
|
2570
|
+
},
|
|
2571
|
+
],
|
|
2572
|
+
}]
|
|
2573
|
+
}] });
|
|
2574
|
+
|
|
2575
|
+
class AXMReviewService extends AXMEntityCrudServiceImpl {
|
|
2576
|
+
}
|
|
2577
|
+
class AXMReviewServiceImpl extends AXMReviewService {
|
|
2578
|
+
constructor() {
|
|
2579
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.review.name}`);
|
|
2580
|
+
}
|
|
2581
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2582
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewServiceImpl }); }
|
|
2583
|
+
}
|
|
2584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewServiceImpl, decorators: [{
|
|
2585
|
+
type: Injectable
|
|
2586
|
+
}], ctorParameters: () => [] });
|
|
2587
|
+
|
|
2588
|
+
// Helper function to update document status based on review status
|
|
2589
|
+
async function updateDocumentStatus(documentId, reviewStatus, injector) {
|
|
2590
|
+
try {
|
|
2591
|
+
// Import document service dynamically to avoid circular dependencies
|
|
2592
|
+
const { AXMDocumentService } = await Promise.resolve().then(function () { return document_service; });
|
|
2593
|
+
const documentService = injector.get(AXMDocumentService);
|
|
2594
|
+
// Map review status to document workflow phase
|
|
2595
|
+
let documentStatus;
|
|
2596
|
+
switch (reviewStatus) {
|
|
2597
|
+
case 'Approved':
|
|
2598
|
+
documentStatus = 'Reviewed';
|
|
2599
|
+
break;
|
|
2600
|
+
case 'Rejected':
|
|
2601
|
+
documentStatus = 'Rejected';
|
|
2602
|
+
break;
|
|
2603
|
+
case 'Pending':
|
|
2604
|
+
documentStatus = 'PendingReview';
|
|
2605
|
+
break;
|
|
2606
|
+
default:
|
|
2607
|
+
documentStatus = 'PendingReview';
|
|
2608
|
+
}
|
|
2609
|
+
// Update the document status
|
|
2610
|
+
await documentService.updateOne(documentId, { status: documentStatus });
|
|
2611
|
+
}
|
|
2612
|
+
catch (error) {
|
|
2613
|
+
console.error('Failed to update document status:', error);
|
|
2614
|
+
// Don't throw error to avoid breaking the review process
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
async function reviewFactory(injector) {
|
|
2618
|
+
const dataService = injector.get(AXMReviewService);
|
|
2619
|
+
const i18n = RootConfig.config.i18n;
|
|
2620
|
+
const entityDef = {
|
|
2621
|
+
module: RootConfig.module.name,
|
|
2622
|
+
name: RootConfig.entities.review.name,
|
|
2623
|
+
title: RootConfig.entities.review.title,
|
|
2624
|
+
icon: RootConfig.entities.review.icon,
|
|
2625
|
+
formats: {
|
|
2626
|
+
individual: RootConfig.entities.review.title,
|
|
2627
|
+
plural: RootConfig.entities.review.titlePlural,
|
|
2628
|
+
searchResult: {
|
|
2629
|
+
title: '{{ title }}',
|
|
2630
|
+
description: RootConfig.module.title,
|
|
2631
|
+
},
|
|
2632
|
+
},
|
|
2633
|
+
relatedEntities: [],
|
|
2634
|
+
groups: [
|
|
2635
|
+
{
|
|
2636
|
+
id: 'section',
|
|
2637
|
+
title: RootConfig.entities.review.title,
|
|
2638
|
+
},
|
|
2639
|
+
],
|
|
2640
|
+
properties: [
|
|
2641
|
+
{
|
|
2642
|
+
name: 'version',
|
|
2643
|
+
title: `@${i18n}:terms.common.version`,
|
|
2644
|
+
groupId: 'section',
|
|
2645
|
+
schema: {
|
|
2646
|
+
dataType: 'number',
|
|
2647
|
+
interface: {
|
|
2648
|
+
type: AXPWidgetsCatalog.textBlockLayout,
|
|
2649
|
+
options: {
|
|
2650
|
+
content: `{{ context.eval('version') }}`,
|
|
2651
|
+
},
|
|
2652
|
+
},
|
|
2653
|
+
},
|
|
2654
|
+
},
|
|
2655
|
+
{
|
|
2656
|
+
name: 'documentId',
|
|
2657
|
+
groupId: 'section',
|
|
2658
|
+
title: `@${i18n}:entities.document.title`,
|
|
2659
|
+
options: {
|
|
2660
|
+
sort: {
|
|
2661
|
+
enabled: true,
|
|
2662
|
+
},
|
|
2663
|
+
filter: {
|
|
2664
|
+
advance: {
|
|
2665
|
+
enabled: true,
|
|
2666
|
+
},
|
|
2667
|
+
inline: {
|
|
2668
|
+
enabled: true,
|
|
2669
|
+
},
|
|
2670
|
+
},
|
|
2671
|
+
},
|
|
2672
|
+
schema: {
|
|
2673
|
+
dataType: 'string',
|
|
2674
|
+
interface: {
|
|
2675
|
+
type: AXPWidgetsCatalog.lookup,
|
|
2676
|
+
options: {
|
|
2677
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.document.name}`,
|
|
2678
|
+
multiple: false,
|
|
2679
|
+
filter: "{{ { logic:'and' , filters: [ { field:'documentType.requiresReview' , value: true , operator: { type:'equal' } },] } }}",
|
|
2680
|
+
textField: 'name',
|
|
2681
|
+
valueField: 'id',
|
|
2682
|
+
expose: [
|
|
2683
|
+
{ source: 'id', target: 'document.id' },
|
|
2684
|
+
{ source: 'name', target: 'document.name' },
|
|
2685
|
+
{ source: 'title', target: 'document.title' },
|
|
2686
|
+
{ source: 'version', target: 'document.version' },
|
|
2687
|
+
],
|
|
2688
|
+
},
|
|
2689
|
+
triggers: [
|
|
2690
|
+
{
|
|
2691
|
+
event: "{{ events.context('documentId') }}",
|
|
2692
|
+
action: "{{ context.set('version' , context.eval('document').version ) }}",
|
|
2693
|
+
},
|
|
2694
|
+
],
|
|
2695
|
+
},
|
|
2696
|
+
},
|
|
2697
|
+
validations: [
|
|
2698
|
+
{
|
|
2699
|
+
rule: 'required',
|
|
2700
|
+
},
|
|
2701
|
+
],
|
|
2702
|
+
},
|
|
2703
|
+
{
|
|
2704
|
+
name: 'reviewerId',
|
|
2705
|
+
title: `@${i18n}:terms.common.reviewer`,
|
|
2706
|
+
groupId: 'section',
|
|
2707
|
+
schema: {
|
|
2708
|
+
dataType: 'string',
|
|
2709
|
+
defaultValue: '{{ session.currentUser().id }}',
|
|
2710
|
+
interface: {
|
|
2711
|
+
type: AXPWidgetsCatalog.lookup,
|
|
2712
|
+
options: {
|
|
2713
|
+
entity: 'SecurityManagement.User',
|
|
2714
|
+
multiple: false,
|
|
2715
|
+
textField: 'username',
|
|
2716
|
+
valueField: 'id',
|
|
2717
|
+
expose: [
|
|
2718
|
+
{ source: 'id', target: 'reviewer.id' },
|
|
2719
|
+
{ source: 'username', target: 'reviewer.username' },
|
|
2720
|
+
],
|
|
2721
|
+
},
|
|
2722
|
+
},
|
|
2723
|
+
},
|
|
2724
|
+
validations: [
|
|
2725
|
+
{
|
|
2726
|
+
rule: 'required',
|
|
2727
|
+
},
|
|
2728
|
+
],
|
|
2729
|
+
},
|
|
2730
|
+
{
|
|
2731
|
+
name: 'status',
|
|
2732
|
+
title: `@${i18n}:terms.workflow.approve`,
|
|
2733
|
+
groupId: 'section',
|
|
2734
|
+
schema: {
|
|
2735
|
+
dataType: 'string',
|
|
2736
|
+
interface: {
|
|
2737
|
+
type: AXPWidgetsCatalog.toggle,
|
|
2738
|
+
options: {},
|
|
2739
|
+
},
|
|
2740
|
+
},
|
|
2741
|
+
validations: [
|
|
2742
|
+
{
|
|
2743
|
+
rule: 'required',
|
|
2744
|
+
},
|
|
2745
|
+
],
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
name: 'comment',
|
|
2749
|
+
title: `@${i18n}:terms.common.comment`,
|
|
2750
|
+
groupId: 'section',
|
|
2751
|
+
schema: {
|
|
2752
|
+
dataType: 'string',
|
|
2753
|
+
interface: {
|
|
2754
|
+
type: AXPWidgetsCatalog.richText,
|
|
2755
|
+
},
|
|
2756
|
+
},
|
|
2757
|
+
},
|
|
2758
|
+
{
|
|
2759
|
+
name: 'reviewedAt',
|
|
2760
|
+
title: `@${i18n}:terms.timestamps.reviewed-at`,
|
|
2761
|
+
groupId: 'section',
|
|
2762
|
+
options: {
|
|
2763
|
+
sort: {
|
|
2764
|
+
enabled: true,
|
|
2765
|
+
},
|
|
2766
|
+
filter: {
|
|
2767
|
+
advance: {
|
|
2768
|
+
enabled: true,
|
|
2769
|
+
},
|
|
2770
|
+
inline: {
|
|
2771
|
+
enabled: false,
|
|
2772
|
+
},
|
|
2773
|
+
},
|
|
2774
|
+
},
|
|
2775
|
+
schema: {
|
|
2776
|
+
defaultValue: '{{ variables.execute("now") }}',
|
|
2777
|
+
dataType: 'date',
|
|
2778
|
+
interface: {
|
|
2779
|
+
type: AXPWidgetsCatalog.dateTime,
|
|
2780
|
+
options: {
|
|
2781
|
+
showTime: true,
|
|
2782
|
+
},
|
|
2783
|
+
},
|
|
2784
|
+
},
|
|
2785
|
+
validations: [
|
|
2786
|
+
{
|
|
2787
|
+
rule: 'required',
|
|
2788
|
+
},
|
|
2789
|
+
],
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
name: 'auditInfo.updated.at',
|
|
2793
|
+
title: `@${i18n}:terms.timestamps.modified-at`,
|
|
2794
|
+
groupId: 'section',
|
|
2795
|
+
options: {
|
|
2796
|
+
sort: {
|
|
2797
|
+
enabled: true,
|
|
2798
|
+
},
|
|
2799
|
+
filter: {
|
|
2800
|
+
advance: {
|
|
2801
|
+
enabled: true,
|
|
2802
|
+
},
|
|
2803
|
+
inline: {
|
|
2804
|
+
enabled: false,
|
|
2805
|
+
},
|
|
2806
|
+
},
|
|
2807
|
+
},
|
|
2808
|
+
schema: {
|
|
2809
|
+
dataType: 'date',
|
|
2810
|
+
interface: {
|
|
2811
|
+
type: AXPWidgetsCatalog.dateTime,
|
|
2812
|
+
options: {
|
|
2813
|
+
showTime: true,
|
|
2814
|
+
},
|
|
2815
|
+
},
|
|
2816
|
+
},
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
name: 'auditInfo.updated.by',
|
|
2820
|
+
title: `@${i18n}:terms.timestamps.modified-by`,
|
|
2821
|
+
groupId: 'section',
|
|
2822
|
+
options: {
|
|
2823
|
+
sort: {
|
|
2824
|
+
enabled: true,
|
|
2825
|
+
},
|
|
2826
|
+
filter: {
|
|
2827
|
+
advance: {
|
|
2828
|
+
enabled: true,
|
|
2829
|
+
},
|
|
2830
|
+
inline: {
|
|
2831
|
+
enabled: true,
|
|
2832
|
+
},
|
|
2833
|
+
},
|
|
2834
|
+
},
|
|
2835
|
+
schema: {
|
|
2836
|
+
dataType: 'string',
|
|
2837
|
+
interface: {
|
|
2838
|
+
type: AXPWidgetsCatalog.lookup,
|
|
2839
|
+
options: {
|
|
2840
|
+
entity: 'SecurityManagement.User',
|
|
2841
|
+
multiple: false,
|
|
2842
|
+
textField: 'username',
|
|
2843
|
+
valueField: 'id',
|
|
2844
|
+
expose: [
|
|
2845
|
+
{ source: 'id', target: 'auditInfo.updated.by.id' },
|
|
2846
|
+
{ source: 'username', target: 'auditInfo.updated.by.username' },
|
|
2847
|
+
],
|
|
2848
|
+
},
|
|
2849
|
+
},
|
|
2850
|
+
},
|
|
2851
|
+
},
|
|
2852
|
+
],
|
|
2853
|
+
columns: [
|
|
2854
|
+
{ name: 'reviewerId', options: { dataPath: 'reviewer.title' } },
|
|
2855
|
+
{ name: 'status' },
|
|
2856
|
+
{ name: 'comment' },
|
|
2857
|
+
{ name: 'reviewedAt' },
|
|
2858
|
+
{ name: 'auditInfo.updated.at' },
|
|
2859
|
+
{ name: 'auditInfo.updated.by', options: { dataPath: 'auditInfo.updated.by.fullName' } },
|
|
2860
|
+
],
|
|
2861
|
+
commands: {
|
|
2862
|
+
create: {
|
|
2863
|
+
execute: async (data) => {
|
|
2864
|
+
// Set reviewedAt to current date if not provided
|
|
2865
|
+
if (!data.reviewedAt) {
|
|
2866
|
+
data.reviewedAt = new Date();
|
|
2867
|
+
}
|
|
2868
|
+
//TODO for test
|
|
2869
|
+
data.reviewStatus = 'Approved';
|
|
2870
|
+
// Create the review record
|
|
2871
|
+
const res = await dataService.insertOne(data);
|
|
2872
|
+
// Update document status based on review status
|
|
2873
|
+
await updateDocumentStatus(data.documentId, data.reviewStatus, injector);
|
|
2874
|
+
return { id: res };
|
|
2875
|
+
},
|
|
2876
|
+
},
|
|
2877
|
+
delete: {
|
|
2878
|
+
execute: async (id) => {
|
|
2879
|
+
return await dataService.deleteOne(id);
|
|
2880
|
+
},
|
|
2881
|
+
},
|
|
2882
|
+
update: {
|
|
2883
|
+
execute: async (data) => {
|
|
2884
|
+
// Update reviewedAt to current date
|
|
2885
|
+
data.reviewedAt = new Date();
|
|
2886
|
+
//TODO for test
|
|
2887
|
+
data.reviewStatus = 'Approved';
|
|
2888
|
+
// Update the review record
|
|
2889
|
+
const result = await dataService.updateOne(data.id, data);
|
|
2890
|
+
// Update document status based on review status
|
|
2891
|
+
await updateDocumentStatus(data.documentId, data.reviewStatus, injector);
|
|
2892
|
+
return result;
|
|
2893
|
+
},
|
|
2894
|
+
},
|
|
2895
|
+
},
|
|
2896
|
+
queries: {
|
|
2897
|
+
byKey: {
|
|
2898
|
+
execute: async (id) => {
|
|
2899
|
+
const review = await dataService.getOne(id);
|
|
2900
|
+
return {
|
|
2901
|
+
...review,
|
|
2902
|
+
reviewedAt: review.reviewedAt ?? new Date(),
|
|
2903
|
+
};
|
|
560
2904
|
},
|
|
2905
|
+
type: AXPEntityQueryType.Single,
|
|
561
2906
|
},
|
|
562
|
-
|
|
563
|
-
|
|
2907
|
+
list: {
|
|
2908
|
+
execute: async (e) => {
|
|
2909
|
+
return await dataService.query(e);
|
|
2910
|
+
},
|
|
2911
|
+
type: AXPEntityQueryType.List,
|
|
2912
|
+
},
|
|
2913
|
+
},
|
|
564
2914
|
interfaces: {
|
|
565
2915
|
master: {
|
|
566
2916
|
create: {
|
|
567
2917
|
sections: [
|
|
568
2918
|
{
|
|
569
|
-
id: '
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
id: 'management',
|
|
2919
|
+
id: 'section',
|
|
573
2920
|
},
|
|
574
2921
|
],
|
|
575
2922
|
properties: [
|
|
576
2923
|
{
|
|
577
|
-
name: '
|
|
578
|
-
layout: {
|
|
579
|
-
positions: {
|
|
580
|
-
lg: {
|
|
581
|
-
colSpan: 6,
|
|
582
|
-
},
|
|
583
|
-
},
|
|
584
|
-
},
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
name: 'title',
|
|
2924
|
+
name: 'documentId',
|
|
588
2925
|
layout: {
|
|
589
2926
|
positions: {
|
|
590
2927
|
lg: {
|
|
591
|
-
colSpan:
|
|
2928
|
+
colSpan: 12,
|
|
2929
|
+
order: 1,
|
|
592
2930
|
},
|
|
593
2931
|
},
|
|
594
2932
|
},
|
|
595
2933
|
},
|
|
596
2934
|
{
|
|
597
|
-
name: '
|
|
2935
|
+
name: 'reviewerId',
|
|
598
2936
|
layout: {
|
|
599
2937
|
positions: {
|
|
600
2938
|
lg: {
|
|
601
2939
|
colSpan: 6,
|
|
2940
|
+
order: 5,
|
|
602
2941
|
},
|
|
603
2942
|
},
|
|
604
2943
|
},
|
|
605
2944
|
},
|
|
606
2945
|
{
|
|
607
|
-
name: '
|
|
2946
|
+
name: 'version',
|
|
608
2947
|
layout: {
|
|
609
2948
|
positions: {
|
|
610
2949
|
lg: {
|
|
611
2950
|
colSpan: 6,
|
|
2951
|
+
order: 2,
|
|
612
2952
|
},
|
|
613
2953
|
},
|
|
614
2954
|
},
|
|
615
2955
|
},
|
|
616
2956
|
{
|
|
617
|
-
name: '
|
|
2957
|
+
name: 'status',
|
|
618
2958
|
layout: {
|
|
619
2959
|
positions: {
|
|
620
2960
|
lg: {
|
|
621
2961
|
colSpan: 6,
|
|
2962
|
+
order: 3,
|
|
622
2963
|
},
|
|
623
2964
|
},
|
|
624
2965
|
},
|
|
625
2966
|
},
|
|
626
2967
|
{
|
|
627
|
-
name: '
|
|
2968
|
+
name: 'comment',
|
|
628
2969
|
layout: {
|
|
629
2970
|
positions: {
|
|
630
2971
|
lg: {
|
|
631
|
-
colSpan:
|
|
2972
|
+
colSpan: 12,
|
|
2973
|
+
order: 4,
|
|
632
2974
|
},
|
|
633
2975
|
},
|
|
634
2976
|
},
|
|
635
2977
|
},
|
|
636
2978
|
{
|
|
637
|
-
name: '
|
|
2979
|
+
name: 'reviewedAt',
|
|
638
2980
|
layout: {
|
|
639
2981
|
positions: {
|
|
640
2982
|
lg: {
|
|
641
2983
|
colSpan: 6,
|
|
642
|
-
|
|
643
|
-
},
|
|
644
|
-
},
|
|
645
|
-
},
|
|
646
|
-
// {
|
|
647
|
-
// name: 'meta',
|
|
648
|
-
// layout: {
|
|
649
|
-
// positions: {
|
|
650
|
-
// lg: {
|
|
651
|
-
// colSpan: 12,
|
|
652
|
-
// },
|
|
653
|
-
// },
|
|
654
|
-
// },
|
|
655
|
-
// },
|
|
656
|
-
{
|
|
657
|
-
name: 'type',
|
|
658
|
-
layout: {
|
|
659
|
-
positions: {
|
|
660
|
-
lg: {
|
|
661
|
-
colSpan: 12,
|
|
2984
|
+
order: 6,
|
|
662
2985
|
},
|
|
663
2986
|
},
|
|
664
2987
|
},
|
|
@@ -668,89 +2991,39 @@ async function documentTypeFactory(injector) {
|
|
|
668
2991
|
update: {
|
|
669
2992
|
sections: [
|
|
670
2993
|
{
|
|
671
|
-
id: '
|
|
672
|
-
},
|
|
673
|
-
{
|
|
674
|
-
id: 'management',
|
|
2994
|
+
id: 'section',
|
|
675
2995
|
},
|
|
676
2996
|
],
|
|
677
2997
|
properties: [
|
|
678
2998
|
{
|
|
679
|
-
name: '
|
|
680
|
-
layout: {
|
|
681
|
-
positions: {
|
|
682
|
-
lg: {
|
|
683
|
-
colSpan: 6,
|
|
684
|
-
},
|
|
685
|
-
},
|
|
686
|
-
},
|
|
687
|
-
},
|
|
688
|
-
{
|
|
689
|
-
name: 'title',
|
|
690
|
-
layout: {
|
|
691
|
-
positions: {
|
|
692
|
-
lg: {
|
|
693
|
-
colSpan: 6,
|
|
694
|
-
},
|
|
695
|
-
},
|
|
696
|
-
},
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
name: 'maxSize',
|
|
700
|
-
layout: {
|
|
701
|
-
positions: {
|
|
702
|
-
lg: {
|
|
703
|
-
colSpan: 6,
|
|
704
|
-
},
|
|
705
|
-
},
|
|
706
|
-
},
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
name: 'isEncrypted',
|
|
710
|
-
layout: {
|
|
711
|
-
positions: {
|
|
712
|
-
lg: {
|
|
713
|
-
colSpan: 6,
|
|
714
|
-
},
|
|
715
|
-
},
|
|
716
|
-
},
|
|
717
|
-
},
|
|
718
|
-
{
|
|
719
|
-
name: 'enableExpiration',
|
|
2999
|
+
name: 'reviewerId',
|
|
720
3000
|
layout: {
|
|
721
3001
|
positions: {
|
|
722
3002
|
lg: {
|
|
723
3003
|
colSpan: 6,
|
|
3004
|
+
order: 5,
|
|
724
3005
|
},
|
|
725
3006
|
},
|
|
726
3007
|
},
|
|
727
3008
|
},
|
|
728
3009
|
{
|
|
729
|
-
name: '
|
|
3010
|
+
name: 'comment',
|
|
730
3011
|
layout: {
|
|
731
3012
|
positions: {
|
|
732
3013
|
lg: {
|
|
733
|
-
colSpan:
|
|
3014
|
+
colSpan: 12,
|
|
3015
|
+
order: 4,
|
|
734
3016
|
},
|
|
735
3017
|
},
|
|
736
3018
|
},
|
|
737
3019
|
},
|
|
738
3020
|
{
|
|
739
|
-
name: '
|
|
3021
|
+
name: 'reviewedAt',
|
|
740
3022
|
layout: {
|
|
741
3023
|
positions: {
|
|
742
3024
|
lg: {
|
|
743
3025
|
colSpan: 6,
|
|
744
|
-
|
|
745
|
-
},
|
|
746
|
-
},
|
|
747
|
-
},
|
|
748
|
-
{
|
|
749
|
-
name: 'type',
|
|
750
|
-
layout: {
|
|
751
|
-
positions: {
|
|
752
|
-
lg: {
|
|
753
|
-
colSpan: 12,
|
|
3026
|
+
order: 6,
|
|
754
3027
|
},
|
|
755
3028
|
},
|
|
756
3029
|
},
|
|
@@ -758,20 +3031,10 @@ async function documentTypeFactory(injector) {
|
|
|
758
3031
|
],
|
|
759
3032
|
},
|
|
760
3033
|
single: {
|
|
761
|
-
title: '{{
|
|
3034
|
+
title: '{{document.name}} - Review',
|
|
762
3035
|
sections: [
|
|
763
3036
|
{
|
|
764
|
-
id: '
|
|
765
|
-
layout: {
|
|
766
|
-
positions: {
|
|
767
|
-
lg: {
|
|
768
|
-
colSpan: 12,
|
|
769
|
-
},
|
|
770
|
-
},
|
|
771
|
-
},
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
id: 'management',
|
|
3037
|
+
id: 'section',
|
|
775
3038
|
layout: {
|
|
776
3039
|
positions: {
|
|
777
3040
|
lg: {
|
|
@@ -783,101 +3046,104 @@ async function documentTypeFactory(injector) {
|
|
|
783
3046
|
],
|
|
784
3047
|
properties: [
|
|
785
3048
|
{
|
|
786
|
-
name: '
|
|
3049
|
+
name: 'documentId',
|
|
3050
|
+
dataPath: 'document',
|
|
787
3051
|
layout: {
|
|
788
3052
|
positions: {
|
|
789
3053
|
lg: {
|
|
790
|
-
colSpan:
|
|
3054
|
+
colSpan: 12,
|
|
3055
|
+
order: 1,
|
|
791
3056
|
},
|
|
792
3057
|
},
|
|
793
3058
|
},
|
|
794
3059
|
},
|
|
795
3060
|
{
|
|
796
|
-
name: '
|
|
3061
|
+
name: 'reviewerId',
|
|
797
3062
|
layout: {
|
|
798
3063
|
positions: {
|
|
799
3064
|
lg: {
|
|
800
3065
|
colSpan: 6,
|
|
3066
|
+
order: 5,
|
|
801
3067
|
},
|
|
802
3068
|
},
|
|
803
3069
|
},
|
|
804
3070
|
},
|
|
805
3071
|
{
|
|
806
|
-
name: '
|
|
3072
|
+
name: 'version',
|
|
807
3073
|
layout: {
|
|
808
3074
|
positions: {
|
|
809
3075
|
lg: {
|
|
810
3076
|
colSpan: 6,
|
|
3077
|
+
order: 2,
|
|
811
3078
|
},
|
|
812
3079
|
},
|
|
813
3080
|
},
|
|
814
3081
|
},
|
|
815
3082
|
{
|
|
816
|
-
name: '
|
|
3083
|
+
name: 'status',
|
|
817
3084
|
layout: {
|
|
818
3085
|
positions: {
|
|
819
3086
|
lg: {
|
|
820
3087
|
colSpan: 6,
|
|
3088
|
+
order: 3,
|
|
821
3089
|
},
|
|
822
3090
|
},
|
|
823
3091
|
},
|
|
824
3092
|
},
|
|
825
3093
|
{
|
|
826
|
-
name: '
|
|
3094
|
+
name: 'comment',
|
|
827
3095
|
layout: {
|
|
828
3096
|
positions: {
|
|
829
3097
|
lg: {
|
|
830
|
-
colSpan:
|
|
3098
|
+
colSpan: 12,
|
|
3099
|
+
order: 4,
|
|
831
3100
|
},
|
|
832
3101
|
},
|
|
833
3102
|
},
|
|
834
3103
|
},
|
|
835
3104
|
{
|
|
836
|
-
name: '
|
|
3105
|
+
name: 'reviewedAt',
|
|
837
3106
|
layout: {
|
|
838
3107
|
positions: {
|
|
839
3108
|
lg: {
|
|
840
3109
|
colSpan: 6,
|
|
3110
|
+
order: 6,
|
|
841
3111
|
},
|
|
842
3112
|
},
|
|
843
3113
|
},
|
|
844
3114
|
},
|
|
845
3115
|
{
|
|
846
|
-
name: '
|
|
3116
|
+
name: 'auditInfo.updated.at',
|
|
847
3117
|
layout: {
|
|
848
3118
|
positions: {
|
|
849
3119
|
lg: {
|
|
850
3120
|
colSpan: 6,
|
|
3121
|
+
order: 7,
|
|
851
3122
|
},
|
|
852
3123
|
},
|
|
853
3124
|
},
|
|
854
3125
|
},
|
|
855
|
-
// {
|
|
856
|
-
// name: 'meta',
|
|
857
|
-
// layout: {
|
|
858
|
-
// positions: {
|
|
859
|
-
// lg: {
|
|
860
|
-
// colSpan: 12,
|
|
861
|
-
// },
|
|
862
|
-
// },
|
|
863
|
-
// },
|
|
864
|
-
// },
|
|
865
3126
|
{
|
|
866
|
-
name: '
|
|
3127
|
+
name: 'auditInfo.updated.by',
|
|
867
3128
|
layout: {
|
|
868
3129
|
positions: {
|
|
869
3130
|
lg: {
|
|
870
|
-
colSpan:
|
|
3131
|
+
colSpan: 6,
|
|
3132
|
+
order: 8,
|
|
871
3133
|
},
|
|
872
3134
|
},
|
|
873
3135
|
},
|
|
874
3136
|
},
|
|
875
3137
|
],
|
|
876
|
-
actions: [
|
|
3138
|
+
actions: [],
|
|
877
3139
|
},
|
|
878
3140
|
list: {
|
|
879
|
-
actions: [
|
|
880
|
-
views: [
|
|
3141
|
+
actions: [],
|
|
3142
|
+
views: [
|
|
3143
|
+
createAllQueryView({
|
|
3144
|
+
sorts: [{ name: 'reviewedAt', dir: 'desc' }],
|
|
3145
|
+
}),
|
|
3146
|
+
],
|
|
881
3147
|
},
|
|
882
3148
|
},
|
|
883
3149
|
},
|
|
@@ -885,30 +3151,17 @@ async function documentTypeFactory(injector) {
|
|
|
885
3151
|
return entityDef;
|
|
886
3152
|
}
|
|
887
3153
|
|
|
888
|
-
class
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.documentType.name}`);
|
|
893
|
-
}
|
|
894
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
895
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl }); }
|
|
896
|
-
}
|
|
897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl, decorators: [{
|
|
898
|
-
type: Injectable
|
|
899
|
-
}], ctorParameters: () => [] });
|
|
900
|
-
|
|
901
|
-
class AXMDocumentManagementDocumentTypeEntityModule {
|
|
902
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
903
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule }); }
|
|
904
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, providers: [
|
|
3154
|
+
class AXMReviewEntityModule {
|
|
3155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3156
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewEntityModule }); }
|
|
3157
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewEntityModule, providers: [
|
|
905
3158
|
{
|
|
906
|
-
provide:
|
|
907
|
-
useClass:
|
|
3159
|
+
provide: AXMReviewService,
|
|
3160
|
+
useClass: AXMReviewServiceImpl,
|
|
908
3161
|
},
|
|
909
3162
|
] }); }
|
|
910
3163
|
}
|
|
911
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewEntityModule, decorators: [{
|
|
912
3165
|
type: NgModule,
|
|
913
3166
|
args: [{
|
|
914
3167
|
imports: [],
|
|
@@ -916,71 +3169,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
916
3169
|
declarations: [],
|
|
917
3170
|
providers: [
|
|
918
3171
|
{
|
|
919
|
-
provide:
|
|
920
|
-
useClass:
|
|
3172
|
+
provide: AXMReviewService,
|
|
3173
|
+
useClass: AXMReviewServiceImpl,
|
|
921
3174
|
},
|
|
922
3175
|
],
|
|
923
3176
|
}]
|
|
924
3177
|
}] });
|
|
925
3178
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
*/
|
|
931
|
-
async function folderEntityFactory(_injector) {
|
|
932
|
-
const entityDef = {
|
|
933
|
-
module: RootConfig.module.name,
|
|
934
|
-
name: RootConfig.entities.folder.name,
|
|
935
|
-
title: RootConfig.entities.folder.title,
|
|
936
|
-
parentKey: 'parentId',
|
|
937
|
-
formats: {
|
|
938
|
-
individual: RootConfig.entities.folder.title,
|
|
939
|
-
plural: RootConfig.entities.folder.titlePlural,
|
|
940
|
-
searchResult: {
|
|
941
|
-
title: '{{ title }}',
|
|
942
|
-
description: RootConfig.module.title,
|
|
943
|
-
},
|
|
944
|
-
},
|
|
945
|
-
relatedEntities: [],
|
|
946
|
-
groups: [],
|
|
947
|
-
properties: [],
|
|
948
|
-
};
|
|
949
|
-
return entityDef;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
var folder_entity = /*#__PURE__*/Object.freeze({
|
|
953
|
-
__proto__: null,
|
|
954
|
-
folderEntityFactory: folderEntityFactory
|
|
955
|
-
});
|
|
956
|
-
|
|
957
|
-
class AXMFolderService extends AXMEntityCrudServiceImpl {
|
|
958
|
-
}
|
|
959
|
-
class AXMFolderServiceImpl extends AXMFolderService {
|
|
960
|
-
constructor() {
|
|
961
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.folder.name}`);
|
|
962
|
-
}
|
|
963
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
964
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl }); }
|
|
3179
|
+
class AXMDocumentReletedEntityModule {
|
|
3180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentReletedEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3181
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentReletedEntityModule }); }
|
|
3182
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentReletedEntityModule }); }
|
|
965
3183
|
}
|
|
966
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
967
|
-
type:
|
|
968
|
-
|
|
3184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentReletedEntityModule, decorators: [{
|
|
3185
|
+
type: NgModule,
|
|
3186
|
+
args: [{
|
|
3187
|
+
imports: [],
|
|
3188
|
+
exports: [],
|
|
3189
|
+
declarations: [],
|
|
3190
|
+
providers: [],
|
|
3191
|
+
}]
|
|
3192
|
+
}] });
|
|
969
3193
|
|
|
970
3194
|
// Entity Services
|
|
971
3195
|
|
|
972
3196
|
var index = /*#__PURE__*/Object.freeze({
|
|
973
3197
|
__proto__: null,
|
|
3198
|
+
AXMDocumentManagementDocumentEntityModule: AXMDocumentManagementDocumentEntityModule,
|
|
974
3199
|
AXMDocumentManagementDocumentTypeEntityModule: AXMDocumentManagementDocumentTypeEntityModule,
|
|
3200
|
+
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
|
3201
|
+
AXMDocumentManagementDocumentTypeMetaDefinitionEntityService: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
|
|
3202
|
+
AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
|
|
3203
|
+
AXMDocumentManagementDocumentTypeMetaValueEntityModule: AXMDocumentManagementDocumentTypeMetaValueEntityModule,
|
|
3204
|
+
AXMDocumentManagementDocumentTypeMetaValueEntityService: AXMDocumentManagementDocumentTypeMetaValueEntityService,
|
|
3205
|
+
AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
|
|
3206
|
+
AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
|
|
3207
|
+
AXMDocumentManagementDocumentTypeStatusDefinitionEntityService: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
|
|
3208
|
+
AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
|
|
3209
|
+
AXMDocumentReletedEntityModule: AXMDocumentReletedEntityModule,
|
|
975
3210
|
AXMDocumentService: AXMDocumentService,
|
|
976
3211
|
AXMDocumentServiceImpl: AXMDocumentServiceImpl,
|
|
977
3212
|
AXMDocumentTypeService: AXMDocumentTypeService,
|
|
978
3213
|
AXMDocumentTypeServiceImpl: AXMDocumentTypeServiceImpl,
|
|
3214
|
+
AXMFolderEntityModule: AXMFolderEntityModule,
|
|
979
3215
|
AXMFolderService: AXMFolderService,
|
|
980
3216
|
AXMFolderServiceImpl: AXMFolderServiceImpl,
|
|
981
|
-
|
|
3217
|
+
AXMReviewEntityModule: AXMReviewEntityModule,
|
|
3218
|
+
AXMReviewService: AXMReviewService,
|
|
3219
|
+
AXMReviewServiceImpl: AXMReviewServiceImpl,
|
|
3220
|
+
canTransition: canTransition,
|
|
3221
|
+
documentFactory: documentFactory,
|
|
3222
|
+
documentRelatedFactory: documentRelatedFactory,
|
|
982
3223
|
documentTypeFactory: documentTypeFactory,
|
|
983
|
-
|
|
3224
|
+
documentTypeMetaDefinitionfactory: documentTypeMetaDefinitionfactory,
|
|
3225
|
+
documentTypeMetaValueFactory: documentTypeMetaValueFactory,
|
|
3226
|
+
documentTypeStatusDefinitionFactory: documentTypeStatusDefinitionFactory,
|
|
3227
|
+
folderFactory: folderFactory,
|
|
3228
|
+
getNextStatus: getNextStatus,
|
|
3229
|
+
reviewFactory: reviewFactory
|
|
984
3230
|
});
|
|
985
3231
|
|
|
986
3232
|
class AXMImageFileTypeProvider {
|
|
@@ -1425,14 +3671,14 @@ class AXMFileTypeExtensionWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
1425
3671
|
if (extension.meta) {
|
|
1426
3672
|
for (const meta of extension.meta) {
|
|
1427
3673
|
if (!get(meta, '__node__')) {
|
|
1428
|
-
set(meta, '__node__', typeof meta.interface == 'function' ? await meta.interface() : meta.interface);
|
|
3674
|
+
set$1(meta, '__node__', typeof meta.interface == 'function' ? await meta.interface() : meta.interface);
|
|
1429
3675
|
}
|
|
1430
3676
|
}
|
|
1431
3677
|
}
|
|
1432
3678
|
if (fileType.meta) {
|
|
1433
3679
|
for (const meta of fileType.meta) {
|
|
1434
3680
|
if (!get(meta, '__node__')) {
|
|
1435
|
-
set(meta, '__node__', typeof meta.interface == 'function' ? await meta.interface() : meta.interface);
|
|
3681
|
+
set$1(meta, '__node__', typeof meta.interface == 'function' ? await meta.interface() : meta.interface);
|
|
1436
3682
|
}
|
|
1437
3683
|
}
|
|
1438
3684
|
}
|
|
@@ -1753,6 +3999,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
1753
3999
|
}]
|
|
1754
4000
|
}] });
|
|
1755
4001
|
|
|
4002
|
+
//#region ---- Imports ----
|
|
4003
|
+
//#endregion
|
|
4004
|
+
/**
|
|
4005
|
+
* File gallery popup component that displays files using the gallery widget.
|
|
4006
|
+
* This component replaces the old file-viewer-popup and uses the same
|
|
4007
|
+
* gallery widget pattern as test8.
|
|
4008
|
+
*/
|
|
4009
|
+
class AXMFileGalleryPopupComponent extends AXBasePageComponent {
|
|
4010
|
+
constructor() {
|
|
4011
|
+
super(...arguments);
|
|
4012
|
+
//#region ---- Class Properties ----
|
|
4013
|
+
/** File list items received from popup data */
|
|
4014
|
+
this.files = signal([], ...(ngDevMode ? [{ debugName: "files" }] : []));
|
|
4015
|
+
/** Starting index for the media viewer */
|
|
4016
|
+
this.startIndex = 0;
|
|
4017
|
+
/** Widget context for the gallery */
|
|
4018
|
+
this.context = signal({}, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
4019
|
+
//#endregion
|
|
4020
|
+
//#region ---- Computed Properties ----
|
|
4021
|
+
/**
|
|
4022
|
+
* Gallery widget node configuration
|
|
4023
|
+
*/
|
|
4024
|
+
this.galleryNode = computed(() => ({
|
|
4025
|
+
type: 'gallery',
|
|
4026
|
+
path: 'galleryFiles',
|
|
4027
|
+
defaultValue: this.files(),
|
|
4028
|
+
options: {
|
|
4029
|
+
thumbnail: true,
|
|
4030
|
+
header: true,
|
|
4031
|
+
fileInfo: true,
|
|
4032
|
+
fullScreenButton: true,
|
|
4033
|
+
allowUpload: false,
|
|
4034
|
+
height: '100%',
|
|
4035
|
+
},
|
|
4036
|
+
}), ...(ngDevMode ? [{ debugName: "galleryNode" }] : []));
|
|
4037
|
+
}
|
|
4038
|
+
//#endregion
|
|
4039
|
+
//#region ---- UI Handlers ----
|
|
4040
|
+
/**
|
|
4041
|
+
* Close the popup
|
|
4042
|
+
*/
|
|
4043
|
+
onClose() {
|
|
4044
|
+
this.close();
|
|
4045
|
+
}
|
|
4046
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFileGalleryPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4047
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXMFileGalleryPopupComponent, isStandalone: true, selector: "axm-file-gallery-popup", usesInheritance: true, ngImport: i0, template: `
|
|
4048
|
+
<ax-content>
|
|
4049
|
+
<axp-widgets-container class="ax-block ax-h-full" [context]="context()">
|
|
4050
|
+
<ng-container axp-widget-renderer [node]="galleryNode()" [mode]="'edit'"></ng-container>
|
|
4051
|
+
</axp-widgets-container>
|
|
4052
|
+
</ax-content>
|
|
4053
|
+
<ax-footer>
|
|
4054
|
+
<ax-suffix>
|
|
4055
|
+
<ax-button [text]="'close'" (click)="onClose()" />
|
|
4056
|
+
</ax-suffix>
|
|
4057
|
+
</ax-footer>
|
|
4058
|
+
`, isInline: true, styles: [":host{display:block;height:100%}ax-content{height:calc(100% - 60px)}\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i6.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4059
|
+
}
|
|
4060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFileGalleryPopupComponent, decorators: [{
|
|
4061
|
+
type: Component,
|
|
4062
|
+
args: [{ selector: 'axm-file-gallery-popup', template: `
|
|
4063
|
+
<ax-content>
|
|
4064
|
+
<axp-widgets-container class="ax-block ax-h-full" [context]="context()">
|
|
4065
|
+
<ng-container axp-widget-renderer [node]="galleryNode()" [mode]="'edit'"></ng-container>
|
|
4066
|
+
</axp-widgets-container>
|
|
4067
|
+
</ax-content>
|
|
4068
|
+
<ax-footer>
|
|
4069
|
+
<ax-suffix>
|
|
4070
|
+
<ax-button [text]="'close'" (click)="onClose()" />
|
|
4071
|
+
</ax-suffix>
|
|
4072
|
+
</ax-footer>
|
|
4073
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorModule, AXButtonModule, AXPWidgetCoreModule], styles: [":host{display:block;height:100%}ax-content{height:calc(100% - 60px)}\n"] }]
|
|
4074
|
+
}] });
|
|
4075
|
+
|
|
4076
|
+
var fileGalleryPopup_component = /*#__PURE__*/Object.freeze({
|
|
4077
|
+
__proto__: null,
|
|
4078
|
+
AXMFileGalleryPopupComponent: AXMFileGalleryPopupComponent
|
|
4079
|
+
});
|
|
4080
|
+
|
|
1756
4081
|
class AXPDocumentManagementService {
|
|
1757
4082
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPDocumentManagementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1758
4083
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPDocumentManagementService }); }
|
|
@@ -1844,12 +4169,13 @@ class AXMDocumentDialogService {
|
|
|
1844
4169
|
const promises = (ctx?.['files']).map(async (item, index) => {
|
|
1845
4170
|
const f = fileList[index];
|
|
1846
4171
|
const newId = await this.documentService.insertOne({
|
|
1847
|
-
|
|
4172
|
+
fileId: f,
|
|
1848
4173
|
name: f?.name,
|
|
1849
4174
|
title: f?.title ?? f?.name,
|
|
1850
4175
|
description: f?.description,
|
|
1851
4176
|
documentType,
|
|
1852
4177
|
parentId,
|
|
4178
|
+
size: f?.size || 0,
|
|
1853
4179
|
status: 'Draft',
|
|
1854
4180
|
version: (version ?? 0) + 1,
|
|
1855
4181
|
metaDataForm: ctx?.[`file-${index}`]?.['metaDataForm'],
|
|
@@ -2011,9 +4337,7 @@ class DocumentAttachmentsService {
|
|
|
2011
4337
|
parentId: options?.folderId ?? '',
|
|
2012
4338
|
version: 0,
|
|
2013
4339
|
};
|
|
2014
|
-
const title = await this.translateService.translateAsync('@document-management:dialogs.attach-file.title', {
|
|
2015
|
-
params: { title: fileTypeEntity.title },
|
|
2016
|
-
});
|
|
4340
|
+
const title = await this.translateService.translateAsync('@document-management:dialogs.attach-file.title', { params: { title: fileTypeEntity.title } });
|
|
2017
4341
|
const result = await this.documentDialog.openAttachmentDialog(title, popupData);
|
|
2018
4342
|
return this.handlePopupResult(result);
|
|
2019
4343
|
}
|
|
@@ -2022,10 +4346,10 @@ class DocumentAttachmentsService {
|
|
|
2022
4346
|
if (!file) {
|
|
2023
4347
|
throw new Error('File not found');
|
|
2024
4348
|
}
|
|
2025
|
-
|
|
4349
|
+
console.log(file);
|
|
2026
4350
|
const popupData = {
|
|
2027
|
-
documentType:
|
|
2028
|
-
files: [file.
|
|
4351
|
+
documentType: file.documentType,
|
|
4352
|
+
files: [file.fileId],
|
|
2029
4353
|
parentId: options?.folderId ?? '',
|
|
2030
4354
|
metaData: file.metaDataForm,
|
|
2031
4355
|
documentId: fileId,
|
|
@@ -2043,16 +4367,15 @@ class DocumentAttachmentsService {
|
|
|
2043
4367
|
if (!document) {
|
|
2044
4368
|
throw new Error('File not found');
|
|
2045
4369
|
}
|
|
2046
|
-
const documentTypeEntity = await this.resolveFileType(document.documentType);
|
|
2047
4370
|
// Choose a single new file based on document type constraints
|
|
2048
|
-
const files = await this.chooseFiles(
|
|
4371
|
+
const files = await this.chooseFiles(document.documentType, false);
|
|
2049
4372
|
if (!files || files.length === 0) {
|
|
2050
4373
|
return false;
|
|
2051
4374
|
}
|
|
2052
4375
|
const mapped = this.mapFilesToFileListItems(files);
|
|
2053
4376
|
// Open a lightweight dialog to edit metadata (no auto-save); then apply update with new file
|
|
2054
4377
|
const result = await this.documentDialog.openAttachmentDialogWithoutSave('@document-management:dialogs.manage-version.upload-new-version', {
|
|
2055
|
-
documentType:
|
|
4378
|
+
documentType: document.documentType,
|
|
2056
4379
|
files: mapped,
|
|
2057
4380
|
parentId: document.parentId,
|
|
2058
4381
|
metaData: document.metaDataForm,
|
|
@@ -2065,7 +4388,8 @@ class DocumentAttachmentsService {
|
|
|
2065
4388
|
const metaDataForm = document.metaDataForm;
|
|
2066
4389
|
const newName = files[0]?.name ?? document.name;
|
|
2067
4390
|
await this.documentService.updateOne(fileId, {
|
|
2068
|
-
|
|
4391
|
+
fileId: mapped[0],
|
|
4392
|
+
size: files[0]?.size ?? document.size,
|
|
2069
4393
|
version: (document.version ?? 0) + 1,
|
|
2070
4394
|
metaDataForm,
|
|
2071
4395
|
name: newName,
|
|
@@ -2079,16 +4403,19 @@ class DocumentAttachmentsService {
|
|
|
2079
4403
|
}
|
|
2080
4404
|
}
|
|
2081
4405
|
async resolveFileType(fileType) {
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
4406
|
+
if (typeof fileType === 'string' || typeof fileType === 'number') {
|
|
4407
|
+
const fileTypeId = fileType;
|
|
4408
|
+
const fileTypeEntity = await this.documentTypeService.getOne(fileTypeId);
|
|
4409
|
+
if (!fileTypeEntity) {
|
|
4410
|
+
throw new Error('File type not found');
|
|
4411
|
+
}
|
|
4412
|
+
return fileTypeEntity;
|
|
2086
4413
|
}
|
|
2087
|
-
return
|
|
4414
|
+
return fileType;
|
|
2088
4415
|
}
|
|
2089
4416
|
async chooseFiles(fileTypeEntity, multiple) {
|
|
2090
|
-
|
|
2091
|
-
const acceptTypes = selectedItems.map((item) => `.${item.name.split('.')[1]}`).join(',');
|
|
4417
|
+
console.log(fileTypeEntity.type.selectedItems);
|
|
4418
|
+
const acceptTypes = fileTypeEntity.type.selectedItems.map((item) => `.${item.name.split('.')[1]}`).join(',');
|
|
2092
4419
|
return await this.fileService.choose({
|
|
2093
4420
|
multiple: multiple ?? false,
|
|
2094
4421
|
accept: acceptTypes,
|
|
@@ -2125,25 +4452,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2125
4452
|
|
|
2126
4453
|
//#region ---- Imports ----
|
|
2127
4454
|
//#endregion
|
|
2128
|
-
//#region ---- Contract (Abstract Service) ----
|
|
2129
|
-
/**
|
|
2130
|
-
* Contract for document drive service. Inject this token; implementation is provided by the module.
|
|
2131
|
-
*/
|
|
2132
|
-
class AXMDocumentManagerService {
|
|
2133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2134
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService }); }
|
|
2135
|
-
}
|
|
2136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService, decorators: [{
|
|
2137
|
-
type: Injectable
|
|
2138
|
-
}] });
|
|
2139
|
-
//#endregion
|
|
2140
4455
|
//#region ---- Service Implementation ----
|
|
2141
4456
|
/**
|
|
2142
|
-
*
|
|
4457
|
+
* Service for handling document drive operations
|
|
2143
4458
|
*/
|
|
2144
|
-
class
|
|
4459
|
+
class AXMDocumentManagerService {
|
|
2145
4460
|
constructor() {
|
|
2146
|
-
super(...arguments);
|
|
2147
4461
|
//#region ---- Services & Dependencies ----
|
|
2148
4462
|
this.folderService = inject(AXMFolderService);
|
|
2149
4463
|
this.sessionService = inject(AXPSessionService);
|
|
@@ -2157,6 +4471,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2157
4471
|
this.workflow = inject(AXPWorkflowService);
|
|
2158
4472
|
this.translate = inject(AXTranslationService);
|
|
2159
4473
|
this.layoutBuilder = inject(AXPLayoutBuilderService);
|
|
4474
|
+
this.reviewService = inject(AXMReviewService);
|
|
2160
4475
|
this.attachmentsService = inject(DocumentAttachmentsService);
|
|
2161
4476
|
this.filterMiddlewareService = inject(AXPFilterOperatorMiddlewareService);
|
|
2162
4477
|
this.hooks = inject(AXPHookService, { optional: true });
|
|
@@ -2172,13 +4487,13 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2172
4487
|
this.mapFolderDtoToFolderNode = (folder) => {
|
|
2173
4488
|
return {
|
|
2174
4489
|
id: folder.id,
|
|
2175
|
-
name: folder.
|
|
4490
|
+
name: folder.name,
|
|
2176
4491
|
type: 'folder',
|
|
2177
4492
|
parentId: folder.parentId || null,
|
|
2178
4493
|
modifiedAt: folder?.updated?.at,
|
|
2179
4494
|
createdAt: folder?.created?.at,
|
|
2180
4495
|
description: folder.description,
|
|
2181
|
-
childrenCount: folder.
|
|
4496
|
+
childrenCount: folder.nodeCount,
|
|
2182
4497
|
size: folder.size,
|
|
2183
4498
|
documentTypes: folder.documentTypes || [],
|
|
2184
4499
|
storageType: 'physical',
|
|
@@ -2193,14 +4508,98 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2193
4508
|
//#endregion
|
|
2194
4509
|
//#region ---- Scope Management Methods ----
|
|
2195
4510
|
/**
|
|
2196
|
-
* Creates a scoped drive service for the specified platform scope
|
|
2197
|
-
|
|
4511
|
+
* Creates a scoped drive service for the specified platform scope
|
|
4512
|
+
*/
|
|
4513
|
+
scope(scope, options) {
|
|
4514
|
+
const cacheKey = this.getScopeCacheKey(scope, options);
|
|
4515
|
+
if (!this.scopedDriveCache.has(cacheKey)) {
|
|
4516
|
+
this.scopedDriveCache.set(cacheKey, new ScopedDriveService(this, scope, options));
|
|
4517
|
+
}
|
|
4518
|
+
return this.scopedDriveCache.get(cacheKey);
|
|
4519
|
+
}
|
|
4520
|
+
/**
|
|
4521
|
+
* Generates a cache key for the scoped drive service
|
|
4522
|
+
*/
|
|
4523
|
+
getScopeCacheKey(scope, options) {
|
|
4524
|
+
return scope;
|
|
4525
|
+
}
|
|
4526
|
+
//#endregion
|
|
4527
|
+
//#region ---- Private Helper Methods ----
|
|
4528
|
+
/**
|
|
4529
|
+
* Gets the platform root folder (top-level folder)
|
|
4530
|
+
*/
|
|
4531
|
+
async getPlatformRootFolder() {
|
|
4532
|
+
const result = await this.folderService.query({
|
|
4533
|
+
skip: 0,
|
|
4534
|
+
take: 1,
|
|
4535
|
+
filter: {
|
|
4536
|
+
operator: null,
|
|
4537
|
+
logic: 'and',
|
|
4538
|
+
filters: [
|
|
4539
|
+
{ field: 'parentId', operator: { type: 'isNull' } },
|
|
4540
|
+
{ field: 'tenantId', operator: { type: 'isNull' } },
|
|
4541
|
+
{ field: 'userId', operator: { type: 'isNull' } },
|
|
4542
|
+
],
|
|
4543
|
+
},
|
|
4544
|
+
});
|
|
4545
|
+
if (result.items.length === 0) {
|
|
4546
|
+
throw new Error('Platform root folder not found');
|
|
4547
|
+
}
|
|
4548
|
+
return result.items[0];
|
|
4549
|
+
}
|
|
4550
|
+
/**
|
|
4551
|
+
* Gets the tenant root folder
|
|
2198
4552
|
*/
|
|
2199
|
-
|
|
2200
|
-
if (!
|
|
2201
|
-
|
|
4553
|
+
async getTenantRootFolder(rootFolder, tenantId) {
|
|
4554
|
+
if (!tenantId) {
|
|
4555
|
+
throw new Error('Tenant ID is required');
|
|
2202
4556
|
}
|
|
2203
|
-
|
|
4557
|
+
const result = await this.folderService.query({
|
|
4558
|
+
skip: 0,
|
|
4559
|
+
take: 1,
|
|
4560
|
+
filter: {
|
|
4561
|
+
operator: null,
|
|
4562
|
+
logic: 'and',
|
|
4563
|
+
filters: this.filterMiddlewareService.transformFilters([
|
|
4564
|
+
{
|
|
4565
|
+
field: 'parentId',
|
|
4566
|
+
operator: { type: 'equal' },
|
|
4567
|
+
value: rootFolder.folders?.find((f) => f.name === 'Tenants')?.id,
|
|
4568
|
+
},
|
|
4569
|
+
{ field: 'tenantId', operator: { type: 'equal' }, value: tenantId },
|
|
4570
|
+
{ field: 'userId', operator: { type: 'isNull' } },
|
|
4571
|
+
]),
|
|
4572
|
+
},
|
|
4573
|
+
});
|
|
4574
|
+
if (result.items.length === 0) {
|
|
4575
|
+
throw new Error('Tenant root folder not found');
|
|
4576
|
+
}
|
|
4577
|
+
return result.items[0];
|
|
4578
|
+
}
|
|
4579
|
+
/**
|
|
4580
|
+
* Gets the user root folder
|
|
4581
|
+
*/
|
|
4582
|
+
async getUserRootFolder(tenantFolderId, tenantId, userId) {
|
|
4583
|
+
if (!tenantId || !userId) {
|
|
4584
|
+
throw new Error('Both Tenant ID and User ID are required');
|
|
4585
|
+
}
|
|
4586
|
+
const result = await this.folderService.query({
|
|
4587
|
+
skip: 0,
|
|
4588
|
+
take: 1,
|
|
4589
|
+
filter: {
|
|
4590
|
+
operator: null,
|
|
4591
|
+
logic: 'and',
|
|
4592
|
+
filters: this.filterMiddlewareService.transformFilters([
|
|
4593
|
+
{ field: 'parentId', operator: { type: 'equal' }, value: tenantFolderId },
|
|
4594
|
+
{ field: 'tenantId', operator: { type: 'equal' }, value: tenantId },
|
|
4595
|
+
{ field: 'userId', operator: { type: 'equal' }, value: userId },
|
|
4596
|
+
]),
|
|
4597
|
+
},
|
|
4598
|
+
});
|
|
4599
|
+
if (result.items.length === 0) {
|
|
4600
|
+
throw new Error('User root folder not found');
|
|
4601
|
+
}
|
|
4602
|
+
return result.items[0];
|
|
2204
4603
|
}
|
|
2205
4604
|
/**
|
|
2206
4605
|
* Maps file entity to document explorer node
|
|
@@ -2213,8 +4612,8 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2213
4612
|
parentId: file.parentId,
|
|
2214
4613
|
modifiedAt: file?.updated?.at,
|
|
2215
4614
|
createdAt: file?.created?.at,
|
|
2216
|
-
size: file.
|
|
2217
|
-
fileId: file.
|
|
4615
|
+
size: file.size,
|
|
4616
|
+
fileId: file.fileId,
|
|
2218
4617
|
storageType: 'physical',
|
|
2219
4618
|
meta: file.metaDataForm ? Object.values(file.metaDataForm) : undefined,
|
|
2220
4619
|
documentTypes: file.documentType ? [file.documentType] : [],
|
|
@@ -2224,46 +4623,33 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2224
4623
|
* Maps document to media viewer data
|
|
2225
4624
|
*/
|
|
2226
4625
|
async mapDocumentToMediaViewerData(doc, fileInfosMap) {
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
? undefined
|
|
2230
|
-
: typeof f === 'string'
|
|
2231
|
-
? f
|
|
2232
|
-
: f.source?.kind === 'fileId' &&
|
|
2233
|
-
typeof f.source?.value === 'string'
|
|
2234
|
-
? f.source.value
|
|
2235
|
-
: typeof f.id === 'string'
|
|
2236
|
-
? f.id
|
|
2237
|
-
: undefined;
|
|
2238
|
-
if (fileIdStr) {
|
|
4626
|
+
if (doc.fileId?.source?.kind == 'fileId') {
|
|
4627
|
+
const fileId = doc.fileId.source.value;
|
|
2239
4628
|
let fileInfo;
|
|
2240
4629
|
if (fileInfosMap) {
|
|
2241
|
-
|
|
4630
|
+
// Use pre-fetched data
|
|
4631
|
+
fileInfo = fileInfosMap.get(fileId);
|
|
2242
4632
|
}
|
|
2243
4633
|
else {
|
|
2244
|
-
|
|
4634
|
+
// Fallback to individual fetch (for backward compatibility)
|
|
4635
|
+
fileInfo = await this.fileService.getInfo(fileId);
|
|
2245
4636
|
}
|
|
2246
|
-
const resolvedSize = fileInfo?.size ?? doc?.fileId?.size ?? 0;
|
|
2247
4637
|
return {
|
|
2248
4638
|
id: doc.id ?? '',
|
|
2249
4639
|
name: doc.name,
|
|
2250
4640
|
type: doc.name.endsWith('.pdf') ? 'pdf' : 'image',
|
|
2251
4641
|
url: fileInfo?.url ?? '',
|
|
2252
|
-
size:
|
|
4642
|
+
size: doc.size.toString(),
|
|
2253
4643
|
thumbnailUrl: fileInfo?.url ?? '',
|
|
2254
4644
|
};
|
|
2255
4645
|
}
|
|
2256
|
-
const fallbackUrl = doc?.fileId?.source?.kind === 'url' && typeof doc.fileId.source.value === 'string'
|
|
2257
|
-
? doc.fileId.source.value
|
|
2258
|
-
: '';
|
|
2259
|
-
const fallbackSize = doc?.fileId?.size ?? 0;
|
|
2260
4646
|
return {
|
|
2261
4647
|
id: doc.id ?? '',
|
|
2262
4648
|
name: doc.name,
|
|
2263
4649
|
type: doc.meta?.['type'] ?? 'image',
|
|
2264
|
-
url:
|
|
2265
|
-
size:
|
|
2266
|
-
thumbnailUrl:
|
|
4650
|
+
url: doc.fileId ?? '',
|
|
4651
|
+
size: doc.size.toString(),
|
|
4652
|
+
thumbnailUrl: doc.fileId ?? '',
|
|
2267
4653
|
};
|
|
2268
4654
|
}
|
|
2269
4655
|
//#endregion
|
|
@@ -2301,8 +4687,9 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2301
4687
|
return `${nameWithoutExt} copy${extension}`;
|
|
2302
4688
|
}
|
|
2303
4689
|
/**
|
|
2304
|
-
* Prepares file for copy operation by downloading from storage and converting to blob source
|
|
2305
|
-
*
|
|
4690
|
+
* Prepares file for copy operation by downloading from storage and converting to blob source
|
|
4691
|
+
* This method takes an existing AXPFileListItem (or fileId string) and prepares it for re-upload
|
|
4692
|
+
* by downloading the file from storage and changing source to blob with uploading status
|
|
2306
4693
|
*/
|
|
2307
4694
|
async prepareFileForCopy(fileId, fileName) {
|
|
2308
4695
|
try {
|
|
@@ -2322,6 +4709,9 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2322
4709
|
fileIdString = fileId.id;
|
|
2323
4710
|
existingFileItem = fileId;
|
|
2324
4711
|
}
|
|
4712
|
+
else if (fileId.fileId && typeof fileId.fileId === 'string') {
|
|
4713
|
+
fileIdString = fileId.fileId;
|
|
4714
|
+
}
|
|
2325
4715
|
}
|
|
2326
4716
|
if (!fileIdString) {
|
|
2327
4717
|
console.warn('Could not extract fileId from:', fileId);
|
|
@@ -2370,20 +4760,45 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2370
4760
|
//#endregion
|
|
2371
4761
|
//#region ---- Root and Folder Operations ----
|
|
2372
4762
|
/**
|
|
2373
|
-
* Gets the root folder
|
|
2374
|
-
* Backend returns only the root folder; path is built here for the explorer.
|
|
4763
|
+
* Gets the root folder based on the specified scope
|
|
2375
4764
|
*/
|
|
2376
|
-
async getRoot(scope) {
|
|
2377
|
-
const rootFolder = await this.
|
|
2378
|
-
|
|
2379
|
-
|
|
4765
|
+
async getRoot(scope, options) {
|
|
4766
|
+
const rootFolder = await this.getPlatformRootFolder();
|
|
4767
|
+
let result;
|
|
4768
|
+
let path = [];
|
|
4769
|
+
switch (scope) {
|
|
4770
|
+
case AXPPlatformScope.Platform:
|
|
4771
|
+
result = this.mapFolderDtoToFolderNode(rootFolder);
|
|
4772
|
+
path = await this.buildPath(result);
|
|
4773
|
+
break;
|
|
4774
|
+
case AXPPlatformScope.Tenant: {
|
|
4775
|
+
if (!options?.tenantId) {
|
|
4776
|
+
throw new Error('Tenant ID is required for tenant scope');
|
|
4777
|
+
}
|
|
4778
|
+
const tenantRoot = await this.getTenantRootFolder(rootFolder, options.tenantId);
|
|
4779
|
+
result = this.mapFolderDtoToFolderNode(tenantRoot);
|
|
4780
|
+
path = await this.buildPath(result, tenantRoot.id);
|
|
4781
|
+
break;
|
|
4782
|
+
}
|
|
4783
|
+
case AXPPlatformScope.User: {
|
|
4784
|
+
if (!options?.tenantId || !options?.userId) {
|
|
4785
|
+
throw new Error('Both Tenant ID and User ID are required for user scope');
|
|
4786
|
+
}
|
|
4787
|
+
const tenantFolder = await this.getTenantRootFolder(rootFolder, options.tenantId);
|
|
4788
|
+
const userRoot = await this.getUserRootFolder(tenantFolder.folders?.find((f) => f.name === 'Users')?.id, options.tenantId, options.userId);
|
|
4789
|
+
result = this.mapFolderDtoToFolderNode(userRoot);
|
|
4790
|
+
path = await this.buildPath(result, userRoot.id);
|
|
4791
|
+
break;
|
|
4792
|
+
}
|
|
4793
|
+
default:
|
|
4794
|
+
throw new Error(`Invalid scope: ${scope}`);
|
|
4795
|
+
}
|
|
2380
4796
|
return { path, result };
|
|
2381
4797
|
}
|
|
2382
4798
|
/**
|
|
2383
|
-
* Gets a specific folder by ID
|
|
2384
|
-
* Root for path is resolved from current session (security: only scope is used).
|
|
4799
|
+
* Gets a specific folder by ID
|
|
2385
4800
|
*/
|
|
2386
|
-
async getFolder(scope, folderId) {
|
|
4801
|
+
async getFolder(scope, folderId, options) {
|
|
2387
4802
|
if (!folderId) {
|
|
2388
4803
|
throw new Error('Folder ID is required');
|
|
2389
4804
|
}
|
|
@@ -2392,7 +4807,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2392
4807
|
throw new Error('Folder not found');
|
|
2393
4808
|
}
|
|
2394
4809
|
const result = this.mapFolderDtoToFolderNode(folder);
|
|
2395
|
-
const path = await this.buildPath(result, (await this.getRoot(scope)).result.id);
|
|
4810
|
+
const path = await this.buildPath(result, (await this.getRoot(scope, options)).result.id);
|
|
2396
4811
|
return { path, result };
|
|
2397
4812
|
}
|
|
2398
4813
|
/**
|
|
@@ -2405,14 +4820,12 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2405
4820
|
const userRef = { id: userId, type: 'user' };
|
|
2406
4821
|
const folderToCreate = {
|
|
2407
4822
|
...data,
|
|
2408
|
-
title: data.title,
|
|
2409
|
-
childrenCount: 0,
|
|
2410
4823
|
created: { at: now, user: userRef },
|
|
2411
4824
|
updated: { at: now, user: userRef },
|
|
2412
4825
|
isSystem: false,
|
|
2413
4826
|
isHidden: false,
|
|
2414
4827
|
isDeleted: false,
|
|
2415
|
-
size:
|
|
4828
|
+
size: 0,
|
|
2416
4829
|
};
|
|
2417
4830
|
const createdFolder = (await this.folderService.insertOne(folderToCreate));
|
|
2418
4831
|
let folder;
|
|
@@ -2636,15 +5049,12 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2636
5049
|
// Extract needed properties without id
|
|
2637
5050
|
const { id, ...fileDataWithoutId } = originalFile;
|
|
2638
5051
|
// Prepare file for copy by downloading from storage and converting to blob source
|
|
2639
|
-
const fileListItem = await this.prepareFileForCopy(originalFile.
|
|
2640
|
-
if (!fileListItem) {
|
|
2641
|
-
throw new Error('Could not prepare file for copy');
|
|
2642
|
-
}
|
|
5052
|
+
const fileListItem = await this.prepareFileForCopy(originalFile.fileId, newName);
|
|
2643
5053
|
const fileData = {
|
|
2644
5054
|
...fileDataWithoutId,
|
|
2645
5055
|
name: newName,
|
|
2646
5056
|
title: newName,
|
|
2647
|
-
|
|
5057
|
+
fileId: fileListItem,
|
|
2648
5058
|
};
|
|
2649
5059
|
// Create the new file
|
|
2650
5060
|
return await this.createFile(fileData);
|
|
@@ -2660,7 +5070,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2660
5070
|
const { id, ...folderDataWithoutId } = originalFolder;
|
|
2661
5071
|
const folderData = {
|
|
2662
5072
|
...folderDataWithoutId,
|
|
2663
|
-
|
|
5073
|
+
name: newName,
|
|
2664
5074
|
};
|
|
2665
5075
|
// Create the new folder
|
|
2666
5076
|
return await this.createFolder(folderData);
|
|
@@ -2673,7 +5083,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2673
5083
|
* Moves a node to another location
|
|
2674
5084
|
*/
|
|
2675
5085
|
async moveTo(options) {
|
|
2676
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
|
5086
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs')).AXMDocumentDriveChooseComponent;
|
|
2677
5087
|
const popup = await this.popupService.open(comp, {
|
|
2678
5088
|
title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
|
|
2679
5089
|
data: {
|
|
@@ -2706,7 +5116,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2706
5116
|
* Copies a node to another location
|
|
2707
5117
|
*/
|
|
2708
5118
|
async copyTo(options) {
|
|
2709
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
|
5119
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs')).AXMDocumentDriveChooseComponent;
|
|
2710
5120
|
const popup = await this.popupService.open(comp, {
|
|
2711
5121
|
title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
|
|
2712
5122
|
data: {
|
|
@@ -2721,7 +5131,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2721
5131
|
if (selectedFolder) {
|
|
2722
5132
|
if (options.node.type === 'folder') {
|
|
2723
5133
|
await this.createFolder({
|
|
2724
|
-
|
|
5134
|
+
name: options.node.name,
|
|
2725
5135
|
parentId: selectedFolder.id,
|
|
2726
5136
|
color: '#ffffff',
|
|
2727
5137
|
size: options.node.size,
|
|
@@ -2735,15 +5145,13 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2735
5145
|
throw new Error(`File with ID ${options.node.id} not found`);
|
|
2736
5146
|
}
|
|
2737
5147
|
// Prepare file for copy by downloading from storage and converting to blob source
|
|
2738
|
-
const fileListItem = await this.prepareFileForCopy(originalFile.
|
|
2739
|
-
if (!fileListItem) {
|
|
2740
|
-
throw new Error('Could not prepare file for copy');
|
|
2741
|
-
}
|
|
5148
|
+
const fileListItem = await this.prepareFileForCopy(originalFile.fileId, options.node.name);
|
|
2742
5149
|
await this.createFile({
|
|
2743
5150
|
title: options.node.name,
|
|
2744
5151
|
name: options.node.name,
|
|
2745
5152
|
parentId: selectedFolder.id,
|
|
2746
|
-
|
|
5153
|
+
fileId: fileListItem,
|
|
5154
|
+
size: originalFile.size ?? options.node.size ?? 0,
|
|
2747
5155
|
documentType: options.node.documentTypes[0],
|
|
2748
5156
|
status: 'Draft',
|
|
2749
5157
|
});
|
|
@@ -2761,29 +5169,27 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2761
5169
|
//#endregion
|
|
2762
5170
|
//#region ---- Search Operations ----
|
|
2763
5171
|
/**
|
|
2764
|
-
* Searches for folders by term within a scope
|
|
2765
|
-
* Root is resolved from current session when folderId is not provided.
|
|
5172
|
+
* Searches for folders by term within a scope
|
|
2766
5173
|
*/
|
|
2767
5174
|
async searchFolders(searchTerm, scope, options) {
|
|
2768
5175
|
const { result: rootNode } = options?.folderId
|
|
2769
|
-
? await this.getFolder(scope, options.folderId)
|
|
2770
|
-
: await this.getRoot(scope);
|
|
5176
|
+
? await this.getFolder(scope, options.folderId, options)
|
|
5177
|
+
: await this.getRoot(scope, options);
|
|
2771
5178
|
const folders = await this.documentManagementService.searchFolders(searchTerm, rootNode.id);
|
|
2772
5179
|
return folders.map((folder) => this.mapFolderDtoToFolderNode(folder));
|
|
2773
5180
|
}
|
|
2774
5181
|
/**
|
|
2775
|
-
* Searches for files by term within a scope
|
|
2776
|
-
* Root is resolved from current session when folderId is not provided.
|
|
5182
|
+
* Searches for files by term within a scope
|
|
2777
5183
|
*/
|
|
2778
5184
|
async searchFiles(searchTerm, scope, options) {
|
|
2779
5185
|
const { result: rootNode } = options?.folderId
|
|
2780
|
-
? await this.getFolder(scope, options.folderId)
|
|
2781
|
-
: await this.getRoot(scope);
|
|
5186
|
+
? await this.getFolder(scope, options.folderId, options)
|
|
5187
|
+
: await this.getRoot(scope, options);
|
|
2782
5188
|
const files = await this.documentManagementService.searchFiles(searchTerm, rootNode.id);
|
|
2783
5189
|
return files.map((file) => this.mapFileToNode(file));
|
|
2784
5190
|
}
|
|
2785
5191
|
/**
|
|
2786
|
-
* Searches for both files and folders by term within a scope
|
|
5192
|
+
* Searches for both files and folders by term within a scope
|
|
2787
5193
|
*/
|
|
2788
5194
|
async searchNodes(searchTerm, scope, options) {
|
|
2789
5195
|
const [folders, files] = await Promise.all([
|
|
@@ -2991,7 +5397,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
2991
5397
|
const selected = Array.isArray(form.documentTypes) ? form.documentTypes : [];
|
|
2992
5398
|
const selectedTypes = selected.map((v) => typeof v === 'object' ? v : items.find((it) => it.name === v) || { name: v, title: v, id: v });
|
|
2993
5399
|
await this.updateFolder(node.id, {
|
|
2994
|
-
|
|
5400
|
+
name: form.name,
|
|
2995
5401
|
description: form.description,
|
|
2996
5402
|
inherit: form.inherit,
|
|
2997
5403
|
documentTypes: selectedTypes,
|
|
@@ -3015,12 +5421,12 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
3015
5421
|
.dialog((dialog) => {
|
|
3016
5422
|
dialog
|
|
3017
5423
|
.setTitle('@document-management:actions.create-folder')
|
|
3018
|
-
.setContext({
|
|
5424
|
+
.setContext({ name: '', description: '', inherit: 'None', documentTypes: [], color: '#FFFFFF' })
|
|
3019
5425
|
.content((flex) => {
|
|
3020
5426
|
flex
|
|
3021
5427
|
.setDirection('column')
|
|
3022
|
-
.formField('@general:terms.common.
|
|
3023
|
-
field.path('
|
|
5428
|
+
.formField('@general:terms.common.name', (field) => {
|
|
5429
|
+
field.path('name');
|
|
3024
5430
|
field.textBox({ validations: [{ rule: 'required' }] });
|
|
3025
5431
|
})
|
|
3026
5432
|
.formField('@general:terms.common.description', (field) => {
|
|
@@ -3064,22 +5470,16 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
3064
5470
|
return null;
|
|
3065
5471
|
}
|
|
3066
5472
|
const form = context;
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
return folder;
|
|
3078
|
-
}
|
|
3079
|
-
catch (err) {
|
|
3080
|
-
console.error('[showCreateFolderDialog] createFolder failed', err);
|
|
3081
|
-
throw err;
|
|
3082
|
-
}
|
|
5473
|
+
const folder = await this.createFolder({
|
|
5474
|
+
name: form.name,
|
|
5475
|
+
color: form.color,
|
|
5476
|
+
parentId,
|
|
5477
|
+
description: form.description,
|
|
5478
|
+
documentTypes: form.documentTypes,
|
|
5479
|
+
size: 0,
|
|
5480
|
+
inherit: form.inherit,
|
|
5481
|
+
});
|
|
5482
|
+
return folder;
|
|
3083
5483
|
});
|
|
3084
5484
|
})
|
|
3085
5485
|
.show();
|
|
@@ -3120,7 +5520,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
3120
5520
|
dialogRef.setLoading(true);
|
|
3121
5521
|
try {
|
|
3122
5522
|
if (node.type === 'folder') {
|
|
3123
|
-
return await this.updateFolder(node.id, {
|
|
5523
|
+
return await this.updateFolder(node.id, { name: formData.name });
|
|
3124
5524
|
}
|
|
3125
5525
|
await this.updateFileName(node, formData.name);
|
|
3126
5526
|
return await this.updateFile(node.id, { name: formData.name });
|
|
@@ -3149,7 +5549,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
3149
5549
|
* Shows choose file dialog
|
|
3150
5550
|
*/
|
|
3151
5551
|
async showChooseFileDialog(scope) {
|
|
3152
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
|
5552
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs')).AXMDocumentDriveChooseComponent;
|
|
3153
5553
|
const result = await this.popupService.open(comp, {
|
|
3154
5554
|
title: await this.translate.translateAsync('@document-management:actions.choose-from-drive'),
|
|
3155
5555
|
data: {
|
|
@@ -3171,7 +5571,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
3171
5571
|
if (!item.name || item.type !== 'file')
|
|
3172
5572
|
return false;
|
|
3173
5573
|
const ext = item.name.split('.').pop()?.toLowerCase();
|
|
3174
|
-
return ext &&
|
|
5574
|
+
return ext && AXMDocumentManagerService.GALLERY_EXTENSIONS.includes(ext);
|
|
3175
5575
|
});
|
|
3176
5576
|
}
|
|
3177
5577
|
/**
|
|
@@ -3179,7 +5579,7 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
3179
5579
|
*/
|
|
3180
5580
|
async showFileViewerPopup(node, options) {
|
|
3181
5581
|
const isVirtualFolder = node.parentId === 'virtual';
|
|
3182
|
-
const parentFolderName = isVirtualFolder ? 'Virtual' : (await this.folderService.getOne(node.parentId)).
|
|
5582
|
+
const parentFolderName = isVirtualFolder ? 'Virtual' : (await this.folderService.getOne(node.parentId)).name;
|
|
3183
5583
|
const documents = isVirtualFolder
|
|
3184
5584
|
? (options?.folderVirtualFiles ?? [])
|
|
3185
5585
|
: ((await this.folderService.getOne(node.parentId)).documents ?? []);
|
|
@@ -3188,19 +5588,16 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
3188
5588
|
if (!item.name)
|
|
3189
5589
|
return false;
|
|
3190
5590
|
const ext = item.name.split('.').pop()?.toLowerCase();
|
|
3191
|
-
return ext &&
|
|
5591
|
+
return ext && AXMDocumentManagerService.GALLERY_EXTENSIONS.includes(ext);
|
|
3192
5592
|
});
|
|
3193
5593
|
// Convert documents to AXPFileListItem[] format for the gallery widget
|
|
3194
|
-
const fileListItems = filteredDocuments.map((doc) => {
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
source: fileInfo?.source,
|
|
3202
|
-
};
|
|
3203
|
-
});
|
|
5594
|
+
const fileListItems = filteredDocuments.map((doc) => ({
|
|
5595
|
+
id: doc.id ?? '',
|
|
5596
|
+
name: doc.name,
|
|
5597
|
+
size: doc.size,
|
|
5598
|
+
status: 'attached',
|
|
5599
|
+
source: doc.fileId?.source,
|
|
5600
|
+
}));
|
|
3204
5601
|
// Calculate start index
|
|
3205
5602
|
const startIndex = isVirtualFolder
|
|
3206
5603
|
? (options?.folderVirtualFiles?.findIndex((f) => f.id === node.id) ?? 0)
|
|
@@ -3228,43 +5625,71 @@ class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
|
3228
5625
|
return node;
|
|
3229
5626
|
}
|
|
3230
5627
|
}
|
|
3231
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3232
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5629
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService, providedIn: 'root' }); }
|
|
3233
5630
|
}
|
|
3234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3235
|
-
type: Injectable
|
|
5631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService, decorators: [{
|
|
5632
|
+
type: Injectable,
|
|
5633
|
+
args: [{
|
|
5634
|
+
providedIn: 'root',
|
|
5635
|
+
}]
|
|
3236
5636
|
}] });
|
|
3237
5637
|
//#endregion
|
|
3238
5638
|
//#region ---- Scoped Drive Service ----
|
|
3239
5639
|
/**
|
|
3240
|
-
* Scoped drive service for specific platform scopes
|
|
3241
|
-
* Backend resolves tenant/user from request context (client sends only scope).
|
|
5640
|
+
* Scoped drive service for specific platform scopes
|
|
3242
5641
|
*/
|
|
3243
5642
|
class ScopedDriveService {
|
|
3244
5643
|
//#region ---- Constructor ----
|
|
3245
|
-
constructor(parent, scope) {
|
|
5644
|
+
constructor(parent, scope, options) {
|
|
3246
5645
|
this.parent = parent;
|
|
3247
5646
|
this.scope = scope;
|
|
5647
|
+
this.options = options;
|
|
5648
|
+
this.validateScopeOptions();
|
|
5649
|
+
}
|
|
5650
|
+
//#endregion
|
|
5651
|
+
//#region ---- Validation Methods ----
|
|
5652
|
+
/**
|
|
5653
|
+
* Validates the scope options are appropriate for the selected scope
|
|
5654
|
+
*/
|
|
5655
|
+
validateScopeOptions() {
|
|
5656
|
+
switch (this.scope) {
|
|
5657
|
+
case AXPPlatformScope.Tenant:
|
|
5658
|
+
if (!this.options?.tenantId) {
|
|
5659
|
+
throw new Error('Tenant ID is required for tenant scope');
|
|
5660
|
+
}
|
|
5661
|
+
break;
|
|
5662
|
+
case AXPPlatformScope.User:
|
|
5663
|
+
if (!this.options?.tenantId || !this.options?.userId) {
|
|
5664
|
+
throw new Error('Both Tenant ID and User ID are required for user scope');
|
|
5665
|
+
}
|
|
5666
|
+
break;
|
|
5667
|
+
}
|
|
3248
5668
|
}
|
|
3249
5669
|
//#endregion
|
|
3250
5670
|
//#region ---- Scoped Operations ----
|
|
3251
5671
|
/**
|
|
3252
|
-
* Gets root folder for this scope
|
|
5672
|
+
* Gets root folder for this scope
|
|
3253
5673
|
*/
|
|
3254
5674
|
async getRoot() {
|
|
3255
|
-
return this.parent.getRoot(this.scope);
|
|
5675
|
+
return this.parent.getRoot(this.scope, this.options);
|
|
3256
5676
|
}
|
|
3257
5677
|
/**
|
|
3258
|
-
* Gets folder for this scope
|
|
5678
|
+
* Gets folder for this scope
|
|
3259
5679
|
*/
|
|
3260
5680
|
async getFolder(folderId) {
|
|
3261
|
-
return this.parent.getFolder(this.scope, folderId);
|
|
5681
|
+
return this.parent.getFolder(this.scope, folderId, this.options);
|
|
3262
5682
|
}
|
|
3263
5683
|
/**
|
|
3264
|
-
* Creates folder in this scope
|
|
5684
|
+
* Creates folder in this scope
|
|
3265
5685
|
*/
|
|
3266
5686
|
async createFolder(data) {
|
|
3267
|
-
|
|
5687
|
+
const folderData = {
|
|
5688
|
+
...data,
|
|
5689
|
+
tenantId: this.options?.tenantId,
|
|
5690
|
+
userId: this.options?.userId,
|
|
5691
|
+
};
|
|
5692
|
+
return this.parent.createFolder(folderData);
|
|
3268
5693
|
}
|
|
3269
5694
|
/**
|
|
3270
5695
|
* Updates folder in this scope
|
|
@@ -3287,108 +5712,33 @@ class ScopedDriveService {
|
|
|
3287
5712
|
/**
|
|
3288
5713
|
* Searches folders in this scope
|
|
3289
5714
|
*/
|
|
3290
|
-
async searchFolders(searchTerm
|
|
3291
|
-
|
|
5715
|
+
async searchFolders(searchTerm) {
|
|
5716
|
+
this.validateScopeOptions();
|
|
5717
|
+
return this.parent.searchFolders(searchTerm, this.scope, this.options);
|
|
3292
5718
|
}
|
|
3293
5719
|
/**
|
|
3294
5720
|
* Searches files in this scope
|
|
3295
5721
|
*/
|
|
3296
|
-
async searchFiles(searchTerm
|
|
3297
|
-
|
|
5722
|
+
async searchFiles(searchTerm) {
|
|
5723
|
+
this.validateScopeOptions();
|
|
5724
|
+
return this.parent.searchFiles(searchTerm, this.scope, this.options);
|
|
3298
5725
|
}
|
|
3299
5726
|
/**
|
|
3300
5727
|
* Searches nodes in this scope
|
|
3301
5728
|
*/
|
|
3302
|
-
async searchNodes(searchTerm
|
|
3303
|
-
|
|
5729
|
+
async searchNodes(searchTerm) {
|
|
5730
|
+
this.validateScopeOptions();
|
|
5731
|
+
return this.parent.searchNodes(searchTerm, this.scope, this.options);
|
|
3304
5732
|
}
|
|
3305
5733
|
/**
|
|
3306
5734
|
* Creates a copy of a node in this scope
|
|
3307
5735
|
*/
|
|
3308
5736
|
async copy(node) {
|
|
5737
|
+
this.validateScopeOptions();
|
|
3309
5738
|
return this.parent.copy(node);
|
|
3310
5739
|
}
|
|
3311
5740
|
}
|
|
3312
5741
|
|
|
3313
|
-
//#region ---- Imports ----
|
|
3314
|
-
//#endregion
|
|
3315
|
-
/**
|
|
3316
|
-
* File gallery popup component that displays files using the gallery widget.
|
|
3317
|
-
* This component replaces the old file-viewer-popup and uses the same
|
|
3318
|
-
* gallery widget pattern as test8.
|
|
3319
|
-
*/
|
|
3320
|
-
class AXMFileGalleryPopupComponent extends AXBasePageComponent {
|
|
3321
|
-
constructor() {
|
|
3322
|
-
super(...arguments);
|
|
3323
|
-
//#region ---- Class Properties ----
|
|
3324
|
-
/** File list items received from popup data */
|
|
3325
|
-
this.files = signal([], ...(ngDevMode ? [{ debugName: "files" }] : []));
|
|
3326
|
-
/** Starting index for the media viewer */
|
|
3327
|
-
this.startIndex = 0;
|
|
3328
|
-
/** Widget context for the gallery */
|
|
3329
|
-
this.context = signal({}, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
3330
|
-
//#endregion
|
|
3331
|
-
//#region ---- Computed Properties ----
|
|
3332
|
-
/**
|
|
3333
|
-
* Gallery widget node configuration
|
|
3334
|
-
*/
|
|
3335
|
-
this.galleryNode = computed(() => ({
|
|
3336
|
-
type: 'gallery',
|
|
3337
|
-
path: 'galleryFiles',
|
|
3338
|
-
defaultValue: this.files(),
|
|
3339
|
-
options: {
|
|
3340
|
-
thumbnail: true,
|
|
3341
|
-
header: true,
|
|
3342
|
-
fileInfo: true,
|
|
3343
|
-
fullScreenButton: true,
|
|
3344
|
-
allowUpload: false,
|
|
3345
|
-
height: '100%',
|
|
3346
|
-
},
|
|
3347
|
-
}), ...(ngDevMode ? [{ debugName: "galleryNode" }] : []));
|
|
3348
|
-
}
|
|
3349
|
-
//#endregion
|
|
3350
|
-
//#region ---- UI Handlers ----
|
|
3351
|
-
/**
|
|
3352
|
-
* Close the popup
|
|
3353
|
-
*/
|
|
3354
|
-
onClose() {
|
|
3355
|
-
this.close();
|
|
3356
|
-
}
|
|
3357
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFileGalleryPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3358
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXMFileGalleryPopupComponent, isStandalone: true, selector: "axm-file-gallery-popup", usesInheritance: true, ngImport: i0, template: `
|
|
3359
|
-
<ax-content>
|
|
3360
|
-
<axp-widgets-container class="ax-block ax-h-full" [context]="context()">
|
|
3361
|
-
<ng-container axp-widget-renderer [node]="galleryNode()" [mode]="'edit'"></ng-container>
|
|
3362
|
-
</axp-widgets-container>
|
|
3363
|
-
</ax-content>
|
|
3364
|
-
<ax-footer>
|
|
3365
|
-
<ax-suffix>
|
|
3366
|
-
<ax-button [text]="'close'" (click)="onClose()" />
|
|
3367
|
-
</ax-suffix>
|
|
3368
|
-
</ax-footer>
|
|
3369
|
-
`, isInline: true, styles: [":host{display:block;height:100%}ax-content{height:calc(100% - 60px)}\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i6.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3370
|
-
}
|
|
3371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFileGalleryPopupComponent, decorators: [{
|
|
3372
|
-
type: Component,
|
|
3373
|
-
args: [{ selector: 'axm-file-gallery-popup', template: `
|
|
3374
|
-
<ax-content>
|
|
3375
|
-
<axp-widgets-container class="ax-block ax-h-full" [context]="context()">
|
|
3376
|
-
<ng-container axp-widget-renderer [node]="galleryNode()" [mode]="'edit'"></ng-container>
|
|
3377
|
-
</axp-widgets-container>
|
|
3378
|
-
</ax-content>
|
|
3379
|
-
<ax-footer>
|
|
3380
|
-
<ax-suffix>
|
|
3381
|
-
<ax-button [text]="'close'" (click)="onClose()" />
|
|
3382
|
-
</ax-suffix>
|
|
3383
|
-
</ax-footer>
|
|
3384
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorModule, AXButtonModule, AXPWidgetCoreModule], styles: [":host{display:block;height:100%}ax-content{height:calc(100% - 60px)}\n"] }]
|
|
3385
|
-
}] });
|
|
3386
|
-
|
|
3387
|
-
var fileGalleryPopup_component = /*#__PURE__*/Object.freeze({
|
|
3388
|
-
__proto__: null,
|
|
3389
|
-
AXMFileGalleryPopupComponent: AXMFileGalleryPopupComponent
|
|
3390
|
-
});
|
|
3391
|
-
|
|
3392
5742
|
var AXPDocumentExplorerSettings;
|
|
3393
5743
|
(function (AXPDocumentExplorerSettings) {
|
|
3394
5744
|
AXPDocumentExplorerSettings["ViewMode"] = "DocumentManagement:Setting:DocumentExplorer.Layout.ViewMode";
|
|
@@ -3457,7 +5807,7 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
|
3457
5807
|
isMultiSelect: computed(() => store.selectionMode() === 'multiple'),
|
|
3458
5808
|
selectedNode: computed(() => store.selectedNodes()[0] ?? null),
|
|
3459
5809
|
isDetailPanelOpen: computed(() => store.detailPanel()),
|
|
3460
|
-
})), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService), driveService = inject(AXMDocumentManagerService), settingsService = inject(AXPSettingsService), translateService = inject(AXTranslationService), lockService = inject(AXPLockService)) => ({
|
|
5810
|
+
})), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService), documentTypeService = inject(AXMDocumentTypeService), driveService = inject(AXMDocumentManagerService), settingsService = inject(AXPSettingsService), sessionService = inject(AXPSessionService), translateService = inject(AXTranslationService), lockService = inject(AXPLockService)) => ({
|
|
3461
5811
|
async initialize(options) {
|
|
3462
5812
|
// Load file types
|
|
3463
5813
|
const fileTypes = await fileTypeService.items();
|
|
@@ -3484,7 +5834,10 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
|
3484
5834
|
patchState(store, { loadingFolderId: folderId, isLoading: true });
|
|
3485
5835
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
3486
5836
|
try {
|
|
3487
|
-
const node = await driveService.getFolder(store.scope(), folderId
|
|
5837
|
+
const node = await driveService.getFolder(store.scope(), folderId, {
|
|
5838
|
+
tenantId: sessionService.tenant?.id,
|
|
5839
|
+
userId: sessionService.user?.id,
|
|
5840
|
+
});
|
|
3488
5841
|
// Sort with direction
|
|
3489
5842
|
const sortField = store.sortField();
|
|
3490
5843
|
const sortDirection = store.sortDirection();
|
|
@@ -3938,30 +6291,29 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
|
3938
6291
|
},
|
|
3939
6292
|
];
|
|
3940
6293
|
// Manage versions (only if document type has versioning enabled)
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
// }
|
|
6294
|
+
const docType = node.documentTypes?.[0];
|
|
6295
|
+
if (docType?.enableVersioning) {
|
|
6296
|
+
menuItems.push({
|
|
6297
|
+
name: 'manage-versions',
|
|
6298
|
+
text: await trans('menus.context.manage-versions'),
|
|
6299
|
+
icon: 'fa-light fa-clock-rotate-left',
|
|
6300
|
+
items: [
|
|
6301
|
+
{
|
|
6302
|
+
name: 'upload-new-version',
|
|
6303
|
+
text: await trans('menus.context.upload-new-version'),
|
|
6304
|
+
icon: 'fa-light fa-file-circle-plus',
|
|
6305
|
+
data: node,
|
|
6306
|
+
},
|
|
6307
|
+
{
|
|
6308
|
+
name: 'show-version-history',
|
|
6309
|
+
text: await trans('menus.context.show-version-history'),
|
|
6310
|
+
icon: 'fa-light fa-timeline',
|
|
6311
|
+
data: node,
|
|
6312
|
+
},
|
|
6313
|
+
],
|
|
6314
|
+
break: true,
|
|
6315
|
+
});
|
|
6316
|
+
}
|
|
3965
6317
|
// Information submenu items
|
|
3966
6318
|
const infoSubItems = [
|
|
3967
6319
|
{
|
|
@@ -4801,15 +7153,14 @@ const attachmentsPlugin = {
|
|
|
4801
7153
|
},
|
|
4802
7154
|
};
|
|
4803
7155
|
|
|
4804
|
-
|
|
7156
|
+
/** Extract metadata for server (metaDataForm) from widget item (meta or metaDataForm). */
|
|
7157
|
+
function getMetaDataFormForServer(item) {
|
|
4805
7158
|
if (item?.meta?.metaDataForm != null)
|
|
4806
7159
|
return item.meta.metaDataForm;
|
|
4807
7160
|
if (item?.metaDataForm != null)
|
|
4808
7161
|
return item.metaDataForm;
|
|
4809
|
-
if (item?.meta != null && typeof item.meta === 'object' && !Array.isArray(item.meta))
|
|
4810
|
-
|
|
4811
|
-
return m['metaDataForm'] ?? m;
|
|
4812
|
-
}
|
|
7162
|
+
if (item?.meta != null && typeof item.meta === 'object' && !Array.isArray(item.meta))
|
|
7163
|
+
return item.meta;
|
|
4813
7164
|
return undefined;
|
|
4814
7165
|
}
|
|
4815
7166
|
/** Resolve list of attachment field names from entity extensions.attachments. */
|
|
@@ -4858,7 +7209,7 @@ const attachmentsUploadMiddleware = {
|
|
|
4858
7209
|
pendingByField[field] = [];
|
|
4859
7210
|
const normalized = [];
|
|
4860
7211
|
for (const item of list) {
|
|
4861
|
-
const metaDataForm =
|
|
7212
|
+
const metaDataForm = getMetaDataFormForServer(item);
|
|
4862
7213
|
if (item?.source?.kind === 'blob' && item.source.value instanceof Blob) {
|
|
4863
7214
|
const blob = item.source.value;
|
|
4864
7215
|
const name = item.name || `file-${Date.now()}`;
|
|
@@ -4913,7 +7264,7 @@ const attachmentsUploadMiddleware = {
|
|
|
4913
7264
|
continue;
|
|
4914
7265
|
const finalRefs = (ctx.data[field] ?? []).filter((x) => x.status !== 'pending_upload');
|
|
4915
7266
|
for (const { fileItem, blob } of pending) {
|
|
4916
|
-
const metaDataForm = fileItem.metaDataForm ??
|
|
7267
|
+
const metaDataForm = fileItem.metaDataForm ?? getMetaDataFormForServer(fileItem);
|
|
4917
7268
|
try {
|
|
4918
7269
|
const info = await storage.save({
|
|
4919
7270
|
file: blob,
|
|
@@ -4974,17 +7325,6 @@ const attachmentsUploadMiddleware = {
|
|
|
4974
7325
|
},
|
|
4975
7326
|
};
|
|
4976
7327
|
|
|
4977
|
-
function getFileIdFromFileInfo(fileInfo) {
|
|
4978
|
-
if (fileInfo == null)
|
|
4979
|
-
return undefined;
|
|
4980
|
-
if (typeof fileInfo === 'string')
|
|
4981
|
-
return fileInfo;
|
|
4982
|
-
if (fileInfo.source?.kind === 'fileId' && typeof fileInfo.source.value === 'string')
|
|
4983
|
-
return fileInfo.source.value;
|
|
4984
|
-
if (typeof fileInfo.id === 'string')
|
|
4985
|
-
return fileInfo.id;
|
|
4986
|
-
return undefined;
|
|
4987
|
-
}
|
|
4988
7328
|
//#region ---- Plugin Guard Utilities ----
|
|
4989
7329
|
/**
|
|
4990
7330
|
* Check if the 'document' plugin is active (enabled and not excluded) in the payload.
|
|
@@ -5082,11 +7422,6 @@ const DocumentFileUploaderActionsByTypeProvider = {
|
|
|
5082
7422
|
});
|
|
5083
7423
|
if (files.length === 0)
|
|
5084
7424
|
return;
|
|
5085
|
-
const documentType = {
|
|
5086
|
-
id: docType?.id ?? '',
|
|
5087
|
-
name: typeName,
|
|
5088
|
-
title: docType?.title ?? typeName,
|
|
5089
|
-
};
|
|
5090
7425
|
const fileItems = files.map((file) => ({
|
|
5091
7426
|
id: AXPDataGenerator.uuid(),
|
|
5092
7427
|
name: file.name,
|
|
@@ -5094,7 +7429,7 @@ const DocumentFileUploaderActionsByTypeProvider = {
|
|
|
5094
7429
|
type: file.type,
|
|
5095
7430
|
status: 'attached',
|
|
5096
7431
|
source: { kind: 'blob', value: file },
|
|
5097
|
-
|
|
7432
|
+
__documentTypeName: typeName,
|
|
5098
7433
|
}));
|
|
5099
7434
|
if (hasMeta) {
|
|
5100
7435
|
const result = await documentDialogService.openAttachmentDialogWithoutSave('Document Type Choose File', {
|
|
@@ -5103,15 +7438,8 @@ const DocumentFileUploaderActionsByTypeProvider = {
|
|
|
5103
7438
|
});
|
|
5104
7439
|
if (result.data?.cancel != null && !result.data.cancel && result.data?.files) {
|
|
5105
7440
|
result.data.files.forEach((f, i) => {
|
|
5106
|
-
if (fileItems[i])
|
|
5107
|
-
|
|
5108
|
-
...fileItems[i].meta,
|
|
5109
|
-
documentType,
|
|
5110
|
-
metaDataForm: f?.metaDataForm,
|
|
5111
|
-
};
|
|
5112
|
-
set$1(fileItems[i], 'meta', meta);
|
|
5113
|
-
set$1(fileItems[i], 'metaDataForm', f?.metaDataForm);
|
|
5114
|
-
}
|
|
7441
|
+
if (fileItems[i])
|
|
7442
|
+
set(fileItems[i], 'metaDataForm', f?.metaDataForm);
|
|
5115
7443
|
});
|
|
5116
7444
|
}
|
|
5117
7445
|
else if (result.data?.cancel) {
|
|
@@ -5133,18 +7461,13 @@ const DocumentFileUploaderBeforeFilesAddedProvider = {
|
|
|
5133
7461
|
priority: 0,
|
|
5134
7462
|
async execute(payload) {
|
|
5135
7463
|
const opts = getDocumentPluginOptions(payload);
|
|
5136
|
-
const
|
|
5137
|
-
|
|
7464
|
+
const docTypeName = payload.newFiles[0]?.__documentTypeName ??
|
|
7465
|
+
opts?.docTypeName;
|
|
5138
7466
|
if (!docTypeName)
|
|
5139
7467
|
return payload;
|
|
5140
7468
|
const injector = inject(Injector);
|
|
5141
7469
|
const documentManagementService = injector.get(AXPDocumentManagementService);
|
|
5142
7470
|
const docType = await documentManagementService.getDocumentTypeByName(docTypeName);
|
|
5143
|
-
const documentType = {
|
|
5144
|
-
id: docType?.id ?? '',
|
|
5145
|
-
name: docType?.name ?? docTypeName,
|
|
5146
|
-
title: docType?.title ?? docTypeName,
|
|
5147
|
-
};
|
|
5148
7471
|
const documentDialogService = injector.get(AXMDocumentDialogService);
|
|
5149
7472
|
const result = await documentDialogService.openAttachmentDialogWithoutSave('Document Type Choose File', {
|
|
5150
7473
|
documentType: docType,
|
|
@@ -5152,14 +7475,7 @@ const DocumentFileUploaderBeforeFilesAddedProvider = {
|
|
|
5152
7475
|
});
|
|
5153
7476
|
if (result.data?.cancel != null && !result.data.cancel && result.data?.files) {
|
|
5154
7477
|
payload.newFiles.forEach((file, i) => {
|
|
5155
|
-
|
|
5156
|
-
const meta = {
|
|
5157
|
-
...file.meta,
|
|
5158
|
-
documentType,
|
|
5159
|
-
metaDataForm,
|
|
5160
|
-
};
|
|
5161
|
-
set$1(file, 'meta', meta);
|
|
5162
|
-
set$1(file, 'metaDataForm', metaDataForm);
|
|
7478
|
+
set(file, 'metaDataForm', result.data?.files?.[i]?.metaDataForm);
|
|
5163
7479
|
});
|
|
5164
7480
|
}
|
|
5165
7481
|
return payload;
|
|
@@ -5170,10 +7486,9 @@ const DocumentFileUploaderEditDialogAfterFormProvider = {
|
|
|
5170
7486
|
key: 'file-uploader.edit-dialog.groups.after-form',
|
|
5171
7487
|
priority: 0,
|
|
5172
7488
|
async execute(payload) {
|
|
5173
|
-
const
|
|
5174
|
-
const metaObj = (fileMeta?.metaDataForm ?? payload.file.metaDataForm);
|
|
7489
|
+
const metaObj = payload.file?.metaDataForm;
|
|
5175
7490
|
const opts = getDocumentPluginOptions(payload);
|
|
5176
|
-
const docTypeName =
|
|
7491
|
+
const docTypeName = payload.file?.__documentTypeName ?? opts?.docTypeName;
|
|
5177
7492
|
const injector = inject(Injector);
|
|
5178
7493
|
const documentManagementService = injector.get(AXPDocumentManagementService);
|
|
5179
7494
|
const docType = docTypeName
|
|
@@ -5225,8 +7540,9 @@ const DocumentFileUploaderDownloadReferenceProvider = {
|
|
|
5225
7540
|
console.error('Document not found for reference:', payload.reference);
|
|
5226
7541
|
return payload;
|
|
5227
7542
|
}
|
|
5228
|
-
|
|
5229
|
-
|
|
7543
|
+
// Extract fileId from document
|
|
7544
|
+
const fileId = typeof document.fileId === 'string' ? document.fileId : (document.fileId?.id ?? document.fileId);
|
|
7545
|
+
if (!fileId || typeof fileId !== 'string') {
|
|
5230
7546
|
console.error('Document does not have a valid fileId:', document);
|
|
5231
7547
|
return payload;
|
|
5232
7548
|
}
|
|
@@ -5285,7 +7601,13 @@ class AXMDocumentManagementModule {
|
|
|
5285
7601
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5286
7602
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementModule, imports: [AXMDriveChooseModule,
|
|
5287
7603
|
// Entity Modules
|
|
5288
|
-
|
|
7604
|
+
AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
|
|
7605
|
+
AXMDocumentManagementDocumentTypeMetaValueEntityModule,
|
|
7606
|
+
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
|
7607
|
+
AXMDocumentManagementDocumentTypeEntityModule,
|
|
7608
|
+
AXMDocumentManagementDocumentEntityModule,
|
|
7609
|
+
AXMFolderEntityModule,
|
|
7610
|
+
AXMReviewEntityModule, i6.AXPWidgetCoreModule, i2$2.AXMediaViewerModule, i3$1.AXPWorkflowModule] }); }
|
|
5289
7611
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementModule, providers: [
|
|
5290
7612
|
// Module-specific providers (not part of manifest system)
|
|
5291
7613
|
{ provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: attachmentsPlugin },
|
|
@@ -5337,21 +7659,15 @@ class AXMDocumentManagementModule {
|
|
|
5337
7659
|
useClass: AXMSearchCommandProvider,
|
|
5338
7660
|
multi: true,
|
|
5339
7661
|
},
|
|
5340
|
-
{
|
|
5341
|
-
provide: AXMDocumentService,
|
|
5342
|
-
useClass: AXMDocumentServiceImpl,
|
|
5343
|
-
},
|
|
5344
|
-
{
|
|
5345
|
-
provide: AXMFolderService,
|
|
5346
|
-
useClass: AXMFolderServiceImpl,
|
|
5347
|
-
},
|
|
5348
|
-
{
|
|
5349
|
-
provide: AXMDocumentManagerService,
|
|
5350
|
-
useClass: AXMDocumentManagerServiceImpl,
|
|
5351
|
-
},
|
|
5352
7662
|
], imports: [AXMDriveChooseModule,
|
|
5353
7663
|
// Entity Modules
|
|
7664
|
+
AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
|
|
7665
|
+
AXMDocumentManagementDocumentTypeMetaValueEntityModule,
|
|
7666
|
+
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
|
5354
7667
|
AXMDocumentManagementDocumentTypeEntityModule,
|
|
7668
|
+
AXMDocumentManagementDocumentEntityModule,
|
|
7669
|
+
AXMFolderEntityModule,
|
|
7670
|
+
AXMReviewEntityModule,
|
|
5355
7671
|
AXPWidgetCoreModule.forChild({
|
|
5356
7672
|
widgets: [AXmFileTypeExtensionWidget],
|
|
5357
7673
|
}),
|
|
@@ -5373,7 +7689,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5373
7689
|
imports: [
|
|
5374
7690
|
AXMDriveChooseModule,
|
|
5375
7691
|
// Entity Modules
|
|
7692
|
+
AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
|
|
7693
|
+
AXMDocumentManagementDocumentTypeMetaValueEntityModule,
|
|
7694
|
+
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
|
5376
7695
|
AXMDocumentManagementDocumentTypeEntityModule,
|
|
7696
|
+
AXMDocumentManagementDocumentEntityModule,
|
|
7697
|
+
AXMFolderEntityModule,
|
|
7698
|
+
AXMReviewEntityModule,
|
|
5377
7699
|
AXPWidgetCoreModule.forChild({
|
|
5378
7700
|
widgets: [AXmFileTypeExtensionWidget],
|
|
5379
7701
|
}),
|
|
@@ -5441,18 +7763,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5441
7763
|
useClass: AXMSearchCommandProvider,
|
|
5442
7764
|
multi: true,
|
|
5443
7765
|
},
|
|
5444
|
-
{
|
|
5445
|
-
provide: AXMDocumentService,
|
|
5446
|
-
useClass: AXMDocumentServiceImpl,
|
|
5447
|
-
},
|
|
5448
|
-
{
|
|
5449
|
-
provide: AXMFolderService,
|
|
5450
|
-
useClass: AXMFolderServiceImpl,
|
|
5451
|
-
},
|
|
5452
|
-
{
|
|
5453
|
-
provide: AXMDocumentManagerService,
|
|
5454
|
-
useClass: AXMDocumentManagerServiceImpl,
|
|
5455
|
-
},
|
|
5456
7766
|
],
|
|
5457
7767
|
}]
|
|
5458
7768
|
}] });
|
|
@@ -5642,6 +7952,8 @@ class AXMDocumentDriveComponent extends AXPPageLayoutBaseComponent {
|
|
|
5642
7952
|
this.previousFolderId = currentNode?.id ?? null;
|
|
5643
7953
|
}
|
|
5644
7954
|
const result = await this.driveService.searchNodes(searchValue, this.vm.scope(), {
|
|
7955
|
+
tenantId: this.sessionService.tenant?.id,
|
|
7956
|
+
userId: this.sessionService.user?.id,
|
|
5645
7957
|
folderId: this.vm.isVirtual() ? (this.previousFolderId ?? undefined) : (this.vm.currentNode()?.id ?? undefined),
|
|
5646
7958
|
});
|
|
5647
7959
|
// Get the folder ID to use as parentId for the virtual folder
|
|
@@ -5678,7 +7990,10 @@ class AXMDocumentDriveComponent extends AXPPageLayoutBaseComponent {
|
|
|
5678
7990
|
}
|
|
5679
7991
|
else {
|
|
5680
7992
|
// TODO: get root from tenant or user by scope
|
|
5681
|
-
const root = await this.driveService.getRoot(this.vm.scope()
|
|
7993
|
+
const root = await this.driveService.getRoot(this.vm.scope(), {
|
|
7994
|
+
tenantId: this.sessionService.tenant?.id,
|
|
7995
|
+
userId: this.sessionService.user?.id,
|
|
7996
|
+
});
|
|
5682
7997
|
if (root.result) {
|
|
5683
7998
|
await this.router.navigate([
|
|
5684
7999
|
`${this.sessionService.application?.name}/drive/${resolvePlatformScopeName(this.vm.scope())}/${root.result.id}`,
|
|
@@ -5923,5 +8238,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5923
8238
|
* Generated bundle index. Do not edit.
|
|
5924
8239
|
*/
|
|
5925
8240
|
|
|
5926
|
-
export { AXMArchiveFileTypeProvider, AXMAudioFileTypeProvider, AXMCodeFileTypeProvider, AXMDocumentDriveComponent, AXMDocumentExplorerComponent, AXMDocumentFileTypeProvider, AXMDocumentManagementDocumentTypeEntityModule, AXMDocumentManagementModule, AXMDocumentManagerService,
|
|
8241
|
+
export { AXMArchiveFileTypeProvider, AXMAudioFileTypeProvider, AXMCodeFileTypeProvider, AXMDocumentDriveComponent, AXMDocumentExplorerComponent, AXMDocumentFileTypeProvider, AXMDocumentManagementDocumentEntityModule, AXMDocumentManagementDocumentTypeEntityModule, AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, AXMDocumentManagementDocumentTypeMetaDefinitionEntityService, AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, AXMDocumentManagementDocumentTypeMetaValueEntityModule, AXMDocumentManagementDocumentTypeMetaValueEntityService, AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, AXMDocumentManagementDocumentTypeStatusDefinitionEntityService, AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, AXMDocumentManagementModule, AXMDocumentManagerService, AXMDocumentReletedEntityModule, AXMDocumentService, AXMDocumentServiceImpl, AXMDocumentTypeService, AXMDocumentTypeServiceImpl, AXMEntityProvider, AXMFileGalleryPopupComponent, AXMFileTypeExtensionWidgetColumnComponent, AXMFileTypeExtensionWidgetDesignerComponent, AXMFileTypeExtensionWidgetEditComponent, AXMFileTypeExtensionWidgetViewComponent, AXMFileTypeModule, AXMFolderEntityModule, AXMFolderPathBreadcrumbsComponent, AXMFolderService, AXMFolderServiceImpl, AXMImageFileTypeProvider, AXMMenuProvider, AXMPermissionsKeys, AXMReviewEntityModule, AXMReviewService, AXMReviewServiceImpl, AXMSearchCommandProvider, AXMSettingProvider, AXMVideoFileTypeProvider, AXPDocumentExplorerSettings, AXPDocumentExplorerViewModel, AXPDocumentManagementFeatureKeys, AXPDocumentManagementMenuKeys, AXPDocumentManagementService, AXmFileTypeExtensionWidget, RootConfig, ScopedDriveService, canTransition, documentFactory, documentRelatedFactory, documentTypeFactory, documentTypeMetaDefinitionfactory, documentTypeMetaValueFactory, documentTypeStatusDefinitionFactory, folderFactory, getNextStatus, reviewFactory };
|
|
5927
8242
|
//# sourceMappingURL=acorex-modules-document-management.mjs.map
|