@acorex-platform/module-person-core-client 0.0.32 → 0.0.33
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-contracts-entities-contact-assignment.mjs +229 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-contact-assignment.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-contact-role.mjs +215 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-contact-role.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-education-level.mjs +197 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-education-level.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-gender.mjs +197 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-gender.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-marital-status.mjs +197 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-marital-status.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-person-identifier-type.mjs +267 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-person-identifier-type.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-person-relationship.mjs +231 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-person-relationship.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-person-title.mjs +197 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-person-title.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-person.mjs +567 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-person.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-religion.mjs +197 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entities-religion.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-acorex-platform-module-person-core-client-contracts-entity-catalog-CJmzbjJI.mjs +106 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-acorex-platform-module-person-core-client-contracts-entity-catalog-CJmzbjJI.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-contact-assignment.entity-BtVczZ89.mjs +151 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-contact-assignment.entity-BtVczZ89.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-contact-role.entity-uqPhUsRm.mjs +137 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-contact-role.entity-uqPhUsRm.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-education-level.entity-C1pz4Bh2.mjs +119 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-education-level.entity-C1pz4Bh2.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-gender.entity-BaoSo66c.mjs +119 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-gender.entity-BaoSo66c.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-marital-status.entity-NdZ6U6Ue.mjs +119 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-marital-status.entity-NdZ6U6Ue.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-person-identifier-type.entity-D_XVLaZw.mjs +189 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-person-identifier-type.entity-D_XVLaZw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-person-relationship.entity-Bt_Y9UTE.mjs +153 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-person-relationship.entity-Bt_Y9UTE.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-person-title.entity-B5jB67Eh.mjs +119 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-person-title.entity-B5jB67Eh.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-person.entity-Bx2b-wa4.mjs +489 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-person.entity-Bx2b-wa4.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-religion.entity-BUHOGYxG.mjs +119 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog-religion.entity-BUHOGYxG.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog.mjs +2 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts-entity-catalog.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-person-core-client-local-entities.mjs +38 -0
- package/fesm2022/acorex-platform-module-person-core-client-local-entities.mjs.map +1 -0
- package/package.json +50 -1
- package/types/acorex-platform-module-person-core-client-contracts-entities-contact-assignment.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-contact-role.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-education-level.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-gender.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-marital-status.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-person-identifier-type.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-person-relationship.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-person-title.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-person.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entities-religion.d.ts +5 -0
- package/types/acorex-platform-module-person-core-client-contracts-entity-catalog.d.ts +10 -0
- package/types/acorex-platform-module-person-core-client-contracts.d.ts +3 -3
- package/types/acorex-platform-module-person-core-client-local-entities.d.ts +12 -0
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
import { AXPWidgetsList, AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { RootConfig as RootConfig$1 } from '@acorex-platform/module-location-management-client/contracts';
|
|
3
|
+
import { AXPRelationshipKind } from '@acorex-platform/framework-shared/domain';
|
|
4
|
+
import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions, entityDetailsCrudActions } from '@acorex-platform/framework-shared/entity';
|
|
5
|
+
|
|
6
|
+
const config = {
|
|
7
|
+
i18n: 'person-core',
|
|
8
|
+
module: 'PersonCore',
|
|
9
|
+
};
|
|
10
|
+
const RootConfig = {
|
|
11
|
+
config,
|
|
12
|
+
module: {
|
|
13
|
+
name: config.module,
|
|
14
|
+
title: `@${config.i18n}:module.title`,
|
|
15
|
+
icon: 'fa-light fa-user',
|
|
16
|
+
},
|
|
17
|
+
entities: {
|
|
18
|
+
person: {
|
|
19
|
+
name: 'Person',
|
|
20
|
+
title: `@${config.i18n}:persons.entities.person.title`,
|
|
21
|
+
titlePlural: `@${config.i18n}:persons.entities.person.plural`,
|
|
22
|
+
icon: 'fa-light fa-user',
|
|
23
|
+
},
|
|
24
|
+
educationLevel: {
|
|
25
|
+
name: 'EducationLevel',
|
|
26
|
+
title: `@${config.i18n}:education-levels.entities.education-level.title`,
|
|
27
|
+
titlePlural: `@${config.i18n}:education-levels.entities.education-level.plural`,
|
|
28
|
+
icon: 'fa-light fa-graduation-cap',
|
|
29
|
+
},
|
|
30
|
+
gender: {
|
|
31
|
+
name: 'Gender',
|
|
32
|
+
title: `@${config.i18n}:genders.entities.gender.title`,
|
|
33
|
+
titlePlural: `@${config.i18n}:genders.entities.gender.plural`,
|
|
34
|
+
icon: 'fa-light fa-venus-mars',
|
|
35
|
+
},
|
|
36
|
+
maritalStatus: {
|
|
37
|
+
name: 'MaritalStatus',
|
|
38
|
+
title: `@${config.i18n}:marital-statuses.entities.marital-status.title`,
|
|
39
|
+
titlePlural: `@${config.i18n}:marital-statuses.entities.marital-status.plural`,
|
|
40
|
+
icon: 'fa-light fa-ring',
|
|
41
|
+
},
|
|
42
|
+
personTitle: {
|
|
43
|
+
name: 'PersonTitle',
|
|
44
|
+
title: `@${config.i18n}:person-titles.entities.person-title.title`,
|
|
45
|
+
titlePlural: `@${config.i18n}:person-titles.entities.person-title.plural`,
|
|
46
|
+
icon: 'fa-light fa-user-tie',
|
|
47
|
+
},
|
|
48
|
+
personIdentifierType: {
|
|
49
|
+
name: 'PersonIdentifierType',
|
|
50
|
+
title: `@${config.i18n}:person-identifier-types.entities.person-identifier-type.title`,
|
|
51
|
+
titlePlural: `@${config.i18n}:person-identifier-types.entities.person-identifier-type.plural`,
|
|
52
|
+
icon: 'fa-light fa-id-card',
|
|
53
|
+
},
|
|
54
|
+
religion: {
|
|
55
|
+
name: 'Religion',
|
|
56
|
+
title: `@${config.i18n}:religions.entities.religion.title`,
|
|
57
|
+
titlePlural: `@${config.i18n}:religions.entities.religion.plural`,
|
|
58
|
+
icon: 'fa-light fa-place-of-worship',
|
|
59
|
+
},
|
|
60
|
+
contactRole: {
|
|
61
|
+
name: 'ContactRole',
|
|
62
|
+
title: `@${config.i18n}:contact-roles.entities.contact-role.title`,
|
|
63
|
+
titlePlural: `@${config.i18n}:contact-roles.entities.contact-role.plural`,
|
|
64
|
+
icon: 'fa-light fa-user-tag',
|
|
65
|
+
},
|
|
66
|
+
personRelationship: {
|
|
67
|
+
name: 'PersonRelationship',
|
|
68
|
+
title: `@${config.i18n}:person-relationships.entities.person-relationship.title`,
|
|
69
|
+
titlePlural: `@${config.i18n}:person-relationships.entities.person-relationship.plural`,
|
|
70
|
+
icon: 'fa-light fa-link',
|
|
71
|
+
},
|
|
72
|
+
contactAssignment: {
|
|
73
|
+
name: 'ContactAssignment',
|
|
74
|
+
title: `@${config.i18n}:contact-assignments.entities.contact-assignment.title`,
|
|
75
|
+
titlePlural: `@${config.i18n}:contact-assignments.entities.contact-assignment.plural`,
|
|
76
|
+
icon: 'fa-light fa-address-book',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region ---- Repeater Children ----
|
|
83
|
+
const PHONES_REPEATER_CHILDREN = [
|
|
84
|
+
{
|
|
85
|
+
type: AXPWidgetsList.Editors.ContactBox,
|
|
86
|
+
mode: 'edit',
|
|
87
|
+
options: { type: 'phone', placeholder: '@person-core:persons.entities.person.fields.phone.placeholder' },
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
const EMAILS_REPEATER_CHILDREN = [
|
|
91
|
+
{
|
|
92
|
+
type: AXPWidgetsList.Editors.ContactBox,
|
|
93
|
+
mode: 'edit',
|
|
94
|
+
options: { type: 'email', placeholder: '@person-core:persons.entities.person.fields.email.placeholder' },
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
const LOCATION_ROLE_ENTITY = `${RootConfig$1.module.name}.${RootConfig$1.entities.locationRole.name}`;
|
|
98
|
+
const ADDRESSES_REPEATER_CHILDREN = [
|
|
99
|
+
{
|
|
100
|
+
type: AXPWidgetsList.Editors.AddressBox,
|
|
101
|
+
mode: 'edit',
|
|
102
|
+
options: {
|
|
103
|
+
mode: 'expandable',
|
|
104
|
+
hasLabel: true,
|
|
105
|
+
labelEntity: LOCATION_ROLE_ENTITY,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region ---- Entity Factory ----
|
|
111
|
+
async function personFactory() {
|
|
112
|
+
const entityDef = {
|
|
113
|
+
module: RootConfig.module.name,
|
|
114
|
+
name: RootConfig.entities.person.name,
|
|
115
|
+
title: RootConfig.entities.person.title,
|
|
116
|
+
icon: RootConfig.entities.person.icon,
|
|
117
|
+
formats: {
|
|
118
|
+
individual: RootConfig.entities.person.title,
|
|
119
|
+
plural: RootConfig.entities.person.titlePlural,
|
|
120
|
+
displayName: '@general:terms.common.profile',
|
|
121
|
+
searchResult: {
|
|
122
|
+
title: '{{ fullName }} ',
|
|
123
|
+
description: '@person-core:persons.entities.person.search-result-description',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
plugins: [
|
|
127
|
+
{ name: 'history' },
|
|
128
|
+
{ name: 'archive' },
|
|
129
|
+
{
|
|
130
|
+
name: 'computed-property',
|
|
131
|
+
options: {
|
|
132
|
+
fields: [
|
|
133
|
+
{
|
|
134
|
+
name: 'fullName',
|
|
135
|
+
title: '@general:terms.common.full-name',
|
|
136
|
+
value: '{{ context.eval("firstName") + " " + context.eval("lastName") }}',
|
|
137
|
+
group: { id: 'profile' },
|
|
138
|
+
visible: false,
|
|
139
|
+
showAs: { type: AXPWidgetsCatalog.text },
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
groups: [
|
|
146
|
+
{
|
|
147
|
+
id: 'profile',
|
|
148
|
+
title: '@person-core:persons.entities.person.groups.profile',
|
|
149
|
+
icon: 'fa-light fa-user',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'image',
|
|
153
|
+
title: '@person-core:persons.entities.person.groups.image',
|
|
154
|
+
icon: 'fa-light fa-image',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: 'phones',
|
|
158
|
+
title: '@person-core:persons.entities.person.groups.phones',
|
|
159
|
+
icon: 'fa-light fa-phone',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 'emails',
|
|
163
|
+
title: '@person-core:persons.entities.person.groups.emails',
|
|
164
|
+
icon: 'fa-light fa-envelope',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: 'addresses',
|
|
168
|
+
title: '@person-core:persons.entities.person.groups.addresses',
|
|
169
|
+
icon: 'fa-light fa-location-dot',
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
properties: [
|
|
173
|
+
{
|
|
174
|
+
name: 'personTitleId',
|
|
175
|
+
title: '@person-core:persons.entities.person.fields.person-title.title',
|
|
176
|
+
groupId: 'profile',
|
|
177
|
+
options: {
|
|
178
|
+
sort: { enabled: true },
|
|
179
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
180
|
+
},
|
|
181
|
+
schema: {
|
|
182
|
+
dataType: 'string',
|
|
183
|
+
interface: {
|
|
184
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
185
|
+
options: {
|
|
186
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.personTitle.name}`,
|
|
187
|
+
valueField: 'id',
|
|
188
|
+
textField: 'title',
|
|
189
|
+
look: 'select',
|
|
190
|
+
allowCreate: 'quick',
|
|
191
|
+
expose: [
|
|
192
|
+
{ source: 'id', target: 'personTitle.id' },
|
|
193
|
+
{ source: 'title', target: 'personTitle.title' },
|
|
194
|
+
],
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'firstName',
|
|
201
|
+
title: '@general:terms.contact.first-name',
|
|
202
|
+
groupId: 'profile',
|
|
203
|
+
options: {
|
|
204
|
+
sort: { enabled: true },
|
|
205
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
206
|
+
},
|
|
207
|
+
schema: {
|
|
208
|
+
dataType: 'string',
|
|
209
|
+
interface: {
|
|
210
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
validations: [{ rule: 'required' }],
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'lastName',
|
|
217
|
+
title: '@general:terms.contact.last-name',
|
|
218
|
+
groupId: 'profile',
|
|
219
|
+
options: {
|
|
220
|
+
sort: { enabled: true },
|
|
221
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
222
|
+
},
|
|
223
|
+
schema: {
|
|
224
|
+
dataType: 'string',
|
|
225
|
+
interface: {
|
|
226
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
validations: [{ rule: 'required' }],
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'birthDate',
|
|
233
|
+
title: '@person-core:persons.entities.person.fields.birth-date.title',
|
|
234
|
+
groupId: 'profile',
|
|
235
|
+
options: {
|
|
236
|
+
sort: { enabled: true },
|
|
237
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
238
|
+
},
|
|
239
|
+
schema: {
|
|
240
|
+
dataType: 'date',
|
|
241
|
+
interface: {
|
|
242
|
+
type: AXPWidgetsCatalog.dateTime,
|
|
243
|
+
options: { format: 'date' },
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: 'image',
|
|
249
|
+
title: '@person-core:persons.entities.person.groups.image',
|
|
250
|
+
groupId: 'image',
|
|
251
|
+
schema: {
|
|
252
|
+
dataType: 'string',
|
|
253
|
+
interface: {
|
|
254
|
+
type: AXPWidgetsList.Advanced.Image,
|
|
255
|
+
options: {
|
|
256
|
+
type: 'profile-photo',
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: 'genderId',
|
|
263
|
+
title: '@person-core:persons.entities.person.fields.gender.title',
|
|
264
|
+
groupId: 'profile',
|
|
265
|
+
options: {
|
|
266
|
+
sort: { enabled: true },
|
|
267
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
268
|
+
},
|
|
269
|
+
schema: {
|
|
270
|
+
dataType: 'string',
|
|
271
|
+
interface: {
|
|
272
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
273
|
+
options: {
|
|
274
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.gender.name}`,
|
|
275
|
+
valueField: 'id',
|
|
276
|
+
textField: 'title',
|
|
277
|
+
look: 'select',
|
|
278
|
+
allowCreate: 'quick',
|
|
279
|
+
expose: [
|
|
280
|
+
{ source: 'id', target: 'gender.id' },
|
|
281
|
+
{ source: 'title', target: 'gender.title' },
|
|
282
|
+
],
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: 'identityNumber',
|
|
289
|
+
title: '@person-core:persons.entities.person.fields.identity-number.title',
|
|
290
|
+
groupId: 'profile',
|
|
291
|
+
options: {
|
|
292
|
+
sort: { enabled: true },
|
|
293
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
294
|
+
},
|
|
295
|
+
schema: {
|
|
296
|
+
dataType: 'string',
|
|
297
|
+
interface: {
|
|
298
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
299
|
+
options: {
|
|
300
|
+
placeholder: '@person-core:persons.entities.person.fields.identity-number.placeholder',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: 'userId',
|
|
307
|
+
title: '@person-core:persons.entities.person.fields.user.title',
|
|
308
|
+
groupId: 'profile',
|
|
309
|
+
options: {
|
|
310
|
+
sort: { enabled: true },
|
|
311
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
312
|
+
},
|
|
313
|
+
schema: {
|
|
314
|
+
dataType: 'string',
|
|
315
|
+
interface: {
|
|
316
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
317
|
+
options: {
|
|
318
|
+
entity: 'SecurityManagement.User',
|
|
319
|
+
valueField: 'id',
|
|
320
|
+
textField: 'displayName',
|
|
321
|
+
look: 'select',
|
|
322
|
+
expose: [
|
|
323
|
+
{ source: 'id', target: 'user.id' },
|
|
324
|
+
{ source: 'displayName', target: 'user.displayName' },
|
|
325
|
+
],
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: 'maritalStatusId',
|
|
332
|
+
title: '@person-core:persons.entities.person.fields.marital-status.title',
|
|
333
|
+
groupId: 'profile',
|
|
334
|
+
options: {
|
|
335
|
+
sort: { enabled: true },
|
|
336
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
337
|
+
},
|
|
338
|
+
schema: {
|
|
339
|
+
dataType: 'string',
|
|
340
|
+
interface: {
|
|
341
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
342
|
+
options: {
|
|
343
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.maritalStatus.name}`,
|
|
344
|
+
valueField: 'id',
|
|
345
|
+
textField: 'title',
|
|
346
|
+
look: 'select',
|
|
347
|
+
allowCreate: 'quick',
|
|
348
|
+
expose: [
|
|
349
|
+
{ source: 'id', target: 'maritalStatus.id' },
|
|
350
|
+
{ source: 'title', target: 'maritalStatus.title' },
|
|
351
|
+
],
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
name: 'educationLevelId',
|
|
358
|
+
title: '@person-core:persons.entities.person.fields.education-level.title',
|
|
359
|
+
groupId: 'profile',
|
|
360
|
+
options: {
|
|
361
|
+
sort: { enabled: true },
|
|
362
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
363
|
+
},
|
|
364
|
+
schema: {
|
|
365
|
+
dataType: 'string',
|
|
366
|
+
interface: {
|
|
367
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
368
|
+
options: {
|
|
369
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.educationLevel.name}`,
|
|
370
|
+
valueField: 'id',
|
|
371
|
+
textField: 'title',
|
|
372
|
+
look: 'select',
|
|
373
|
+
allowCreate: 'quick',
|
|
374
|
+
expose: [
|
|
375
|
+
{ source: 'id', target: 'educationLevel.id' },
|
|
376
|
+
{ source: 'title', target: 'educationLevel.title' },
|
|
377
|
+
],
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: 'phones',
|
|
384
|
+
title: '@person-core:persons.entities.person.groups.phones',
|
|
385
|
+
groupId: 'phones',
|
|
386
|
+
schema: {
|
|
387
|
+
defaultValue: [],
|
|
388
|
+
dataType: 'array',
|
|
389
|
+
interface: {
|
|
390
|
+
type: AXPWidgetsList.Layouts.RepeaterLayout,
|
|
391
|
+
options: { hasControls: true },
|
|
392
|
+
children: [...PHONES_REPEATER_CHILDREN],
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
name: 'emails',
|
|
398
|
+
title: '@person-core:persons.entities.person.groups.emails',
|
|
399
|
+
groupId: 'emails',
|
|
400
|
+
schema: {
|
|
401
|
+
defaultValue: [],
|
|
402
|
+
dataType: 'array',
|
|
403
|
+
interface: {
|
|
404
|
+
type: AXPWidgetsList.Layouts.RepeaterLayout,
|
|
405
|
+
options: { hasControls: true },
|
|
406
|
+
children: [...EMAILS_REPEATER_CHILDREN],
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: 'addresses',
|
|
412
|
+
title: '@person-core:persons.entities.person.groups.addresses',
|
|
413
|
+
groupId: 'addresses',
|
|
414
|
+
schema: {
|
|
415
|
+
defaultValue: [],
|
|
416
|
+
dataType: 'array',
|
|
417
|
+
interface: {
|
|
418
|
+
type: AXPWidgetsList.Layouts.RepeaterLayout,
|
|
419
|
+
options: { hasControls: true },
|
|
420
|
+
children: [...ADDRESSES_REPEATER_CHILDREN],
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
name: 'integrationRef',
|
|
426
|
+
title: '@person-core:persons.entities.person.fields.integration-ref.title',
|
|
427
|
+
groupId: 'profile',
|
|
428
|
+
schema: {
|
|
429
|
+
dataType: 'object',
|
|
430
|
+
visible: false,
|
|
431
|
+
nullable: true,
|
|
432
|
+
readonly: true,
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
columns: [
|
|
437
|
+
{ name: 'firstName', options: { width: '200px' } },
|
|
438
|
+
{ name: 'lastName', options: { width: '200px' } },
|
|
439
|
+
{
|
|
440
|
+
name: 'fullName',
|
|
441
|
+
showAs: { type: AXPWidgetsCatalog.text, options: { visible: false } },
|
|
442
|
+
options: { width: '250px' },
|
|
443
|
+
},
|
|
444
|
+
{ name: 'personTitleId', options: { dataPath: 'personTitle.title', visible: false } },
|
|
445
|
+
{ name: 'phones', options: { width: '200px' } },
|
|
446
|
+
{ name: 'emails', options: { width: '200px' } },
|
|
447
|
+
{ name: 'addresses', options: { width: '250px' } },
|
|
448
|
+
{ name: 'birthDate', options: { visible: false } },
|
|
449
|
+
{ name: 'genderId', options: { dataPath: 'gender.title', visible: false } },
|
|
450
|
+
{ name: 'identityNumber', options: { visible: false } },
|
|
451
|
+
{ name: 'userId', options: { visible: false } },
|
|
452
|
+
{ name: 'maritalStatusId', options: { dataPath: 'maritalStatus.title', visible: false } },
|
|
453
|
+
{ name: 'educationLevelId', options: { dataPath: 'educationLevel.title', visible: false } },
|
|
454
|
+
],
|
|
455
|
+
relatedEntities: [
|
|
456
|
+
{
|
|
457
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.personRelationship.name}`,
|
|
458
|
+
title: '@person-core:persons.entities.person.related-entities.relationships.title',
|
|
459
|
+
columns: ['toPersonId', 'typeId', 'toPerson.phones', 'toPerson.emails'],
|
|
460
|
+
conditions: [{ name: 'fromPersonId', operator: { type: 'equal' }, value: '{{ context.eval("id") }}' }],
|
|
461
|
+
persistence: {
|
|
462
|
+
foreignKeyField: 'fromPersonId',
|
|
463
|
+
kind: AXPRelationshipKind.Composition,
|
|
464
|
+
onDelete: null,
|
|
465
|
+
},
|
|
466
|
+
actions: [...entityDetailsCrudActions('fromPersonId')],
|
|
467
|
+
layout: { type: 'page-list', position: 'after', order: 1 },
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
interfaces: {
|
|
471
|
+
master: {
|
|
472
|
+
create: {
|
|
473
|
+
sections: [
|
|
474
|
+
{ id: 'profile', order: 1, layout: { positions: { lg: { colSpan: 8, colStart: 1 } } } },
|
|
475
|
+
{ id: 'image', order: 2, layout: { positions: { lg: { colSpan: 4, colStart: 9 } } } },
|
|
476
|
+
{ id: 'phones', order: 5, layout: { positions: { lg: { colSpan: 6, colStart: 1 } } } },
|
|
477
|
+
{ id: 'emails', order: 6, layout: { positions: { lg: { colSpan: 6, colStart: 7 } } } },
|
|
478
|
+
{ id: 'addresses', order: 7, layout: { positions: { lg: { colSpan: 12, colStart: 1 } } } },
|
|
479
|
+
],
|
|
480
|
+
properties: [
|
|
481
|
+
{ name: 'personTitleId', layout: { positions: { lg: { colSpan: 4, order: 0 } } } },
|
|
482
|
+
{ name: 'firstName', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
|
|
483
|
+
{ name: 'lastName', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
|
|
484
|
+
{ name: 'genderId', layout: { positions: { lg: { colSpan: 4, order: 3 } } } },
|
|
485
|
+
{ name: 'birthDate', layout: { positions: { lg: { colSpan: 4, order: 4 } } } },
|
|
486
|
+
{ name: 'identityNumber', layout: { positions: { lg: { colSpan: 4, order: 5 } } } },
|
|
487
|
+
{ name: 'maritalStatusId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
488
|
+
{ name: 'educationLevelId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
489
|
+
{ name: 'image', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
490
|
+
{ name: 'phones', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
491
|
+
{ name: 'emails', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
492
|
+
{ name: 'addresses', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
493
|
+
],
|
|
494
|
+
quickCreate: {
|
|
495
|
+
enabled: true,
|
|
496
|
+
properties: ['firstName', 'lastName', 'code', 'phones', 'emails'],
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
update: {
|
|
500
|
+
sections: [
|
|
501
|
+
{ id: 'profile', layout: { positions: { lg: { colSpan: 8, colStart: 1 } } } },
|
|
502
|
+
{ id: 'image', layout: { positions: { lg: { colSpan: 4, colStart: 9 } } } },
|
|
503
|
+
{ id: 'phones', layout: { positions: { lg: { colSpan: 6, colStart: 1 } } } },
|
|
504
|
+
{ id: 'emails', layout: { positions: { lg: { colSpan: 6, colStart: 7 } } } },
|
|
505
|
+
{ id: 'addresses', layout: { positions: { lg: { colSpan: 12, colStart: 1 } } } },
|
|
506
|
+
],
|
|
507
|
+
properties: [
|
|
508
|
+
{ name: 'personTitleId', layout: { positions: { lg: { colSpan: 4, order: 0 } } } },
|
|
509
|
+
{ name: 'firstName', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
|
|
510
|
+
{ name: 'lastName', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
|
|
511
|
+
{ name: 'genderId', layout: { positions: { lg: { colSpan: 4, order: 3 } } } },
|
|
512
|
+
{ name: 'birthDate', layout: { positions: { lg: { colSpan: 4, order: 4 } } } },
|
|
513
|
+
{ name: 'identityNumber', layout: { positions: { lg: { colSpan: 4, order: 5 } } } },
|
|
514
|
+
{ name: 'maritalStatusId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
515
|
+
{ name: 'educationLevelId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
516
|
+
{ name: 'image', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
517
|
+
{ name: 'phones', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
518
|
+
{ name: 'emails', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
519
|
+
{ name: 'addresses', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
520
|
+
],
|
|
521
|
+
},
|
|
522
|
+
single: {
|
|
523
|
+
title: '{{ (context.eval("firstName") ) + " " + (context.eval("lastName") ) }}',
|
|
524
|
+
sections: [
|
|
525
|
+
{ id: 'profile', order: 1, layout: { positions: { lg: { colSpan: 8, colStart: 1 } } } },
|
|
526
|
+
{ id: 'image', order: 2, layout: { positions: { lg: { colSpan: 4, colStart: 9 } } } },
|
|
527
|
+
{ id: 'phones', order: 5, layout: { positions: { lg: { colSpan: 6, colStart: 1 } } } },
|
|
528
|
+
{ id: 'emails', order: 6, layout: { positions: { lg: { colSpan: 6, colStart: 7 } } } },
|
|
529
|
+
{ id: 'addresses', order: 7, layout: { positions: { lg: { colSpan: 12, colStart: 1 } } } },
|
|
530
|
+
],
|
|
531
|
+
properties: [
|
|
532
|
+
{ name: 'personTitleId', layout: { positions: { lg: { colSpan: 4, order: 0 } } } },
|
|
533
|
+
{ name: 'firstName', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
|
|
534
|
+
{ name: 'lastName', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
|
|
535
|
+
{ name: 'genderId', layout: { positions: { lg: { colSpan: 4, order: 3 } } } },
|
|
536
|
+
{ name: 'birthDate', layout: { positions: { lg: { colSpan: 4, order: 4 } } } },
|
|
537
|
+
{ name: 'identityNumber', layout: { positions: { lg: { colSpan: 4, order: 5 } } } },
|
|
538
|
+
{ name: 'maritalStatusId', layout: { positions: { lg: { colSpan: 6, order: 6 } } } },
|
|
539
|
+
{ name: 'educationLevelId', layout: { positions: { lg: { colSpan: 6, order: 7 } } } },
|
|
540
|
+
{ name: 'image', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 1 } } } },
|
|
541
|
+
{ name: 'phones', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
542
|
+
{ name: 'emails', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
543
|
+
{ name: 'addresses', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 0 } } } },
|
|
544
|
+
],
|
|
545
|
+
actions: [...entityMasterRecordActions()],
|
|
546
|
+
},
|
|
547
|
+
list: {
|
|
548
|
+
actions: [...entityMasterCrudActions()],
|
|
549
|
+
views: [
|
|
550
|
+
createAllQueryView({
|
|
551
|
+
sorts: [{ name: 'firstName', dir: 'asc' }],
|
|
552
|
+
}),
|
|
553
|
+
],
|
|
554
|
+
},
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
};
|
|
558
|
+
return entityDef;
|
|
559
|
+
}
|
|
560
|
+
//#endregion
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Generated bundle index. Do not edit.
|
|
564
|
+
*/
|
|
565
|
+
|
|
566
|
+
export { personFactory };
|
|
567
|
+
//# sourceMappingURL=acorex-platform-module-person-core-client-contracts-entities-person.mjs.map
|