cat-qw-lib 2.5.21 → 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
|
}
|
|
@@ -7269,7 +7281,7 @@ class QueueFilterDropdownComponent {
|
|
|
7269
7281
|
return this.filterService.getUnderwritersList(searchKey || SHARED.EMPTY);
|
|
7270
7282
|
})).subscribe((underwriters) => {
|
|
7271
7283
|
// Add "Unassigned" option at the beginning of the list
|
|
7272
|
-
const unassignedOption = { id:
|
|
7284
|
+
const unassignedOption = { id: UNASSIGNED_UNDERWRITER_ID, name: 'Unassigned' };
|
|
7273
7285
|
this.underwriterOptions = [unassignedOption, ...underwriters];
|
|
7274
7286
|
this.loadingUnderwriters = false;
|
|
7275
7287
|
});
|
|
@@ -7287,9 +7299,7 @@ class QueueFilterDropdownComponent {
|
|
|
7287
7299
|
// Store current state when opening dropdown (this will be the applied filters)
|
|
7288
7300
|
this.originalFilters = this.filterService.getFilters();
|
|
7289
7301
|
// Load initial underwriter list when opening dropdown
|
|
7290
|
-
|
|
7291
|
-
this.loadInitialUnderwriters();
|
|
7292
|
-
}
|
|
7302
|
+
this.loadInitialUnderwriters();
|
|
7293
7303
|
}
|
|
7294
7304
|
this.showDropdown = !this.showDropdown;
|
|
7295
7305
|
this.skipNextDocumentClick = true;
|