cat-qw-lib 2.5.20 → 2.5.22
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
|
@@ -2397,6 +2397,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
2397
2397
|
type: Input
|
|
2398
2398
|
}] } });
|
|
2399
2399
|
|
|
2400
|
+
// Constant for unassigned underwriter filter value
|
|
2401
|
+
const UNASSIGNED_UNDERWRITER_ID = 'unassigned';
|
|
2400
2402
|
/**
|
|
2401
2403
|
*
|
|
2402
2404
|
*/
|
|
@@ -2616,7 +2618,17 @@ class QueueFilterDropdownService extends BaseService {
|
|
|
2616
2618
|
filterParams['pendingDays'] = filters.pendingDays.toString();
|
|
2617
2619
|
}
|
|
2618
2620
|
if (filters.assignedUnderwriter && filters.assignedUnderwriter.length > 0) {
|
|
2619
|
-
|
|
2621
|
+
// Separate approach: Use unassigned boolean param and underwriterId for actual IDs
|
|
2622
|
+
const hasUnassigned = filters.assignedUnderwriter.includes(UNASSIGNED_UNDERWRITER_ID);
|
|
2623
|
+
const realUnderwriterIds = filters.assignedUnderwriter.filter(id => id !== UNASSIGNED_UNDERWRITER_ID);
|
|
2624
|
+
// Set unassigned parameter if "unassigned" is selected
|
|
2625
|
+
if (hasUnassigned) {
|
|
2626
|
+
filterParams['unassigned'] = 'true';
|
|
2627
|
+
}
|
|
2628
|
+
// Set underwriterId parameter only if there are real IDs (excluding "unassigned")
|
|
2629
|
+
if (realUnderwriterIds.length > 0) {
|
|
2630
|
+
filterParams['underwriterId'] = realUnderwriterIds.join(',');
|
|
2631
|
+
}
|
|
2620
2632
|
}
|
|
2621
2633
|
return new URLSearchParams(filterParams).toString();
|
|
2622
2634
|
}
|
|
@@ -7268,7 +7280,9 @@ class QueueFilterDropdownComponent {
|
|
|
7268
7280
|
this.searchSubscription = this.searchSubject.pipe(debounceTime$1(300), distinctUntilChanged$1(), switchMap((searchKey) => {
|
|
7269
7281
|
return this.filterService.getUnderwritersList(searchKey || SHARED.EMPTY);
|
|
7270
7282
|
})).subscribe((underwriters) => {
|
|
7271
|
-
|
|
7283
|
+
// Add "Unassigned" option at the beginning of the list
|
|
7284
|
+
const unassignedOption = { id: UNASSIGNED_UNDERWRITER_ID, name: 'Unassigned' };
|
|
7285
|
+
this.underwriterOptions = [unassignedOption, ...underwriters];
|
|
7272
7286
|
this.loadingUnderwriters = false;
|
|
7273
7287
|
});
|
|
7274
7288
|
}
|
|
@@ -7285,9 +7299,7 @@ class QueueFilterDropdownComponent {
|
|
|
7285
7299
|
// Store current state when opening dropdown (this will be the applied filters)
|
|
7286
7300
|
this.originalFilters = this.filterService.getFilters();
|
|
7287
7301
|
// Load initial underwriter list when opening dropdown
|
|
7288
|
-
|
|
7289
|
-
this.loadInitialUnderwriters();
|
|
7290
|
-
}
|
|
7302
|
+
this.loadInitialUnderwriters();
|
|
7291
7303
|
}
|
|
7292
7304
|
this.showDropdown = !this.showDropdown;
|
|
7293
7305
|
this.skipNextDocumentClick = true;
|
|
@@ -7361,6 +7373,8 @@ class QueueFilterDropdownComponent {
|
|
|
7361
7373
|
this.filtersApplied = false; // Reset the applied flag when clearing all
|
|
7362
7374
|
this.originalFilters = null; // Clear originalFilters to prevent restoring old filters
|
|
7363
7375
|
this.filters = this.filterService.getFilters();
|
|
7376
|
+
// Reload underwriter options when clearing
|
|
7377
|
+
this.loadInitialUnderwriters();
|
|
7364
7378
|
}
|
|
7365
7379
|
// Method to sync with container's applied filters
|
|
7366
7380
|
syncWithAppliedFilters(appliedFilters) {
|