@acorex-platform/module-person-core-client 0.0.18 → 0.0.24
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/fesm2022/{acorex-platform-module-person-core-client-assign-existing-person-to-party.command-DO3Z5pPU.mjs → acorex-platform-module-person-core-client-assign-existing-person-to-party.command-CicvKND6.mjs} +13 -14
- package/fesm2022/acorex-platform-module-person-core-client-assign-existing-person-to-party.command-CicvKND6.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts.mjs +33 -1636
- package/fesm2022/acorex-platform-module-person-core-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-person-core-client-create-contact-with-new-person.command-CVNc2tNy.mjs → acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs} +17 -18
- package/fesm2022/acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client.mjs +43 -124
- package/fesm2022/acorex-platform-module-person-core-client.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-module-person-core-client-contracts.d.ts +42 -33
- package/types/acorex-platform-module-person-core-client.d.ts +6 -13
- package/fesm2022/acorex-platform-module-person-core-client-assign-existing-person-to-party.command-DO3Z5pPU.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-person-core-client-create-contact-with-new-person.command-CVNc2tNy.mjs.map +0 -1
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { AXPSystemActionType, resolveMultiLanguageString
|
|
2
|
-
import { AXPEntityCommandScope, entityMasterCreateAction, entityDetailsEditAction, entityOverrideDetailsViewAction
|
|
1
|
+
import { AXPSystemActionType, resolveMultiLanguageString } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { AXPEntityCommandScope, entityMasterCreateAction, entityDetailsEditAction, entityOverrideDetailsViewAction } from '@acorex-platform/framework-shared/entity';
|
|
3
3
|
import { get } from 'lodash';
|
|
4
|
-
import { RootConfig as RootConfig$1 } from '@acorex-platform/module-location-management-contracts';
|
|
5
|
-
import { AXPRelationshipKind } from '@acorex-platform/framework-shared/domain';
|
|
6
4
|
|
|
7
5
|
const AXMPersonCoreMenuKeys = {
|
|
8
6
|
Root: 'person-core',
|
|
@@ -17,34 +15,55 @@ const AXMPersonCoreMenuKeys = {
|
|
|
17
15
|
ContactRoles: 'person-core.contact-roles',
|
|
18
16
|
};
|
|
19
17
|
|
|
18
|
+
/**
|
|
19
|
+
* People & Organization capabilities used by this module.
|
|
20
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
21
|
+
*/
|
|
22
|
+
const AXPPeopleOrganizationPermissionKeys = {
|
|
23
|
+
Access: 'PeopleOrganization:Permission:Access',
|
|
24
|
+
ViewOrganization: 'PeopleOrganization:Permission:ViewOrganization',
|
|
25
|
+
MaintainOrganization: 'PeopleOrganization:Permission:MaintainOrganization',
|
|
26
|
+
MaintainTeams: 'PeopleOrganization:Permission:MaintainTeams',
|
|
27
|
+
MaintainEmployees: 'PeopleOrganization:Permission:MaintainEmployees',
|
|
28
|
+
ManageEmployeeActions: 'PeopleOrganization:Permission:ManageEmployeeActions',
|
|
29
|
+
MaintainPersons: 'PeopleOrganization:Permission:MaintainPersons',
|
|
30
|
+
MaintainAttendance: 'PeopleOrganization:Permission:MaintainAttendance',
|
|
31
|
+
ManageAttendanceActions: 'PeopleOrganization:Permission:ManageAttendanceActions',
|
|
32
|
+
DesignJobs: 'PeopleOrganization:Permission:DesignJobs',
|
|
33
|
+
Setup: 'PeopleOrganization:Permission:Setup',
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Prefer {@link AXPPeopleOrganizationPermissionKeys}.
|
|
37
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
38
|
+
*/
|
|
20
39
|
const AXMPersonCorePermissionKeys = {
|
|
21
40
|
PersonCore: {
|
|
22
41
|
Person: {
|
|
23
|
-
Management:
|
|
42
|
+
Management: AXPPeopleOrganizationPermissionKeys.MaintainPersons,
|
|
24
43
|
},
|
|
25
44
|
EducationLevel: {
|
|
26
|
-
Management:
|
|
45
|
+
Management: AXPPeopleOrganizationPermissionKeys.Setup,
|
|
27
46
|
},
|
|
28
47
|
Gender: {
|
|
29
|
-
Management:
|
|
48
|
+
Management: AXPPeopleOrganizationPermissionKeys.Setup,
|
|
30
49
|
},
|
|
31
50
|
MaritalStatus: {
|
|
32
|
-
Management:
|
|
51
|
+
Management: AXPPeopleOrganizationPermissionKeys.Setup,
|
|
33
52
|
},
|
|
34
53
|
PersonTitle: {
|
|
35
|
-
Management:
|
|
54
|
+
Management: AXPPeopleOrganizationPermissionKeys.Setup,
|
|
36
55
|
},
|
|
37
56
|
PersonIdentifierType: {
|
|
38
|
-
Management:
|
|
57
|
+
Management: AXPPeopleOrganizationPermissionKeys.Setup,
|
|
39
58
|
},
|
|
40
59
|
PersonRelationship: {
|
|
41
|
-
Management:
|
|
60
|
+
Management: AXPPeopleOrganizationPermissionKeys.Setup,
|
|
42
61
|
},
|
|
43
62
|
Religion: {
|
|
44
|
-
Management:
|
|
63
|
+
Management: AXPPeopleOrganizationPermissionKeys.Setup,
|
|
45
64
|
},
|
|
46
65
|
ContactRole: {
|
|
47
|
-
Management:
|
|
66
|
+
Management: AXPPeopleOrganizationPermissionKeys.Setup,
|
|
48
67
|
},
|
|
49
68
|
},
|
|
50
69
|
};
|
|
@@ -320,1640 +339,18 @@ function personRelationshipDetailsCreateActions(parentId) {
|
|
|
320
339
|
}
|
|
321
340
|
//#endregion
|
|
322
341
|
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region ---- Entity Factory ----
|
|
325
|
-
async function contactAssignmentFactory() {
|
|
326
|
-
const entityDef = {
|
|
327
|
-
module: RootConfig.module.name,
|
|
328
|
-
name: RootConfig.entities.contactAssignment.name,
|
|
329
|
-
title: RootConfig.entities.contactAssignment.title,
|
|
330
|
-
icon: RootConfig.entities.contactAssignment.icon,
|
|
331
|
-
formats: {
|
|
332
|
-
individual: RootConfig.entities.contactAssignment.title,
|
|
333
|
-
plural: RootConfig.entities.contactAssignment.titlePlural,
|
|
334
|
-
searchResult: {
|
|
335
|
-
title: '{{ context.eval("person.fullName") + " (" + context.eval("role.title", { pipes: ["translate"] }) + ")" }}',
|
|
336
|
-
description: '@person-core:contact-assignments.entities.contact-assignment.search-result-description',
|
|
337
|
-
},
|
|
338
|
-
},
|
|
339
|
-
plugins: [{ name: 'notes' }],
|
|
340
|
-
groups: [{ id: 'basic-info', title: '@general:terms.interface.basic-info' }],
|
|
341
|
-
properties: [
|
|
342
|
-
{
|
|
343
|
-
name: 'partyId',
|
|
344
|
-
title: '@person-core:contact-assignments.entities.contact-assignment.fields.party.title',
|
|
345
|
-
groupId: 'basic-info',
|
|
346
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
347
|
-
schema: {
|
|
348
|
-
dataType: 'string',
|
|
349
|
-
interface: {
|
|
350
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
351
|
-
options: {
|
|
352
|
-
entity: 'BusinessCore.Party',
|
|
353
|
-
multiple: false,
|
|
354
|
-
textField: 'title',
|
|
355
|
-
columns: ['title'],
|
|
356
|
-
expose: [
|
|
357
|
-
{ source: 'id', target: 'party.id' },
|
|
358
|
-
{ source: 'title', target: 'party.title' },
|
|
359
|
-
],
|
|
360
|
-
},
|
|
361
|
-
},
|
|
362
|
-
},
|
|
363
|
-
validations: [{ rule: 'required' }],
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
name: 'personId',
|
|
367
|
-
title: '@person-core:contact-assignments.entities.contact-assignment.fields.person.title',
|
|
368
|
-
groupId: 'basic-info',
|
|
369
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
370
|
-
schema: {
|
|
371
|
-
dataType: 'string',
|
|
372
|
-
interface: {
|
|
373
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
374
|
-
options: {
|
|
375
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.person.name}`,
|
|
376
|
-
multiple: false,
|
|
377
|
-
textField: 'fullName',
|
|
378
|
-
columns: ['fullName', 'phones', 'emails'],
|
|
379
|
-
allowCreate: 'quick',
|
|
380
|
-
expose: [
|
|
381
|
-
{ source: 'id', target: 'person.id' },
|
|
382
|
-
{ source: 'fullName', target: 'person.fullName' },
|
|
383
|
-
{ source: 'phones', target: 'person.phones' },
|
|
384
|
-
{ source: 'emails', target: 'person.emails' },
|
|
385
|
-
],
|
|
386
|
-
},
|
|
387
|
-
},
|
|
388
|
-
},
|
|
389
|
-
validations: [{ rule: 'required' }],
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
name: 'roleId',
|
|
393
|
-
title: '@person-core:contact-assignments.entities.contact-assignment.fields.role.title',
|
|
394
|
-
groupId: 'basic-info',
|
|
395
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
396
|
-
schema: {
|
|
397
|
-
dataType: 'string',
|
|
398
|
-
interface: {
|
|
399
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
400
|
-
options: {
|
|
401
|
-
look: 'select',
|
|
402
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.contactRole.name}`,
|
|
403
|
-
multiple: false,
|
|
404
|
-
allowCreate: 'quick',
|
|
405
|
-
expose: [
|
|
406
|
-
{ source: 'id', target: 'role.id' },
|
|
407
|
-
{ source: 'title', target: 'role.title' },
|
|
408
|
-
],
|
|
409
|
-
},
|
|
410
|
-
},
|
|
411
|
-
},
|
|
412
|
-
validations: [{ rule: 'required' }],
|
|
413
|
-
},
|
|
414
|
-
],
|
|
415
|
-
columns: [
|
|
416
|
-
{ name: 'personId', title: '@general:terms.people.contact', options: { dataPath: 'person.fullName' } },
|
|
417
|
-
{
|
|
418
|
-
name: 'roleId',
|
|
419
|
-
title: '@person-core:contact-assignments.entities.contact-assignment.fields.role.title',
|
|
420
|
-
options: { dataPath: 'role.title' },
|
|
421
|
-
},
|
|
422
|
-
{ name: 'person.phones', title: '@general:terms.communication.phones', options: { width: '200px' } },
|
|
423
|
-
{ name: 'person.emails', title: '@general:terms.communication.emails', options: { width: '200px' } },
|
|
424
|
-
],
|
|
425
|
-
interfaces: {
|
|
426
|
-
master: {
|
|
427
|
-
create: {
|
|
428
|
-
sections: [{ id: 'basic-info' }],
|
|
429
|
-
properties: [
|
|
430
|
-
{ name: 'partyId', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
431
|
-
{ name: 'personId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
432
|
-
{ name: 'roleId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
433
|
-
],
|
|
434
|
-
},
|
|
435
|
-
update: {
|
|
436
|
-
sections: [{ id: 'basic-info' }],
|
|
437
|
-
properties: [
|
|
438
|
-
{ name: 'partyId', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
439
|
-
{ name: 'personId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
440
|
-
{ name: 'roleId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
441
|
-
],
|
|
442
|
-
},
|
|
443
|
-
single: {
|
|
444
|
-
title: '{{ context.eval("person.fullName") + " - " + context.eval("role.title", { pipes: ["translate"] }) }}',
|
|
445
|
-
sections: [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }],
|
|
446
|
-
properties: [
|
|
447
|
-
{ name: 'partyId', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
448
|
-
{ name: 'personId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
449
|
-
{ name: 'roleId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
450
|
-
],
|
|
451
|
-
actions: [...entityMasterRecordActions()],
|
|
452
|
-
},
|
|
453
|
-
list: {
|
|
454
|
-
actions: [...entityMasterCrudActions()],
|
|
455
|
-
views: [
|
|
456
|
-
createAllQueryView({
|
|
457
|
-
sorts: [{ name: 'roleId', dir: 'asc' }],
|
|
458
|
-
}),
|
|
459
|
-
],
|
|
460
|
-
},
|
|
461
|
-
},
|
|
462
|
-
},
|
|
463
|
-
};
|
|
464
|
-
return entityDef;
|
|
465
|
-
}
|
|
466
|
-
//#endregion
|
|
467
|
-
|
|
468
|
-
//#endregion
|
|
469
|
-
|
|
470
|
-
//#endregion
|
|
471
|
-
//#region ---- Entity Factory ----
|
|
472
|
-
async function contactRoleFactory() {
|
|
473
|
-
const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
|
|
474
|
-
const createPropertyLayouts = [
|
|
475
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
476
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
|
|
477
|
-
];
|
|
478
|
-
const modifyPropertyLayouts = [
|
|
479
|
-
{ name: 'name', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
|
|
480
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
481
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
|
|
482
|
-
];
|
|
483
|
-
const entityDef = {
|
|
484
|
-
module: RootConfig.module.name,
|
|
485
|
-
name: RootConfig.entities.contactRole.name,
|
|
486
|
-
title: RootConfig.entities.contactRole.title,
|
|
487
|
-
icon: RootConfig.entities.contactRole.icon,
|
|
488
|
-
formats: {
|
|
489
|
-
individual: RootConfig.entities.contactRole.title,
|
|
490
|
-
plural: RootConfig.entities.contactRole.titlePlural,
|
|
491
|
-
searchResult: {
|
|
492
|
-
title: '{{ title }}',
|
|
493
|
-
description: '@person-core:contact-roles.entities.contact-role.search-result-description',
|
|
494
|
-
},
|
|
495
|
-
},
|
|
496
|
-
plugins: [
|
|
497
|
-
{ name: 'history' },
|
|
498
|
-
{ name: 'compare' },
|
|
499
|
-
{ name: 'clone' },
|
|
500
|
-
{ name: 'derived-name' },
|
|
501
|
-
{
|
|
502
|
-
name: 'unique-fields',
|
|
503
|
-
options: {
|
|
504
|
-
fields: 'name',
|
|
505
|
-
scope: 'global',
|
|
506
|
-
},
|
|
507
|
-
},
|
|
508
|
-
],
|
|
509
|
-
groups: [{ id: 'basic-info', title: '@general:terms.interface.basic-info' }],
|
|
510
|
-
properties: [
|
|
511
|
-
{
|
|
512
|
-
name: 'id',
|
|
513
|
-
title: '@general:terms.common.id',
|
|
514
|
-
groupId: 'basic-info',
|
|
515
|
-
schema: {
|
|
516
|
-
dataType: 'uuid',
|
|
517
|
-
visible: false,
|
|
518
|
-
readonly: true,
|
|
519
|
-
unique: { enabled: true },
|
|
520
|
-
},
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
name: 'name',
|
|
524
|
-
title: '@person-core:contact-roles.entities.contact-role.fields.name.title',
|
|
525
|
-
groupId: 'basic-info',
|
|
526
|
-
options: {
|
|
527
|
-
sort: { enabled: true },
|
|
528
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
529
|
-
},
|
|
530
|
-
schema: {
|
|
531
|
-
dataType: 'string',
|
|
532
|
-
interface: {
|
|
533
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
534
|
-
options: {
|
|
535
|
-
placeholder: '@person-core:contact-roles.entities.contact-role.fields.name.placeholder',
|
|
536
|
-
},
|
|
537
|
-
},
|
|
538
|
-
},
|
|
539
|
-
validations: [{ rule: 'required' }, { rule: 'variable-name' }],
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
name: 'title',
|
|
543
|
-
title: '@general:terms.common.title',
|
|
544
|
-
groupId: 'basic-info',
|
|
545
|
-
options: {
|
|
546
|
-
sort: { enabled: true },
|
|
547
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
548
|
-
},
|
|
549
|
-
schema: {
|
|
550
|
-
dataType: 'string',
|
|
551
|
-
interface: {
|
|
552
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
553
|
-
options: {
|
|
554
|
-
placeholder: '@person-core:contact-roles.entities.contact-role.fields.title.placeholder',
|
|
555
|
-
},
|
|
556
|
-
},
|
|
557
|
-
},
|
|
558
|
-
validations: [{ rule: 'required' }],
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
name: 'description',
|
|
562
|
-
title: '@general:terms.common.description',
|
|
563
|
-
groupId: 'basic-info',
|
|
564
|
-
options: {
|
|
565
|
-
sort: { enabled: false },
|
|
566
|
-
filter: { advance: { enabled: true }, inline: { enabled: false } },
|
|
567
|
-
},
|
|
568
|
-
schema: {
|
|
569
|
-
dataType: 'string',
|
|
570
|
-
interface: {
|
|
571
|
-
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
572
|
-
options: {
|
|
573
|
-
rows: 3,
|
|
574
|
-
placeholder: '@person-core:contact-roles.entities.contact-role.fields.description.placeholder',
|
|
575
|
-
},
|
|
576
|
-
},
|
|
577
|
-
},
|
|
578
|
-
},
|
|
579
|
-
],
|
|
580
|
-
columns: [
|
|
581
|
-
{ name: 'title', options: { width: '220px', order: 1 } },
|
|
582
|
-
{ name: 'name', options: { width: '140px', order: 2 } },
|
|
583
|
-
{ name: 'description', options: { width: '320px', order: 3 } },
|
|
584
|
-
],
|
|
585
|
-
interfaces: {
|
|
586
|
-
master: {
|
|
587
|
-
create: { sections, properties: createPropertyLayouts },
|
|
588
|
-
update: { sections, properties: modifyPropertyLayouts },
|
|
589
|
-
single: {
|
|
590
|
-
title: '{{ title }}',
|
|
591
|
-
sections,
|
|
592
|
-
properties: modifyPropertyLayouts,
|
|
593
|
-
actions: [...entityMasterRecordActions()],
|
|
594
|
-
},
|
|
595
|
-
list: {
|
|
596
|
-
actions: [...entityMasterCrudActions()],
|
|
597
|
-
views: [
|
|
598
|
-
createAllQueryView({
|
|
599
|
-
sorts: [{ name: 'title', dir: 'asc' }],
|
|
600
|
-
}),
|
|
601
|
-
],
|
|
602
|
-
},
|
|
603
|
-
},
|
|
604
|
-
},
|
|
605
|
-
};
|
|
606
|
-
return entityDef;
|
|
607
|
-
}
|
|
608
|
-
//#endregion
|
|
609
|
-
|
|
610
|
-
//#endregion
|
|
611
|
-
|
|
612
|
-
//#endregion
|
|
613
|
-
//#region ---- Entity Factory ----
|
|
614
|
-
async function educationLevelFactory() {
|
|
615
|
-
const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
|
|
616
|
-
const propertyLayouts = [
|
|
617
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
618
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
|
|
619
|
-
];
|
|
620
|
-
const entityDef = {
|
|
621
|
-
module: RootConfig.module.name,
|
|
622
|
-
name: RootConfig.entities.educationLevel.name,
|
|
623
|
-
title: RootConfig.entities.educationLevel.title,
|
|
624
|
-
icon: RootConfig.entities.educationLevel.icon,
|
|
625
|
-
formats: {
|
|
626
|
-
individual: RootConfig.entities.educationLevel.title,
|
|
627
|
-
plural: RootConfig.entities.educationLevel.titlePlural,
|
|
628
|
-
searchResult: {
|
|
629
|
-
title: '{{ title }}',
|
|
630
|
-
description: RootConfig.module.title,
|
|
631
|
-
},
|
|
632
|
-
},
|
|
633
|
-
plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'clone' }],
|
|
634
|
-
groups: [
|
|
635
|
-
{
|
|
636
|
-
id: 'basic-info',
|
|
637
|
-
title: '@person-core:education-levels.entities.education-level.groups.basic-info',
|
|
638
|
-
},
|
|
639
|
-
],
|
|
640
|
-
properties: [
|
|
641
|
-
{
|
|
642
|
-
name: 'id',
|
|
643
|
-
title: '@general:terms.common.id',
|
|
644
|
-
groupId: 'basic-info',
|
|
645
|
-
schema: {
|
|
646
|
-
dataType: 'uuid',
|
|
647
|
-
visible: false,
|
|
648
|
-
readonly: true,
|
|
649
|
-
unique: { enabled: true },
|
|
650
|
-
},
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
name: 'title',
|
|
654
|
-
title: '@general:terms.common.title',
|
|
655
|
-
groupId: 'basic-info',
|
|
656
|
-
options: {
|
|
657
|
-
sort: { enabled: true },
|
|
658
|
-
filter: {
|
|
659
|
-
advance: { enabled: true },
|
|
660
|
-
inline: { enabled: true },
|
|
661
|
-
},
|
|
662
|
-
},
|
|
663
|
-
schema: {
|
|
664
|
-
dataType: 'string',
|
|
665
|
-
interface: {
|
|
666
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
667
|
-
options: {
|
|
668
|
-
placeholder: '@person-core:education-levels.entities.education-level.fields.title.placeholder',
|
|
669
|
-
},
|
|
670
|
-
},
|
|
671
|
-
},
|
|
672
|
-
validations: [{ rule: 'required' }],
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
name: 'description',
|
|
676
|
-
title: '@general:terms.common.description',
|
|
677
|
-
groupId: 'basic-info',
|
|
678
|
-
schema: {
|
|
679
|
-
dataType: 'string',
|
|
680
|
-
interface: {
|
|
681
|
-
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
682
|
-
options: {
|
|
683
|
-
rows: 3,
|
|
684
|
-
placeholder: '@person-core:education-levels.entities.education-level.fields.description.placeholder',
|
|
685
|
-
},
|
|
686
|
-
},
|
|
687
|
-
},
|
|
688
|
-
},
|
|
689
|
-
],
|
|
690
|
-
columns: [
|
|
691
|
-
{ name: 'title', options: { width: '220px', order: 1 } },
|
|
692
|
-
{ name: 'description', options: { width: '280px', order: 2 } },
|
|
693
|
-
],
|
|
694
|
-
interfaces: {
|
|
695
|
-
master: {
|
|
696
|
-
create: {
|
|
697
|
-
sections,
|
|
698
|
-
properties: propertyLayouts,
|
|
699
|
-
},
|
|
700
|
-
update: {
|
|
701
|
-
sections,
|
|
702
|
-
properties: propertyLayouts,
|
|
703
|
-
},
|
|
704
|
-
single: {
|
|
705
|
-
title: '{{ title }}',
|
|
706
|
-
sections,
|
|
707
|
-
properties: propertyLayouts,
|
|
708
|
-
actions: [...entityMasterRecordActions()],
|
|
709
|
-
},
|
|
710
|
-
list: {
|
|
711
|
-
actions: [...entityMasterCrudActions()],
|
|
712
|
-
views: [
|
|
713
|
-
createAllQueryView({
|
|
714
|
-
sorts: [{ name: 'title', dir: 'asc' }],
|
|
715
|
-
}),
|
|
716
|
-
],
|
|
717
|
-
},
|
|
718
|
-
},
|
|
719
|
-
},
|
|
720
|
-
};
|
|
721
|
-
return entityDef;
|
|
722
|
-
}
|
|
723
342
|
//#endregion
|
|
724
343
|
|
|
725
344
|
//#endregion
|
|
726
345
|
|
|
727
|
-
//#endregion
|
|
728
|
-
//#region ---- Entity Factory ----
|
|
729
|
-
async function genderFactory() {
|
|
730
|
-
const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
|
|
731
|
-
const propertyLayouts = [
|
|
732
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
733
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
|
|
734
|
-
];
|
|
735
|
-
const entityDef = {
|
|
736
|
-
module: RootConfig.module.name,
|
|
737
|
-
name: RootConfig.entities.gender.name,
|
|
738
|
-
title: RootConfig.entities.gender.title,
|
|
739
|
-
icon: RootConfig.entities.gender.icon,
|
|
740
|
-
formats: {
|
|
741
|
-
individual: RootConfig.entities.gender.title,
|
|
742
|
-
plural: RootConfig.entities.gender.titlePlural,
|
|
743
|
-
searchResult: {
|
|
744
|
-
title: '{{ title }}',
|
|
745
|
-
description: RootConfig.module.title,
|
|
746
|
-
},
|
|
747
|
-
},
|
|
748
|
-
plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'clone' }],
|
|
749
|
-
groups: [
|
|
750
|
-
{
|
|
751
|
-
id: 'basic-info',
|
|
752
|
-
title: '@person-core:genders.entities.gender.groups.basic-info',
|
|
753
|
-
},
|
|
754
|
-
],
|
|
755
|
-
properties: [
|
|
756
|
-
{
|
|
757
|
-
name: 'id',
|
|
758
|
-
title: '@general:terms.common.id',
|
|
759
|
-
groupId: 'basic-info',
|
|
760
|
-
schema: {
|
|
761
|
-
dataType: 'uuid',
|
|
762
|
-
visible: false,
|
|
763
|
-
readonly: true,
|
|
764
|
-
unique: { enabled: true },
|
|
765
|
-
},
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
name: 'title',
|
|
769
|
-
title: '@general:terms.common.title',
|
|
770
|
-
groupId: 'basic-info',
|
|
771
|
-
options: {
|
|
772
|
-
sort: { enabled: true },
|
|
773
|
-
filter: {
|
|
774
|
-
advance: { enabled: true },
|
|
775
|
-
inline: { enabled: true },
|
|
776
|
-
},
|
|
777
|
-
},
|
|
778
|
-
schema: {
|
|
779
|
-
dataType: 'string',
|
|
780
|
-
interface: {
|
|
781
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
782
|
-
options: {
|
|
783
|
-
placeholder: '@person-core:genders.entities.gender.fields.title.placeholder',
|
|
784
|
-
},
|
|
785
|
-
},
|
|
786
|
-
},
|
|
787
|
-
validations: [{ rule: 'required' }],
|
|
788
|
-
},
|
|
789
|
-
{
|
|
790
|
-
name: 'description',
|
|
791
|
-
title: '@general:terms.common.description',
|
|
792
|
-
groupId: 'basic-info',
|
|
793
|
-
schema: {
|
|
794
|
-
dataType: 'string',
|
|
795
|
-
interface: {
|
|
796
|
-
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
797
|
-
options: {
|
|
798
|
-
rows: 3,
|
|
799
|
-
placeholder: '@person-core:genders.entities.gender.fields.description.placeholder',
|
|
800
|
-
},
|
|
801
|
-
},
|
|
802
|
-
},
|
|
803
|
-
},
|
|
804
|
-
],
|
|
805
|
-
columns: [
|
|
806
|
-
{ name: 'title', options: { width: '220px', order: 1 } },
|
|
807
|
-
{ name: 'description', options: { width: '280px', order: 2 } },
|
|
808
|
-
],
|
|
809
|
-
interfaces: {
|
|
810
|
-
master: {
|
|
811
|
-
create: {
|
|
812
|
-
sections,
|
|
813
|
-
properties: propertyLayouts,
|
|
814
|
-
},
|
|
815
|
-
update: {
|
|
816
|
-
sections,
|
|
817
|
-
properties: propertyLayouts,
|
|
818
|
-
},
|
|
819
|
-
single: {
|
|
820
|
-
title: '{{ title }}',
|
|
821
|
-
sections,
|
|
822
|
-
properties: propertyLayouts,
|
|
823
|
-
actions: [...entityMasterRecordActions()],
|
|
824
|
-
},
|
|
825
|
-
list: {
|
|
826
|
-
actions: [...entityMasterCrudActions()],
|
|
827
|
-
views: [
|
|
828
|
-
createAllQueryView({
|
|
829
|
-
sorts: [{ name: 'title', dir: 'asc' }],
|
|
830
|
-
}),
|
|
831
|
-
],
|
|
832
|
-
},
|
|
833
|
-
},
|
|
834
|
-
},
|
|
835
|
-
};
|
|
836
|
-
return entityDef;
|
|
837
|
-
}
|
|
838
346
|
//#endregion
|
|
839
347
|
|
|
840
348
|
//#endregion
|
|
841
349
|
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region ---- Entity Factory ----
|
|
844
|
-
async function maritalStatusFactory() {
|
|
845
|
-
const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
|
|
846
|
-
const propertyLayouts = [
|
|
847
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
848
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
|
|
849
|
-
];
|
|
850
|
-
const entityDef = {
|
|
851
|
-
module: RootConfig.module.name,
|
|
852
|
-
name: RootConfig.entities.maritalStatus.name,
|
|
853
|
-
title: RootConfig.entities.maritalStatus.title,
|
|
854
|
-
icon: RootConfig.entities.maritalStatus.icon,
|
|
855
|
-
formats: {
|
|
856
|
-
individual: RootConfig.entities.maritalStatus.title,
|
|
857
|
-
plural: RootConfig.entities.maritalStatus.titlePlural,
|
|
858
|
-
searchResult: {
|
|
859
|
-
title: '{{ title }}',
|
|
860
|
-
description: RootConfig.module.title,
|
|
861
|
-
},
|
|
862
|
-
},
|
|
863
|
-
plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'clone' }],
|
|
864
|
-
groups: [
|
|
865
|
-
{
|
|
866
|
-
id: 'basic-info',
|
|
867
|
-
title: '@person-core:marital-statuses.entities.marital-status.groups.basic-info',
|
|
868
|
-
},
|
|
869
|
-
],
|
|
870
|
-
properties: [
|
|
871
|
-
{
|
|
872
|
-
name: 'id',
|
|
873
|
-
title: '@general:terms.common.id',
|
|
874
|
-
groupId: 'basic-info',
|
|
875
|
-
schema: {
|
|
876
|
-
dataType: 'uuid',
|
|
877
|
-
visible: false,
|
|
878
|
-
readonly: true,
|
|
879
|
-
unique: { enabled: true },
|
|
880
|
-
},
|
|
881
|
-
},
|
|
882
|
-
{
|
|
883
|
-
name: 'title',
|
|
884
|
-
title: '@general:terms.common.title',
|
|
885
|
-
groupId: 'basic-info',
|
|
886
|
-
options: {
|
|
887
|
-
sort: { enabled: true },
|
|
888
|
-
filter: {
|
|
889
|
-
advance: { enabled: true },
|
|
890
|
-
inline: { enabled: true },
|
|
891
|
-
},
|
|
892
|
-
},
|
|
893
|
-
schema: {
|
|
894
|
-
dataType: 'string',
|
|
895
|
-
interface: {
|
|
896
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
897
|
-
options: {
|
|
898
|
-
placeholder: '@person-core:marital-statuses.entities.marital-status.fields.title.placeholder',
|
|
899
|
-
},
|
|
900
|
-
},
|
|
901
|
-
},
|
|
902
|
-
validations: [{ rule: 'required' }],
|
|
903
|
-
},
|
|
904
|
-
{
|
|
905
|
-
name: 'description',
|
|
906
|
-
title: '@general:terms.common.description',
|
|
907
|
-
groupId: 'basic-info',
|
|
908
|
-
schema: {
|
|
909
|
-
dataType: 'string',
|
|
910
|
-
interface: {
|
|
911
|
-
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
912
|
-
options: {
|
|
913
|
-
rows: 3,
|
|
914
|
-
placeholder: '@person-core:marital-statuses.entities.marital-status.fields.description.placeholder',
|
|
915
|
-
},
|
|
916
|
-
},
|
|
917
|
-
},
|
|
918
|
-
},
|
|
919
|
-
],
|
|
920
|
-
columns: [
|
|
921
|
-
{ name: 'title', options: { width: '220px', order: 1 } },
|
|
922
|
-
{ name: 'description', options: { width: '280px', order: 2 } },
|
|
923
|
-
],
|
|
924
|
-
interfaces: {
|
|
925
|
-
master: {
|
|
926
|
-
create: {
|
|
927
|
-
sections,
|
|
928
|
-
properties: propertyLayouts,
|
|
929
|
-
},
|
|
930
|
-
update: {
|
|
931
|
-
sections,
|
|
932
|
-
properties: propertyLayouts,
|
|
933
|
-
},
|
|
934
|
-
single: {
|
|
935
|
-
title: '{{ title }}',
|
|
936
|
-
sections,
|
|
937
|
-
properties: propertyLayouts,
|
|
938
|
-
actions: [...entityMasterRecordActions()],
|
|
939
|
-
},
|
|
940
|
-
list: {
|
|
941
|
-
actions: [...entityMasterCrudActions()],
|
|
942
|
-
views: [
|
|
943
|
-
createAllQueryView({
|
|
944
|
-
sorts: [{ name: 'title', dir: 'asc' }],
|
|
945
|
-
}),
|
|
946
|
-
],
|
|
947
|
-
},
|
|
948
|
-
},
|
|
949
|
-
},
|
|
950
|
-
};
|
|
951
|
-
return entityDef;
|
|
952
|
-
}
|
|
953
350
|
//#endregion
|
|
954
351
|
|
|
955
352
|
//#endregion
|
|
956
353
|
|
|
957
|
-
//#endregion
|
|
958
|
-
//#region ---- Repeater Children ----
|
|
959
|
-
const PHONES_REPEATER_CHILDREN = [
|
|
960
|
-
{
|
|
961
|
-
type: AXPWidgetsList.Editors.ContactBox,
|
|
962
|
-
mode: 'edit',
|
|
963
|
-
options: { type: 'phone', placeholder: '@person-core:persons.entities.person.fields.phone.placeholder' },
|
|
964
|
-
},
|
|
965
|
-
];
|
|
966
|
-
const EMAILS_REPEATER_CHILDREN = [
|
|
967
|
-
{
|
|
968
|
-
type: AXPWidgetsList.Editors.ContactBox,
|
|
969
|
-
mode: 'edit',
|
|
970
|
-
options: { type: 'email', placeholder: '@person-core:persons.entities.person.fields.email.placeholder' },
|
|
971
|
-
},
|
|
972
|
-
];
|
|
973
|
-
const LOCATION_ROLE_ENTITY = `${RootConfig$1.module.name}.${RootConfig$1.entities.locationRole.name}`;
|
|
974
|
-
const ADDRESSES_REPEATER_CHILDREN = [
|
|
975
|
-
{
|
|
976
|
-
type: AXPWidgetsList.Editors.AddressBox,
|
|
977
|
-
mode: 'edit',
|
|
978
|
-
options: {
|
|
979
|
-
mode: 'expandable',
|
|
980
|
-
hasLabel: true,
|
|
981
|
-
labelEntity: LOCATION_ROLE_ENTITY,
|
|
982
|
-
},
|
|
983
|
-
},
|
|
984
|
-
];
|
|
985
|
-
//#endregion
|
|
986
|
-
//#region ---- Entity Factory ----
|
|
987
|
-
async function personFactory() {
|
|
988
|
-
const entityDef = {
|
|
989
|
-
module: RootConfig.module.name,
|
|
990
|
-
name: RootConfig.entities.person.name,
|
|
991
|
-
title: RootConfig.entities.person.title,
|
|
992
|
-
icon: RootConfig.entities.person.icon,
|
|
993
|
-
formats: {
|
|
994
|
-
individual: RootConfig.entities.person.title,
|
|
995
|
-
plural: RootConfig.entities.person.titlePlural,
|
|
996
|
-
displayName: '@general:terms.common.profile',
|
|
997
|
-
searchResult: {
|
|
998
|
-
title: '{{ fullName }} ',
|
|
999
|
-
description: '@person-core:persons.entities.person.search-result-description',
|
|
1000
|
-
},
|
|
1001
|
-
},
|
|
1002
|
-
plugins: [
|
|
1003
|
-
{ name: 'history' },
|
|
1004
|
-
{ name: 'archive' },
|
|
1005
|
-
{
|
|
1006
|
-
name: 'computed-property',
|
|
1007
|
-
options: {
|
|
1008
|
-
fields: [
|
|
1009
|
-
{
|
|
1010
|
-
name: 'fullName',
|
|
1011
|
-
title: '@general:terms.common.full-name',
|
|
1012
|
-
value: '{{ context.eval("firstName") + " " + context.eval("lastName") }}',
|
|
1013
|
-
group: { id: 'profile' },
|
|
1014
|
-
visible: false,
|
|
1015
|
-
showAs: { type: AXPWidgetsCatalog.text },
|
|
1016
|
-
},
|
|
1017
|
-
],
|
|
1018
|
-
},
|
|
1019
|
-
},
|
|
1020
|
-
],
|
|
1021
|
-
groups: [
|
|
1022
|
-
{
|
|
1023
|
-
id: 'profile',
|
|
1024
|
-
title: '@person-core:persons.entities.person.groups.profile',
|
|
1025
|
-
icon: 'fa-light fa-user',
|
|
1026
|
-
},
|
|
1027
|
-
{
|
|
1028
|
-
id: 'image',
|
|
1029
|
-
title: '@person-core:persons.entities.person.groups.image',
|
|
1030
|
-
icon: 'fa-light fa-image',
|
|
1031
|
-
},
|
|
1032
|
-
{
|
|
1033
|
-
id: 'phones',
|
|
1034
|
-
title: '@person-core:persons.entities.person.groups.phones',
|
|
1035
|
-
icon: 'fa-light fa-phone',
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
id: 'emails',
|
|
1039
|
-
title: '@person-core:persons.entities.person.groups.emails',
|
|
1040
|
-
icon: 'fa-light fa-envelope',
|
|
1041
|
-
},
|
|
1042
|
-
{
|
|
1043
|
-
id: 'addresses',
|
|
1044
|
-
title: '@person-core:persons.entities.person.groups.addresses',
|
|
1045
|
-
icon: 'fa-light fa-location-dot',
|
|
1046
|
-
},
|
|
1047
|
-
],
|
|
1048
|
-
properties: [
|
|
1049
|
-
{
|
|
1050
|
-
name: 'personTitleId',
|
|
1051
|
-
title: '@person-core:persons.entities.person.fields.person-title.title',
|
|
1052
|
-
groupId: 'profile',
|
|
1053
|
-
options: {
|
|
1054
|
-
sort: { enabled: true },
|
|
1055
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1056
|
-
},
|
|
1057
|
-
schema: {
|
|
1058
|
-
dataType: 'string',
|
|
1059
|
-
interface: {
|
|
1060
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
1061
|
-
options: {
|
|
1062
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.personTitle.name}`,
|
|
1063
|
-
valueField: 'id',
|
|
1064
|
-
textField: 'title',
|
|
1065
|
-
look: 'select',
|
|
1066
|
-
allowCreate: 'quick',
|
|
1067
|
-
expose: [
|
|
1068
|
-
{ source: 'id', target: 'personTitle.id' },
|
|
1069
|
-
{ source: 'title', target: 'personTitle.title' },
|
|
1070
|
-
],
|
|
1071
|
-
},
|
|
1072
|
-
},
|
|
1073
|
-
},
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
name: 'firstName',
|
|
1077
|
-
title: '@general:terms.contact.first-name',
|
|
1078
|
-
groupId: 'profile',
|
|
1079
|
-
options: {
|
|
1080
|
-
sort: { enabled: true },
|
|
1081
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1082
|
-
},
|
|
1083
|
-
schema: {
|
|
1084
|
-
dataType: 'string',
|
|
1085
|
-
interface: {
|
|
1086
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
1087
|
-
},
|
|
1088
|
-
},
|
|
1089
|
-
validations: [{ rule: 'required' }],
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
name: 'lastName',
|
|
1093
|
-
title: '@general:terms.contact.last-name',
|
|
1094
|
-
groupId: 'profile',
|
|
1095
|
-
options: {
|
|
1096
|
-
sort: { enabled: true },
|
|
1097
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1098
|
-
},
|
|
1099
|
-
schema: {
|
|
1100
|
-
dataType: 'string',
|
|
1101
|
-
interface: {
|
|
1102
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
1103
|
-
},
|
|
1104
|
-
},
|
|
1105
|
-
validations: [{ rule: 'required' }],
|
|
1106
|
-
},
|
|
1107
|
-
{
|
|
1108
|
-
name: 'birthDate',
|
|
1109
|
-
title: '@person-core:persons.entities.person.fields.birth-date.title',
|
|
1110
|
-
groupId: 'profile',
|
|
1111
|
-
options: {
|
|
1112
|
-
sort: { enabled: true },
|
|
1113
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1114
|
-
},
|
|
1115
|
-
schema: {
|
|
1116
|
-
dataType: 'date',
|
|
1117
|
-
interface: {
|
|
1118
|
-
type: AXPWidgetsCatalog.dateTime,
|
|
1119
|
-
options: { format: 'date' },
|
|
1120
|
-
},
|
|
1121
|
-
},
|
|
1122
|
-
},
|
|
1123
|
-
{
|
|
1124
|
-
name: 'image',
|
|
1125
|
-
title: '@person-core:persons.entities.person.groups.image',
|
|
1126
|
-
groupId: 'image',
|
|
1127
|
-
schema: {
|
|
1128
|
-
dataType: 'string',
|
|
1129
|
-
interface: {
|
|
1130
|
-
type: AXPWidgetsList.Advanced.Image,
|
|
1131
|
-
options: {
|
|
1132
|
-
type: 'profile-photo',
|
|
1133
|
-
},
|
|
1134
|
-
},
|
|
1135
|
-
},
|
|
1136
|
-
},
|
|
1137
|
-
{
|
|
1138
|
-
name: 'genderId',
|
|
1139
|
-
title: '@person-core:persons.entities.person.fields.gender.title',
|
|
1140
|
-
groupId: 'profile',
|
|
1141
|
-
options: {
|
|
1142
|
-
sort: { enabled: true },
|
|
1143
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1144
|
-
},
|
|
1145
|
-
schema: {
|
|
1146
|
-
dataType: 'string',
|
|
1147
|
-
interface: {
|
|
1148
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
1149
|
-
options: {
|
|
1150
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.gender.name}`,
|
|
1151
|
-
valueField: 'id',
|
|
1152
|
-
textField: 'title',
|
|
1153
|
-
look: 'select',
|
|
1154
|
-
allowCreate: 'quick',
|
|
1155
|
-
expose: [
|
|
1156
|
-
{ source: 'id', target: 'gender.id' },
|
|
1157
|
-
{ source: 'title', target: 'gender.title' },
|
|
1158
|
-
],
|
|
1159
|
-
},
|
|
1160
|
-
},
|
|
1161
|
-
},
|
|
1162
|
-
},
|
|
1163
|
-
{
|
|
1164
|
-
name: 'identityNumber',
|
|
1165
|
-
title: '@person-core:persons.entities.person.fields.identity-number.title',
|
|
1166
|
-
groupId: 'profile',
|
|
1167
|
-
options: {
|
|
1168
|
-
sort: { enabled: true },
|
|
1169
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1170
|
-
},
|
|
1171
|
-
schema: {
|
|
1172
|
-
dataType: 'string',
|
|
1173
|
-
interface: {
|
|
1174
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
1175
|
-
options: {
|
|
1176
|
-
placeholder: '@person-core:persons.entities.person.fields.identity-number.placeholder',
|
|
1177
|
-
},
|
|
1178
|
-
},
|
|
1179
|
-
},
|
|
1180
|
-
},
|
|
1181
|
-
{
|
|
1182
|
-
name: 'maritalStatusId',
|
|
1183
|
-
title: '@person-core:persons.entities.person.fields.marital-status.title',
|
|
1184
|
-
groupId: 'profile',
|
|
1185
|
-
options: {
|
|
1186
|
-
sort: { enabled: true },
|
|
1187
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1188
|
-
},
|
|
1189
|
-
schema: {
|
|
1190
|
-
dataType: 'string',
|
|
1191
|
-
interface: {
|
|
1192
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
1193
|
-
options: {
|
|
1194
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.maritalStatus.name}`,
|
|
1195
|
-
valueField: 'id',
|
|
1196
|
-
textField: 'title',
|
|
1197
|
-
look: 'select',
|
|
1198
|
-
allowCreate: 'quick',
|
|
1199
|
-
expose: [
|
|
1200
|
-
{ source: 'id', target: 'maritalStatus.id' },
|
|
1201
|
-
{ source: 'title', target: 'maritalStatus.title' },
|
|
1202
|
-
],
|
|
1203
|
-
},
|
|
1204
|
-
},
|
|
1205
|
-
},
|
|
1206
|
-
},
|
|
1207
|
-
{
|
|
1208
|
-
name: 'educationLevelId',
|
|
1209
|
-
title: '@person-core:persons.entities.person.fields.education-level.title',
|
|
1210
|
-
groupId: 'profile',
|
|
1211
|
-
options: {
|
|
1212
|
-
sort: { enabled: true },
|
|
1213
|
-
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1214
|
-
},
|
|
1215
|
-
schema: {
|
|
1216
|
-
dataType: 'string',
|
|
1217
|
-
interface: {
|
|
1218
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
1219
|
-
options: {
|
|
1220
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.educationLevel.name}`,
|
|
1221
|
-
valueField: 'id',
|
|
1222
|
-
textField: 'title',
|
|
1223
|
-
look: 'select',
|
|
1224
|
-
allowCreate: 'quick',
|
|
1225
|
-
expose: [
|
|
1226
|
-
{ source: 'id', target: 'educationLevel.id' },
|
|
1227
|
-
{ source: 'title', target: 'educationLevel.title' },
|
|
1228
|
-
],
|
|
1229
|
-
},
|
|
1230
|
-
},
|
|
1231
|
-
},
|
|
1232
|
-
},
|
|
1233
|
-
{
|
|
1234
|
-
name: 'phones',
|
|
1235
|
-
title: '@person-core:persons.entities.person.groups.phones',
|
|
1236
|
-
groupId: 'phones',
|
|
1237
|
-
schema: {
|
|
1238
|
-
defaultValue: [],
|
|
1239
|
-
dataType: 'array',
|
|
1240
|
-
interface: {
|
|
1241
|
-
type: AXPWidgetsList.Layouts.RepeaterLayout,
|
|
1242
|
-
options: { hasControls: true },
|
|
1243
|
-
children: [...PHONES_REPEATER_CHILDREN],
|
|
1244
|
-
},
|
|
1245
|
-
},
|
|
1246
|
-
},
|
|
1247
|
-
{
|
|
1248
|
-
name: 'emails',
|
|
1249
|
-
title: '@person-core:persons.entities.person.groups.emails',
|
|
1250
|
-
groupId: 'emails',
|
|
1251
|
-
schema: {
|
|
1252
|
-
defaultValue: [],
|
|
1253
|
-
dataType: 'array',
|
|
1254
|
-
interface: {
|
|
1255
|
-
type: AXPWidgetsList.Layouts.RepeaterLayout,
|
|
1256
|
-
options: { hasControls: true },
|
|
1257
|
-
children: [...EMAILS_REPEATER_CHILDREN],
|
|
1258
|
-
},
|
|
1259
|
-
},
|
|
1260
|
-
},
|
|
1261
|
-
{
|
|
1262
|
-
name: 'addresses',
|
|
1263
|
-
title: '@person-core:persons.entities.person.groups.addresses',
|
|
1264
|
-
groupId: 'addresses',
|
|
1265
|
-
schema: {
|
|
1266
|
-
defaultValue: [],
|
|
1267
|
-
dataType: 'array',
|
|
1268
|
-
interface: {
|
|
1269
|
-
type: AXPWidgetsList.Layouts.RepeaterLayout,
|
|
1270
|
-
options: { hasControls: true },
|
|
1271
|
-
children: [...ADDRESSES_REPEATER_CHILDREN],
|
|
1272
|
-
},
|
|
1273
|
-
},
|
|
1274
|
-
},
|
|
1275
|
-
],
|
|
1276
|
-
columns: [
|
|
1277
|
-
{ name: 'firstName', options: { width: '200px' } },
|
|
1278
|
-
{ name: 'lastName', options: { width: '200px' } },
|
|
1279
|
-
{
|
|
1280
|
-
name: 'fullName',
|
|
1281
|
-
showAs: { type: AXPWidgetsCatalog.text, options: { visible: false } },
|
|
1282
|
-
options: { width: '250px' },
|
|
1283
|
-
},
|
|
1284
|
-
{ name: 'personTitleId', options: { dataPath: 'personTitle.title', visible: false } },
|
|
1285
|
-
{ name: 'phones', options: { width: '200px' } },
|
|
1286
|
-
{ name: 'emails', options: { width: '200px' } },
|
|
1287
|
-
{ name: 'addresses', options: { width: '250px' } },
|
|
1288
|
-
{ name: 'birthDate', options: { visible: false } },
|
|
1289
|
-
{ name: 'genderId', options: { dataPath: 'gender.title', visible: false } },
|
|
1290
|
-
{ name: 'identityNumber', options: { visible: false } },
|
|
1291
|
-
{ name: 'maritalStatusId', options: { dataPath: 'maritalStatus.title', visible: false } },
|
|
1292
|
-
{ name: 'educationLevelId', options: { dataPath: 'educationLevel.title', visible: false } },
|
|
1293
|
-
],
|
|
1294
|
-
relatedEntities: [
|
|
1295
|
-
{
|
|
1296
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.personRelationship.name}`,
|
|
1297
|
-
title: '@person-core:persons.entities.person.related-entities.relationships.title',
|
|
1298
|
-
columns: ['toPersonId', 'typeId', 'toPerson.phones', 'toPerson.emails'],
|
|
1299
|
-
conditions: [{ name: 'fromPersonId', operator: { type: 'equal' }, value: '{{ context.eval("id") }}' }],
|
|
1300
|
-
persistence: {
|
|
1301
|
-
foreignKeyField: 'fromPersonId',
|
|
1302
|
-
kind: AXPRelationshipKind.Composition,
|
|
1303
|
-
onDelete: null,
|
|
1304
|
-
},
|
|
1305
|
-
actions: [...entityDetailsCrudActions('fromPersonId')],
|
|
1306
|
-
layout: { type: 'page-list', position: 'after', order: 1 },
|
|
1307
|
-
},
|
|
1308
|
-
],
|
|
1309
|
-
interfaces: {
|
|
1310
|
-
master: {
|
|
1311
|
-
create: {
|
|
1312
|
-
sections: [
|
|
1313
|
-
{ id: 'profile', order: 1, layout: { positions: { lg: { colSpan: 8, colStart: 1 } } } },
|
|
1314
|
-
{ id: 'image', order: 2, layout: { positions: { lg: { colSpan: 4, colStart: 9 } } } },
|
|
1315
|
-
{ id: 'phones', order: 5, layout: { positions: { lg: { colSpan: 6, colStart: 1 } } } },
|
|
1316
|
-
{ id: 'emails', order: 6, layout: { positions: { lg: { colSpan: 6, colStart: 7 } } } },
|
|
1317
|
-
{ id: 'addresses', order: 7, layout: { positions: { lg: { colSpan: 12, colStart: 1 } } } },
|
|
1318
|
-
],
|
|
1319
|
-
properties: [
|
|
1320
|
-
{ name: 'personTitleId', layout: { positions: { lg: { colSpan: 4, order: 0 } } } },
|
|
1321
|
-
{ name: 'firstName', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
|
|
1322
|
-
{ name: 'lastName', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
|
|
1323
|
-
{ name: 'genderId', layout: { positions: { lg: { colSpan: 4, order: 3 } } } },
|
|
1324
|
-
{ name: 'birthDate', layout: { positions: { lg: { colSpan: 4, order: 4 } } } },
|
|
1325
|
-
{ name: 'identityNumber', layout: { positions: { lg: { colSpan: 4, order: 5 } } } },
|
|
1326
|
-
{ name: 'maritalStatusId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
1327
|
-
{ name: 'educationLevelId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
1328
|
-
{ name: 'image', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
1329
|
-
{ name: 'phones', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1330
|
-
{ name: 'emails', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1331
|
-
{ name: 'addresses', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1332
|
-
],
|
|
1333
|
-
quickCreate: {
|
|
1334
|
-
enabled: true,
|
|
1335
|
-
properties: ['firstName', 'lastName', 'code', 'phones', 'emails'],
|
|
1336
|
-
},
|
|
1337
|
-
},
|
|
1338
|
-
update: {
|
|
1339
|
-
sections: [
|
|
1340
|
-
{ id: 'profile', layout: { positions: { lg: { colSpan: 8, colStart: 1 } } } },
|
|
1341
|
-
{ id: 'image', layout: { positions: { lg: { colSpan: 4, colStart: 9 } } } },
|
|
1342
|
-
{ id: 'phones', layout: { positions: { lg: { colSpan: 6, colStart: 1 } } } },
|
|
1343
|
-
{ id: 'emails', layout: { positions: { lg: { colSpan: 6, colStart: 7 } } } },
|
|
1344
|
-
{ id: 'addresses', layout: { positions: { lg: { colSpan: 12, colStart: 1 } } } },
|
|
1345
|
-
],
|
|
1346
|
-
properties: [
|
|
1347
|
-
{ name: 'personTitleId', layout: { positions: { lg: { colSpan: 4, order: 0 } } } },
|
|
1348
|
-
{ name: 'firstName', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
|
|
1349
|
-
{ name: 'lastName', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
|
|
1350
|
-
{ name: 'genderId', layout: { positions: { lg: { colSpan: 4, order: 3 } } } },
|
|
1351
|
-
{ name: 'birthDate', layout: { positions: { lg: { colSpan: 4, order: 4 } } } },
|
|
1352
|
-
{ name: 'identityNumber', layout: { positions: { lg: { colSpan: 4, order: 5 } } } },
|
|
1353
|
-
{ name: 'maritalStatusId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
1354
|
-
{ name: 'educationLevelId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
1355
|
-
{ name: 'image', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
1356
|
-
{ name: 'phones', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1357
|
-
{ name: 'emails', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1358
|
-
{ name: 'addresses', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1359
|
-
],
|
|
1360
|
-
},
|
|
1361
|
-
single: {
|
|
1362
|
-
title: '{{ (context.eval("firstName") ) + " " + (context.eval("lastName") ) }}',
|
|
1363
|
-
sections: [
|
|
1364
|
-
{ id: 'profile', order: 1, layout: { positions: { lg: { colSpan: 8, colStart: 1 } } } },
|
|
1365
|
-
{ id: 'image', order: 2, layout: { positions: { lg: { colSpan: 4, colStart: 9 } } } },
|
|
1366
|
-
{ id: 'phones', order: 5, layout: { positions: { lg: { colSpan: 6, colStart: 1 } } } },
|
|
1367
|
-
{ id: 'emails', order: 6, layout: { positions: { lg: { colSpan: 6, colStart: 7 } } } },
|
|
1368
|
-
{ id: 'addresses', order: 7, layout: { positions: { lg: { colSpan: 12, colStart: 1 } } } },
|
|
1369
|
-
],
|
|
1370
|
-
properties: [
|
|
1371
|
-
{ name: 'personTitleId', layout: { positions: { lg: { colSpan: 4, order: 0 } } } },
|
|
1372
|
-
{ name: 'firstName', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
|
|
1373
|
-
{ name: 'lastName', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
|
|
1374
|
-
{ name: 'genderId', layout: { positions: { lg: { colSpan: 4, order: 3 } } } },
|
|
1375
|
-
{ name: 'birthDate', layout: { positions: { lg: { colSpan: 4, order: 4 } } } },
|
|
1376
|
-
{ name: 'identityNumber', layout: { positions: { lg: { colSpan: 4, order: 5 } } } },
|
|
1377
|
-
{ name: 'maritalStatusId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
1378
|
-
{ name: 'educationLevelId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
1379
|
-
{ name: 'image', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
1380
|
-
{ name: 'phones', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1381
|
-
{ name: 'emails', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1382
|
-
{ name: 'addresses', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
1383
|
-
],
|
|
1384
|
-
actions: [...entityMasterRecordActions()],
|
|
1385
|
-
},
|
|
1386
|
-
list: {
|
|
1387
|
-
actions: [...entityMasterCrudActions()],
|
|
1388
|
-
views: [
|
|
1389
|
-
createAllQueryView({
|
|
1390
|
-
sorts: [{ name: 'firstName', dir: 'asc' }],
|
|
1391
|
-
}),
|
|
1392
|
-
],
|
|
1393
|
-
},
|
|
1394
|
-
},
|
|
1395
|
-
},
|
|
1396
|
-
};
|
|
1397
|
-
return entityDef;
|
|
1398
|
-
}
|
|
1399
|
-
//#endregion
|
|
1400
|
-
|
|
1401
|
-
//#endregion
|
|
1402
|
-
//#region ---- Entity Factory ----
|
|
1403
|
-
async function personIdentifierTypeFactory() {
|
|
1404
|
-
const entityDef = {
|
|
1405
|
-
module: RootConfig.module.name,
|
|
1406
|
-
name: RootConfig.entities.personIdentifierType.name,
|
|
1407
|
-
title: RootConfig.entities.personIdentifierType.title,
|
|
1408
|
-
icon: RootConfig.entities.personIdentifierType.icon,
|
|
1409
|
-
plugins: [{ name: 'archive' }],
|
|
1410
|
-
formats: {
|
|
1411
|
-
individual: RootConfig.entities.personIdentifierType.title,
|
|
1412
|
-
plural: RootConfig.entities.personIdentifierType.titlePlural,
|
|
1413
|
-
searchResult: {
|
|
1414
|
-
title: RootConfig.entities.personIdentifierType.title,
|
|
1415
|
-
description: '@person-core:person-identifier-types.entities.person-identifier-type.search-result-description',
|
|
1416
|
-
},
|
|
1417
|
-
},
|
|
1418
|
-
groups: [
|
|
1419
|
-
{ id: 'basic-info', title: '@general:terms.interface.basic-info' },
|
|
1420
|
-
{ id: 'validation', title: '@general:terms.validation.validation' },
|
|
1421
|
-
],
|
|
1422
|
-
properties: [
|
|
1423
|
-
{
|
|
1424
|
-
name: 'id',
|
|
1425
|
-
title: '@general:terms.common.id',
|
|
1426
|
-
groupId: 'basic-info',
|
|
1427
|
-
schema: {
|
|
1428
|
-
dataType: 'uuid',
|
|
1429
|
-
visible: false,
|
|
1430
|
-
readonly: true,
|
|
1431
|
-
unique: { enabled: true },
|
|
1432
|
-
},
|
|
1433
|
-
},
|
|
1434
|
-
{
|
|
1435
|
-
name: 'title',
|
|
1436
|
-
title: '@general:terms.common.title',
|
|
1437
|
-
groupId: 'basic-info',
|
|
1438
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
1439
|
-
schema: {
|
|
1440
|
-
dataType: 'string',
|
|
1441
|
-
interface: { type: AXPWidgetsList.Editors.TextBox },
|
|
1442
|
-
},
|
|
1443
|
-
validations: [{ rule: 'required' }],
|
|
1444
|
-
},
|
|
1445
|
-
{
|
|
1446
|
-
name: 'description',
|
|
1447
|
-
title: '@general:terms.common.description',
|
|
1448
|
-
groupId: 'basic-info',
|
|
1449
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
1450
|
-
schema: {
|
|
1451
|
-
dataType: 'string',
|
|
1452
|
-
interface: {
|
|
1453
|
-
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
1454
|
-
options: { rows: 3 },
|
|
1455
|
-
},
|
|
1456
|
-
},
|
|
1457
|
-
},
|
|
1458
|
-
{
|
|
1459
|
-
name: 'scope',
|
|
1460
|
-
title: '@person-core:person-identifier-types.entities.person-identifier-type.fields.scope',
|
|
1461
|
-
groupId: 'basic-info',
|
|
1462
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
1463
|
-
schema: {
|
|
1464
|
-
dataType: 'string',
|
|
1465
|
-
interface: {
|
|
1466
|
-
type: AXPWidgetsList.Editors.SelectBox,
|
|
1467
|
-
options: {
|
|
1468
|
-
valueField: 'value',
|
|
1469
|
-
textField: 'text',
|
|
1470
|
-
//TODO better implementation of this
|
|
1471
|
-
dataSource: [
|
|
1472
|
-
{ value: 'global', text: '@person-core:person-identifier-types.entities.person-identifier-type.fields.scope.options.global' },
|
|
1473
|
-
{ value: 'national', text: '@person-core:person-identifier-types.entities.person-identifier-type.fields.scope.options.national' },
|
|
1474
|
-
{ value: 'regional', text: '@person-core:person-identifier-types.entities.person-identifier-type.fields.scope.options.regional' },
|
|
1475
|
-
],
|
|
1476
|
-
},
|
|
1477
|
-
},
|
|
1478
|
-
},
|
|
1479
|
-
validations: [{ rule: 'required' }],
|
|
1480
|
-
},
|
|
1481
|
-
{
|
|
1482
|
-
name: 'formatRegex',
|
|
1483
|
-
title: '@general:terms.validation.regex',
|
|
1484
|
-
groupId: 'validation',
|
|
1485
|
-
options: { sort: { enabled: false }, filter: { advance: { enabled: true }, inline: { enabled: false } } },
|
|
1486
|
-
schema: {
|
|
1487
|
-
dataType: 'string',
|
|
1488
|
-
interface: { type: AXPWidgetsList.Editors.TextBox },
|
|
1489
|
-
},
|
|
1490
|
-
},
|
|
1491
|
-
{
|
|
1492
|
-
name: 'minLength',
|
|
1493
|
-
title: '@general:terms.validation.min-length',
|
|
1494
|
-
groupId: 'validation',
|
|
1495
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: false } } },
|
|
1496
|
-
schema: {
|
|
1497
|
-
dataType: 'number',
|
|
1498
|
-
interface: {
|
|
1499
|
-
type: AXPWidgetsList.Editors.NumberBox,
|
|
1500
|
-
options: { minValue: 1, maxValue: 100 },
|
|
1501
|
-
},
|
|
1502
|
-
},
|
|
1503
|
-
},
|
|
1504
|
-
{
|
|
1505
|
-
name: 'maxLength',
|
|
1506
|
-
title: '@general:terms.validation.max-length',
|
|
1507
|
-
groupId: 'validation',
|
|
1508
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: false } } },
|
|
1509
|
-
schema: {
|
|
1510
|
-
dataType: 'number',
|
|
1511
|
-
interface: {
|
|
1512
|
-
type: AXPWidgetsList.Editors.NumberBox,
|
|
1513
|
-
options: { minValue: 1, maxValue: 1000 },
|
|
1514
|
-
},
|
|
1515
|
-
},
|
|
1516
|
-
},
|
|
1517
|
-
{
|
|
1518
|
-
name: 'isUnique',
|
|
1519
|
-
title: '@general:terms.status.states.is-unique',
|
|
1520
|
-
groupId: 'validation',
|
|
1521
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
1522
|
-
schema: {
|
|
1523
|
-
dataType: 'boolean',
|
|
1524
|
-
interface: { type: AXPWidgetsList.Editors.ToggleSwitch },
|
|
1525
|
-
},
|
|
1526
|
-
},
|
|
1527
|
-
],
|
|
1528
|
-
columns: [
|
|
1529
|
-
{ name: 'title', options: { width: '200px', order: 1 } },
|
|
1530
|
-
{ name: 'scope', options: { width: '120px', order: 2 } },
|
|
1531
|
-
{ name: 'description', options: { width: '280px', order: 3 } },
|
|
1532
|
-
],
|
|
1533
|
-
interfaces: {
|
|
1534
|
-
master: {
|
|
1535
|
-
create: {
|
|
1536
|
-
sections: [{ id: 'basic-info' }, { id: 'validation' }],
|
|
1537
|
-
properties: [
|
|
1538
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
1539
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
|
|
1540
|
-
{ name: 'scope', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
1541
|
-
{ name: 'formatRegex', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
|
|
1542
|
-
{ name: 'minLength', layout: { positions: { lg: { colSpan: 3, order: 5 } } } },
|
|
1543
|
-
{ name: 'maxLength', layout: { positions: { lg: { colSpan: 3, order: 6 } } } },
|
|
1544
|
-
{ name: 'isUnique', layout: { positions: { lg: { colSpan: 3, order: 7 } } } },
|
|
1545
|
-
],
|
|
1546
|
-
},
|
|
1547
|
-
update: {
|
|
1548
|
-
sections: [{ id: 'basic-info' }, { id: 'validation' }],
|
|
1549
|
-
properties: [
|
|
1550
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
1551
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
|
|
1552
|
-
{ name: 'scope', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
|
|
1553
|
-
{ name: 'formatRegex', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
|
|
1554
|
-
{ name: 'minLength', layout: { positions: { lg: { colSpan: 3, order: 6 } } } },
|
|
1555
|
-
{ name: 'maxLength', layout: { positions: { lg: { colSpan: 3, order: 7 } } } },
|
|
1556
|
-
{ name: 'isUnique', layout: { positions: { lg: { colSpan: 3, order: 8 } } } },
|
|
1557
|
-
],
|
|
1558
|
-
},
|
|
1559
|
-
single: {
|
|
1560
|
-
title: '{{title}}',
|
|
1561
|
-
sections: [{ id: 'basic-info' }, { id: 'validation' }],
|
|
1562
|
-
properties: [
|
|
1563
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
1564
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
|
|
1565
|
-
{ name: 'scope', layout: { positions: { lg: { colSpan: 6, order: 4 } } } },
|
|
1566
|
-
{ name: 'formatRegex', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
|
|
1567
|
-
{ name: 'minLength', layout: { positions: { lg: { colSpan: 3, order: 6 } } } },
|
|
1568
|
-
{ name: 'maxLength', layout: { positions: { lg: { colSpan: 3, order: 7 } } } },
|
|
1569
|
-
{ name: 'isUnique', layout: { positions: { lg: { colSpan: 3, order: 8 } } } },
|
|
1570
|
-
],
|
|
1571
|
-
actions: [...entityMasterRecordActions()],
|
|
1572
|
-
},
|
|
1573
|
-
list: {
|
|
1574
|
-
actions: [...entityMasterCrudActions()],
|
|
1575
|
-
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
1576
|
-
},
|
|
1577
|
-
},
|
|
1578
|
-
},
|
|
1579
|
-
};
|
|
1580
|
-
return entityDef;
|
|
1581
|
-
}
|
|
1582
|
-
//#endregion
|
|
1583
|
-
|
|
1584
|
-
//#endregion
|
|
1585
|
-
|
|
1586
|
-
//#endregion
|
|
1587
|
-
async function personRelationshipFactory() {
|
|
1588
|
-
const entityDef = {
|
|
1589
|
-
module: RootConfig.module.name,
|
|
1590
|
-
name: RootConfig.entities.personRelationship.name,
|
|
1591
|
-
title: RootConfig.entities.personRelationship.title,
|
|
1592
|
-
icon: RootConfig.entities.personRelationship.icon,
|
|
1593
|
-
plugins: [{ name: 'notes' }],
|
|
1594
|
-
formats: {
|
|
1595
|
-
individual: RootConfig.entities.personRelationship.title,
|
|
1596
|
-
plural: RootConfig.entities.personRelationship.titlePlural,
|
|
1597
|
-
searchResult: {
|
|
1598
|
-
title: RootConfig.entities.personRelationship.title,
|
|
1599
|
-
description: '@person-core:person-relationships.entities.person-relationship.search-result-description',
|
|
1600
|
-
},
|
|
1601
|
-
},
|
|
1602
|
-
groups: [
|
|
1603
|
-
{ id: 'basic-info', title: '@general:terms.interface.basic-info' },
|
|
1604
|
-
],
|
|
1605
|
-
properties: [
|
|
1606
|
-
{
|
|
1607
|
-
name: 'fromPersonId',
|
|
1608
|
-
title: '@person-core:person-relationships.entities.person-relationship.properties.from-person.title',
|
|
1609
|
-
groupId: 'basic-info',
|
|
1610
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
1611
|
-
schema: {
|
|
1612
|
-
dataType: 'string',
|
|
1613
|
-
interface: {
|
|
1614
|
-
type: AXPWidgetsCatalog.lookup,
|
|
1615
|
-
options: {
|
|
1616
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.person.name}`,
|
|
1617
|
-
multiple: false,
|
|
1618
|
-
textField: 'fullName',
|
|
1619
|
-
columns: ['fullName'],
|
|
1620
|
-
expose: [
|
|
1621
|
-
{ source: 'id', target: 'fromPerson.id' },
|
|
1622
|
-
{ source: 'fullName', target: 'fromPerson.fullName' },
|
|
1623
|
-
{ source: 'phones', target: 'fromPerson.phones' },
|
|
1624
|
-
{ source: 'emails', target: 'fromPerson.emails' },
|
|
1625
|
-
],
|
|
1626
|
-
},
|
|
1627
|
-
},
|
|
1628
|
-
},
|
|
1629
|
-
validations: [{ rule: 'required' }],
|
|
1630
|
-
},
|
|
1631
|
-
{
|
|
1632
|
-
name: 'toPersonId',
|
|
1633
|
-
title: '@person-core:person-relationships.entities.person-relationship.properties.to-person.title',
|
|
1634
|
-
groupId: 'basic-info',
|
|
1635
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
1636
|
-
schema: {
|
|
1637
|
-
dataType: 'string',
|
|
1638
|
-
interface: {
|
|
1639
|
-
type: AXPWidgetsCatalog.lookup,
|
|
1640
|
-
options: {
|
|
1641
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.person.name}`,
|
|
1642
|
-
multiple: false,
|
|
1643
|
-
textField: 'fullName',
|
|
1644
|
-
columns: ['fullName', 'phones', 'emails'],
|
|
1645
|
-
allowCreate: 'quick',
|
|
1646
|
-
expose: [
|
|
1647
|
-
{ source: 'id', target: 'toPerson.id' },
|
|
1648
|
-
{ source: 'fullName', target: 'toPerson.fullName' },
|
|
1649
|
-
{ source: 'phones', target: 'toPerson.phones' },
|
|
1650
|
-
{ source: 'emails', target: 'toPerson.emails' },
|
|
1651
|
-
],
|
|
1652
|
-
},
|
|
1653
|
-
},
|
|
1654
|
-
},
|
|
1655
|
-
validations: [{ rule: 'required' }],
|
|
1656
|
-
},
|
|
1657
|
-
{
|
|
1658
|
-
name: 'typeId',
|
|
1659
|
-
title: '@person-core:person-relationships.entities.person-relationship.properties.type.title',
|
|
1660
|
-
groupId: 'basic-info',
|
|
1661
|
-
options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
|
|
1662
|
-
schema: {
|
|
1663
|
-
dataType: 'string',
|
|
1664
|
-
interface: {
|
|
1665
|
-
type: AXPWidgetsCatalog.lookup,
|
|
1666
|
-
options: {
|
|
1667
|
-
look: 'select',
|
|
1668
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.contactRole.name}`,
|
|
1669
|
-
multiple: false,
|
|
1670
|
-
allowCreate: 'quick',
|
|
1671
|
-
expose: [
|
|
1672
|
-
{ source: 'id', target: 'type.id' },
|
|
1673
|
-
{ source: 'title', target: 'type.title' },
|
|
1674
|
-
],
|
|
1675
|
-
},
|
|
1676
|
-
},
|
|
1677
|
-
},
|
|
1678
|
-
validations: [{ rule: 'required' }],
|
|
1679
|
-
},
|
|
1680
|
-
],
|
|
1681
|
-
columns: [
|
|
1682
|
-
{ name: 'fromPersonId' },
|
|
1683
|
-
{ name: 'toPersonId' },
|
|
1684
|
-
{ name: 'typeId' },
|
|
1685
|
-
{ name: 'toPerson.phones', options: { width: '450px' } },
|
|
1686
|
-
{ name: 'toPerson.emails', options: { width: '450px' } },
|
|
1687
|
-
{ name: 'notes' },
|
|
1688
|
-
],
|
|
1689
|
-
interfaces: {
|
|
1690
|
-
master: {
|
|
1691
|
-
create: {
|
|
1692
|
-
sections: [{ id: 'basic-info' }],
|
|
1693
|
-
properties: [
|
|
1694
|
-
{ name: 'toPersonId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
1695
|
-
{ name: 'typeId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
1696
|
-
{ name: 'notes', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },
|
|
1697
|
-
],
|
|
1698
|
-
},
|
|
1699
|
-
update: {
|
|
1700
|
-
sections: [{ id: 'basic-info' }],
|
|
1701
|
-
properties: [
|
|
1702
|
-
{ name: 'toPersonId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
1703
|
-
{ name: 'typeId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
1704
|
-
{ name: 'notes', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },
|
|
1705
|
-
],
|
|
1706
|
-
},
|
|
1707
|
-
single: {
|
|
1708
|
-
title: '{{ context.eval("type.title", { pipes: ["translate"] }) + " - " + context.eval("fromPerson.fullName") + " → " + context.eval("toPerson.fullName") }}',
|
|
1709
|
-
sections: [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }],
|
|
1710
|
-
properties: [
|
|
1711
|
-
{ name: 'toPersonId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
|
|
1712
|
-
{ name: 'typeId', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
|
|
1713
|
-
{ name: 'notes', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },
|
|
1714
|
-
],
|
|
1715
|
-
actions: [...entityMasterRecordActions()],
|
|
1716
|
-
},
|
|
1717
|
-
list: {
|
|
1718
|
-
actions: [...entityMasterCrudActions()],
|
|
1719
|
-
views: [
|
|
1720
|
-
createAllQueryView({
|
|
1721
|
-
sorts: [{ name: 'typeId', dir: 'asc' }],
|
|
1722
|
-
}),
|
|
1723
|
-
],
|
|
1724
|
-
},
|
|
1725
|
-
},
|
|
1726
|
-
},
|
|
1727
|
-
};
|
|
1728
|
-
return entityDef;
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
//#endregion
|
|
1732
|
-
//#region ---- Entity Factory ----
|
|
1733
|
-
async function personTitleFactory() {
|
|
1734
|
-
const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
|
|
1735
|
-
const propertyLayouts = [
|
|
1736
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
1737
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
|
|
1738
|
-
];
|
|
1739
|
-
const entityDef = {
|
|
1740
|
-
module: RootConfig.module.name,
|
|
1741
|
-
name: RootConfig.entities.personTitle.name,
|
|
1742
|
-
title: RootConfig.entities.personTitle.title,
|
|
1743
|
-
icon: RootConfig.entities.personTitle.icon,
|
|
1744
|
-
formats: {
|
|
1745
|
-
individual: RootConfig.entities.personTitle.title,
|
|
1746
|
-
plural: RootConfig.entities.personTitle.titlePlural,
|
|
1747
|
-
searchResult: {
|
|
1748
|
-
title: '{{ title }}',
|
|
1749
|
-
description: RootConfig.module.title,
|
|
1750
|
-
},
|
|
1751
|
-
},
|
|
1752
|
-
plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'clone' }],
|
|
1753
|
-
groups: [
|
|
1754
|
-
{
|
|
1755
|
-
id: 'basic-info',
|
|
1756
|
-
title: '@person-core:person-titles.entities.person-title.groups.basic-info',
|
|
1757
|
-
},
|
|
1758
|
-
],
|
|
1759
|
-
properties: [
|
|
1760
|
-
{
|
|
1761
|
-
name: 'id',
|
|
1762
|
-
title: '@general:terms.common.id',
|
|
1763
|
-
groupId: 'basic-info',
|
|
1764
|
-
schema: {
|
|
1765
|
-
dataType: 'uuid',
|
|
1766
|
-
visible: false,
|
|
1767
|
-
readonly: true,
|
|
1768
|
-
unique: { enabled: true },
|
|
1769
|
-
},
|
|
1770
|
-
},
|
|
1771
|
-
{
|
|
1772
|
-
name: 'title',
|
|
1773
|
-
title: '@general:terms.common.title',
|
|
1774
|
-
groupId: 'basic-info',
|
|
1775
|
-
options: {
|
|
1776
|
-
sort: { enabled: true },
|
|
1777
|
-
filter: {
|
|
1778
|
-
advance: { enabled: true },
|
|
1779
|
-
inline: { enabled: true },
|
|
1780
|
-
},
|
|
1781
|
-
},
|
|
1782
|
-
schema: {
|
|
1783
|
-
dataType: 'string',
|
|
1784
|
-
interface: {
|
|
1785
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
1786
|
-
options: {
|
|
1787
|
-
placeholder: '@person-core:person-titles.entities.person-title.fields.title.placeholder',
|
|
1788
|
-
},
|
|
1789
|
-
},
|
|
1790
|
-
},
|
|
1791
|
-
validations: [{ rule: 'required' }],
|
|
1792
|
-
},
|
|
1793
|
-
{
|
|
1794
|
-
name: 'description',
|
|
1795
|
-
title: '@general:terms.common.description',
|
|
1796
|
-
groupId: 'basic-info',
|
|
1797
|
-
schema: {
|
|
1798
|
-
dataType: 'string',
|
|
1799
|
-
interface: {
|
|
1800
|
-
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
1801
|
-
options: {
|
|
1802
|
-
rows: 3,
|
|
1803
|
-
placeholder: '@person-core:person-titles.entities.person-title.fields.description.placeholder',
|
|
1804
|
-
},
|
|
1805
|
-
},
|
|
1806
|
-
},
|
|
1807
|
-
},
|
|
1808
|
-
],
|
|
1809
|
-
columns: [
|
|
1810
|
-
{ name: 'title', options: { width: '220px', order: 1 } },
|
|
1811
|
-
{ name: 'description', options: { width: '280px', order: 2 } },
|
|
1812
|
-
],
|
|
1813
|
-
interfaces: {
|
|
1814
|
-
master: {
|
|
1815
|
-
create: {
|
|
1816
|
-
sections,
|
|
1817
|
-
properties: propertyLayouts,
|
|
1818
|
-
},
|
|
1819
|
-
update: {
|
|
1820
|
-
sections,
|
|
1821
|
-
properties: propertyLayouts,
|
|
1822
|
-
},
|
|
1823
|
-
single: {
|
|
1824
|
-
title: '{{ title }}',
|
|
1825
|
-
sections,
|
|
1826
|
-
properties: propertyLayouts,
|
|
1827
|
-
actions: [...entityMasterRecordActions()],
|
|
1828
|
-
},
|
|
1829
|
-
list: {
|
|
1830
|
-
actions: [...entityMasterCrudActions()],
|
|
1831
|
-
views: [
|
|
1832
|
-
createAllQueryView({
|
|
1833
|
-
sorts: [{ name: 'title', dir: 'asc' }],
|
|
1834
|
-
}),
|
|
1835
|
-
],
|
|
1836
|
-
},
|
|
1837
|
-
},
|
|
1838
|
-
},
|
|
1839
|
-
};
|
|
1840
|
-
return entityDef;
|
|
1841
|
-
}
|
|
1842
|
-
//#endregion
|
|
1843
|
-
|
|
1844
|
-
//#endregion
|
|
1845
|
-
|
|
1846
|
-
//#endregion
|
|
1847
|
-
//#region ---- Entity Factory ----
|
|
1848
|
-
async function religionFactory() {
|
|
1849
|
-
const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
|
|
1850
|
-
const propertyLayouts = [
|
|
1851
|
-
{ name: 'title', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
1852
|
-
{ name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
|
|
1853
|
-
];
|
|
1854
|
-
const entityDef = {
|
|
1855
|
-
module: RootConfig.module.name,
|
|
1856
|
-
name: RootConfig.entities.religion.name,
|
|
1857
|
-
title: RootConfig.entities.religion.title,
|
|
1858
|
-
icon: RootConfig.entities.religion.icon,
|
|
1859
|
-
formats: {
|
|
1860
|
-
individual: RootConfig.entities.religion.title,
|
|
1861
|
-
plural: RootConfig.entities.religion.titlePlural,
|
|
1862
|
-
searchResult: {
|
|
1863
|
-
title: '{{ title }}',
|
|
1864
|
-
description: RootConfig.module.title,
|
|
1865
|
-
},
|
|
1866
|
-
},
|
|
1867
|
-
plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'clone' }],
|
|
1868
|
-
groups: [
|
|
1869
|
-
{
|
|
1870
|
-
id: 'basic-info',
|
|
1871
|
-
title: '@person-core:religions.entities.religion.groups.basic-info',
|
|
1872
|
-
},
|
|
1873
|
-
],
|
|
1874
|
-
properties: [
|
|
1875
|
-
{
|
|
1876
|
-
name: 'id',
|
|
1877
|
-
title: '@general:terms.common.id',
|
|
1878
|
-
groupId: 'basic-info',
|
|
1879
|
-
schema: {
|
|
1880
|
-
dataType: 'uuid',
|
|
1881
|
-
visible: false,
|
|
1882
|
-
readonly: true,
|
|
1883
|
-
unique: { enabled: true },
|
|
1884
|
-
},
|
|
1885
|
-
},
|
|
1886
|
-
{
|
|
1887
|
-
name: 'title',
|
|
1888
|
-
title: '@general:terms.common.title',
|
|
1889
|
-
groupId: 'basic-info',
|
|
1890
|
-
options: {
|
|
1891
|
-
sort: { enabled: true },
|
|
1892
|
-
filter: {
|
|
1893
|
-
advance: { enabled: true },
|
|
1894
|
-
inline: { enabled: true },
|
|
1895
|
-
},
|
|
1896
|
-
},
|
|
1897
|
-
schema: {
|
|
1898
|
-
dataType: 'string',
|
|
1899
|
-
interface: {
|
|
1900
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
1901
|
-
options: {
|
|
1902
|
-
placeholder: '@person-core:religions.entities.religion.fields.title.placeholder',
|
|
1903
|
-
},
|
|
1904
|
-
},
|
|
1905
|
-
},
|
|
1906
|
-
validations: [{ rule: 'required' }],
|
|
1907
|
-
},
|
|
1908
|
-
{
|
|
1909
|
-
name: 'description',
|
|
1910
|
-
title: '@general:terms.common.description',
|
|
1911
|
-
groupId: 'basic-info',
|
|
1912
|
-
schema: {
|
|
1913
|
-
dataType: 'string',
|
|
1914
|
-
interface: {
|
|
1915
|
-
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
1916
|
-
options: {
|
|
1917
|
-
rows: 3,
|
|
1918
|
-
placeholder: '@person-core:religions.entities.religion.fields.description.placeholder',
|
|
1919
|
-
},
|
|
1920
|
-
},
|
|
1921
|
-
},
|
|
1922
|
-
},
|
|
1923
|
-
],
|
|
1924
|
-
columns: [
|
|
1925
|
-
{ name: 'title', options: { width: '220px', order: 1 } },
|
|
1926
|
-
{ name: 'description', options: { width: '280px', order: 2 } },
|
|
1927
|
-
],
|
|
1928
|
-
interfaces: {
|
|
1929
|
-
master: {
|
|
1930
|
-
create: {
|
|
1931
|
-
sections,
|
|
1932
|
-
properties: propertyLayouts,
|
|
1933
|
-
},
|
|
1934
|
-
update: {
|
|
1935
|
-
sections,
|
|
1936
|
-
properties: propertyLayouts,
|
|
1937
|
-
},
|
|
1938
|
-
single: {
|
|
1939
|
-
title: '{{ title }}',
|
|
1940
|
-
sections,
|
|
1941
|
-
properties: propertyLayouts,
|
|
1942
|
-
actions: [...entityMasterRecordActions()],
|
|
1943
|
-
},
|
|
1944
|
-
list: {
|
|
1945
|
-
actions: [...entityMasterCrudActions()],
|
|
1946
|
-
views: [
|
|
1947
|
-
createAllQueryView({
|
|
1948
|
-
sorts: [{ name: 'title', dir: 'asc' }],
|
|
1949
|
-
}),
|
|
1950
|
-
],
|
|
1951
|
-
},
|
|
1952
|
-
},
|
|
1953
|
-
},
|
|
1954
|
-
};
|
|
1955
|
-
return entityDef;
|
|
1956
|
-
}
|
|
1957
354
|
//#endregion
|
|
1958
355
|
|
|
1959
356
|
//#endregion
|
|
@@ -1964,5 +361,5 @@ async function religionFactory() {
|
|
|
1964
361
|
* Generated bundle index. Do not edit.
|
|
1965
362
|
*/
|
|
1966
363
|
|
|
1967
|
-
export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, RootConfig, buildContactAssignmentPersonSnapshot, contactAssignmentDetailsCrudActionsForPartyContext,
|
|
364
|
+
export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, AXPPeopleOrganizationPermissionKeys, RootConfig, buildContactAssignmentPersonSnapshot, contactAssignmentDetailsCrudActionsForPartyContext, contactAssignmentPartyConditions, personRelationshipDetailsCreateActions, personRelationshipMasterCreateAction, resolveContactAssignmentPartyContext, resolveContactAssignmentPartyDisplayTitle };
|
|
1968
365
|
//# sourceMappingURL=acorex-platform-module-person-core-client-contracts.mjs.map
|