@acorex/connectivity 20.0.12 → 20.0.20
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.
@@ -30,7 +30,9 @@ import { RootConfig as RootConfig$b } from '@acorex/modules/training-management'
|
|
30
30
|
import { RootConfig as RootConfig$c } from '@acorex/modules/project-management';
|
31
31
|
import { RootConfig as RootConfig$d, AXMFolderServiceImpl, AXMDocumentServiceImpl, AXMFolderService, AXMDocumentService } from '@acorex/modules/document-management';
|
32
32
|
import { RootConfig as RootConfig$f } from '@acorex/modules/log-management';
|
33
|
-
import { RootConfig as RootConfig$g } from '@acorex/modules/
|
33
|
+
import { RootConfig as RootConfig$g } from '@acorex/modules/calendar-management';
|
34
|
+
import { RootConfig as RootConfig$h } from '@acorex/modules/data-management';
|
35
|
+
import { convertArrayToDataSource } from '@acorex/cdk/common';
|
34
36
|
|
35
37
|
class AXPDexieEntityStorageService extends Dexie {
|
36
38
|
constructor() {
|
@@ -3233,6 +3235,43 @@ function generateReportDefinitions() {
|
|
3233
3235
|
description: report.description,
|
3234
3236
|
categoryIds: [category.id],
|
3235
3237
|
parameterGroups: report.parameterGroups,
|
3238
|
+
dataSource: {
|
3239
|
+
type: 'query',
|
3240
|
+
name: 'getEmployeeList',
|
3241
|
+
},
|
3242
|
+
layout: {
|
3243
|
+
type: 'table',
|
3244
|
+
columns: [
|
3245
|
+
{
|
3246
|
+
field: 'name',
|
3247
|
+
title: 'Name',
|
3248
|
+
visible: true,
|
3249
|
+
width: 100,
|
3250
|
+
align: 'left',
|
3251
|
+
},
|
3252
|
+
{
|
3253
|
+
field: 'age',
|
3254
|
+
title: 'Age',
|
3255
|
+
visible: true,
|
3256
|
+
width: 100,
|
3257
|
+
align: 'left',
|
3258
|
+
},
|
3259
|
+
],
|
3260
|
+
},
|
3261
|
+
export: {
|
3262
|
+
fileNameTemplate: 'Report_{date}_{user}',
|
3263
|
+
pdf: {
|
3264
|
+
enabled: true,
|
3265
|
+
pageSize: 'A4',
|
3266
|
+
headerEnabled: true,
|
3267
|
+
footerEnabled: true,
|
3268
|
+
showPageNumbers: true,
|
3269
|
+
watermarkText: 'Mock Report',
|
3270
|
+
watermarkOpacity: 0.5,
|
3271
|
+
compression: true,
|
3272
|
+
embedImages: true,
|
3273
|
+
},
|
3274
|
+
},
|
3236
3275
|
});
|
3237
3276
|
});
|
3238
3277
|
});
|
@@ -3300,7 +3339,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
3300
3339
|
const contactTypeMock = [
|
3301
3340
|
{
|
3302
3341
|
id: AXPDataGenerator.uuid(),
|
3303
|
-
|
3342
|
+
title: 'Customer',
|
3304
3343
|
description: 'Business customers and prospects',
|
3305
3344
|
icon: 'fa-light fa-user-tie',
|
3306
3345
|
isDefault: true,
|
@@ -3309,7 +3348,7 @@ const contactTypeMock = [
|
|
3309
3348
|
},
|
3310
3349
|
{
|
3311
3350
|
id: AXPDataGenerator.uuid(),
|
3312
|
-
|
3351
|
+
title: 'Vendor',
|
3313
3352
|
description: 'Suppliers and service providers',
|
3314
3353
|
icon: 'fa-light fa-truck',
|
3315
3354
|
isDefault: false,
|
@@ -3318,7 +3357,7 @@ const contactTypeMock = [
|
|
3318
3357
|
},
|
3319
3358
|
{
|
3320
3359
|
id: AXPDataGenerator.uuid(),
|
3321
|
-
|
3360
|
+
title: 'Partner',
|
3322
3361
|
description: 'Business partners and affiliates',
|
3323
3362
|
icon: 'fa-light fa-handshake',
|
3324
3363
|
isDefault: false,
|
@@ -3327,7 +3366,7 @@ const contactTypeMock = [
|
|
3327
3366
|
},
|
3328
3367
|
{
|
3329
3368
|
id: AXPDataGenerator.uuid(),
|
3330
|
-
|
3369
|
+
title: 'Employee',
|
3331
3370
|
description: 'Current and former employees',
|
3332
3371
|
icon: 'fa-light fa-id-badge',
|
3333
3372
|
isDefault: false,
|
@@ -3336,12 +3375,30 @@ const contactTypeMock = [
|
|
3336
3375
|
},
|
3337
3376
|
{
|
3338
3377
|
id: AXPDataGenerator.uuid(),
|
3339
|
-
|
3378
|
+
title: 'Lead',
|
3340
3379
|
description: 'Potential customers and prospects',
|
3341
3380
|
icon: 'fa-light fa-bullseye',
|
3342
3381
|
isDefault: false,
|
3343
3382
|
isActive: true,
|
3344
3383
|
order: 5,
|
3384
|
+
},
|
3385
|
+
{
|
3386
|
+
id: AXPDataGenerator.uuid(),
|
3387
|
+
title: 'Sub-contractor',
|
3388
|
+
description: 'Sub-contractors and service providers',
|
3389
|
+
icon: 'fa-light fa-building',
|
3390
|
+
isDefault: false,
|
3391
|
+
isActive: true,
|
3392
|
+
order: 6,
|
3393
|
+
},
|
3394
|
+
{
|
3395
|
+
id: AXPDataGenerator.uuid(),
|
3396
|
+
title: 'Other',
|
3397
|
+
description: 'Other types of contacts',
|
3398
|
+
icon: 'fa-light fa-question',
|
3399
|
+
isDefault: false,
|
3400
|
+
isActive: true,
|
3401
|
+
order: 7,
|
3345
3402
|
}
|
3346
3403
|
];
|
3347
3404
|
|
@@ -3362,7 +3419,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
3362
3419
|
const contactSourceMock = [
|
3363
3420
|
{
|
3364
3421
|
id: AXPDataGenerator.uuid(),
|
3365
|
-
|
3422
|
+
title: 'Website',
|
3366
3423
|
description: 'Contacts from company website',
|
3367
3424
|
icon: 'fa-light fa-globe',
|
3368
3425
|
isDefault: true,
|
@@ -3371,7 +3428,7 @@ const contactSourceMock = [
|
|
3371
3428
|
},
|
3372
3429
|
{
|
3373
3430
|
id: AXPDataGenerator.uuid(),
|
3374
|
-
|
3431
|
+
title: 'Social Media',
|
3375
3432
|
description: 'Contacts from social media platforms',
|
3376
3433
|
icon: 'fa-light fa-share-nodes',
|
3377
3434
|
isDefault: false,
|
@@ -3380,7 +3437,7 @@ const contactSourceMock = [
|
|
3380
3437
|
},
|
3381
3438
|
{
|
3382
3439
|
id: AXPDataGenerator.uuid(),
|
3383
|
-
|
3440
|
+
title: 'Referral',
|
3384
3441
|
description: 'Contacts referred by existing customers',
|
3385
3442
|
icon: 'fa-light fa-user-group',
|
3386
3443
|
isDefault: false,
|
@@ -3389,7 +3446,7 @@ const contactSourceMock = [
|
|
3389
3446
|
},
|
3390
3447
|
{
|
3391
3448
|
id: AXPDataGenerator.uuid(),
|
3392
|
-
|
3449
|
+
title: 'Trade Show',
|
3393
3450
|
description: 'Contacts met at trade shows and events',
|
3394
3451
|
icon: 'fa-light fa-calendar-days',
|
3395
3452
|
isDefault: false,
|
@@ -3398,7 +3455,7 @@ const contactSourceMock = [
|
|
3398
3455
|
},
|
3399
3456
|
{
|
3400
3457
|
id: AXPDataGenerator.uuid(),
|
3401
|
-
|
3458
|
+
title: 'Cold Call',
|
3402
3459
|
description: 'Contacts from cold calling campaigns',
|
3403
3460
|
icon: 'fa-light fa-phone',
|
3404
3461
|
isDefault: false,
|
@@ -3407,7 +3464,7 @@ const contactSourceMock = [
|
|
3407
3464
|
},
|
3408
3465
|
{
|
3409
3466
|
id: AXPDataGenerator.uuid(),
|
3410
|
-
|
3467
|
+
title: 'Email Campaign',
|
3411
3468
|
description: 'Contacts from email marketing campaigns',
|
3412
3469
|
icon: 'fa-light fa-envelope',
|
3413
3470
|
isDefault: false,
|
@@ -3433,18 +3490,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
3433
3490
|
const contactMethodTypeMock = [
|
3434
3491
|
{
|
3435
3492
|
id: AXPDataGenerator.uuid(),
|
3436
|
-
|
3493
|
+
title: 'Email',
|
3437
3494
|
description: 'Email addresses',
|
3438
3495
|
icon: 'fa-light fa-envelope',
|
3439
3496
|
validationRegex: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
|
3440
3497
|
placeholder: 'user@example.com',
|
3441
|
-
isDefault:
|
3498
|
+
isDefault: false,
|
3442
3499
|
isActive: true,
|
3443
3500
|
order: 1,
|
3444
3501
|
},
|
3445
3502
|
{
|
3446
3503
|
id: AXPDataGenerator.uuid(),
|
3447
|
-
|
3504
|
+
title: 'Phone',
|
3448
3505
|
description: 'Phone numbers',
|
3449
3506
|
icon: 'fa-light fa-phone',
|
3450
3507
|
validationRegex: '^[+]?[0-9\\s\\-\\(\\)]{7,15}$',
|
@@ -3455,18 +3512,18 @@ const contactMethodTypeMock = [
|
|
3455
3512
|
},
|
3456
3513
|
{
|
3457
3514
|
id: AXPDataGenerator.uuid(),
|
3458
|
-
|
3515
|
+
title: 'Mobile',
|
3459
3516
|
description: 'Mobile phone numbers',
|
3460
3517
|
icon: 'fa-light fa-mobile',
|
3461
3518
|
validationRegex: '^[+]?[0-9\\s\\-\\(\\)]{7,15}$',
|
3462
3519
|
placeholder: '+1 (555) 123-4567',
|
3463
|
-
isDefault:
|
3520
|
+
isDefault: true,
|
3464
3521
|
isActive: true,
|
3465
3522
|
order: 3,
|
3466
3523
|
},
|
3467
3524
|
{
|
3468
3525
|
id: AXPDataGenerator.uuid(),
|
3469
|
-
|
3526
|
+
title: 'Fax',
|
3470
3527
|
description: 'Fax numbers',
|
3471
3528
|
icon: 'fa-light fa-fax',
|
3472
3529
|
validationRegex: '^[+]?[0-9\\s\\-\\(\\)]{7,15}$',
|
@@ -3477,7 +3534,7 @@ const contactMethodTypeMock = [
|
|
3477
3534
|
},
|
3478
3535
|
{
|
3479
3536
|
id: AXPDataGenerator.uuid(),
|
3480
|
-
|
3537
|
+
title: 'LinkedIn',
|
3481
3538
|
description: 'LinkedIn profiles',
|
3482
3539
|
icon: 'fa-brands fa-linkedin',
|
3483
3540
|
validationRegex: '^https://www\\.linkedin\\.com/in/[a-zA-Z0-9\\-]+/?$',
|
@@ -3488,7 +3545,7 @@ const contactMethodTypeMock = [
|
|
3488
3545
|
},
|
3489
3546
|
{
|
3490
3547
|
id: AXPDataGenerator.uuid(),
|
3491
|
-
|
3548
|
+
title: 'Twitter',
|
3492
3549
|
description: 'Twitter handles',
|
3493
3550
|
icon: 'fa-brands fa-twitter',
|
3494
3551
|
validationRegex: '^@[a-zA-Z0-9_]{1,15}$',
|
@@ -3499,7 +3556,7 @@ const contactMethodTypeMock = [
|
|
3499
3556
|
},
|
3500
3557
|
{
|
3501
3558
|
id: AXPDataGenerator.uuid(),
|
3502
|
-
|
3559
|
+
title: 'Skype',
|
3503
3560
|
description: 'Skype usernames',
|
3504
3561
|
icon: 'fa-brands fa-skype',
|
3505
3562
|
validationRegex: '^[a-zA-Z0-9._-]{6,32}$',
|
@@ -3527,7 +3584,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
3527
3584
|
const addressTypeMock = [
|
3528
3585
|
{
|
3529
3586
|
id: AXPDataGenerator.uuid(),
|
3530
|
-
|
3587
|
+
title: 'Business',
|
3531
3588
|
description: 'Business or office address',
|
3532
3589
|
icon: 'fa-light fa-building',
|
3533
3590
|
isDefault: true,
|
@@ -3536,7 +3593,7 @@ const addressTypeMock = [
|
|
3536
3593
|
},
|
3537
3594
|
{
|
3538
3595
|
id: AXPDataGenerator.uuid(),
|
3539
|
-
|
3596
|
+
title: 'Home',
|
3540
3597
|
description: 'Residential or home address',
|
3541
3598
|
icon: 'fa-light fa-house',
|
3542
3599
|
isDefault: false,
|
@@ -3545,7 +3602,7 @@ const addressTypeMock = [
|
|
3545
3602
|
},
|
3546
3603
|
{
|
3547
3604
|
id: AXPDataGenerator.uuid(),
|
3548
|
-
|
3605
|
+
title: 'Shipping',
|
3549
3606
|
description: 'Shipping or delivery address',
|
3550
3607
|
icon: 'fa-light fa-truck',
|
3551
3608
|
isDefault: false,
|
@@ -3554,7 +3611,7 @@ const addressTypeMock = [
|
|
3554
3611
|
},
|
3555
3612
|
{
|
3556
3613
|
id: AXPDataGenerator.uuid(),
|
3557
|
-
|
3614
|
+
title: 'Billing',
|
3558
3615
|
description: 'Billing address for invoices',
|
3559
3616
|
icon: 'fa-light fa-receipt',
|
3560
3617
|
isDefault: false,
|
@@ -3563,7 +3620,7 @@ const addressTypeMock = [
|
|
3563
3620
|
},
|
3564
3621
|
{
|
3565
3622
|
id: AXPDataGenerator.uuid(),
|
3566
|
-
|
3623
|
+
title: 'Mailing',
|
3567
3624
|
description: 'Mailing address for correspondence',
|
3568
3625
|
icon: 'fa-light fa-envelope',
|
3569
3626
|
isDefault: false,
|
@@ -3572,7 +3629,7 @@ const addressTypeMock = [
|
|
3572
3629
|
},
|
3573
3630
|
{
|
3574
3631
|
id: AXPDataGenerator.uuid(),
|
3575
|
-
|
3632
|
+
title: 'Other',
|
3576
3633
|
description: 'Other types of addresses',
|
3577
3634
|
icon: 'fa-light fa-location-dot',
|
3578
3635
|
isDefault: false,
|
@@ -3605,6 +3662,7 @@ const contactMock = [
|
|
3605
3662
|
jobTitle: 'Senior Sales Manager',
|
3606
3663
|
company: 'ABC Corporation',
|
3607
3664
|
contactTypeId: contactTypeMock[0].id, // Customer
|
3665
|
+
contactType: contactTypeMock[0],
|
3608
3666
|
contactSourceId: contactSourceMock[0].id, // Website
|
3609
3667
|
assignedToUserId: 'user-1',
|
3610
3668
|
priority: 'High',
|
@@ -3625,6 +3683,7 @@ const contactMock = [
|
|
3625
3683
|
jobTitle: 'Procurement Manager',
|
3626
3684
|
company: 'XYZ Industries',
|
3627
3685
|
contactTypeId: contactTypeMock[1].id, // Vendor
|
3686
|
+
contactType: contactTypeMock[1],
|
3628
3687
|
contactSourceId: contactSourceMock[2].id, // Referral
|
3629
3688
|
assignedToUserId: 'user-2',
|
3630
3689
|
priority: 'Medium',
|
@@ -3645,7 +3704,9 @@ const contactMock = [
|
|
3645
3704
|
jobTitle: 'Partnership Director',
|
3646
3705
|
company: 'Tech Solutions Inc.',
|
3647
3706
|
contactTypeId: contactTypeMock[2].id, // Partner
|
3707
|
+
contactType: contactTypeMock[2],
|
3648
3708
|
contactSourceId: contactSourceMock[3].id, // Trade Show
|
3709
|
+
contactSource: contactSourceMock[3],
|
3649
3710
|
assignedToUserId: 'user-1',
|
3650
3711
|
priority: 'High',
|
3651
3712
|
status: 'Active',
|
@@ -3665,7 +3726,9 @@ const contactMock = [
|
|
3665
3726
|
jobTitle: 'Research Director',
|
3666
3727
|
company: 'Innovation Labs',
|
3667
3728
|
contactTypeId: contactTypeMock[4].id, // Lead
|
3729
|
+
contactType: contactTypeMock[4],
|
3668
3730
|
contactSourceId: contactSourceMock[1].id, // Social Media
|
3731
|
+
contactSource: contactSourceMock[1],
|
3669
3732
|
assignedToUserId: 'user-3',
|
3670
3733
|
priority: 'Medium',
|
3671
3734
|
status: 'Active',
|
@@ -3685,7 +3748,9 @@ const contactMock = [
|
|
3685
3748
|
jobTitle: 'Software Engineer',
|
3686
3749
|
company: 'ABC Corporation',
|
3687
3750
|
contactTypeId: contactTypeMock[3].id, // Employee
|
3751
|
+
contactType: contactTypeMock[3],
|
3688
3752
|
contactSourceId: contactSourceMock[0].id, // Website
|
3753
|
+
contactSource: contactSourceMock[0],
|
3689
3754
|
assignedToUserId: 'user-2',
|
3690
3755
|
priority: 'Low',
|
3691
3756
|
status: 'Active',
|
@@ -3705,7 +3770,9 @@ const contactMock = [
|
|
3705
3770
|
jobTitle: 'Marketing Director',
|
3706
3771
|
company: 'Global Marketing Co.',
|
3707
3772
|
contactTypeId: contactTypeMock[0].id, // Customer
|
3773
|
+
contactType: contactTypeMock[0],
|
3708
3774
|
contactSourceId: contactSourceMock[5].id, // Email Campaign
|
3775
|
+
contactSource: contactSourceMock[5],
|
3709
3776
|
assignedToUserId: 'user-1',
|
3710
3777
|
priority: 'High',
|
3711
3778
|
status: 'Inactive',
|
@@ -3738,6 +3805,7 @@ const contactMethodMock = [
|
|
3738
3805
|
id: AXPDataGenerator.uuid(),
|
3739
3806
|
contactId: contactMock[0].id,
|
3740
3807
|
methodTypeId: contactMethodTypeMock[0].id, // Email
|
3808
|
+
methodType: contactMethodTypeMock[0],
|
3741
3809
|
value: 'john.smith@abccorp.com',
|
3742
3810
|
isPrimary: true,
|
3743
3811
|
isVerified: true,
|
@@ -3747,6 +3815,7 @@ const contactMethodMock = [
|
|
3747
3815
|
id: AXPDataGenerator.uuid(),
|
3748
3816
|
contactId: contactMock[0].id,
|
3749
3817
|
methodTypeId: contactMethodTypeMock[1].id, // Phone
|
3818
|
+
methodType: contactMethodTypeMock[1],
|
3750
3819
|
value: '+1 (555) 123-4567',
|
3751
3820
|
isPrimary: false,
|
3752
3821
|
isVerified: true,
|
@@ -3756,6 +3825,7 @@ const contactMethodMock = [
|
|
3756
3825
|
id: AXPDataGenerator.uuid(),
|
3757
3826
|
contactId: contactMock[0].id,
|
3758
3827
|
methodTypeId: contactMethodTypeMock[2].id, // Mobile
|
3828
|
+
methodType: contactMethodTypeMock[2],
|
3759
3829
|
value: '+1 (555) 987-6543',
|
3760
3830
|
isPrimary: false,
|
3761
3831
|
isVerified: false,
|
@@ -3765,6 +3835,7 @@ const contactMethodMock = [
|
|
3765
3835
|
id: AXPDataGenerator.uuid(),
|
3766
3836
|
contactId: contactMock[0].id,
|
3767
3837
|
methodTypeId: contactMethodTypeMock[4].id, // LinkedIn
|
3838
|
+
methodType: contactMethodTypeMock[4],
|
3768
3839
|
value: 'https://www.linkedin.com/in/johnsmith-sales',
|
3769
3840
|
isPrimary: false,
|
3770
3841
|
isVerified: true,
|
@@ -3775,6 +3846,7 @@ const contactMethodMock = [
|
|
3775
3846
|
id: AXPDataGenerator.uuid(),
|
3776
3847
|
contactId: contactMock[1].id,
|
3777
3848
|
methodTypeId: contactMethodTypeMock[0].id, // Email
|
3849
|
+
methodType: contactMethodTypeMock[0],
|
3778
3850
|
value: 'sarah.johnson@xyzind.com',
|
3779
3851
|
isPrimary: true,
|
3780
3852
|
isVerified: true,
|
@@ -3784,6 +3856,7 @@ const contactMethodMock = [
|
|
3784
3856
|
id: AXPDataGenerator.uuid(),
|
3785
3857
|
contactId: contactMock[1].id,
|
3786
3858
|
methodTypeId: contactMethodTypeMock[1].id, // Phone
|
3859
|
+
methodType: contactMethodTypeMock[1],
|
3787
3860
|
value: '+1 (555) 234-5678',
|
3788
3861
|
isPrimary: false,
|
3789
3862
|
isVerified: true,
|
@@ -3794,6 +3867,7 @@ const contactMethodMock = [
|
|
3794
3867
|
id: AXPDataGenerator.uuid(),
|
3795
3868
|
contactId: contactMock[2].id,
|
3796
3869
|
methodTypeId: contactMethodTypeMock[0].id, // Email
|
3870
|
+
methodType: contactMethodTypeMock[0],
|
3797
3871
|
value: 'mike.chen@techsolutions.com',
|
3798
3872
|
isPrimary: true,
|
3799
3873
|
isVerified: true,
|
@@ -3803,6 +3877,7 @@ const contactMethodMock = [
|
|
3803
3877
|
id: AXPDataGenerator.uuid(),
|
3804
3878
|
contactId: contactMock[2].id,
|
3805
3879
|
methodTypeId: contactMethodTypeMock[2].id, // Mobile
|
3880
|
+
methodType: contactMethodTypeMock[2],
|
3806
3881
|
value: '+1 (555) 345-6789',
|
3807
3882
|
isPrimary: false,
|
3808
3883
|
isVerified: true,
|
@@ -3812,6 +3887,7 @@ const contactMethodMock = [
|
|
3812
3887
|
id: AXPDataGenerator.uuid(),
|
3813
3888
|
contactId: contactMock[2].id,
|
3814
3889
|
methodTypeId: contactMethodTypeMock[4].id, // LinkedIn
|
3890
|
+
methodType: contactMethodTypeMock[4],
|
3815
3891
|
value: 'https://www.linkedin.com/in/mikechen-partnerships',
|
3816
3892
|
isPrimary: false,
|
3817
3893
|
isVerified: true,
|
@@ -3822,6 +3898,7 @@ const contactMethodMock = [
|
|
3822
3898
|
id: AXPDataGenerator.uuid(),
|
3823
3899
|
contactId: contactMock[3].id,
|
3824
3900
|
methodTypeId: contactMethodTypeMock[0].id, // Email
|
3901
|
+
methodType: contactMethodTypeMock[0],
|
3825
3902
|
value: 'e.rodriguez@innovationlabs.com',
|
3826
3903
|
isPrimary: true,
|
3827
3904
|
isVerified: true,
|
@@ -3831,6 +3908,7 @@ const contactMethodMock = [
|
|
3831
3908
|
id: AXPDataGenerator.uuid(),
|
3832
3909
|
contactId: contactMock[3].id,
|
3833
3910
|
methodTypeId: contactMethodTypeMock[1].id, // Phone
|
3911
|
+
methodType: contactMethodTypeMock[1],
|
3834
3912
|
value: '+1 (555) 456-7890',
|
3835
3913
|
isPrimary: false,
|
3836
3914
|
isVerified: false,
|
@@ -3841,6 +3919,7 @@ const contactMethodMock = [
|
|
3841
3919
|
id: AXPDataGenerator.uuid(),
|
3842
3920
|
contactId: contactMock[4].id,
|
3843
3921
|
methodTypeId: contactMethodTypeMock[0].id, // Email
|
3922
|
+
methodType: contactMethodTypeMock[0],
|
3844
3923
|
value: 'david.thompson@abccorp.com',
|
3845
3924
|
isPrimary: true,
|
3846
3925
|
isVerified: true,
|
@@ -3850,6 +3929,7 @@ const contactMethodMock = [
|
|
3850
3929
|
id: AXPDataGenerator.uuid(),
|
3851
3930
|
contactId: contactMock[4].id,
|
3852
3931
|
methodTypeId: contactMethodTypeMock[4].id, // LinkedIn
|
3932
|
+
methodType: contactMethodTypeMock[4],
|
3853
3933
|
value: 'https://www.linkedin.com/in/davidthompson-dev',
|
3854
3934
|
isPrimary: false,
|
3855
3935
|
isVerified: true,
|
@@ -3860,6 +3940,7 @@ const contactMethodMock = [
|
|
3860
3940
|
id: AXPDataGenerator.uuid(),
|
3861
3941
|
contactId: contactMock[5].id,
|
3862
3942
|
methodTypeId: contactMethodTypeMock[0].id, // Email
|
3943
|
+
methodType: contactMethodTypeMock[0],
|
3863
3944
|
value: 'lisa.wang@globalmarketing.com',
|
3864
3945
|
isPrimary: true,
|
3865
3946
|
isVerified: true,
|
@@ -3869,6 +3950,7 @@ const contactMethodMock = [
|
|
3869
3950
|
id: AXPDataGenerator.uuid(),
|
3870
3951
|
contactId: contactMock[5].id,
|
3871
3952
|
methodTypeId: contactMethodTypeMock[2].id, // Mobile
|
3953
|
+
methodType: contactMethodTypeMock[2],
|
3872
3954
|
value: '+1 (555) 567-8901',
|
3873
3955
|
isPrimary: false,
|
3874
3956
|
isVerified: false,
|
@@ -3896,6 +3978,7 @@ const contactAddressMock = [
|
|
3896
3978
|
id: AXPDataGenerator.uuid(),
|
3897
3979
|
contactId: contactMock[0].id,
|
3898
3980
|
addressTypeId: addressTypeMock[0].id, // Business
|
3981
|
+
addressType: addressTypeMock[0],
|
3899
3982
|
street1: '123 Business Ave',
|
3900
3983
|
street2: 'Suite 456',
|
3901
3984
|
city: 'New York',
|
@@ -3913,6 +3996,7 @@ const contactAddressMock = [
|
|
3913
3996
|
id: AXPDataGenerator.uuid(),
|
3914
3997
|
contactId: contactMock[0].id,
|
3915
3998
|
addressTypeId: addressTypeMock[3].id, // Billing
|
3999
|
+
addressType: addressTypeMock[3],
|
3916
4000
|
street1: '456 Finance Street',
|
3917
4001
|
city: 'New York',
|
3918
4002
|
state: 'NY',
|
@@ -3930,6 +4014,7 @@ const contactAddressMock = [
|
|
3930
4014
|
id: AXPDataGenerator.uuid(),
|
3931
4015
|
contactId: contactMock[1].id,
|
3932
4016
|
addressTypeId: addressTypeMock[0].id, // Business
|
4017
|
+
addressType: addressTypeMock[0],
|
3933
4018
|
street1: '789 Industrial Blvd',
|
3934
4019
|
city: 'Chicago',
|
3935
4020
|
state: 'IL',
|
@@ -3947,6 +4032,7 @@ const contactAddressMock = [
|
|
3947
4032
|
id: AXPDataGenerator.uuid(),
|
3948
4033
|
contactId: contactMock[2].id,
|
3949
4034
|
addressTypeId: addressTypeMock[0].id, // Business
|
4035
|
+
addressType: addressTypeMock[0],
|
3950
4036
|
street1: '321 Tech Park Drive',
|
3951
4037
|
street2: 'Building C',
|
3952
4038
|
city: 'San Francisco',
|
@@ -3965,6 +4051,7 @@ const contactAddressMock = [
|
|
3965
4051
|
id: AXPDataGenerator.uuid(),
|
3966
4052
|
contactId: contactMock[3].id,
|
3967
4053
|
addressTypeId: addressTypeMock[0].id, // Business
|
4054
|
+
addressType: addressTypeMock[0],
|
3968
4055
|
street1: '555 Research Drive',
|
3969
4056
|
city: 'Boston',
|
3970
4057
|
state: 'MA',
|
@@ -3982,6 +4069,7 @@ const contactAddressMock = [
|
|
3982
4069
|
id: AXPDataGenerator.uuid(),
|
3983
4070
|
contactId: contactMock[4].id,
|
3984
4071
|
addressTypeId: addressTypeMock[0].id, // Business
|
4072
|
+
addressType: addressTypeMock[0],
|
3985
4073
|
street1: '123 Business Ave',
|
3986
4074
|
street2: 'Suite 800',
|
3987
4075
|
city: 'New York',
|
@@ -4000,6 +4088,7 @@ const contactAddressMock = [
|
|
4000
4088
|
id: AXPDataGenerator.uuid(),
|
4001
4089
|
contactId: contactMock[5].id,
|
4002
4090
|
addressTypeId: addressTypeMock[0].id, // Business
|
4091
|
+
addressType: addressTypeMock[0],
|
4003
4092
|
street1: '888 Marketing Plaza',
|
4004
4093
|
street2: 'Floor 12',
|
4005
4094
|
city: 'Los Angeles',
|
@@ -4017,6 +4106,7 @@ const contactAddressMock = [
|
|
4017
4106
|
id: AXPDataGenerator.uuid(),
|
4018
4107
|
contactId: contactMock[5].id,
|
4019
4108
|
addressTypeId: addressTypeMock[2].id, // Shipping
|
4109
|
+
addressType: addressTypeMock[2],
|
4020
4110
|
street1: '999 Warehouse District',
|
4021
4111
|
city: 'Los Angeles',
|
4022
4112
|
state: 'CA',
|
@@ -4051,6 +4141,7 @@ const contactRelationshipMock = [
|
|
4051
4141
|
id: AXPDataGenerator.uuid(),
|
4052
4142
|
contactId: contactMock[0].id, // John Smith
|
4053
4143
|
relatedContactId: contactMock[4].id, // David Thompson
|
4144
|
+
relatedContact: contactMock[4],
|
4054
4145
|
relationshipType: 'Works With',
|
4055
4146
|
description: 'John Smith works directly with David Thompson on technical implementations',
|
4056
4147
|
isActive: true,
|
@@ -4060,6 +4151,7 @@ const contactRelationshipMock = [
|
|
4060
4151
|
id: AXPDataGenerator.uuid(),
|
4061
4152
|
contactId: contactMock[4].id, // David Thompson
|
4062
4153
|
relatedContactId: contactMock[0].id, // John Smith
|
4154
|
+
relatedContact: contactMock[0],
|
4063
4155
|
relationshipType: 'Supports',
|
4064
4156
|
description: 'David provides technical support to John Smith at ABC Corporation',
|
4065
4157
|
isActive: true,
|
@@ -4069,6 +4161,7 @@ const contactRelationshipMock = [
|
|
4069
4161
|
id: AXPDataGenerator.uuid(),
|
4070
4162
|
contactId: contactMock[2].id, // Mike Chen
|
4071
4163
|
relatedContactId: contactMock[0].id, // John Smith
|
4164
|
+
relatedContact: contactMock[0],
|
4072
4165
|
relationshipType: 'Partner Client',
|
4073
4166
|
description: 'Tech Solutions partners with ABC Corporation on joint projects',
|
4074
4167
|
isActive: true,
|
@@ -4078,6 +4171,7 @@ const contactRelationshipMock = [
|
|
4078
4171
|
id: AXPDataGenerator.uuid(),
|
4079
4172
|
contactId: contactMock[1].id, // Sarah Johnson
|
4080
4173
|
relatedContactId: contactMock[2].id, // Mike Chen
|
4174
|
+
relatedContact: contactMock[2],
|
4081
4175
|
relationshipType: 'Supplies To',
|
4082
4176
|
description: 'XYZ Industries supplies components to Tech Solutions Inc.',
|
4083
4177
|
isActive: true,
|
@@ -4087,6 +4181,7 @@ const contactRelationshipMock = [
|
|
4087
4181
|
id: AXPDataGenerator.uuid(),
|
4088
4182
|
contactId: contactMock[3].id, // Emily Rodriguez
|
4089
4183
|
relatedContactId: contactMock[0].id, // John Smith
|
4184
|
+
relatedContact: contactMock[0],
|
4090
4185
|
relationshipType: 'Referred By',
|
4091
4186
|
description: 'Emily was referred to us by John Smith for R&D services',
|
4092
4187
|
isActive: true,
|
@@ -4096,6 +4191,7 @@ const contactRelationshipMock = [
|
|
4096
4191
|
id: AXPDataGenerator.uuid(),
|
4097
4192
|
contactId: contactMock[5].id, // Lisa Wang
|
4098
4193
|
relatedContactId: contactMock[1].id, // Sarah Johnson
|
4194
|
+
relatedContact: contactMock[1],
|
4099
4195
|
relationshipType: 'Former Supplier',
|
4100
4196
|
description: 'XYZ Industries was a supplier to Global Marketing Co. before budget constraints',
|
4101
4197
|
isActive: false,
|
@@ -4105,6 +4201,7 @@ const contactRelationshipMock = [
|
|
4105
4201
|
id: AXPDataGenerator.uuid(),
|
4106
4202
|
contactId: contactMock[0].id, // John Smith
|
4107
4203
|
relatedContactId: contactMock[5].id, // Lisa Wang
|
4204
|
+
relatedContact: contactMock[5],
|
4108
4205
|
relationshipType: 'Collaborated With',
|
4109
4206
|
description: 'Worked together on marketing campaigns in 2023',
|
4110
4207
|
isActive: false,
|
@@ -4125,6 +4222,286 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
4125
4222
|
type: Injectable
|
4126
4223
|
}] });
|
4127
4224
|
|
4225
|
+
function generateEmergencyContactCategories() {
|
4226
|
+
const categories = [
|
4227
|
+
{
|
4228
|
+
id: AXPDataGenerator.uuid(),
|
4229
|
+
title: 'Police',
|
4230
|
+
description: 'Law enforcement emergency services',
|
4231
|
+
parentId: undefined,
|
4232
|
+
icon: 'fa-light fa-shield-halved',
|
4233
|
+
color: '#1976d2',
|
4234
|
+
priority: 1,
|
4235
|
+
isActive: true,
|
4236
|
+
order: 1
|
4237
|
+
},
|
4238
|
+
{
|
4239
|
+
id: AXPDataGenerator.uuid(),
|
4240
|
+
title: 'Fire Department',
|
4241
|
+
description: 'Fire and rescue services',
|
4242
|
+
parentId: undefined,
|
4243
|
+
icon: 'fa-light fa-fire-extinguisher',
|
4244
|
+
color: '#d32f2f',
|
4245
|
+
priority: 2,
|
4246
|
+
isActive: true,
|
4247
|
+
order: 2
|
4248
|
+
},
|
4249
|
+
{
|
4250
|
+
id: AXPDataGenerator.uuid(),
|
4251
|
+
title: 'Medical',
|
4252
|
+
description: 'Medical emergency services',
|
4253
|
+
parentId: undefined,
|
4254
|
+
icon: 'fa-light fa-heart-pulse',
|
4255
|
+
color: '#388e3c',
|
4256
|
+
priority: 3,
|
4257
|
+
isActive: true,
|
4258
|
+
order: 3
|
4259
|
+
},
|
4260
|
+
{
|
4261
|
+
id: AXPDataGenerator.uuid(),
|
4262
|
+
title: 'Poison Control',
|
4263
|
+
description: 'Poison control hotline',
|
4264
|
+
parentId: undefined,
|
4265
|
+
icon: 'fa-light fa-skull-crossbones',
|
4266
|
+
color: '#fbc02d',
|
4267
|
+
priority: 4,
|
4268
|
+
isActive: true,
|
4269
|
+
order: 4
|
4270
|
+
}
|
4271
|
+
];
|
4272
|
+
return categories;
|
4273
|
+
}
|
4274
|
+
const EMERGENCY_CONTACT_CATEGORIES = generateEmergencyContactCategories();
|
4275
|
+
function generateEmergencyContacts(categories) {
|
4276
|
+
// Helper to get categoryId by title
|
4277
|
+
const getCategoryId = (title) => categories.find((cat) => cat.title === title)?.id || null;
|
4278
|
+
return [
|
4279
|
+
{
|
4280
|
+
id: AXPDataGenerator.uuid(),
|
4281
|
+
name: 'Police Emergency',
|
4282
|
+
shortName: '911',
|
4283
|
+
description: 'General police emergency number.',
|
4284
|
+
categoryIds: [EMERGENCY_CONTACT_CATEGORIES.find(c => c.title === 'Police').id],
|
4285
|
+
categories: [EMERGENCY_CONTACT_CATEGORIES.find(c => c.title === 'Police')],
|
4286
|
+
phoneNumber: '911',
|
4287
|
+
alternateNumbers: ['+1-800-555-0001'],
|
4288
|
+
textNumber: '911',
|
4289
|
+
website: 'https://www.police.gov',
|
4290
|
+
email: 'info@police.gov',
|
4291
|
+
country: 'United States',
|
4292
|
+
region: '',
|
4293
|
+
city: '',
|
4294
|
+
isNational: true,
|
4295
|
+
isRegional: false,
|
4296
|
+
isLocal: false,
|
4297
|
+
availability: '24/7',
|
4298
|
+
languages: ['en-US'],
|
4299
|
+
isTextCapable: true,
|
4300
|
+
isVideoCallCapable: false,
|
4301
|
+
whenToCall: 'Emergencies requiring police intervention.',
|
4302
|
+
whenNotToCall: 'Non-emergency situations.',
|
4303
|
+
instructions: 'Stay calm and provide clear information.',
|
4304
|
+
priority: 1,
|
4305
|
+
isActive: true,
|
4306
|
+
isVerified: true,
|
4307
|
+
lastVerified: new Date('2024-01-01T00:00:00Z'),
|
4308
|
+
showOnDashboard: true,
|
4309
|
+
requiresConfirmation: false,
|
4310
|
+
isQuickDial: true,
|
4311
|
+
additionalInfo: ''
|
4312
|
+
},
|
4313
|
+
{
|
4314
|
+
id: AXPDataGenerator.uuid(),
|
4315
|
+
name: 'Fire Department',
|
4316
|
+
shortName: '101',
|
4317
|
+
description: 'Fire and rescue emergency number.',
|
4318
|
+
categoryIds: [getCategoryId('Fire Department')],
|
4319
|
+
categories: [EMERGENCY_CONTACT_CATEGORIES.find(c => c.title === 'Fire Department')],
|
4320
|
+
phoneNumber: '101',
|
4321
|
+
alternateNumbers: ['+1-800-555-0002'],
|
4322
|
+
textNumber: '',
|
4323
|
+
website: 'https://www.firedept.gov',
|
4324
|
+
email: 'info@firedept.gov',
|
4325
|
+
country: 'United States',
|
4326
|
+
region: '',
|
4327
|
+
city: '',
|
4328
|
+
isNational: true,
|
4329
|
+
isRegional: false,
|
4330
|
+
isLocal: false,
|
4331
|
+
availability: '24/7',
|
4332
|
+
languages: ['en-US'],
|
4333
|
+
isTextCapable: false,
|
4334
|
+
isVideoCallCapable: false,
|
4335
|
+
whenToCall: 'Fire, rescue, or hazardous material emergencies.',
|
4336
|
+
whenNotToCall: 'Non-emergency situations.',
|
4337
|
+
instructions: 'Evacuate the area if necessary.',
|
4338
|
+
priority: 2,
|
4339
|
+
isActive: true,
|
4340
|
+
isVerified: true,
|
4341
|
+
lastVerified: new Date('2024-01-01T00:00:00Z'),
|
4342
|
+
showOnDashboard: true,
|
4343
|
+
requiresConfirmation: false,
|
4344
|
+
isQuickDial: false,
|
4345
|
+
additionalInfo: ''
|
4346
|
+
},
|
4347
|
+
{
|
4348
|
+
id: AXPDataGenerator.uuid(),
|
4349
|
+
name: 'Poison Control',
|
4350
|
+
shortName: '1-800-222-1222',
|
4351
|
+
description: 'Poison control hotline for medical emergencies.',
|
4352
|
+
categoryIds: [getCategoryId('Poison Control')],
|
4353
|
+
categories: [EMERGENCY_CONTACT_CATEGORIES.find(c => c.title === 'Poison Control')],
|
4354
|
+
phoneNumber: '1-800-222-1222',
|
4355
|
+
alternateNumbers: [],
|
4356
|
+
textNumber: '',
|
4357
|
+
website: 'https://www.poison.org',
|
4358
|
+
email: 'help@poison.org',
|
4359
|
+
country: 'United States',
|
4360
|
+
region: '',
|
4361
|
+
city: '',
|
4362
|
+
isNational: true,
|
4363
|
+
isRegional: false,
|
4364
|
+
isLocal: false,
|
4365
|
+
availability: '24/7',
|
4366
|
+
languages: ['en-US'],
|
4367
|
+
isTextCapable: false,
|
4368
|
+
isVideoCallCapable: false,
|
4369
|
+
whenToCall: 'Suspected poisoning or exposure to toxic substances.',
|
4370
|
+
whenNotToCall: 'Non-poison emergencies.',
|
4371
|
+
instructions: 'Call immediately if poisoning is suspected.',
|
4372
|
+
priority: 3,
|
4373
|
+
isActive: true,
|
4374
|
+
isVerified: true,
|
4375
|
+
lastVerified: new Date('2024-01-01T00:00:00Z'),
|
4376
|
+
showOnDashboard: true,
|
4377
|
+
requiresConfirmation: false,
|
4378
|
+
isQuickDial: false,
|
4379
|
+
additionalInfo: ''
|
4380
|
+
},
|
4381
|
+
{
|
4382
|
+
id: AXPDataGenerator.uuid(),
|
4383
|
+
name: 'Ambulance Service',
|
4384
|
+
shortName: '102',
|
4385
|
+
description: 'Emergency medical ambulance service.',
|
4386
|
+
categoryIds: [getCategoryId('Medical')],
|
4387
|
+
categories: [EMERGENCY_CONTACT_CATEGORIES.find(c => c.title === 'Medical')],
|
4388
|
+
phoneNumber: '102',
|
4389
|
+
alternateNumbers: ['+1-800-555-0003'],
|
4390
|
+
textNumber: '',
|
4391
|
+
website: 'https://www.ambulance.org',
|
4392
|
+
email: 'info@ambulance.org',
|
4393
|
+
country: 'United States',
|
4394
|
+
region: '',
|
4395
|
+
city: '',
|
4396
|
+
isNational: true,
|
4397
|
+
isRegional: false,
|
4398
|
+
isLocal: false,
|
4399
|
+
availability: '24/7',
|
4400
|
+
languages: ['en-US'],
|
4401
|
+
isTextCapable: false,
|
4402
|
+
isVideoCallCapable: true,
|
4403
|
+
whenToCall: 'Medical emergencies requiring ambulance transport.',
|
4404
|
+
whenNotToCall: 'Non-emergency medical inquiries.',
|
4405
|
+
instructions: 'Provide location and nature of emergency.',
|
4406
|
+
priority: 4,
|
4407
|
+
isActive: true,
|
4408
|
+
isVerified: true,
|
4409
|
+
lastVerified: new Date('2024-01-01T00:00:00Z'),
|
4410
|
+
showOnDashboard: true,
|
4411
|
+
requiresConfirmation: false,
|
4412
|
+
isQuickDial: true,
|
4413
|
+
additionalInfo: ''
|
4414
|
+
},
|
4415
|
+
{
|
4416
|
+
id: AXPDataGenerator.uuid(),
|
4417
|
+
name: 'Local Police Station',
|
4418
|
+
shortName: 'Local PD',
|
4419
|
+
description: 'Local police station for non-urgent matters.',
|
4420
|
+
categoryIds: [getCategoryId('Police')],
|
4421
|
+
categories: [EMERGENCY_CONTACT_CATEGORIES.find(c => c.title === 'Police')],
|
4422
|
+
phoneNumber: '555-1234',
|
4423
|
+
alternateNumbers: ['555-5678'],
|
4424
|
+
textNumber: '',
|
4425
|
+
website: 'https://www.localpd.gov',
|
4426
|
+
email: 'contact@localpd.gov',
|
4427
|
+
country: 'United States',
|
4428
|
+
region: 'California',
|
4429
|
+
city: 'Los Angeles',
|
4430
|
+
isNational: false,
|
4431
|
+
isRegional: true,
|
4432
|
+
isLocal: true,
|
4433
|
+
availability: 'Mon-Fri 8am-6pm',
|
4434
|
+
languages: ['en-US', 'fa-IR'],
|
4435
|
+
isTextCapable: true,
|
4436
|
+
isVideoCallCapable: false,
|
4437
|
+
whenToCall: 'Non-urgent police matters, local assistance.',
|
4438
|
+
whenNotToCall: 'Emergencies (use 911).',
|
4439
|
+
instructions: 'Call during office hours for local help.',
|
4440
|
+
priority: 5,
|
4441
|
+
isActive: true,
|
4442
|
+
isVerified: true,
|
4443
|
+
lastVerified: new Date('2024-01-01T00:00:00Z'),
|
4444
|
+
showOnDashboard: false,
|
4445
|
+
requiresConfirmation: false,
|
4446
|
+
isQuickDial: false,
|
4447
|
+
additionalInfo: ''
|
4448
|
+
},
|
4449
|
+
{
|
4450
|
+
id: AXPDataGenerator.uuid(),
|
4451
|
+
name: 'Fire Brigade Regional HQ',
|
4452
|
+
shortName: 'Fire HQ',
|
4453
|
+
description: 'Regional headquarters for fire emergencies.',
|
4454
|
+
categoryIds: [getCategoryId('Fire Department')],
|
4455
|
+
categories: [EMERGENCY_CONTACT_CATEGORIES.find(c => c.title === 'Fire Department')],
|
4456
|
+
phoneNumber: '555-2000',
|
4457
|
+
alternateNumbers: ['555-2001'],
|
4458
|
+
textNumber: '',
|
4459
|
+
website: 'https://www.firehq.gov',
|
4460
|
+
email: 'hq@firehq.gov',
|
4461
|
+
country: 'United States',
|
4462
|
+
region: 'Texas',
|
4463
|
+
city: 'Houston',
|
4464
|
+
isNational: false,
|
4465
|
+
isRegional: true,
|
4466
|
+
isLocal: false,
|
4467
|
+
availability: '24/7',
|
4468
|
+
languages: ['en-US'],
|
4469
|
+
isTextCapable: false,
|
4470
|
+
isVideoCallCapable: true,
|
4471
|
+
whenToCall: 'Major fire emergencies in the region.',
|
4472
|
+
whenNotToCall: 'Minor incidents (use local fire dept).',
|
4473
|
+
instructions: 'Describe the emergency and location.',
|
4474
|
+
priority: 6,
|
4475
|
+
isActive: true,
|
4476
|
+
isVerified: true,
|
4477
|
+
lastVerified: new Date('2024-01-01T00:00:00Z'),
|
4478
|
+
showOnDashboard: false,
|
4479
|
+
requiresConfirmation: true,
|
4480
|
+
isQuickDial: false,
|
4481
|
+
additionalInfo: ''
|
4482
|
+
}
|
4483
|
+
];
|
4484
|
+
}
|
4485
|
+
const EMERGENCY_CONTACTS = generateEmergencyContacts(EMERGENCY_CONTACT_CATEGORIES);
|
4486
|
+
//#endregion
|
4487
|
+
|
4488
|
+
class AXCEmergencyContactDataSeeder {
|
4489
|
+
constructor() {
|
4490
|
+
this.storageService = inject(AXPEntityStorageService);
|
4491
|
+
}
|
4492
|
+
async seed() {
|
4493
|
+
// Seed categories
|
4494
|
+
await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.emergencyContactCategory.name}`, EMERGENCY_CONTACT_CATEGORIES);
|
4495
|
+
// Seed contacts
|
4496
|
+
await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.emergencyContact.name}`, EMERGENCY_CONTACTS);
|
4497
|
+
}
|
4498
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCEmergencyContactDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4499
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCEmergencyContactDataSeeder }); }
|
4500
|
+
}
|
4501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCEmergencyContactDataSeeder, decorators: [{
|
4502
|
+
type: Injectable
|
4503
|
+
}] });
|
4504
|
+
|
4128
4505
|
class AXCContactManagementMockModule {
|
4129
4506
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCContactManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
4130
4507
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AXCContactManagementMockModule }); }
|
@@ -4169,6 +4546,11 @@ class AXCContactManagementMockModule {
|
|
4169
4546
|
useClass: AXCContactRelationshipDataSeeder,
|
4170
4547
|
multi: true,
|
4171
4548
|
},
|
4549
|
+
{
|
4550
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
4551
|
+
useClass: AXCEmergencyContactDataSeeder,
|
4552
|
+
multi: true,
|
4553
|
+
},
|
4172
4554
|
] }); }
|
4173
4555
|
}
|
4174
4556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCContactManagementMockModule, decorators: [{
|
@@ -4218,6 +4600,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
4218
4600
|
useClass: AXCContactRelationshipDataSeeder,
|
4219
4601
|
multi: true,
|
4220
4602
|
},
|
4603
|
+
{
|
4604
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
4605
|
+
useClass: AXCEmergencyContactDataSeeder,
|
4606
|
+
multi: true,
|
4607
|
+
},
|
4221
4608
|
],
|
4222
4609
|
}]
|
4223
4610
|
}] });
|
@@ -9280,134 +9667,768 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
9280
9667
|
}]
|
9281
9668
|
}] });
|
9282
9669
|
|
9283
|
-
|
9284
|
-
const child1 = {
|
9285
|
-
id: AXPDataGenerator.uuid(),
|
9286
|
-
title: 'Financial Reports',
|
9287
|
-
parentId: REPORT_ID,
|
9288
|
-
childCount: 0,
|
9289
|
-
};
|
9290
|
-
const child2 = {
|
9291
|
-
id: AXPDataGenerator.uuid(),
|
9292
|
-
title: 'User Reports',
|
9293
|
-
parentId: REPORT_ID,
|
9294
|
-
childCount: 0,
|
9295
|
-
};
|
9296
|
-
const child3 = {
|
9297
|
-
id: AXPDataGenerator.uuid(),
|
9298
|
-
title: 'System Reports',
|
9299
|
-
parentId: REPORT_ID,
|
9300
|
-
childCount: 0,
|
9301
|
-
};
|
9302
|
-
const QUERY_CATEGORY_MOCK = [
|
9303
|
-
{
|
9304
|
-
id: AXPDataGenerator.uuid(),
|
9305
|
-
title: 'General Queries',
|
9306
|
-
childCount: 0,
|
9307
|
-
},
|
9308
|
-
{
|
9309
|
-
id: REPORT_ID,
|
9310
|
-
title: 'Reports',
|
9311
|
-
childCount: 3,
|
9312
|
-
children: [child1, child2, child3],
|
9313
|
-
},
|
9314
|
-
child1,
|
9315
|
-
child2,
|
9316
|
-
child3,
|
9317
|
-
{
|
9318
|
-
id: AXPDataGenerator.uuid(),
|
9319
|
-
title: 'Analytics',
|
9320
|
-
childCount: 0,
|
9321
|
-
},
|
9322
|
-
];
|
9323
|
-
const QUERY_MOCK = [
|
9324
|
-
{
|
9325
|
-
id: AXPDataGenerator.uuid(),
|
9326
|
-
name: 'user-list-query',
|
9327
|
-
title: 'User List Query',
|
9328
|
-
categoryIds: [QUERY_CATEGORY_MOCK[0].id],
|
9329
|
-
categories: [{ id: QUERY_CATEGORY_MOCK[0].id, title: QUERY_CATEGORY_MOCK[0].title }],
|
9330
|
-
},
|
9331
|
-
{
|
9332
|
-
id: AXPDataGenerator.uuid(),
|
9333
|
-
name: 'financial-report-query',
|
9334
|
-
title: 'Financial Report Query',
|
9335
|
-
categoryIds: [child1.id],
|
9336
|
-
categories: [{ id: child1.id, title: child1.title }],
|
9337
|
-
},
|
9338
|
-
{
|
9339
|
-
id: AXPDataGenerator.uuid(),
|
9340
|
-
name: 'system-status-query',
|
9341
|
-
title: 'System Status Query',
|
9342
|
-
categoryIds: [child3.id],
|
9343
|
-
categories: [{ id: child3.id, title: child3.title }],
|
9344
|
-
},
|
9345
|
-
{
|
9346
|
-
id: AXPDataGenerator.uuid(),
|
9347
|
-
name: 'analytics-dashboard-query',
|
9348
|
-
title: 'Analytics Dashboard Query',
|
9349
|
-
categoryIds: [QUERY_CATEGORY_MOCK[5].id],
|
9350
|
-
categories: [{ id: QUERY_CATEGORY_MOCK[5].id, title: QUERY_CATEGORY_MOCK[5].title }],
|
9351
|
-
},
|
9352
|
-
];
|
9353
|
-
|
9354
|
-
class AXCQueryDataSeeder {
|
9670
|
+
class AXCPActivityLogService extends AXPActivityLogProvider {
|
9355
9671
|
constructor() {
|
9672
|
+
super(...arguments);
|
9356
9673
|
this.storageService = inject(AXPEntityStorageService);
|
9357
9674
|
}
|
9358
|
-
async
|
9359
|
-
|
9360
|
-
await this.storageService.
|
9361
|
-
|
9362
|
-
|
9363
|
-
|
9364
|
-
|
9365
|
-
|
9366
|
-
|
9367
|
-
|
9368
|
-
|
9369
|
-
class AXCDataManagementMockModule {
|
9370
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCDataManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
9371
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AXCDataManagementMockModule }); }
|
9372
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCDataManagementMockModule, providers: [
|
9373
|
-
{
|
9374
|
-
provide: AXP_DATA_SEEDER_TOKEN,
|
9375
|
-
useClass: AXCQueryDataSeeder,
|
9376
|
-
multi: true,
|
9377
|
-
},
|
9378
|
-
] }); }
|
9379
|
-
}
|
9380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCDataManagementMockModule, decorators: [{
|
9381
|
-
type: NgModule,
|
9382
|
-
args: [{
|
9383
|
-
imports: [],
|
9384
|
-
exports: [],
|
9385
|
-
declarations: [],
|
9386
|
-
providers: [
|
9387
|
-
{
|
9388
|
-
provide: AXP_DATA_SEEDER_TOKEN,
|
9389
|
-
useClass: AXCQueryDataSeeder,
|
9390
|
-
multi: true,
|
9675
|
+
async getHistory(refId, refType, options) {
|
9676
|
+
// Get all history records for this entity
|
9677
|
+
let records = await this.storageService.query(`${refType}-history`, {
|
9678
|
+
filter: {
|
9679
|
+
logic: 'and',
|
9680
|
+
filters: [
|
9681
|
+
{
|
9682
|
+
field: 'reference.id',
|
9683
|
+
operator: {
|
9684
|
+
type: 'equal'
|
9391
9685
|
},
|
9392
|
-
|
9393
|
-
|
9394
|
-
|
9395
|
-
|
9396
|
-
|
9397
|
-
|
9398
|
-
|
9399
|
-
|
9400
|
-
|
9401
|
-
|
9402
|
-
priority: 200,
|
9403
|
-
run: async () => {
|
9404
|
-
await seederService.seed();
|
9686
|
+
value: refId,
|
9687
|
+
},
|
9688
|
+
{
|
9689
|
+
field: 'reference.type',
|
9690
|
+
operator: {
|
9691
|
+
type: 'equal'
|
9692
|
+
},
|
9693
|
+
value: refType,
|
9694
|
+
}
|
9695
|
+
]
|
9405
9696
|
},
|
9697
|
+
take: 1000,
|
9698
|
+
skip: 0,
|
9699
|
+
sort: [
|
9700
|
+
{
|
9701
|
+
field: 'date',
|
9702
|
+
dir: 'desc',
|
9703
|
+
},
|
9704
|
+
],
|
9406
9705
|
});
|
9706
|
+
// Apply date filtering if specified
|
9707
|
+
if (options?.from || options?.to) {
|
9708
|
+
records.items = records.items.filter(r => {
|
9709
|
+
const recordDate = new Date(r.date);
|
9710
|
+
if (options.from && recordDate < options.from) {
|
9711
|
+
return false;
|
9712
|
+
}
|
9713
|
+
if (options.to && recordDate > options.to) {
|
9714
|
+
return false;
|
9715
|
+
}
|
9716
|
+
return true;
|
9717
|
+
});
|
9718
|
+
}
|
9719
|
+
// Sort by date descending (newest first)
|
9720
|
+
records.items.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime());
|
9721
|
+
// Apply pagination if specified
|
9722
|
+
if (options?.limit || options?.offset) {
|
9723
|
+
const offset = options?.offset || 0;
|
9724
|
+
const limit = options?.limit || records.items.length;
|
9725
|
+
records.items = records.items.slice(offset, offset + limit);
|
9726
|
+
}
|
9727
|
+
return records.items;
|
9407
9728
|
}
|
9408
|
-
|
9409
|
-
|
9410
|
-
|
9729
|
+
async getHistoryByIds(refId, refType, ids) {
|
9730
|
+
const all = await this.getHistory(refId, refType);
|
9731
|
+
return all.filter(r => ids.includes(r.id)).reverse();
|
9732
|
+
}
|
9733
|
+
}
|
9734
|
+
|
9735
|
+
class EntitySearchProvider {
|
9736
|
+
async search(text) {
|
9737
|
+
const db = new Dexie('ACoreXPlatform');
|
9738
|
+
const lowerText = text.toLowerCase(); // Normalize search text for case-insensitive search
|
9739
|
+
db.version(1).stores({
|
9740
|
+
'entity-store': '++id, entityName, [entityName+id]',
|
9741
|
+
});
|
9742
|
+
// Fetch all records from the entity-store table
|
9743
|
+
const allRecords = await db.table('entity-store').toArray();
|
9744
|
+
// Filter records based on the search text
|
9745
|
+
const filteredRecords = allRecords.filter((record) => this.shallowSearch(record, lowerText));
|
9746
|
+
return filteredRecords.map((record) => ({
|
9747
|
+
group: `Module.${record.entityName}`,
|
9748
|
+
data: record,
|
9749
|
+
command: {
|
9750
|
+
// 'open-entity': {
|
9751
|
+
// entity: record.entityName,
|
9752
|
+
// data: record,
|
9753
|
+
// },
|
9754
|
+
name: 'open-entity',
|
9755
|
+
options: {
|
9756
|
+
entity: record.entityName,
|
9757
|
+
data: record,
|
9758
|
+
}
|
9759
|
+
},
|
9760
|
+
}));
|
9761
|
+
}
|
9762
|
+
// Helper function for shallow search
|
9763
|
+
shallowSearch(obj, text) {
|
9764
|
+
if (typeof obj !== 'object' || obj === null) {
|
9765
|
+
return false;
|
9766
|
+
}
|
9767
|
+
return Object.entries(obj).some(([key, value]) => {
|
9768
|
+
if (key != 'id' && key != 'entityName') {
|
9769
|
+
if (typeof value === 'string' || typeof value === 'number') {
|
9770
|
+
return value.toString().toLowerCase().includes(text);
|
9771
|
+
}
|
9772
|
+
return false;
|
9773
|
+
}
|
9774
|
+
else {
|
9775
|
+
return false;
|
9776
|
+
}
|
9777
|
+
});
|
9778
|
+
}
|
9779
|
+
}
|
9780
|
+
|
9781
|
+
class AXCCommonMockModule {
|
9782
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCommonMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
9783
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AXCCommonMockModule }); }
|
9784
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCommonMockModule, providers: [
|
9785
|
+
{
|
9786
|
+
provide: AXP_ACTIVITY_LOG_PROVIDER,
|
9787
|
+
useClass: AXCPActivityLogService,
|
9788
|
+
multi: true,
|
9789
|
+
},
|
9790
|
+
{
|
9791
|
+
provide: AXP_SEARCH_PROVIDER,
|
9792
|
+
useClass: EntitySearchProvider,
|
9793
|
+
multi: true,
|
9794
|
+
},
|
9795
|
+
] }); }
|
9796
|
+
}
|
9797
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCommonMockModule, decorators: [{
|
9798
|
+
type: NgModule,
|
9799
|
+
args: [{
|
9800
|
+
imports: [],
|
9801
|
+
exports: [],
|
9802
|
+
declarations: [],
|
9803
|
+
providers: [
|
9804
|
+
{
|
9805
|
+
provide: AXP_ACTIVITY_LOG_PROVIDER,
|
9806
|
+
useClass: AXCPActivityLogService,
|
9807
|
+
multi: true,
|
9808
|
+
},
|
9809
|
+
{
|
9810
|
+
provide: AXP_SEARCH_PROVIDER,
|
9811
|
+
useClass: EntitySearchProvider,
|
9812
|
+
multi: true,
|
9813
|
+
},
|
9814
|
+
],
|
9815
|
+
}]
|
9816
|
+
}] });
|
9817
|
+
|
9818
|
+
const calendarMock = [
|
9819
|
+
// Root Calendars
|
9820
|
+
{
|
9821
|
+
id: AXPDataGenerator.uuid(),
|
9822
|
+
name: 'company-main',
|
9823
|
+
title: 'Company Main Calendar',
|
9824
|
+
description: 'Main company calendar with all holidays and important dates',
|
9825
|
+
calendarTypeId: 'gregorian', // Gregorian
|
9826
|
+
calendarType: {
|
9827
|
+
id: 'gregorian',
|
9828
|
+
title: 'Gregorian',
|
9829
|
+
},
|
9830
|
+
parentId: null,
|
9831
|
+
parent: null,
|
9832
|
+
weekends: ['friday', 'saturday'],
|
9833
|
+
firstDayOfWeek: 'sunday',
|
9834
|
+
workingHours: {
|
9835
|
+
start: '08:00',
|
9836
|
+
end: '17:00',
|
9837
|
+
breakStart: '12:00',
|
9838
|
+
breakEnd: '13:00'
|
9839
|
+
},
|
9840
|
+
timeZone: 'Asia/Tehran',
|
9841
|
+
isTemplate: false,
|
9842
|
+
isActive: true,
|
9843
|
+
order: 1,
|
9844
|
+
notes: 'Master calendar for the entire organization',
|
9845
|
+
createdAt: new Date('2024-01-01'),
|
9846
|
+
updatedAt: new Date('2024-01-01'),
|
9847
|
+
},
|
9848
|
+
{
|
9849
|
+
id: AXPDataGenerator.uuid(),
|
9850
|
+
name: 'persian-calendar',
|
9851
|
+
title: 'Persian Calendar',
|
9852
|
+
description: 'Persian solar calendar with Persian holidays',
|
9853
|
+
calendarTypeId: 'solar-hijri', // Gregorian
|
9854
|
+
calendarType: {
|
9855
|
+
id: 'solar-hijri',
|
9856
|
+
title: 'Solar Hijri',
|
9857
|
+
},
|
9858
|
+
parentId: null,
|
9859
|
+
parent: null,
|
9860
|
+
scope: 'platform',
|
9861
|
+
scopeEntityId: null,
|
9862
|
+
weekends: ['thursday', 'friday'],
|
9863
|
+
firstDayOfWeek: 'saturday',
|
9864
|
+
workingHours: {
|
9865
|
+
start: '08:30',
|
9866
|
+
end: '17:30',
|
9867
|
+
breakStart: '12:30',
|
9868
|
+
breakEnd: '13:30'
|
9869
|
+
},
|
9870
|
+
timeZone: 'Asia/Tehran',
|
9871
|
+
isTemplate: false,
|
9872
|
+
isActive: true,
|
9873
|
+
order: 2,
|
9874
|
+
notes: 'Official Persian calendar with local holidays',
|
9875
|
+
createdAt: new Date('2024-01-01'),
|
9876
|
+
updatedAt: new Date('2024-01-01'),
|
9877
|
+
},
|
9878
|
+
// Child Calendar (inherits from company-main)
|
9879
|
+
{
|
9880
|
+
id: AXPDataGenerator.uuid(),
|
9881
|
+
name: 'sales-team',
|
9882
|
+
title: 'Sales Team Calendar',
|
9883
|
+
description: 'Sales team specific calendar with team events',
|
9884
|
+
calendarTypeId: 'gregorian', // Gregorian
|
9885
|
+
calendarType: {
|
9886
|
+
id: 'gregorian',
|
9887
|
+
title: 'Gregorian',
|
9888
|
+
},
|
9889
|
+
parentId: null,
|
9890
|
+
parent: null,
|
9891
|
+
scope: 'division',
|
9892
|
+
scopeEntityId: 'sales-div-001',
|
9893
|
+
weekends: ['friday', 'saturday'], // Inherited
|
9894
|
+
firstDayOfWeek: 'sunday',
|
9895
|
+
workingHours: {
|
9896
|
+
start: '09:00', // Override parent
|
9897
|
+
end: '18:00', // Override parent
|
9898
|
+
breakStart: '12:00',
|
9899
|
+
breakEnd: '13:00'
|
9900
|
+
},
|
9901
|
+
timeZone: 'Asia/Tehran',
|
9902
|
+
isTemplate: false,
|
9903
|
+
isActive: true,
|
9904
|
+
order: 3,
|
9905
|
+
notes: 'Sales team calendar with extended working hours',
|
9906
|
+
createdAt: new Date('2024-01-15'),
|
9907
|
+
updatedAt: new Date('2024-01-15'),
|
9908
|
+
},
|
9909
|
+
// Template Calendar
|
9910
|
+
{
|
9911
|
+
id: AXPDataGenerator.uuid(),
|
9912
|
+
name: 'project-template',
|
9913
|
+
title: 'Project Template Calendar',
|
9914
|
+
description: 'Template calendar for new projects',
|
9915
|
+
calendarTypeId: 'gregorian', // Gregorian
|
9916
|
+
calendarType: {
|
9917
|
+
id: 'gregorian',
|
9918
|
+
title: 'Gregorian',
|
9919
|
+
},
|
9920
|
+
parentId: null,
|
9921
|
+
parent: null,
|
9922
|
+
scope: 'platform',
|
9923
|
+
scopeEntityId: null,
|
9924
|
+
weekends: ['saturday', 'sunday'],
|
9925
|
+
firstDayOfWeek: 'monday',
|
9926
|
+
workingHours: {
|
9927
|
+
start: '08:00',
|
9928
|
+
end: '17:00',
|
9929
|
+
breakStart: '12:00',
|
9930
|
+
breakEnd: '13:00'
|
9931
|
+
},
|
9932
|
+
timeZone: 'UTC',
|
9933
|
+
isTemplate: true,
|
9934
|
+
isActive: true,
|
9935
|
+
order: 10,
|
9936
|
+
notes: 'Template for creating new project calendars',
|
9937
|
+
createdAt: new Date('2024-01-01'),
|
9938
|
+
updatedAt: new Date('2024-01-01'),
|
9939
|
+
},
|
9940
|
+
// User-specific Calendar
|
9941
|
+
{
|
9942
|
+
id: AXPDataGenerator.uuid(),
|
9943
|
+
name: 'user-personal',
|
9944
|
+
title: 'Personal Calendar',
|
9945
|
+
description: 'Personal calendar for individual user',
|
9946
|
+
calendarTypeId: 'gregorian', // Gregorian
|
9947
|
+
calendarType: {
|
9948
|
+
id: 'gregorian',
|
9949
|
+
title: 'Gregorian',
|
9950
|
+
},
|
9951
|
+
parentId: null,
|
9952
|
+
parent: null,
|
9953
|
+
scope: 'user',
|
9954
|
+
scopeEntityId: 'user-123',
|
9955
|
+
weekends: ['friday', 'saturday'],
|
9956
|
+
firstDayOfWeek: 'sunday',
|
9957
|
+
workingHours: {
|
9958
|
+
start: '10:00', // Personal preference
|
9959
|
+
end: '16:00', // Part-time
|
9960
|
+
breakStart: '12:30',
|
9961
|
+
breakEnd: '13:30'
|
9962
|
+
},
|
9963
|
+
timeZone: 'Asia/Tehran',
|
9964
|
+
isTemplate: false,
|
9965
|
+
isActive: true,
|
9966
|
+
order: 5,
|
9967
|
+
notes: 'Personal calendar with flexible working hours',
|
9968
|
+
createdAt: new Date('2024-02-01'),
|
9969
|
+
updatedAt: new Date('2024-02-01'),
|
9970
|
+
}
|
9971
|
+
];
|
9972
|
+
|
9973
|
+
class AXCCalendarDataSeeder {
|
9974
|
+
constructor() {
|
9975
|
+
this.storageService = inject(AXPEntityStorageService);
|
9976
|
+
}
|
9977
|
+
async seed() {
|
9978
|
+
await this.storageService.initial(`${RootConfig$g.module.name}.${RootConfig$g.entities.calendar.name}`, calendarMock);
|
9979
|
+
}
|
9980
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCalendarDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
9981
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCalendarDataSeeder }); }
|
9982
|
+
}
|
9983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCalendarDataSeeder, decorators: [{
|
9984
|
+
type: Injectable
|
9985
|
+
}] });
|
9986
|
+
|
9987
|
+
const calendarEventTypeMockData = [
|
9988
|
+
{
|
9989
|
+
id: AXPDataGenerator.uuid(),
|
9990
|
+
title: 'Holiday',
|
9991
|
+
description: 'Public holidays and vacation days',
|
9992
|
+
color: '#ff6b6b',
|
9993
|
+
icon: 'fa-light fa-umbrella-beach',
|
9994
|
+
isActive: true,
|
9995
|
+
isDefault: true,
|
9996
|
+
order: 1,
|
9997
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
9998
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
9999
|
+
},
|
10000
|
+
{
|
10001
|
+
id: AXPDataGenerator.uuid(),
|
10002
|
+
title: 'Workday',
|
10003
|
+
description: 'Regular working days',
|
10004
|
+
color: '#4ecdc4',
|
10005
|
+
icon: 'fa-light fa-briefcase',
|
10006
|
+
isActive: true,
|
10007
|
+
isDefault: true,
|
10008
|
+
order: 2,
|
10009
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10010
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10011
|
+
},
|
10012
|
+
{
|
10013
|
+
id: AXPDataGenerator.uuid(),
|
10014
|
+
title: 'Meeting',
|
10015
|
+
description: 'Team meetings and conferences',
|
10016
|
+
color: '#45b7d1',
|
10017
|
+
icon: 'fa-light fa-users',
|
10018
|
+
isActive: true,
|
10019
|
+
isDefault: true,
|
10020
|
+
order: 3,
|
10021
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10022
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10023
|
+
},
|
10024
|
+
{
|
10025
|
+
id: AXPDataGenerator.uuid(),
|
10026
|
+
title: 'Deadline',
|
10027
|
+
description: 'Project deadlines and due dates',
|
10028
|
+
color: '#f39c12',
|
10029
|
+
icon: 'fa-light fa-clock',
|
10030
|
+
isActive: true,
|
10031
|
+
isDefault: true,
|
10032
|
+
order: 4,
|
10033
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10034
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10035
|
+
},
|
10036
|
+
{
|
10037
|
+
id: AXPDataGenerator.uuid(),
|
10038
|
+
title: 'Event',
|
10039
|
+
description: 'General events and activities',
|
10040
|
+
color: '#9b59b6',
|
10041
|
+
icon: 'fa-light fa-calendar-day',
|
10042
|
+
isActive: true,
|
10043
|
+
isDefault: true,
|
10044
|
+
order: 5,
|
10045
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10046
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10047
|
+
},
|
10048
|
+
{
|
10049
|
+
id: AXPDataGenerator.uuid(),
|
10050
|
+
title: 'Occasion',
|
10051
|
+
description: 'Special occasions and celebrations',
|
10052
|
+
color: '#e74c3c',
|
10053
|
+
icon: 'fa-light fa-gift',
|
10054
|
+
isActive: true,
|
10055
|
+
isDefault: false,
|
10056
|
+
order: 6,
|
10057
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10058
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10059
|
+
},
|
10060
|
+
{
|
10061
|
+
id: AXPDataGenerator.uuid(),
|
10062
|
+
title: 'Maintenance',
|
10063
|
+
description: 'System maintenance and updates',
|
10064
|
+
color: '#34495e',
|
10065
|
+
icon: 'fa-light fa-tools',
|
10066
|
+
isActive: true,
|
10067
|
+
isDefault: false,
|
10068
|
+
order: 7,
|
10069
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10070
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10071
|
+
},
|
10072
|
+
{
|
10073
|
+
id: AXPDataGenerator.uuid(),
|
10074
|
+
title: 'Training',
|
10075
|
+
description: 'Training sessions and workshops',
|
10076
|
+
color: '#27ae60',
|
10077
|
+
icon: 'fa-light fa-graduation-cap',
|
10078
|
+
isActive: true,
|
10079
|
+
isDefault: false,
|
10080
|
+
order: 8,
|
10081
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10082
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10083
|
+
},
|
10084
|
+
{
|
10085
|
+
id: AXPDataGenerator.uuid(),
|
10086
|
+
title: 'Review',
|
10087
|
+
description: 'Code reviews and performance reviews',
|
10088
|
+
color: '#8e44ad',
|
10089
|
+
icon: 'fa-light fa-eye',
|
10090
|
+
isActive: true,
|
10091
|
+
isDefault: false,
|
10092
|
+
order: 9,
|
10093
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10094
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10095
|
+
},
|
10096
|
+
{
|
10097
|
+
id: AXPDataGenerator.uuid(),
|
10098
|
+
title: 'Deployment',
|
10099
|
+
description: 'Software deployments and releases',
|
10100
|
+
color: '#16a085',
|
10101
|
+
icon: 'fa-light fa-rocket',
|
10102
|
+
isActive: true,
|
10103
|
+
isDefault: false,
|
10104
|
+
order: 10,
|
10105
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
10106
|
+
updatedAt: new Date('2024-01-01T00:00:00Z'),
|
10107
|
+
},
|
10108
|
+
];
|
10109
|
+
|
10110
|
+
const holidayType = calendarEventTypeMockData[0];
|
10111
|
+
const meetingType = calendarEventTypeMockData[1];
|
10112
|
+
const deadlineType = calendarEventTypeMockData[2];
|
10113
|
+
const eventType = calendarEventTypeMockData[3];
|
10114
|
+
const occasionType = calendarEventTypeMockData[4];
|
10115
|
+
const maintenanceType = calendarEventTypeMockData[5];
|
10116
|
+
const calendarEventMock = [
|
10117
|
+
{
|
10118
|
+
id: AXPDataGenerator.uuid(),
|
10119
|
+
calendarId: calendarMock[0].id,
|
10120
|
+
calendar: { id: calendarMock[0].id, title: calendarMock[0].title },
|
10121
|
+
title: 'New Year Holiday',
|
10122
|
+
description: 'Iranian New Year celebration',
|
10123
|
+
typeId: holidayType.id,
|
10124
|
+
type: holidayType,
|
10125
|
+
date: new Date('2024-03-20'),
|
10126
|
+
isRecurring: true,
|
10127
|
+
recurrenceRule: 'FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=20',
|
10128
|
+
isActive: true,
|
10129
|
+
order: 1,
|
10130
|
+
createdAt: new Date('2024-01-01'),
|
10131
|
+
updatedAt: new Date('2024-01-01'),
|
10132
|
+
},
|
10133
|
+
{
|
10134
|
+
id: AXPDataGenerator.uuid(),
|
10135
|
+
calendarId: calendarMock[0].id,
|
10136
|
+
calendar: { id: calendarMock[0].id, title: calendarMock[0].title },
|
10137
|
+
title: 'Weekly Team Meeting',
|
10138
|
+
description: 'Every Monday team standup meeting',
|
10139
|
+
typeId: meetingType.id,
|
10140
|
+
type: meetingType,
|
10141
|
+
date: new Date('2024-01-01'),
|
10142
|
+
isRecurring: true,
|
10143
|
+
recurrenceRule: 'FREQ=WEEKLY;BYDAY=MO',
|
10144
|
+
isActive: true,
|
10145
|
+
order: 2,
|
10146
|
+
createdAt: new Date('2024-01-01'),
|
10147
|
+
updatedAt: new Date('2024-01-01'),
|
10148
|
+
},
|
10149
|
+
{
|
10150
|
+
id: AXPDataGenerator.uuid(),
|
10151
|
+
calendarId: calendarMock[0].id,
|
10152
|
+
calendar: { id: calendarMock[0].id, title: calendarMock[0].title },
|
10153
|
+
title: 'Monthly Report Due',
|
10154
|
+
description: 'Last Friday of each month - reports due',
|
10155
|
+
typeId: deadlineType.id,
|
10156
|
+
type: deadlineType,
|
10157
|
+
date: new Date('2024-01-26'),
|
10158
|
+
isRecurring: true,
|
10159
|
+
recurrenceRule: 'FREQ=MONTHLY;BYDAY=FR;BYSETPOS=-1',
|
10160
|
+
isActive: true,
|
10161
|
+
order: 3,
|
10162
|
+
createdAt: new Date('2024-01-01'),
|
10163
|
+
updatedAt: new Date('2024-01-01'),
|
10164
|
+
},
|
10165
|
+
{
|
10166
|
+
id: AXPDataGenerator.uuid(),
|
10167
|
+
calendarId: calendarMock[2].id, // Sales team calendar
|
10168
|
+
calendar: { id: calendarMock[2].id, title: calendarMock[2].title },
|
10169
|
+
title: 'Sales Kickoff Event',
|
10170
|
+
description: 'Annual sales team kickoff',
|
10171
|
+
typeId: eventType.id,
|
10172
|
+
type: eventType,
|
10173
|
+
date: new Date('2024-01-15'),
|
10174
|
+
isRecurring: false,
|
10175
|
+
recurrenceRule: null,
|
10176
|
+
isActive: true,
|
10177
|
+
order: 4,
|
10178
|
+
createdAt: new Date('2024-01-01'),
|
10179
|
+
updatedAt: new Date('2024-01-01'),
|
10180
|
+
},
|
10181
|
+
{
|
10182
|
+
id: AXPDataGenerator.uuid(),
|
10183
|
+
calendarId: calendarMock[2].id, // Sales team
|
10184
|
+
calendar: { id: calendarMock[2].id, title: calendarMock[2].title },
|
10185
|
+
title: 'Quarterly Review',
|
10186
|
+
description: 'End of quarter review meetings',
|
10187
|
+
typeId: meetingType.id,
|
10188
|
+
type: meetingType,
|
10189
|
+
date: new Date('2024-03-01'),
|
10190
|
+
isRecurring: true,
|
10191
|
+
recurrenceRule: 'FREQ=YEARLY;BYMONTH=3,6,9,12;BYMONTHDAY=1',
|
10192
|
+
isActive: true,
|
10193
|
+
order: 5,
|
10194
|
+
createdAt: new Date('2024-01-01'),
|
10195
|
+
updatedAt: new Date('2024-01-01'),
|
10196
|
+
},
|
10197
|
+
{
|
10198
|
+
id: AXPDataGenerator.uuid(),
|
10199
|
+
calendarId: calendarMock[0].id,
|
10200
|
+
calendar: { id: calendarMock[0].id, title: calendarMock[0].title },
|
10201
|
+
title: 'Company Anniversary',
|
10202
|
+
description: 'Company founding anniversary celebration',
|
10203
|
+
typeId: occasionType.id,
|
10204
|
+
type: occasionType,
|
10205
|
+
date: new Date('2024-06-15'),
|
10206
|
+
isRecurring: true,
|
10207
|
+
recurrenceRule: 'FREQ=YEARLY;BYMONTH=6;BYMONTHDAY=15',
|
10208
|
+
isActive: true,
|
10209
|
+
order: 6,
|
10210
|
+
createdAt: new Date('2024-01-01'),
|
10211
|
+
updatedAt: new Date('2024-01-01'),
|
10212
|
+
},
|
10213
|
+
{
|
10214
|
+
id: AXPDataGenerator.uuid(),
|
10215
|
+
calendarId: calendarMock[1].id, // Development team
|
10216
|
+
calendar: { id: calendarMock[1].id, title: calendarMock[1].title },
|
10217
|
+
title: 'System Maintenance',
|
10218
|
+
description: 'Monthly system maintenance window',
|
10219
|
+
typeId: maintenanceType.id,
|
10220
|
+
type: maintenanceType,
|
10221
|
+
date: new Date('2024-02-01'),
|
10222
|
+
isRecurring: true,
|
10223
|
+
recurrenceRule: 'FREQ=MONTHLY;BYMONTHDAY=1',
|
10224
|
+
isActive: true,
|
10225
|
+
order: 7,
|
10226
|
+
createdAt: new Date('2024-01-01'),
|
10227
|
+
updatedAt: new Date('2024-01-01'),
|
10228
|
+
}
|
10229
|
+
];
|
10230
|
+
|
10231
|
+
class AXCCalendarEventDataSeeder {
|
10232
|
+
constructor() {
|
10233
|
+
this.storageService = inject(AXPEntityStorageService);
|
10234
|
+
}
|
10235
|
+
async seed() {
|
10236
|
+
await this.storageService.initial(`${RootConfig$g.module.name}.${RootConfig$g.entities.calendarEvent.name}`, calendarEventMock);
|
10237
|
+
}
|
10238
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCalendarEventDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
10239
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCalendarEventDataSeeder }); }
|
10240
|
+
}
|
10241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCalendarEventDataSeeder, decorators: [{
|
10242
|
+
type: Injectable
|
10243
|
+
}] });
|
10244
|
+
|
10245
|
+
class AXMCalendarEventTypeSeeder {
|
10246
|
+
constructor() {
|
10247
|
+
this.storageService = inject(AXPEntityStorageService);
|
10248
|
+
}
|
10249
|
+
async seed() {
|
10250
|
+
await this.storageService.initial(`${RootConfig$g.module.name}.${RootConfig$g.entities.calendarEventType.name}`, calendarEventTypeMockData);
|
10251
|
+
}
|
10252
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMCalendarEventTypeSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
10253
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMCalendarEventTypeSeeder }); }
|
10254
|
+
}
|
10255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMCalendarEventTypeSeeder, decorators: [{
|
10256
|
+
type: Injectable
|
10257
|
+
}] });
|
10258
|
+
|
10259
|
+
class AXMCalendarManagementMockModule {
|
10260
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMCalendarManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
10261
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AXMCalendarManagementMockModule }); }
|
10262
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMCalendarManagementMockModule, providers: [
|
10263
|
+
{
|
10264
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
10265
|
+
useClass: AXCCalendarDataSeeder,
|
10266
|
+
multi: true,
|
10267
|
+
},
|
10268
|
+
{
|
10269
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
10270
|
+
useClass: AXCCalendarEventDataSeeder,
|
10271
|
+
multi: true,
|
10272
|
+
},
|
10273
|
+
{
|
10274
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
10275
|
+
useClass: AXMCalendarEventTypeSeeder,
|
10276
|
+
multi: true,
|
10277
|
+
},
|
10278
|
+
] }); }
|
10279
|
+
}
|
10280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMCalendarManagementMockModule, decorators: [{
|
10281
|
+
type: NgModule,
|
10282
|
+
args: [{
|
10283
|
+
providers: [
|
10284
|
+
{
|
10285
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
10286
|
+
useClass: AXCCalendarDataSeeder,
|
10287
|
+
multi: true,
|
10288
|
+
},
|
10289
|
+
{
|
10290
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
10291
|
+
useClass: AXCCalendarEventDataSeeder,
|
10292
|
+
multi: true,
|
10293
|
+
},
|
10294
|
+
{
|
10295
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
10296
|
+
useClass: AXMCalendarEventTypeSeeder,
|
10297
|
+
multi: true,
|
10298
|
+
},
|
10299
|
+
],
|
10300
|
+
}]
|
10301
|
+
}] });
|
10302
|
+
|
10303
|
+
const REPORT_ID = AXPDataGenerator.uuid();
|
10304
|
+
const child1 = {
|
10305
|
+
id: AXPDataGenerator.uuid(),
|
10306
|
+
title: 'Financial Reports',
|
10307
|
+
parentId: REPORT_ID,
|
10308
|
+
childCount: 0,
|
10309
|
+
};
|
10310
|
+
const child2 = {
|
10311
|
+
id: AXPDataGenerator.uuid(),
|
10312
|
+
title: 'User Reports',
|
10313
|
+
parentId: REPORT_ID,
|
10314
|
+
childCount: 0,
|
10315
|
+
};
|
10316
|
+
const child3 = {
|
10317
|
+
id: AXPDataGenerator.uuid(),
|
10318
|
+
title: 'System Reports',
|
10319
|
+
parentId: REPORT_ID,
|
10320
|
+
childCount: 0,
|
10321
|
+
};
|
10322
|
+
const QUERY_CATEGORY_MOCK = [
|
10323
|
+
{
|
10324
|
+
id: AXPDataGenerator.uuid(),
|
10325
|
+
title: 'General Queries',
|
10326
|
+
childCount: 0,
|
10327
|
+
},
|
10328
|
+
{
|
10329
|
+
id: REPORT_ID,
|
10330
|
+
title: 'Reports',
|
10331
|
+
childCount: 3,
|
10332
|
+
children: [child1, child2, child3],
|
10333
|
+
},
|
10334
|
+
child1,
|
10335
|
+
child2,
|
10336
|
+
child3,
|
10337
|
+
{
|
10338
|
+
id: AXPDataGenerator.uuid(),
|
10339
|
+
title: 'Analytics',
|
10340
|
+
childCount: 0,
|
10341
|
+
},
|
10342
|
+
];
|
10343
|
+
const QUERY_MOCK = [
|
10344
|
+
{
|
10345
|
+
id: AXPDataGenerator.uuid(),
|
10346
|
+
name: 'user-list-query',
|
10347
|
+
title: 'User List Query',
|
10348
|
+
categoryIds: [QUERY_CATEGORY_MOCK[0].id],
|
10349
|
+
categories: [{ id: QUERY_CATEGORY_MOCK[0].id, title: QUERY_CATEGORY_MOCK[0].title }],
|
10350
|
+
},
|
10351
|
+
{
|
10352
|
+
id: AXPDataGenerator.uuid(),
|
10353
|
+
name: 'financial-report-query',
|
10354
|
+
title: 'Financial Report Query',
|
10355
|
+
categoryIds: [child1.id],
|
10356
|
+
categories: [{ id: child1.id, title: child1.title }],
|
10357
|
+
},
|
10358
|
+
{
|
10359
|
+
id: AXPDataGenerator.uuid(),
|
10360
|
+
name: 'system-status-query',
|
10361
|
+
title: 'System Status Query',
|
10362
|
+
categoryIds: [child3.id],
|
10363
|
+
categories: [{ id: child3.id, title: child3.title }],
|
10364
|
+
},
|
10365
|
+
{
|
10366
|
+
id: AXPDataGenerator.uuid(),
|
10367
|
+
name: 'analytics-dashboard-query',
|
10368
|
+
title: 'Analytics Dashboard Query',
|
10369
|
+
categoryIds: [QUERY_CATEGORY_MOCK[5].id],
|
10370
|
+
categories: [{ id: QUERY_CATEGORY_MOCK[5].id, title: QUERY_CATEGORY_MOCK[5].title }],
|
10371
|
+
},
|
10372
|
+
];
|
10373
|
+
|
10374
|
+
class AXCQueryDataSeeder {
|
10375
|
+
constructor() {
|
10376
|
+
this.storageService = inject(AXPEntityStorageService);
|
10377
|
+
}
|
10378
|
+
async seed() {
|
10379
|
+
await this.storageService.initial(`${RootConfig$h.module.name}.${RootConfig$h.entities.queryCategory.name}`, QUERY_CATEGORY_MOCK);
|
10380
|
+
await this.storageService.initial(`${RootConfig$h.module.name}.${RootConfig$h.entities.query.name}`, QUERY_MOCK);
|
10381
|
+
}
|
10382
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCQueryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
10383
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCQueryDataSeeder }); }
|
10384
|
+
}
|
10385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCQueryDataSeeder, decorators: [{
|
10386
|
+
type: Injectable
|
10387
|
+
}] });
|
10388
|
+
|
10389
|
+
class AXCDataManagementMockModule {
|
10390
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCDataManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
10391
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AXCDataManagementMockModule }); }
|
10392
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCDataManagementMockModule, providers: [
|
10393
|
+
{
|
10394
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
10395
|
+
useClass: AXCQueryDataSeeder,
|
10396
|
+
multi: true,
|
10397
|
+
},
|
10398
|
+
] }); }
|
10399
|
+
}
|
10400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCDataManagementMockModule, decorators: [{
|
10401
|
+
type: NgModule,
|
10402
|
+
args: [{
|
10403
|
+
imports: [],
|
10404
|
+
exports: [],
|
10405
|
+
declarations: [],
|
10406
|
+
providers: [
|
10407
|
+
{
|
10408
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
10409
|
+
useClass: AXCQueryDataSeeder,
|
10410
|
+
multi: true,
|
10411
|
+
},
|
10412
|
+
],
|
10413
|
+
}]
|
10414
|
+
}] });
|
10415
|
+
|
10416
|
+
class AXCMockModule {
|
10417
|
+
constructor(appInitService, injector) {
|
10418
|
+
const seederService = injector.get(AXPDataSeederService);
|
10419
|
+
appInitService.registerTask({
|
10420
|
+
name: 'Mock',
|
10421
|
+
statusText: 'Seed Data ...',
|
10422
|
+
priority: 200,
|
10423
|
+
run: async () => {
|
10424
|
+
await seederService.seed();
|
10425
|
+
},
|
10426
|
+
});
|
10427
|
+
}
|
10428
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCMockModule, deps: [{ token: i1.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
10429
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AXCMockModule, imports: [i2.AXPAuthModule, AXCCommonMockModule,
|
10430
|
+
AXCFormTemplateManagementMockModule,
|
10431
|
+
AXCFOrganizationManagementMockModule,
|
9411
10432
|
AXCReportManagementMockModule,
|
9412
10433
|
AXCContactManagementMockModule,
|
9413
10434
|
AXCDashboardManagementMockModule,
|
@@ -9424,6 +10445,7 @@ class AXCMockModule {
|
|
9424
10445
|
AXCDocumentManagementMockModule,
|
9425
10446
|
AXCIssueManagementMockModule,
|
9426
10447
|
AXCLogManagementMockModule,
|
10448
|
+
AXMCalendarManagementMockModule,
|
9427
10449
|
AXCDataManagementMockModule] }); }
|
9428
10450
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCMockModule, providers: [
|
9429
10451
|
{
|
@@ -9434,6 +10456,7 @@ class AXCMockModule {
|
|
9434
10456
|
], imports: [AXPAuthModule.forRoot({
|
9435
10457
|
strategies: [MOCKStrategy],
|
9436
10458
|
}),
|
10459
|
+
AXCCommonMockModule,
|
9437
10460
|
AXCFormTemplateManagementMockModule,
|
9438
10461
|
AXCFOrganizationManagementMockModule,
|
9439
10462
|
AXCReportManagementMockModule,
|
@@ -9452,6 +10475,7 @@ class AXCMockModule {
|
|
9452
10475
|
AXCDocumentManagementMockModule,
|
9453
10476
|
AXCIssueManagementMockModule,
|
9454
10477
|
AXCLogManagementMockModule,
|
10478
|
+
AXMCalendarManagementMockModule,
|
9455
10479
|
AXCDataManagementMockModule] }); }
|
9456
10480
|
}
|
9457
10481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCMockModule, decorators: [{
|
@@ -9461,6 +10485,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
9461
10485
|
AXPAuthModule.forRoot({
|
9462
10486
|
strategies: [MOCKStrategy],
|
9463
10487
|
}),
|
10488
|
+
AXCCommonMockModule,
|
9464
10489
|
AXCFormTemplateManagementMockModule,
|
9465
10490
|
AXCFOrganizationManagementMockModule,
|
9466
10491
|
AXCReportManagementMockModule,
|
@@ -9479,6 +10504,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
9479
10504
|
AXCDocumentManagementMockModule,
|
9480
10505
|
AXCIssueManagementMockModule,
|
9481
10506
|
AXCLogManagementMockModule,
|
10507
|
+
AXMCalendarManagementMockModule,
|
9482
10508
|
AXCDataManagementMockModule,
|
9483
10509
|
],
|
9484
10510
|
exports: [],
|
@@ -9493,157 +10519,105 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
9493
10519
|
}]
|
9494
10520
|
}], ctorParameters: () => [{ type: i1.AXPAppStartUpService }, { type: i0.Injector }] });
|
9495
10521
|
|
9496
|
-
class
|
9497
|
-
|
9498
|
-
|
9499
|
-
|
9500
|
-
|
9501
|
-
|
9502
|
-
|
9503
|
-
|
9504
|
-
|
9505
|
-
logic: 'and',
|
9506
|
-
filters: [
|
10522
|
+
class AXPSecurityManagementMockWidgetDataSourceProvider {
|
10523
|
+
async items() {
|
10524
|
+
return [
|
10525
|
+
{
|
10526
|
+
name: 'mock.securityUsers',
|
10527
|
+
title: 'Security Users',
|
10528
|
+
valueField: 'id',
|
10529
|
+
textField: 'displayName',
|
10530
|
+
columns: [
|
9507
10531
|
{
|
9508
|
-
|
9509
|
-
|
9510
|
-
type: 'equal'
|
9511
|
-
},
|
9512
|
-
value: refId,
|
10532
|
+
name: 'id',
|
10533
|
+
title: 'Id',
|
9513
10534
|
},
|
9514
10535
|
{
|
9515
|
-
|
9516
|
-
|
9517
|
-
|
9518
|
-
|
9519
|
-
|
9520
|
-
|
9521
|
-
|
9522
|
-
|
9523
|
-
|
9524
|
-
|
9525
|
-
|
9526
|
-
|
9527
|
-
|
9528
|
-
|
9529
|
-
|
9530
|
-
|
9531
|
-
|
9532
|
-
|
9533
|
-
|
9534
|
-
|
9535
|
-
|
9536
|
-
|
9537
|
-
|
9538
|
-
|
9539
|
-
|
9540
|
-
|
9541
|
-
|
9542
|
-
|
9543
|
-
|
9544
|
-
|
9545
|
-
|
9546
|
-
|
9547
|
-
|
9548
|
-
|
9549
|
-
|
9550
|
-
|
9551
|
-
|
9552
|
-
}
|
9553
|
-
return records.items;
|
9554
|
-
}
|
9555
|
-
async getHistoryByIds(refId, refType, ids) {
|
9556
|
-
const all = await this.getHistory(refId, refType);
|
9557
|
-
return all.filter(r => ids.includes(r.id)).reverse();
|
9558
|
-
}
|
9559
|
-
}
|
9560
|
-
|
9561
|
-
class EntitySearchProvider {
|
9562
|
-
async search(text) {
|
9563
|
-
const db = new Dexie('ACoreXPlatform');
|
9564
|
-
const lowerText = text.toLowerCase(); // Normalize search text for case-insensitive search
|
9565
|
-
db.version(1).stores({
|
9566
|
-
'entity-store': '++id, entityName, [entityName+id]',
|
9567
|
-
});
|
9568
|
-
// Fetch all records from the entity-store table
|
9569
|
-
const allRecords = await db.table('entity-store').toArray();
|
9570
|
-
// Filter records based on the search text
|
9571
|
-
const filteredRecords = allRecords.filter((record) => this.shallowSearch(record, lowerText));
|
9572
|
-
return filteredRecords.map((record) => ({
|
9573
|
-
group: `Module.${record.entityName}`,
|
9574
|
-
data: record,
|
9575
|
-
command: {
|
9576
|
-
// 'open-entity': {
|
9577
|
-
// entity: record.entityName,
|
9578
|
-
// data: record,
|
9579
|
-
// },
|
9580
|
-
name: 'open-entity',
|
9581
|
-
options: {
|
9582
|
-
entity: record.entityName,
|
9583
|
-
data: record,
|
9584
|
-
}
|
9585
|
-
},
|
9586
|
-
}));
|
9587
|
-
}
|
9588
|
-
// Helper function for shallow search
|
9589
|
-
shallowSearch(obj, text) {
|
9590
|
-
if (typeof obj !== 'object' || obj === null) {
|
9591
|
-
return false;
|
9592
|
-
}
|
9593
|
-
return Object.entries(obj).some(([key, value]) => {
|
9594
|
-
if (key != 'id' && key != 'entityName') {
|
9595
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
9596
|
-
return value.toString().toLowerCase().includes(text);
|
9597
|
-
}
|
9598
|
-
return false;
|
9599
|
-
}
|
9600
|
-
else {
|
9601
|
-
return false;
|
9602
|
-
}
|
9603
|
-
});
|
9604
|
-
}
|
9605
|
-
}
|
9606
|
-
|
9607
|
-
class AXCCommonMockModule {
|
9608
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCommonMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
9609
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AXCCommonMockModule }); }
|
9610
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCommonMockModule, providers: [
|
9611
|
-
{
|
9612
|
-
provide: AXP_ACTIVITY_LOG_PROVIDER,
|
9613
|
-
useClass: AXCPActivityLogService,
|
9614
|
-
multi: true,
|
10536
|
+
name: 'username',
|
10537
|
+
title: 'Username',
|
10538
|
+
},
|
10539
|
+
{
|
10540
|
+
name: 'displayName',
|
10541
|
+
title: 'Display Name',
|
10542
|
+
},
|
10543
|
+
],
|
10544
|
+
samples: [
|
10545
|
+
{
|
10546
|
+
id: '1',
|
10547
|
+
username: 'johndoe',
|
10548
|
+
displayName: 'John Doe',
|
10549
|
+
},
|
10550
|
+
{
|
10551
|
+
id: '2',
|
10552
|
+
username: 'janesmith',
|
10553
|
+
displayName: 'Jane Smith',
|
10554
|
+
},
|
10555
|
+
],
|
10556
|
+
source: () => convertArrayToDataSource([
|
10557
|
+
{
|
10558
|
+
id: '1',
|
10559
|
+
username: 'johndoe',
|
10560
|
+
displayName: 'John Doe',
|
10561
|
+
},
|
10562
|
+
{
|
10563
|
+
id: '2',
|
10564
|
+
username: 'janesmith',
|
10565
|
+
displayName: 'Jane Smith',
|
10566
|
+
},
|
10567
|
+
{
|
10568
|
+
id: '3',
|
10569
|
+
username: 'mikeross',
|
10570
|
+
displayName: 'Mike Ross',
|
10571
|
+
},
|
10572
|
+
]),
|
9615
10573
|
},
|
9616
10574
|
{
|
9617
|
-
|
9618
|
-
|
9619
|
-
|
10575
|
+
name: 'mock.securityRoles',
|
10576
|
+
title: 'Security Roles',
|
10577
|
+
valueField: 'id',
|
10578
|
+
textField: 'title',
|
10579
|
+
columns: [
|
10580
|
+
{
|
10581
|
+
name: 'id',
|
10582
|
+
title: 'Id',
|
10583
|
+
},
|
10584
|
+
{
|
10585
|
+
name: 'title',
|
10586
|
+
title: 'Title',
|
10587
|
+
},
|
10588
|
+
],
|
10589
|
+
samples: [
|
10590
|
+
{
|
10591
|
+
id: 'admin',
|
10592
|
+
title: 'Administrator',
|
10593
|
+
},
|
10594
|
+
{
|
10595
|
+
id: 'user',
|
10596
|
+
title: 'Regular User',
|
10597
|
+
},
|
10598
|
+
],
|
10599
|
+
source: () => convertArrayToDataSource([
|
10600
|
+
{
|
10601
|
+
id: 'admin',
|
10602
|
+
title: 'Administrator',
|
10603
|
+
},
|
10604
|
+
{
|
10605
|
+
id: 'manager',
|
10606
|
+
title: 'Manager',
|
10607
|
+
},
|
10608
|
+
{
|
10609
|
+
id: 'user',
|
10610
|
+
title: 'Regular User',
|
10611
|
+
},
|
10612
|
+
]),
|
9620
10613
|
},
|
9621
|
-
]
|
10614
|
+
];
|
10615
|
+
}
|
9622
10616
|
}
|
9623
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXCCommonMockModule, decorators: [{
|
9624
|
-
type: NgModule,
|
9625
|
-
args: [{
|
9626
|
-
imports: [],
|
9627
|
-
exports: [],
|
9628
|
-
declarations: [],
|
9629
|
-
providers: [
|
9630
|
-
{
|
9631
|
-
provide: AXP_ACTIVITY_LOG_PROVIDER,
|
9632
|
-
useClass: AXCPActivityLogService,
|
9633
|
-
multi: true,
|
9634
|
-
},
|
9635
|
-
{
|
9636
|
-
provide: AXP_SEARCH_PROVIDER,
|
9637
|
-
useClass: EntitySearchProvider,
|
9638
|
-
multi: true,
|
9639
|
-
},
|
9640
|
-
],
|
9641
|
-
}]
|
9642
|
-
}] });
|
9643
10617
|
|
9644
10618
|
/**
|
9645
10619
|
* Generated bundle index. Do not edit.
|
9646
10620
|
*/
|
9647
10621
|
|
9648
|
-
export { APPLICATIONS, APPLICATIONS_MODULES, AXCAppTermDataSeeder, AXCAppVersionDataSeeder, AXCApplicationManagementMockModule, AXCApplicationTemplateDataSeeder, AXCAuthMockModule, AXCCommonMockModule, AXCContactManagementMockModule, AXCConversationMockModule, AXCDashboardManagementMockModule, AXCDataManagementMockModule, AXCDocumentManagementMockModule, AXCFOrganizationManagementMockModule, AXCFileStorageService, AXCFormTemplateManagementMockModule, AXCGlobalVariablesDataSeeder, AXCIssueManagementMockModule, AXCLogManagementMockModule, AXCMetaDataDefinitionDataSeeder, AXCMockModule, AXCNotificationManagementMockModule, AXCPlatformManagementMockModule, AXCProjectManagementMockModule, AXCReportManagementMockModule, AXCSchedulerJobDataSeeder, AXCSchedulerJobManagementMockModule, AXCTextTemplateCategoryDataSeeder, AXCTextTemplateDataSeeder, AXCTextTemplateManagementMockModule, AXCTrainingManagementMockModule, AXMAiResponderService, AXPDashboardDataSeeder, AXPDexieEntityStorageService, AXPMessageDataSeeder, AXPReportManagementDataSeeder, AXPRoomDataSeeder, CATEGORY_REPORT_MAPPING, DASHBOARDS, EDITIONS, ENTITIES, FEATURES, GLOBAL_VARIABLES, MOCKStrategy, MODULES, PERMISSIONS, PROPERTIES, REPORT_CATEGORIES, REPORT_DEFINITIONS, TEXT_TEMPLATES, TEXT_TEMPLATE_CATEGORY, generateRandomDashboard };
|
10622
|
+
export { APPLICATIONS, APPLICATIONS_MODULES, AXCAppTermDataSeeder, AXCAppVersionDataSeeder, AXCApplicationManagementMockModule, AXCApplicationTemplateDataSeeder, AXCAuthMockModule, AXCCommonMockModule, AXCContactManagementMockModule, AXCConversationMockModule, AXCDashboardManagementMockModule, AXCDataManagementMockModule, AXCDocumentManagementMockModule, AXCFOrganizationManagementMockModule, AXCFileStorageService, AXCFormTemplateManagementMockModule, AXCGlobalVariablesDataSeeder, AXCIssueManagementMockModule, AXCLogManagementMockModule, AXCMetaDataDefinitionDataSeeder, AXCMockModule, AXCNotificationManagementMockModule, AXCPlatformManagementMockModule, AXCProjectManagementMockModule, AXCReportManagementMockModule, AXCSchedulerJobDataSeeder, AXCSchedulerJobManagementMockModule, AXCSecurityManagementMockModule, AXCTextTemplateCategoryDataSeeder, AXCTextTemplateDataSeeder, AXCTextTemplateManagementMockModule, AXCTrainingManagementMockModule, AXMAiResponderService, AXPDashboardDataSeeder, AXPDexieEntityStorageService, AXPMessageDataSeeder, AXPReportManagementDataSeeder, AXPRoomDataSeeder, AXPSecurityManagementMockWidgetDataSourceProvider, AXPSecurityManagementRoleDataSeeder, AXPSecurityManagementUserDataSeeder, CATEGORY_REPORT_MAPPING, DASHBOARDS, EDITIONS, ENTITIES, FEATURES, GLOBAL_VARIABLES, MOCKStrategy, MODULES, PERMISSIONS, PROPERTIES, REPORT_CATEGORIES, REPORT_DEFINITIONS, TEXT_TEMPLATES, TEXT_TEMPLATE_CATEGORY, generateRandomDashboard };
|
9649
10623
|
//# sourceMappingURL=acorex-connectivity-mock.mjs.map
|