cat-qw-lib 1.0.11 → 1.0.12
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 +149 -105
- package/fesm2022/cat-qw-lib.mjs.map +1 -1
- package/lib/queue/components/queue-container/queue-container.component.d.ts +7 -1
- package/lib/queue/services/queue-business.service.d.ts +3 -2
- package/lib/queue/services/queue-filter-dropdown.service.d.ts +5 -0
- package/package.json +1 -1
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -5504,13 +5504,116 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
5504
5504
|
args: [{ providedIn: "root" }]
|
|
5505
5505
|
}], ctorParameters: () => [{ type: QueueStore }, { type: i1$1.HttpClient }, { type: AppConfigService }, { type: ListService }] });
|
|
5506
5506
|
|
|
5507
|
+
class QueueFilterDropdownService {
|
|
5508
|
+
filter = {
|
|
5509
|
+
riskRating: null,
|
|
5510
|
+
applicationType: null,
|
|
5511
|
+
purchaseType: null,
|
|
5512
|
+
taskStatus: null,
|
|
5513
|
+
financeMin: null,
|
|
5514
|
+
financeMax: null,
|
|
5515
|
+
pendingDays: null
|
|
5516
|
+
};
|
|
5517
|
+
setRiskRating(rating) {
|
|
5518
|
+
this.filter.riskRating = this.filter.riskRating === rating ? null : rating;
|
|
5519
|
+
}
|
|
5520
|
+
setApplicationType(type) {
|
|
5521
|
+
this.filter.applicationType = this.filter.applicationType === type ? null : type;
|
|
5522
|
+
}
|
|
5523
|
+
setPurchaseType(type) {
|
|
5524
|
+
this.filter.purchaseType = this.filter.purchaseType === type ? null : type;
|
|
5525
|
+
}
|
|
5526
|
+
setTaskStatus(status) {
|
|
5527
|
+
this.filter.taskStatus = this.filter.taskStatus === status ? null : status;
|
|
5528
|
+
}
|
|
5529
|
+
setFinanceMin(min) {
|
|
5530
|
+
this.filter.financeMin = min;
|
|
5531
|
+
}
|
|
5532
|
+
setFinanceMax(max) {
|
|
5533
|
+
this.filter.financeMax = max;
|
|
5534
|
+
}
|
|
5535
|
+
setPendingDays(days) {
|
|
5536
|
+
this.filter.pendingDays = days;
|
|
5537
|
+
}
|
|
5538
|
+
setAllFilters(filters) {
|
|
5539
|
+
this.filter = { ...filters };
|
|
5540
|
+
}
|
|
5541
|
+
getFilters() {
|
|
5542
|
+
return { ...this.filter };
|
|
5543
|
+
}
|
|
5544
|
+
hasFilters() {
|
|
5545
|
+
return Object.values(this.filter).some(value => value !== null);
|
|
5546
|
+
}
|
|
5547
|
+
getFilterCount() {
|
|
5548
|
+
return Object.values(this.filter).filter(value => value !== null).length;
|
|
5549
|
+
}
|
|
5550
|
+
clearAll() {
|
|
5551
|
+
this.filter = {
|
|
5552
|
+
riskRating: null,
|
|
5553
|
+
applicationType: null,
|
|
5554
|
+
purchaseType: null,
|
|
5555
|
+
taskStatus: null,
|
|
5556
|
+
financeMin: null,
|
|
5557
|
+
financeMax: null,
|
|
5558
|
+
pendingDays: null
|
|
5559
|
+
};
|
|
5560
|
+
}
|
|
5561
|
+
/**
|
|
5562
|
+
* Builds a query string for API calls based on the current filter values.
|
|
5563
|
+
* Maps UI filter values to API parameters.
|
|
5564
|
+
*/
|
|
5565
|
+
buildFilterQueryString(filters) {
|
|
5566
|
+
if (!filters || Object.keys(filters).length === 0) {
|
|
5567
|
+
return '';
|
|
5568
|
+
}
|
|
5569
|
+
const filterParams = {};
|
|
5570
|
+
// Map filter properties to API parameters
|
|
5571
|
+
if (filters.riskRating) {
|
|
5572
|
+
filterParams['risk'] = filters.riskRating; // risk=Low/Medium/High
|
|
5573
|
+
}
|
|
5574
|
+
if (filters.applicationType) {
|
|
5575
|
+
filterParams['lendingType'] = filters.applicationType; // lendingType=HPP/BTL
|
|
5576
|
+
}
|
|
5577
|
+
if (filters.purchaseType) {
|
|
5578
|
+
filterParams['purchaseType'] = filters.purchaseType; // purchaseType=Purchase/Refinance
|
|
5579
|
+
}
|
|
5580
|
+
// Add mapping for taskStatus UI values to API values
|
|
5581
|
+
const taskStatusMap = {
|
|
5582
|
+
'Not Started': 'notStarted',
|
|
5583
|
+
'In-progress': 'inProgress',
|
|
5584
|
+
'Completed': 'completed'
|
|
5585
|
+
};
|
|
5586
|
+
if (filters.taskStatus) {
|
|
5587
|
+
filterParams['taskStatus'] = taskStatusMap[filters.taskStatus] || filters.taskStatus;
|
|
5588
|
+
}
|
|
5589
|
+
if (filters.financeMin !== null && filters.financeMin !== undefined) {
|
|
5590
|
+
filterParams['minFinanace'] = filters.financeMin.toString(); // minFinanace=50000
|
|
5591
|
+
}
|
|
5592
|
+
if (filters.financeMax !== null && filters.financeMax !== undefined) {
|
|
5593
|
+
filterParams['maxFinanace'] = filters.financeMax.toString(); // maxFinanace=50000
|
|
5594
|
+
}
|
|
5595
|
+
if (filters.pendingDays !== null && filters.pendingDays !== undefined) {
|
|
5596
|
+
filterParams['pendingDays'] = filters.pendingDays.toString(); // pendingDays=120
|
|
5597
|
+
}
|
|
5598
|
+
return new URLSearchParams(filterParams).toString();
|
|
5599
|
+
}
|
|
5600
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueFilterDropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5601
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueFilterDropdownService, providedIn: 'root' });
|
|
5602
|
+
}
|
|
5603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueFilterDropdownService, decorators: [{
|
|
5604
|
+
type: Injectable,
|
|
5605
|
+
args: [{ providedIn: 'root' }]
|
|
5606
|
+
}] });
|
|
5607
|
+
|
|
5507
5608
|
class QueueBusinessService {
|
|
5508
5609
|
router;
|
|
5509
5610
|
sessionService;
|
|
5611
|
+
queueFilterDropdownService;
|
|
5510
5612
|
destroy$ = new Subject();
|
|
5511
|
-
constructor(router, sessionService) {
|
|
5613
|
+
constructor(router, sessionService, queueFilterDropdownService) {
|
|
5512
5614
|
this.router = router;
|
|
5513
5615
|
this.sessionService = sessionService;
|
|
5616
|
+
this.queueFilterDropdownService = queueFilterDropdownService;
|
|
5514
5617
|
}
|
|
5515
5618
|
filterQueuesByStatus(queues, status) {
|
|
5516
5619
|
if (!queues)
|
|
@@ -5559,35 +5662,6 @@ class QueueBusinessService {
|
|
|
5559
5662
|
const filteredQueryParams = Object.fromEntries(Object.entries(queryParams).filter(([_, value]) => value));
|
|
5560
5663
|
return new URLSearchParams(filteredQueryParams).toString();
|
|
5561
5664
|
}
|
|
5562
|
-
buildFilterQueryString(filters) {
|
|
5563
|
-
if (!filters || Object.keys(filters).length === 0) {
|
|
5564
|
-
return '';
|
|
5565
|
-
}
|
|
5566
|
-
const filterParams = {};
|
|
5567
|
-
// Map filter properties to API parameters
|
|
5568
|
-
if (filters['riskRating']) {
|
|
5569
|
-
filterParams['risk'] = filters['riskRating']; // risk=Low/Medium/High
|
|
5570
|
-
}
|
|
5571
|
-
if (filters['applicationType']) {
|
|
5572
|
-
filterParams['lendingType'] = filters['applicationType']; // lendingType=HPP/BTL
|
|
5573
|
-
}
|
|
5574
|
-
if (filters['purchaseType']) {
|
|
5575
|
-
filterParams['purchaseType'] = filters['purchaseType']; // purchaseType=Purchase/Refinance
|
|
5576
|
-
}
|
|
5577
|
-
if (filters['taskStatus']) {
|
|
5578
|
-
filterParams['taskStatus'] = filters['taskStatus'];
|
|
5579
|
-
}
|
|
5580
|
-
if (filters['financeMin']) {
|
|
5581
|
-
filterParams['minFinanace'] = filters['financeMin'].toString(); // minFinanace=50000
|
|
5582
|
-
}
|
|
5583
|
-
if (filters['financeMax']) {
|
|
5584
|
-
filterParams['maxFinanace'] = filters['financeMax'].toString(); // maxFinanace=50000
|
|
5585
|
-
}
|
|
5586
|
-
if (filters['pendingDays']) {
|
|
5587
|
-
filterParams['pendingDays'] = filters['pendingDays'].toString(); // pendingDays=120
|
|
5588
|
-
}
|
|
5589
|
-
return new URLSearchParams(filterParams).toString();
|
|
5590
|
-
}
|
|
5591
5665
|
calculatePagination(event) {
|
|
5592
5666
|
return {
|
|
5593
5667
|
page: (event.first / event.rows) + 1,
|
|
@@ -5607,7 +5681,7 @@ class QueueBusinessService {
|
|
|
5607
5681
|
this.destroy$.next();
|
|
5608
5682
|
this.destroy$.complete();
|
|
5609
5683
|
}
|
|
5610
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueBusinessService, deps: [{ token: i3$4.Router }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5684
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueBusinessService, deps: [{ token: i3$4.Router }, { token: SessionService }, { token: QueueFilterDropdownService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5611
5685
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueBusinessService, providedIn: 'root' });
|
|
5612
5686
|
}
|
|
5613
5687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueBusinessService, decorators: [{
|
|
@@ -5615,7 +5689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
5615
5689
|
args: [{
|
|
5616
5690
|
providedIn: 'root'
|
|
5617
5691
|
}]
|
|
5618
|
-
}], ctorParameters: () => [{ type: i3$4.Router }, { type: SessionService }] });
|
|
5692
|
+
}], ctorParameters: () => [{ type: i3$4.Router }, { type: SessionService }, { type: QueueFilterDropdownService }] });
|
|
5619
5693
|
|
|
5620
5694
|
class QueueRecordTableBuilderService extends TableBuilder {
|
|
5621
5695
|
buildSecondaryTable(records, headerWidths, editPermission, deletePermission) {
|
|
@@ -5735,11 +5809,11 @@ class QueueSearchComponent {
|
|
|
5735
5809
|
return !!this.searchText;
|
|
5736
5810
|
}
|
|
5737
5811
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5738
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: QueueSearchComponent, isStandalone: false, selector: "queue-search", inputs: { searchText: "searchText", placeholder: "placeholder", debounceTime: "debounceTime" }, outputs: { searchInputChanged: "searchInputChanged", searchRequested: "searchRequested", searchCleared: "searchCleared" }, ngImport: i0, template: "<div class=\"flex mt-5 xl:mt-0 xl:justify-content-between align-items-center\" style=\"border: 1px solid #e0e4ea; border-radius: 8px; height: 44px;\">\r\n <div class=\"p-field m-0 p-0 w-full bg-white border-round\" >\r\n <div class=\"p-inputgroup border-round bg-white\" style=\"height: 100%;\">\r\n <span class=\"p-inputgroup-addon bg-white\" style=\"height: 100%; display: flex; align-items: center;\">\r\n <i class=\"pi pi-search\"></i>\r\n </span>\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchText\" \r\n class=\"border-none p-0 border-noround-right bg-white w-full outline-none\" \r\n style=\"height: 100%; border-radius: 8px;\" \r\n pInputText \r\n [placeholder]=\"placeholder\" \r\n (input)=\"onSearchInputChange()\"\r\n (keydown.enter)=\"onSearch()\" \r\n />\r\n <button \r\n *ngIf=\"hasSearchText\" \r\n type=\"button\" \r\n class=\"p-inputgroup-addon bg-white border-none cursor-pointer\" \r\n (click)=\"onClearSearch()\"\r\n pButton \r\n icon=\"pi pi-times\"\r\n [text]=\"true\"\r\n style=\"height: 100%; display: flex; align-items: center; border-radius: 8px;\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".p-inputgroup{width:100%}.bg-primary{background-color:#d9d9d9}::ng-deep .left-arrow-dropdown .p-dropdown{direction:rtl;width:100%;height:44px;border-top-left-radius:0;border-bottom-left-radius:0}::ng-deep .left-arrow-dropdown .p-dropdown-label{display:flex;align-items:center}.h-44{height:44px}@media screen and (min-width: 1200px){.vh-100{height:calc(100vh - 170px)}}.bg-while{background-color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5812
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: QueueSearchComponent, isStandalone: false, selector: "queue-search", inputs: { searchText: "searchText", placeholder: "placeholder", debounceTime: "debounceTime" }, outputs: { searchInputChanged: "searchInputChanged", searchRequested: "searchRequested", searchCleared: "searchCleared" }, ngImport: i0, template: "<div class=\"flex mt-5 xl:mt-0 xl:justify-content-between align-items-center bg-white\" style=\"border: 1px solid #e0e4ea; border-radius: 8px; height: 44px;\">\r\n <div class=\"p-field m-0 p-0 w-full bg-white border-round\" >\r\n <div class=\"p-inputgroup border-round bg-white\" style=\"height: 100%;\">\r\n <span class=\"p-inputgroup-addon bg-white\" style=\"height: 100%; display: flex; align-items: center;\">\r\n <i class=\"pi pi-search\"></i>\r\n </span>\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchText\" \r\n class=\"border-none p-0 border-noround-right bg-white w-full outline-none\" \r\n style=\"height: 100%; border-radius: 8px;\" \r\n pInputText \r\n [placeholder]=\"placeholder\" \r\n (input)=\"onSearchInputChange()\"\r\n (keydown.enter)=\"onSearch()\" \r\n />\r\n <button \r\n *ngIf=\"hasSearchText\" \r\n type=\"button\" \r\n class=\"p-inputgroup-addon bg-white border-none cursor-pointer\" \r\n (click)=\"onClearSearch()\"\r\n pButton \r\n icon=\"pi pi-times\"\r\n [text]=\"true\"\r\n style=\"height: 100%; display: flex; align-items: center; border-radius: 8px;\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".p-inputgroup{width:100%;display:flex;align-items:center;height:44px}.p-inputgroup-addon{display:flex;align-items:center;height:100%}input[type=text],input.p-inputtext{height:100%;display:flex;align-items:center;padding-top:0;padding-bottom:0;box-sizing:border-box}button.p-inputgroup-addon{display:flex;align-items:center;height:100%}.bg-primary{background-color:#d9d9d9}::ng-deep .left-arrow-dropdown .p-dropdown{direction:rtl;width:100%;height:44px;border-top-left-radius:0;border-bottom-left-radius:0}::ng-deep .left-arrow-dropdown .p-dropdown-label{display:flex;align-items:center}.h-44{height:44px}@media screen and (min-width: 1200px){.vh-100{height:calc(100vh - 170px)}}.bg-while{background-color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5739
5813
|
}
|
|
5740
5814
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueSearchComponent, decorators: [{
|
|
5741
5815
|
type: Component,
|
|
5742
|
-
args: [{ selector: 'queue-search', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex mt-5 xl:mt-0 xl:justify-content-between align-items-center\" style=\"border: 1px solid #e0e4ea; border-radius: 8px; height: 44px;\">\r\n <div class=\"p-field m-0 p-0 w-full bg-white border-round\" >\r\n <div class=\"p-inputgroup border-round bg-white\" style=\"height: 100%;\">\r\n <span class=\"p-inputgroup-addon bg-white\" style=\"height: 100%; display: flex; align-items: center;\">\r\n <i class=\"pi pi-search\"></i>\r\n </span>\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchText\" \r\n class=\"border-none p-0 border-noround-right bg-white w-full outline-none\" \r\n style=\"height: 100%; border-radius: 8px;\" \r\n pInputText \r\n [placeholder]=\"placeholder\" \r\n (input)=\"onSearchInputChange()\"\r\n (keydown.enter)=\"onSearch()\" \r\n />\r\n <button \r\n *ngIf=\"hasSearchText\" \r\n type=\"button\" \r\n class=\"p-inputgroup-addon bg-white border-none cursor-pointer\" \r\n (click)=\"onClearSearch()\"\r\n pButton \r\n icon=\"pi pi-times\"\r\n [text]=\"true\"\r\n style=\"height: 100%; display: flex; align-items: center; border-radius: 8px;\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".p-inputgroup{width:100%}.bg-primary{background-color:#d9d9d9}::ng-deep .left-arrow-dropdown .p-dropdown{direction:rtl;width:100%;height:44px;border-top-left-radius:0;border-bottom-left-radius:0}::ng-deep .left-arrow-dropdown .p-dropdown-label{display:flex;align-items:center}.h-44{height:44px}@media screen and (min-width: 1200px){.vh-100{height:calc(100vh - 170px)}}.bg-while{background-color:#fff}\n"] }]
|
|
5816
|
+
args: [{ selector: 'queue-search', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex mt-5 xl:mt-0 xl:justify-content-between align-items-center bg-white\" style=\"border: 1px solid #e0e4ea; border-radius: 8px; height: 44px;\">\r\n <div class=\"p-field m-0 p-0 w-full bg-white border-round\" >\r\n <div class=\"p-inputgroup border-round bg-white\" style=\"height: 100%;\">\r\n <span class=\"p-inputgroup-addon bg-white\" style=\"height: 100%; display: flex; align-items: center;\">\r\n <i class=\"pi pi-search\"></i>\r\n </span>\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchText\" \r\n class=\"border-none p-0 border-noround-right bg-white w-full outline-none\" \r\n style=\"height: 100%; border-radius: 8px;\" \r\n pInputText \r\n [placeholder]=\"placeholder\" \r\n (input)=\"onSearchInputChange()\"\r\n (keydown.enter)=\"onSearch()\" \r\n />\r\n <button \r\n *ngIf=\"hasSearchText\" \r\n type=\"button\" \r\n class=\"p-inputgroup-addon bg-white border-none cursor-pointer\" \r\n (click)=\"onClearSearch()\"\r\n pButton \r\n icon=\"pi pi-times\"\r\n [text]=\"true\"\r\n style=\"height: 100%; display: flex; align-items: center; border-radius: 8px;\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".p-inputgroup{width:100%;display:flex;align-items:center;height:44px}.p-inputgroup-addon{display:flex;align-items:center;height:100%}input[type=text],input.p-inputtext{height:100%;display:flex;align-items:center;padding-top:0;padding-bottom:0;box-sizing:border-box}button.p-inputgroup-addon{display:flex;align-items:center;height:100%}.bg-primary{background-color:#d9d9d9}::ng-deep .left-arrow-dropdown .p-dropdown{direction:rtl;width:100%;height:44px;border-top-left-radius:0;border-bottom-left-radius:0}::ng-deep .left-arrow-dropdown .p-dropdown-label{display:flex;align-items:center}.h-44{height:44px}@media screen and (min-width: 1200px){.vh-100{height:calc(100vh - 170px)}}.bg-while{background-color:#fff}\n"] }]
|
|
5743
5817
|
}], propDecorators: { searchText: [{
|
|
5744
5818
|
type: Input
|
|
5745
5819
|
}], placeholder: [{
|
|
@@ -5911,68 +5985,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
5911
5985
|
type: Output
|
|
5912
5986
|
}] } });
|
|
5913
5987
|
|
|
5914
|
-
class QueueFilterDropdownService {
|
|
5915
|
-
filter = {
|
|
5916
|
-
riskRating: null,
|
|
5917
|
-
applicationType: null,
|
|
5918
|
-
purchaseType: null,
|
|
5919
|
-
taskStatus: null,
|
|
5920
|
-
financeMin: null,
|
|
5921
|
-
financeMax: null,
|
|
5922
|
-
pendingDays: null
|
|
5923
|
-
};
|
|
5924
|
-
setRiskRating(rating) {
|
|
5925
|
-
this.filter.riskRating = this.filter.riskRating === rating ? null : rating;
|
|
5926
|
-
}
|
|
5927
|
-
setApplicationType(type) {
|
|
5928
|
-
this.filter.applicationType = this.filter.applicationType === type ? null : type;
|
|
5929
|
-
}
|
|
5930
|
-
setPurchaseType(type) {
|
|
5931
|
-
this.filter.purchaseType = this.filter.purchaseType === type ? null : type;
|
|
5932
|
-
}
|
|
5933
|
-
setTaskStatus(status) {
|
|
5934
|
-
this.filter.taskStatus = this.filter.taskStatus === status ? null : status;
|
|
5935
|
-
}
|
|
5936
|
-
setFinanceMin(min) {
|
|
5937
|
-
this.filter.financeMin = min;
|
|
5938
|
-
}
|
|
5939
|
-
setFinanceMax(max) {
|
|
5940
|
-
this.filter.financeMax = max;
|
|
5941
|
-
}
|
|
5942
|
-
setPendingDays(days) {
|
|
5943
|
-
this.filter.pendingDays = days;
|
|
5944
|
-
}
|
|
5945
|
-
setAllFilters(filters) {
|
|
5946
|
-
this.filter = { ...filters };
|
|
5947
|
-
}
|
|
5948
|
-
getFilters() {
|
|
5949
|
-
return { ...this.filter };
|
|
5950
|
-
}
|
|
5951
|
-
hasFilters() {
|
|
5952
|
-
return Object.values(this.filter).some(value => value !== null);
|
|
5953
|
-
}
|
|
5954
|
-
getFilterCount() {
|
|
5955
|
-
return Object.values(this.filter).filter(value => value !== null).length;
|
|
5956
|
-
}
|
|
5957
|
-
clearAll() {
|
|
5958
|
-
this.filter = {
|
|
5959
|
-
riskRating: null,
|
|
5960
|
-
applicationType: null,
|
|
5961
|
-
purchaseType: null,
|
|
5962
|
-
taskStatus: null,
|
|
5963
|
-
financeMin: null,
|
|
5964
|
-
financeMax: null,
|
|
5965
|
-
pendingDays: null
|
|
5966
|
-
};
|
|
5967
|
-
}
|
|
5968
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueFilterDropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5969
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueFilterDropdownService, providedIn: 'root' });
|
|
5970
|
-
}
|
|
5971
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueFilterDropdownService, decorators: [{
|
|
5972
|
-
type: Injectable,
|
|
5973
|
-
args: [{ providedIn: 'root' }]
|
|
5974
|
-
}] });
|
|
5975
|
-
|
|
5976
5988
|
class QueueFilterDropdownComponent {
|
|
5977
5989
|
filterService;
|
|
5978
5990
|
showDropdown = false;
|
|
@@ -6107,6 +6119,7 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6107
6119
|
baseStore;
|
|
6108
6120
|
queueBusinessService;
|
|
6109
6121
|
tableBuilder;
|
|
6122
|
+
queueFilterDropdownService;
|
|
6110
6123
|
destroy$ = new Subject();
|
|
6111
6124
|
searchSubject = new Subject();
|
|
6112
6125
|
queueList = [];
|
|
@@ -6145,13 +6158,14 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6145
6158
|
assignmentDataReady = new EventEmitter();
|
|
6146
6159
|
rowClick = new EventEmitter();
|
|
6147
6160
|
selectionChange = new EventEmitter();
|
|
6148
|
-
constructor(queueStore, queueService, baseStore, queueBusinessService, tableBuilder) {
|
|
6161
|
+
constructor(queueStore, queueService, baseStore, queueBusinessService, tableBuilder, queueFilterDropdownService) {
|
|
6149
6162
|
super(queueService);
|
|
6150
6163
|
this.queueStore = queueStore;
|
|
6151
6164
|
this.queueService = queueService;
|
|
6152
6165
|
this.baseStore = baseStore;
|
|
6153
6166
|
this.queueBusinessService = queueBusinessService;
|
|
6154
6167
|
this.tableBuilder = tableBuilder;
|
|
6168
|
+
this.queueFilterDropdownService = queueFilterDropdownService;
|
|
6155
6169
|
}
|
|
6156
6170
|
ngOnInit() {
|
|
6157
6171
|
this.initializeComponent();
|
|
@@ -6267,7 +6281,7 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6267
6281
|
next: (res) => {
|
|
6268
6282
|
this.queueList = Array.isArray(res) ? res : (res.data || res);
|
|
6269
6283
|
this.baseStore.setQueueList(this.queueList);
|
|
6270
|
-
this.
|
|
6284
|
+
this.restoreOrFilterQueues();
|
|
6271
6285
|
this.loading = false;
|
|
6272
6286
|
},
|
|
6273
6287
|
error: (err) => {
|
|
@@ -6277,6 +6291,33 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6277
6291
|
}
|
|
6278
6292
|
});
|
|
6279
6293
|
}
|
|
6294
|
+
/**
|
|
6295
|
+
* Tries to restore the selected queue from sessionStorage. If not found or invalid, falls back to filterQueues (first queue).
|
|
6296
|
+
*/
|
|
6297
|
+
restoreOrFilterQueues() {
|
|
6298
|
+
const storedQueueStr = sessionStorage.getItem(SHARED.selectedQueue);
|
|
6299
|
+
let restoredQueueId = null;
|
|
6300
|
+
if (storedQueueStr) {
|
|
6301
|
+
try {
|
|
6302
|
+
const storedQueue = JSON.parse(storedQueueStr);
|
|
6303
|
+
// Check if the stored queue exists in the current queue list
|
|
6304
|
+
if (storedQueue && storedQueue._id) {
|
|
6305
|
+
const found = this.queueList.find((q) => q._id === storedQueue._id);
|
|
6306
|
+
if (found) {
|
|
6307
|
+
restoredQueueId = found._id;
|
|
6308
|
+
}
|
|
6309
|
+
}
|
|
6310
|
+
}
|
|
6311
|
+
catch (e) { }
|
|
6312
|
+
}
|
|
6313
|
+
if (restoredQueueId) {
|
|
6314
|
+
this.selectedQueueId = restoredQueueId;
|
|
6315
|
+
this.handleQueueId(restoredQueueId);
|
|
6316
|
+
}
|
|
6317
|
+
else {
|
|
6318
|
+
this.filterQueues();
|
|
6319
|
+
}
|
|
6320
|
+
}
|
|
6280
6321
|
handleQueueId(queueId) {
|
|
6281
6322
|
const newQueue = this.queueList.find((i) => i._id == queueId);
|
|
6282
6323
|
if (newQueue) {
|
|
@@ -6298,9 +6339,12 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6298
6339
|
filterQueues() {
|
|
6299
6340
|
this.filteredQueueData = this.queueBusinessService.filterQueuesByStatus(this.queueList, this.selectedStatus);
|
|
6300
6341
|
if (this.filteredQueueData.length > 0) {
|
|
6301
|
-
|
|
6302
|
-
if (this.selectedQueueId) {
|
|
6303
|
-
this.
|
|
6342
|
+
// Only select the first queue if not already set (restored)
|
|
6343
|
+
if (!this.selectedQueueId || !this.filteredQueueData.some(q => q._id === this.selectedQueueId)) {
|
|
6344
|
+
this.selectedQueueId = this.queueBusinessService.getFirstQueueId(this.filteredQueueData);
|
|
6345
|
+
if (this.selectedQueueId) {
|
|
6346
|
+
this.handleQueueId(this.selectedQueueId);
|
|
6347
|
+
}
|
|
6304
6348
|
}
|
|
6305
6349
|
}
|
|
6306
6350
|
}
|
|
@@ -6314,7 +6358,7 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6314
6358
|
// Build filter query string
|
|
6315
6359
|
let filterQueryString = this.queryString;
|
|
6316
6360
|
if (this.appliedFilters && Object.keys(this.appliedFilters).length > 0) {
|
|
6317
|
-
const filterQuery = this.
|
|
6361
|
+
const filterQuery = this.queueFilterDropdownService.buildFilterQueryString(this.appliedFilters);
|
|
6318
6362
|
// Combine existing query string with filter parameters
|
|
6319
6363
|
const existingParams = new URLSearchParams(filterQueryString);
|
|
6320
6364
|
const filterParams = new URLSearchParams(filterQuery);
|
|
@@ -6382,7 +6426,7 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6382
6426
|
}
|
|
6383
6427
|
onAssignmentComplete(event) {
|
|
6384
6428
|
if (event.success) {
|
|
6385
|
-
this.
|
|
6429
|
+
this.getQueueRecordsData();
|
|
6386
6430
|
}
|
|
6387
6431
|
this.assignmentComplete.emit(event);
|
|
6388
6432
|
}
|
|
@@ -6392,13 +6436,13 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6392
6436
|
isAssignButtonEnabled() {
|
|
6393
6437
|
return this.selectedRows && this.selectedRows.length > 0;
|
|
6394
6438
|
}
|
|
6395
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueContainerComponent, deps: [{ token: QueueStore }, { token: QueueService }, { token: BaseStore }, { token: QueueBusinessService }, { token: QueueRecordTableBuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6439
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueContainerComponent, deps: [{ token: QueueStore }, { token: QueueService }, { token: BaseStore }, { token: QueueBusinessService }, { token: QueueRecordTableBuilderService }, { token: QueueFilterDropdownService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6396
6440
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: QueueContainerComponent, isStandalone: false, selector: "lib-queue-container", inputs: { tableHeight: "tableHeight", placeholder: "placeholder", selectedRowsInput: "selectedRowsInput" }, outputs: { assignmentComplete: "assignmentComplete", userAssigned: "userAssigned", selectedRowsData: "selectedRowsData", assignmentDataReady: "assignmentDataReady", rowClick: "rowClick", selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "filterDropdown", first: true, predicate: ["filterDropdown"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container grid m-0 h-full\">\r\n <div class=\"col-12 xl:col-2 md:col-12 py-0 h-full\">\r\n <app-queue-list\r\n [queueData]=\"filteredQueueData\"\r\n [selectedQueueId]=\"selectedQueueId\"\r\n [selectedStatus]=\"selectedStatus\"\r\n [userRole]=\"userRole\"\r\n [showQueueDataForm]=\"true\"\r\n (queueSelected)=\"onQueueSelected($event)\"\r\n (statusChanged)=\"onStatusChanged($event)\"\r\n (insertQueueRequested)=\"onInsertQueueRequested()\"\r\n ></app-queue-list>\r\n </div>\r\n <div class=\"col-12 xl:col-10 md:col-12 py-0 h-full\">\r\n \r\n @if(selectedQueue){\r\n <div class=\"flex justify-content-between align-items-center mb-3\">\r\n <div class=\"col-8 p-0 flex align-items-center \" >\r\n <div class=\"col-6 p-0 mr-3\">\r\n <queue-search \r\n [placeholder]=\"placeholder\"\r\n [searchText]=\"searchText\"\r\n (searchInputChanged)=\"onSearchInputChanged($event)\"\r\n (searchRequested)=\"onSearchRequested($event)\"\r\n (searchCleared)=\"onSearchCleared()\">\r\n </queue-search>\r\n </div>\r\n <div>\r\n <lib-queue-filter-dropdown \r\n #filterDropdown\r\n [appliedFilters]=\"appliedFilters\"\r\n (filterApplied)=\"onFilterDropdownApplied($event)\"\r\n (filtersCleared)=\"onFiltersCleared()\">\r\n </lib-queue-filter-dropdown>\r\n </div>\r\n <div>\r\n <button \r\n class=\"clear-filters-btn\"\r\n type=\"button\"\r\n (click)=\"onClearAllFilters()\">\r\n Clear <i class=\"pi pi-times ml-2\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n \r\n <div class=\"d-flex align-items-center gap-3 justify-content-end\">\r\n <ng-content select=\"[user-dropdown]\"></ng-content>\r\n </div>\r\n </div>\r\n\r\n <div class=\"animation-duration-500 associated-list h-full card mb-0 p-0\">\r\n <app-queue-record-table\r\n [table]=\"table\"\r\n [metaData]=\"metaData\"\r\n [loading]=\"loading\"\r\n [selectedRows]=\"selectedRows\"\r\n (selectionChange)=\"onTableSelectionChange($event)\"\r\n (selectedRowsData)=\"onTableSelectionChange($event)\"\r\n (assignmentDataReady)=\"onAssignmentDataReady($event)\"\r\n (rowClick)=\"onTableRowClick($event)\"\r\n (paginationChanged)=\"onPaginationChanged($event)\"\r\n (filterApplied)=\"onFilterApplied($event)\"\r\n (sortApplied)=\"onSortApplied($event)\">\r\n </app-queue-record-table>\r\n </div>\r\n\r\n }\r\n </div>\r\n\r\n </div>", styles: [".custom-scroll{overflow-y:hidden}.custom-scroll:hover{overflow-y:auto}.clear-filters-btn{background:none;border:none;color:#2196f3;font-size:1.1rem;cursor:pointer;margin-left:.5rem;display:inline-flex;align-items:center;padding:0}.clear-filters-btn .clear-x{font-size:1.2rem;margin-left:.2rem;line-height:1}\n"], dependencies: [{ kind: "component", type: QueueSearchComponent, selector: "queue-search", inputs: ["searchText", "placeholder", "debounceTime"], outputs: ["searchInputChanged", "searchRequested", "searchCleared"] }, { kind: "component", type: QueueListComponent, selector: "app-queue-list", inputs: ["queueData", "selectedQueueId", "selectedStatus", "userRole", "showQueueDataForm"], outputs: ["queueSelected", "statusChanged", "insertQueueRequested"] }, { kind: "component", type: QueueRecordTableComponent, selector: "app-queue-record-table", inputs: ["table", "metaData", "loading", "selectedRows", "tableHeight"], outputs: ["selectionChange", "selectedRowsData", "assignmentDataReady", "rowClick", "paginationChanged", "filterApplied", "sortApplied"] }, { kind: "component", type: QueueFilterDropdownComponent, selector: "lib-queue-filter-dropdown", inputs: ["appliedFilters"], outputs: ["filterApplied", "filtersCleared"] }] });
|
|
6397
6441
|
}
|
|
6398
6442
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueContainerComponent, decorators: [{
|
|
6399
6443
|
type: Component,
|
|
6400
6444
|
args: [{ selector: 'lib-queue-container', standalone: false, template: "<div class=\"container grid m-0 h-full\">\r\n <div class=\"col-12 xl:col-2 md:col-12 py-0 h-full\">\r\n <app-queue-list\r\n [queueData]=\"filteredQueueData\"\r\n [selectedQueueId]=\"selectedQueueId\"\r\n [selectedStatus]=\"selectedStatus\"\r\n [userRole]=\"userRole\"\r\n [showQueueDataForm]=\"true\"\r\n (queueSelected)=\"onQueueSelected($event)\"\r\n (statusChanged)=\"onStatusChanged($event)\"\r\n (insertQueueRequested)=\"onInsertQueueRequested()\"\r\n ></app-queue-list>\r\n </div>\r\n <div class=\"col-12 xl:col-10 md:col-12 py-0 h-full\">\r\n \r\n @if(selectedQueue){\r\n <div class=\"flex justify-content-between align-items-center mb-3\">\r\n <div class=\"col-8 p-0 flex align-items-center \" >\r\n <div class=\"col-6 p-0 mr-3\">\r\n <queue-search \r\n [placeholder]=\"placeholder\"\r\n [searchText]=\"searchText\"\r\n (searchInputChanged)=\"onSearchInputChanged($event)\"\r\n (searchRequested)=\"onSearchRequested($event)\"\r\n (searchCleared)=\"onSearchCleared()\">\r\n </queue-search>\r\n </div>\r\n <div>\r\n <lib-queue-filter-dropdown \r\n #filterDropdown\r\n [appliedFilters]=\"appliedFilters\"\r\n (filterApplied)=\"onFilterDropdownApplied($event)\"\r\n (filtersCleared)=\"onFiltersCleared()\">\r\n </lib-queue-filter-dropdown>\r\n </div>\r\n <div>\r\n <button \r\n class=\"clear-filters-btn\"\r\n type=\"button\"\r\n (click)=\"onClearAllFilters()\">\r\n Clear <i class=\"pi pi-times ml-2\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n \r\n <div class=\"d-flex align-items-center gap-3 justify-content-end\">\r\n <ng-content select=\"[user-dropdown]\"></ng-content>\r\n </div>\r\n </div>\r\n\r\n <div class=\"animation-duration-500 associated-list h-full card mb-0 p-0\">\r\n <app-queue-record-table\r\n [table]=\"table\"\r\n [metaData]=\"metaData\"\r\n [loading]=\"loading\"\r\n [selectedRows]=\"selectedRows\"\r\n (selectionChange)=\"onTableSelectionChange($event)\"\r\n (selectedRowsData)=\"onTableSelectionChange($event)\"\r\n (assignmentDataReady)=\"onAssignmentDataReady($event)\"\r\n (rowClick)=\"onTableRowClick($event)\"\r\n (paginationChanged)=\"onPaginationChanged($event)\"\r\n (filterApplied)=\"onFilterApplied($event)\"\r\n (sortApplied)=\"onSortApplied($event)\">\r\n </app-queue-record-table>\r\n </div>\r\n\r\n }\r\n </div>\r\n\r\n </div>", styles: [".custom-scroll{overflow-y:hidden}.custom-scroll:hover{overflow-y:auto}.clear-filters-btn{background:none;border:none;color:#2196f3;font-size:1.1rem;cursor:pointer;margin-left:.5rem;display:inline-flex;align-items:center;padding:0}.clear-filters-btn .clear-x{font-size:1.2rem;margin-left:.2rem;line-height:1}\n"] }]
|
|
6401
|
-
}], ctorParameters: () => [{ type: QueueStore }, { type: QueueService }, { type: BaseStore }, { type: QueueBusinessService }, { type: QueueRecordTableBuilderService }], propDecorators: { tableHeight: [{
|
|
6445
|
+
}], ctorParameters: () => [{ type: QueueStore }, { type: QueueService }, { type: BaseStore }, { type: QueueBusinessService }, { type: QueueRecordTableBuilderService }, { type: QueueFilterDropdownService }], propDecorators: { tableHeight: [{
|
|
6402
6446
|
type: Input
|
|
6403
6447
|
}], placeholder: [{
|
|
6404
6448
|
type: Input
|