tango-app-ui-shared 3.3.1-beta.2 → 3.3.1-beta.4

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.
@@ -3197,7 +3197,11 @@ class TrafficHeaderComponent {
3197
3197
  this.Opendropdown = false;
3198
3198
  }
3199
3199
  ngOnInit() {
3200
- // this.Reset();
3200
+ this.gs?.manageRefreshTrigger?.subscribe((e) => {
3201
+ if (e) {
3202
+ this.getClient();
3203
+ }
3204
+ });
3201
3205
  const user = JSON.parse(localStorage.getItem('user-info'));
3202
3206
  this.users = user;
3203
3207
  // Fetch client data if the user is of type 'tango'
@@ -3612,7 +3616,15 @@ class TrafficHeaderComponent {
3612
3616
  }
3613
3617
  toggleSelectAllStores(event) {
3614
3618
  const checked = event.target.checked;
3619
+ // Apply the selection to both filtered and full list of stores
3615
3620
  this.filteredStores.forEach(store => store.checked = checked);
3621
+ this.stores.forEach(store => {
3622
+ const filteredStore = this.filteredStores.find(fStore => fStore.storeId === store.storeId);
3623
+ if (filteredStore) {
3624
+ store.checked = checked; // Sync the checked state with full store list
3625
+ }
3626
+ });
3627
+ // Update the selected stores and persist the selection
3616
3628
  this.updateSelectedStores();
3617
3629
  }
3618
3630
  updateSelectedLocations() {
@@ -3756,20 +3768,23 @@ class TrafficHeaderComponent {
3756
3768
  }
3757
3769
  filterStores() {
3758
3770
  const searchText = this.searchStoreText.toLowerCase();
3771
+ // Preserve checked states during filtering
3759
3772
  if (searchText) {
3760
- // Preserve the checked state during filtering
3773
+ // Filter based on search text while preserving checked state
3761
3774
  this.filteredStores = this.stores
3762
3775
  .map(store => ({
3763
3776
  ...store,
3764
- checked: this.filteredStores.find(s => s.storeId === store.storeId)?.checked || false
3777
+ // Check if the store is already checked in filteredStores, fallback to original stores' checked state
3778
+ checked: this.selectedFilters.stores.find((s) => s.storeId === store.storeId)?.checked || store.checked || false
3765
3779
  }))
3766
3780
  .filter(store => store.storeName.toLowerCase().includes(searchText));
3767
3781
  }
3768
3782
  else {
3769
- // Restore the original checked state when search text is cleared
3783
+ // When the search text is cleared, restore the original list with preserved checked states
3770
3784
  this.filteredStores = this.stores.map(store => ({
3771
3785
  ...store,
3772
- checked: this.selectedFilters.stores.find((s) => s.storeId === store.storeId)?.checked || false
3786
+ // Preserve the checked state based on the selected filters
3787
+ checked: this.selectedFilters.stores.find((s) => s.storeId === store.storeId)?.checked || store.checked || false
3773
3788
  }));
3774
3789
  }
3775
3790
  }
@@ -4784,16 +4799,15 @@ class Error404Component {
4784
4799
  this.modeService = modeService;
4785
4800
  }
4786
4801
  ngOnInit() {
4787
- const subscr = this.modeService.mode.asObservable().subscribe((mode) => {
4788
- document.body.style.backgroundImage =
4789
- mode === 'dark'
4790
- ? 'url(./assets/media/auth/bg1-dark.jpg)'
4791
- : 'url(./assets/media/auth/bg1.jpg)';
4792
- });
4793
- this.unsubscribe.push(subscr);
4802
+ // const subscr = this.modeService.mode.asObservable().subscribe((mode) => {
4803
+ // document.body.style.backgroundImage =
4804
+ // mode === 'dark'
4805
+ // ? 'url(./assets/media/auth/bg1-dark.jpg)'
4806
+ // : 'url(./assets/media/auth/bg1.jpg)';
4807
+ // });
4808
+ // this.unsubscribe.push(subscr);
4794
4809
  }
4795
4810
  routeToDashboard() {
4796
- console.log("dfdf");
4797
4811
  this.router.navigate(['/manage/brands']);
4798
4812
  // setTimeout(() => {
4799
4813
  // ToggleComponent.reinitialization();
@@ -4809,11 +4823,11 @@ class Error404Component {
4809
4823
  document.body.style.backgroundImage = 'none';
4810
4824
  }
4811
4825
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Error404Component, deps: [{ token: i1.Router }, { token: i1$1.ThemeModeService }], target: i0.ɵɵFactoryTarget.Component });
4812
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: Error404Component, selector: "lib-error404", ngImport: i0, template: "<!--begin::Title-->\r\n<h1 class=\"fw-bolder fs-2hx text-gray-900 mb-4\">\r\n Oops!\r\n</h1>\r\n<!--end::Title-->\r\n\r\n<!--begin::Text-->\r\n<div class=\"fw-semibold fs-6 text-gray-500 mb-7\">\r\n We can't find that page.\r\n</div>\r\n<!--end::Text-->\r\n\r\n<!--begin::Illustration-->\r\n<div class=\"mb-3\">\r\n <img src=\"./assets/media/auth/404-error.png\" class=\"mw-100 mh-300px theme-light-show\" alt=\"\" />\r\n <img src=\"./assets/media/auth/404-error-dark.png\" class=\"mw-100 mh-300px theme-dark-show\" alt=\"\" />\r\n</div>\r\n<!--end::Illustration-->\r\n\r\n<!--begin::Link-->\r\n<div class=\"mb-0\">\r\n <a (click)=\"routeToDashboard()\" class=\"btn btn-sm btn-primary\">Return Home</a>\r\n</div>\r\n<!--end::Link-->\r\n", styles: [""] });
4826
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: Error404Component, selector: "lib-error404", ngImport: i0, template: "<!--begin::Title-->\r\n<h1 class=\"fw-bolder fs-2hx text-gray-900 mb-4\">\r\n Oops!\r\n</h1>\r\n<!--end::Title-->\r\n\r\n<!--begin::Text-->\r\n<div class=\"fw-semibold fs-6 text-gray-500 mb-7\">\r\n We can't find that page.\r\n</div>\r\n<!--end::Text-->\r\n\r\n<!--begin::Illustration-->\r\n<div class=\"mb-3\">\r\n <img src=\"./assets/media/auth/404-error.png\" class=\"mw-100 mh-300px theme-light-show\" alt=\"\" />\r\n <!-- <img src=\"./assets/media/auth/404-error-dark.png\" class=\"mw-100 mh-300px theme-dark-show\" alt=\"\" /> -->\r\n</div>\r\n<!--end::Illustration-->\r\n\r\n<!--begin::Link-->\r\n<div class=\"mb-0\">\r\n <a (click)=\"routeToDashboard()\" class=\"btn btn-sm btn-primary\">Return Home</a>\r\n</div>\r\n<!--end::Link-->\r\n", styles: [""] });
4813
4827
  }
4814
4828
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Error404Component, decorators: [{
4815
4829
  type: Component,
4816
- args: [{ selector: 'lib-error404', template: "<!--begin::Title-->\r\n<h1 class=\"fw-bolder fs-2hx text-gray-900 mb-4\">\r\n Oops!\r\n</h1>\r\n<!--end::Title-->\r\n\r\n<!--begin::Text-->\r\n<div class=\"fw-semibold fs-6 text-gray-500 mb-7\">\r\n We can't find that page.\r\n</div>\r\n<!--end::Text-->\r\n\r\n<!--begin::Illustration-->\r\n<div class=\"mb-3\">\r\n <img src=\"./assets/media/auth/404-error.png\" class=\"mw-100 mh-300px theme-light-show\" alt=\"\" />\r\n <img src=\"./assets/media/auth/404-error-dark.png\" class=\"mw-100 mh-300px theme-dark-show\" alt=\"\" />\r\n</div>\r\n<!--end::Illustration-->\r\n\r\n<!--begin::Link-->\r\n<div class=\"mb-0\">\r\n <a (click)=\"routeToDashboard()\" class=\"btn btn-sm btn-primary\">Return Home</a>\r\n</div>\r\n<!--end::Link-->\r\n" }]
4830
+ args: [{ selector: 'lib-error404', template: "<!--begin::Title-->\r\n<h1 class=\"fw-bolder fs-2hx text-gray-900 mb-4\">\r\n Oops!\r\n</h1>\r\n<!--end::Title-->\r\n\r\n<!--begin::Text-->\r\n<div class=\"fw-semibold fs-6 text-gray-500 mb-7\">\r\n We can't find that page.\r\n</div>\r\n<!--end::Text-->\r\n\r\n<!--begin::Illustration-->\r\n<div class=\"mb-3\">\r\n <img src=\"./assets/media/auth/404-error.png\" class=\"mw-100 mh-300px theme-light-show\" alt=\"\" />\r\n <!-- <img src=\"./assets/media/auth/404-error-dark.png\" class=\"mw-100 mh-300px theme-dark-show\" alt=\"\" /> -->\r\n</div>\r\n<!--end::Illustration-->\r\n\r\n<!--begin::Link-->\r\n<div class=\"mb-0\">\r\n <a (click)=\"routeToDashboard()\" class=\"btn btn-sm btn-primary\">Return Home</a>\r\n</div>\r\n<!--end::Link-->\r\n" }]
4817
4831
  }], ctorParameters: () => [{ type: i1.Router }, { type: i1$1.ThemeModeService }] });
4818
4832
 
4819
4833
  class Error500Component {