cat-qw-lib 2.5.23 → 2.5.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -7283,9 +7283,14 @@ class QueueFilterDropdownComponent {
|
|
|
7283
7283
|
this.searchSubscription = this.searchSubject.pipe(debounceTime$1(300), distinctUntilChanged$1(), switchMap((searchKey) => {
|
|
7284
7284
|
return this.filterService.getUnderwritersList(searchKey || SHARED.EMPTY);
|
|
7285
7285
|
})).subscribe((underwriters) => {
|
|
7286
|
-
//
|
|
7287
|
-
const unassignedOption =
|
|
7288
|
-
|
|
7286
|
+
// Update options for search/filter - preserve "Unassigned" option if it exists
|
|
7287
|
+
const unassignedOption = this.underwriterOptions.find(opt => opt.id === UNASSIGNED_UNDERWRITER_ID);
|
|
7288
|
+
if (unassignedOption) {
|
|
7289
|
+
this.underwriterOptions = [unassignedOption, ...underwriters];
|
|
7290
|
+
}
|
|
7291
|
+
else {
|
|
7292
|
+
this.underwriterOptions = underwriters;
|
|
7293
|
+
}
|
|
7289
7294
|
this.loadingUnderwriters = false;
|
|
7290
7295
|
});
|
|
7291
7296
|
}
|
|
@@ -7303,7 +7308,7 @@ class QueueFilterDropdownComponent {
|
|
|
7303
7308
|
this.originalFilters = this.filterService.getFilters();
|
|
7304
7309
|
// Reset loading state and reload underwriter list every time dropdown opens
|
|
7305
7310
|
this.loadingUnderwriters = false;
|
|
7306
|
-
this.
|
|
7311
|
+
this.loadUnderwriterOptions();
|
|
7307
7312
|
}
|
|
7308
7313
|
else {
|
|
7309
7314
|
// Reset loading state when closing dropdown
|
|
@@ -7313,9 +7318,14 @@ class QueueFilterDropdownComponent {
|
|
|
7313
7318
|
this.skipNextDocumentClick = true;
|
|
7314
7319
|
this.filters = this.filterService.getFilters();
|
|
7315
7320
|
}
|
|
7316
|
-
|
|
7321
|
+
loadUnderwriterOptions() {
|
|
7317
7322
|
this.loadingUnderwriters = true;
|
|
7318
|
-
this.
|
|
7323
|
+
this.filterService.getUnderwritersList(SHARED.EMPTY).subscribe((underwriters) => {
|
|
7324
|
+
// Add "Unassigned" option at the beginning of the list
|
|
7325
|
+
const unassignedOption = { id: UNASSIGNED_UNDERWRITER_ID, name: 'Unassigned' };
|
|
7326
|
+
this.underwriterOptions = [unassignedOption, ...underwriters];
|
|
7327
|
+
this.loadingUnderwriters = false;
|
|
7328
|
+
});
|
|
7319
7329
|
}
|
|
7320
7330
|
setRiskRating(rating) {
|
|
7321
7331
|
this.filterService.setRiskRating(rating);
|
|
@@ -7383,7 +7393,7 @@ class QueueFilterDropdownComponent {
|
|
|
7383
7393
|
this.originalFilters = null; // Clear originalFilters to prevent restoring old filters
|
|
7384
7394
|
this.filters = this.filterService.getFilters();
|
|
7385
7395
|
// Reload underwriter options when clearing
|
|
7386
|
-
this.
|
|
7396
|
+
this.loadUnderwriterOptions();
|
|
7387
7397
|
}
|
|
7388
7398
|
// Method to sync with container's applied filters
|
|
7389
7399
|
syncWithAppliedFilters(appliedFilters) {
|