cat-qw-lib 2.6.48 → 2.6.49
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
|
@@ -33,7 +33,7 @@ import * as i7 from 'primeng/messages';
|
|
|
33
33
|
import { MessagesModule } from 'primeng/messages';
|
|
34
34
|
import * as i4$2 from 'primeng/tooltip';
|
|
35
35
|
import { TooltipModule } from 'primeng/tooltip';
|
|
36
|
-
import { tap, map as map$1, catchError, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, switchMap } from 'rxjs/operators';
|
|
36
|
+
import { tap, map as map$1, catchError, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, switchMap, finalize } from 'rxjs/operators';
|
|
37
37
|
import * as i1$1 from '@angular/common/http';
|
|
38
38
|
import { HttpClientModule, HttpHeaders } from '@angular/common/http';
|
|
39
39
|
import * as i3$4 from '@angular/router';
|
|
@@ -2650,7 +2650,7 @@ class QueueFilterDropdownService extends BaseService {
|
|
|
2650
2650
|
*/
|
|
2651
2651
|
getUnderwritersList(searchKey = SHARED.EMPTY) {
|
|
2652
2652
|
const url = `${this.apiUrl}${ROUTES.GET_ALL_UNDERWRITER_TEAMLEAD}${SHARED.QUESTION_MARK}searchKey${SHARED.EQUALS}${encodeURIComponent(searchKey)}`;
|
|
2653
|
-
return this.http.get(url, { headers: { 'Authorization': 'Bearer ' + '
|
|
2653
|
+
return this.http.get(url, { headers: { 'Authorization': 'Bearer ' + '1b0ab0db-ac66-46f7-bba2-d87390aa253b' } }).pipe(map$1((response) => {
|
|
2654
2654
|
// Transform API response to match component's expected format
|
|
2655
2655
|
const underwriters = Array.isArray(response) ? response : (response?.data || []);
|
|
2656
2656
|
return underwriters.map((uw) => ({
|
|
@@ -7114,7 +7114,7 @@ class QueueService extends BaseService {
|
|
|
7114
7114
|
}
|
|
7115
7115
|
}
|
|
7116
7116
|
// Use POST method with body containing underwriterIds and unassigned
|
|
7117
|
-
return this.http.post(url, body).pipe(tap$1((response) => {
|
|
7117
|
+
return this.http.post(url, body, { headers: { 'Authorization': 'Bearer ' + '1b0ab0db-ac66-46f7-bba2-d87390aa253b' } }).pipe(tap$1((response) => {
|
|
7118
7118
|
if (useCache) {
|
|
7119
7119
|
this.recordCache.set(cacheKey, { data: response, timestamp: Date.now() });
|
|
7120
7120
|
}
|
|
@@ -7132,7 +7132,7 @@ class QueueService extends BaseService {
|
|
|
7132
7132
|
* @returns {Observable<any>} Observable emitting the fetched queue entities
|
|
7133
7133
|
*/
|
|
7134
7134
|
getAllQueue() {
|
|
7135
|
-
const headers = new HttpHeaders().set('Authorization', 'Bearer
|
|
7135
|
+
const headers = new HttpHeaders().set('Authorization', 'Bearer 1b0ab0db-ac66-46f7-bba2-d87390aa253b');
|
|
7136
7136
|
return this.http.get(this.apiUrl + this._pathName, { headers }).pipe(tap$1((entities) => { this.queueStore.set(entities); }));
|
|
7137
7137
|
}
|
|
7138
7138
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueService, deps: [{ token: QueueStore$1 }, { token: i1$1.HttpClient }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -8125,8 +8125,8 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
8125
8125
|
const { page, limit } = this.queueBusinessService.calculatePagination(event);
|
|
8126
8126
|
// Force refresh on explicit paginator navigation so returning to page 1
|
|
8127
8127
|
// (often already cached from initial load) still triggers an API call.
|
|
8128
|
-
//
|
|
8129
|
-
this.getQueueRecordsData(page, limit, true,
|
|
8128
|
+
// Show table skeleton while loading the next page (left nav stays visible).
|
|
8129
|
+
this.getQueueRecordsData(page, limit, true, false);
|
|
8130
8130
|
}
|
|
8131
8131
|
onFilterApplied(record) {
|
|
8132
8132
|
this.queryString = this.queueBusinessService.buildQueryString(record);
|
|
@@ -8214,6 +8214,7 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
8214
8214
|
error: (err) => {
|
|
8215
8215
|
this.error = ERROR.UNABLE_TO_FETCH_QUEUE_LIST;
|
|
8216
8216
|
this.queueListLoading = false;
|
|
8217
|
+
this.isShowSkeleton = false;
|
|
8217
8218
|
console.error(ERROR.UNABLE_TO_FETCH_QUEUE_LIST, err);
|
|
8218
8219
|
}
|
|
8219
8220
|
});
|
|
@@ -8234,6 +8235,7 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
8234
8235
|
}
|
|
8235
8236
|
else {
|
|
8236
8237
|
console.warn(ERROR.NO_QUEUE_FOUND_WITH_ID);
|
|
8238
|
+
this.isShowSkeleton = false;
|
|
8237
8239
|
}
|
|
8238
8240
|
}
|
|
8239
8241
|
resetSorting() {
|
|
@@ -8256,10 +8258,27 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
8256
8258
|
this.handleQueueData(this.selectedQueueId);
|
|
8257
8259
|
}
|
|
8258
8260
|
}
|
|
8261
|
+
else {
|
|
8262
|
+
this.selectedQueueId = null;
|
|
8263
|
+
this.selectedQueue = undefined;
|
|
8264
|
+
this.isShowSkeleton = false;
|
|
8265
|
+
}
|
|
8259
8266
|
}
|
|
8260
8267
|
getQueueRecordsData(page, limit, forceRefresh = false, softTransition = false) {
|
|
8261
8268
|
if (!this.selectedQueue?.apiConfig) {
|
|
8262
|
-
console.
|
|
8269
|
+
console.warn('Queue data or apiConfig not available');
|
|
8270
|
+
this.isShowSkeleton = false;
|
|
8271
|
+
if (!this.table) {
|
|
8272
|
+
this.table = this.tableBuilder.buildSecondaryTable([], undefined, undefined, undefined, {
|
|
8273
|
+
isReferredQueue: this.isReferredQueue(this.selectedQueue)
|
|
8274
|
+
});
|
|
8275
|
+
}
|
|
8276
|
+
this.metaData = {
|
|
8277
|
+
totalItems: 0,
|
|
8278
|
+
currentPage: page || this.currentPage,
|
|
8279
|
+
itemsPerPage: limit || this.currentLimit,
|
|
8280
|
+
totalPages: 0
|
|
8281
|
+
};
|
|
8263
8282
|
return;
|
|
8264
8283
|
}
|
|
8265
8284
|
const targetPage = page || this.currentPage;
|
|
@@ -8302,13 +8321,18 @@ class QueueContainerComponent extends BaseContainerComponent {
|
|
|
8302
8321
|
});
|
|
8303
8322
|
filterQueryString = existingParams.toString();
|
|
8304
8323
|
}
|
|
8305
|
-
this.queueService.getPaginatedQueueRecords(this.selectedQueue.apiConfig, this.currentSearchTerm, targetPage, targetLimit, filterQueryString, this.sortBy, this.getSortOrderString(this.sortOrder), !forceRefresh).
|
|
8324
|
+
this.queueService.getPaginatedQueueRecords(this.selectedQueue.apiConfig, this.currentSearchTerm, targetPage, targetLimit, filterQueryString, this.sortBy, this.getSortOrderString(this.sortOrder), !forceRefresh).pipe(finalize(() => {
|
|
8325
|
+
if (this.latestRequestSnapshot === requestSnapshot) {
|
|
8326
|
+
this.isShowSkeleton = false;
|
|
8327
|
+
}
|
|
8328
|
+
})).subscribe({
|
|
8306
8329
|
next: (res) => {
|
|
8307
8330
|
// Ignore response if a newer request was already sent (e.g. user cleared and typed a new search)
|
|
8308
8331
|
if (this.latestRequestSnapshot !== requestSnapshot) {
|
|
8309
8332
|
return;
|
|
8310
8333
|
}
|
|
8311
|
-
const
|
|
8334
|
+
const raw = res?.data ?? res?.paginatedResults ?? res;
|
|
8335
|
+
const apiData = Array.isArray(raw) ? raw : [];
|
|
8312
8336
|
if (apiData && apiData.length > 0) {
|
|
8313
8337
|
this.isShowSkeleton = false;
|
|
8314
8338
|
this.table = this.tableBuilder.buildSecondaryTable(apiData, undefined, undefined, undefined, {
|