tango-app-ui-shared 3.3.1-beta.73 → 3.3.1-beta.75

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.
@@ -5625,6 +5625,779 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5625
5625
  args: ["document:click", ["$event"]]
5626
5626
  }] } });
5627
5627
 
5628
+ class TrafficNobComponent {
5629
+ auth;
5630
+ router;
5631
+ gs;
5632
+ cd;
5633
+ dayjs = dayjs;
5634
+ isCustomDate = (m) => {
5635
+ const isValidDate = m > this.dayjs();
5636
+ return isValidDate ? "invalid-date" : false;
5637
+ };
5638
+ selectedDateRange = { startDate: dayjs().subtract(30, 'days'),
5639
+ endDate: dayjs().subtract(1, "days"), };
5640
+ selectedFilters = {
5641
+ client: null,
5642
+ clientName: null,
5643
+ clients: [],
5644
+ store: null,
5645
+ stores: [],
5646
+ date: null,
5647
+ group: [],
5648
+ location: [],
5649
+ };
5650
+ Opendropdown = false;
5651
+ dropdownOpen = null; // 'location' or 'group'
5652
+ searchLocationText = "";
5653
+ searchGroupText = "";
5654
+ locations = [];
5655
+ filteredLocations = [];
5656
+ groupsData = [];
5657
+ filteredGroups = [];
5658
+ filteredStores = [];
5659
+ stores = [];
5660
+ searchStoreText = '';
5661
+ clientList = [];
5662
+ selectedClient;
5663
+ locationLabel = [];
5664
+ groupLabel = [];
5665
+ users;
5666
+ url;
5667
+ constructor(auth, router, gs, cd) {
5668
+ this.auth = auth;
5669
+ this.router = router;
5670
+ this.gs = gs;
5671
+ this.cd = cd;
5672
+ }
5673
+ onClick(event) {
5674
+ const target = event.target;
5675
+ if (!target.closest('.dropdown1')) {
5676
+ this.Opendropdown = false;
5677
+ }
5678
+ }
5679
+ closeDropdown1() {
5680
+ this.Opendropdown = false;
5681
+ }
5682
+ ngOnInit() {
5683
+ this.url = this.router.url.split("?")[0].split('/');
5684
+ const user = JSON.parse(localStorage.getItem('user-info'));
5685
+ this.users = user;
5686
+ this.gs?.manageRefreshTrigger?.subscribe((e) => {
5687
+ if (e) {
5688
+ if (user.userType === 'tango') {
5689
+ this.getClient();
5690
+ }
5691
+ else {
5692
+ const storedFilters = localStorage.getItem("header-filters");
5693
+ if (storedFilters) {
5694
+ const headerFilters = JSON.parse(storedFilters);
5695
+ this.filteredStores = headerFilters?.stores.map((store) => ({
5696
+ ...store,
5697
+ checked: store.checked
5698
+ }));
5699
+ }
5700
+ }
5701
+ }
5702
+ });
5703
+ // Fetch client data if the user is of type 'tango'
5704
+ if (user.userType === 'tango') {
5705
+ this.getClient();
5706
+ }
5707
+ else {
5708
+ this.getLocations();
5709
+ this.getGroups();
5710
+ this.getStore();
5711
+ // this.emitAndStoreFilters();
5712
+ // console.log("1")
5713
+ }
5714
+ // Load filters from localStorage if they exist
5715
+ const storedFilters = localStorage.getItem("header-filters");
5716
+ if (storedFilters) {
5717
+ const headerFilters = JSON.parse(storedFilters);
5718
+ // Initialize selectedFilters with defaults or existing values
5719
+ this.selectedFilters = {
5720
+ client: headerFilters.client || this.users.client,
5721
+ clientName: headerFilters.clientName || '',
5722
+ clients: headerFilters.clients || [],
5723
+ store: headerFilters.store || null,
5724
+ date: headerFilters.date || {},
5725
+ stores: headerFilters.stores || [],
5726
+ group: headerFilters.group || [],
5727
+ location: headerFilters.location || []
5728
+ };
5729
+ // Sync filtered data with stored selections
5730
+ this.filteredLocations = this.syncWithLocalStorage(headerFilters.location);
5731
+ this.filteredGroups = this.syncWithLocalStorage(headerFilters.group);
5732
+ this.filteredStores = this.syncWithLocalStorage(headerFilters.stores);
5733
+ // Format date range if it exists
5734
+ if (headerFilters.date) {
5735
+ this.selectedDateRange = {
5736
+ startDate: this.dayjs(headerFilters.date.startDate, "YYYY-MM-DD").format("DD-MM-YYYY"),
5737
+ endDate: this.dayjs(headerFilters.date.endDate, "YYYY-MM-DD").format("DD-MM-YYYY"),
5738
+ };
5739
+ }
5740
+ else {
5741
+ this.selectedDateRange = {
5742
+ startDate: this.dayjs(this.selectedDateRange.startDate, "YYYY-MM-DD").format("DD-MM-YYYY"),
5743
+ endDate: this.dayjs(this.selectedDateRange.endDate, "YYYY-MM-DD").format("DD-MM-YYYY"),
5744
+ };
5745
+ }
5746
+ // console.log("3")
5747
+ // Emit data via service and update localStorage
5748
+ this.emitAndStoreFilters();
5749
+ }
5750
+ else {
5751
+ // Initialize empty states if no header filters are present in localStorage
5752
+ this.resetFilters();
5753
+ // console.log("2")
5754
+ }
5755
+ }
5756
+ syncWithLocalStorage(items) {
5757
+ return items
5758
+ ? items.map((item) => ({
5759
+ ...item,
5760
+ checked: item.checked === true
5761
+ }))
5762
+ : [];
5763
+ }
5764
+ emitAndStoreFilters() {
5765
+ this.gs.dataRangeValue.next(this.selectedFilters);
5766
+ localStorage.setItem("header-filters", JSON.stringify(this.selectedFilters));
5767
+ // console.log("1")
5768
+ }
5769
+ /**
5770
+ * Reset selectedFilters and all related arrays to empty states
5771
+ */
5772
+ resetFilters() {
5773
+ this.selectedFilters = {
5774
+ client: null,
5775
+ clientName: '',
5776
+ clients: [],
5777
+ store: null,
5778
+ date: {},
5779
+ stores: [],
5780
+ group: [],
5781
+ location: []
5782
+ };
5783
+ this.filteredLocations = [];
5784
+ this.filteredGroups = [];
5785
+ this.filteredStores = [];
5786
+ }
5787
+ getClient() {
5788
+ this.auth.getClients().subscribe({
5789
+ next: (e) => {
5790
+ if (e) {
5791
+ this.clientList = e.data.result;
5792
+ const headerFilters = JSON.parse(localStorage.getItem("header-filters") || "{}");
5793
+ if (headerFilters.client) {
5794
+ this.clientList.find((obj) => {
5795
+ if (obj.clientId === headerFilters.client) {
5796
+ this.selectedClient = obj;
5797
+ }
5798
+ });
5799
+ this.selectedFilters.client = headerFilters.client;
5800
+ this.selectedFilters.clientName = headerFilters.clientName;
5801
+ this.selectedFilters.clients = headerFilters.clients;
5802
+ this.selectedFilters.store = headerFilters.store;
5803
+ this.selectedFilters.date = headerFilters.date;
5804
+ this.selectedFilters.stores = headerFilters.stores;
5805
+ this.selectedFilters.group = headerFilters.group;
5806
+ this.selectedFilters.location = headerFilters.location;
5807
+ this.gs.dataRangeValue.next(this.selectedFilters);
5808
+ // console.log("2")
5809
+ // Ensure locations and groups are loaded before fetching stores
5810
+ this.getLocations();
5811
+ this.getGroups();
5812
+ // Fetch stores only after locations and groups are set
5813
+ this.getStore();
5814
+ }
5815
+ else {
5816
+ this.selectedClient = this.clientList[0];
5817
+ this.selectedFilters.client = this.selectedClient.clientId;
5818
+ this.selectedFilters.clientName = this.selectedClient.clientName;
5819
+ this.selectedFilters.clients = headerFilters.clients;
5820
+ this.selectedFilters.store = headerFilters.store;
5821
+ this.selectedFilters.date = headerFilters.date;
5822
+ this.selectedFilters.stores = headerFilters.stores;
5823
+ this.selectedFilters.group = headerFilters.group;
5824
+ this.selectedFilters.location = headerFilters.location;
5825
+ localStorage.setItem("header-filters", JSON.stringify(this.selectedFilters));
5826
+ this.gs.dataRangeValue.next(this.selectedFilters);
5827
+ // console.log("3")
5828
+ this.cd.detectChanges();
5829
+ // Ensure locations and groups are loaded before fetching stores
5830
+ this.getLocations();
5831
+ this.getGroups();
5832
+ // Fetch stores only after locations and groups are set
5833
+ this.getStore();
5834
+ }
5835
+ }
5836
+ else {
5837
+ this.selectedClient = this.clientList[0];
5838
+ this.selectedFilters.client = this.selectedClient.clientId;
5839
+ this.selectedFilters.clientName = this.selectedClient.clientName;
5840
+ // Ensure locations and groups are loaded before fetching stores
5841
+ this.getLocations();
5842
+ this.getGroups();
5843
+ // Fetch stores only after locations and groups are set
5844
+ this.getStore();
5845
+ localStorage.setItem("header-filters", JSON.stringify(this.selectedFilters));
5846
+ this.gs.dataRangeValue.next(this.selectedFilters);
5847
+ // console.log("4")
5848
+ this.cd.detectChanges();
5849
+ }
5850
+ },
5851
+ });
5852
+ }
5853
+ onClientSelect(event) {
5854
+ // Update the selected client
5855
+ this.selectedClient = event;
5856
+ // Clear previous filtered data and selections
5857
+ this.filteredGroups = [];
5858
+ this.filteredStores = [];
5859
+ this.filteredLocations = [];
5860
+ this.selectedFilters.stores = [];
5861
+ this.selectedFilters.group = [];
5862
+ this.selectedFilters.location = [];
5863
+ // Fetch header filters from localStorage
5864
+ const headerFilters = JSON.parse(localStorage.getItem("header-filters") || "{}");
5865
+ // Update the selected filters with the new client
5866
+ this.selectedFilters.client = this.selectedClient.clientId;
5867
+ this.selectedFilters.clientName = this.selectedClient.clientName;
5868
+ // Remove old store, group, and location data from the header filters
5869
+ delete headerFilters.stores;
5870
+ delete headerFilters.groups;
5871
+ delete headerFilters.location;
5872
+ // Fetch new data based on the new client
5873
+ this.getLocations();
5874
+ this.getStore();
5875
+ this.getGroups();
5876
+ // Update localStorage with the new client selection and empty filter data
5877
+ localStorage.setItem('header-filters', JSON.stringify(this.selectedFilters));
5878
+ window.location.reload();
5879
+ // Emit data to the global service
5880
+ // this.gs.dataRangeValue.next(this.selectedFilters);
5881
+ // Trigger change detection to reflect UI changes
5882
+ this.cd.detectChanges();
5883
+ }
5884
+ ranges = {
5885
+ Today: [dayjs(), dayjs()],
5886
+ Yesterday: [dayjs().subtract(1, 'days'), dayjs().subtract(1, 'days')],
5887
+ 'This Week': [dayjs().subtract(7, 'days'), dayjs().subtract(1, 'days')],
5888
+ 'Last Week': [
5889
+ dayjs().subtract(14, 'days').startOf('day'),
5890
+ dayjs().subtract(8, 'days').endOf('day'),
5891
+ ],
5892
+ 'This Month': [dayjs().subtract(30, 'days'), dayjs().subtract(1, 'days')],
5893
+ 'Last Month': [
5894
+ dayjs().subtract(1, 'month').startOf('month'),
5895
+ dayjs().subtract(1, 'month').endOf('month'),
5896
+ ],
5897
+ };
5898
+ onStartDateChange(event) {
5899
+ if (this.dayjs(event.startDate).isValid()) {
5900
+ this.isCustomDate = (m) => {
5901
+ const isValidDate = m > this.dayjs() || m > this.dayjs(event.startDate.add(90, "days"));
5902
+ return isValidDate ? "invalid-date" : false;
5903
+ };
5904
+ }
5905
+ }
5906
+ datechange(event) {
5907
+ if (event && event.startDate && event.endDate) {
5908
+ if (this.dayjs(event.startDate).isValid() &&
5909
+ this.dayjs(event.endDate).isValid()) {
5910
+ this.selectedDateRange.startDate = event.startDate;
5911
+ this.selectedDateRange.endDate = event.endDate;
5912
+ var datetime = {
5913
+ startDate: this.dayjs(event.startDate, "DD-MM-YYYY").format("YYYY-MM-DD"),
5914
+ endDate: this.dayjs(event.endDate, "DD-MM-YYYY").format("YYYY-MM-DD"),
5915
+ };
5916
+ this.selectedFilters.date = datetime;
5917
+ localStorage.setItem("header-filters", JSON.stringify(this.selectedFilters));
5918
+ window.location.reload();
5919
+ // this.gs.dataRangeValue.next(this.selectedFilters);
5920
+ }
5921
+ }
5922
+ }
5923
+ opendropdown(e) {
5924
+ e.stopPropagation();
5925
+ this.Opendropdown = !this.Opendropdown;
5926
+ }
5927
+ getLocations() {
5928
+ // const headerFilters: any = JSON.parse(localStorage.getItem("header-filters") || "{}");
5929
+ let obj = {
5930
+ clientId: this.selectedFilters.client ? this.selectedFilters.client : this.users.clientId,
5931
+ city: [],
5932
+ group: [],
5933
+ };
5934
+ this.auth.getLocation(obj).subscribe({
5935
+ next: (res) => {
5936
+ let cityList = this.selectedFilters?.location?.filter((location) => location.checked).map((loc) => loc.city);
5937
+ // Map the fetched locations with default unchecked state
5938
+ this.locations = res?.data?.locationData.map((city) => ({
5939
+ city: city.city,
5940
+ checked: cityList?.includes(city.city) ? true : false,
5941
+ }));
5942
+ // Sync the fetched locations with any stored checked values in localStorage
5943
+ if (this.selectedFilters.location && Array.isArray(this.selectedFilters.location)) {
5944
+ this.filteredLocations = this.locations.map(location => {
5945
+ const matchedLocation = this.selectedFilters.location.find((loc) => loc.city === location.city);
5946
+ return matchedLocation ? { ...location, checked: matchedLocation.checked } : location;
5947
+ });
5948
+ }
5949
+ else {
5950
+ this.filteredLocations = this.locations;
5951
+ }
5952
+ if (this.searchLocationText) {
5953
+ this.filteredLocations = this.locations.filter((location) => location.city.toLowerCase().includes(this.searchLocationText.toLowerCase()));
5954
+ }
5955
+ },
5956
+ error: (err) => {
5957
+ console.error("Failed to fetch locations", err);
5958
+ },
5959
+ });
5960
+ }
5961
+ isAllLocationsSelected() {
5962
+ return this.filteredLocations.every(location => location.checked);
5963
+ }
5964
+ selectedLocationsLabel() {
5965
+ const selectedLocations = this.locationLabel = this.searchLocationText.length ? this.locations
5966
+ .filter(location => location.checked).map(location => location.city) : this.filteredLocations
5967
+ .filter(location => location.checked).map(location => location.city);
5968
+ return selectedLocations.length === 0
5969
+ ? ''
5970
+ : selectedLocations.length === 1
5971
+ ? selectedLocations[0]
5972
+ : `${selectedLocations.length} locations`;
5973
+ }
5974
+ removeLocation() {
5975
+ this.Reset();
5976
+ }
5977
+ getGroups() {
5978
+ const city = this.locations
5979
+ .filter(location => location.checked)
5980
+ .map(location => location.city);
5981
+ const obj = { city, clientId: this.selectedFilters.client ? this.selectedFilters.client : this.users.clientId, group: [] };
5982
+ this.auth.getGroups(obj).subscribe({
5983
+ next: (res) => {
5984
+ let checkedGroup = this.selectedFilters?.group?.filter((group) => group.checked).map((group) => group.groupName);
5985
+ const combinedGroups = res?.data?.groupData?.map((groupName) => ({
5986
+ groupName: groupName.groupName,
5987
+ checked: checkedGroup?.includes(groupName.groupName) ? true : false,
5988
+ }));
5989
+ this.groupsData = combinedGroups;
5990
+ if (this.searchGroupText.length) {
5991
+ this.filteredGroups = combinedGroups.filter((item) => item.groupName.toLowerCase().includes(this.searchGroupText));
5992
+ }
5993
+ else {
5994
+ this.filteredGroups = combinedGroups;
5995
+ }
5996
+ // Auto-fetch stores when groups are selected
5997
+ const selectedGroups = this.groupsData.filter((group) => group.checked).map((group) => group.groupName);
5998
+ if (selectedGroups.length > 0) {
5999
+ this.getStore(); // Fetch stores based on selected groups
6000
+ }
6001
+ },
6002
+ error: (err) => {
6003
+ console.error("Failed to fetch groups", err);
6004
+ },
6005
+ });
6006
+ }
6007
+ toggleDropdown(type) {
6008
+ if (this.dropdownOpen === type) {
6009
+ // If the dropdown is open, close it and avoid resetting the selected values unnecessarily
6010
+ this.dropdownOpen = null;
6011
+ }
6012
+ else {
6013
+ // Open the specific dropdown and handle data fetching only if necessary
6014
+ this.dropdownOpen = type;
6015
+ if (type === 'group') {
6016
+ // Fetch groups only if there are selected cities and no active search text
6017
+ const selectedCities = this.locations
6018
+ .filter((location) => location.checked)
6019
+ .map((location) => location.city);
6020
+ // Fetch groups only if locations are selected, no search text exists, and dropdown is opened
6021
+ if (this.filteredLocations.length > 0 || (selectedCities.length > 0 && !this.searchGroupText.trim())) {
6022
+ this.getGroups();
6023
+ }
6024
+ else {
6025
+ this.filteredGroups = []; // Clear groups if no locations are selected
6026
+ }
6027
+ }
6028
+ if (type === 'store') {
6029
+ // Fetch stores only if not already fetched and no search text is active
6030
+ if ((!this.filteredStores || this.filteredStores.length === 0) && !this.searchStoreText.trim()) {
6031
+ this.getStore();
6032
+ }
6033
+ }
6034
+ }
6035
+ }
6036
+ handleGroupDropdownClick() {
6037
+ if (this.dropdownOpen === 'group') {
6038
+ this.resetSelectedGroups();
6039
+ }
6040
+ this.toggleDropdown('group');
6041
+ }
6042
+ resetSelectedGroups() {
6043
+ this.filteredGroups.forEach((group) => (group.checked = false));
6044
+ this.searchGroupText = "";
6045
+ }
6046
+ selectedGroupsLabel() {
6047
+ const selectedGroups = this.groupLabel = this.searchGroupText.length ? this.groupsData.filter((group) => group.checked) : this.filteredGroups.filter((group) => group.checked);
6048
+ return selectedGroups.length === 0
6049
+ ? ""
6050
+ : selectedGroups.length === 1
6051
+ ? selectedGroups[0].groupName
6052
+ : `${selectedGroups.length} groups`;
6053
+ }
6054
+ removeGroup() {
6055
+ this.Reset();
6056
+ }
6057
+ isAllGroupsSelected() {
6058
+ return this.filteredGroups.length ? this.filteredGroups.every((group) => group.checked) : false;
6059
+ }
6060
+ getStore() {
6061
+ const city = this.locations
6062
+ .filter(location => location.checked)
6063
+ .map(location => location.city);
6064
+ const group = this.groupsData
6065
+ .filter(group => group.checked)
6066
+ .map(group => group.groupName);
6067
+ const data = { city, clusters: group, clientId: this.users.clientId ? this.users.clientId : this.selectedFilters.client };
6068
+ this.auth.getHeaderStores(data).subscribe({
6069
+ next: (res) => {
6070
+ if (res && res.code === 200) {
6071
+ this.stores = res.data.storesData;
6072
+ // Retrieve checked store IDs from selectedFilters
6073
+ const checkedStoreIds = this.selectedFilters?.stores
6074
+ ? this.selectedFilters.stores.filter((store) => store.checked).map((store) => store.storeId)
6075
+ : [];
6076
+ this.stores.forEach(store => {
6077
+ if (checkedStoreIds.includes(store.storeId)) {
6078
+ store.checked = true; // Sync the checked state with full store list
6079
+ }
6080
+ });
6081
+ // Map the stores and retain the 'checked' status
6082
+ if (this.searchStoreText.length) {
6083
+ this.filteredStores = this.stores?.filter(store => store.storeName.toLowerCase().includes(this.searchStoreText));
6084
+ }
6085
+ else {
6086
+ this.filteredStores = this.stores;
6087
+ }
6088
+ // Ensure selectedFilters is in sync with filteredStores
6089
+ if (!this.selectedFilters.stores || !this.selectedFilters.stores.length) {
6090
+ this.stores.forEach(store => {
6091
+ store.checked = true; // Sync the checked state with full store list
6092
+ });
6093
+ // No previously selected stores, mark all as checked
6094
+ this.filteredStores = this.selectedFilters.stores = this.filteredStores.map(store => ({
6095
+ ...store,
6096
+ checked: true
6097
+ }));
6098
+ }
6099
+ else {
6100
+ // Update selectedFilters to reflect current state of stores
6101
+ this.selectedFilters.stores = this.filteredStores.map(store => ({
6102
+ ...store,
6103
+ checked: store.checked
6104
+ }));
6105
+ }
6106
+ // Update localStorage with the latest selectedFilters
6107
+ localStorage.setItem('header-filters', JSON.stringify(this.selectedFilters));
6108
+ // Emit data via service
6109
+ // this.gs.dataRangeValue.next(this.selectedFilters);
6110
+ // Trigger change detection to reflect changes in the UI
6111
+ this.cd.detectChanges();
6112
+ }
6113
+ else {
6114
+ this.stores = [];
6115
+ this.selectedFilters.stores = [];
6116
+ this.filteredStores = [];
6117
+ this.selectedFilters.stores = this.filteredStores.map(store => ({
6118
+ ...store,
6119
+ checked: false
6120
+ }));
6121
+ localStorage.setItem('header-filters', JSON.stringify(this.selectedFilters));
6122
+ }
6123
+ },
6124
+ error: (err) => {
6125
+ this.stores = [];
6126
+ this.selectedFilters.stores = this.filteredStores.map(store => ({
6127
+ ...store,
6128
+ checked: false
6129
+ }));
6130
+ this.filteredStores = [];
6131
+ this.selectedFilters.stores = [];
6132
+ localStorage.setItem('header-filters', JSON.stringify(this.selectedFilters));
6133
+ console.error("Failed to fetch stores", err);
6134
+ },
6135
+ });
6136
+ }
6137
+ resetSelectedStores() {
6138
+ this.filteredStores.forEach((store) => (store.checked = false));
6139
+ this.searchStoreText = "";
6140
+ }
6141
+ selectedStoresLabel() {
6142
+ const selectedStores = this.searchStoreText.length ? this.stores.filter((store) => store.checked) : this.filteredStores.filter((store) => store.checked);
6143
+ return selectedStores.length === 0
6144
+ ? "0 Stores"
6145
+ : selectedStores.length === 1
6146
+ ? selectedStores[0].storeName
6147
+ : `${selectedStores.length} Stores`;
6148
+ }
6149
+ isAllStoresSelected() {
6150
+ return this.filteredStores.length > 0 && this.filteredStores.every(store => store.checked);
6151
+ }
6152
+ // Method to handle dropdown item selection
6153
+ updateSelectedStores() {
6154
+ this.filteredStores.forEach(store => {
6155
+ const filteredStore = this.stores.findIndex(fStore => fStore.storeId === store.storeId);
6156
+ if (filteredStore != -1) {
6157
+ this.stores[filteredStore].checked = store.checked; // Sync the checked state with full store list
6158
+ }
6159
+ });
6160
+ // Update selectedFilters based on the current store selection
6161
+ this.selectedFilters.stores = this.stores.filter(store => store.checked);
6162
+ // Update localStorage with the latest selection
6163
+ localStorage.setItem('header-filters', JSON.stringify(this.selectedFilters));
6164
+ // Emit updated filters via service
6165
+ // this.gs.dataRangeValue.next(this.selectedFilters);
6166
+ // Trigger change detection if necessary
6167
+ this.cd.detectChanges();
6168
+ }
6169
+ toggleSelectAllLocations(event) {
6170
+ const isChecked = event.target.checked;
6171
+ this.filteredLocations.forEach((location) => (location.checked = isChecked));
6172
+ this.updateSelectedLocations();
6173
+ }
6174
+ toggleSelectAllStores(event) {
6175
+ const checked = event.target.checked;
6176
+ // Apply the selection to both filtered and full list of stores
6177
+ this.filteredStores.forEach(store => store.checked = checked);
6178
+ this.stores.forEach(store => {
6179
+ const filteredStore = this.filteredStores.find(fStore => fStore.storeId === store.storeId);
6180
+ if (filteredStore) {
6181
+ store.checked = checked; // Sync the checked state with full store list
6182
+ }
6183
+ });
6184
+ // Update the selected stores and persist the selection
6185
+ this.updateSelectedStores();
6186
+ }
6187
+ updateSelectedLocations() {
6188
+ // When locations are selected, fetch the related groups
6189
+ const selectedCities = this.filteredLocations
6190
+ .filter((location) => location.checked)
6191
+ .map((location) => location.city);
6192
+ this.filteredLocations.forEach((location) => {
6193
+ let findLocationIndex = this.locations.findIndex((loc) => loc.city == location.city);
6194
+ if (findLocationIndex != -1) {
6195
+ this.locations[findLocationIndex].checked = location.checked;
6196
+ }
6197
+ });
6198
+ if (selectedCities.length > 0 || !selectedCities.length) {
6199
+ this.selectedFilters.stores = [];
6200
+ this.selectedFilters.location = this.locations;
6201
+ this.getGroups(); // Fetch groups based on selected cities
6202
+ // If there are selected groups, fetch the stores based on selected groups
6203
+ this.getStore();
6204
+ }
6205
+ else {
6206
+ this.filteredGroups = []; // Clear groups if no locations are selected
6207
+ this.selectedFilters.location = [];
6208
+ }
6209
+ this.selectedFilters.group = [];
6210
+ this.filteredStores = []; // Reset stores as well
6211
+ this.searchGroupText = '';
6212
+ this.searchStoreText = '';
6213
+ // this.Opendropdown = false;
6214
+ }
6215
+ toggleSelectAllGroups(event) {
6216
+ const isChecked = event.target.checked;
6217
+ this.filteredGroups.forEach((group) => (group.checked = isChecked));
6218
+ this.updateSelectedGroups();
6219
+ // if (!isChecked) {
6220
+ // this.selectedFilters.stores =[];
6221
+ // // If there are selected groups, fetch the stores based on selected groups
6222
+ // this.getStore();
6223
+ // }
6224
+ }
6225
+ updateSelectedGroups() {
6226
+ // Fetch the relevant stores after groups are selected
6227
+ const selectedGroups = this.filteredGroups
6228
+ .filter((group) => group.checked)
6229
+ .map((group) => group.groupName);
6230
+ this.filteredGroups.forEach((group) => {
6231
+ let findGroupIndex = this.groupsData.findIndex((item) => item.groupName == group.groupName);
6232
+ if (findGroupIndex != -1) {
6233
+ this.groupsData[findGroupIndex].checked = group.checked;
6234
+ }
6235
+ });
6236
+ if (selectedGroups.length > 0 || !selectedGroups.length) {
6237
+ this.selectedFilters.stores = [];
6238
+ // If there are selected groups, fetch the stores based on selected groups
6239
+ this.getStore();
6240
+ this.selectedFilters.group = this.groupsData;
6241
+ }
6242
+ else {
6243
+ // If no groups are selected, clear the stores list
6244
+ this.filteredStores = [];
6245
+ // Also, update localStorage to reflect the cleared store selection
6246
+ this.selectedFilters.stores = [];
6247
+ localStorage.setItem('header-filters', JSON.stringify(this.selectedFilters));
6248
+ // Emit data via service
6249
+ // this.gs.dataRangeValue.next(this.selectedFilters);
6250
+ }
6251
+ // Clear the search store text when groups are updated
6252
+ this.searchStoreText = '';
6253
+ }
6254
+ Reset() {
6255
+ // Clear selected groups, stores, and locations
6256
+ this.filteredGroups = [];
6257
+ this.filteredStores = [];
6258
+ this.filteredLocations = []; // Reset locations as well
6259
+ // Clear search input fields
6260
+ this.searchLocationText = "";
6261
+ this.searchGroupText = "";
6262
+ this.searchStoreText = "";
6263
+ // Fetch locations, groups, and stores again
6264
+ this.getLocations();
6265
+ this.getStore();
6266
+ this.getGroups();
6267
+ // Reset the filters in selectedFilters
6268
+ this.selectedFilters = {
6269
+ ...this.selectedFilters,
6270
+ stores: [],
6271
+ group: [],
6272
+ location: [] // Clear locations selection
6273
+ };
6274
+ // // Once stores are fetched, mark all as checked
6275
+ // setTimeout(() => {
6276
+ // this.filteredStores = this.stores.map(store => ({
6277
+ // ...store,
6278
+ // checked: true // Mark all stores as checked
6279
+ // }));
6280
+ // // Sync selectedFilters with the updated store state
6281
+ // this.selectedFilters.stores = this.filteredStores.map(store => ({
6282
+ // ...store,
6283
+ // checked: true
6284
+ // }));
6285
+ // Update localStorage with the latest selectedFilters
6286
+ localStorage.setItem('header-filters', JSON.stringify(this.selectedFilters));
6287
+ window.location.reload();
6288
+ // Emit the reset filters to update other components if needed
6289
+ // this.gs.dataRangeValue.next(this.selectedFilters);
6290
+ // Trigger change detection
6291
+ this.cd.detectChanges();
6292
+ // Adding a slight delay to ensure stores are fetched first
6293
+ // Close dropdown after reset if necessary
6294
+ this.Opendropdown = false;
6295
+ }
6296
+ Apply() {
6297
+ // Close the dropdown
6298
+ this.Opendropdown = false;
6299
+ // Fetch existing filters from localStorage
6300
+ const headerFilters = JSON.parse(localStorage.getItem("header-filters") || "{}");
6301
+ // Ensure current selections are reflected
6302
+ this.selectedFilters.location = this.locations;
6303
+ this.selectedFilters.group = this.groupsData;
6304
+ this.selectedFilters.stores = headerFilters.stores ? headerFilters.stores : this.stores;
6305
+ // Store updated filters back in localStorage
6306
+ localStorage.setItem("header-filters", JSON.stringify(this.selectedFilters));
6307
+ window.location.reload();
6308
+ // Emit the updated filters via the service
6309
+ // this.gs.dataRangeValue.next(this.selectedFilters);
6310
+ // Trigger refresh if necessary
6311
+ // this.gs.manageRefreshTrigger.next(true);
6312
+ this.cd.detectChanges();
6313
+ }
6314
+ filterLocations() {
6315
+ const searchText = this.searchLocationText.toLowerCase();
6316
+ if (searchText) {
6317
+ // Preserve the checked state during filtering
6318
+ this.filteredLocations = this.locations
6319
+ .map(location => ({
6320
+ ...location,
6321
+ checked: this.filteredLocations.find(l => l.city === location.city)?.checked || false
6322
+ }))
6323
+ .filter(location => location?.city?.toLowerCase().includes(searchText));
6324
+ }
6325
+ else {
6326
+ // Restore the original checked state when search text is cleared
6327
+ this.filteredLocations = this.locations.map(location => ({
6328
+ ...location,
6329
+ checked: this.selectedFilters.location.find((l) => l.city === location.city)?.checked || false
6330
+ }));
6331
+ }
6332
+ }
6333
+ filterGroups() {
6334
+ const searchText = this.searchGroupText.toLowerCase();
6335
+ if (searchText) {
6336
+ // Preserve the checked state during filtering
6337
+ this.filteredGroups = this.groupsData
6338
+ .map(group => ({
6339
+ ...group,
6340
+ checked: this.filteredGroups.find(g => g.groupName === group.groupName)?.checked || false
6341
+ }))
6342
+ .filter(group => group?.groupName?.toLowerCase().includes(searchText));
6343
+ }
6344
+ else {
6345
+ // Restore the original checked state when search text is cleared
6346
+ this.filteredGroups = this.groupsData.map(group => ({
6347
+ ...group,
6348
+ checked: this.selectedFilters.group.find((g) => g.groupName === group.groupName)?.checked || false
6349
+ }));
6350
+ }
6351
+ }
6352
+ filterStores() {
6353
+ const searchText = this.searchStoreText.toLowerCase();
6354
+ // Preserve checked states during filtering
6355
+ if (searchText) {
6356
+ // Filter based on search text while preserving checked state
6357
+ this.filteredStores = this.stores
6358
+ .map(store => ({
6359
+ ...store,
6360
+ // Check if the store is already checked in filteredStores, fallback to original stores' checked state
6361
+ checked: this.selectedFilters.stores.find((s) => s.storeId === store.storeId)?.checked || store.checked || false
6362
+ }))
6363
+ .filter(store => store.storeName.toLowerCase().includes(searchText));
6364
+ }
6365
+ else {
6366
+ // When the search text is cleared, restore the original list with preserved checked states
6367
+ this.filteredStores = this.stores.map(store => ({
6368
+ ...store,
6369
+ // Preserve the checked state based on the selected filters
6370
+ checked: this.selectedFilters.stores.find((s) => s.storeId === store.storeId)?.checked || store.checked || false
6371
+ }));
6372
+ }
6373
+ }
6374
+ closeDropdown() {
6375
+ this.dropdownOpen = null;
6376
+ }
6377
+ clickOutside(event) {
6378
+ const clickedInside = event.target.closest(".dropdown-container");
6379
+ const clickedoutSide = event.target.closest(".dropdown1");
6380
+ if (!clickedInside) {
6381
+ this.closeDropdown();
6382
+ }
6383
+ if (!clickedoutSide) {
6384
+ this.closeDropdown1();
6385
+ }
6386
+ }
6387
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TrafficNobComponent, deps: [{ token: AuthService }, { token: i2.Router }, { token: i1.GlobalStateService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
6388
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TrafficNobComponent, selector: "lib-traffic-nob", host: { listeners: { "document:click": "clickOutside($event)" } }, ngImport: i0, template: "<div class=\"me-3\">\r\n <label *ngIf=\"selectedLocationsLabel()\" class=\"badge badge-light-default mx-2\">{{selectedLocationsLabel()}} \r\n <span class=\"cursor-pointer\" (click)=\"removeLocation()\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg></span>\r\n </label>\r\n <label *ngIf=\"selectedGroupsLabel()\" class=\"badge badge-light-default mx-2\">{{selectedGroupsLabel()}} \r\n <span class=\"cursor-pointer\" (click)=\"removeGroup()\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg></span>\r\n </label>\r\n <label class=\"badge badge-light-default\">{{selectedStoresLabel()}}</label>\r\n</div>\r\n\r\n<div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M13.3333 1.66663V4.99996M6.66667 1.66663V4.99996M2.5 8.33329H17.5M4.16667 3.33329H15.8333C16.7538 3.33329 17.5 4.07948 17.5 4.99996V16.6666C17.5 17.5871 16.7538 18.3333 15.8333 18.3333H4.16667C3.24619 18.3333 2.5 17.5871 2.5 16.6666V4.99996C2.5 4.07948 3.24619 3.33329 4.16667 3.33329Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n <input class=\"fx-date-range form-control ps-14\" style=\"min-width: 260px !important;\" type=\"text\" matInput\r\n ngxDaterangepickerMd [drops]=\"'down'\" [opens]=\"'right'\" [ranges]=\"ranges\" [showCustomRangeLabel]=\"true\" [autoApply]=\"true\"\r\n [alwaysShowCalendars]=\"false\" [keepCalendarOpeningWithRange]=\"true\" [showCancel]=\"true\" autocomplete=\"off\"\r\n [(ngModel)]=\"selectedDateRange\" (startDateChanged)=\"onStartDateChange($event)\" [isCustomDate]=\"isCustomDate\"\r\n [locale]=\"{ format: 'DD-MM-YYYY', firstDay: 1, monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] }\"\r\n (datesUpdated)=\"datechange($event)\" name=\"daterange\" [readonly]=\"true\" />\r\n</div>\r\n<div class=\"position-relative\">\r\n <button type=\"button\" (click)=\"opendropdown($event)\" class=\"btn btn-default mx-2 rounded-3 text-nowrap border-val\">\r\n <!-- <span class=\"me-2\">Filter</span> -->\r\n <svg class=\"pl-3\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M5 10H15M2.5 5H17.5M7.5 15H12.5\" stroke=\"#344054\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n\r\n <div *ngIf=\"Opendropdown\" class=\"card p-5 dropdown1 position-absolute z-1 end-0\" style=\"z-index: 1 !important;\" (clickOutside)=\"closeDropdown1()\">\r\n <div class=\"dropdown-title d-flex justify-content-between mb-2\">Filter Options\r\n <button class=\"btn btn-outline w-25 ms-3 btn-resize\" (click)=\"Reset()\"> Reset </button>\r\n <button class=\"btn btn-primary w-25 btn-resize\" (click)=\"Apply()\">Apply</button>\r\n </div>\r\n\r\n <!-- Location Dropdown -->\r\n<div class=\"dropdown-container\" (clickOutside)=\"closeDropdown()\">\r\n <div class=\"dropdown-header\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control dropdown-input cursor-pointer\" \r\n [value]=\"selectedLocationsLabel()\"\r\n (focus)=\"toggleDropdown('location')\" \r\n readonly\r\n placeholder=\"Select locations...\"\r\n />\r\n </div>\r\n <div class=\"dropdown-menu custom-dropdown-menu\" *ngIf=\"dropdownOpen === 'location'\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control mb-2 dropdown-search\" \r\n placeholder=\"Search locations...\" \r\n [(ngModel)]=\"searchLocationText\" \r\n (ngModelChange)=\"filterLocations()\" \r\n />\r\n <div class=\"form-check mb-2 dropdown-item custom-dropdown-item\">\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n id=\"selectAllLocations\" \r\n [checked]=\"isAllLocationsSelected()\" \r\n (change)=\"toggleSelectAllLocations($event)\" \r\n />\r\n <label class=\"form-check-label\" for=\"selectAllLocations\">\r\n Select All Locations\r\n </label>\r\n </div>\r\n <div \r\n class=\"dropdown-item form-check custom-dropdown-item\" \r\n *ngFor=\"let location of filteredLocations\"\r\n >\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n [id]=\"location.city\" \r\n [(ngModel)]=\"location.checked\"\r\n (change)=\"updateSelectedLocations()\" \r\n />\r\n <label class=\"form-check-label\" [for]=\"location.city\">\r\n {{ location.city }}\r\n </label>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Group Dropdown -->\r\n<div class=\"dropdown-container mt-3\" (clickOutside)=\"closeDropdown()\">\r\n <div class=\"dropdown-header\" (click)=\"toggleDropdown('group')\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control dropdown-input cursor-pointer\" \r\n [value]=\"selectedGroupsLabel()\" readonly\r\n placeholder=\"Select clusters..\"\r\n />\r\n </div>\r\n <div class=\"dropdown-menu custom-dropdown-menu\" *ngIf=\"dropdownOpen === 'group'\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control mb-2 dropdown-search\" \r\n placeholder=\"Search clusters...\" \r\n [(ngModel)]=\"searchGroupText\" \r\n (ngModelChange)=\"filterGroups()\" \r\n />\r\n <div class=\"form-check mb-2 dropdown-item custom-dropdown-item\">\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n id=\"selectAllGroups\" \r\n [checked]=\"isAllGroupsSelected()\" \r\n (change)=\"toggleSelectAllGroups($event)\" \r\n />\r\n <label class=\"form-check-label\" for=\"selectAllGroups\">\r\n Select All\r\n </label>\r\n </div>\r\n <div \r\n class=\"dropdown-item form-check custom-dropdown-item\" \r\n *ngFor=\"let group of filteredGroups\"\r\n >\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n [id]=\"group.groupName\"\r\n [(ngModel)]=\"group.checked\"\r\n (change)=\"updateSelectedGroups()\" \r\n />\r\n <label class=\"form-check-label\" [for]=\"group.groupName\">\r\n {{ group.groupName }}\r\n </label>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n<!-- Store Dropdown -->\r\n<div class=\"dropdown-container mt-3\" (clickOutside)=\"closeDropdown()\">\r\n <div class=\"dropdown-header\" (click)=\"toggleDropdown('store')\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control dropdown-input cursor-pointer\"\r\n [value]=\"selectedStoresLabel()\"\r\n readonly\r\n placeholder=\"Select stores...\"\r\n />\r\n </div>\r\n <div class=\"dropdown-menu custom-dropdown-menu\" *ngIf=\"dropdownOpen === 'store'\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control mb-2 dropdown-search \" \r\n placeholder=\"Search stores...\" \r\n [(ngModel)]=\"searchStoreText\" \r\n (ngModelChange)=\"filterStores()\" \r\n />\r\n <div class=\"form-check mb-2 dropdown-item custom-dropdown-item\">\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n id=\"selectAllStores\" \r\n [checked]=\"isAllStoresSelected()\" \r\n (change)=\"toggleSelectAllStores($event)\" \r\n />\r\n <label class=\"form-check-label\" for=\"selectAllStores\">\r\n Select All\r\n </label>\r\n </div>\r\n <div \r\n class=\"dropdown-item form-check custom-dropdown-item\" \r\n *ngFor=\"let store of filteredStores\"\r\n >\r\n <input \r\n class=\"form-check-input\" \r\n type=\"checkbox\" \r\n [id]=\"store.storeId\"\r\n [(ngModel)]=\"store.checked\"\r\n (change)=\"updateSelectedStores()\" \r\n />\r\n <label class=\"form-check-label\" [for]=\"store.storeId\">\r\n {{ store.storeName }}\r\n </label>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</div>", styles: [".daterangepicker{display:block!important;top:153.85px!important;left:900px!important;right:0}.form-control{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize}::ng-deep .applyBtn{display:none!important}:host::ng-deep .md-drppicker .btn{line-height:10px!important}:host::ng-deep .daterangepicker-input+.ngx-daterangepicker-material .applyBtn{display:none}:host::ng-deep .md-drppicker.drops-down-right.ltr.double.show-ranges.shown{top:65px!important;left:-470px!important;height:365px!important}:host::ng-deep .md-drppicker .btn{border-radius:8px!important;border:1px solid var(--Primary-600, #00A3FF)!important;background:var(--Primary-600, #00A3FF)!important;box-shadow:0 1px 2px #1018280d!important;color:var(--White, #FFF)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}:host::ng-deep .md-drppicker .ranges ul li button{padding:12px 16px;width:160px;color:var(--Gray-700, #344054);font-size:14px;font-weight:400;line-height:20px;background:none;border:none;text-align:left;cursor:pointer}:host::ng-deep .md-drppicker td.active,:host::ng-deep .md-drppicker td.active:hover{background-color:#029cf4!important;border-radius:20px!important;color:var(--White, #FFF)!important;text-align:center!important;font-size:14px!important;font-weight:500!important;line-height:20px}:host::ng-deep .md-drppicker.ltr .ranges{float:left;margin-top:10px!important}:host::ng-deep .md-drppicker td.in-range{background:var(--Primary-50, #EAF8FF)}:host::ng-deep .md-drppicker .ranges ul li button.active{background:var(--Primary-50, #EAF8FF)!important;border-radius:8px!important;color:var(--Primary-700, #009BF3);font-size:14px!important;font-weight:500!important;line-height:20px!important}:host::ng-deep table th,:host::ng-deep table td{width:40px!important;height:40px!important;padding:10px 8px!important}:host::ng-deep .md-drppicker td.available.prev,:host::ng-deep .md-drppicker th.available.prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMy43IDYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDMuNyA2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik0zLjcsMC43TDEuNCwzbDIuMywyLjNMMyw2TDAsM2wzLTNMMy43LDAuN3oiLz4NCjwvZz4NCjwvc3ZnPg0K)!important;background-repeat:no-repeat!important;background-size:.5em!important;background-position:center!important}:host::ng-deep .md-drppicker td.available.next,:host::ng-deep .md-drppicker th.available.next{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMy43IDYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDMuNyA2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik0zLjcsMC43TDEuNCwzbDIuMywyLjNMMyw2TDAsM2wzLTNMMy43LDAuN3oiLz4NCjwvZz4NCjwvc3ZnPg0K)!important;background-repeat:no-repeat!important;background-size:.5em!important;background-position:center!important}:host::ng-deep table th{border-bottom:0px solid var(--Gray-200, #EAECF0)!important;background:transparent!important;color:var(--Gray-700, #344054)!important;text-align:center;font-size:16px!important;font-weight:500!important;line-height:24px}:host::ng-deep .md-drppicker .btn.btn-default{border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize;margin-right:10px!important}:host::ng-deep .md-drppicker td.available.invalid-date{text-decoration:line-through;pointer-events:none;color:#a9a9a9}:host::ng-deep .md-drppicker td.available.today:not(.invalid-date){text-decoration:unset;pointer-events:unset;color:unset}.wrapper{min-width:200px}.btn-primary{line-height:18px!important}.filter-label{color:var(--Gray-500, #667085)!important;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.position-relative{position:relative}.filter-icon{cursor:pointer}.dropdown-container{position:relative;display:inline-block;width:100%}.dropdown-header{cursor:pointer;width:100%}.form-control{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize;width:100%;box-sizing:border-box}.dropdown-menu{position:absolute;top:100%;left:0;right:0;border:1px solid #ccc;background-color:#fff;z-index:1000;max-height:230px;overflow-y:auto;display:block;box-sizing:border-box;padding:10px 5px}.dropdown-item{padding:6px 0}.dropdown-item:hover{background-color:#f1f1f1}.dropdown-item input[type=checkbox]{margin-right:10px}.custom-dropdown-menu{border-radius:4px;box-shadow:0 1px 2px #1018280d}.custom-dropdown-item{display:flex;align-items:center}.custom-dropdown-item input{margin-left:10px}.btn-resize{font-size:13px!important;height:29px!important;line-height:11px!important;padding:3px!important}.dropdown1{position:absolute;top:70px;min-width:270px!important}.dropdown1 .dropdown-title{color:var(--Gray-900, #101828);font-size:14px;font-weight:600;line-height:24px}.dropdown1 .dropdown{position:relative;display:inline-block}.dropdown1 .dropdown span{color:var(--Gray-700, #344054);font-size:14px;font-weight:600;line-height:20px}::ng-deep .dropdown1{z-index:1!important}.form-check-label{color:var(--Gray-700, #344054)!important;font-size:14px;font-style:normal;font-weight:500;line-height:20px}input[type=checkbox]{width:16px!important;height:16px!important;margin:0 5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.2em;padding-left:0;padding-top:9px;padding-right:4px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.DaterangepickerDirective, selector: "input[ngxDaterangepickerMd]", inputs: ["minDate", "maxDate", "autoApply", "alwaysShowCalendars", "showCustomRangeLabel", "linkedCalendars", "dateLimit", "singleDatePicker", "showWeekNumbers", "showISOWeekNumbers", "showDropdowns", "isInvalidDate", "isCustomDate", "isTooltipDate", "showClearButton", "customRangeDirection", "ranges", "opens", "drops", "firstMonthDayClass", "lastMonthDayClass", "emptyWeekRowClass", "emptyWeekColumnClass", "firstDayOfNextMonthClass", "lastDayOfPreviousMonthClass", "keepCalendarOpeningWithRange", "showRangeLabelOnInput", "showCancel", "lockStartDate", "timePicker", "timePicker24Hour", "timePickerIncrement", "timePickerSeconds", "closeOnAutoApply", "endKeyHolder", "startKey", "locale", "endKey"], outputs: ["change", "rangeClicked", "datesUpdated", "startDateChanged", "endDateChanged", "clearClicked"] }] });
6389
+ }
6390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TrafficNobComponent, decorators: [{
6391
+ type: Component,
6392
+ args: [{ selector: 'lib-traffic-nob', template: "<div class=\"me-3\">\r\n <label *ngIf=\"selectedLocationsLabel()\" class=\"badge badge-light-default mx-2\">{{selectedLocationsLabel()}} \r\n <span class=\"cursor-pointer\" (click)=\"removeLocation()\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg></span>\r\n </label>\r\n <label *ngIf=\"selectedGroupsLabel()\" class=\"badge badge-light-default mx-2\">{{selectedGroupsLabel()}} \r\n <span class=\"cursor-pointer\" (click)=\"removeGroup()\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\r\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"#667085\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg></span>\r\n </label>\r\n <label class=\"badge badge-light-default\">{{selectedStoresLabel()}}</label>\r\n</div>\r\n\r\n<div class=\"d-flex align-items-center position-relative my-1\">\r\n <span class=\"svg-icon svg-icon-1 position-absolute ms-3\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M13.3333 1.66663V4.99996M6.66667 1.66663V4.99996M2.5 8.33329H17.5M4.16667 3.33329H15.8333C16.7538 3.33329 17.5 4.07948 17.5 4.99996V16.6666C17.5 17.5871 16.7538 18.3333 15.8333 18.3333H4.16667C3.24619 18.3333 2.5 17.5871 2.5 16.6666V4.99996C2.5 4.07948 3.24619 3.33329 4.16667 3.33329Z\"\r\n stroke=\"#344054\" stroke-width=\"1.67\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </span>\r\n <input class=\"fx-date-range form-control ps-14\" style=\"min-width: 260px !important;\" type=\"text\" matInput\r\n ngxDaterangepickerMd [drops]=\"'down'\" [opens]=\"'right'\" [ranges]=\"ranges\" [showCustomRangeLabel]=\"true\" [autoApply]=\"true\"\r\n [alwaysShowCalendars]=\"false\" [keepCalendarOpeningWithRange]=\"true\" [showCancel]=\"true\" autocomplete=\"off\"\r\n [(ngModel)]=\"selectedDateRange\" (startDateChanged)=\"onStartDateChange($event)\" [isCustomDate]=\"isCustomDate\"\r\n [locale]=\"{ format: 'DD-MM-YYYY', firstDay: 1, monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] }\"\r\n (datesUpdated)=\"datechange($event)\" name=\"daterange\" [readonly]=\"true\" />\r\n</div>\r\n<div class=\"position-relative\">\r\n <button type=\"button\" (click)=\"opendropdown($event)\" class=\"btn btn-default mx-2 rounded-3 text-nowrap border-val\">\r\n <!-- <span class=\"me-2\">Filter</span> -->\r\n <svg class=\"pl-3\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M5 10H15M2.5 5H17.5M7.5 15H12.5\" stroke=\"#344054\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n\r\n <div *ngIf=\"Opendropdown\" class=\"card p-5 dropdown1 position-absolute z-1 end-0\" style=\"z-index: 1 !important;\" (clickOutside)=\"closeDropdown1()\">\r\n <div class=\"dropdown-title d-flex justify-content-between mb-2\">Filter Options\r\n <button class=\"btn btn-outline w-25 ms-3 btn-resize\" (click)=\"Reset()\"> Reset </button>\r\n <button class=\"btn btn-primary w-25 btn-resize\" (click)=\"Apply()\">Apply</button>\r\n </div>\r\n\r\n <!-- Location Dropdown -->\r\n<div class=\"dropdown-container\" (clickOutside)=\"closeDropdown()\">\r\n <div class=\"dropdown-header\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control dropdown-input cursor-pointer\" \r\n [value]=\"selectedLocationsLabel()\"\r\n (focus)=\"toggleDropdown('location')\" \r\n readonly\r\n placeholder=\"Select locations...\"\r\n />\r\n </div>\r\n <div class=\"dropdown-menu custom-dropdown-menu\" *ngIf=\"dropdownOpen === 'location'\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control mb-2 dropdown-search\" \r\n placeholder=\"Search locations...\" \r\n [(ngModel)]=\"searchLocationText\" \r\n (ngModelChange)=\"filterLocations()\" \r\n />\r\n <div class=\"form-check mb-2 dropdown-item custom-dropdown-item\">\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n id=\"selectAllLocations\" \r\n [checked]=\"isAllLocationsSelected()\" \r\n (change)=\"toggleSelectAllLocations($event)\" \r\n />\r\n <label class=\"form-check-label\" for=\"selectAllLocations\">\r\n Select All Locations\r\n </label>\r\n </div>\r\n <div \r\n class=\"dropdown-item form-check custom-dropdown-item\" \r\n *ngFor=\"let location of filteredLocations\"\r\n >\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n [id]=\"location.city\" \r\n [(ngModel)]=\"location.checked\"\r\n (change)=\"updateSelectedLocations()\" \r\n />\r\n <label class=\"form-check-label\" [for]=\"location.city\">\r\n {{ location.city }}\r\n </label>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Group Dropdown -->\r\n<div class=\"dropdown-container mt-3\" (clickOutside)=\"closeDropdown()\">\r\n <div class=\"dropdown-header\" (click)=\"toggleDropdown('group')\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control dropdown-input cursor-pointer\" \r\n [value]=\"selectedGroupsLabel()\" readonly\r\n placeholder=\"Select clusters..\"\r\n />\r\n </div>\r\n <div class=\"dropdown-menu custom-dropdown-menu\" *ngIf=\"dropdownOpen === 'group'\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control mb-2 dropdown-search\" \r\n placeholder=\"Search clusters...\" \r\n [(ngModel)]=\"searchGroupText\" \r\n (ngModelChange)=\"filterGroups()\" \r\n />\r\n <div class=\"form-check mb-2 dropdown-item custom-dropdown-item\">\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n id=\"selectAllGroups\" \r\n [checked]=\"isAllGroupsSelected()\" \r\n (change)=\"toggleSelectAllGroups($event)\" \r\n />\r\n <label class=\"form-check-label\" for=\"selectAllGroups\">\r\n Select All\r\n </label>\r\n </div>\r\n <div \r\n class=\"dropdown-item form-check custom-dropdown-item\" \r\n *ngFor=\"let group of filteredGroups\"\r\n >\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n [id]=\"group.groupName\"\r\n [(ngModel)]=\"group.checked\"\r\n (change)=\"updateSelectedGroups()\" \r\n />\r\n <label class=\"form-check-label\" [for]=\"group.groupName\">\r\n {{ group.groupName }}\r\n </label>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n<!-- Store Dropdown -->\r\n<div class=\"dropdown-container mt-3\" (clickOutside)=\"closeDropdown()\">\r\n <div class=\"dropdown-header\" (click)=\"toggleDropdown('store')\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control dropdown-input cursor-pointer\"\r\n [value]=\"selectedStoresLabel()\"\r\n readonly\r\n placeholder=\"Select stores...\"\r\n />\r\n </div>\r\n <div class=\"dropdown-menu custom-dropdown-menu\" *ngIf=\"dropdownOpen === 'store'\">\r\n <input \r\n type=\"text\" \r\n class=\"form-control mb-2 dropdown-search \" \r\n placeholder=\"Search stores...\" \r\n [(ngModel)]=\"searchStoreText\" \r\n (ngModelChange)=\"filterStores()\" \r\n />\r\n <div class=\"form-check mb-2 dropdown-item custom-dropdown-item\">\r\n <input \r\n class=\"form-check-input cursor-pointer\" \r\n type=\"checkbox\" \r\n id=\"selectAllStores\" \r\n [checked]=\"isAllStoresSelected()\" \r\n (change)=\"toggleSelectAllStores($event)\" \r\n />\r\n <label class=\"form-check-label\" for=\"selectAllStores\">\r\n Select All\r\n </label>\r\n </div>\r\n <div \r\n class=\"dropdown-item form-check custom-dropdown-item\" \r\n *ngFor=\"let store of filteredStores\"\r\n >\r\n <input \r\n class=\"form-check-input\" \r\n type=\"checkbox\" \r\n [id]=\"store.storeId\"\r\n [(ngModel)]=\"store.checked\"\r\n (change)=\"updateSelectedStores()\" \r\n />\r\n <label class=\"form-check-label\" [for]=\"store.storeId\">\r\n {{ store.storeName }}\r\n </label>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</div>", styles: [".daterangepicker{display:block!important;top:153.85px!important;left:900px!important;right:0}.form-control{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize}::ng-deep .applyBtn{display:none!important}:host::ng-deep .md-drppicker .btn{line-height:10px!important}:host::ng-deep .daterangepicker-input+.ngx-daterangepicker-material .applyBtn{display:none}:host::ng-deep .md-drppicker.drops-down-right.ltr.double.show-ranges.shown{top:65px!important;left:-470px!important;height:365px!important}:host::ng-deep .md-drppicker .btn{border-radius:8px!important;border:1px solid var(--Primary-600, #00A3FF)!important;background:var(--Primary-600, #00A3FF)!important;box-shadow:0 1px 2px #1018280d!important;color:var(--White, #FFF)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize}:host::ng-deep .md-drppicker .ranges ul li button{padding:12px 16px;width:160px;color:var(--Gray-700, #344054);font-size:14px;font-weight:400;line-height:20px;background:none;border:none;text-align:left;cursor:pointer}:host::ng-deep .md-drppicker td.active,:host::ng-deep .md-drppicker td.active:hover{background-color:#029cf4!important;border-radius:20px!important;color:var(--White, #FFF)!important;text-align:center!important;font-size:14px!important;font-weight:500!important;line-height:20px}:host::ng-deep .md-drppicker.ltr .ranges{float:left;margin-top:10px!important}:host::ng-deep .md-drppicker td.in-range{background:var(--Primary-50, #EAF8FF)}:host::ng-deep .md-drppicker .ranges ul li button.active{background:var(--Primary-50, #EAF8FF)!important;border-radius:8px!important;color:var(--Primary-700, #009BF3);font-size:14px!important;font-weight:500!important;line-height:20px!important}:host::ng-deep table th,:host::ng-deep table td{width:40px!important;height:40px!important;padding:10px 8px!important}:host::ng-deep .md-drppicker td.available.prev,:host::ng-deep .md-drppicker th.available.prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMy43IDYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDMuNyA2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik0zLjcsMC43TDEuNCwzbDIuMywyLjNMMyw2TDAsM2wzLTNMMy43LDAuN3oiLz4NCjwvZz4NCjwvc3ZnPg0K)!important;background-repeat:no-repeat!important;background-size:.5em!important;background-position:center!important}:host::ng-deep .md-drppicker td.available.next,:host::ng-deep .md-drppicker th.available.next{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMy43IDYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDMuNyA2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik0zLjcsMC43TDEuNCwzbDIuMywyLjNMMyw2TDAsM2wzLTNMMy43LDAuN3oiLz4NCjwvZz4NCjwvc3ZnPg0K)!important;background-repeat:no-repeat!important;background-size:.5em!important;background-position:center!important}:host::ng-deep table th{border-bottom:0px solid var(--Gray-200, #EAECF0)!important;background:transparent!important;color:var(--Gray-700, #344054)!important;text-align:center;font-size:16px!important;font-weight:500!important;line-height:24px}:host::ng-deep .md-drppicker .btn.btn-default{border-radius:8px!important;border:1px solid var(--Gray-300, #D0D5DD)!important;background:var(--White, #FFF)!important;box-shadow:0 1px 2px #1018280d!important;color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:600!important;line-height:20px;text-transform:capitalize;margin-right:10px!important}:host::ng-deep .md-drppicker td.available.invalid-date{text-decoration:line-through;pointer-events:none;color:#a9a9a9}:host::ng-deep .md-drppicker td.available.today:not(.invalid-date){text-decoration:unset;pointer-events:unset;color:unset}.wrapper{min-width:200px}.btn-primary{line-height:18px!important}.filter-label{color:var(--Gray-500, #667085)!important;font-size:14px;font-style:normal;font-weight:600;line-height:20px;text-transform:capitalize}.position-relative{position:relative}.filter-icon{cursor:pointer}.dropdown-container{position:relative;display:inline-block;width:100%}.dropdown-header{cursor:pointer;width:100%}.form-control{color:var(--Gray-700, #344054)!important;font-size:14px!important;font-weight:600;line-height:20px;text-transform:capitalize;width:100%;box-sizing:border-box}.dropdown-menu{position:absolute;top:100%;left:0;right:0;border:1px solid #ccc;background-color:#fff;z-index:1000;max-height:230px;overflow-y:auto;display:block;box-sizing:border-box;padding:10px 5px}.dropdown-item{padding:6px 0}.dropdown-item:hover{background-color:#f1f1f1}.dropdown-item input[type=checkbox]{margin-right:10px}.custom-dropdown-menu{border-radius:4px;box-shadow:0 1px 2px #1018280d}.custom-dropdown-item{display:flex;align-items:center}.custom-dropdown-item input{margin-left:10px}.btn-resize{font-size:13px!important;height:29px!important;line-height:11px!important;padding:3px!important}.dropdown1{position:absolute;top:70px;min-width:270px!important}.dropdown1 .dropdown-title{color:var(--Gray-900, #101828);font-size:14px;font-weight:600;line-height:24px}.dropdown1 .dropdown{position:relative;display:inline-block}.dropdown1 .dropdown span{color:var(--Gray-700, #344054);font-size:14px;font-weight:600;line-height:20px}::ng-deep .dropdown1{z-index:1!important}.form-check-label{color:var(--Gray-700, #344054)!important;font-size:14px;font-style:normal;font-weight:500;line-height:20px}input[type=checkbox]{width:16px!important;height:16px!important;margin:0 5px;border-radius:4px!important;-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;appearance:none;outline:1px solid var(--gray-300, #D0D5DD);box-shadow:none;font-size:.8em;text-align:center;line-height:1em;background:#fff}input[type=checkbox]:checked{outline:1px solid var(--primary-600, #00A3FF);background-color:var(--primary-50, #EAF8FF)}input[type=checkbox]:checked:after{content:\"\";transform:rotate(45deg);border-bottom:2px solid #00A3FF;border-right:2px solid #00A3FF;display:inline-block;width:.2em;padding-left:0;padding-top:9px;padding-right:4px}\n"] }]
6393
+ }], ctorParameters: () => [{ type: AuthService }, { type: i2.Router }, { type: i1.GlobalStateService }, { type: i0.ChangeDetectorRef }], propDecorators: { onClick: [{
6394
+ type: HostListener,
6395
+ args: ['document:click', ['$event']]
6396
+ }], clickOutside: [{
6397
+ type: HostListener,
6398
+ args: ["document:click", ["$event"]]
6399
+ }] } });
6400
+
5628
6401
  class ToolbarComponent {
5629
6402
  layout;
5630
6403
  router;
@@ -5667,6 +6440,7 @@ class ToolbarComponent {
5667
6440
  urlString;
5668
6441
  traxwithoutdatepicker;
5669
6442
  storesSingle;
6443
+ nobWithoutClient;
5670
6444
  constructor(layout, router, route, gs) {
5671
6445
  this.layout = layout;
5672
6446
  this.router = router;
@@ -5745,10 +6519,10 @@ class ToolbarComponent {
5745
6519
  URL == "/manage/stores" || URL === "/manage/stores?type=stores" || URL === "/manage/stores?type=clusters" ||
5746
6520
  URL == "/manage/stores/addition-method" ||
5747
6521
  URL == "/manage/stores/add-single-store" || URL === "/manage/trax/gallery" || URL == "/notifications/alerts?tab=alert" || URL == "/notifications/alerts?tab=download") {
5748
- this.setUIProperties(true, false, false, false, false, false, false, false, false);
6522
+ this.setUIProperties(true, false, false, false, false, false, false, false, false, false);
5749
6523
  }
5750
6524
  else if (url[3] == "edge-app") {
5751
- this.setUIProperties(false, false, false, false, true, false, false, false, false);
6525
+ this.setUIProperties(false, false, false, false, true, false, false, false, false, false);
5752
6526
  }
5753
6527
  else if (URL == `/manage/stores/infra-ticket?storeId=${this.storeId}` || URL == `/manage/stores/infra-ticket?storeId=${this.storeId}&type=infra` ||
5754
6528
  URL == `/manage/stores/settings?storeId=${this.storeId}` || URL == `/manage/stores/infra-ticket?storeId=${this.storeId}&type=dataMismatch` ||
@@ -5756,44 +6530,47 @@ class ToolbarComponent {
5756
6530
  URL == `/manage/stores/cameras?storeId=${this.storeId}` ||
5757
6531
  // URL == `/manage/stores/infrastructure?storeId=${this.storeId}` ||
5758
6532
  URL == `/manage/stores/mat?storeId=${this.storeId}`) {
5759
- this.setUIProperties(false, false, false, true, false, false, false, false, false);
6533
+ this.setUIProperties(false, false, false, true, false, false, false, false, false, false);
5760
6534
  }
5761
6535
  else if (url[2] === 'controlcenter') {
5762
6536
  if (URL == `/manage/controlcenter/playback?storeId=${this.storeId}` || URL == `/manage/controlcenter/playback`) {
5763
- this.setUIProperties(false, false, false, false, false, false, false, false, true);
6537
+ this.setUIProperties(false, false, false, false, false, false, false, false, true, false);
5764
6538
  }
5765
6539
  else {
5766
- this.setUIProperties(false, false, false, false, true, false, false, false, false);
6540
+ this.setUIProperties(false, false, false, false, true, false, false, false, false, false);
5767
6541
  }
5768
6542
  }
5769
6543
  else if (URL == "/profile" || url[2] === "data-mismatch" || url[2] === "employeetraining"
5770
6544
  || URL == "/manage/brands" || URL == "/manage/users/tango" || (url[1] === "tickets" && url[2] === "audit")) {
5771
- this.setUIProperties(false, false, false, false, false, false, false, false, false);
6545
+ this.setUIProperties(false, false, false, false, false, false, false, false, false, false);
6546
+ }
6547
+ else if (URL == "/manage/traffic/nob") {
6548
+ this.setUIProperties(false, false, false, false, false, false, false, false, false, true);
5772
6549
  }
5773
6550
  else if (url[2] === "traffic" || url[2] === "zones" || URL == "/manage/analyse/reports") {
5774
- this.setUIProperties(false, false, false, false, false, true, false, false, false);
6551
+ this.setUIProperties(false, false, false, false, false, true, false, false, false, false);
5775
6552
  }
5776
6553
  else if (url[2] == 'trax') {
5777
6554
  if (url[2] == 'trax' && (url.includes('createChecklist') || url.includes('configure') || url.includes('create-order') || url[3] == 'create-task' || url[3] == 'task-configure')) {
5778
- this.setUIProperties(false, false, false, false, false, false, false, false, false);
6555
+ this.setUIProperties(false, false, false, false, false, false, false, false, false, false);
5779
6556
  }
5780
6557
  else if (url[2] == 'trax' && (url.includes('taskinfo'))) {
5781
- this.setUIProperties(false, false, false, false, false, false, false, true, false);
6558
+ this.setUIProperties(false, false, false, false, false, false, false, true, false, false);
5782
6559
  }
5783
6560
  else if (url[2] == 'trax' && (url.includes('checklist') || url.includes('gallery'))) {
5784
- this.setUIProperties(true, false, false, false, false, false, false, false, false);
6561
+ this.setUIProperties(true, false, false, false, false, false, false, false, false, false);
5785
6562
  }
5786
6563
  else {
5787
- this.setUIProperties(false, false, false, false, false, false, true, false, false);
6564
+ this.setUIProperties(false, false, false, false, false, false, true, false, false, false);
5788
6565
  }
5789
6566
  }
5790
6567
  else {
5791
- this.setUIProperties(false, false, false, false, true, false, false, false, false);
6568
+ this.setUIProperties(false, false, false, false, true, false, false, false, false, false);
5792
6569
  }
5793
6570
  }
5794
6571
  else {
5795
6572
  if (url[3] == "edge-app") {
5796
- this.setUIProperties(false, false, true, false, false, false, false, false, false);
6573
+ this.setUIProperties(false, false, true, false, false, false, false, false, false, false);
5797
6574
  }
5798
6575
  else if (URL == `/manage/stores/infra-ticket?storeId=${this.storeId}` || URL == `/manage/stores/infra-ticket?storeId=${this.storeId}&type=infra` ||
5799
6576
  URL == `/manage/stores/settings?storeId=${this.storeId}` || URL == `/manage/stores/infra-ticket?storeId=${this.storeId}&type=dataMismatch` ||
@@ -5801,14 +6578,14 @@ class ToolbarComponent {
5801
6578
  URL == `/manage/stores/cameras?storeId=${this.storeId}` ||
5802
6579
  // URL == `/manage/stores/infrastructure?storeId=${this.storeId}` ||
5803
6580
  URL == `/manage/stores/mat?storeId=${this.storeId}`) {
5804
- this.setUIProperties(false, false, false, true, false, false, false, false, false);
6581
+ this.setUIProperties(false, false, false, true, false, false, false, false, false, false);
5805
6582
  }
5806
6583
  else if (url[2] === 'controlcenter') {
5807
6584
  if (URL == `/manage/controlcenter/playback?storeId=${this.storeId}` || URL == `/manage/controlcenter/playback`) {
5808
- this.setUIProperties(false, false, false, false, false, false, false, false, true);
6585
+ this.setUIProperties(false, false, false, false, false, false, false, false, true, false);
5809
6586
  }
5810
6587
  else {
5811
- this.setUIProperties(false, false, false, false, true, false, false, false, false);
6588
+ this.setUIProperties(false, false, false, false, true, false, false, false, false, false);
5812
6589
  }
5813
6590
  }
5814
6591
  else if (URL == "/profile" || URL == "/manage/users/client" || URL == "/manage/users/tango" ||
@@ -5816,34 +6593,37 @@ class ToolbarComponent {
5816
6593
  URL == "/manage/stores/addition-method" ||
5817
6594
  URL == "/manage/stores/add-single-store" || url[2] === "data-mismatch" || url[2] === "employeetraining" || URL == "/notifications/alerts?tab=alert" || URL == "/notifications/alerts?tab=download"
5818
6595
  || URL == "/manage/users/tango" || URL === "/manage/controlcenter" || URL === 'manage/controlcenter/template-manager' || url[2] === 'controlcenter') {
5819
- this.setUIProperties(false, false, false, false, false, false, false, false, false);
6596
+ this.setUIProperties(false, false, false, false, false, false, false, false, false, false);
6597
+ }
6598
+ else if (URL == "/manage/traffic/nob") {
6599
+ this.setUIProperties(false, false, false, false, false, false, false, false, false, true);
5820
6600
  }
5821
6601
  else if (url[2] === "traffic" || url[2] === "zones" || URL == "/manage/analyse/reports") {
5822
- this.setUIProperties(false, false, false, false, false, true, false, false, false);
6602
+ this.setUIProperties(false, false, false, false, false, true, false, false, false, false);
5823
6603
  }
5824
6604
  else if (url[2] == 'trax') {
5825
6605
  if (url[2] == 'trax' && (url.includes('createChecklist') || url.includes('configure') || url.includes('create-order') || url[3] == 'create-task' || url[3] == 'task-configure')) {
5826
- this.setUIProperties(false, false, false, false, false, false, false, false, false);
6606
+ this.setUIProperties(false, false, false, false, false, false, false, false, false, false);
5827
6607
  }
5828
6608
  else if (url[2] == 'trax' && (url.includes('taskinfo'))) {
5829
- this.setUIProperties(false, false, false, false, false, false, false, true, false);
6609
+ this.setUIProperties(false, false, false, false, false, false, false, true, false, false);
5830
6610
  }
5831
6611
  else if (url[2] == 'trax' && (url.includes('checklist') || url.includes('gallery'))) {
5832
- this.setUIProperties(true, false, false, false, false, false, false, false, false);
6612
+ this.setUIProperties(true, false, false, false, false, false, false, false, false, false);
5833
6613
  }
5834
6614
  else {
5835
- this.setUIProperties(false, false, false, false, false, false, true, false, false);
6615
+ this.setUIProperties(false, false, false, false, false, false, true, false, false, false);
5836
6616
  }
5837
6617
  }
5838
6618
  else {
5839
- this.setUIProperties(false, false, true, false, false, false, false, false, false);
6619
+ this.setUIProperties(false, false, true, false, false, false, false, false, false, false);
5840
6620
  }
5841
6621
  }
5842
6622
  const viewsWithPageTitles = ["classic", "reports", "saas"];
5843
6623
  return (this.appPageTitleDisplay &&
5844
6624
  viewsWithPageTitles.some((t) => t === this.appToolbarLayout));
5845
6625
  }
5846
- setUIProperties(singleSelect, multiSelect, datepicker, singleStore, singleSelectdatepicker, trafficdatepicker, traxdatepicker, traxwithoutdatepicker, storesSingle) {
6626
+ setUIProperties(singleSelect, multiSelect, datepicker, singleStore, singleSelectdatepicker, trafficdatepicker, traxdatepicker, traxwithoutdatepicker, storesSingle, nobWithoutClient) {
5847
6627
  this.singleSelect = singleSelect;
5848
6628
  this.multiSelect = multiSelect;
5849
6629
  this.datepicker = datepicker;
@@ -5853,13 +6633,14 @@ class ToolbarComponent {
5853
6633
  this.traxdatepicker = traxdatepicker;
5854
6634
  this.traxwithoutdatepicker = traxwithoutdatepicker;
5855
6635
  this.storesSingle = storesSingle;
6636
+ this.nobWithoutClient = nobWithoutClient;
5856
6637
  }
5857
6638
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1.LayoutService }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i1.GlobalStateService }], target: i0.ɵɵFactoryTarget.Component });
5858
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ToolbarComponent, selector: "lib-toolbar", inputs: { currentLayoutType: "currentLayoutType", appToolbarLayout: "appToolbarLayout" }, ngImport: i0, template: "<!--begin::Toolbar container-->\r\n<div id=\"kt_app_toolbar_container\" class=\"app-container\" [ngClass]=\"appToolbarContainerCSSClass\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.userType === 'tango' || (gs.userAccess | async)?.userType === 'client' || (gs.userAccess | async)?.userType === 'lead'\" >\r\n <ng-container *ngIf=\"showPageTitle()\">\r\n <lib-page-title [appPageTitleDirection]=\"appPageTitleDirection\" [appPageTitleBreadcrumb]=\"appPageTitleBreadcrumb\"\r\n [appPageTitleDescription]=\"appPageTitleDescription\" class=\"page-title d-flex flex-wrap me-3\"\r\n [ngClass]=\"{'flex-column justify-content-center': appPageTitleDirection === 'column', 'align-items-center': appPageTitleDirection !== 'column', appPageTitleCSSClass}\">\r\n </lib-page-title>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiSelect && users.userType ==='tango'\">\r\n <lib-classic class=\"d-flex align-items-center gap-2 gap-lg-3\"></lib-classic>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelect && users.userType ==='tango'\">\r\n <lib-client-settings class=\"d-flex align-items-center me-5\"></lib-client-settings>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"datepicker && users.userType ==='client'\">\r\n <lib-datepicker class=\"d-flex align-items-center me-5\"></lib-datepicker>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelectdatepicker && users.userType ==='tango'\">\r\n <lib-date-single-select class=\"d-flex align-items-center me-5\"></lib-date-single-select>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleStore\">\r\n <lib-single-store class=\"d-flex align-items-center me-5\"></lib-single-store>\r\n </ng-container>\r\n <ng-container *ngIf=\"trafficdatepicker\">\r\n <lib-traffic-header class=\"d-flex align-items-center me-5\"></lib-traffic-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxdatepicker\">\r\n <lib-trax-header class=\"d-flex align-items-center me-5\"></lib-trax-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxwithoutdatepicker\">\r\n <lib-trax-withoutdate class=\"d-flex align-items-center me-5\"></lib-trax-withoutdate>\r\n </ng-container>\r\n <ng-container *ngIf=\"storesSingle\">\r\n <lib-single-storedate class=\"d-flex align-items-center me-5\"></lib-single-storedate>\r\n </ng-container>\r\n \r\n \r\n <!-- <ng-container *ngIf=\"appToolbarLayout === 'extended'\">\r\n <lib-extended class=\"d-flex align-items-center flex-shrink-0 me-5\"></lib-extended>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'reports'\">\r\n <lib-reports class=\"d-flex align-items-center overflow-auto\" [appPageTitleDisplay]=\"appPageTitleDisplay\">\r\n </lib-reports>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'saas'\">\r\n <lib-saas class=\"d-flex align-items-center gap-2\" [appPageTitleDisplay]=\"appPageTitleDisplay\"></lib-saas>\r\n </ng-container> -->\r\n</ng-container>\r\n</div>\r\n<!--end::Toolbar container-->\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PageTitleComponent, selector: "lib-page-title", inputs: ["appPageTitleDirection", "appPageTitleBreadcrumb", "appPageTitleDescription"] }, { kind: "component", type: ClassicComponent, selector: "lib-classic" }, { kind: "component", type: ClientSettingsComponent, selector: "lib-client-settings" }, { kind: "component", type: DatepickerComponent, selector: "lib-datepicker" }, { kind: "component", type: DateSingleSelectComponent, selector: "lib-date-single-select" }, { kind: "component", type: SingleStoreComponent, selector: "lib-single-store", inputs: ["urlString"] }, { kind: "component", type: TrafficHeaderComponent, selector: "lib-traffic-header" }, { kind: "component", type: TraxHeaderComponent, selector: "lib-trax-header" }, { kind: "component", type: SingleStoredateComponent, selector: "lib-single-storedate" }, { kind: "component", type: TraxWithoutdateComponent, selector: "lib-trax-withoutdate" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
6639
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ToolbarComponent, selector: "lib-toolbar", inputs: { currentLayoutType: "currentLayoutType", appToolbarLayout: "appToolbarLayout" }, ngImport: i0, template: "<!--begin::Toolbar container-->\r\n<div id=\"kt_app_toolbar_container\" class=\"app-container\" [ngClass]=\"appToolbarContainerCSSClass\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.userType === 'tango' || (gs.userAccess | async)?.userType === 'client' || (gs.userAccess | async)?.userType === 'lead'\" >\r\n <ng-container *ngIf=\"showPageTitle()\">\r\n <lib-page-title [appPageTitleDirection]=\"appPageTitleDirection\" [appPageTitleBreadcrumb]=\"appPageTitleBreadcrumb\"\r\n [appPageTitleDescription]=\"appPageTitleDescription\" class=\"page-title d-flex flex-wrap me-3\"\r\n [ngClass]=\"{'flex-column justify-content-center': appPageTitleDirection === 'column', 'align-items-center': appPageTitleDirection !== 'column', appPageTitleCSSClass}\">\r\n </lib-page-title>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiSelect && users.userType ==='tango'\">\r\n <lib-classic class=\"d-flex align-items-center gap-2 gap-lg-3\"></lib-classic>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelect && users.userType ==='tango'\">\r\n <lib-client-settings class=\"d-flex align-items-center me-5\"></lib-client-settings>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"datepicker && users.userType ==='client'\">\r\n <lib-datepicker class=\"d-flex align-items-center me-5\"></lib-datepicker>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelectdatepicker && users.userType ==='tango'\">\r\n <lib-date-single-select class=\"d-flex align-items-center me-5\"></lib-date-single-select>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleStore\">\r\n <lib-single-store class=\"d-flex align-items-center me-5\"></lib-single-store>\r\n </ng-container>\r\n <ng-container *ngIf=\"trafficdatepicker\">\r\n <lib-traffic-header class=\"d-flex align-items-center me-5\"></lib-traffic-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxdatepicker\">\r\n <lib-trax-header class=\"d-flex align-items-center me-5\"></lib-trax-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxwithoutdatepicker\">\r\n <lib-trax-withoutdate class=\"d-flex align-items-center me-5\"></lib-trax-withoutdate>\r\n </ng-container>\r\n <ng-container *ngIf=\"storesSingle\">\r\n <lib-single-storedate class=\"d-flex align-items-center me-5\"></lib-single-storedate>\r\n </ng-container>\r\n <ng-container *ngIf=\"nobWithoutClient\">\r\n <lib-traffic-nob class=\"d-flex align-items-center me-5\"></lib-traffic-nob>\r\n </ng-container>\r\n \r\n <!-- <ng-container *ngIf=\"appToolbarLayout === 'extended'\">\r\n <lib-extended class=\"d-flex align-items-center flex-shrink-0 me-5\"></lib-extended>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'reports'\">\r\n <lib-reports class=\"d-flex align-items-center overflow-auto\" [appPageTitleDisplay]=\"appPageTitleDisplay\">\r\n </lib-reports>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'saas'\">\r\n <lib-saas class=\"d-flex align-items-center gap-2\" [appPageTitleDisplay]=\"appPageTitleDisplay\"></lib-saas>\r\n </ng-container> -->\r\n</ng-container>\r\n</div>\r\n<!--end::Toolbar container-->\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PageTitleComponent, selector: "lib-page-title", inputs: ["appPageTitleDirection", "appPageTitleBreadcrumb", "appPageTitleDescription"] }, { kind: "component", type: ClassicComponent, selector: "lib-classic" }, { kind: "component", type: ClientSettingsComponent, selector: "lib-client-settings" }, { kind: "component", type: DatepickerComponent, selector: "lib-datepicker" }, { kind: "component", type: DateSingleSelectComponent, selector: "lib-date-single-select" }, { kind: "component", type: SingleStoreComponent, selector: "lib-single-store", inputs: ["urlString"] }, { kind: "component", type: TrafficHeaderComponent, selector: "lib-traffic-header" }, { kind: "component", type: TraxHeaderComponent, selector: "lib-trax-header" }, { kind: "component", type: SingleStoredateComponent, selector: "lib-single-storedate" }, { kind: "component", type: TraxWithoutdateComponent, selector: "lib-trax-withoutdate" }, { kind: "component", type: TrafficNobComponent, selector: "lib-traffic-nob" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
5859
6640
  }
5860
6641
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarComponent, decorators: [{
5861
6642
  type: Component,
5862
- args: [{ selector: "lib-toolbar", template: "<!--begin::Toolbar container-->\r\n<div id=\"kt_app_toolbar_container\" class=\"app-container\" [ngClass]=\"appToolbarContainerCSSClass\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.userType === 'tango' || (gs.userAccess | async)?.userType === 'client' || (gs.userAccess | async)?.userType === 'lead'\" >\r\n <ng-container *ngIf=\"showPageTitle()\">\r\n <lib-page-title [appPageTitleDirection]=\"appPageTitleDirection\" [appPageTitleBreadcrumb]=\"appPageTitleBreadcrumb\"\r\n [appPageTitleDescription]=\"appPageTitleDescription\" class=\"page-title d-flex flex-wrap me-3\"\r\n [ngClass]=\"{'flex-column justify-content-center': appPageTitleDirection === 'column', 'align-items-center': appPageTitleDirection !== 'column', appPageTitleCSSClass}\">\r\n </lib-page-title>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiSelect && users.userType ==='tango'\">\r\n <lib-classic class=\"d-flex align-items-center gap-2 gap-lg-3\"></lib-classic>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelect && users.userType ==='tango'\">\r\n <lib-client-settings class=\"d-flex align-items-center me-5\"></lib-client-settings>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"datepicker && users.userType ==='client'\">\r\n <lib-datepicker class=\"d-flex align-items-center me-5\"></lib-datepicker>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelectdatepicker && users.userType ==='tango'\">\r\n <lib-date-single-select class=\"d-flex align-items-center me-5\"></lib-date-single-select>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleStore\">\r\n <lib-single-store class=\"d-flex align-items-center me-5\"></lib-single-store>\r\n </ng-container>\r\n <ng-container *ngIf=\"trafficdatepicker\">\r\n <lib-traffic-header class=\"d-flex align-items-center me-5\"></lib-traffic-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxdatepicker\">\r\n <lib-trax-header class=\"d-flex align-items-center me-5\"></lib-trax-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxwithoutdatepicker\">\r\n <lib-trax-withoutdate class=\"d-flex align-items-center me-5\"></lib-trax-withoutdate>\r\n </ng-container>\r\n <ng-container *ngIf=\"storesSingle\">\r\n <lib-single-storedate class=\"d-flex align-items-center me-5\"></lib-single-storedate>\r\n </ng-container>\r\n \r\n \r\n <!-- <ng-container *ngIf=\"appToolbarLayout === 'extended'\">\r\n <lib-extended class=\"d-flex align-items-center flex-shrink-0 me-5\"></lib-extended>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'reports'\">\r\n <lib-reports class=\"d-flex align-items-center overflow-auto\" [appPageTitleDisplay]=\"appPageTitleDisplay\">\r\n </lib-reports>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'saas'\">\r\n <lib-saas class=\"d-flex align-items-center gap-2\" [appPageTitleDisplay]=\"appPageTitleDisplay\"></lib-saas>\r\n </ng-container> -->\r\n</ng-container>\r\n</div>\r\n<!--end::Toolbar container-->\r\n" }]
6643
+ args: [{ selector: "lib-toolbar", template: "<!--begin::Toolbar container-->\r\n<div id=\"kt_app_toolbar_container\" class=\"app-container\" [ngClass]=\"appToolbarContainerCSSClass\">\r\n <ng-container *ngIf=\"(gs.userAccess | async)?.userType === 'tango' || (gs.userAccess | async)?.userType === 'client' || (gs.userAccess | async)?.userType === 'lead'\" >\r\n <ng-container *ngIf=\"showPageTitle()\">\r\n <lib-page-title [appPageTitleDirection]=\"appPageTitleDirection\" [appPageTitleBreadcrumb]=\"appPageTitleBreadcrumb\"\r\n [appPageTitleDescription]=\"appPageTitleDescription\" class=\"page-title d-flex flex-wrap me-3\"\r\n [ngClass]=\"{'flex-column justify-content-center': appPageTitleDirection === 'column', 'align-items-center': appPageTitleDirection !== 'column', appPageTitleCSSClass}\">\r\n </lib-page-title>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"multiSelect && users.userType ==='tango'\">\r\n <lib-classic class=\"d-flex align-items-center gap-2 gap-lg-3\"></lib-classic>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelect && users.userType ==='tango'\">\r\n <lib-client-settings class=\"d-flex align-items-center me-5\"></lib-client-settings>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"datepicker && users.userType ==='client'\">\r\n <lib-datepicker class=\"d-flex align-items-center me-5\"></lib-datepicker>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleSelectdatepicker && users.userType ==='tango'\">\r\n <lib-date-single-select class=\"d-flex align-items-center me-5\"></lib-date-single-select>\r\n </ng-container>\r\n <ng-container *ngIf=\"singleStore\">\r\n <lib-single-store class=\"d-flex align-items-center me-5\"></lib-single-store>\r\n </ng-container>\r\n <ng-container *ngIf=\"trafficdatepicker\">\r\n <lib-traffic-header class=\"d-flex align-items-center me-5\"></lib-traffic-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxdatepicker\">\r\n <lib-trax-header class=\"d-flex align-items-center me-5\"></lib-trax-header>\r\n </ng-container>\r\n <ng-container *ngIf=\"traxwithoutdatepicker\">\r\n <lib-trax-withoutdate class=\"d-flex align-items-center me-5\"></lib-trax-withoutdate>\r\n </ng-container>\r\n <ng-container *ngIf=\"storesSingle\">\r\n <lib-single-storedate class=\"d-flex align-items-center me-5\"></lib-single-storedate>\r\n </ng-container>\r\n <ng-container *ngIf=\"nobWithoutClient\">\r\n <lib-traffic-nob class=\"d-flex align-items-center me-5\"></lib-traffic-nob>\r\n </ng-container>\r\n \r\n <!-- <ng-container *ngIf=\"appToolbarLayout === 'extended'\">\r\n <lib-extended class=\"d-flex align-items-center flex-shrink-0 me-5\"></lib-extended>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'reports'\">\r\n <lib-reports class=\"d-flex align-items-center overflow-auto\" [appPageTitleDisplay]=\"appPageTitleDisplay\">\r\n </lib-reports>\r\n </ng-container>\r\n <ng-container *ngIf=\"appToolbarLayout === 'saas'\">\r\n <lib-saas class=\"d-flex align-items-center gap-2\" [appPageTitleDisplay]=\"appPageTitleDisplay\"></lib-saas>\r\n </ng-container> -->\r\n</ng-container>\r\n</div>\r\n<!--end::Toolbar container-->\r\n" }]
5863
6644
  }], ctorParameters: () => [{ type: i1.LayoutService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i1.GlobalStateService }], propDecorators: { currentLayoutType: [{
5864
6645
  type: Input
5865
6646
  }], appToolbarLayout: [{
@@ -5979,7 +6760,6 @@ class SidebarMenuComponent {
5979
6760
  if (res && res.code === 200) {
5980
6761
  this.clientData = res?.data;
5981
6762
  localStorage.setItem("client-details", JSON.stringify(this.clientData?.featureConfigs));
5982
- localStorage.setItem("clientAPI-details", JSON.stringify(this.clientData?.clientApi));
5983
6763
  }
5984
6764
  },
5985
6765
  error: (error) => {
@@ -8010,7 +8790,8 @@ class LayoutModule {
8010
8790
  TraxHeaderComponent,
8011
8791
  SingleStoredateComponent,
8012
8792
  StoresingleComponent,
8013
- TraxWithoutdateComponent], imports: [CommonModule, i2.RouterModule, TranslationModule,
8793
+ TraxWithoutdateComponent,
8794
+ TrafficNobComponent], imports: [CommonModule, i2.RouterModule, TranslationModule,
8014
8795
  InlineSVGModule,
8015
8796
  NgbDropdownModule,
8016
8797
  NgbProgressbarModule,
@@ -8077,7 +8858,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
8077
8858
  TraxHeaderComponent,
8078
8859
  SingleStoredateComponent,
8079
8860
  StoresingleComponent,
8080
- TraxWithoutdateComponent
8861
+ TraxWithoutdateComponent,
8862
+ TrafficNobComponent
8081
8863
  ],
8082
8864
  imports: [
8083
8865
  CommonModule,