Skip to content

Commit

Permalink
Update app.component.ts
Browse files Browse the repository at this point in the history
removed console logs
  • Loading branch information
prabasak23 committed Feb 5, 2025
1 parent 4f1d4c0 commit 7544a19
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions UI/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class AppComponent implements OnInit {
if (!this.refreshCounter) {
let stateFiltersParam = params['stateFilters'];
let kpiFiltersParam = params['kpiFilters'];
// console.log('params', stateFiltersParam, kpiFiltersParam);

if (stateFiltersParam?.length) {
let selectedTab = this.location.path();
Expand All @@ -76,7 +75,7 @@ export class AppComponent implements OnInit {

if (stateFiltersParam?.length <= 8 && kpiFiltersParam?.length <= 8) {
this.httpService.handleRestoreUrl(stateFiltersParam, kpiFiltersParam).subscribe((response: any) => {
console.log('response', response);

try {
if (response.success) {
const longKPIFiltersString = response.data['longKPIFiltersString'];
Expand All @@ -87,7 +86,7 @@ export class AppComponent implements OnInit {
// const kpiFiltersParam = params['kpiFilters'];
if (longKPIFiltersString) {
const kpiFilterParamDecoded = atob(longKPIFiltersString);
console.log('kpiFilterParamDecoded', kpiFilterParamDecoded);

const kpiFilterValFromUrl = (kpiFilterParamDecoded && JSON.parse(kpiFilterParamDecoded)) ? JSON.parse(kpiFilterParamDecoded) : this.service.getKpiSubFilterObj();
this.service.setKpiSubFilterObj(kpiFilterValFromUrl);
}
Expand Down Expand Up @@ -122,7 +121,7 @@ export class AppComponent implements OnInit {
// this.service.setSelectedBoard(this.selectedTab);

stateFiltersParam = atob(stateFiltersParam);
console.log('stateFiltersParam', stateFiltersParam);

// stateFiltersParam = stateFiltersParam.replace(/###/gi, '___');

// const kpiFiltersParam = params['kpiFilters'];
Expand Down Expand Up @@ -213,7 +212,6 @@ export class AppComponent implements OnInit {

urlRedirection(decodedStateFilters, currentUserProjectAccess, url, ifSuperAdmin) {
const stateFiltersObjLocal = JSON.parse(decodedStateFilters);
console.log('stateFiltersObjLocal', stateFiltersObjLocal);

let stateFilterObj = [];
let projectLevelSelected = false;
Expand All @@ -223,8 +221,6 @@ export class AppComponent implements OnInit {
stateFilterObj = stateFiltersObjLocal['primary_level'];
}

console.log('stateFilterObj', stateFilterObj);

projectLevelSelected = stateFilterObj?.length && stateFilterObj[0]?.labelName?.toLowerCase() === 'project';


Expand All @@ -236,9 +232,6 @@ export class AppComponent implements OnInit {
// Superadmin have all project access hence no need to check project for superadmin
const hasAccessToAll = ifSuperAdmin || hasAllProjectAccess;

console.log('hasAccessToAll', hasAccessToAll);
console.log('projectLevelSelected', projectLevelSelected);

if (projectLevelSelected) {
if (hasAccessToAll) {
this.router.navigate([JSON.parse(JSON.stringify(url))]);
Expand Down

0 comments on commit 7544a19

Please sign in to comment.