Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rtal into signout
  • Loading branch information
christyfernandes committed Jun 8, 2022
2 parents bd3273b + 1491092 commit 059bf7c
Show file tree
Hide file tree
Showing 36 changed files with 941 additions and 324 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export namespace NsUser {
competencies?: any
systemTopics?: any
desiredTopics?: any
desiredCompetencies?: any
}

export interface INodebbUserProfile {
Expand Down
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>
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@
}

.learn-card {
// padding: 24px !important;
overflow: hidden;
width: 100%;
box-sizing: border-box;

Expand All @@ -126,9 +124,7 @@
}

.card_inner_title_box {
// display: column;
width: 220px;
// padding: 24px;
box-sizing: border-box;

@media (max-width: 768px) {
Expand Down Expand Up @@ -194,3 +190,13 @@ a.level_item_active .mat-icon {

}

[wsCompTooltipDirective] {
position: relative;
}

.tooltip {
position: absolute;
opacity: 1;
z-index: 999;
padding: 5px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ export class CompetencyCardComponent implements OnInit {
this.selectedCompetency.emit(this.selectedCompList)
}
}

newselectedCompetency(event: any) {
this.selectedCompetency.emit(event)
}
}
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>
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;
}
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)
}
}

}
Loading

0 comments on commit 059bf7c

Please sign in to comment.