Skip to content

Commit

Permalink
Merge pull request #2409 from bharathravi-in/show-info-maintanence
Browse files Browse the repository at this point in the history
Show info maintanence
  • Loading branch information
Haritest authored Aug 16, 2024
2 parents 26bb48f + 6a774a9 commit bfbca24
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -627,19 +627,7 @@ <h2 class="ws-mat-primary-text mat-title title-text"> {{ widgetData.content.name
</div>
</div>
</div>
<div class="flex flex-1 flex-row">
<div class="flex-9 description-text mb-4" i18n-title title="Description">
{{'cardcontentv2.askedBy' | translate}} <a (click)="raiseTelemetry(); $event.stopPropagation()" [routerLink]="['/app/person-profile']"
[queryParams]="{'emailId':'[email protected]'}" role="link" aria-label="Content" i18n-aria-label>
<span class="ws-mat-default-text">{{'Amit Kumar'}}</span>
</a>
</div>
<div class="flex flex-1">
<div class="typeofc">
<span>Law</span>
</div>
</div>
</div>

<div class="flex flex-1 flex-row">
<div class="flex flex-1">
<div class="flex flex-1 flex-row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,19 +737,7 @@ <h2 class="ws-mat-primary-text mat-title title-text"> {{ widgetData.content.name
</div>
</div>
</div>
<div class="flex flex-1 flex-row">
<div class="flex-9 description-text mb-4" i18n-title title="Description">
Asked by <a (click)="raiseTelemetry(); $event.stopPropagation()" [routerLink]="['/app/person-profile']"
[queryParams]="{'emailId':'[email protected]'}" role="link" aria-label="Content" i18n-aria-label>
<span class="ws-mat-default-text">{{'Amit Kumar'}}</span>
</a>
</div>
<div class="flex flex-1">
<div class="typeofc">
<span>Law</span>
</div>
</div>
</div>

<!-- <mat-accordion>
<mat-expansion-panel class="no-box" (opened)="panelOpenState = true" (closed)="panelOpenState = false">
<mat-expansion-panel-header #panelH (click)="panelH._toggle()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,17 +751,21 @@ export class AppTocHomeComponent implements OnInit, OnDestroy, AfterViewChecked,
if (batch && this.currentCourseBatchId) {
this.startDate = (_.get(batch, 'startDate'))
this.endDate = (_.get(batch, 'endDate'))
const startDateTime = this.startDate && new Date(this.startDate).getTime()
const endDateTime = this.endDate && new Date(this.endDate).getTime()
this.startDateDifference = now - startDateTime
this.endDateDifference = endDateTime - now
if (this.endDateDifference > 0 && this.startDateDifference > 0 && batch.status !== 2) {
return true
if (this.endDate) {
const startDateTime = this.startDate && new Date(this.startDate).getTime()
const endDateTime = this.endDate && new Date(this.endDate).getTime()
this.startDateDifference = now - startDateTime
this.endDateDifference = endDateTime - now
if (this.endDateDifference > 0 && this.startDateDifference > 0 && batch.status !== 2) {
return true
}
return false
}
return false
return true
}
return false
} return false
}
return false
}

private initData(data: Data) {
Expand Down
13 changes: 12 additions & 1 deletion src/app/component/app-nav-bar/app-nav-bar.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<div class="info-block" *ngIf="infoBlockEnable">
<div class="flex container-balanced items-center justify-between info-wrapper">
<div class="flex items-center">
<span class="material-icons mat-icon text-white margin-right">warning</span>
<span class="info-txt text-white">Dear Karmayogi, our portal will be undergoing a technology upgrade from 10 PM today till 18th August, 10 PM to improve your learning experience.</span>
</div>
<div>
<a (click)="infoBlockActionMethod()" class="ok-btn text-white">OK</a>
</div>
</div>
</div>
<ng-container *ngIf="fullMenuDispaly">

<mat-toolbar *ngIf="sShowAppNavBar && !needToHide && mode == 'top' && isHubEnable"
[color]="primaryNavbarBackground?.color" [ngStyle]="primaryNavbarBackground?.styles"
class="mat-elevation-z3 custom mobile-height" [ngClass]="{'mobile': isHubEnable}">
Expand Down Expand Up @@ -223,3 +233,4 @@
</div>

</mat-menu>

43 changes: 43 additions & 0 deletions src/app/component/app-nav-bar/app-nav-bar.component.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
@import 'ws-mixins';
@import 'ws-vars';
@import 'ws-common';


.container-balanced {
@extend %page-center;
}

.hideForNav {
display: none !important;
Expand Down Expand Up @@ -428,3 +434,40 @@
}
}
}


.info-block {
width: 100%;
// height: 48px;
background: linear-gradient(90.15deg, #266EEB 0.87%, #133F8B 161.81%);
.info-wrapper {
padding: 16px 0;
.margin-right {
margin-right: 8px;
}
.info-txt {
//styleName: Caption;
font-family: Lato;
font-size: 13px;
font-weight: 400;
line-height: 14.4px;
text-align: left;

}
.ok-btn {
border: 1px solid white;
cursor: pointer;
padding: 4px 16px;
gap: 8px;
border-radius: 12px;
//styleName: Button;
font-family: Lato;
font-size: 14px;
font-weight: 700;
line-height: 16.8px;
text-align: center;


}
}
}
11 changes: 10 additions & 1 deletion src/app/component/app-nav-bar/app-nav-bar.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'
import { DomSanitizer, SafeUrl } from '@angular/platform-browser'
import { Router, NavigationStart, NavigationEnd } from '@angular/router'
import { TranslateService } from '@ngx-translate/core'
Expand All @@ -17,6 +17,10 @@ import { UrlService } from 'src/app/shared/url.service'
export class AppNavBarComponent implements OnInit, OnChanges {
@Input() mode: 'top' | 'bottom' = 'top'
@Input() headerFooterConfigData: any
// tslint:disable-next-line:indent
@Output() infoBlockAction = new EventEmitter()

infoBlockEnable = true
hideKPOnNav = false
basicBtnAppsConfig: NsWidgetResolver.IRenderConfigWithTypedData<IBtnAppsConfig> = {
widgetType: 'actionButton',
Expand Down Expand Up @@ -376,4 +380,9 @@ export class AppNavBarComponent implements OnInit, OnChanges {
return { ...item, forPreview: !this.isforPreview, enableLang: this.enableLang }
}

infoBlockActionMethod() {
this.infoBlockEnable = !this.infoBlockEnable
this.infoBlockAction.emit(this.infoBlockEnable)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class AppTourVideoComponent implements OnInit, OnDestroy {

ngOnInit() {
this.environment = environment
this.videoUrl = `https://${this.environment.sitePath}/content-store/Website_Video.mp4`
this.videoUrl = `https://${this.environment.sitePath}/assets/public/content/guide-videos/Website_Video.mp4`
try {
if (this.videoProgressTime > 0) {
this.videoPlayedProgress = false
Expand Down
2 changes: 1 addition & 1 deletion src/app/component/download-app/download-app.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div style="width:100%;background-color: #fff;">
<div class="dialog-close" *ngIf="!isMobile" (click)="closePopup()"><img alt="" src="assets/icons/home/decline_icon.svg" type="button"></div>
<div class="dialog-close" *ngIf="!isMobile && popupClass" (click)="closePopup()"><img alt="" src="assets/icons/home/decline_icon.svg" type="button"></div>
<div [ngClass]="popupClass === 'download-app-popup' ? 'download-app-popup' : 'download-app'" *ngIf="!isMobile">
<ng-container>
<div class="left-side">
Expand Down
8 changes: 4 additions & 4 deletions src/app/header/header/header.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div [ngClass]="mobileTopHeaderVisibilityStatus ? 'mobile-download-app-top-header' : 'mobile-download-app-without-top-header'" *ngIf="mobileTopHeaderVisibilityStatus">
<div [ngClass]="mobileTopHeaderVisibilityStatus ? 'mobile-download-app-top-header' : 'mobile-download-app-without-top-header'" *ngIf="mobileTopHeaderVisibilityStatus && !infoBlockEnable">
<div class="cross-mobile-download-app" (click)="hideMobileTopHeader()">
<span>X</span>
</div>
Expand All @@ -15,7 +15,7 @@
</li>
</div>
</div>
<ws-app-nav-bar *ngIf="isNavBarRequired" [ngClass]="mobileTopHeaderVisibilityStatus ? 'top-nav-bar':'top-nav-bar-without-mobile-header'" [mode]="mode" [headerFooterConfigData]="headerFooterConfigData"></ws-app-nav-bar>
<div *ngIf="showHubs" [ngClass]="mobileTopHeaderVisibilityStatus ? 'height-on-top':'height-on-top-without-mobile-header'">
<ws-widget-grid-layout [widgetData]="widgetData"></ws-widget-grid-layout>
<ws-app-nav-bar *ngIf="isNavBarRequired" (infoBlockAction)="infoBlockAction($event)" [ngClass]="mobileTopHeaderVisibilityStatus ? 'top-nav-bar':'top-nav-bar-without-mobile-header'" [mode]="mode" [headerFooterConfigData]="headerFooterConfigData"></ws-app-nav-bar>
<div *ngIf="showHubs" [ngClass]="mobileTopHeaderVisibilityStatus ? infoBlockEnable ? 'height-on-top height-top-info' : 'height-on-top':'height-on-top-without-mobile-header'">
<ws-widget-grid-layout [widgetData]="widgetData"></ws-widget-grid-layout>
</div>
12 changes: 10 additions & 2 deletions src/app/header/header/header.component.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@import 'ws-vars';
@import 'ws-mixins';

@import 'ws-common';
ws-app-nav-bar {
z-index: 1000;
}
.container-balanced {
@extend %page-center;
}

.route-change {
position: fixed;
Expand Down Expand Up @@ -322,4 +325,9 @@ ws-app-nav-bar {
padding: 5px 5px !important;
list-style: none;
}
}
}


.height-top-info {
margin-top: 112px !important;
}
5 changes: 5 additions & 0 deletions src/app/header/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class HeaderComponent implements OnInit {
isNavBarRequired = true
showNavbar = true
widgetData = {}
infoBlockEnable = true
mobileTopHeaderVisibilityStatus = true
@Input() mode: any
@Input() headerFooterConfigData: any
Expand Down Expand Up @@ -76,4 +77,8 @@ export class HeaderComponent implements OnInit {
this.mobileTopHeaderVisibilityStatus = false
this.mobileAppsService.mobileTopHeaderVisibilityStatus.next(this.mobileTopHeaderVisibilityStatus)
}

infoBlockAction(eventData: any) {
this.infoBlockEnable = eventData
}
}

0 comments on commit bfbca24

Please sign in to comment.