Skip to content

Commit

Permalink
Merge branch 'cbrelease-4.0.1' of https://github.com/sunbird-cb/sunbi…
Browse files Browse the repository at this point in the history
…rd-cb-portal into cbrelease-4.0.1
  • Loading branch information
christyfernandes committed Jul 1, 2022
2 parents dd584a0 + 226bb6e commit c9d7226
Show file tree
Hide file tree
Showing 16 changed files with 169 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ export class RightMenuCardComponent implements OnInit, OnDestroy {

const currentTime = new Date().getHours() * 60 + new Date().getMinutes()
const minustime = starttime - currentTime
if (eventData.startDate === todaysdate && minustime < 16 && (selectedStartDate > today || selectedEndDate < today)) {
// tslint:disable-next-line:max-line-length
if (eventData.startDate === todaysdate && (minustime > 0 && minustime < 16) && (selectedStartDate > today || selectedEndDate < today)) {
return true
}
if (eventData.startDate === todaysdate && (today >= selectedStartDate && today <= selectedEndDate)) {
return true
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ export class EventsComponent implements OnInit {
this.allEvents['featuredEvents'] = []
Object.keys(data).forEach((index: any) => {
const obj = data[index]
const expiryDateFormat = this.customDateFormat(obj.startDate, obj.startTime)
const expiryStartTimeFormat = this.customDateFormat(obj.startDate, obj.startTime)
const expiryEndTimeFormat = this.customDateFormat(obj.startDate, obj.endTime)
const floor = Math.floor
const hours = floor(obj.duration / 60)
const minutes = obj.duration % 60
Expand Down Expand Up @@ -159,7 +160,7 @@ export class EventsComponent implements OnInit {
pastevent: false,
}
this.allEvents['all'].push(eventDataObj)
const isToday = this.compareDate(expiryDateFormat, obj.startDate)
const isToday = this.compareDate(expiryStartTimeFormat, obj.startDate, expiryEndTimeFormat)
if (isToday) {
this.allEvents['todayEvents'].push(eventDataObj)
}
Expand All @@ -169,10 +170,10 @@ export class EventsComponent implements OnInit {

const now = new Date()
const today = moment(now).format('YYYY-MM-DD HH:mm')
if (expiryDateFormat < today) {
if (expiryStartTimeFormat < today) {
eventDataObj.pastevent = true
}
// const isPast = this.compareDate(expiryDateFormat);
// const isPast = this.compareDate(expiryStartTimeFormat);
// (!isPast) ? this.allEvents['all'].push(eventDataObj) : this.allEvents['todayEvents'].push(eventDataObj)
})
this.filter('all')
Expand Down Expand Up @@ -226,7 +227,7 @@ export class EventsComponent implements OnInit {
}
}

compareDate(selectedDate: any, startDate: any) {
compareDate(startime: any, startDate: any, endtime: any) {
const now = new Date()
const today = moment(now).format('YYYY-MM-DD HH:mm')

Expand All @@ -236,7 +237,14 @@ export class EventsComponent implements OnInit {
// tslint:disable-next-line:prefer-template
const month = ('0' + (now.getMonth() + 1)).slice(-2)
const todaysdate = `${year}-${month}-${day}`
return (startDate === todaysdate && selectedDate > today) ? true : false
// return (startDate === todaysdate && (startime >= today || endtime <= today)) ? true : false
if (startDate === todaysdate && startime > today) {
return true
}
if (startDate === todaysdate && (today >= startime && today <= endtime)) {
return true
}
return false
}

allEventDateFormat(datetime: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,21 @@
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">3. &nbsp; Streamlining the recruitment process</p>

<p class="mat-subheading-2 margin-bottom-xs margin-top-l">Example:</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">• &nbsp; Ensures inclusion and accuracy of facts in vigilance proposals.</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> • &nbsp; Coordinates and manages relationships with various stakeholders</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> • &nbsp; Manages grievance redressal mechanisms</p>
<!-- <p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">• &nbsp; Ensures inclusion and accuracy of facts in vigilance proposals.</p> -->
<!-- <p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> • &nbsp; Coordinates and manages relationships with various stakeholders</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> • &nbsp; Manages grievance redressal mechanisms</p> -->

<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">1. &nbsp; Competency Label: Noting and Drafting</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> Competency Type: Functional </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> Description: Drafts and analyses a note, in order, in order to move a proposal for </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> decision making on the availability of evidence and existing rules and precedents. </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> 2. &nbsp; Competency Label: Communication Skills </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">Competency Type: Behavioural </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">Description: Articulates information to others in a language that is clear, concise, and easy to understand. It also includes the ability to listen and understand the unspoken feelings and concerns of others. </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">3. &nbsp; Competency Label: Regulatory and Legal Advisory </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">Competency Type: Domain </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">Description: Provides advice to business and management stakeholders on regulatory
compliance and legal matters related to support business decision making </p>
</ng-template>


Expand All @@ -54,9 +66,17 @@
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">3. &nbsp; Streamlining the recruitment process</p>

<p class="mat-subheading-2 margin-bottom-xs margin-top-l">Example:</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">• &nbsp; Ensures inclusion and accuracy of facts in vigilance proposals.</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> • &nbsp; Coordinates and manages relationships with various stakeholders</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> • &nbsp; Manages grievance redressal mechanisms</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">1. &nbsp; Competency Label: Noting and Drafting</p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> Competency Type: Functional </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> Description: Drafts and analyses a note, in order, in order to move a proposal for </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> decision making on the availability of evidence and existing rules and precedents. </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom"> 2. &nbsp; Competency Label: Communication Skills </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">Competency Type: Behavioural </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">Description: Articulates information to others in a language that is clear, concise, and easy to understand. It also includes the ability to listen and understand the unspoken feelings and concerns of others. </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">3. &nbsp; Competency Label: Regulatory and Legal Advisory </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">Competency Type: Domain </p>
<p class="mat-body-2 ws-mat-black60-text margin-remove-bottom">Description: Provides advice to business and management stakeholders on regulatory
compliance and legal matters related to support business decision making </p>
</ng-template>

<ng-template #roles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<label for="roleName" class="margin-remove-bottom form-label required flex mat-subheading-2"
i18n="activity label|Label which explains the user to enter activity" i18n-aria-label
aria-label="activity label">
Add activities you perform as part of this role.
Add activities you perform as part of this role
</label>
<a class="mat-subheading-2 hint_span margin-remove-bottom" (click)="openActivityDialog()">
<mat-icon class="mat-icon margin-right-xs">info_outlined</mat-icon> What is an activity?
Expand Down
9 changes: 8 additions & 1 deletion project/ws/viewer/src/lib/plugins/html/html.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,15 @@ export class HtmlComponent implements OnInit, OnChanges, OnDestroy {
// )
// }
if (this.htmlContent.streamingUrl && this.htmlContent.initFile) {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
if (this.htmlContent.streamingUrl.includes('latest')) {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
// tslint:disable-next-line:max-line-length
`${environment.azureHost}/${environment.azureBucket}/content/html/${this.htmlContent.identifier}-latest/index.html?timestamp = '${new Date().getTime()}`
)
} else {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
`${this.htmlContent.streamingUrl}/${this.htmlContent.initFile}?timestamp='${new Date().getTime()}`)
}
} else {
if (environment.production) {
this.iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(
Expand Down
8 changes: 3 additions & 5 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { AppTocResolverService } from '@ws/app/src/lib/routes/app-toc/resolvers/
import { PublicLogoutComponent } from './routes/public/public-logout/public-logout.component'
import { PublicSignupComponent } from './routes/public/public-signup/public-signup.component'
import { PublicHomeComponent } from './routes/public/public-home/public-home.component'
import { PublicContacthomeComponent } from './routes/public/public-contacthome/public-contacthome.component'

// 💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥
// Please declare routes in alphabetical order
Expand Down Expand Up @@ -685,16 +686,13 @@ const routes: Routes = [
},
{
path: 'public/contact',
component: PublicContactComponent,
component: PublicContacthomeComponent,
data: {
pageType: 'feature',
pageKey: 'public-faq',
pageKey: 'public-contact',
module: 'support',
pageId: 'public/contact',
},
resolve: {
pageData: PageResolve,
},
},
{
path: 'public/faq',
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import { PublicLogoutModule } from './routes/public/public-logout/public-logout.
import { PublicSignupModule } from './routes/public/public-signup/public-signup.module'
import { PublicHomeComponent } from './routes/public/public-home/public-home.component'
import { PublicHomeService } from './services/public-home.service'
import { PublicContacthomeComponent } from './routes/public/public-contacthome/public-contacthome.component'
// import { ServiceWorkerModule } from '@angular/service-worker'
// import { environment } from '../environments/environment'

Expand Down Expand Up @@ -109,6 +110,7 @@ const getBaseHref = (platformLocation: PlatformLocation): string => {
LoginRootDirective,
NoConnectionComponent,
PublicHomeComponent,
PublicContacthomeComponent,
],
imports: [
FormsModule,
Expand Down
1 change: 1 addition & 0 deletions src/app/component/app-footer/app-footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<div class="flex flex-col justify-start">
<p class="footer_heading mat-subheading-1 margin-bottom-m">Support</p>
<a class="footer_sub_text mat-body" routerLink="/public/faq"> Frequently asked questions</a>
<a class="footer_sub_text mat-body" routerLink="/public/contact"> Contact Us</a>
<!-- <a class="footer_sub_text mat-body" routerLink="/app/info/feedback">Feedback and suggestions</a>
<a class="footer_sub_text mat-body" routerLink="/app/info/report-problem">Report a problem</a> -->

Expand Down
4 changes: 3 additions & 1 deletion src/app/component/root/root.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ export class RootComponent implements OnInit, AfterViewInit {
this.showFooter = false
this.showNavbar = false
this.isNavBarRequired = false
} else {
}

else {
this.showFooter = true
this.showNavbar = true
this.isNavBarRequired = true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="box w-full">
<ws-widget-btn-page-back [widgetData]="{ url: 'home',titles:[{title:'Contact Us',url:'none'}] }" >
</ws-widget-btn-page-back>
</div>
<div class="container-balanced">
<div class="flex flex-1 custom faq_main_box">
<div class="flex-3">
<mat-card class="padding-xl">
<!-- <h2 class="flex mat-display-1 main_title_text margin-bottom-xl">Contact Us</h2> -->
<p class="mat-title">For any technical issues please contact,</p>
<p class="mat-body-1">Email: <a href="mailto:[email protected]"><b>[email protected]</b></a></p>
<p>Helpdesk: <a href="https://servicedesk.nic.in/" target="blank"><b>servicedesk.nic.in</b></a></p>
<p class="mat-body-1 margin-bottom-m">Call: <mat-icon class="custom-phone">phone</mat-icon><b> 1800 111 555</b></p>
<p class="mat-body-1 margin-top-xl margin-bottom-m">To know more click <a href="https://dopttrg.nic.in/igotmk/">here.</a></p>
</mat-card>
</div>
</div>
</div>

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@import "ws-vars";
@import "ws-common";
@import 'ws-mixins';

.container-balanced {
max-width: 1202px;
margin-left: auto !important;
margin-right: auto !important;
}
.faq_main_box{
padding: 45px 8px 0 8px;

@include breakpoint-xs {
padding: 45px 0;
}
}
h2.main_title_text {
font-weight: 600!important;
}
.full_width_box {
width: 100%;
}
.flex-4 {
flex: 4;
}

.custom {
@include breakpoint-xs {
flex-direction: column;
}

@include breakpoint-s {
flex-direction: column;
}
}
.flex-3 {
flex: 3;
}

.custom-phone {
height: 16px;
width: 22px;
font-size: 20px;
line-height: 0.6 !important;
vertical-align: middle;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Component, OnInit } from '@angular/core'
import { ConfigurationsService, NsPage } from '@sunbird-cb/utils'

@Component({
selector: 'ws-public-contacthome',
templateUrl: './public-contacthome.component.html',
styleUrls: ['./public-contacthome.component.scss'],
})
export class PublicContacthomeComponent implements OnInit {
contactUsMail = ''
pageNavbar: Partial<NsPage.INavBackground> = this.configSvc.pageNavBar

constructor(private configSvc: ConfigurationsService) {}

ngOnInit() {
if (this.configSvc.instanceConfig) {
this.contactUsMail = this.configSvc.instanceConfig.mailIds.contactUs
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h1 class="text-white text-center mt-12 pt-12">How does the platform enable you
<div class="flex flex-1">
<div class="exCivilVideo">
<!-- <img src="/assets/instances/eagle/landing-img/video1.png" alt="video presentation"> -->
<video width="100%" height="auto" controls poster="/assets/instances/eagle/landing-img/video12.png">
<video width="100%" height="auto" controls poster="/assets/instances/eagle/landing-img/video1.png">
<source src="https://igot.blob.core.windows.net/public/Sanjeev-final.mp4" type="video/mp4">
</video>

Expand Down
17 changes: 14 additions & 3 deletions src/app/routes/public/public-home/public-home.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
padding: 0;
margin: 0;
}
a {
color: #A221D8;
}
// a {
// color: #A221D8;
// }
a:hover {

text-decoration: none;
Expand Down Expand Up @@ -575,3 +575,14 @@
// width: 90%;
// }
// }


::ng-deep .app-footer {
display: none!important;
visibility: hidden!important;
}

::ng-deep .top_footer_box {
display: none!important;
visibility: hidden!important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@
}
}

.mat-form-field-wrapper{
// .mat-form-field-wrapper{

}
// }


.combined-field {
Expand Down Expand Up @@ -780,3 +780,4 @@
visibility: visible !important;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function forbiddenNamesValidatorPosition(optionsArray: any): ValidatorFn
export class PublicSignupComponent implements OnInit, OnDestroy {
registrationForm!: FormGroup
namePatern = `^[a-zA-Z\\s\\']{1,32}$`
// emailWhitelistPattern = `^[a-zA-Z0-9._-]{3,}\\b(@gov|@nic)\\b\.\\b(in)\\b$`
emailWhitelistPattern = `^[a-zA-Z0-9._-]{3,}\\b@\\b[a-zA-Z0-9]*|\\b(.gov|.nic)\b\\.\\b(in)\\b$`
departments!: any
masterDepartments!: Observable<any> | undefined
masterDepartmentsOriginal!: []
Expand Down Expand Up @@ -79,7 +79,7 @@ export class PublicSignupComponent implements OnInit, OnDestroy {
firstname: new FormControl('', [Validators.required, Validators.pattern(this.namePatern)]),
lastname: new FormControl('', [Validators.required, Validators.pattern(this.namePatern)]),
position: new FormControl('', [Validators.required, forbiddenNamesValidatorPosition(this.masterPositions)]),
email: new FormControl('', [Validators.required, Validators.email]),
email: new FormControl('', [Validators.required, Validators.pattern(this.emailWhitelistPattern)]),
department: new FormControl('', [Validators.required, forbiddenNamesValidator(this.masterDepartments)]),
confirmBox: new FormControl(false, [Validators.required]),
// recaptchaReactive: new FormControl(null, [Validators.required]),
Expand Down

0 comments on commit c9d7226

Please sign in to comment.