-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'signout' of https://github.com/sunbird-cb/sunbird-cb-po…
…rtal into signout
- Loading branch information
Showing
36 changed files
with
941 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 42 additions & 33 deletions
75
...s/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,47 @@ | ||
|
||
<mat-card class="learn-card margin-bottom-m position-relative mat-card padding-m" *ngFor="let competency of competenciesData"> | ||
<a href="javascript:void(0)" role="button"> | ||
<mat-card-content > | ||
<div class="card_inner_content flex" > | ||
<div class="card_inner_title_box flex-col"> | ||
<div class="cursor-pointer flex-col"> | ||
<h4 class="mat-h4">{{ competency?.name}}</h4> | ||
<p class="mat-body-2 ws-mat-black60-text">{{ competency?.competencyType}}</p> | ||
<div class="flex flex-col"> | ||
<mat-card class="learn-card margin-bottom-m position-relative mat-card padding-m" *ngFor="let competency of competenciesData"> | ||
<a href="javascript:void(0)" role="button"> | ||
<mat-card-content > | ||
<div class="card_inner_content flex" > | ||
<div class="card_inner_title_box flex-col"> | ||
<div class="cursor-pointer flex-col"> | ||
<h4 class="mat-h4">{{ competency?.name}}</h4> | ||
<p class="mat-body-2 ws-mat-black60-text">{{ competency?.competencyType}}</p> | ||
</div> | ||
<!-- <div class="flex-col text_icon_box"> | ||
<mat-icon class="mat-icon1 mat-icon notranslate material-icons mat-icon-no-color" role="img" | ||
aria-hidden="true">school</mat-icon> | ||
<span class="icon_text mat-caption ws-mat-black60-text"> | ||
4 CBPs | ||
</span> | ||
</div> --> | ||
</div> | ||
<div class="flex-1 card_right_txtbox flex-col padding-left-m"> | ||
<p class="cursor-pointer mat-body-1 ws-mat-black60-text" > | ||
{{ competency?.description}} | ||
</p> | ||
</div> | ||
<!-- <div class="flex-col text_icon_box"> | ||
<mat-icon class="mat-icon1 mat-icon notranslate material-icons mat-icon-no-color" role="img" | ||
aria-hidden="true">school</mat-icon> | ||
<span class="icon_text mat-caption ws-mat-black60-text"> | ||
4 CBPs | ||
</span> | ||
</div> --> | ||
</div> | ||
<div class="flex-1 card_right_txtbox flex-col padding-left-m"> | ||
<p class="cursor-pointer mat-body-1 ws-mat-black60-text" > | ||
{{ competency?.description}} | ||
</p> | ||
</div> | ||
</div> | ||
<div class="flex flex-col level_box" *ngIf="competency?.children && competency?.children.length > 0"> | ||
<p class="mat-body-2 ws-mat-black60-text">Select level</p> | ||
<div class="flex flex-col level_box" *ngIf="competency?.children && competency?.children.length > 0"> | ||
<p class="mat-body-2 ws-mat-black60-text">Select level</p> | ||
|
||
<div class="flex flex-row level_list_box"> | ||
<a class="margin-right-xs flex level_item level_item_deactive" *ngFor="let complevel of competency?.children" | ||
[class.level_item_active]="competency.competencySelfAttestedLevel ? (complevel.id === competency.competencySelfAttestedLevel) :(complevel.id === selectedLevelId && competency.id === selectedCompId)"> | ||
<span class="" (click)="selectLevel(complevel, competency)">{{complevel.name}}</span> | ||
<!-- <mat-icon class="mat-icon margin-left-xs ws-mat-black60-text info_icon">info_outlined</mat-icon> --> | ||
</a> | ||
<div class="flex flex-row level_list_box flex-wrap"> | ||
<ws-app-level-card [competencyLevelData]="complevel" [competency]="competency" *ngFor="let complevel of competency?.children" (selectedCompetency)="newselectedCompetency($event)"></ws-app-level-card> | ||
<!-- <a wsCompTooltipDirective class="margin-right-xs flex level_item level_item_deactive" *ngFor="let complevel of competency?.children" | ||
[class.level_item_active]="competency.competencySelfAttestedLevel ? (complevel.id === competency.competencySelfAttestedLevel) :(complevel.id === selectedLevelId && competency.id === selectedCompId)"> | ||
<span class="" (click)="selectLevel(complevel, competency)">{{complevel.name}}</span> | ||
<mat-icon class="mat-icon margin-left-xs ws-mat-black60-text info_icon">info_outlined</mat-icon> | ||
<ng-template #tooltipTemplate> | ||
<div class="tooltip"> | ||
<ws-app-level-info [complevel]="complevel"></ws-app-level-info> | ||
</div> | ||
</ng-template> | ||
</a> --> | ||
</div> | ||
</div> | ||
</div> | ||
</mat-card-content> | ||
</a> | ||
</mat-card> | ||
</mat-card-content> | ||
</a> | ||
</mat-card> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<a wsCompTooltipDirective class="margin-right-xs flex level_item level_item_deactive margin-bottom-xs" | ||
[class.level_item_active]="competency.competencySelfAttestedLevel ? (competencyLevelData.id === competency.competencySelfAttestedLevel) :(competencyLevelData.id === selectedLevelId && competency.id === selectedCompId)"> | ||
<span class="" (click)="selectLevel(competencyLevelData, competency)">{{competencyLevelData.level}}</span> | ||
<mat-icon class="mat-icon margin-left-xs ws-mat-black60-text info_icon">info_outlined</mat-icon> | ||
|
||
<ng-template #tooltipTemplate> | ||
<div class="tooltip"> | ||
<ws-app-level-info [complevel]="competencyLevelData"></ws-app-level-info> | ||
</div> | ||
</ng-template> | ||
</a> |
209 changes: 209 additions & 0 deletions
209
project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
@import 'ws-common'; | ||
@import 'ws-vars'; | ||
@import 'ws-mixins'; | ||
|
||
.competency-card { | ||
flex: 1; | ||
height: auto; | ||
// min-width: 346px; | ||
min-height: 190px; | ||
|
||
// width: max-content; | ||
@include breakpoint-xs { | ||
// min-width: 100%; | ||
width: auto; | ||
} | ||
} | ||
|
||
.competency_main { | ||
width:100%; | ||
|
||
@media (max-width:1024px) { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.font-medium { | ||
font-weight: 500 !important; | ||
} | ||
|
||
.dot:before { | ||
content: '•'; | ||
margin: 1rem; | ||
} | ||
|
||
.mobile { | ||
@include breakpoint-xs { | ||
flex: 1; | ||
} | ||
|
||
@include breakpoint-s { | ||
flex: 1; | ||
} | ||
} | ||
|
||
.mobile2 { | ||
@include breakpoint-xs { | ||
margin-top: $size-s; | ||
} | ||
|
||
// @include breakpoint-s { | ||
// margin-top: $size-s; | ||
// } | ||
} | ||
|
||
.tag { | ||
display: flex; | ||
margin: 0 10px; | ||
padding: 3px 15px; | ||
font-size: 12px; | ||
min-width: 50px; | ||
justify-content: center; | ||
border-radius: 20px 5px 5px 20px; | ||
} | ||
|
||
.noocoments { | ||
flex: 1; | ||
text-align: right; | ||
margin-right: $size-m; | ||
} | ||
|
||
.custom { | ||
flex-direction: column; | ||
|
||
@include breakpoint-xs { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
.custom-reverse { | ||
flex-direction: column; | ||
|
||
@include breakpoint-xs { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
.add-comp { | ||
right: 0; | ||
display: flex; | ||
position: absolute; | ||
top: 0; | ||
height: 48px; | ||
width: 48px; | ||
background: rgb(29, 137, 35) !important; | ||
} | ||
|
||
.margin-0 { | ||
margin: 0; | ||
} | ||
|
||
.pad-4 { | ||
padding: 4px; | ||
} | ||
|
||
.example-header-image { | ||
// background-image: url('https://material.angular.io/assets/img/examples/shiba1.jpg'); | ||
background-size: cover; | ||
} | ||
|
||
.mat-copmetence a:hover { | ||
color: #ffffff !important ; | ||
} | ||
|
||
.learn-card { | ||
// padding: 24px !important; | ||
// overflow: hidden; | ||
width: 100%; | ||
box-sizing: border-box; | ||
|
||
.mat-card-content { | ||
margin-bottom: 0; | ||
} | ||
|
||
.card_inner_content { | ||
overflow: hidden; | ||
} | ||
|
||
.card_inner_title_box { | ||
// display: column; | ||
width: 220px; | ||
// padding: 24px; | ||
box-sizing: border-box; | ||
|
||
@media (max-width: 768px) { | ||
width: 40%; | ||
// padding: 12px 12px; | ||
} | ||
|
||
h4.mat-h4 { | ||
margin-bottom: 5px; | ||
} | ||
|
||
.text_icon_box { | ||
margin-top: 45px; | ||
.mat-icon1 { | ||
vertical-align: middle; | ||
margin-right: 10px; | ||
} | ||
.icon_text { | ||
margin-bottom: 0; | ||
|
||
} | ||
} | ||
|
||
} | ||
.card_right_txtbox { | ||
float: right; | ||
// padding: 24px; | ||
box-sizing: border-box; | ||
width: calc(100% - 230px); | ||
border-left:1px solid rgba(0, 0, 0, 0.08); | ||
|
||
@media (max-width: 768px) { | ||
width: 60%; | ||
padding: 12px 12px; | ||
} | ||
|
||
} | ||
} | ||
|
||
a.level_item { | ||
height: 40px; | ||
line-height: 26px; | ||
padding:6px 12px; | ||
border-radius: 18px 18px; | ||
text-align: center; | ||
border:1px solid rgba(0, 0, 0, 0.08); | ||
background-color: #fff; | ||
box-sizing: border-box; | ||
width: auto; | ||
} | ||
a.level_item_active { | ||
background-color: #0074b6; | ||
color: #fff; | ||
border:1px solid #0074b6; | ||
} | ||
a.level_item_active .mat-icon { | ||
color: #fff!important; | ||
} | ||
.material-icons.info_icon { | ||
font-size: 18px; | ||
width: 18px; | ||
height: 18px; | ||
line-height: 27px; | ||
|
||
} | ||
|
||
[wsCompTooltipDirective] { | ||
position: relative; | ||
} | ||
|
||
.tooltip { | ||
position: absolute; | ||
opacity: 1; | ||
z-index: 999; | ||
padding: 5px; | ||
top: 35px; | ||
left: -10px; | ||
} |
43 changes: 43 additions & 0 deletions
43
project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'ws-app-level-card', | ||
templateUrl: './level-card.component.html', | ||
styleUrls: ['./level-card.component.scss'], | ||
}) | ||
export class LevelCardComponent implements OnInit { | ||
selectedLevelId: any | ||
selectedCompId: any | ||
selectedCompList: any = [] | ||
@Input() competencyLevelData!: any | ||
@Input() competency!: any | ||
@Output() selectedCompetency = new EventEmitter<any>() | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
selectLevel(complevel: any, competency: any) { | ||
this.selectedLevelId = complevel.id | ||
this.selectedCompId = competency.id | ||
|
||
if (this.selectedCompList.indexOf(competency.id) === -1) { | ||
const compobj = { | ||
type: competency.type, | ||
id: competency.id, | ||
name: competency.name, | ||
description: competency.description, | ||
status: competency.status, | ||
source: competency.source, | ||
competencyType: competency.additionalProperties.competencyType, | ||
competencySelfAttestedLevel: complevel.id, | ||
competencySelfAttestedLevelValue: complevel.name, | ||
osid: competency.osid, | ||
} | ||
this.selectedCompList.push(compobj) | ||
this.selectedCompetency.emit(this.selectedCompList) | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.