cat-qw-lib 1.0.14 → 1.0.15
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
|
@@ -6168,7 +6168,8 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6168
6168
|
this.queueFilterDropdownService = queueFilterDropdownService;
|
|
6169
6169
|
}
|
|
6170
6170
|
ngOnInit() {
|
|
6171
|
-
this.
|
|
6171
|
+
const storedQueueId = this.getStoredQueueId();
|
|
6172
|
+
this.initializeComponent(storedQueueId ?? undefined);
|
|
6172
6173
|
this.setupSearchDebounce();
|
|
6173
6174
|
// Sync filter dropdown after initialization
|
|
6174
6175
|
setTimeout(() => {
|
|
@@ -6260,8 +6261,8 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6260
6261
|
this.filterDropdown.syncWithAppliedFilters(this.appliedFilters);
|
|
6261
6262
|
}
|
|
6262
6263
|
}
|
|
6263
|
-
initializeComponent() {
|
|
6264
|
-
this.getAllQueueList();
|
|
6264
|
+
initializeComponent(preferredQueueId) {
|
|
6265
|
+
this.getAllQueueList(preferredQueueId);
|
|
6265
6266
|
this.userRole = this.queueBusinessService.getUserRole();
|
|
6266
6267
|
}
|
|
6267
6268
|
setupSearchDebounce() {
|
|
@@ -6294,15 +6295,20 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6294
6295
|
handleQueueId(queueId) {
|
|
6295
6296
|
const newQueue = this.queueList.find((i) => i._id == queueId);
|
|
6296
6297
|
if (newQueue) {
|
|
6297
|
-
this.
|
|
6298
|
+
const isDifferentQueue = !this.selectedQueue || this.selectedQueue._id !== queueId;
|
|
6299
|
+
if (isDifferentQueue) {
|
|
6300
|
+
this.resetSearchState();
|
|
6301
|
+
this.clearSelection();
|
|
6302
|
+
this.clearFilters();
|
|
6303
|
+
this.resetPaginationState();
|
|
6304
|
+
}
|
|
6298
6305
|
this.selectedQueue = Object.assign({}, newQueue);
|
|
6299
6306
|
this.selectedQueueId = queueId;
|
|
6300
6307
|
this.queueBusinessService.storeSelectedQueue(queueId);
|
|
6301
6308
|
sessionStorage.setItem(SHARED.selectedQueue, JSON.stringify(this.selectedQueue));
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
this.getQueueRecordsData();
|
|
6309
|
+
if (isDifferentQueue) {
|
|
6310
|
+
this.getQueueRecordsData();
|
|
6311
|
+
}
|
|
6306
6312
|
this.syncFilterDropdown();
|
|
6307
6313
|
}
|
|
6308
6314
|
else {
|
|
@@ -6413,6 +6419,14 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
6413
6419
|
isAssignButtonEnabled() {
|
|
6414
6420
|
return this.selectedRows && this.selectedRows.length > 0;
|
|
6415
6421
|
}
|
|
6422
|
+
getStoredQueueId() {
|
|
6423
|
+
try {
|
|
6424
|
+
return localStorage.getItem(SHARED.SELECTED_QUEUE_ID);
|
|
6425
|
+
}
|
|
6426
|
+
catch (e) {
|
|
6427
|
+
return null;
|
|
6428
|
+
}
|
|
6429
|
+
}
|
|
6416
6430
|
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 });
|
|
6417
6431
|
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"] }] });
|
|
6418
6432
|
}
|