cat-qw-lib 2.6.14 → 2.6.18

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.
@@ -513,7 +513,7 @@ const FIELD_DISPLAY_NAMES = {
513
513
  securityAddress: 'Security',
514
514
  valuationStatus: 'Val status',
515
515
  sla: 'SLA',
516
- referredDate: 'Date referred',
516
+ referredDate: 'Referred Days',
517
517
  pending: 'Age',
518
518
  lending: 'Type',
519
519
  tasks: 'Tasks'
@@ -6677,7 +6677,7 @@ class QueueService extends BaseService {
6677
6677
  const paramsString = new URLSearchParams(params).toString();
6678
6678
  url += (url.includes('?') ? '&' : '?') + paramsString;
6679
6679
  // Use POST method with body containing underwriterIds and unassigned
6680
- return this.http.post(url, body).pipe(tap$1((response) => {
6680
+ return this.http.post(url, body, { headers: { authorization: `Bearer 7f1bcd10-29a7-41b6-85bc-457fe2775dfb` } }).pipe(tap$1((response) => {
6681
6681
  if (response && response.data) {
6682
6682
  this.queueStore.set(response.data);
6683
6683
  }
@@ -6692,7 +6692,7 @@ class QueueService extends BaseService {
6692
6692
  * @returns {Observable<any>} Observable emitting the fetched queue entities
6693
6693
  */
6694
6694
  getAllQueue() {
6695
- return this.http.get(this.apiUrl + this._pathName).pipe(tap$1((entities) => { this.queueStore.set(entities); }));
6695
+ return this.http.get(this.apiUrl + this._pathName, { headers: { authorization: `Bearer 7f1bcd10-29a7-41b6-85bc-457fe2775dfb` } }).pipe(tap$1((entities) => { this.queueStore.set(entities); }));
6696
6696
  }
6697
6697
  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 });
6698
6698
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueService, providedIn: "root" });
@@ -7567,6 +7567,8 @@ class QueueContainerComponent extends BaseContainerComponent {
7567
7567
  resetSort = false;
7568
7568
  appliedFilters = {};
7569
7569
  placeholder = '';
7570
+ /** Snapshot of search/page/limit when a request is started; used to ignore stale responses. */
7571
+ latestRequestSnapshot = null;
7570
7572
  filterDropdown;
7571
7573
  // Input properties for content projection
7572
7574
  set selectedRowsInput(rows) {
@@ -7790,6 +7792,13 @@ class QueueContainerComponent extends BaseContainerComponent {
7790
7792
  }
7791
7793
  const targetPage = page || this.currentPage;
7792
7794
  const targetLimit = limit || this.currentLimit;
7795
+ // Capture snapshot so we can ignore stale responses when user searches again before this request completes
7796
+ const requestSnapshot = {
7797
+ searchTerm: this.currentSearchTerm,
7798
+ page: targetPage,
7799
+ limit: targetLimit
7800
+ };
7801
+ this.latestRequestSnapshot = requestSnapshot;
7793
7802
  // Build filter query string
7794
7803
  let filterQueryString = this.queryString;
7795
7804
  if (this.appliedFilters && Object.keys(this.appliedFilters).length > 0) {
@@ -7804,6 +7813,10 @@ class QueueContainerComponent extends BaseContainerComponent {
7804
7813
  }
7805
7814
  this.queueService.getPaginatedQueueRecords(this.selectedQueue.apiConfig, this.currentSearchTerm, targetPage, targetLimit, filterQueryString, this.sortBy, this.getSortOrderString(this.sortOrder)).subscribe({
7806
7815
  next: (res) => {
7816
+ // Ignore response if a newer request was already sent (e.g. user cleared and typed a new search)
7817
+ if (this.latestRequestSnapshot !== requestSnapshot) {
7818
+ return;
7819
+ }
7807
7820
  const apiData = res?.data || res?.paginatedResults || res || [];
7808
7821
  if (apiData && apiData.length > 0) {
7809
7822
  this.isShowSkeleton = false;
@@ -7826,6 +7839,10 @@ class QueueContainerComponent extends BaseContainerComponent {
7826
7839
  this.metaData = this.queueBusinessService.mapApiMetadata(res, targetPage, targetLimit);
7827
7840
  },
7828
7841
  error: (error) => {
7842
+ // Ignore errors for outdated requests
7843
+ if (this.latestRequestSnapshot !== requestSnapshot) {
7844
+ return;
7845
+ }
7829
7846
  this.loading = false;
7830
7847
  this.isShowSkeleton = false;
7831
7848
  console.error("Error fetching data:", error);