Skip to content

Commit

Permalink
242662: Handle ekstep tenant logo (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
devpurushotam authored Aug 1, 2024
1 parent 09b9422 commit ce033d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@
<!--Logo-->
<a class="logo sbt-logo" tabindex="0" title="{{tenantInfo.titleName}}" role="link"
aria-label="Navigate to Homepage">
<img _ngcontent-hkf-c8="" (click)="navigateToHome()" class="cursor-pointer" alt="DIKSHA" [src] = "mainLogo" >
<div *ngIf=" mainLogo != tenantInfo.logo " style="width: 2px; height: 50px; background-color: #d5d5d5; margin: 0 12px;"></div>
<img *ngIf="showMainLogo" _ngcontent-hkf-c8="" (click)="navigateToHome()" class="cursor-pointer" alt="DIKSHA" [src] = "mainLogo" >
<div *ngIf=" ('mainLogo' != tenantInfo.logo) && showMainLogo " style="width: 2px; height: 50px; background-color: #d5d5d5; margin: 0 12px;"></div>
<img *ngIf=" mainLogo != tenantInfo.logo " (click)="navigateToHome()" class="cursor-pointer" alt={{tenantInfo.titleName}} src="{{tenantInfo.logo}}">
</a>
<!--/Logo-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export class MainHeaderComponent implements OnInit, OnDestroy {
showSwitchTheme = false
nishthaDashboard: Array<string>;
mainLogo : any;
showMainLogo : boolean = true;
constructor(public config: ConfigService, public resourceService: ResourceService, public router: Router,
public permissionService: PermissionService, public userService: UserService, public tenantService: TenantService,
public orgDetailsService: OrgDetailsService, public formService: FormService,
Expand Down Expand Up @@ -629,6 +630,8 @@ export class MainHeaderComponent implements OnInit, OnDestroy {
this.mainLogo = 'https://diksha.gov.in/tenant/ntp/logo.png'; // PROD LOGO
}



this.programDashboardRole = this.config.rolesConfig.headerDropdownRoles.programDashboardRole;
this.isDesktopApp = this.utilService.isDesktopApp;
this.connectionService.monitor()
Expand Down Expand Up @@ -662,6 +665,12 @@ export class MainHeaderComponent implements OnInit, OnDestroy {
this.getUrl();
this.activatedRoute.queryParams.subscribe(queryParams => this.queryParam = { ...queryParams });
this.tenantService.tenantData$.subscribe(({ tenantData }) => {

// in case of ek-step tenant main logo will not show.
if (tenantData?.logo == "https://diksha.gov.in/tenant/ekstep/logo.png") {
this.showMainLogo = false
}
console.log("this.queryParam", this.queryParam);
this.tenantInfo.logo = tenantData ? tenantData.logo : undefined;
this.tenantInfo.titleName = (tenantData && tenantData.titleName) ? tenantData.titleName.toUpperCase() : undefined;
});
Expand Down

0 comments on commit ce033d7

Please sign in to comment.