tango-app-ui-shared 3.7.3-dev6-demo6 → 3.7.3-dev6-demo8
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.
|
@@ -8496,7 +8496,7 @@ class ZoneHeaderComponent {
|
|
|
8496
8496
|
this.getClient();
|
|
8497
8497
|
}
|
|
8498
8498
|
else {
|
|
8499
|
-
const storedFilters = localStorage.getItem("header-
|
|
8499
|
+
const storedFilters = localStorage.getItem("header-filters");
|
|
8500
8500
|
if (storedFilters) {
|
|
8501
8501
|
const headerFilters = JSON.parse(storedFilters);
|
|
8502
8502
|
this.filteredStores = headerFilters?.stores.map((store) => ({
|
|
@@ -8528,13 +8528,25 @@ class ZoneHeaderComponent {
|
|
|
8528
8528
|
const storedFilters = localStorage.getItem("header-filters1");
|
|
8529
8529
|
if (storedFilters) {
|
|
8530
8530
|
const headerFilters = JSON.parse(storedFilters);
|
|
8531
|
+
if (headerFilters.date) {
|
|
8532
|
+
this.selectedDateRange = {
|
|
8533
|
+
startDate: this.dayjs("09-09-2025").format("YYYY-MM-DD"),
|
|
8534
|
+
endDate: this.dayjs("09-09-2025").format("YYYY-MM-DD"),
|
|
8535
|
+
};
|
|
8536
|
+
}
|
|
8537
|
+
else {
|
|
8538
|
+
this.selectedDateRange = {
|
|
8539
|
+
startDate: this.dayjs("09-09-2025").format("YYYY-MM-DD"),
|
|
8540
|
+
endDate: this.dayjs("09-09-2025").format("YYYY-MM-DD"),
|
|
8541
|
+
};
|
|
8542
|
+
}
|
|
8531
8543
|
// Initialize selectedFilters with defaults or existing values
|
|
8532
8544
|
this.selectedFilters = {
|
|
8533
|
-
client: headerFilters.client || this.users.client,
|
|
8545
|
+
client: headerFilters.client || this.users.client || '11',
|
|
8534
8546
|
clientName: headerFilters.clientName || '',
|
|
8535
8547
|
clients: headerFilters.clients || [],
|
|
8536
8548
|
store: headerFilters.store || null,
|
|
8537
|
-
date:
|
|
8549
|
+
date: this.selectedDateRange || {},
|
|
8538
8550
|
stores: headerFilters.stores || [],
|
|
8539
8551
|
group: headerFilters.group || [],
|
|
8540
8552
|
location: headerFilters.location || [],
|
|
@@ -8548,14 +8560,14 @@ class ZoneHeaderComponent {
|
|
|
8548
8560
|
// Format date range if it exists
|
|
8549
8561
|
if (headerFilters.date) {
|
|
8550
8562
|
this.selectedDateRange = {
|
|
8551
|
-
startDate: this.dayjs(
|
|
8552
|
-
endDate: this.dayjs(
|
|
8563
|
+
startDate: this.dayjs("09-09-2025").format("YYYY-MM-DD"),
|
|
8564
|
+
endDate: this.dayjs("09-09-2025").format("YYYY-MM-DD"),
|
|
8553
8565
|
};
|
|
8554
8566
|
}
|
|
8555
8567
|
else {
|
|
8556
8568
|
this.selectedDateRange = {
|
|
8557
|
-
startDate: this.dayjs(
|
|
8558
|
-
endDate: this.dayjs(
|
|
8569
|
+
startDate: this.dayjs("09-09-2025").format("YYYY-MM-DD"),
|
|
8570
|
+
endDate: this.dayjs("09-09-2025").format("YYYY-MM-DD"),
|
|
8559
8571
|
};
|
|
8560
8572
|
}
|
|
8561
8573
|
// console.log("3")
|
|
@@ -8647,7 +8659,7 @@ class ZoneHeaderComponent {
|
|
|
8647
8659
|
}
|
|
8648
8660
|
else {
|
|
8649
8661
|
this.selectedClient = this.clientList[0];
|
|
8650
|
-
this.selectedFilters.client = this.selectedClient.clientId;
|
|
8662
|
+
this.selectedFilters.client = this.selectedClient.clientId ? this.selectedClient.clientId : '11';
|
|
8651
8663
|
this.selectedFilters.clientName = this.selectedClient.clientName;
|
|
8652
8664
|
this.selectedFilters.clients = headerFilters.clients;
|
|
8653
8665
|
this.selectedFilters.store = headerFilters.store;
|
|
@@ -8670,7 +8682,7 @@ class ZoneHeaderComponent {
|
|
|
8670
8682
|
}
|
|
8671
8683
|
else {
|
|
8672
8684
|
this.selectedClient = this.clientList[0];
|
|
8673
|
-
this.selectedFilters.client = this.selectedClient.clientId;
|
|
8685
|
+
this.selectedFilters.client = this.selectedClient.clientId ? this.selectedClient.clientId : '11';
|
|
8674
8686
|
this.selectedFilters.clientName = this.selectedClient.clientName;
|
|
8675
8687
|
// Ensure locations and groups are loaded before fetching stores
|
|
8676
8688
|
this.getCountry();
|
|
@@ -8689,7 +8701,7 @@ class ZoneHeaderComponent {
|
|
|
8689
8701
|
}
|
|
8690
8702
|
getUserInfo(client) {
|
|
8691
8703
|
let obj = {
|
|
8692
|
-
clientId: client ? client : ''
|
|
8704
|
+
clientId: client ? client : '11'
|
|
8693
8705
|
};
|
|
8694
8706
|
if (client) {
|
|
8695
8707
|
this.auth.getHeaderUsers(obj).subscribe({
|
|
@@ -8713,7 +8725,7 @@ class ZoneHeaderComponent {
|
|
|
8713
8725
|
// Fetch header filters from localStorage
|
|
8714
8726
|
const headerFilters = JSON.parse(localStorage.getItem("header-filters1") || "{}");
|
|
8715
8727
|
// Update the selected filters with the new client
|
|
8716
|
-
this.selectedFilters.client = this.selectedClient.clientId;
|
|
8728
|
+
this.selectedFilters.client = this.selectedClient.clientId ? this.selectedClient.clientId : '11';
|
|
8717
8729
|
this.selectedFilters.clientName = this.selectedClient.clientName;
|
|
8718
8730
|
// Remove old store, group, and location data from the header filters
|
|
8719
8731
|
delete headerFilters.stores;
|
|
@@ -8790,7 +8802,7 @@ class ZoneHeaderComponent {
|
|
|
8790
8802
|
.map(country => country.country);
|
|
8791
8803
|
// const headerFilters: any = JSON.parse(localStorage.getItem("header-filters1") || "{}");
|
|
8792
8804
|
let obj = {
|
|
8793
|
-
clientId: this.selectedFilters.client ? this.selectedFilters.client : this.users.clientId,
|
|
8805
|
+
clientId: this.selectedFilters.client ? this.selectedFilters.client : this.users.clientId || '11',
|
|
8794
8806
|
country,
|
|
8795
8807
|
city: [],
|
|
8796
8808
|
group: [],
|