cat-qw-lib 1.0.13 → 1.0.14
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
|
@@ -5809,11 +5809,11 @@ class QueueSearchComponent {
|
|
|
5809
5809
|
return !!this.searchText;
|
|
5810
5810
|
}
|
|
5811
5811
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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
|
|
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%;\" \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 });
|
|
5813
5813
|
}
|
|
5814
5814
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueSearchComponent, decorators: [{
|
|
5815
5815
|
type: Component,
|
|
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
|
|
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%;\" \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"] }]
|
|
5817
5817
|
}], propDecorators: { searchText: [{
|
|
5818
5818
|
type: Input
|
|
5819
5819
|
}], placeholder: [{
|
|
@@ -6274,14 +6274,14 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6274
6274
|
}
|
|
6275
6275
|
});
|
|
6276
6276
|
}
|
|
6277
|
-
getAllQueueList() {
|
|
6277
|
+
getAllQueueList(preferredQueueId) {
|
|
6278
6278
|
this.loading = true;
|
|
6279
6279
|
this.error = null;
|
|
6280
6280
|
this.queueService.getAllQueue().subscribe({
|
|
6281
6281
|
next: (res) => {
|
|
6282
6282
|
this.queueList = Array.isArray(res) ? res : (res.data || res);
|
|
6283
6283
|
this.baseStore.setQueueList(this.queueList);
|
|
6284
|
-
this.filterQueues();
|
|
6284
|
+
this.filterQueues(preferredQueueId);
|
|
6285
6285
|
this.loading = false;
|
|
6286
6286
|
},
|
|
6287
6287
|
error: (err) => {
|
|
@@ -6309,9 +6309,15 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6309
6309
|
console.warn(ERROR.NO_QUEUE_FOUND_WITH_ID);
|
|
6310
6310
|
}
|
|
6311
6311
|
}
|
|
6312
|
-
filterQueues() {
|
|
6312
|
+
filterQueues(preferredQueueId) {
|
|
6313
6313
|
this.filteredQueueData = this.queueBusinessService.filterQueuesByStatus(this.queueList, this.selectedStatus);
|
|
6314
|
-
|
|
6314
|
+
let queueIdToSelect = preferredQueueId;
|
|
6315
|
+
if (queueIdToSelect && this.filteredQueueData.some(q => q._id == queueIdToSelect)) {
|
|
6316
|
+
// keep the same queue if it exists
|
|
6317
|
+
this.selectedQueueId = queueIdToSelect;
|
|
6318
|
+
this.handleQueueId(this.selectedQueueId);
|
|
6319
|
+
}
|
|
6320
|
+
else if (this.filteredQueueData.length > 0) {
|
|
6315
6321
|
this.selectedQueueId = this.queueBusinessService.getFirstQueueId(this.filteredQueueData);
|
|
6316
6322
|
if (this.selectedQueueId) {
|
|
6317
6323
|
this.handleQueueId(this.selectedQueueId);
|
|
@@ -6396,7 +6402,8 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6396
6402
|
}
|
|
6397
6403
|
onAssignmentComplete(event) {
|
|
6398
6404
|
if (event.success) {
|
|
6399
|
-
|
|
6405
|
+
// Pass the current selectedQueueId to preserve selection after refresh, but ensure it's not null
|
|
6406
|
+
this.getAllQueueList(this.selectedQueueId ?? undefined);
|
|
6400
6407
|
}
|
|
6401
6408
|
this.assignmentComplete.emit(event);
|
|
6402
6409
|
}
|