@acorex/modules 20.7.19 → 20.7.21
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/asset-management/index.d.ts +24 -33
- package/dashboard-management/index.d.ts +40 -5
- package/document-management/index.d.ts +1 -26
- package/fesm2022/acorex-modules-asset-management-asset.entity-D_w4zjNb.mjs +612 -0
- package/fesm2022/acorex-modules-asset-management-asset.entity-D_w4zjNb.mjs.map +1 -0
- package/fesm2022/acorex-modules-asset-management-manual-asset-category.entity-DyIV_vbE.mjs +267 -0
- package/fesm2022/acorex-modules-asset-management-manual-asset-category.entity-DyIV_vbE.mjs.map +1 -0
- package/fesm2022/acorex-modules-asset-management.mjs +59 -117
- package/fesm2022/acorex-modules-asset-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs +454 -116
- package/fesm2022/acorex-modules-dashboard-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-data-management.mjs +4 -2
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-document-management.mjs +40 -99
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-maintenance-management.mjs +194 -103
- package/fesm2022/acorex-modules-maintenance-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +21 -6
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-reservation-management-acorex-modules-reservation-management-CkHGIQ38.mjs +2135 -0
- package/fesm2022/acorex-modules-reservation-management-acorex-modules-reservation-management-CkHGIQ38.mjs.map +1 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-class-status.entity-Clyj7r2x.mjs +263 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-class-status.entity-Clyj7r2x.mjs.map +1 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-resource-type.entity-BXb0FTQ5.mjs +184 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-resource-type.entity-BXb0FTQ5.mjs.map +1 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-status-transition.entity-BT8GQ9MC.mjs +247 -0
- package/fesm2022/acorex-modules-reservation-management-reservation-status-transition.entity-BT8GQ9MC.mjs.map +1 -0
- package/fesm2022/acorex-modules-reservation-management.mjs +1 -3325
- package/fesm2022/acorex-modules-reservation-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-task-management-task-board.page-BOOY3qla.mjs → acorex-modules-task-management-task-board.page-BBKB4yir.mjs} +114 -62
- package/fesm2022/acorex-modules-task-management-task-board.page-BBKB4yir.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +43 -13
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/maintenance-management/index.d.ts +7 -3
- package/package.json +10 -10
- package/reservation-management/index.d.ts +84 -338
- package/fesm2022/acorex-modules-asset-management-asset.entity-C57iN3Bo.mjs +0 -357
- package/fesm2022/acorex-modules-asset-management-asset.entity-C57iN3Bo.mjs.map +0 -1
- package/fesm2022/acorex-modules-asset-management-inspection.entity-CpDuN-qj.mjs +0 -198
- package/fesm2022/acorex-modules-asset-management-inspection.entity-CpDuN-qj.mjs.map +0 -1
- package/fesm2022/acorex-modules-task-management-task-board.page-BOOY3qla.mjs.map +0 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injector, Injectable, NgModule } from '@angular/core';
|
|
3
3
|
import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
4
|
-
import { AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER, AXPSearchCommandProvider, createAllQueryView,
|
|
5
|
-
import { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider
|
|
6
|
-
import { AXMEntityCrudServiceImpl, AXP_ENTITY_DEFINITION_LOADER, AXPEntityService,
|
|
4
|
+
import { AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER, AXPSearchCommandProvider, createAllQueryView, AXPEntityQueryType } from '@acorex/platform/common';
|
|
5
|
+
import { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider } from '@acorex/platform/core';
|
|
6
|
+
import { AXMEntityCrudServiceImpl, AXP_ENTITY_DEFINITION_LOADER, AXPEntityService, entityMasterCrudActions, entityMasterRecordActions } from '@acorex/platform/layout/entity';
|
|
7
7
|
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
8
|
+
import { RootConfig as RootConfig$1 } from '@acorex/modules/human-capital-management';
|
|
9
|
+
import { AXPWidgetsList } from '@acorex/modules/common';
|
|
10
|
+
import { RootConfig as RootConfig$2 } from '@acorex/modules/assessment-management';
|
|
8
11
|
|
|
9
12
|
//#region ---- Root Configuration ----
|
|
10
13
|
const config = {
|
|
@@ -268,16 +271,16 @@ class AXMMaintenanceManagementMenuProvider {
|
|
|
268
271
|
features: [module.name],
|
|
269
272
|
},
|
|
270
273
|
children: [
|
|
271
|
-
{
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
},
|
|
274
|
+
// {
|
|
275
|
+
// name: AXMMaintenanceManagementMenuKeys.Maintenances,
|
|
276
|
+
// text: RootConfig.entities.maintenance.titlePlural,
|
|
277
|
+
// icon: RootConfig.entities.maintenance.icon,
|
|
278
|
+
// path: this.entityService.createPath(module.name, RootConfig.entities.maintenance.name),
|
|
279
|
+
// priority: 1,
|
|
280
|
+
// policy: {
|
|
281
|
+
// permissions: [keys.Maintenance.View],
|
|
282
|
+
// },
|
|
283
|
+
// },
|
|
281
284
|
{
|
|
282
285
|
name: AXMMaintenanceManagementMenuKeys.MaintenanceTypes,
|
|
283
286
|
text: RootConfig.entities.maintenanceType.titlePlural,
|
|
@@ -383,11 +386,24 @@ async function factory$1(injector) {
|
|
|
383
386
|
title: RootConfig.entities.maintenance.title,
|
|
384
387
|
icon: RootConfig.entities.maintenance.icon,
|
|
385
388
|
plugins: [
|
|
386
|
-
{ name: '
|
|
387
|
-
{ name: '
|
|
388
|
-
{
|
|
389
|
-
//
|
|
390
|
-
|
|
389
|
+
{ name: 'archive', options: { order: 1 } },
|
|
390
|
+
{ name: 'history', options: { order: 2 } },
|
|
391
|
+
// {
|
|
392
|
+
// name: 'category',
|
|
393
|
+
// options: {
|
|
394
|
+
// appearance: { icon: true, color: true },
|
|
395
|
+
// metaData: { enabled: true },
|
|
396
|
+
// }
|
|
397
|
+
// },
|
|
398
|
+
{
|
|
399
|
+
name: 'meta-data-form',
|
|
400
|
+
options: {
|
|
401
|
+
path: 'maintenanceTypeId',
|
|
402
|
+
title: '@maintenance-management:maintenances.entities.maintenance.components.meta-data-form.title',
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
{ name: 'notes', options: { order: 5 } },
|
|
406
|
+
{ name: 'attachments', options: { order: 6 } },
|
|
391
407
|
],
|
|
392
408
|
formats: {
|
|
393
409
|
individual: RootConfig.entities.maintenance.title,
|
|
@@ -397,7 +413,6 @@ async function factory$1(injector) {
|
|
|
397
413
|
groups: [
|
|
398
414
|
{ id: 'basic-info', title: '@maintenance-management:maintenances.entities.maintenance.groups.basic-info' },
|
|
399
415
|
{ id: 'performed-by', title: '@maintenance-management:maintenances.entities.maintenance.groups.performed-by' },
|
|
400
|
-
{ id: 'additional', title: '@maintenance-management:maintenances.entities.maintenance.groups.additional' },
|
|
401
416
|
],
|
|
402
417
|
properties: [
|
|
403
418
|
{
|
|
@@ -406,23 +421,19 @@ async function factory$1(injector) {
|
|
|
406
421
|
schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },
|
|
407
422
|
},
|
|
408
423
|
{
|
|
409
|
-
name: '
|
|
410
|
-
title: '@maintenance-management:maintenances.entities.maintenance.fields.resource-id
|
|
424
|
+
name: 'resourceEntityId',
|
|
425
|
+
title: '@maintenance-management:maintenances.entities.maintenance.fields.resource-entity-id',
|
|
411
426
|
groupId: 'basic-info',
|
|
412
427
|
schema: {
|
|
413
|
-
dataType: '
|
|
428
|
+
dataType: 'string',
|
|
429
|
+
visible: false,
|
|
414
430
|
interface: {
|
|
415
|
-
type:
|
|
431
|
+
type: AXPWidgetsList.Editors.SelectBox,
|
|
416
432
|
options: {
|
|
417
|
-
|
|
433
|
+
valueField: 'entity',
|
|
418
434
|
textField: 'title',
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
expose: [
|
|
422
|
-
{ source: 'id', target: 'asset.id' }, /////??????????????????????????????????????????????
|
|
423
|
-
{ source: 'title', target: 'asset.title' },
|
|
424
|
-
{ source: 'code', target: 'asset.code' },
|
|
425
|
-
],
|
|
435
|
+
allowSearch: true,
|
|
436
|
+
dataSource: 'entities'
|
|
426
437
|
},
|
|
427
438
|
},
|
|
428
439
|
},
|
|
@@ -432,6 +443,58 @@ async function factory$1(injector) {
|
|
|
432
443
|
},
|
|
433
444
|
validations: [{ rule: 'required' }],
|
|
434
445
|
},
|
|
446
|
+
{
|
|
447
|
+
name: 'resourceId',
|
|
448
|
+
title: '@maintenance-management:maintenances.entities.maintenance.fields.resource-id.title',
|
|
449
|
+
groupId: 'basic-info',
|
|
450
|
+
schema: {
|
|
451
|
+
dataType: 'string',
|
|
452
|
+
readonly: true,
|
|
453
|
+
//readonly: `{{ !!context.eval('resourceId') }}`,
|
|
454
|
+
visible: false,
|
|
455
|
+
interface: {
|
|
456
|
+
type: AXPWidgetsCatalog.text,
|
|
457
|
+
options: {},
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
options: {
|
|
461
|
+
sort: { enabled: true },
|
|
462
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
463
|
+
},
|
|
464
|
+
validations: [{ rule: 'required' }],
|
|
465
|
+
},
|
|
466
|
+
// {
|
|
467
|
+
// name: 'resourceId',
|
|
468
|
+
// title: '@maintenance-management:maintenances.entities.maintenance.fields.resource-id.title',
|
|
469
|
+
// groupId: 'basic-info',
|
|
470
|
+
// schema: {
|
|
471
|
+
// dataType: 'string',
|
|
472
|
+
// readonly : true ,
|
|
473
|
+
// //readonly: `{{ !!context.eval('resourceId') }}`,
|
|
474
|
+
// // visible: false,
|
|
475
|
+
// interface: {
|
|
476
|
+
// type: AXPWidgetsCatalog.lookup,
|
|
477
|
+
// options: {
|
|
478
|
+
// readonly : true ,
|
|
479
|
+
// entity: `${RootConfigAsset.module.name}.${RootConfigAsset.entities.asset.name}`,
|
|
480
|
+
// textField: 'title',
|
|
481
|
+
// valueField: 'id',
|
|
482
|
+
// columns: ['code', 'title'],
|
|
483
|
+
// expose: [
|
|
484
|
+
// { source: 'id', target: 'resource.id' },
|
|
485
|
+
// { source: 'title', target: 'resource.title' },
|
|
486
|
+
// { source: 'code', target: 'resource.code' },
|
|
487
|
+
// { source: 'availableMaintenanceTypeIds', target: 'resource.availableMaintenanceTypeIds' },
|
|
488
|
+
// ],
|
|
489
|
+
// },
|
|
490
|
+
// },
|
|
491
|
+
// },
|
|
492
|
+
// options: {
|
|
493
|
+
// sort: { enabled: true },
|
|
494
|
+
// filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
495
|
+
// },
|
|
496
|
+
// validations: [{ rule: 'required' }],
|
|
497
|
+
// },
|
|
435
498
|
{
|
|
436
499
|
name: 'maintenanceTypeId',
|
|
437
500
|
title: '@maintenance-management:maintenances.entities.maintenance.fields.maintenance-type-id.title',
|
|
@@ -442,13 +505,19 @@ async function factory$1(injector) {
|
|
|
442
505
|
type: AXPWidgetsCatalog.lookup,
|
|
443
506
|
options: {
|
|
444
507
|
entity: `${RootConfig.module.name}.${RootConfig.entities.maintenanceType.name}`,
|
|
445
|
-
textField: '
|
|
508
|
+
textField: 'title',
|
|
446
509
|
valueField: 'id',
|
|
447
|
-
|
|
510
|
+
look: 'select',
|
|
448
511
|
expose: [
|
|
449
512
|
{ source: 'id', target: 'maintenanceType.id' },
|
|
450
513
|
{ source: 'title', target: 'maintenanceType.title' },
|
|
451
|
-
|
|
514
|
+
],
|
|
515
|
+
filter: `{{ context.eval("resource.availableMaintenanceTypeIds")?.length ? { logic: 'and', filters: [{ field: 'id', operator: { type: 'in' }, value: context.eval("resource.availableMaintenanceTypeIds") }] } : null }}`,
|
|
516
|
+
triggers: [
|
|
517
|
+
{
|
|
518
|
+
event: "{{ events.context('resourceId') }}",
|
|
519
|
+
action: '{{ console.log("[maintenanceType trigger] resourceId:", context.eval("resourceId"), "| availableMaintenanceTypeIds:", context.eval("resource.availableMaintenanceTypeIds"), "| full resource:", context.eval("resource")); widget.setValue(null); widget.refresh() }}',
|
|
520
|
+
},
|
|
452
521
|
],
|
|
453
522
|
},
|
|
454
523
|
},
|
|
@@ -505,12 +574,13 @@ async function factory$1(injector) {
|
|
|
505
574
|
interface: {
|
|
506
575
|
type: AXPWidgetsCatalog.lookup,
|
|
507
576
|
options: {
|
|
508
|
-
entity:
|
|
509
|
-
textField: '
|
|
577
|
+
entity: `${RootConfig$1.module.name}.${RootConfig$1.entities.employee.name}`,
|
|
578
|
+
textField: 'person.displayName',
|
|
510
579
|
valueField: 'id',
|
|
580
|
+
look: 'select',
|
|
511
581
|
expose: [
|
|
512
582
|
{ source: 'id', target: 'employee.id' },
|
|
513
|
-
{ source: '
|
|
583
|
+
{ source: 'person.displayName', target: 'employee.displayName' },
|
|
514
584
|
],
|
|
515
585
|
},
|
|
516
586
|
},
|
|
@@ -533,12 +603,13 @@ async function factory$1(injector) {
|
|
|
533
603
|
interface: {
|
|
534
604
|
type: AXPWidgetsCatalog.lookup,
|
|
535
605
|
options: {
|
|
536
|
-
entity: '
|
|
537
|
-
textField: '
|
|
606
|
+
entity: 'PersonManagement.Person',
|
|
607
|
+
textField: 'displayName',
|
|
538
608
|
valueField: 'id',
|
|
609
|
+
look: 'select',
|
|
539
610
|
expose: [
|
|
540
611
|
{ source: 'id', target: 'thirdParty.id' },
|
|
541
|
-
{ source: '
|
|
612
|
+
{ source: 'displayName', target: 'thirdParty.displayName' },
|
|
542
613
|
],
|
|
543
614
|
},
|
|
544
615
|
},
|
|
@@ -551,23 +622,9 @@ async function factory$1(injector) {
|
|
|
551
622
|
// { rule: 'required', options: `{{ context.eval('performedBy').value == '${AXMPerformedBy.ThirdParty}' }}` },
|
|
552
623
|
// ],
|
|
553
624
|
},
|
|
554
|
-
{
|
|
555
|
-
name: 'description',
|
|
556
|
-
title: '@maintenance-management:maintenances.entities.maintenance.fields.description.title',
|
|
557
|
-
groupId: 'additional',
|
|
558
|
-
schema: {
|
|
559
|
-
dataType: 'string',
|
|
560
|
-
interface: {
|
|
561
|
-
type: AXPWidgetsCatalog.largeText,
|
|
562
|
-
options: {
|
|
563
|
-
rows: 4,
|
|
564
|
-
},
|
|
565
|
-
},
|
|
566
|
-
},
|
|
567
|
-
},
|
|
568
625
|
],
|
|
569
626
|
columns: [
|
|
570
|
-
{ name: 'resourceId', options: { dataPath: 'asset.title' } }, //////???????
|
|
627
|
+
// { name: 'resourceId', options: { dataPath: 'asset.title' } }, //////???????
|
|
571
628
|
{ name: 'maintenanceTypeId', options: { dataPath: 'maintenanceType.title' } },
|
|
572
629
|
{ name: 'performedBy' },
|
|
573
630
|
],
|
|
@@ -581,7 +638,6 @@ async function factory$1(injector) {
|
|
|
581
638
|
{ name: 'performedBy', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
582
639
|
{ name: 'employeeId', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
583
640
|
{ name: 'thirdPartyId', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
584
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
585
641
|
],
|
|
586
642
|
},
|
|
587
643
|
update: {
|
|
@@ -592,7 +648,6 @@ async function factory$1(injector) {
|
|
|
592
648
|
{ name: 'performedBy', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
593
649
|
{ name: 'employeeId', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
594
650
|
{ name: 'thirdPartyId', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
595
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
596
651
|
],
|
|
597
652
|
},
|
|
598
653
|
single: {
|
|
@@ -600,7 +655,6 @@ async function factory$1(injector) {
|
|
|
600
655
|
sections: [
|
|
601
656
|
{ id: 'basic-info', order: 1 },
|
|
602
657
|
{ id: 'performed-by', order: 2 },
|
|
603
|
-
{ id: 'additional', order: 3 },
|
|
604
658
|
],
|
|
605
659
|
properties: [
|
|
606
660
|
{ name: 'resourceId', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
|
|
@@ -608,42 +662,11 @@ async function factory$1(injector) {
|
|
|
608
662
|
{ name: 'performedBy', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
609
663
|
{ name: 'employeeId', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
|
|
610
664
|
{ name: 'thirdPartyId', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
|
|
611
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 6 } } } },
|
|
612
665
|
],
|
|
613
666
|
actions: [...entityMasterRecordActions()],
|
|
614
667
|
},
|
|
615
668
|
list: {
|
|
616
|
-
actions: [
|
|
617
|
-
{
|
|
618
|
-
title: '@general:actions.create.title',
|
|
619
|
-
command: 'create-entity',
|
|
620
|
-
priority: 'primary',
|
|
621
|
-
type: AXPSystemActionType.Create,
|
|
622
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
|
623
|
-
},
|
|
624
|
-
{
|
|
625
|
-
title: '@general:actions.delete-items.title',
|
|
626
|
-
command: 'delete-entity',
|
|
627
|
-
priority: 'primary',
|
|
628
|
-
type: AXPSystemActionType.Delete,
|
|
629
|
-
scope: AXPEntityCommandScope.Selected,
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
title: '@general:actions.view.title',
|
|
633
|
-
command: 'open-entity',
|
|
634
|
-
priority: 'secondary',
|
|
635
|
-
type: AXPSystemActionType.View,
|
|
636
|
-
scope: AXPEntityCommandScope.Individual,
|
|
637
|
-
default: true,
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
title: '@general:actions.delete.title',
|
|
641
|
-
command: 'delete-entity',
|
|
642
|
-
priority: 'secondary',
|
|
643
|
-
type: AXPSystemActionType.Delete,
|
|
644
|
-
scope: AXPEntityCommandScope.Individual,
|
|
645
|
-
},
|
|
646
|
-
],
|
|
669
|
+
actions: [...entityMasterCrudActions()],
|
|
647
670
|
views: [createAllQueryView({ sorts: [{ name: 'resourceId', dir: 'asc' }] })],
|
|
648
671
|
},
|
|
649
672
|
},
|
|
@@ -679,6 +702,10 @@ async function factory(injector) {
|
|
|
679
702
|
id: 'basic-info',
|
|
680
703
|
title: '@maintenance-management:maintenance-types.entities.maintenance-type.groups.basic-info',
|
|
681
704
|
},
|
|
705
|
+
{
|
|
706
|
+
id: 'questionnary-info',
|
|
707
|
+
title: '@maintenance-management:maintenance-types.entities.maintenance-type.groups.questionnary-info',
|
|
708
|
+
},
|
|
682
709
|
],
|
|
683
710
|
properties: [
|
|
684
711
|
{
|
|
@@ -687,15 +714,15 @@ async function factory(injector) {
|
|
|
687
714
|
schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },
|
|
688
715
|
},
|
|
689
716
|
{
|
|
690
|
-
name: '
|
|
691
|
-
title: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.
|
|
717
|
+
name: 'name',
|
|
718
|
+
title: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.name.title',
|
|
692
719
|
groupId: 'basic-info',
|
|
693
720
|
schema: {
|
|
694
721
|
dataType: 'string',
|
|
695
722
|
interface: {
|
|
696
723
|
type: AXPWidgetsCatalog.text,
|
|
697
724
|
options: {
|
|
698
|
-
placeholder: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.
|
|
725
|
+
placeholder: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.name.placeholder',
|
|
699
726
|
},
|
|
700
727
|
},
|
|
701
728
|
},
|
|
@@ -706,15 +733,15 @@ async function factory(injector) {
|
|
|
706
733
|
validations: [{ rule: 'required' }],
|
|
707
734
|
},
|
|
708
735
|
{
|
|
709
|
-
name: '
|
|
710
|
-
title: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.
|
|
736
|
+
name: 'title',
|
|
737
|
+
title: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.title.title',
|
|
711
738
|
groupId: 'basic-info',
|
|
712
739
|
schema: {
|
|
713
740
|
dataType: 'string',
|
|
714
741
|
interface: {
|
|
715
742
|
type: AXPWidgetsCatalog.text,
|
|
716
743
|
options: {
|
|
717
|
-
placeholder: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.
|
|
744
|
+
placeholder: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.title.placeholder',
|
|
718
745
|
},
|
|
719
746
|
},
|
|
720
747
|
},
|
|
@@ -724,30 +751,94 @@ async function factory(injector) {
|
|
|
724
751
|
},
|
|
725
752
|
validations: [{ rule: 'required' }],
|
|
726
753
|
},
|
|
754
|
+
{
|
|
755
|
+
name: 'questionnaireId',
|
|
756
|
+
title: '@maintenance-management:maintenance-types.entities.maintenance-type.fields.questionnaire-id.title',
|
|
757
|
+
groupId: 'questionnary-info',
|
|
758
|
+
schema: {
|
|
759
|
+
dataType: 'string',
|
|
760
|
+
interface: {
|
|
761
|
+
type: AXPWidgetsCatalog.lookup,
|
|
762
|
+
options: {
|
|
763
|
+
entity: `${RootConfig$2.module.name}.${RootConfig$2.entities.questionnaire.name}`,
|
|
764
|
+
textField: 'title',
|
|
765
|
+
valueField: 'id',
|
|
766
|
+
expose: [
|
|
767
|
+
{ source: 'id', target: 'questionnaire.id' },
|
|
768
|
+
{ source: 'title', target: 'questionnaire.title' },
|
|
769
|
+
],
|
|
770
|
+
},
|
|
771
|
+
},
|
|
772
|
+
},
|
|
773
|
+
},
|
|
727
774
|
],
|
|
728
|
-
columns: [{ name: '
|
|
775
|
+
columns: [{ name: 'name', options: { order: 1 } },
|
|
776
|
+
{ name: 'title', options: { order: 2 } },
|
|
777
|
+
{ name: 'questionnaireId', options: { dataPath: 'questionnaire.title', order: 3 } }],
|
|
778
|
+
commands: {
|
|
779
|
+
create: {
|
|
780
|
+
execute: async (data) => {
|
|
781
|
+
return { id: await dataService.insertOne(data) };
|
|
782
|
+
},
|
|
783
|
+
},
|
|
784
|
+
update: {
|
|
785
|
+
execute: async (data) => {
|
|
786
|
+
return await dataService.updateOne(data.id, data);
|
|
787
|
+
},
|
|
788
|
+
},
|
|
789
|
+
delete: {
|
|
790
|
+
execute: async (id) => {
|
|
791
|
+
return await dataService.deleteOne(id);
|
|
792
|
+
},
|
|
793
|
+
},
|
|
794
|
+
},
|
|
795
|
+
queries: {
|
|
796
|
+
byKey: {
|
|
797
|
+
execute: async (id) => {
|
|
798
|
+
return await dataService.getOne(id);
|
|
799
|
+
},
|
|
800
|
+
type: AXPEntityQueryType.Single,
|
|
801
|
+
},
|
|
802
|
+
list: {
|
|
803
|
+
execute: async (e) => {
|
|
804
|
+
return await dataService.query({
|
|
805
|
+
skip: e.skip,
|
|
806
|
+
take: e.take,
|
|
807
|
+
filter: e.filter,
|
|
808
|
+
sort: e.sort,
|
|
809
|
+
});
|
|
810
|
+
},
|
|
811
|
+
type: AXPEntityQueryType.List,
|
|
812
|
+
},
|
|
813
|
+
},
|
|
729
814
|
interfaces: {
|
|
730
815
|
master: {
|
|
731
816
|
create: {
|
|
732
|
-
sections: [{ id: 'basic-info' }
|
|
817
|
+
sections: [{ id: 'basic-info' },
|
|
818
|
+
{ id: 'questionnary-info' }],
|
|
733
819
|
properties: [
|
|
820
|
+
{ name: 'name', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
734
821
|
{ name: 'title', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
735
|
-
{ name: '
|
|
822
|
+
{ name: 'questionnaireId', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
736
823
|
],
|
|
737
824
|
},
|
|
738
825
|
update: {
|
|
739
|
-
sections: [{ id: 'basic-info' }
|
|
826
|
+
sections: [{ id: 'basic-info' },
|
|
827
|
+
{ id: 'questionnary-info' }],
|
|
740
828
|
properties: [
|
|
829
|
+
{ name: 'name', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
741
830
|
{ name: 'title', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
742
|
-
{ name: '
|
|
831
|
+
{ name: 'questionnaireId', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
743
832
|
],
|
|
744
833
|
},
|
|
745
834
|
single: {
|
|
746
835
|
title: '{{ title }}',
|
|
747
|
-
sections: [{ id: 'basic-info' }
|
|
836
|
+
sections: [{ id: 'basic-info' },
|
|
837
|
+
{ id: 'questionnary-info' }],
|
|
748
838
|
properties: [
|
|
839
|
+
{ name: 'name', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
749
840
|
{ name: 'title', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
750
|
-
{ name: '
|
|
841
|
+
{ name: 'questionnaireId', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
751
842
|
],
|
|
752
843
|
actions: [...entityMasterRecordActions()],
|
|
753
844
|
},
|