@idsoftsource/initial-process 4.1.8 → 4.2.1
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.
|
@@ -2947,10 +2947,8 @@ class UserDocumentService {
|
|
|
2947
2947
|
}
|
|
2948
2948
|
getDocumentTypes(maintype, _providerId, searchText = '', professionId = null) {
|
|
2949
2949
|
let params = new HttpParams()
|
|
2950
|
-
.set('IsActive', true)
|
|
2951
|
-
|
|
2952
|
-
params = params.append('MainType', mt);
|
|
2953
|
-
});
|
|
2950
|
+
.set('IsActive', true)
|
|
2951
|
+
.set('MainType', JSON.stringify(maintype));
|
|
2954
2952
|
if (searchText.trim()) {
|
|
2955
2953
|
params = params.set('Name', `${searchText.trim()}`);
|
|
2956
2954
|
}
|
|
@@ -9184,7 +9182,6 @@ class CertificationComponent {
|
|
|
9184
9182
|
showSuccess = signal(false, ...(ngDevMode ? [{ debugName: "showSuccess" }] : []));
|
|
9185
9183
|
deletingIndex = signal(null, ...(ngDevMode ? [{ debugName: "deletingIndex" }] : []));
|
|
9186
9184
|
manualTypeError = '';
|
|
9187
|
-
suppressNextSearch = false;
|
|
9188
9185
|
showpreview = computed(() => {
|
|
9189
9186
|
return this.workStore.experiences().length > 0 && !this.isEditing();
|
|
9190
9187
|
}, ...(ngDevMode ? [{ debugName: "showpreview" }] : []));
|
|
@@ -9243,13 +9240,7 @@ class CertificationComponent {
|
|
|
9243
9240
|
});
|
|
9244
9241
|
this.searchControl.valueChanges
|
|
9245
9242
|
.pipe(debounceTime(300), distinctUntilChanged())
|
|
9246
|
-
.subscribe(value =>
|
|
9247
|
-
if (this.suppressNextSearch) {
|
|
9248
|
-
this.suppressNextSearch = false;
|
|
9249
|
-
return;
|
|
9250
|
-
}
|
|
9251
|
-
this.loadDocumentTypes(value || '');
|
|
9252
|
-
});
|
|
9243
|
+
.subscribe(value => this.loadDocumentTypes(value || ''));
|
|
9253
9244
|
this.user = this.userService.getUserDetails();
|
|
9254
9245
|
await loadProfile();
|
|
9255
9246
|
const saved = profileSignal();
|
|
@@ -9392,16 +9383,16 @@ class CertificationComponent {
|
|
|
9392
9383
|
}
|
|
9393
9384
|
loadDocumentTypes(searchText = '') {
|
|
9394
9385
|
this.userDocumentService
|
|
9395
|
-
.getDocumentTypes(
|
|
9386
|
+
.getDocumentTypes(2, this.providerId, searchText, this.selectedProfessionId)
|
|
9396
9387
|
.subscribe(res => {
|
|
9397
|
-
this.documentTypes = res?.data || [];
|
|
9388
|
+
this.documentTypes = this.withSelectedManualType(res?.data || []);
|
|
9398
9389
|
});
|
|
9399
9390
|
}
|
|
9400
9391
|
loadDocumentTypesDefault(searchText = '') {
|
|
9401
9392
|
this.userDocumentService
|
|
9402
|
-
.getDocumentTypes(
|
|
9393
|
+
.getDocumentTypes(2, this.providerId, searchText, this.selectedProfessionId)
|
|
9403
9394
|
.subscribe(res => {
|
|
9404
|
-
this.documentTypes = res?.data || [];
|
|
9395
|
+
this.documentTypes = this.withSelectedManualType(res?.data || []);
|
|
9405
9396
|
});
|
|
9406
9397
|
}
|
|
9407
9398
|
isChecked(id) {
|
|
@@ -9804,8 +9795,14 @@ class CertificationComponent {
|
|
|
9804
9795
|
this.selectedDocumentId = tempId;
|
|
9805
9796
|
this.selectedDocumentName = name;
|
|
9806
9797
|
this.certificateForm.patchValue({ documentTypeId: tempId, documentTypeName: name });
|
|
9807
|
-
this.
|
|
9808
|
-
|
|
9798
|
+
this.searchControl.setValue('');
|
|
9799
|
+
}
|
|
9800
|
+
// A manually added type only exists client-side, so keep it when a search response replaces the list.
|
|
9801
|
+
withSelectedManualType(list) {
|
|
9802
|
+
const id = this.selectedDocumentId;
|
|
9803
|
+
if (!id?.startsWith('manual-') || list.some(t => t.id === id))
|
|
9804
|
+
return list;
|
|
9805
|
+
return [{ id, documentTypeName: this.selectedDocumentName }, ...list];
|
|
9809
9806
|
}
|
|
9810
9807
|
cancelForm() {
|
|
9811
9808
|
this.isEditing.set(false);
|
|
@@ -10942,7 +10939,6 @@ class LicensesComponent {
|
|
|
10942
10939
|
showSuccess = signal(false, ...(ngDevMode ? [{ debugName: "showSuccess" }] : []));
|
|
10943
10940
|
deletingIndex = signal(null, ...(ngDevMode ? [{ debugName: "deletingIndex" }] : []));
|
|
10944
10941
|
manualTypeError = '';
|
|
10945
|
-
suppressNextSearch = false;
|
|
10946
10942
|
showpreview = computed(() => {
|
|
10947
10943
|
return this.workStore.experiences().length > 0 && !this.isEditing();
|
|
10948
10944
|
}, ...(ngDevMode ? [{ debugName: "showpreview" }] : []));
|
|
@@ -10979,13 +10975,7 @@ class LicensesComponent {
|
|
|
10979
10975
|
});
|
|
10980
10976
|
this.searchControl.valueChanges
|
|
10981
10977
|
.pipe(debounceTime(300), distinctUntilChanged())
|
|
10982
|
-
.subscribe(value =>
|
|
10983
|
-
if (this.suppressNextSearch) {
|
|
10984
|
-
this.suppressNextSearch = false;
|
|
10985
|
-
return;
|
|
10986
|
-
}
|
|
10987
|
-
this.loadDocumentTypes(value || '');
|
|
10988
|
-
});
|
|
10978
|
+
.subscribe(value => this.loadDocumentTypes(value || ''));
|
|
10989
10979
|
this.user = this.userService.getUserDetails();
|
|
10990
10980
|
await loadProfile();
|
|
10991
10981
|
const saved = profileSignal();
|
|
@@ -10997,16 +10987,16 @@ class LicensesComponent {
|
|
|
10997
10987
|
}
|
|
10998
10988
|
loadDocumentTypes(searchText = '') {
|
|
10999
10989
|
this.userDocumentService
|
|
11000
|
-
.getDocumentTypes(
|
|
10990
|
+
.getDocumentTypes(1, this.providerId, searchText)
|
|
11001
10991
|
.subscribe(res => {
|
|
11002
|
-
this.documentTypes = res?.data || [];
|
|
10992
|
+
this.documentTypes = this.withSelectedManualType(res?.data || []);
|
|
11003
10993
|
});
|
|
11004
10994
|
}
|
|
11005
10995
|
loadDocumentTypesDefault(searchText = '') {
|
|
11006
10996
|
this.userDocumentService
|
|
11007
|
-
.getDocumentTypes(
|
|
10997
|
+
.getDocumentTypes(1, this.providerId, searchText)
|
|
11008
10998
|
.subscribe(res => {
|
|
11009
|
-
this.documentTypes = res?.data || [];
|
|
10999
|
+
this.documentTypes = this.withSelectedManualType(res?.data || []);
|
|
11010
11000
|
});
|
|
11011
11001
|
}
|
|
11012
11002
|
toggleSelection(item, event) {
|
|
@@ -11381,8 +11371,14 @@ class LicensesComponent {
|
|
|
11381
11371
|
this.selectedDocumentId = tempId;
|
|
11382
11372
|
this.selectedDocumentName = name;
|
|
11383
11373
|
this.certificateForm.patchValue({ documentTypeId: tempId, documentTypeName: name });
|
|
11384
|
-
this.
|
|
11385
|
-
|
|
11374
|
+
this.searchControl.setValue('');
|
|
11375
|
+
}
|
|
11376
|
+
// A manually added type only exists client-side, so keep it when a search response replaces the list.
|
|
11377
|
+
withSelectedManualType(list) {
|
|
11378
|
+
const id = this.selectedDocumentId;
|
|
11379
|
+
if (!id?.startsWith('manual-') || list.some(t => t.id === id))
|
|
11380
|
+
return list;
|
|
11381
|
+
return [{ id, documentTypeName: this.selectedDocumentName }, ...list];
|
|
11386
11382
|
}
|
|
11387
11383
|
cancelForm() {
|
|
11388
11384
|
this.isEditing.set(false);
|