@idsoftsource/initial-process 4.0.2 → 4.0.4
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.
|
@@ -3425,7 +3425,7 @@ class PreviewComponent {
|
|
|
3425
3425
|
profileVisibility: false,
|
|
3426
3426
|
status: this.customProfessionYear ? RequestedStatus.InReview : RequestedStatus.SaveasDraft,
|
|
3427
3427
|
professionGroup: this.customProfessionGroup,
|
|
3428
|
-
|
|
3428
|
+
residentialCommercial: this.customProfessionType,
|
|
3429
3429
|
};
|
|
3430
3430
|
const res = await firstValueFrom(this.userProfessionService.createUserProfession([payload]));
|
|
3431
3431
|
if (res?.failed) {
|
|
@@ -3464,10 +3464,19 @@ class PreviewComponent {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
loadProfessionTypes() {
|
|
3466
3466
|
this.professionService.getProfessions({ filter: 'isActive=true', orderBy: 'professionName asc' }).subscribe({
|
|
3467
|
-
next: (res) => { this.professionTypes = res?.data || []; this.recomputeProfessionGroupAndTypeOptions(); },
|
|
3467
|
+
next: (res) => { this.professionTypes = this.mapProfessionTypes(res?.data || []); this.recomputeProfessionGroupAndTypeOptions(); },
|
|
3468
3468
|
error: () => { this.professionTypes = []; this.recomputeProfessionGroupAndTypeOptions(); }
|
|
3469
3469
|
});
|
|
3470
3470
|
}
|
|
3471
|
+
// getProfession returns the group/type under `ProfessionGroupAssignmentType`/`assignmentType`;
|
|
3472
|
+
// normalize them onto `professionGroup`/`professionAssignmentType`, the fields the table and manual rows use.
|
|
3473
|
+
mapProfessionTypes(items) {
|
|
3474
|
+
return items.map((p) => ({
|
|
3475
|
+
...p,
|
|
3476
|
+
professionGroup: p.professionGroup ?? p.ProfessionGroupAssignmentType ?? '',
|
|
3477
|
+
professionAssignmentType: p.professionAssignmentType ?? p.assignmentType ?? '',
|
|
3478
|
+
}));
|
|
3479
|
+
}
|
|
3471
3480
|
professionSearchQry = null;
|
|
3472
3481
|
isSavingProfessionsTable = false;
|
|
3473
3482
|
deletingProfessionTypeId = signal(null, ...(ngDevMode ? [{ debugName: "deletingProfessionTypeId" }] : []));
|
|
@@ -3599,7 +3608,7 @@ class PreviewComponent {
|
|
|
3599
3608
|
recomputeProfessionGroupAndTypeOptions() {
|
|
3600
3609
|
const groups = this.professionTypes.map((p) => p.professionGroup).filter((g) => !!g);
|
|
3601
3610
|
this.professionGroupOptions = Array.from(new Set(groups)).sort();
|
|
3602
|
-
const types = this.professionTypes.map((p) => p.
|
|
3611
|
+
const types = this.professionTypes.map((p) => p.professionAssignmentType).filter((t) => !!t);
|
|
3603
3612
|
this.professionTypeOptions = Array.from(new Set(types)).sort();
|
|
3604
3613
|
}
|
|
3605
3614
|
isManualProfessionType(id) {
|
|
@@ -3747,7 +3756,7 @@ class PreviewComponent {
|
|
|
3747
3756
|
professionId: profType.isManual ? null : id,
|
|
3748
3757
|
professionName: profType.professionName,
|
|
3749
3758
|
professionGroup: profType.professionGroup ?? '',
|
|
3750
|
-
|
|
3759
|
+
residentialCommercial: profType.professionAssignmentType ?? '',
|
|
3751
3760
|
notes: sel.notes ?? '',
|
|
3752
3761
|
year: sel.year ?? 0,
|
|
3753
3762
|
starRating: sel.starRating ?? 0,
|
|
@@ -3770,7 +3779,7 @@ class PreviewComponent {
|
|
|
3770
3779
|
profileVisibility: sel.profileVisibility ?? false,
|
|
3771
3780
|
status: sel.year ? RequestedStatus.InReview : RequestedStatus.SaveasDraft,
|
|
3772
3781
|
professionGroup: profType.professionGroup ?? '',
|
|
3773
|
-
|
|
3782
|
+
residentialCommercial: profType.professionAssignmentType ?? '',
|
|
3774
3783
|
};
|
|
3775
3784
|
if (!profType.isManual) {
|
|
3776
3785
|
payload.professionId = id;
|
|
@@ -7369,7 +7378,7 @@ class PreviewComponent {
|
|
|
7369
7378
|
professionId: m.professionId ?? null,
|
|
7370
7379
|
professionName: exp,
|
|
7371
7380
|
professionGroup: m.professionGroup ?? '',
|
|
7372
|
-
|
|
7381
|
+
residentialCommercial: m.professionAssignmentType ?? '',
|
|
7373
7382
|
notes: m.notes ?? "",
|
|
7374
7383
|
year: m.year ?? 0,
|
|
7375
7384
|
starRating: m.starRating ?? 0,
|
|
@@ -9268,7 +9277,7 @@ class CertificationComponent {
|
|
|
9268
9277
|
profileVisibility: false,
|
|
9269
9278
|
status: this.customProfessionYear ? RequestedStatus.InReview : RequestedStatus.SaveasDraft,
|
|
9270
9279
|
professionGroup: this.customProfessionGroup,
|
|
9271
|
-
|
|
9280
|
+
residentialCommercial: this.customProfessionType,
|
|
9272
9281
|
};
|
|
9273
9282
|
const res = await firstValueFrom(this.userProfessionService.createUserProfession([payload]));
|
|
9274
9283
|
if (res?.failed) {
|
|
@@ -10339,7 +10348,7 @@ class SkillsComponent {
|
|
|
10339
10348
|
profileVisibility: false,
|
|
10340
10349
|
status: this.customProfessionYear ? RequestedStatus.InReview : RequestedStatus.SaveasDraft,
|
|
10341
10350
|
professionGroup: this.customProfessionGroup,
|
|
10342
|
-
|
|
10351
|
+
residentialCommercial: this.customProfessionType,
|
|
10343
10352
|
};
|
|
10344
10353
|
const res = await firstValueFrom(this.userProfessionService.createUserProfession([payload]));
|
|
10345
10354
|
if (res?.failed) {
|
|
@@ -11904,7 +11913,7 @@ class ToolsComponent {
|
|
|
11904
11913
|
profileVisibility: false,
|
|
11905
11914
|
status: this.customProfessionYear ? RequestedStatus.InReview : RequestedStatus.SaveasDraft,
|
|
11906
11915
|
professionGroup: this.customProfessionGroup,
|
|
11907
|
-
|
|
11916
|
+
residentialCommercial: this.customProfessionType,
|
|
11908
11917
|
};
|
|
11909
11918
|
const res = await firstValueFrom(this.userProfessionService.createUserProfession([payload]));
|
|
11910
11919
|
if (res?.failed) {
|
|
@@ -36467,10 +36476,19 @@ class ProfessionComponent {
|
|
|
36467
36476
|
}
|
|
36468
36477
|
loadProfessionTypes() {
|
|
36469
36478
|
this.professionService.getProfessions({ filter: 'isActive=true', orderBy: 'professionName asc' }).subscribe({
|
|
36470
|
-
next: (res) => { this.professionTypes = res?.data || []; this.recomputeProfessionGroupAndTypeOptions(); },
|
|
36479
|
+
next: (res) => { this.professionTypes = this.mapProfessionTypes(res?.data || []); this.recomputeProfessionGroupAndTypeOptions(); },
|
|
36471
36480
|
error: () => { this.professionTypes = []; this.recomputeProfessionGroupAndTypeOptions(); }
|
|
36472
36481
|
});
|
|
36473
36482
|
}
|
|
36483
|
+
// getProfession returns the group/type under `ProfessionGroupAssignmentType`/`assignmentType`;
|
|
36484
|
+
// normalize them onto `professionGroup`/`professionAssignmentType`, the fields the table and manual rows use.
|
|
36485
|
+
mapProfessionTypes(items) {
|
|
36486
|
+
return items.map((p) => ({
|
|
36487
|
+
...p,
|
|
36488
|
+
professionGroup: p.professionGroup ?? p.ProfessionGroupAssignmentType ?? '',
|
|
36489
|
+
professionAssignmentType: p.professionAssignmentType ?? p.assignmentType ?? '',
|
|
36490
|
+
}));
|
|
36491
|
+
}
|
|
36474
36492
|
buildProfessionQuery(orderBy) {
|
|
36475
36493
|
return {
|
|
36476
36494
|
page: 1,
|
|
@@ -36496,7 +36514,7 @@ class ProfessionComponent {
|
|
|
36496
36514
|
recomputeProfessionGroupAndTypeOptions() {
|
|
36497
36515
|
const groups = this.professionTypes.map((p) => p.professionGroup).filter((g) => !!g);
|
|
36498
36516
|
this.professionGroupOptions = Array.from(new Set(groups)).sort();
|
|
36499
|
-
const types = this.professionTypes.map((p) => p.
|
|
36517
|
+
const types = this.professionTypes.map((p) => p.professionAssignmentType).filter((t) => !!t);
|
|
36500
36518
|
this.professionTypeOptions = Array.from(new Set(types)).sort();
|
|
36501
36519
|
}
|
|
36502
36520
|
normalizeProfessionTypeId(id) {
|
|
@@ -36765,7 +36783,7 @@ class ProfessionComponent {
|
|
|
36765
36783
|
professionId: profType.isManual ? null : id,
|
|
36766
36784
|
professionName: profType.professionName,
|
|
36767
36785
|
professionGroup: profType.professionGroup ?? '',
|
|
36768
|
-
|
|
36786
|
+
residentialCommercial: profType.professionAssignmentType ?? '',
|
|
36769
36787
|
notes: sel.notes ?? '',
|
|
36770
36788
|
year: sel.year ?? 0,
|
|
36771
36789
|
starRating: sel.starRating ?? 0,
|
|
@@ -36788,7 +36806,7 @@ class ProfessionComponent {
|
|
|
36788
36806
|
profileVisibility: sel.profileVisibility ?? false,
|
|
36789
36807
|
status: sel.year ? RequestedStatus.InReview : RequestedStatus.SaveasDraft,
|
|
36790
36808
|
professionGroup: profType.professionGroup ?? '',
|
|
36791
|
-
|
|
36809
|
+
residentialCommercial: profType.professionAssignmentType ?? '',
|
|
36792
36810
|
};
|
|
36793
36811
|
if (!profType.isManual) {
|
|
36794
36812
|
payload.professionId = id;
|