From 12b06846c26e78f26cc71480dad834027d048ffc Mon Sep 17 00:00:00 2001 From: Afzal84 Date: Mon, 5 Aug 2024 20:08:12 +0530 Subject: [PATCH 1/3] Fixed:- Survey changes for learner portal --- .../profile-card-stats.component.scss | 1 + .../survey-form-section.component.html | 30 ++++ .../survey-form-section.component.scss | 152 ++++++++++++++++++ .../survey-form-section.component.spec.ts | 25 +++ .../survey-form-section.component.ts | 22 +++ .../survey-form/survey-form.module.ts | 17 ++ .../collection/src/lib/registration.config.ts | 4 +- .../in-sight-side-bar.component.html | 3 + .../in-sight-side-bar.component.ts | 3 +- src/app/home/home.module.ts | 2 + 10 files changed, 257 insertions(+), 2 deletions(-) create mode 100644 library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.html create mode 100644 library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.scss create mode 100644 library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.spec.ts create mode 100644 library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.ts create mode 100644 library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form.module.ts diff --git a/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.scss b/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.scss index f0902ee5e..7f398a686 100644 --- a/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.scss +++ b/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.scss @@ -94,6 +94,7 @@ } .profile-wrapper { margin-top: 32px; + position: relative; z-index: 10; @include breakpoint-xs { diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.html b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.html new file mode 100644 index 000000000..6644ba46e --- /dev/null +++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.html @@ -0,0 +1,30 @@ +
+ +
+ {{data.title}} + + close + +
+
+
+
+
+ +
+
+
+ {{data?.ImageUrl}} +
+
+

{{data?.content}}

+
+
+ + +
+
+
\ No newline at end of file diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.scss b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.scss new file mode 100644 index 000000000..fff2cc614 --- /dev/null +++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.scss @@ -0,0 +1,152 @@ +.tips-container { + background-color: #F9CB97; + padding: 16px; + padding-bottom: 0px; + border-radius: 8px; + display: flex; + flex-direction: column; + justify-content: space-between; + margin-bottom: 1rem; + overflow: hidden; + width: 385px; + box-sizing: border-box; + + + } + + @media screen and (max-width: 1000px) { + .tips-container { + width: 100%; + + } + } + + .tips-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; + z-index: 10; + } + + .tips-header h3 { + margin: 0; + font-size: 1.2em; + color: #000000; + font-family: Montserrat; + font-size: 16px; + z-index: 10; + } + + .tips-header button { + background: none; + border: none; + color: #01468f; + cursor: pointer; + font-family: Lato; + font-size: 14px; + z-index: 10; + } + + .tip-content { + display: flex; + // justify-content: space-between; + z-index: 10; + padding-top: 6px; + margin-bottom: 8px; + } + + .tip-content p { + margin-left: 12px; + margin-bottom: 4px; + color: #000000; + font-family: Lato; + font-size: 14px; + z-index: 10; + line-height: 20px; + } + + .tip-count { + display: flex; + justify-content: end; + align-items: center; + font-family: Lato !important; + font-size: 14px !important; + z-index: 10; + font-weight: 600; + line-height: 19.5px; + } + + // .tip-data { + // width: calc(100% - 110px); + // } + + + .background-circle { + position: absolute; + z-index: 1; + right: -6.5em; + top: 2.8em; + width: 178px; + height: 178px; + border-radius: 100%; + background-color: #fcd2a3; + } + + .circle-box { + position: relative; + width: 100%; + height: 0px; + } + + .book-icon { + width: 50px; + height: 50px; + padding: 6px; + box-sizing: border-box; + } + + .background { + background-color: white; + justify-content: center; + width: 100px; + height: 56px; + border-radius: 5px; + text-align: center; + } + .view-more { + display: flex; + align-items: center; + text-align: center; + height: 40px; + justify-content: center; + } + + .view-more:hover { + background-color: #DCDFE5; + } + .card-header { + display: flex; + justify-content: space-between; + } + + .card-title { + font-weight: bold; + width: 80%; + font-size: 16px; + line-height: 1.2; + } + + .close-button { + cursor: pointer; + vertical-align: top; + color: #1b4ca1; + } + .btn-title { + color: #fff !important; + background-color: #1b4ca1; + border-radius: 16px; + padding: 8px 16px; + font-weight: 400; + + } \ No newline at end of file diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.spec.ts b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.spec.ts new file mode 100644 index 000000000..0c1f203f0 --- /dev/null +++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SurveyFormSectionComponent } from './survey-form-section.component'; + +describe('SurveyFormSectionComponent', () => { + let component: SurveyFormSectionComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SurveyFormSectionComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SurveyFormSectionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.ts b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.ts new file mode 100644 index 000000000..6f08630c8 --- /dev/null +++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.ts @@ -0,0 +1,22 @@ +import { Component, Input, OnInit } from '@angular/core'; + +@Component({ + selector: 'ws-widget-survey-form-section', + templateUrl: './survey-form-section.component.html', + styleUrls: ['./survey-form-section.component.scss'] +}) +export class SurveyFormSectionComponent implements OnInit { + isVisible: boolean = true + @Input() surveyFormData: any + surveyData: any + + constructor() { } + + ngOnInit() { + // this.surveyData = this.surveyFormData + } + + closeCard() { + this.isVisible = false; + } +} diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form.module.ts b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form.module.ts new file mode 100644 index 000000000..47a0dd83f --- /dev/null +++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SurveyFormSectionComponent } from './survey-form-section/survey-form-section.component' +import { MatIconModule } from '@angular/material' +import { TranslateModule } from '@ngx-translate/core' + + +@NgModule({ + declarations: [SurveyFormSectionComponent], + imports: [ + CommonModule, + MatIconModule, + TranslateModule + ], + exports: [SurveyFormSectionComponent] +}) +export class SurveyFormModule { } diff --git a/library/ws-widget/collection/src/lib/registration.config.ts b/library/ws-widget/collection/src/lib/registration.config.ts index 32780c09f..97d924a57 100644 --- a/library/ws-widget/collection/src/lib/registration.config.ts +++ b/library/ws-widget/collection/src/lib/registration.config.ts @@ -181,6 +181,7 @@ import { CardEventHubModule } from './card-event-hub/card-event-hub.module' import { CardCompetencyComponent } from './card-competency/card-competency.component' import { CardCompetencyModule } from './card-competency/card-competency.module' import { TipsForLearnerModule } from './_common/tips-for-learner/tips-for-learner.module' +import { SurveyFormModule } from './_common/survey-form-left-section/survey-form/survey-form.module' export const WIDGET_REGISTERED_MODULES = [ AvatarPhotoModule, @@ -273,6 +274,7 @@ export const WIDGET_REGISTERED_MODULES = [ CardEventHubModule, CardCompetencyModule, TipsForLearnerModule, + SurveyFormModule ] export const WIDGET_REGISTRATION_CONFIG: NsWidgetResolver.IRegistrationConfig[] = [ @@ -687,5 +689,5 @@ export const WIDGET_REGISTRATION_CONFIG: NsWidgetResolver.IRegistrationConfig[] widgetType: ROOT_WIDGET_CONFIG.card._type, widgetSubType: ROOT_WIDGET_CONFIG.card.card_competency, component: CardCompetencyComponent, - }, + } ] diff --git a/src/app/component/in-sight-side-bar/in-sight-side-bar.component.html b/src/app/component/in-sight-side-bar/in-sight-side-bar.component.html index cc8e666f8..9322737d1 100644 --- a/src/app/component/in-sight-side-bar/in-sight-side-bar.component.html +++ b/src/app/component/in-sight-side-bar/in-sight-side-bar.component.html @@ -9,6 +9,9 @@