tango-app-ui-shared 3.3.1-beta.81 → 3.3.1-beta.83
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/esm2022/lib/modules/layout/toolbar/client-settings/client-settings.component.mjs +6 -1
- package/esm2022/lib/modules/layout/toolbar/date-single-select/date-single-select.component.mjs +6 -1
- package/esm2022/lib/modules/layout/toolbar/traffic-header/traffic-header/traffic-header.component.mjs +12 -8
- package/esm2022/lib/modules/layout/toolbar/traffic-nob/traffic-nob.component.mjs +12 -3
- package/esm2022/lib/modules/layout/toolbar/trax-header/trax-header.component.mjs +12 -3
- package/esm2022/lib/modules/layout/toolbar/trax-withoutdate/trax-withoutdate.component.mjs +12 -3
- package/fesm2022/tango-app-ui-shared.mjs +54 -13
- package/fesm2022/tango-app-ui-shared.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2670,6 +2670,8 @@ class ClientSettingsComponent {
|
|
|
2670
2670
|
store: null,
|
|
2671
2671
|
stores: [],
|
|
2672
2672
|
date: null,
|
|
2673
|
+
group: [],
|
|
2674
|
+
location: [],
|
|
2673
2675
|
};
|
|
2674
2676
|
constructor(auth, gs, cd) {
|
|
2675
2677
|
this.auth = auth;
|
|
@@ -2722,6 +2724,9 @@ class ClientSettingsComponent {
|
|
|
2722
2724
|
this.selectedFilters = headerFilters;
|
|
2723
2725
|
this.selectedFilters.client = this.selectedClient.clientId;
|
|
2724
2726
|
this.selectedFilters.clientName = this.selectedClient.clientName;
|
|
2727
|
+
this.selectedFilters.stores = [];
|
|
2728
|
+
this.selectedFilters.group = [];
|
|
2729
|
+
this.selectedFilters.location = [];
|
|
2725
2730
|
localStorage.setItem('header-filters', JSON.stringify(this.selectedFilters));
|
|
2726
2731
|
// this.gs.dataRangeValue.next(this.selectedFilters);
|
|
2727
2732
|
window.location.reload();
|
|
@@ -2883,6 +2888,8 @@ class DateSingleSelectComponent {
|
|
|
2883
2888
|
store: null,
|
|
2884
2889
|
stores: [],
|
|
2885
2890
|
date: null,
|
|
2891
|
+
group: [],
|
|
2892
|
+
location: []
|
|
2886
2893
|
};
|
|
2887
2894
|
dummyArray;
|
|
2888
2895
|
respnsearray = [];
|
|
@@ -3037,6 +3044,9 @@ class DateSingleSelectComponent {
|
|
|
3037
3044
|
else {
|
|
3038
3045
|
this.selectedFilters.clients = [this.selectedClient.clientId];
|
|
3039
3046
|
}
|
|
3047
|
+
this.selectedFilters.stores = [];
|
|
3048
|
+
this.selectedFilters.group = [];
|
|
3049
|
+
this.selectedFilters.location = [];
|
|
3040
3050
|
localStorage.setItem("header-filters", JSON.stringify(this.selectedFilters));
|
|
3041
3051
|
// window.location.reload()
|
|
3042
3052
|
// this.gs.dataRangeValue.next(this.selectedFilters);
|
|
@@ -3550,6 +3560,12 @@ class TrafficHeaderComponent {
|
|
|
3550
3560
|
if (this.searchLocationText) {
|
|
3551
3561
|
this.filteredLocations = this.locations.filter((location) => location.city.toLowerCase().includes(this.searchLocationText.toLowerCase()));
|
|
3552
3562
|
}
|
|
3563
|
+
const selectedLocations = this.locations.filter((location) => location.checked).map((location) => location.city);
|
|
3564
|
+
if (selectedLocations.length > 0) {
|
|
3565
|
+
setTimeout(() => {
|
|
3566
|
+
this.getStore(); // Fetch stores based on selected groups
|
|
3567
|
+
}, 1000);
|
|
3568
|
+
}
|
|
3553
3569
|
},
|
|
3554
3570
|
error: (err) => {
|
|
3555
3571
|
console.error("Failed to fetch locations", err);
|
|
@@ -3594,7 +3610,9 @@ class TrafficHeaderComponent {
|
|
|
3594
3610
|
// Auto-fetch stores when groups are selected
|
|
3595
3611
|
const selectedGroups = this.groupsData.filter((group) => group.checked).map((group) => group.groupName);
|
|
3596
3612
|
if (selectedGroups.length > 0) {
|
|
3597
|
-
|
|
3613
|
+
setTimeout(() => {
|
|
3614
|
+
this.getStore(); // Fetch stores based on selected groups
|
|
3615
|
+
}, 1000);
|
|
3598
3616
|
}
|
|
3599
3617
|
},
|
|
3600
3618
|
error: (err) => {
|
|
@@ -3781,10 +3799,11 @@ class TrafficHeaderComponent {
|
|
|
3781
3799
|
});
|
|
3782
3800
|
if (selectedCities.length > 0 || !selectedCities.length) {
|
|
3783
3801
|
this.selectedFilters.stores = [];
|
|
3784
|
-
this.
|
|
3802
|
+
this.groupsData = [];
|
|
3785
3803
|
this.getGroups(); // Fetch groups based on selected cities
|
|
3786
3804
|
// If there are selected groups, fetch the stores based on selected groups
|
|
3787
3805
|
this.getStore();
|
|
3806
|
+
this.selectedFilters.location = this.locations;
|
|
3788
3807
|
}
|
|
3789
3808
|
else {
|
|
3790
3809
|
this.filteredGroups = []; // Clear groups if no locations are selected
|
|
@@ -3800,11 +3819,6 @@ class TrafficHeaderComponent {
|
|
|
3800
3819
|
const isChecked = event.target.checked;
|
|
3801
3820
|
this.filteredGroups.forEach((group) => (group.checked = isChecked));
|
|
3802
3821
|
this.updateSelectedGroups();
|
|
3803
|
-
// if (!isChecked) {
|
|
3804
|
-
// this.selectedFilters.stores =[];
|
|
3805
|
-
// // If there are selected groups, fetch the stores based on selected groups
|
|
3806
|
-
// this.getStore();
|
|
3807
|
-
// }
|
|
3808
3822
|
}
|
|
3809
3823
|
updateSelectedGroups() {
|
|
3810
3824
|
// Fetch the relevant stores after groups are selected
|
|
@@ -4341,6 +4355,12 @@ class TraxHeaderComponent {
|
|
|
4341
4355
|
if (this.searchLocationText) {
|
|
4342
4356
|
this.filteredLocations = this.locations.filter((location) => location.city.toLowerCase().includes(this.searchLocationText.toLowerCase()));
|
|
4343
4357
|
}
|
|
4358
|
+
const selectedLocations = this.locations.filter((location) => location.checked).map((location) => location.city);
|
|
4359
|
+
if (selectedLocations.length > 0) {
|
|
4360
|
+
setTimeout(() => {
|
|
4361
|
+
this.getStore(); // Fetch stores based on selected groups
|
|
4362
|
+
}, 1000);
|
|
4363
|
+
}
|
|
4344
4364
|
},
|
|
4345
4365
|
error: (err) => {
|
|
4346
4366
|
console.error("Failed to fetch locations", err);
|
|
@@ -4385,7 +4405,9 @@ class TraxHeaderComponent {
|
|
|
4385
4405
|
// Auto-fetch stores when groups are selected
|
|
4386
4406
|
const selectedGroups = this.groupsData.filter((group) => group.checked).map((group) => group.groupName);
|
|
4387
4407
|
if (selectedGroups.length > 0) {
|
|
4388
|
-
|
|
4408
|
+
setTimeout(() => {
|
|
4409
|
+
this.getStore(); // Fetch stores based on selected groups
|
|
4410
|
+
}, 1000);
|
|
4389
4411
|
}
|
|
4390
4412
|
},
|
|
4391
4413
|
error: (err) => {
|
|
@@ -4586,10 +4608,11 @@ class TraxHeaderComponent {
|
|
|
4586
4608
|
});
|
|
4587
4609
|
if (selectedCities.length > 0 || !selectedCities.length) {
|
|
4588
4610
|
this.selectedFilters.stores = [];
|
|
4589
|
-
this.
|
|
4611
|
+
this.groupsData = [];
|
|
4590
4612
|
this.getGroups(); // Fetch groups based on selected cities
|
|
4591
4613
|
// If there are selected groups, fetch the stores based on selected groups
|
|
4592
4614
|
this.getStore();
|
|
4615
|
+
this.selectedFilters.location = this.locations;
|
|
4593
4616
|
}
|
|
4594
4617
|
else {
|
|
4595
4618
|
this.filteredGroups = []; // Clear groups if no locations are selected
|
|
@@ -5172,6 +5195,12 @@ class TraxWithoutdateComponent {
|
|
|
5172
5195
|
if (this.searchLocationText) {
|
|
5173
5196
|
this.filteredLocations = this.locations.filter((location) => location.city.toLowerCase().includes(this.searchLocationText.toLowerCase()));
|
|
5174
5197
|
}
|
|
5198
|
+
const selectedLocations = this.locations.filter((location) => location.checked).map((location) => location.city);
|
|
5199
|
+
if (selectedLocations.length > 0) {
|
|
5200
|
+
setTimeout(() => {
|
|
5201
|
+
this.getStore(); // Fetch stores based on selected groups
|
|
5202
|
+
}, 1000);
|
|
5203
|
+
}
|
|
5175
5204
|
},
|
|
5176
5205
|
error: (err) => {
|
|
5177
5206
|
console.error("Failed to fetch locations", err);
|
|
@@ -5216,7 +5245,9 @@ class TraxWithoutdateComponent {
|
|
|
5216
5245
|
// Auto-fetch stores when groups are selected
|
|
5217
5246
|
const selectedGroups = this.groupsData.filter((group) => group.checked).map((group) => group.groupName);
|
|
5218
5247
|
if (selectedGroups.length > 0) {
|
|
5219
|
-
|
|
5248
|
+
setTimeout(() => {
|
|
5249
|
+
this.getStore(); // Fetch stores based on selected groups
|
|
5250
|
+
}, 1000);
|
|
5220
5251
|
}
|
|
5221
5252
|
},
|
|
5222
5253
|
error: (err) => {
|
|
@@ -5417,10 +5448,11 @@ class TraxWithoutdateComponent {
|
|
|
5417
5448
|
});
|
|
5418
5449
|
if (selectedCities.length > 0 || !selectedCities.length) {
|
|
5419
5450
|
this.selectedFilters.stores = [];
|
|
5420
|
-
this.
|
|
5451
|
+
this.groupsData = [];
|
|
5421
5452
|
this.getGroups(); // Fetch groups based on selected cities
|
|
5422
5453
|
// If there are selected groups, fetch the stores based on selected groups
|
|
5423
5454
|
this.getStore();
|
|
5455
|
+
this.selectedFilters.location = this.locations;
|
|
5424
5456
|
}
|
|
5425
5457
|
else {
|
|
5426
5458
|
this.filteredGroups = []; // Clear groups if no locations are selected
|
|
@@ -5948,6 +5980,12 @@ class TrafficNobComponent {
|
|
|
5948
5980
|
if (this.searchLocationText) {
|
|
5949
5981
|
this.filteredLocations = this.locations.filter((location) => location.city.toLowerCase().includes(this.searchLocationText.toLowerCase()));
|
|
5950
5982
|
}
|
|
5983
|
+
const selectedLocations = this.locations.filter((location) => location.checked).map((location) => location.city);
|
|
5984
|
+
if (selectedLocations.length > 0) {
|
|
5985
|
+
setTimeout(() => {
|
|
5986
|
+
this.getStore(); // Fetch stores based on selected groups
|
|
5987
|
+
}, 1000);
|
|
5988
|
+
}
|
|
5951
5989
|
},
|
|
5952
5990
|
error: (err) => {
|
|
5953
5991
|
console.error("Failed to fetch locations", err);
|
|
@@ -5992,7 +6030,9 @@ class TrafficNobComponent {
|
|
|
5992
6030
|
// Auto-fetch stores when groups are selected
|
|
5993
6031
|
const selectedGroups = this.groupsData.filter((group) => group.checked).map((group) => group.groupName);
|
|
5994
6032
|
if (selectedGroups.length > 0) {
|
|
5995
|
-
|
|
6033
|
+
setTimeout(() => {
|
|
6034
|
+
this.getStore(); // Fetch stores based on selected groups
|
|
6035
|
+
}, 1000);
|
|
5996
6036
|
}
|
|
5997
6037
|
},
|
|
5998
6038
|
error: (err) => {
|
|
@@ -6193,10 +6233,11 @@ class TrafficNobComponent {
|
|
|
6193
6233
|
});
|
|
6194
6234
|
if (selectedCities.length > 0 || !selectedCities.length) {
|
|
6195
6235
|
this.selectedFilters.stores = [];
|
|
6196
|
-
this.
|
|
6236
|
+
this.groupsData = [];
|
|
6197
6237
|
this.getGroups(); // Fetch groups based on selected cities
|
|
6198
6238
|
// If there are selected groups, fetch the stores based on selected groups
|
|
6199
6239
|
this.getStore();
|
|
6240
|
+
this.selectedFilters.location = this.locations;
|
|
6200
6241
|
}
|
|
6201
6242
|
else {
|
|
6202
6243
|
this.filteredGroups = []; // Clear groups if no locations are selected
|