forked from sunbird-cb/sunbird-cb-orgportal
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from mansurskTarento/events
Events
- Loading branch information
Showing
75 changed files
with
6,221 additions
and
3 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
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
28 changes: 28 additions & 0 deletions
28
...lib/routes/home/routes/events-2/components/card-competency/card-competency.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,28 @@ | ||
<div [@expandCollapse]="isExpanded ? 'expanded' : 'collapsed'" [ngClass]="{'expanded': isExpanded}"> | ||
<div class="competency-passbook-theme" | ||
[ngClass]="{'behavioural': (widgetData?.competencyArea?.toLowerCase() === 'behavioural' || widgetData?.competencyArea?.toLowerCase() === 'behavioral'), 'functional': widgetData?.competencyArea?.toLowerCase() === 'functional', 'domain': widgetData?.competencyArea?.toLowerCase() === 'domain', 'shadow-md': isExpanded}"> | ||
<div class="detail"> | ||
<div class="flex flex-col gap-2"> | ||
<div class="text-base font-bold ellipsis" title="{{ widgetData?.content?.key }}">{{ widgetData?.content?.key }} | ||
</div> | ||
<div class="flex flex-wrap gap-4 chip-container"> | ||
<ng-container *ngFor="let subTheme of widgetData?.content?.value; let i = index"> | ||
<div class="chip rounded-full text-xs" | ||
[ngClass]="{'hidden': (i >= 1 && !isExpanded), 'chip-ellipsis': !isExpanded && widgetData?.content?.value?.length > 1 }" | ||
title="{{ subTheme }}"> | ||
{{ subTheme }} | ||
</div> | ||
</ng-container> | ||
<div class="flex items-center ws-mat-default-text underline cursor-pointer text-xs" | ||
*ngIf="widgetData?.content?.value?.length > 1 && !isExpanded" (click)="handleToggleSize()"> | ||
View more | ||
</div> | ||
<div class="flex items-center ws-mat-default-text underline cursor-pointer text-xs" *ngIf="isExpanded" | ||
(click)="handleToggleSize()"> | ||
View less | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
79 changes: 79 additions & 0 deletions
79
...lib/routes/home/routes/events-2/components/card-competency/card-competency.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,79 @@ | ||
.behavioural { | ||
background-color: #F8B861; | ||
} | ||
|
||
.functional { | ||
background-color: #E24577; | ||
} | ||
|
||
.domain { | ||
background-color: #7B47A4; | ||
} | ||
|
||
.competency-passbook-theme { | ||
width: 100%; | ||
max-width: 344px; | ||
min-width: 320px; | ||
height: 92px; | ||
border-top-right-radius: 8px; | ||
border-bottom-right-radius: 12px; | ||
border-bottom-left-radius: 12px; | ||
border-top-left-radius: 8px; | ||
} | ||
|
||
.ellipsis { | ||
white-space: nowrap; | ||
width: 280px; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.detail { | ||
width: 100%; | ||
max-width: 344px; | ||
background-color: rgb(255, 255, 255); | ||
border-radius: 8px; | ||
position: relative; | ||
top: 4px; | ||
height: inherit; | ||
border: 1px solid rgba(0, 0, 0, 0.08); | ||
|
||
&>div { | ||
padding: 12px 16px 16px 16px; | ||
} | ||
|
||
.chip-container { | ||
.chip { | ||
border: 1px solid #1B4CA1; | ||
color: #1B4CA1; | ||
line-height: 14px; | ||
padding: 4px 8px; | ||
white-space: normal; | ||
} | ||
} | ||
} | ||
|
||
.chip-ellipsis { | ||
white-space: nowrap !important; | ||
max-width: 100px; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.expanded { | ||
padding-bottom: 12px; | ||
|
||
.competency-passbook-theme { | ||
max-width: 372px; | ||
width: 100%; | ||
min-height: 92px; | ||
height: auto; | ||
|
||
.detail { | ||
width: 100%; | ||
max-width: inherit; | ||
min-height: inherit; | ||
height: inherit; | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
.../routes/home/routes/events-2/components/card-competency/card-competency.component.spec.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,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { CardCompetencyComponent } from './card-competency.component'; | ||
|
||
describe('CardCompetencyComponent', () => { | ||
let component: CardCompetencyComponent; | ||
let fixture: ComponentFixture<CardCompetencyComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [CardCompetencyComponent] | ||
}); | ||
fixture = TestBed.createComponent(CardCompetencyComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
46 changes: 46 additions & 0 deletions
46
...c/lib/routes/home/routes/events-2/components/card-competency/card-competency.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,46 @@ | ||
import { Component, OnInit, Input } from '@angular/core' | ||
import { trigger, state, style, animate, transition } from '@angular/animations' | ||
// import { NsWidgetResolver, WidgetBaseComponent } from '@sunbird-cb/resolver' | ||
// import { NsCardContent } from '@sunbird-cb/utils/lib/services/card-content.model' | ||
// import { NsCardContent } from '../card-content-v2/card-content-v2.model' | ||
// import { NsWidgetResolver, WidgetBaseComponent } from '@ws-widget/resolver' | ||
|
||
@Component({ | ||
selector: 'ws-widget-card-competency', | ||
templateUrl: './card-competency.component.html', | ||
styleUrls: ['./card-competency.component.scss'], | ||
animations: [ | ||
trigger('expandCollapse', [ | ||
state('collapsed', style({ | ||
height: '104px', | ||
width: '320px', | ||
})), | ||
state('expanded', style({ | ||
minHeight: '120px', | ||
width: '372px', | ||
height: 'auto', | ||
})), | ||
transition('collapsed <=> expanded', [ | ||
animate('0.5s'), | ||
]), | ||
]), | ||
], | ||
}) | ||
|
||
export class CardCompetencyComponent implements OnInit { | ||
|
||
@Input() widgetData!: any | ||
@Input() competencyArea = '' | ||
isExpanded = false | ||
|
||
constructor() { | ||
// super() | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
handleToggleSize(_viewMore: any): void { | ||
this.isExpanded = !this.isExpanded | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
...p/src/lib/routes/home/routes/events-2/components/create-event/create-event.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,66 @@ | ||
<div class="w-full flex flex-column events"> | ||
<div class="breadcrum flex items-center justify-between"> | ||
<div class="flex gap-2 items-center"> | ||
<mat-icon class="back-arrow" (click)="navigateBack()">arrow_back</mat-icon> | ||
<span class="event-text">Event</span> | ||
<mat-icon class="chevron-arrow">chevron_right</mat-icon> | ||
<span class="event-builder-text">Event Builder</span> | ||
</div> | ||
<div class="flex gap-4"> | ||
<ng-container *ngIf="openMode === 'edit'"> | ||
<button mat-raised-button class="flex justify-center items-center save-and-exit" (click)="saveAndExit()">Save | ||
Draft & Exit</button> | ||
</ng-container> | ||
<ng-container *ngIf="currentStepperIndex < 3"> | ||
<button mat-raised-button class="flex justify-center items-center next-btn" | ||
(click)="moveToNextForm()">Next</button> | ||
</ng-container> | ||
<ng-container *ngIf="!showPreview && currentStepperIndex === 3"> | ||
<button mat-raised-button class="flex items-center publish-btn" (click)="preview()">Preview</button> | ||
</ng-container> | ||
<ng-container *ngIf="this.currentStepperIndex === 3 || this.currentStepperIndex === 4"> | ||
<button mat-raised-button class="flex items-center publish-btn" (click)="publish()">Send to Publisher</button> | ||
</ng-container> | ||
</div> | ||
</div> | ||
|
||
<mat-stepper labelPosition="bottom" [selectedIndex]="currentStepperIndex" | ||
(selectionChange)="onSelectionChange($event)" class="mx-10" #stepper> | ||
<mat-step [stepControl]="eventDetailsForm"> | ||
<ng-template matStepLabel>Basic Details</ng-template> | ||
<ws-app-event-basic-details [eventDetails]="eventDetailsForm" [openMode]="openMode" | ||
[userProfile]="userProfile"></ws-app-event-basic-details> | ||
</mat-step> | ||
|
||
<mat-step> | ||
<ng-template matStepLabel>Add Speaker</ng-template> | ||
<ws-app-speakers [speakersList]="speakersList" [openMode]="openMode" | ||
[userProfile]="userProfile"></ws-app-speakers> | ||
</mat-step> | ||
|
||
<mat-step> | ||
<ng-template matStepLabel>Add Material</ng-template> | ||
<ws-app-event-materials [materialsList]="materialsList" [openMode]="openMode"></ws-app-event-materials> | ||
</mat-step> | ||
|
||
<mat-step> | ||
<ng-template matStepLabel>Add Competency</ng-template> | ||
<ws-app-event-competencies [competenciesList]="competencies" [openMode]="openMode" | ||
(addCompetencies)="addCompetencies($event)"></ws-app-event-competencies> | ||
<!-- <ng-container *ngIf="showPreview; else add_competencies"> | ||
<ws-app-events-preview [event]="updatedEventDetails"></ws-app-events-preview> | ||
</ng-container> | ||
<ng-template #add_competencies> | ||
<ws-app-event-competencies [competenciesList]="competencies" [openMode]="openMode" | ||
(addCompetencies)="addCompetencies($event)"></ws-app-event-competencies> | ||
</ng-template> --> | ||
</mat-step> | ||
|
||
<ng-container *ngIf="showPreview"> | ||
<mat-step> | ||
<ng-template matStepLabel>Preview</ng-template> | ||
<ws-app-events-preview [event]="updatedEventDetails"></ws-app-events-preview> | ||
</mat-step> | ||
</ng-container> | ||
</mat-stepper> | ||
</div> |
89 changes: 89 additions & 0 deletions
89
...p/src/lib/routes/home/routes/events-2/components/create-event/create-event.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,89 @@ | ||
.breadcrum { | ||
height: 65px; | ||
border-bottom: 1px solid #00000014; | ||
|
||
.back-arrow { | ||
color: #000000DE !important; | ||
font-size: 24px; | ||
cursor: pointer; | ||
} | ||
|
||
.event-text { | ||
/* stylelint-disable */ | ||
font: 400 14px Lato; | ||
/* stylelint-enable */ | ||
} | ||
|
||
.chevron-arrow { | ||
color: #1B4CA1; | ||
} | ||
|
||
.event-builder-text { | ||
/* stylelint-disable */ | ||
font: 700 14px Lato; | ||
/* stylelint-enable */ | ||
color: #1B4CA1; | ||
} | ||
|
||
.save-and-exit { | ||
width: 140px; | ||
height: 32px; | ||
border-radius: 17px; | ||
border: 1px solid #1B4CA1; | ||
color: #1B4CA1 !important; | ||
/* stylelint-disable */ | ||
font: 700 14px Lato; | ||
/* stylelint-enable */ | ||
} | ||
|
||
.next-btn { | ||
width: 65px; | ||
height: 32px; | ||
border-radius: 17px; | ||
background-color: #1B4CA1 !important; | ||
color: #FFFFFF !important; | ||
/* stylelint-disable */ | ||
font: 700 14px Lato; | ||
/* stylelint-enable */ | ||
} | ||
|
||
.publish-btn { | ||
height: 32px; | ||
border-radius: 17px; | ||
background-color: #1B4CA1 !important; | ||
color: #FFFFFF !important; | ||
/* stylelint-disable */ | ||
font: 700 14px Lato; | ||
/* stylelint-enable */ | ||
padding: 0px 10px; | ||
} | ||
} | ||
|
||
:host ::ng-deep .events { | ||
.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container { | ||
width: calc(100% - 400px); | ||
min-width: 800px; | ||
align-self: center; | ||
} | ||
.mat-step-icon { | ||
width: 25px; | ||
height: 25px; | ||
border-radius: 12.5px; | ||
color: #FFFFFF; | ||
/* stylelint-disable */ | ||
font: 700 14px Lato; | ||
/* stylelint-enable */ | ||
} | ||
|
||
.mat-step-icon-selected { | ||
background-color: #F3962F!important; | ||
} | ||
|
||
// .mat-step-icon-completed { | ||
// background-color: #1D8923!important; | ||
// } | ||
|
||
.mat-step-icon:not(.mat-step-icon-selected):not(.mat-step-icon-completed) { | ||
background-color: #96ADD4!important; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...rc/lib/routes/home/routes/events-2/components/create-event/create-event.component.spec.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,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { CreateEventComponent } from './create-event.component'; | ||
|
||
describe('CreateEventComponent', () => { | ||
let component: CreateEventComponent; | ||
let fixture: ComponentFixture<CreateEventComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [CreateEventComponent] | ||
}); | ||
fixture = TestBed.createComponent(CreateEventComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.