Skip to content

Commit

Permalink
Merge pull request #177 from mansurskTarento/events
Browse files Browse the repository at this point in the history
fixing build issues, added preview
  • Loading branch information
venkykandagaddala authored Feb 17, 2025
2 parents 7212498 + a692ac3 commit cfc579b
Show file tree
Hide file tree
Showing 9 changed files with 311 additions and 284 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@
"@sunbird-cb/collection": "1.0.48-ang-13-16",
"@sunbird-cb/design-system": "0.0.1",
"@sunbird-cb/micro-surveys": "2.0.20-ang-13-16",
"@sunbird-cb/rain-dashboards": "0.0.36-ang-13-16",
"@sunbird-cb/resolver": "1.0.0-ang-13-16",
"@sunbird-cb/taxonomy-editor": "0.0.3-ang-13-16",
"@sunbird-cb/utils": "1.0.21-ang-13-16",
"@sunbird-cb/rain-dashboards": "0.0.36-ang-13-16",
"@types/file-saver": "^2.0.1",
"@types/jest": "^29.5.13",
"chart.js": "^4.1.1 ",
"chartjs-plugin-datalabels": "^2.2.0",
"d3": "^5.9.7",
"dom-to-image": "^2.6.0",
"file-saver": "^2.0.2",
"hammerjs": "^2.0.8",
"husky": "^4.2.3",
Expand All @@ -64,6 +65,7 @@
"jquery": "^3.4.1",
"leader-line": "1.0.7",
"lodash": "4.17.21",
"luxon": "^3.5.0",
"material-icons": "^0.7.1",
"moment": "^2.29.1",
"mustache": "^3.0.2",
Expand All @@ -74,10 +76,11 @@
"ng2-search-filter": "^0.5.1",
"ngx-export-as": "^1.14.1",
"ngx-image-cropper": "^6.3.4",
"ngx-material-timepicker": "^13.1.1",
"ngx-owl-carousel-o": "16",
"ngx-pagination": "^6.0.0",
"ngx-quill": "^7.1.2",
"pdfjs-dist": "^2.1.266",
"dom-to-image": "^2.6.0",
"quill": "^1.3.7",
"rxjs": "~6.5.2",
"shepherd.js": "^7.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<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}">
[ngClass]="{'behavioural': (competencyArea.toLowerCase() === 'behavioural' || competencyArea.toLowerCase() === 'behavioral'), 'functional': competencyArea.toLowerCase() === 'functional', 'domain': 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 class="text-base font-bold ellipsis" title="{{ theme?.competencyThemeName }}">{{ theme?.competencyThemeName
}}
</div>
<div class="flex flex-wrap gap-4 chip-container">
<ng-container *ngFor="let subTheme of widgetData?.content?.value; let i = index">
<ng-container *ngFor="let subTheme of theme?.subThems; 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 }}
[ngClass]="{'hidden': (i >= 1 && !isExpanded), 'chip-ellipsis': !isExpanded && theme?.subThems?.length > 1 }"
title="{{ subTheme.competencySubThemeName }}">
{{ subTheme.competencySubThemeName }}
</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()">
*ngIf="theme?.subThems?.length > 1 && !isExpanded" (click)="handleToggleSize()">
View more
</div>
<div class="flex items-center ws-mat-default-text underline cursor-pointer text-xs" *ngIf="isExpanded"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
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',
Expand All @@ -29,12 +25,11 @@ import { trigger, state, style, animate, transition } from '@angular/animations'

export class CardCompetencyComponent implements OnInit {

@Input() widgetData!: any
@Input() theme: any[] = []
@Input() competencyArea = ''
isExpanded = false

constructor() {
// super()
}

ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export class CreateEventComponent implements OnInit, AfterViewInit {
this.speakersList = _.get(this.eventDetails, 'speakers', [])
this.materialsList = _.get(this.eventDetails, 'eventHandouts', [])
this.competencies = _.get(this.eventDetails, 'competencies_v6', [])

// this.updatedEventDetails = this.getFormBodyOfEvent(this.eventDetails['status']) //need to remove
}

ngAfterViewInit() {
Expand Down Expand Up @@ -198,7 +200,7 @@ export class CreateEventComponent implements OnInit, AfterViewInit {
}
},
error: (error: HttpErrorResponse) => {
const errorMessage = _.get(error, 'error.message', 'Something went wrong while creating event, please try again')
const errorMessage = _.get(error, 'error.message', 'Something went wrong while updating event, please try again')
this.openSnackBar(errorMessage)
}
})
Expand Down
Loading

0 comments on commit cfc579b

Please sign in to comment.