@acorex-platform/module-location-management-client 0.0.15

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.
Files changed (50) hide show
  1. package/contracts/datasource.keys.d.ts +6 -0
  2. package/contracts/datasource.keys.js +8 -0
  3. package/contracts/entities/geographic-region/geographic-region.entity.d.ts +2 -0
  4. package/contracts/entities/geographic-region/geographic-region.entity.js +725 -0
  5. package/contracts/entities/geographic-region/geographic-region.types.d.ts +27 -0
  6. package/contracts/entities/geographic-region/geographic-region.types.js +1 -0
  7. package/contracts/entities/geographic-region/index.d.ts +2 -0
  8. package/contracts/entities/geographic-region/index.js +2 -0
  9. package/contracts/entities/index.d.ts +5 -0
  10. package/contracts/entities/index.js +5 -0
  11. package/contracts/entities/location/index.d.ts +2 -0
  12. package/contracts/entities/location/index.js +2 -0
  13. package/contracts/entities/location/location.entity.d.ts +2 -0
  14. package/contracts/entities/location/location.entity.js +1075 -0
  15. package/contracts/entities/location/location.types.d.ts +30 -0
  16. package/contracts/entities/location/location.types.js +1 -0
  17. package/contracts/entities/location-assignment/index.d.ts +2 -0
  18. package/contracts/entities/location-assignment/index.js +2 -0
  19. package/contracts/entities/location-assignment/location-assignment.entity.d.ts +2 -0
  20. package/contracts/entities/location-assignment/location-assignment.entity.js +194 -0
  21. package/contracts/entities/location-assignment/location-assignment.types.d.ts +35 -0
  22. package/contracts/entities/location-assignment/location-assignment.types.js +2 -0
  23. package/contracts/entities/location-role/index.d.ts +2 -0
  24. package/contracts/entities/location-role/index.js +2 -0
  25. package/contracts/entities/location-role/location-role.entity.d.ts +2 -0
  26. package/contracts/entities/location-role/location-role.entity.js +143 -0
  27. package/contracts/entities/location-role/location-role.types.d.ts +6 -0
  28. package/contracts/entities/location-role/location-role.types.js +1 -0
  29. package/contracts/entities/location-type/index.d.ts +2 -0
  30. package/contracts/entities/location-type/index.js +2 -0
  31. package/contracts/entities/location-type/location-type.entity.d.ts +2 -0
  32. package/contracts/entities/location-type/location-type.entity.js +237 -0
  33. package/contracts/entities/location-type/location-type.types.d.ts +8 -0
  34. package/contracts/entities/location-type/location-type.types.js +1 -0
  35. package/contracts/features.keys.d.ts +1 -0
  36. package/contracts/features.keys.js +2 -0
  37. package/contracts/index.d.ts +8 -0
  38. package/contracts/index.js +10 -0
  39. package/contracts/location-assignment.actions.d.ts +8 -0
  40. package/contracts/location-assignment.actions.js +73 -0
  41. package/contracts/location-assignment.utils.d.ts +53 -0
  42. package/contracts/location-assignment.utils.js +145 -0
  43. package/contracts/menu.keys.d.ts +8 -0
  44. package/contracts/menu.keys.js +8 -0
  45. package/contracts/package.json +5 -0
  46. package/contracts/permission.keys.d.ts +33 -0
  47. package/contracts/permission.keys.js +42 -0
  48. package/contracts/root-config.d.ts +42 -0
  49. package/contracts/root-config.js +43 -0
  50. package/package.json +12 -0
@@ -0,0 +1,1075 @@
1
+ import { AXPRegionalSetting, AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
3
+ import { AXPLocaleManagementDataSourceKeys } from '@acorex-platform/module-locale-management-contracts';
4
+ import { RootConfig } from '../../root-config';
5
+ import { locationAssignmentReadOnlyRelatedActions } from '../../index';
6
+ import { locationAssignmentLocationConditions } from '../../index';
7
+ export async function locationFactory() {
8
+ const entityDef = {
9
+ module: RootConfig.module.name,
10
+ name: RootConfig.entities.location.name,
11
+ icon: 'fa-solid fa-location-dot',
12
+ title: RootConfig.entities.location.title,
13
+ formats: {
14
+ individual: RootConfig.entities.location.title,
15
+ plural: RootConfig.entities.location.titlePlural,
16
+ searchResult: {
17
+ title: '{{ title }}',
18
+ description: '{{ fullAddress }}',
19
+ },
20
+ },
21
+ plugins: [
22
+ { name: 'archive' },
23
+ {
24
+ name: 'computed-property',
25
+ options: {
26
+ fields: [
27
+ {
28
+ name: 'fullAddress',
29
+ title: '@general:terms.common.address',
30
+ value: '{{ address.format({ street1: context.eval("street1"), street2: context.eval("street2"), country: context.eval("country"), state: context.eval("state"), city: context.eval("city"), postalCode: context.eval("postalCode") }) }}',
31
+ group: {
32
+ id: 'address',
33
+ title: '@location-management:locations.entities.location.groups.address-details',
34
+ },
35
+ visible: false,
36
+ recompute: { middleware: true },
37
+ showAs: { type: AXPWidgetsCatalog.text },
38
+ },
39
+ ],
40
+ },
41
+ },
42
+ ],
43
+ groups: [
44
+ {
45
+ id: 'basic-info',
46
+ title: '@general:terms.interface.basic-info',
47
+ },
48
+ {
49
+ id: 'address',
50
+ title: '@location-management:locations.entities.location.groups.address-details',
51
+ },
52
+ {
53
+ id: 'geographic',
54
+ title: '@general:terms.interface.geographic-details',
55
+ },
56
+ {
57
+ id: 'additional',
58
+ title: '@general:terms.interface.additional-info',
59
+ },
60
+ ],
61
+ properties: [
62
+ {
63
+ name: 'code',
64
+ title: '@location-management:locations.entities.location.fields.code',
65
+ groupId: 'basic-info',
66
+ options: {
67
+ sort: {
68
+ enabled: true,
69
+ },
70
+ filter: {
71
+ advance: {
72
+ enabled: true,
73
+ },
74
+ inline: {
75
+ enabled: true,
76
+ },
77
+ },
78
+ },
79
+ schema: {
80
+ dataType: 'string',
81
+ interface: {
82
+ type: AXPWidgetsCatalog.text,
83
+ options: {
84
+ placeholder: 'Optional location code',
85
+ },
86
+ },
87
+ },
88
+ },
89
+ {
90
+ name: 'title',
91
+ title: '@general:terms.common.title',
92
+ groupId: 'basic-info',
93
+ options: {
94
+ sort: {
95
+ enabled: true,
96
+ },
97
+ filter: {
98
+ advance: {
99
+ enabled: true,
100
+ },
101
+ inline: {
102
+ enabled: true,
103
+ },
104
+ },
105
+ },
106
+ schema: {
107
+ dataType: 'string',
108
+ interface: {
109
+ type: AXPWidgetsCatalog.text,
110
+ options: {
111
+ placeholder: 'Enter location name',
112
+ },
113
+ },
114
+ },
115
+ validations: [
116
+ {
117
+ rule: 'required',
118
+ },
119
+ ],
120
+ },
121
+ {
122
+ name: 'locationTypeId',
123
+ title: '@location-management:locations.entities.location.fields.location-type',
124
+ groupId: 'basic-info',
125
+ options: {
126
+ sort: {
127
+ enabled: true,
128
+ },
129
+ filter: {
130
+ advance: {
131
+ enabled: true,
132
+ },
133
+ inline: {
134
+ enabled: true,
135
+ },
136
+ },
137
+ },
138
+ schema: {
139
+ dataType: 'object',
140
+ interface: {
141
+ type: AXPWidgetsCatalog.lookup,
142
+ options: {
143
+ entity: `${RootConfig.module.name}.${RootConfig.entities.locationType.name}`,
144
+ look: 'select',
145
+ expose: [
146
+ { source: 'id', target: 'locationType.id' },
147
+ { source: 'title', target: 'locationType.title' },
148
+ ],
149
+ },
150
+ },
151
+ },
152
+ validations: [
153
+ {
154
+ rule: 'required',
155
+ },
156
+ ],
157
+ },
158
+ {
159
+ name: 'street1',
160
+ title: '@location-management:locations.entities.location.fields.street1',
161
+ groupId: 'address',
162
+ options: {
163
+ sort: {
164
+ enabled: true,
165
+ },
166
+ filter: {
167
+ advance: {
168
+ enabled: true,
169
+ },
170
+ inline: {
171
+ enabled: true,
172
+ },
173
+ },
174
+ },
175
+ schema: {
176
+ dataType: 'string',
177
+ interface: {
178
+ type: AXPWidgetsCatalog.text,
179
+ options: {
180
+ placeholder: 'Enter street address',
181
+ },
182
+ },
183
+ },
184
+ validations: [
185
+ {
186
+ rule: 'required',
187
+ },
188
+ ],
189
+ },
190
+ {
191
+ name: 'street2',
192
+ title: '@location-management:locations.entities.location.fields.street2',
193
+ groupId: 'address',
194
+ options: {
195
+ filter: {
196
+ advance: {
197
+ enabled: true,
198
+ },
199
+ },
200
+ },
201
+ schema: {
202
+ dataType: 'string',
203
+ interface: {
204
+ type: AXPWidgetsCatalog.text,
205
+ options: {
206
+ placeholder: 'Apartment, suite, etc.',
207
+ },
208
+ },
209
+ },
210
+ },
211
+ {
212
+ name: 'countryId',
213
+ title: '@location-management:locations.entities.location.fields.country',
214
+ groupId: 'address',
215
+ options: {
216
+ sort: {
217
+ enabled: true,
218
+ },
219
+ filter: {
220
+ advance: {
221
+ enabled: true,
222
+ },
223
+ inline: {
224
+ enabled: true,
225
+ },
226
+ },
227
+ },
228
+ schema: {
229
+ dataType: 'object',
230
+ interface: {
231
+ type: AXPWidgetsCatalog.lookup,
232
+ options: {
233
+ entity: `${RootConfig.module.name}.${RootConfig.entities.geographicRegion.name}`,
234
+ look: 'select',
235
+ allowCreate: 'quick',
236
+ create: {
237
+ enable: true,
238
+ },
239
+ expose: [
240
+ { source: 'id', target: 'country.id' },
241
+ { source: 'title', target: 'country.title' },
242
+ ],
243
+ filter: {
244
+ logic: 'and',
245
+ filters: [
246
+ { field: 'type.code', operator: { type: 'equal' }, value: 'country' },
247
+ ],
248
+ },
249
+ },
250
+ },
251
+ },
252
+ },
253
+ {
254
+ name: 'stateId',
255
+ title: '@location-management:locations.entities.location.fields.state',
256
+ groupId: 'address',
257
+ options: {
258
+ filter: {
259
+ advance: {
260
+ enabled: true,
261
+ },
262
+ inline: {
263
+ enabled: true,
264
+ },
265
+ },
266
+ },
267
+ schema: {
268
+ dataType: 'object',
269
+ interface: {
270
+ type: AXPWidgetsCatalog.lookup,
271
+ options: {
272
+ look: 'select',
273
+ entity: `${RootConfig.module.name}.${RootConfig.entities.geographicRegion.name}`,
274
+ allowCreate: 'quick',
275
+ disabled: '{{ !context.eval("countryId") }}',
276
+ create: {
277
+ enable: true,
278
+ context: {
279
+ parentId: '{{ context.eval("countryId") }}',
280
+ type: { code: 'state' },
281
+ },
282
+ },
283
+ expose: [
284
+ { source: 'id', target: 'state.id' },
285
+ { source: 'title', target: 'state.title' },
286
+ ],
287
+ filter: {
288
+ logic: 'and',
289
+ filters: [
290
+ {
291
+ field: 'parentId',
292
+ operator: {
293
+ type: 'equal',
294
+ },
295
+ value: '{{ context.eval("countryId") }}',
296
+ },
297
+ {
298
+ field: 'type.code',
299
+ operator: {
300
+ type: 'equal',
301
+ },
302
+ value: 'state',
303
+ },
304
+ ],
305
+ },
306
+ },
307
+ triggers: [
308
+ {
309
+ event: "{{ events.context('countryId') }}",
310
+ action: `{{ widget.setValue(null); context.set('state.title', null); context.set('cityId', null); context.set('city.id', null); context.set('city.title', null); widget.refresh(); }}`,
311
+ },
312
+ ],
313
+ },
314
+ },
315
+ },
316
+ {
317
+ name: 'cityId',
318
+ title: '@location-management:locations.entities.location.fields.city',
319
+ groupId: 'address',
320
+ options: {
321
+ filter: {
322
+ advance: {
323
+ enabled: true,
324
+ },
325
+ inline: {
326
+ enabled: true,
327
+ },
328
+ },
329
+ },
330
+ schema: {
331
+ dataType: 'object',
332
+ interface: {
333
+ type: AXPWidgetsCatalog.lookup,
334
+ options: {
335
+ look: 'select',
336
+ entity: `${RootConfig.module.name}.${RootConfig.entities.geographicRegion.name}`,
337
+ allowCreate: 'quick',
338
+ disabled: '{{ !context.eval("stateId") }}',
339
+ create: {
340
+ enable: true,
341
+ context: {
342
+ parentId: '{{ context.eval("stateId") }}',
343
+ type: { code: 'city' },
344
+ },
345
+ },
346
+ expose: [
347
+ { source: 'id', target: 'city.id' },
348
+ { source: 'title', target: 'city.title' },
349
+ ],
350
+ filter: {
351
+ logic: 'and',
352
+ filters: [
353
+ {
354
+ field: 'parentId',
355
+ operator: {
356
+ type: 'equal',
357
+ },
358
+ value: '{{ context.eval("stateId") }}',
359
+ },
360
+ {
361
+ field: 'type.code',
362
+ operator: {
363
+ type: 'equal',
364
+ },
365
+ value: 'city',
366
+ },
367
+ ],
368
+ },
369
+ },
370
+ triggers: [
371
+ {
372
+ event: "{{ events.context('stateId') }}",
373
+ action: `{{ widget.setValue(null); context.set('city.title', null); widget.refresh(); }}`,
374
+ },
375
+ {
376
+ event: "{{ events.context('countryId') }}",
377
+ action: `{{ widget.setValue(null); context.set('city.title', null); widget.refresh(); }}`,
378
+ },
379
+ ],
380
+ },
381
+ },
382
+ },
383
+ {
384
+ name: 'postalCode',
385
+ title: '@location-management:locations.entities.location.fields.postal-code',
386
+ groupId: 'address',
387
+ options: {
388
+ filter: {
389
+ advance: {
390
+ enabled: true,
391
+ },
392
+ inline: {
393
+ enabled: true,
394
+ },
395
+ },
396
+ },
397
+ schema: {
398
+ dataType: 'string',
399
+ interface: {
400
+ type: AXPWidgetsCatalog.text,
401
+ options: {
402
+ placeholder: 'Postal/ZIP code',
403
+ },
404
+ },
405
+ },
406
+ validations: [
407
+ {
408
+ rule: 'required',
409
+ },
410
+ ],
411
+ },
412
+ {
413
+ name: 'hasCoordinates',
414
+ title: '@location-management:locations.entities.location.fields.coordinates',
415
+ groupId: 'geographic',
416
+ schema: {
417
+ dataType: 'boolean',
418
+ defaultValue: false,
419
+ interface: {
420
+ type: AXPWidgetsCatalog.toggle,
421
+ },
422
+ },
423
+ },
424
+ {
425
+ name: 'coordinates',
426
+ title: '@location-management:locations.entities.location.fields.coordinates',
427
+ groupId: 'geographic',
428
+ schema: {
429
+ dataType: 'string',
430
+ visible: '{{ context.eval("hasCoordinates") == true || !!context.eval("coordinates") }}',
431
+ interface: {
432
+ type: AXPWidgetsCatalog.map,
433
+ options: {
434
+ hasDraw: true,
435
+ maxPolygon: 0,
436
+ fitToDraw: true,
437
+ },
438
+ triggers: [
439
+ {
440
+ event: "{{ events.context('hasCoordinates') }}",
441
+ action: `{{ widget.clear() }}`,
442
+ },
443
+ ],
444
+ },
445
+ },
446
+ },
447
+ {
448
+ name: 'timezone',
449
+ title: '@location-management:locations.entities.location.fields.timezone',
450
+ groupId: 'geographic',
451
+ options: {
452
+ filter: {
453
+ advance: {
454
+ enabled: true,
455
+ },
456
+ },
457
+ },
458
+ schema: {
459
+ dataType: 'string',
460
+ defaultValue: `{{ settings.get('${AXPRegionalSetting.TimeZone}') }}`,
461
+ interface: {
462
+ type: AXPWidgetsCatalog.select,
463
+ options: {
464
+ allowSearch: true,
465
+ valueField: 'code',
466
+ placeholder: 'e.g., America/New_York',
467
+ dataSource: AXPLocaleManagementDataSourceKeys.Timezones,
468
+ },
469
+ },
470
+ },
471
+ },
472
+ {
473
+ name: 'parentLocationId',
474
+ title: '@location-management:locations.entities.location.fields.parent-location',
475
+ groupId: 'basic-info',
476
+ options: {
477
+ filter: {
478
+ advance: {
479
+ enabled: true,
480
+ },
481
+ inline: {
482
+ enabled: true,
483
+ },
484
+ },
485
+ },
486
+ schema: {
487
+ dataType: 'object',
488
+ interface: {
489
+ type: AXPWidgetsCatalog.lookup,
490
+ options: {
491
+ entity: `${RootConfig.module.name}.${RootConfig.entities.location.name}`,
492
+ expose: [
493
+ { source: 'id', target: 'parentLocation.id' },
494
+ { source: 'title', target: 'parentLocation.title' },
495
+ ],
496
+ },
497
+ },
498
+ },
499
+ },
500
+ {
501
+ name: 'description',
502
+ title: '@general:terms.common.description',
503
+ groupId: 'basic-info',
504
+ options: {
505
+ filter: {
506
+ advance: {
507
+ enabled: true,
508
+ },
509
+ },
510
+ },
511
+ schema: {
512
+ dataType: 'string',
513
+ interface: {
514
+ type: AXPWidgetsCatalog.largeText,
515
+ options: {
516
+ rows: 3,
517
+ },
518
+ },
519
+ },
520
+ },
521
+ ],
522
+ columns: [
523
+ { name: 'code' },
524
+ { name: 'title' },
525
+ { name: 'locationTypeId', options: { dataPath: 'locationType.title' } },
526
+ { name: 'street1' },
527
+ { name: 'postalCode' },
528
+ { name: 'cityId', options: { dataPath: 'city.title' } },
529
+ { name: 'stateId', options: { dataPath: 'state.title' } },
530
+ { name: 'countryId', options: { dataPath: 'country.title' } },
531
+ ],
532
+ relatedEntities: [
533
+ {
534
+ entity: `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}`,
535
+ title: '@location-management:locations.entities.location.related-entities.assignments.title',
536
+ icon: RootConfig.entities.locationAssignment.icon,
537
+ columns: [
538
+ { name: 'ownerRef.id', options: { dataPath: 'ownerRef.title' } },
539
+ { name: 'roleId', options: { dataPath: 'role.title' } },
540
+ { name: 'personId', options: { dataPath: 'person.fullName' } },
541
+ { name: 'person.phones' },
542
+ { name: 'notes' },
543
+ ],
544
+ conditions: locationAssignmentLocationConditions('id'),
545
+ actions: [...locationAssignmentReadOnlyRelatedActions()],
546
+ layout: { type: 'page-list', position: 'after', order: 1 },
547
+ },
548
+ ],
549
+ interfaces: {
550
+ master: {
551
+ create: {
552
+ sections: [
553
+ {
554
+ id: 'basic-info',
555
+ },
556
+ {
557
+ id: 'address',
558
+ },
559
+ {
560
+ id: 'geographic',
561
+ },
562
+ {
563
+ id: 'additional',
564
+ },
565
+ ],
566
+ properties: [
567
+ {
568
+ name: 'code',
569
+ },
570
+ {
571
+ name: 'title',
572
+ },
573
+ {
574
+ name: 'locationTypeId',
575
+ layout: {
576
+ positions: {
577
+ sm: {
578
+ colSpan: 12,
579
+ },
580
+ md: {
581
+ colSpan: 6,
582
+ },
583
+ },
584
+ },
585
+ },
586
+ {
587
+ name: 'street1',
588
+ layout: {
589
+ positions: {
590
+ sm: {
591
+ colSpan: 12,
592
+ },
593
+ },
594
+ },
595
+ },
596
+ {
597
+ name: 'street2',
598
+ layout: {
599
+ positions: {
600
+ sm: {
601
+ colSpan: 12,
602
+ },
603
+ },
604
+ },
605
+ },
606
+ {
607
+ name: 'countryId',
608
+ layout: {
609
+ positions: {
610
+ sm: {
611
+ colSpan: 12,
612
+ },
613
+ md: {
614
+ colSpan: 4,
615
+ },
616
+ },
617
+ },
618
+ },
619
+ {
620
+ name: 'stateId',
621
+ layout: {
622
+ positions: {
623
+ sm: {
624
+ colSpan: 12,
625
+ },
626
+ md: {
627
+ colSpan: 4,
628
+ },
629
+ },
630
+ },
631
+ },
632
+ {
633
+ name: 'cityId',
634
+ layout: {
635
+ positions: {
636
+ sm: {
637
+ colSpan: 12,
638
+ },
639
+ md: {
640
+ colSpan: 4,
641
+ },
642
+ },
643
+ },
644
+ },
645
+ {
646
+ name: 'postalCode',
647
+ layout: {
648
+ positions: {
649
+ sm: {
650
+ colSpan: 12,
651
+ },
652
+ md: {
653
+ colSpan: 4,
654
+ },
655
+ },
656
+ },
657
+ },
658
+ {
659
+ name: 'hasCoordinates',
660
+ layout: {
661
+ positions: {
662
+ sm: {
663
+ colSpan: 6,
664
+ },
665
+ },
666
+ },
667
+ },
668
+ {
669
+ name: 'coordinates',
670
+ layout: {
671
+ label: {
672
+ visible: false,
673
+ },
674
+ positions: {
675
+ sm: {
676
+ colSpan: 12,
677
+ },
678
+ },
679
+ },
680
+ },
681
+ {
682
+ name: 'timezone',
683
+ layout: {
684
+ positions: {
685
+ sm: {
686
+ colSpan: 12,
687
+ colStart: 1,
688
+ },
689
+ md: {
690
+ colSpan: 4,
691
+ colStart: 1,
692
+ },
693
+ },
694
+ },
695
+ },
696
+ {
697
+ name: 'parentLocationId',
698
+ layout: {
699
+ positions: {
700
+ sm: {
701
+ colSpan: 12,
702
+ },
703
+ md: {
704
+ colSpan: 6,
705
+ },
706
+ },
707
+ },
708
+ },
709
+ {
710
+ name: 'description',
711
+ },
712
+ ],
713
+ },
714
+ update: {
715
+ sections: [
716
+ {
717
+ id: 'basic-info',
718
+ },
719
+ {
720
+ id: 'address',
721
+ },
722
+ {
723
+ id: 'geographic',
724
+ },
725
+ {
726
+ id: 'additional',
727
+ },
728
+ {
729
+ id: 'settings',
730
+ },
731
+ ],
732
+ properties: [
733
+ {
734
+ name: 'code',
735
+ },
736
+ {
737
+ name: 'title',
738
+ },
739
+ {
740
+ name: 'locationTypeId',
741
+ layout: {
742
+ positions: {
743
+ sm: {
744
+ colSpan: 12,
745
+ },
746
+ md: {
747
+ colSpan: 6,
748
+ },
749
+ },
750
+ },
751
+ },
752
+ {
753
+ name: 'description',
754
+ },
755
+ {
756
+ name: 'parentLocationId',
757
+ layout: {
758
+ positions: {
759
+ sm: {
760
+ colSpan: 12,
761
+ },
762
+ md: {
763
+ colSpan: 6,
764
+ },
765
+ },
766
+ },
767
+ },
768
+ {
769
+ name: 'street1',
770
+ layout: {
771
+ positions: {
772
+ sm: {
773
+ colSpan: 12,
774
+ },
775
+ },
776
+ },
777
+ },
778
+ {
779
+ name: 'street2',
780
+ layout: {
781
+ positions: {
782
+ sm: {
783
+ colSpan: 12,
784
+ },
785
+ },
786
+ },
787
+ },
788
+ {
789
+ name: 'cityId',
790
+ layout: {
791
+ positions: {
792
+ sm: {
793
+ colSpan: 12,
794
+ },
795
+ md: {
796
+ colSpan: 4,
797
+ },
798
+ },
799
+ },
800
+ },
801
+ {
802
+ name: 'stateId',
803
+ layout: {
804
+ positions: {
805
+ sm: {
806
+ colSpan: 12,
807
+ },
808
+ md: {
809
+ colSpan: 4,
810
+ },
811
+ },
812
+ },
813
+ },
814
+ {
815
+ name: 'countryId',
816
+ layout: {
817
+ positions: {
818
+ sm: {
819
+ colSpan: 12,
820
+ },
821
+ md: {
822
+ colSpan: 4,
823
+ },
824
+ },
825
+ },
826
+ },
827
+ {
828
+ name: 'postalCode',
829
+ layout: {
830
+ positions: {
831
+ sm: {
832
+ colSpan: 12,
833
+ },
834
+ md: {
835
+ colSpan: 4,
836
+ },
837
+ },
838
+ },
839
+ },
840
+ {
841
+ name: 'hasCoordinates',
842
+ layout: {
843
+ positions: {
844
+ sm: {
845
+ colSpan: 6,
846
+ },
847
+ },
848
+ },
849
+ },
850
+ {
851
+ name: 'coordinates',
852
+ layout: {
853
+ label: {
854
+ visible: false,
855
+ },
856
+ positions: {
857
+ sm: {
858
+ colSpan: 12,
859
+ },
860
+ },
861
+ },
862
+ },
863
+ {
864
+ name: 'timezone',
865
+ layout: {
866
+ positions: {
867
+ sm: {
868
+ colSpan: 12,
869
+ colStart: 1,
870
+ },
871
+ md: {
872
+ colSpan: 4,
873
+ colStart: 1,
874
+ },
875
+ },
876
+ },
877
+ },
878
+ ],
879
+ },
880
+ single: {
881
+ title: '{{title}}',
882
+ description: '{{ fullAddress }}',
883
+ sections: [
884
+ {
885
+ id: 'basic-info',
886
+ layout: {
887
+ positions: {
888
+ lg: {
889
+ colSpan: 12,
890
+ },
891
+ },
892
+ },
893
+ },
894
+ {
895
+ id: 'address',
896
+ layout: {
897
+ positions: {
898
+ lg: {
899
+ colSpan: 12,
900
+ },
901
+ },
902
+ },
903
+ },
904
+ {
905
+ id: 'geographic',
906
+ layout: {
907
+ positions: {
908
+ lg: {
909
+ colSpan: 12,
910
+ },
911
+ },
912
+ },
913
+ },
914
+ {
915
+ id: 'additional',
916
+ layout: {
917
+ positions: {
918
+ lg: {
919
+ colSpan: 12,
920
+ },
921
+ },
922
+ },
923
+ },
924
+ ],
925
+ properties: [
926
+ {
927
+ name: 'code',
928
+ },
929
+ {
930
+ name: 'title',
931
+ },
932
+ {
933
+ name: 'locationTypeId',
934
+ layout: {
935
+ positions: {
936
+ lg: {
937
+ colSpan: 6,
938
+ order: 3,
939
+ },
940
+ },
941
+ },
942
+ },
943
+ {
944
+ name: 'description',
945
+ },
946
+ {
947
+ name: 'parentLocationId',
948
+ layout: {
949
+ positions: {
950
+ lg: {
951
+ colSpan: 6,
952
+ order: 11,
953
+ },
954
+ },
955
+ },
956
+ },
957
+ {
958
+ name: 'street1',
959
+ layout: {
960
+ positions: {
961
+ lg: {
962
+ colSpan: 12,
963
+ order: 4,
964
+ },
965
+ },
966
+ },
967
+ },
968
+ {
969
+ name: 'street2',
970
+ layout: {
971
+ positions: {
972
+ lg: {
973
+ colSpan: 12,
974
+ order: 5,
975
+ },
976
+ },
977
+ },
978
+ },
979
+ {
980
+ name: 'cityId',
981
+ layout: {
982
+ positions: {
983
+ lg: {
984
+ colSpan: 4,
985
+ order: 6,
986
+ },
987
+ },
988
+ },
989
+ },
990
+ {
991
+ name: 'stateId',
992
+ layout: {
993
+ positions: {
994
+ lg: {
995
+ colSpan: 4,
996
+ order: 7,
997
+ },
998
+ },
999
+ },
1000
+ },
1001
+ {
1002
+ name: 'countryId',
1003
+ layout: {
1004
+ positions: {
1005
+ lg: {
1006
+ colSpan: 4,
1007
+ order: 8,
1008
+ },
1009
+ },
1010
+ },
1011
+ },
1012
+ {
1013
+ name: 'postalCode',
1014
+ layout: {
1015
+ positions: {
1016
+ lg: {
1017
+ colSpan: 4,
1018
+ order: 9,
1019
+ },
1020
+ },
1021
+ },
1022
+ },
1023
+ {
1024
+ name: 'hasCoordinates',
1025
+ layout: {
1026
+ positions: {
1027
+ lg: {
1028
+ colSpan: 6,
1029
+ order: 10,
1030
+ },
1031
+ },
1032
+ },
1033
+ },
1034
+ {
1035
+ name: 'coordinates',
1036
+ layout: {
1037
+ label: {
1038
+ visible: false,
1039
+ },
1040
+ positions: {
1041
+ lg: {
1042
+ colSpan: 12,
1043
+ order: 11,
1044
+ },
1045
+ },
1046
+ },
1047
+ },
1048
+ {
1049
+ name: 'timezone',
1050
+ layout: {
1051
+ positions: {
1052
+ lg: {
1053
+ colSpan: 4,
1054
+ colStart: 1,
1055
+ order: 12,
1056
+ },
1057
+ },
1058
+ },
1059
+ },
1060
+ ],
1061
+ actions: [...entityMasterRecordActions()],
1062
+ },
1063
+ list: {
1064
+ actions: [...entityMasterCrudActions()],
1065
+ views: [
1066
+ createAllQueryView({
1067
+ sorts: [{ name: 'title', dir: 'asc' }],
1068
+ }),
1069
+ ],
1070
+ },
1071
+ },
1072
+ },
1073
+ };
1074
+ return entityDef;
1075
+ }