@brggroup/share-lib 0.0.32 → 0.0.34

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.
@@ -5,7 +5,7 @@ import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
5
5
  import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
6
6
  import * as i3 from '@ngx-translate/core';
7
7
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
8
- import { firstValueFrom, BehaviorSubject, of, catchError, throwError, finalize, from, switchMap as switchMap$1, EMPTY, filter, take, fromEvent } from 'rxjs';
8
+ import { firstValueFrom, BehaviorSubject, of, catchError, throwError, finalize, from, switchMap as switchMap$1, filter, take, fromEvent } from 'rxjs';
9
9
  import { NzNotificationService } from 'ng-zorro-antd/notification';
10
10
  import * as i1 from 'ng-zorro-antd/modal';
11
11
  import { NzModalService } from 'ng-zorro-antd/modal';
@@ -757,7 +757,9 @@ function handle401(req, next, router, authService) {
757
757
  queryParams: { returnUrl: initialReturnUrl || '/' },
758
758
  });
759
759
  refreshTokenSubject.next(null);
760
- return EMPTY;
760
+ return of({
761
+ IsSuccess: false,
762
+ });
761
763
  }
762
764
  // Phát token mới cho các request đang chờ
763
765
  refreshTokenSubject.next(TokenStorage.getToken());
@@ -944,6 +946,15 @@ class BaseComponent {
944
946
  getUrlData(key) {
945
947
  return this.route.snapshot.data[key];
946
948
  }
949
+ setQueryParam(name, value) {
950
+ this.router.navigate([], {
951
+ relativeTo: this.route,
952
+ queryParams: {
953
+ [name]: value,
954
+ },
955
+ queryParamsHandling: 'merge',
956
+ });
957
+ }
947
958
  get url() {
948
959
  return this.router.url;
949
960
  }