tango-app-ui-manage-stores 3.0.44-dev → 3.0.45-dev

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.
@@ -561,7 +561,6 @@ class TangoManageGroupsComponent {
561
561
  totalCount: 0,
562
562
  };
563
563
  paginationSizes = [10, 20, 30];
564
- user;
565
564
  constructor(modalService, groupService, cd, gs, pageInfo) {
566
565
  this.modalService = modalService;
567
566
  this.groupService = groupService;
@@ -581,13 +580,6 @@ class TangoManageGroupsComponent {
581
580
  this.group_req = { clientId: this.$headerFilters.client, offset: 1, limit: 10 };
582
581
  this.getGroups();
583
582
  }
584
- else {
585
- this.user = JSON.parse(localStorage.getItem('user-info') || '{}');
586
- this.$headerFilters = this.user;
587
- this.$headerFilters.client = this.user?.clientId;
588
- this.group_req = { clientId: this.$headerFilters.client, offset: 1, limit: 10 };
589
- this.getGroups();
590
- }
591
583
  }
592
584
  });
593
585
  }
@@ -1074,7 +1066,6 @@ class GroupDetailsComponent {
1074
1066
  detach = new Subject();
1075
1067
  dataEvent = new EventEmitter();
1076
1068
  group;
1077
- user;
1078
1069
  constructor(pageInfo, storesService, changeDetector, groupService, excelService, gs, router) {
1079
1070
  this.pageInfo = pageInfo;
1080
1071
  this.storesService = storesService;
@@ -1236,23 +1227,6 @@ class GroupDetailsComponent {
1236
1227
  };
1237
1228
  this.loadTable();
1238
1229
  }
1239
- else if (!data && this.user?.userType === 'client') {
1240
- this.user = JSON.parse(localStorage.getItem('user-info') || '{}');
1241
- this.$headerFilters = this.user;
1242
- this.$headerFilters.client = this.user?.clientId;
1243
- this.getCountries();
1244
- this.storeList_req = {
1245
- clientId: [this.$headerFilters.client],
1246
- offset: 1,
1247
- limit: 10,
1248
- sortColumName: "storeId",
1249
- sortBy: 1,
1250
- searchValue: "",
1251
- export: false,
1252
- groupName: this.group.groupName
1253
- };
1254
- this.loadTable();
1255
- }
1256
1230
  else {
1257
1231
  this.loading = false;
1258
1232
  this.noData = true;
@@ -1495,6 +1469,7 @@ class TangoManageStoresComponent {
1495
1469
  this.initSearch();
1496
1470
  }
1497
1471
  initSearch() {
1472
+ this.user = JSON.parse(localStorage.getItem('user-info') || '{}');
1498
1473
  this.searchInput.valueChanges
1499
1474
  .pipe(debounceTime(1000), distinctUntilChanged())
1500
1475
  .subscribe((e) => {
@@ -1616,22 +1591,16 @@ class TangoManageStoresComponent {
1616
1591
  this.$headerFilters = data;
1617
1592
  this.getCountries();
1618
1593
  this.storeList_req = {
1619
- clientId: [this.$headerFilters.client],
1620
- offset: 1,
1621
- limit: 10,
1622
- sortColumName: "storeId",
1623
- sortBy: -1,
1624
- searchValue: "",
1625
- export: false,
1626
- };
1627
- this.loadTable();
1628
- }
1629
- else if (!data) {
1630
- let user = JSON.parse(localStorage.getItem('user-info') || '{}');
1631
- this.$headerFilters = user;
1632
- this.$headerFilters.client = user?.clientId;
1633
- this.getCountries();
1634
- this.storeList_req = {
1594
+ // fromDate: this.$headerFilters.date?.startDate
1595
+ // ? this.$headerFilters.date.startDate
1596
+ // : new Date()
1597
+ // .toISOString()
1598
+ // .split("T")[0],
1599
+ // toDate: this.$headerFilters.date?.endDate
1600
+ // ? this.$headerFilters.date.endDate
1601
+ // : new Date()
1602
+ // .toISOString()
1603
+ // .split("T")[0],
1635
1604
  clientId: [this.$headerFilters.client],
1636
1605
  offset: 1,
1637
1606
  limit: 10,
@@ -1902,8 +1871,7 @@ class AddStoresComponent {
1902
1871
  this.ts = ts;
1903
1872
  this.router = router;
1904
1873
  let data = JSON.parse(localStorage.getItem('header-filters') || '');
1905
- let user = JSON.parse(localStorage.getItem('user-info') || '');
1906
- this.$headerFilters = data ? data : user;
1874
+ this.$headerFilters = data;
1907
1875
  }
1908
1876
  onUpload(e) {
1909
1877
  let data;
@@ -2033,7 +2001,7 @@ class AddStoresComponent {
2033
2001
  this.storeService
2034
2002
  .storeBulkUpload({
2035
2003
  stores: processedArray,
2036
- clientId: this.$headerFilters?.client ? this.$headerFilters?.client : this.$headerFilters?.clientId,
2004
+ clientId: this.$headerFilters?.client,
2037
2005
  })
2038
2006
  .subscribe({
2039
2007
  next: (res) => {
@@ -2153,8 +2121,7 @@ class AddStoresFormComponent {
2153
2121
  this.ts = ts;
2154
2122
  this.router = router;
2155
2123
  let data = JSON.parse(localStorage.getItem('header-filters') || '');
2156
- let user = JSON.parse(localStorage.getItem('user-info') || '');
2157
- this.$headerFilters = data ? data : user;
2124
+ this.$headerFilters = data;
2158
2125
  this.getAllTimezones();
2159
2126
  this.createForm();
2160
2127
  }
@@ -2179,7 +2146,7 @@ class AddStoresFormComponent {
2179
2146
  createForm() {
2180
2147
  this.storeForm = this.fb.group({
2181
2148
  storeName: ["", Validators.required],
2182
- clientId: [this.$headerFilters?.client ? this.$headerFilters?.client : this.$headerFilters?.clientId, Validators.required],
2149
+ clientId: [this.$headerFilters?.client, Validators.required],
2183
2150
  businessType: ["COCO", Validators.required],
2184
2151
  storeType_type: ["High Street", Validators.required],
2185
2152
  storeType_name: [""],