From de2d92f7028495973cef7ed5d2d75ae56119a69e Mon Sep 17 00:00:00 2001 From: Amit Sengar Date: Mon, 6 Jun 2022 22:18:49 +0530 Subject: [PATCH 01/15] Profile v3 (#443) * Task #000: Certificate display issue, addded msg when no image in TOC page * Task #58513: signup link added in logout page * profile v3 module, routing, card fixed * url change * route fix * route fix #1 * Task #58513: added proxy conf for signup APIs * Task #58513: routes for public signup page * Task #58513: public signup component added * Task #58513: public signup service, dialog added * competency card added * Task #58513: lint fixes * route fix #3 * competency cards updated * topic card and footer added * route fix #4 * Step added * Commented Certification&Skills tab & section in profile update * Topics Added #1 * filter card added * Topics Added #2 * Topics Added #3 * Topics Added #4 * Current & Desired competency listing & selection api integration * conflict resolved * Updated current competency list integration * Task #58513: signup form changes w.r.t design changes * Task #58513: positions added from the assets in init * Add topic Added * Add topic Added#minar changes * Add topic Added#minar changes#1 * footer previous step counter fixed * Topic profile update * lint Fix * build Fix * Profile v3 (#436) * profile v3 module, routing, card fixed * url change * route fix * route fix #1 * competency card added * route fix #3 * competency cards updated * topic card and footer added * route fix #4 * Step added * Commented Certification&Skills tab & section in profile update * Topics Added #1 * filter card added * Topics Added #2 * Topics Added #3 * Topics Added #4 * Current & Desired competency listing & selection api integration * conflict resolved * Updated current competency list integration * Add topic Added * Add topic Added#minar changes * Add topic Added#minar changes#1 * footer previous step counter fixed * Topic profile update * lint Fix * build Fix Co-authored-by: nitin raj Co-authored-by: NandiniAV * build Fix#1 * Profile v3#1 update (#437) * profile v3 module, routing, card fixed * url change * route fix * route fix #1 * competency card added * route fix #3 * competency cards updated * topic card and footer added * route fix #4 * Step added * Commented Certification&Skills tab & section in profile update * Topics Added #1 * filter card added * Topics Added #2 * Topics Added #3 * Topics Added #4 * Current & Desired competency listing & selection api integration * conflict resolved * Updated current competency list integration * Add topic Added * Add topic Added#minar changes * Add topic Added#minar changes#1 * footer previous step counter fixed * Topic profile update * lint Fix * build Fix * build Fix#1 Co-authored-by: nitin raj Co-authored-by: NandiniAV * Updated current & desired comp list integration * roles and activity Init Commit * Task #58593: Fixed all style issues and text changes * roles and activity Init Commit #1 * Task #58593: popup text changes and redirection changes * role component * roles and activity Init Commit #2 * Fixed lint issues * Added duplicate check for competency listing * Task #58593: message change in notify component * Task #58593: email validation removed * Task #58593: strip changes for interest updates & based on interest strip * Task #58593: lint fixes * public home redirect * public home redirect#1 * role card fix * role card fix 2 * Profile v3 (#441) * role component * public home redirect * public home redirect#1 * role card fix * role card fix 2 Co-authored-by: Amit Sengar * landing page img change * default text added Co-authored-by: christopher.fernandes Co-authored-by: nitin raj Co-authored-by: NandiniAV Co-authored-by: nitinraj-tarento <75484189+nitinraj-tarento@users.noreply.github.com> --- .../card-notify/card-notify.component.html | 5 +- .../lib/card-notify/card-notify.component.ts | 15 +- .../content-strip-multiple.component.ts | 119 ++- .../content-strip-multiple.model.ts | 1 + .../src/lib/services/configurations.model.ts | 3 + .../lib/services/configurations.service.ts | 1 + .../src/lib/services/telemetry.service.ts | 6 +- .../app-toc-home/app-toc-home.component.html | 10 +- .../app-toc-single-page.component.ts | 2 +- .../browse-by-competency.module.ts | 1 + .../profile-view/profile-view.component.html | 4 +- .../add-topic/add-topic.component.html | 20 + .../add-topic/add-topic.component.scss | 71 ++ .../add-topic/add-topic.component.spec.ts | 25 + .../add-topic/add-topic.component.ts | 40 + .../competency-card.component.html | 38 + .../competency-card.component.scss | 188 +++++ .../competency-card.component.spec.ts | 25 + .../competency-card.component.ts | 41 + .../left-menu/left-menu.component.html | 9 + .../left-menu/left-menu.component.scss | 14 + .../left-menu/left-menu.component.spec.ts | 25 + .../left-menu/left-menu.component.ts | 37 + .../topic-card/topic-card.component.html | 28 + .../topic-card/topic-card.component.scss | 23 + .../topic-card/topic-card.component.spec.ts | 25 + .../topic-card/topic-card.component.ts | 66 ++ .../profile-v3/models/profile-v3.models.ts | 89 ++ .../profile-v3/profile-v3-routing.module.ts | 95 +++ .../routes/profile-v3/profile-v3.module.ts | 73 ++ .../resolvers/competency.resolver.ts | 30 + .../profile-v3/resolvers/topic.resolver.ts | 22 + .../current-competencies.component.html | 13 + .../current-competencies.component.scss | 121 +++ .../current-competencies.component.spec.ts | 25 + .../current-competencies.component.ts | 118 +++ .../desired-competencies.component.html | 3 + .../desired-competencies.component.scss | 0 .../desired-competencies.component.spec.ts | 25 + .../desired-competencies.component.ts | 114 +++ .../platform-walkthrough.component.html | 3 + .../platform-walkthrough.component.scss | 0 .../platform-walkthrough.component.spec.ts | 25 + .../platform-walkthrough.component.ts | 15 + .../profile-home/profile-home.component.html | 55 ++ .../profile-home/profile-home.component.scss | 128 +++ .../profile-home.component.spec.ts | 25 + .../profile-home/profile-home.component.ts | 93 +++ .../roles-activities.component.html | 65 ++ .../roles-activities.component.scss | 0 .../roles-activities.component.spec.ts | 25 + .../roles-activities.component.ts | 32 + .../roles-and-activities.component.html | 83 ++ .../roles-and-activities.component.scss | 23 + .../roles-and-activities.component.ts | 100 +++ .../routes/topics/topic.component.html | 19 + .../routes/topics/topic.component.scss | 0 .../routes/topics/topic.component.spec.ts | 25 + .../routes/topics/topic.component.ts | 148 ++++ .../profile-v3/services/profile_v3.service.ts | 36 + .../services/rolesandActivities.service.ts | 25 + .../profile-v3/services/topics.service.ts | 73 ++ .../global-search/global-search.component.ts | 11 +- .../learn-search/learn-search.component.ts | 6 +- .../user-profile/user-profile.component.html | 24 +- proxy/localhost.proxy.json | 2 +- src/app/app-routing.module.ts | 30 + src/app/app.module.ts | 6 + .../app-nav-bar/app-nav-bar.component.html | 18 +- .../app-nav-bar/app-nav-bar.component.ts | 9 +- src/app/component/root/root.component.ts | 2 +- .../public-home/public-home.component.html | 279 +++++++ .../public-home/public-home.component.scss | 587 ++++++++++++++ .../public-home/public-home.component.ts | 47 ++ .../public-logout.component.html | 5 +- .../public-logout/public-logout.component.ts | 2 +- .../public-logout/public-logout.module.ts | 2 + .../public-signup.component.html | 225 ++++++ .../public-signup.component.scss | 764 ++++++++++++++++++ .../public-signup/public-signup.component.ts | 226 ++++++ .../public-signup/public-signup.module.ts | 69 ++ .../signup-success-dialogue.component.html | 12 + .../signup-success-dialogue.component.scss | 0 .../signup-success-dialogue.component.spec.ts | 25 + .../signup-success-dialogue.component.ts | 25 + .../public-signup/signup.service.spec.ts | 12 + .../public/public-signup/signup.service.ts | 26 + src/app/routes/route-profile-v3.module.ts | 9 + src/app/services/init.service.ts | 4 + src/themes/_theme-mixins.scss | 4 + 90 files changed, 4931 insertions(+), 68 deletions(-) create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts create mode 100755 project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.html create mode 100755 project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.scss create mode 100755 project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.spec.ts create mode 100755 project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/models/profile-v3.models.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/profile-v3-routing.module.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/resolvers/competency.resolver.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/resolvers/topic.resolver.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.spec.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/services/profile_v3.service.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/services/rolesandActivities.service.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/services/topics.service.ts create mode 100644 src/app/routes/public/public-home/public-home.component.html create mode 100644 src/app/routes/public/public-home/public-home.component.scss create mode 100644 src/app/routes/public/public-home/public-home.component.ts create mode 100644 src/app/routes/public/public-signup/public-signup.component.html create mode 100644 src/app/routes/public/public-signup/public-signup.component.scss create mode 100644 src/app/routes/public/public-signup/public-signup.component.ts create mode 100644 src/app/routes/public/public-signup/public-signup.module.ts create mode 100644 src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.html create mode 100644 src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.scss create mode 100644 src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.spec.ts create mode 100644 src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.ts create mode 100644 src/app/routes/public/public-signup/signup.service.spec.ts create mode 100644 src/app/routes/public/public-signup/signup.service.ts create mode 100644 src/app/routes/route-profile-v3.module.ts diff --git a/library/ws-widget/collection/src/lib/card-notify/card-notify.component.html b/library/ws-widget/collection/src/lib/card-notify/card-notify.component.html index c36a06cdf..0df16d021 100644 --- a/library/ws-widget/collection/src/lib/card-notify/card-notify.component.html +++ b/library/ws-widget/collection/src/lib/card-notify/card-notify.component.html @@ -2,7 +2,8 @@
- Please self-attest your competencies, so we can personalize your learning experience + + For a personalized learning experience
diff --git a/library/ws-widget/collection/src/lib/card-notify/card-notify.component.ts b/library/ws-widget/collection/src/lib/card-notify/card-notify.component.ts index 06d295777..bcd5fa2b1 100644 --- a/library/ws-widget/collection/src/lib/card-notify/card-notify.component.ts +++ b/library/ws-widget/collection/src/lib/card-notify/card-notify.component.ts @@ -21,14 +21,23 @@ export class CardNotifyComponent extends WidgetBaseComponent } ngOnInit() { - if (this.configSvc.userProfileV2 && - this.configSvc.userProfileV2.competencies && this.configSvc.userProfileV2.competencies.length) { + // competency based + // if (this.configSvc.userProfileV2 && + // this.configSvc.userProfileV2.competencies && this.configSvc.userProfileV2.competencies.length) { + // this.showMsg = false + // } + + // topics based + if ( + (this.configSvc.userProfileV2 && this.configSvc.userProfileV2.desiredTopics && this.configSvc.userProfileV2.desiredTopics.length) || + (this.configSvc.userProfileV2 && this.configSvc.userProfileV2.systemTopics && this.configSvc.userProfileV2.systemTopics.length)) { this.showMsg = false } } navigate() { - this.router.navigate(['/app/competencies/home']) + // this.router.navigate(['/app/competencies/home']) + this.router.navigate(['/app/setup']) } } diff --git a/library/ws-widget/collection/src/lib/content-strip-multiple/content-strip-multiple.component.ts b/library/ws-widget/collection/src/lib/content-strip-multiple/content-strip-multiple.component.ts index 8adf600a0..b30ddcca2 100644 --- a/library/ws-widget/collection/src/lib/content-strip-multiple/content-strip-multiple.component.ts +++ b/library/ws-widget/collection/src/lib/content-strip-multiple/content-strip-multiple.component.ts @@ -110,7 +110,7 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent return data.stripInfo && data.stripInfo.visibilityMode === 'visible' } getContineuLearningLenth(data: IStripUnitContentData) { - return data.widgets ? data.widgets.length : 0 + return data.widgets ? data.widgets.length : 0 } getLength(data: IStripUnitContentData) { @@ -218,6 +218,7 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent this.fetchRelatedCBP(strip, calculateParentStatus) this.fetchRecommendedCourses(strip, calculateParentStatus) this.fetchMandatoryCourses(strip, calculateParentStatus) + this.fetchBasedOnInterest(strip, calculateParentStatus) } fetchFromApi(strip: NsContentStripMultiple.IContentStripUnit, calculateParentStatus = true) { if (strip.request && strip.request.api && Object.keys(strip.request.api).length) { @@ -457,27 +458,20 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent fetchRecommendedCourses(strip: NsContentStripMultiple.IContentStripUnit, calculateParentStatus = true) { if (strip.request && strip.request.recommendedCourses && Object.keys(strip.request.recommendedCourses).length) { + // Competency based recommendations start if (this.configSvc.userProfileV2 && this.configSvc.userProfileV2.competencies && this.configSvc.userProfileV2.competencies.length) { - // this.http.get(`${this.baseUrl}/common/master-competencies.json`).pipe( - // map(data => { - // console.log('data ::: ', data) - // // _.differenceWith(data, this.configSvc.userProfileV2.competencies, 'name') - // }, - // (err => of({ data: null, error: err }), - // ) const userCompetenies = this.configSvc.userProfileV2.competencies this.http - .get(`${strip.request.masterCompetency.request.url}/${strip.request.masterCompetency.request.filename}`) - .subscribe((masterCompetencies: any) => { - // const competencyDiff = _.differenceWith(masterCompetencies, userCompetenies, _.isEqual) + .get(`${strip.request.masterCompetency.request.url}/${strip.request.masterCompetency.request.filename}`) + .subscribe((masterCompetencies: any) => { const competencyDiff = masterCompetencies.filter((a: any) => !userCompetenies.some((b: any) => a.name === b.name)) const competencyDiffNames = _.map(competencyDiff, 'name') const originalFilters: any = strip.request && - strip.request.recommendedCourses && - strip.request.recommendedCourses.request.filters + strip.request.recommendedCourses && + strip.request.recommendedCourses.request.filters originalFilters['competencies_v3.name'] = competencyDiffNames if (strip.request) { strip.request.recommendedCourses.request.filters = this.getFiltersFromArray( @@ -497,18 +491,18 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent viewMoreText: (strip.viewMoreUrl && strip.viewMoreUrl.viewMoreText) || '', queryParams: { filtersPanel: 'hide', - q: `${strip.request && strip.request.recommendedCourses && strip.request.recommendedCourses.query}` , + q: `${strip.request && strip.request.recommendedCourses && strip.request.recommendedCourses.query}`, f: - strip.request && - strip.request.recommendedCourses && - strip.request.recommendedCourses.request && - strip.request.recommendedCourses.request.filters - ? JSON.stringify( - this.transformSearchV6FiltersV2( - originalFilters, + strip.request && + strip.request.recommendedCourses && + strip.request.recommendedCourses.request && + strip.request.recommendedCourses.request.filters + ? JSON.stringify( + this.transformSearchV6FiltersV2( + originalFilters, + ) ) - ) - : {}, + : {}, }, } : null @@ -526,11 +520,77 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent this.processStrip(strip, [], 'error', calculateParentStatus, null) }, ) - }, () => { + }, () => { + this.processStrip(strip, [], 'error', calculateParentStatus, null) + }) + } + // Competency based recommendations end + } + } + + fetchBasedOnInterest(strip: NsContentStripMultiple.IContentStripUnit, calculateParentStatus = true) { + // topics based recommendations start + if (strip.request && strip.request.basedOnInterest && Object.keys(strip.request.basedOnInterest).length) { + if (this.configSvc.userProfileV2) { + + const systemTopics = this.configSvc.userProfileV2.systemTopics.map((st: any) => st.name) + const desiredTopics = this.configSvc.userProfileV2.desiredTopics + if ((systemTopics && systemTopics.length) || (desiredTopics && desiredTopics.length)) { + const originalFilters: any = strip.request && + strip.request.basedOnInterest && + strip.request.basedOnInterest.request.filters + originalFilters['topics'] = [...systemTopics, ...desiredTopics] + if (strip.request) { + strip.request.basedOnInterest.request.filters = this.getFiltersFromArray( + originalFilters, + ) + } + this.contentSvc.searchV6(strip.request && strip.request.basedOnInterest).subscribe( + results => { + const showViewMore = Boolean( + results.result && results.result.content && results.result.content.length > 4 && + strip.stripConfig && strip.stripConfig.postCardForSearch, + ) + const viewMoreUrl: any = showViewMore + ? { + tab: 'Learn', + path: strip.viewMoreUrl && strip.viewMoreUrl.path, + viewMoreText: (strip.viewMoreUrl && strip.viewMoreUrl.viewMoreText) || '', + queryParams: { + filtersPanel: 'hide', + q: `${strip.request && strip.request.basedOnInterest && strip.request.basedOnInterest.query}`, + f: + strip.request && + strip.request.basedOnInterest && + strip.request.basedOnInterest.request && + strip.request.basedOnInterest.request.filters + ? JSON.stringify( + this.transformSearchV6FiltersV2( + originalFilters, + ) + ) + : {}, + }, + } + : null + + strip.viewMoreUrl = viewMoreUrl + this.processStrip( + strip, + this.transformContentsToWidgets(results.result.content, strip), + 'done', + calculateParentStatus, + viewMoreUrl, + ) + }, + () => { this.processStrip(strip, [], 'error', calculateParentStatus, null) - }) + }, + ) + } } } + // topics based recommendations start } fetchMandatoryCourses(strip: NsContentStripMultiple.IContentStripUnit, calculateParentStatus = true) { @@ -543,8 +603,8 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent userId = this.configSvc.userProfile.userId } const originalFilters: any = strip.request && - strip.request.mandatoryCourses && - strip.request.mandatoryCourses.request.filters + strip.request.mandatoryCourses && + strip.request.mandatoryCourses.request.filters strip.request.mandatoryCourses.request.filters = this.getFiltersFromArray( originalFilters, ) @@ -557,7 +617,7 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent return acc } return acc - // tslint:disable-next-line: align + // tslint:disable-next-line: align }, []) const showViewMore = Boolean( goals.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch, @@ -822,7 +882,8 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent (strip.request.enrollmentList && Object.keys(strip.request.enrollmentList).length) || (strip.request.comprelatedCbp && Object.keys(strip.request.comprelatedCbp).length) || (strip.request.recommendedCourses && Object.keys(strip.request.recommendedCourses).length) || - (strip.request.mandatoryCourses && Object.keys(strip.request.mandatoryCourses).length) + (strip.request.mandatoryCourses && Object.keys(strip.request.mandatoryCourses).length) || + (strip.request.basedOnInterest && Object.keys(strip.request.basedOnInterest).length) ) ) { return true diff --git a/library/ws-widget/collection/src/lib/content-strip-multiple/content-strip-multiple.model.ts b/library/ws-widget/collection/src/lib/content-strip-multiple/content-strip-multiple.model.ts index 3a58009c2..e09693bce 100644 --- a/library/ws-widget/collection/src/lib/content-strip-multiple/content-strip-multiple.model.ts +++ b/library/ws-widget/collection/src/lib/content-strip-multiple/content-strip-multiple.model.ts @@ -39,6 +39,7 @@ export namespace NsContentStripMultiple { recommendedCourses?: any masterCompetency?: any mandatoryCourses?: any + basedOnInterest?: any } searchV6Type?: 'KB' | 'Collections' | 'searchQuery' | null stripBackground?: string diff --git a/library/ws-widget/utils/src/lib/services/configurations.model.ts b/library/ws-widget/utils/src/lib/services/configurations.model.ts index e236e73cb..c9a6731e1 100644 --- a/library/ws-widget/utils/src/lib/services/configurations.model.ts +++ b/library/ws-widget/utils/src/lib/services/configurations.model.ts @@ -62,6 +62,7 @@ export namespace NsInstanceConfig { hubs: IHubs[] courseContentPath?: string portalUrls: IPortalUrls | undefined + positions: any } export interface IPortalUrls { igot: string, @@ -265,6 +266,8 @@ export namespace NsUser { dealerCode?: null | string isManager?: boolean competencies?: any + systemTopics?: any + desiredTopics?: any } export interface INodebbUserProfile { diff --git a/library/ws-widget/utils/src/lib/services/configurations.service.ts b/library/ws-widget/utils/src/lib/services/configurations.service.ts index bf7031562..0252e8288 100644 --- a/library/ws-widget/utils/src/lib/services/configurations.service.ts +++ b/library/ws-widget/utils/src/lib/services/configurations.service.ts @@ -54,6 +54,7 @@ export class ConfigurationsService { isAuthenticated = false isNewUser = false portalUrls: IPortalUrls | undefined + positions: any // pinnedApps pinnedApps = new BehaviorSubject>(new Set()) diff --git a/library/ws-widget/utils/src/lib/services/telemetry.service.ts b/library/ws-widget/utils/src/lib/services/telemetry.service.ts index 20cc53999..98657ccec 100644 --- a/library/ws-widget/utils/src/lib/services/telemetry.service.ts +++ b/library/ws-widget/utils/src/lib/services/telemetry.service.ts @@ -200,7 +200,7 @@ export class TelemetryService { object: { id: page.objectId, // This will override above id if the data has object in it. - ...(data.object), + ...(data && data.object), }, } $t.impression(edata, config) @@ -209,12 +209,12 @@ export class TelemetryService { context: { pdata: { ...this.pData, - id: this.pData.id, + id: this.pData && this.pData.id, }, env: page.module || '', }, object: { - ...(data.object), + ...(data && data.object), }, }) } diff --git a/project/ws/app/src/lib/routes/app-toc/components/app-toc-home/app-toc-home.component.html b/project/ws/app/src/lib/routes/app-toc/components/app-toc-home/app-toc-home.component.html index 3ba3dee37..63dcdeca4 100755 --- a/project/ws/app/src/lib/routes/app-toc/components/app-toc-home/app-toc-home.component.html +++ b/project/ws/app/src/lib/routes/app-toc/components/app-toc-home/app-toc-home.component.html @@ -224,13 +224,17 @@

--> -
- - + diff --git a/project/ws/app/src/lib/routes/app-toc/components/app-toc-single-page/app-toc-single-page.component.ts b/project/ws/app/src/lib/routes/app-toc/components/app-toc-single-page/app-toc-single-page.component.ts index b063913a3..563248d2a 100755 --- a/project/ws/app/src/lib/routes/app-toc/components/app-toc-single-page/app-toc-single-page.component.ts +++ b/project/ws/app/src/lib/routes/app-toc/components/app-toc-single-page/app-toc-single-page.component.ts @@ -647,7 +647,7 @@ export class AppTocSinglePageComponent implements OnInit, OnChanges, OnDestroy { } } - // To updated both reviews, and rating summary at once in case of edit scenario + // To updated both reviews, and rating summary at once in case of edit scenario updateReviews() { // Reset the counters/ previous values before changing the filter and view this.ratingViewCount = this.ratingViewCountDefault diff --git a/project/ws/app/src/lib/routes/browse-by-competency/browse-by-competency.module.ts b/project/ws/app/src/lib/routes/browse-by-competency/browse-by-competency.module.ts index 27ca02eb2..a606e19b2 100644 --- a/project/ws/app/src/lib/routes/browse-by-competency/browse-by-competency.module.ts +++ b/project/ws/app/src/lib/routes/browse-by-competency/browse-by-competency.module.ts @@ -93,6 +93,7 @@ import { LocalDataService } from './services/localService' WidgetResolverModule, CardContentModule, ], + exports: [CompetencyFiltersComponent], providers: [ LoaderService, LocalDataService, diff --git a/project/ws/app/src/lib/routes/profile-v2/routes/profile-view/profile-view.component.html b/project/ws/app/src/lib/routes/profile-v2/routes/profile-view/profile-view.component.html index 979ec3964..79821c93c 100755 --- a/project/ws/app/src/lib/routes/profile-v2/routes/profile-view/profile-view.component.html +++ b/project/ws/app/src/lib/routes/profile-v2/routes/profile-view/profile-view.component.html @@ -168,7 +168,7 @@ > - + > --> diff --git a/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.html b/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.html new file mode 100644 index 000000000..5448941c8 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.html @@ -0,0 +1,20 @@ +Create the topic +
+
+ + + +
+ +
\ No newline at end of file diff --git a/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.scss new file mode 100644 index 000000000..db19a802a --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.scss @@ -0,0 +1,71 @@ +@import "ws-common"; +@import "ws-vars"; +@import "ws-mixins"; + +::ng-deep .mat-form-field-outline { + min-height: 40px; + background: #fff; + border-radius: 8px; + + .mat-form-field-outline-start { + border: 1px solid #70707069; + border-radius: 8px 0 0 8px; + border-right-style: none; + /* border: 1px solid currentColor; */ + min-width: 8px; + border-right-style: none; + } + + .mat-form-field-outline-gap { + border: 1px solid currentColor; + border-radius: 82px; + border-left-style: none; + border-right-style: none; + } + + .mat-form-field-outline-end { + border: 1px solid #70707069; + border-left-style: none; + border-radius: 0 8px 8px 0; + } +} + +::ng-deep .mat-form-field-outline.mat-form-field-outline-thick { + min-height: 40px; + background: #fff; + border-radius: 8px; + + .mat-form-field-outline-start { + border-radius: 8px 0 0 8px; + min-width: 8px; + border: 1px solid currentColor; + border-right-style: none; + } + + .mat-form-field-outline-gap { + border-width: 1px; + border: 1px solid currentColor; + border-radius: 8px; + border-left-style: none; + border-right-style: none; + } + + .mat-form-field-outline-end { + border-width: 1px; + border-radius: 0 8px 8px 0; + border: 1px solid currentColor; + border-left-style: none; + } +} + +::ng-deep .mat-form-field-infix { + padding: 0; + margin: 0; + border: none; +} + +::ng-deep .mat-form-field-infix { + padding: 0; + margin: 8px 0 0 0; + border: none; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.spec.ts new file mode 100644 index 000000000..b0c2d05f9 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { AddTopicDialogComponent } from './add-topic.component' + +describe('AddTopicDialogComponent', () => { + let component: AddTopicDialogComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AddTopicDialogComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(AddTopicDialogComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.ts new file mode 100644 index 000000000..0f4ea4d52 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/add-topic/add-topic.component.ts @@ -0,0 +1,40 @@ +import { Component, OnInit, Inject } from '@angular/core' +import { FormControl, FormGroup, Validators } from '@angular/forms' +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog' +@Component({ + selector: 'ws-app-add-topic', + templateUrl: './add-topic.component.html', + styleUrls: ['./add-topic.component.scss'], +}) +export class AddTopicDialogComponent implements OnInit { + + createTopic!: FormGroup + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any, + ) { } + + close(): void { + this.dialogRef.close() + } + + create(): void { + if (this.createTopic.get('topicName')) { + const val = this.createTopic.value + if (val && val.topicName) { + this.dialogRef.close(val.topicName) + } + } + + } + + ngOnInit() { + this.createTopic = new FormGroup( + { + topicName: new FormControl(null, [Validators.required]), + }) + } + cancel() { + this.close() + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html new file mode 100644 index 000000000..47b0306cf --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html @@ -0,0 +1,38 @@ + + + + +
+
+
+

{{ competency?.name}}

+

{{ competency?.competencyType}}

+
+ +
+
+

+ {{ competency?.description}} +

+
+
+
+ + +
diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss new file mode 100644 index 000000000..f041c5176 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss @@ -0,0 +1,188 @@ +@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; + 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; +} +a.level_item_active { + background-color: #0074b6; + color: #fff; + border:1px solid #0074b6; +} +a.level_item_active .mat-icon { + color: #fff!important; +} + diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.spec.ts new file mode 100644 index 000000000..7e6dc9269 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { CompetencyCardComponent } from './competency-card.component' + +describe('CompetencyCardComponent', () => { + let component: CompetencyCardComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [CompetencyCardComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(CompetencyCardComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts new file mode 100644 index 000000000..a5071237a --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts @@ -0,0 +1,41 @@ +import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core' + +@Component({ + selector: 'ws-app-competency-card', + templateUrl: './competency-card.component.html', + styleUrls: ['./competency-card.component.scss'], +}) +export class CompetencyCardComponent implements OnInit { + selectedLevelId: any + selectedCompId: any + selectedCompList: any = [] + @Input() competenciesData!: any + @Output() selectedCompetency = new EventEmitter() + + 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) + } + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.html b/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.html new file mode 100755 index 000000000..b23be4230 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.html @@ -0,0 +1,9 @@ + + + + + {{tab?.step}}. {{tab?.name}} + + + diff --git a/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.scss new file mode 100755 index 000000000..a4c7ebf5b --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.scss @@ -0,0 +1,14 @@ +@import 'ws-vars'; + +mat-expansion-panel { + margin: 36px; + + mat-panel-description { + display: flex; + flex-grow: 0; + } +} + +.network_left { + width: 100%; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.spec.ts new file mode 100755 index 000000000..012f59fea --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { SetupLeftMenuComponent } from './left-menu.component' + +describe('SetupLeftMenuComponent', () => { + let component: SetupLeftMenuComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SetupLeftMenuComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(SetupLeftMenuComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.ts new file mode 100755 index 000000000..b45206faa --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/left-menu/left-menu.component.ts @@ -0,0 +1,37 @@ +import { Component, OnInit, OnDestroy, Input } from '@angular/core' +import { EventService, WsEvents } from '@sunbird-cb/utils/src/public-api' +// tslint:disable-next-line +import _ from 'lodash' +import { NSProfileDataV3 } from '../../models/profile-v3.models' + +@Component({ + selector: 'ws-app-l-menu', + templateUrl: './left-menu.component.html', + styleUrls: ['./left-menu.component.scss'], +}) +export class SetupLeftMenuComponent implements OnInit, OnDestroy { + @Input() + tabsData!: NSProfileDataV3.IProfileTab[] + constructor( + private events: EventService, + ) { } + + ngOnInit(): void { + + } + ngOnDestroy() { + + } + + public menuClick(tab: any) { + this.events.raiseInteractTelemetry( + { + type: WsEvents.EnumInteractTypes.CLICK, + subType: WsEvents.EnumInteractSubTypes.SIDE_MENU, + id: `${_.camelCase(tab.name)}-menu`, + }, + { }, + ) + } + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.html b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.html new file mode 100644 index 000000000..a108b8f02 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.html @@ -0,0 +1,28 @@ + + + + {{ topic.name }} + + + +
+ + +
+ + SEE {{ topic.children.length-show }} MORE TOPICS + +
+
+
+
+ +
\ No newline at end of file diff --git a/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.scss new file mode 100644 index 000000000..0fb869e55 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.scss @@ -0,0 +1,23 @@ +.topic_tag_link { + border-radius: 18px 18px; + padding: 8px 12px; + box-sizing: border-box; + border: 1px solid; + min-width: 200px; + cursor: pointer; +} +// .topic_tag_link.tag_link_active { +// background-color: #0074b6!important; +// border:1px solid #0074b6!important; +// color: #fff; +// } + +// .topic_tag_link { +// background-color: #fff; +// border:1px solid rgba($color: #000000, $alpha: 0.08); + +// } + +.topic_card { + box-sizing: border-box; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.spec.ts new file mode 100644 index 000000000..849d989c0 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { TopicCardComponent } from './topic-card.component' + +describe('TopicCardComponent', () => { + let component: TopicCardComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TopicCardComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(TopicCardComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.ts new file mode 100644 index 000000000..b7a9cad37 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.ts @@ -0,0 +1,66 @@ +import { Component, Input, OnInit } from '@angular/core' +// tslint:disable-next-line +import _ from 'lodash' +import { NSProfileDataV3 } from '../../models/profile-v3.models' +import { TopicService } from '../../services/topics.service' + +@Component({ + selector: 'ws-app-topic-card', + templateUrl: './topic-card.component.html', + styleUrls: ['./topic-card.component.scss'], +}) +export class TopicCardComponent implements OnInit { + @Input() topic!: NSProfileDataV3.ITopic + show = 6 + // selectedTopics: Subscription | null = null + constructor(private topicService: TopicService) { } + + ngOnInit() { + + } + clicked(top: NSProfileDataV3.ITopic | string) { + this.topicService.autoSave.next(true) + if (typeof (top) === 'object') { + const index = _.findIndex(this.topicService.getCurrentSelectedTopics, { identifier: top.identifier }) + if (index !== -1) { + /// remove from store + this.topicService.removeTopics(top) + } else { + /// add to store + this.topicService.addTopics(top) + } + } else { + const index = _.findIndex(this.topicService.getCurrentSelectedTopics, { name: 'Added by you' }) + const cIndex = _.indexOf(this.topicService.getCurrentSelectedTopics[index].children, top) + if (cIndex !== -1) { + /// remove from store + this.topicService.removeTopicsAddedByYou(top) + } else { + /// add to store + this.topicService.addTopicsAddedByYou(top) + } + } + + } + isSelected(top: NSProfileDataV3.ITopic): boolean { + if (top) { + if (!top.identifier) { + const index = _.indexOf(this.topicService.getCurrentSelectedTopics, top) + if (index === -1) { + return false + } + return true + } + const index1 = _.findIndex(this.topicService.getCurrentSelectedTopics, { identifier: top.identifier }) + if (index1 === -1) { + return false + } + return true + + } + return false + } + showMore() { + this.show += 10 + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/models/profile-v3.models.ts b/project/ws/app/src/lib/routes/profile-v3/models/profile-v3.models.ts new file mode 100644 index 000000000..f5517180c --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/models/profile-v3.models.ts @@ -0,0 +1,89 @@ +export namespace NSProfileDataV3 { + export interface IProfileJsonData { + tabs: IProfileTab[] + } + + export interface IProfileTab { + name: string + key: string + badges: { + enabled: boolean + uri?: string + } + enabled: boolean + routerLink: string + step: number + description: string + } + + export interface ICompetencie { + competencyType?: string + description: string + id: string + name: string + competencyLevel?: ICompetencyLevel[] + } + + export interface ICompetencyLevel { + name: string + } + export interface ITopic { + children: any[] + code: string + description: string + identifier: string + index: number + name: string + noOfHoursConsumed: number + status: string + } + + export interface ISearch { + type: string + field: string + keyword: string + } + export interface IDesiredTopic { + request: { + userId: string + profileDetails: { + desiredTopics: string[] + } + + } + } + export interface ISystemTopic { + request: { + userId: string + profileDetails: { + systemTopics: ISystemTopicChield[] + } + } + } + export interface ISystemTopicChield { + identifier: string + name: string + children: [] + } + export interface IRolesAndActivities { + id: string + name: string + description: string + activities: IRolesActivity[] + // source: string + // status: string + // type: string + } + export interface IRolesActivity { + description: string + id: string + name: string + // parentRole: string + // source: string + // status: string + // type: string + } + export interface IChipItems { + name: string + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/profile-v3-routing.module.ts b/project/ws/app/src/lib/routes/profile-v3/profile-v3-routing.module.ts new file mode 100644 index 000000000..eb4810644 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/profile-v3-routing.module.ts @@ -0,0 +1,95 @@ +import { NgModule } from '@angular/core' +import { RouterModule, Routes } from '@angular/router' +import { TopicResolverService } from './resolvers/topic.resolver' +import { CurrentCompetenciesComponent } from './routes/current-competencies/current-competencies.component' +import { DesiredCompetenciesComponent } from './routes/desired-competencies/desired-competencies.component' +import { PlatformWalkthroughComponent } from './routes/platform-walkthrough/platform-walkthrough.component' +import { ProfileHomeComponent } from './routes/profile-home/profile-home.component' +import { TopicComponent } from './routes/topics/topic.component' +import { CompetencyResolverService } from '../profile/routes/competency/resolver/assessment.resolver' +import { RolesAndActivitiesComponent } from './routes/roles-and-activities/roles-and-activities.component' + +const routes: Routes = [ + { + path: '', + component: ProfileHomeComponent, + data: { + pageId: '', + module: 'profile-v3', + }, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'roles', + }, + { + path: 'roles', + component: RolesAndActivitiesComponent, + data: { + pageId: 'roles', + module: 'profile-v3', + }, + resolve: { + // topics: RolesResolverService, + }, + }, + { + path: 'current-competencies', + component: CurrentCompetenciesComponent, + data: { + pageId: 'current-competencies', + module: 'profile-v3', + }, + resolve: { + topics: CompetencyResolverService, + }, + }, + { + path: 'desired-competencies', + component: DesiredCompetenciesComponent, + data: { + pageId: 'desired-competencies', + module: 'profile-v3', + }, + // resolve: { + // allResources : AllResourceResolveService, + // }, + }, + { + path: 'topics', + component: TopicComponent, + data: { + pageId: 'topics', + module: 'profile-v3', + }, + resolve: { + topics: TopicResolverService, + }, + }, + { + path: 'platform-walkthrough', + component: PlatformWalkthroughComponent, + data: { + pageId: 'platform-walkthrough', + module: 'profile-v3', + }, + // resolve: { + // topics: TopicResolverService, + // }, + }, + ], + }, +] + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], + providers: [ + TopicResolverService, + CompetencyResolverService, + ], + // Don't forget to pass RouteResolver into the providers array +}) + +export class ProfileV3RoutingModule { } diff --git a/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts b/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts new file mode 100644 index 000000000..a16250c2c --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts @@ -0,0 +1,73 @@ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { TopicCardComponent } from './components/topic-card/topic-card.component' +import { ProfileHomeComponent } from './routes/profile-home/profile-home.component' +import { MatButtonModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatSnackBarModule } from '@angular/material' +import { MatListModule } from '@angular/material/list' +import { CurrentCompetenciesComponent } from './routes/current-competencies/current-competencies.component' +import { MatSidenavModule } from '@angular/material/sidenav' +import { RouterModule } from '@angular/router' +import { ProfileV3RoutingModule } from './profile-v3-routing.module' +import { CompetencyCardComponent } from './components/competency-card/competency-card.component' +import { SetupLeftMenuComponent } from './components/left-menu/left-menu.component' +import { DesiredCompetenciesComponent } from './routes/desired-competencies/desired-competencies.component' +import { TopicComponent } from './routes/topics/topic.component' +import { BrowseByCompetencyModule } from '../browse-by-competency/browse-by-competency.module' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { PipeFilterV2Module } from '@sunbird-cb/utils/src/public-api' +import { TreeCatalogModule } from '@sunbird-cb/collection/src/public-api' +import { TopicService } from './services/topics.service' +// import { PlayerVideoComponent } from '@sunbird-cb/collection/src/lib/player-video/player-video.component' +import { PlatformWalkthroughComponent } from './routes/platform-walkthrough/platform-walkthrough.component' + +import { AddTopicDialogComponent } from './components/add-topic/add-topic.component' +import { RolesAndActivitiesComponent } from './routes/roles-and-activities/roles-and-activities.component' +import { RolesAndActivityService } from './services/rolesandActivities.service' + +@NgModule({ + declarations: [ + DesiredCompetenciesComponent, + TopicCardComponent, + ProfileHomeComponent, + CurrentCompetenciesComponent, + CompetencyCardComponent, + SetupLeftMenuComponent, + TopicComponent, + PlatformWalkthroughComponent, + // VideoWrapperComponent, + AddTopicDialogComponent, + RolesAndActivitiesComponent, + ], + imports: [ + CommonModule, + MatCardModule, + MatListModule, + MatSidenavModule, + MatIconModule, + RouterModule, + MatButtonModule, + ProfileV3RoutingModule, + ReactiveFormsModule, + FormsModule, + MatFormFieldModule, + MatCheckboxModule, + PipeFilterV2Module, + MatInputModule, + TreeCatalogModule, + MatSnackBarModule, + MatDialogModule, + MatInputModule, + MatFormFieldModule, + ReactiveFormsModule, + BrowseByCompetencyModule, + MatChipsModule, + ], + providers: [ + TopicService, + RolesAndActivityService, + ], + entryComponents: [ + AddTopicDialogComponent, + ], +}) +export class ProfileV3Module { } diff --git a/project/ws/app/src/lib/routes/profile-v3/resolvers/competency.resolver.ts b/project/ws/app/src/lib/routes/profile-v3/resolvers/competency.resolver.ts new file mode 100644 index 000000000..777db400a --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/resolvers/competency.resolver.ts @@ -0,0 +1,30 @@ +import { Injectable } from '@angular/core' +import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router' +import { Observable, of } from 'rxjs' +import { NSProfileDataV3 } from '../models/profile-v3.models' +import { catchError, map } from 'rxjs/operators' +import { ProfileV3Service } from '../services/profile_v3.service' + +@Injectable() +export class CompetencyResolverService implements Resolve> { + + constructor(private compService: ProfileV3Service) { } + resolve(_route: ActivatedRouteSnapshot, _state: RouterStateSnapshot): Observable { + const searchJson = [ + { type: 'COMPETENCY', field: 'name', keyword: '' }, + { type: 'COMPETENCY', field: 'status', keyword: 'VERIFIED' }, + ] + const searchObj = { + searches: searchJson, + childNodes: true, + } + return this.compService.getAllCompetencies(searchObj).pipe( + map((data: any) => { + return { data: data.responseData || [], error: null } + }), + catchError((err: any) => { + return of({ data: null, error: err }) + }) + ) + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/resolvers/topic.resolver.ts b/project/ws/app/src/lib/routes/profile-v3/resolvers/topic.resolver.ts new file mode 100644 index 000000000..c42bf9bf0 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/resolvers/topic.resolver.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core' +import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router' +import { Observable, of } from 'rxjs' +import { NSProfileDataV3 } from '../models/profile-v3.models' +import { TopicService } from '../services/topics.service' +import { catchError, map } from 'rxjs/operators' + +@Injectable() +export class TopicResolverService implements Resolve> { + + constructor(private topicService: TopicService) { } + resolve(_route: ActivatedRouteSnapshot, _state: RouterStateSnapshot): Observable { + return this.topicService.loadTopics().pipe( + map((data: any) => { + return { data: data.terms || [], error: null } + }), + catchError((err: any) => { + return of({ data: null, error: err }) + }) + ) + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html new file mode 100644 index 000000000..7a65b5b8a --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html @@ -0,0 +1,13 @@ +

Popular competencies

+ + + diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.scss new file mode 100644 index 000000000..d54d284d9 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.scss @@ -0,0 +1,121 @@ + +.left_card_box { + // width: 890px; + width: 75%; + float: left; + + @media (max-width:992px) { + width:100%; + } + + .top_search_box { + width: 100%; + overflow: hidden; + justify-content: space-between; + + + .search_box_inner { + max-width: 585px; + float: left; + + @media (max-width:768px) { + width: 49%; + max-width: 49%; + } + + .search_box_main { + width: 100%; + max-width: 585px; + + @media (max-width:768px) { + max-width: 100%; + } + + mat-form-field .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{ + border-top-width: 8px !important; + padding: 12px 10px 12px 12px; + + } + + form { + width: 100%; + + .search_form { + width: 100%; + + + } + } + } + + .search_tag_box { + width: 100%; + + a.single_tag { + display: inline-block; + padding: 8px 12px; + margin: 8px 8px; + border-radius: 20px 20px; + background-color: rgba(0, 0, 0, 0.08); + color: #000; + + .mat-icon { + vertical-align: middle; + margin-left: 15px; + } + } + } + } + + // .item_dropdown_box { + // float: right; + // width: 210px; + // box-sizing: border-box; + + // @media (max-width:768px) { + // width: 49%; + // } + + // .item { + // .mat-form-field-outline { + // background-color: #f0f3f4; + // // border:1px solid rgba(0, 0, 0, 0.08); + // // padding: 0px 12px; + // // border-radius: 4px 4px; + // // box-sizing: border-box; + // } + // .theme-igot.day-mode .mat-form-field-appearance-legacy .mat-form-field-underline { + // background-color:none; + // } + + // } + // } + } + + .main_card_box { + width: 100%; + margin-top: 35px; + + a.load_more_link { + margin:35px auto 0 auto; + text-align:center; + display: block; + } + } +} + + + .right_sidebar_box { + width: 23%; + float: right; + background-color: #fff; + box-shadow: none!important; + border: 0!important; + border-radius: 4px; + + @media (max-width:992px) { + width:100%; + } + + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.spec.ts new file mode 100644 index 000000000..f56aa662e --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { CurrentCompetenciesComponent } from './current-competencies.component' + +describe('CurrentCompetenciesComponent', () => { + let component: CurrentCompetenciesComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [CurrentCompetenciesComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(CurrentCompetenciesComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts new file mode 100644 index 000000000..00db68cc8 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts @@ -0,0 +1,118 @@ +import { Component, OnInit } from '@angular/core' +import { ProfileV3Service } from '../../services/profile_v3.service' +import { NSProfileDataV3 } from '../../models/profile-v3.models' +import { ConfigurationsService } from '@sunbird-cb/utils/src/public-api' +import * as _ from 'lodash' +@Component({ + selector: 'ws-app-current-competencies', + templateUrl: './current-competencies.component.html', + styleUrls: ['./current-competencies.component.scss'], +}) +export class CurrentCompetenciesComponent implements OnInit { + searchJson!: NSProfileDataV3.ISearch[] + allCompetencies: any = [] + overallCompetencies!: NSProfileDataV3.ICompetencie[] + changedProperties: any = {} + userDetails: any + updatecompList: any = [] + competenciesList: any = [] + + constructor(private competencySvc: ProfileV3Service, private configService: ConfigurationsService) {} + + ngOnInit() { + this.getUserDetails() + } + + getUserDetails() { + if (this.configService.unMappedUser && this.configService.unMappedUser.id) { + this.competencySvc.getUserdetailsFromRegistry(this.configService.unMappedUser.id).subscribe( + (data: any) => { + this.userDetails = data + this.competenciesList = data.profileDetails.competencies + this.getCompetencies() + }) + } + } + + getCompetencies() { + this.searchJson = [ + { type: 'COMPETENCY', field: 'name', keyword: '' }, + { type: 'COMPETENCY', field: 'status', keyword: 'VERIFIED' }, + ] + + const searchObj = { + searches: this.searchJson, + childNodes: true, + } + this.competencySvc + .getAllCompetencies(searchObj) + .subscribe((reponse: any) => { + if (reponse.statusInfo && reponse.statusInfo.statusCode === 200) { + this.overallCompetencies = reponse.responseData + this.getCompLsit() + } + }) + } + + getCompLsit() { + if (this.overallCompetencies) { + if (this.competenciesList && this.competenciesList.length > 0) { + const complist = this.competenciesList + complist.forEach((comp: any) => { + this.overallCompetencies.forEach((ncomp: any) => { + if (comp.id === ncomp.id) { + ncomp.competencySelfAttestedLevel = comp.competencySelfAttestedLevel + ncomp.competencySelfAttestedLevelValue = comp.competencySelfAttestedLevelValue + ncomp.osid = comp.osid + this.allCompetencies.push(ncomp) + } + }) + }) + } else { + this.allCompetencies = this.overallCompetencies + } + } + } + + updateSelectedCompetency(event: any) { + if (this.competenciesList && this.competenciesList.length > 0) { + this.updatecompList = this.competenciesList + this.updatecompList.forEach((com: any) => { + event.forEach((evt: any) => { + if (evt.id === com.id) { + com.competencySelfAttestedLevel = evt.competencySelfAttestedLevel + com.competencySelfAttestedLevelValue = evt.competencySelfAttestedLevelValue + com.osid = evt.osid + } else { + if (!this.updatecompList.some((el: any) => el.id === evt.id)) { + this.updatecompList.push(evt) + } + } + }) + }) + } else { + this.updatecompList = event + } + + this.changedProperties = { + profileDetails: { + competencies: this.updatecompList, + }, + } + + const reqUpdates = { + request: { + userId: this.configService.unMappedUser.id, + ...this.changedProperties, + }, + } + this.competencySvc.updateProfileDetails(reqUpdates).subscribe((res: any) => { + if (res.responseCode === 'OK') { + this.allCompetencies = [] + this.updatecompList = [] + this.ngOnInit() + } + }) + } + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.html new file mode 100644 index 000000000..5f5188173 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.html @@ -0,0 +1,3 @@ +

Desired competencies

+ + diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.spec.ts new file mode 100644 index 000000000..f56aa662e --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { CurrentCompetenciesComponent } from './current-competencies.component' + +describe('CurrentCompetenciesComponent', () => { + let component: CurrentCompetenciesComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [CurrentCompetenciesComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(CurrentCompetenciesComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts new file mode 100644 index 000000000..3eddff315 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts @@ -0,0 +1,114 @@ +import { Component, OnInit } from '@angular/core' +import { ProfileV3Service } from '../../services/profile_v3.service' +import { NSProfileDataV3 } from '../../models/profile-v3.models' +import { ConfigurationsService } from '@sunbird-cb/utils/src/public-api' + +@Component({ + selector: 'ws-app-desired-competencies', + templateUrl: './desired-competencies.component.html', + styleUrls: ['./desired-competencies.component.scss'], +}) +export class DesiredCompetenciesComponent implements OnInit { + searchJson!: NSProfileDataV3.ISearch[] + allCompetencies: any = [] + changedProperties: any = {} + userDetails: any + updatecompList: any = [] + overallCompetencies!: NSProfileDataV3.ICompetencie[] + desiredcompList: any = [] + + constructor(private competencySvc: ProfileV3Service, private configService: ConfigurationsService) { } + + ngOnInit() { + this.getUserDetails() + } + + getUserDetails() { + if (this.configService.unMappedUser && this.configService.unMappedUser.id) { + this.competencySvc.getUserdetailsFromRegistry(this.configService.unMappedUser.id).subscribe( + (data: any) => { + this.userDetails = data + this.desiredcompList = data.profileDetails.desiredCompetencies + this.getCompetencies() + }) + } + } + + getCompetencies() { + this.searchJson = [ + { type: 'COMPETENCY', field: 'name', keyword: '' }, + { type: 'COMPETENCY', field: 'status', keyword: 'VERIFIED' }, + ] + + const searchObj = { + searches: this.searchJson, + childNodes: true, + } + this.competencySvc + .getAllCompetencies(searchObj) + .subscribe((reponse: any) => { + if (reponse.statusInfo && reponse.statusInfo.statusCode === 200) { + this.overallCompetencies = reponse.responseData + this.getCompLsit() + } + }) + } + + getCompLsit() { + if (this.overallCompetencies) { + if (this.desiredcompList && this.desiredcompList.length > 0) { + const complist = this.desiredcompList + complist.forEach((comp: any) => { + this.overallCompetencies.forEach((ncomp: any) => { + if (comp.id === ncomp.id) { + ncomp.competencySelfAttestedLevel = comp.competencySelfAttestedLevel + ncomp.competencySelfAttestedLevelValue = comp.competencySelfAttestedLevelValue + ncomp.osid = comp.osid + } + }) + }) + } + } + this.allCompetencies = this.overallCompetencies + } + + updateSelectedCompetency(event: any) { + if (this.desiredcompList && this.desiredcompList.length > 0) { + this.updatecompList = this.desiredcompList + this.updatecompList.forEach((com: any) => { + event.forEach((evt: any) => { + if (evt.id === com.id) { + // this.updatecompList.push(evt) + com.competencySelfAttestedLevel = evt.competencySelfAttestedLevel + com.competencySelfAttestedLevelValue = evt.competencySelfAttestedLevelValue + com.osid = evt.osid + } else { + if (!this.updatecompList.some((el: any) => el.id === evt.id)) { + this.updatecompList.push(evt) + } + } + }) + }) + } else { + this.updatecompList = event + } + this.changedProperties = { + profileDetails: { + desiredCompetencies: this.updatecompList, + }, + } + const reqUpdates = { + request: { + userId: this.configService.unMappedUser.id, + ...this.changedProperties, + }, + } + this.competencySvc.updateProfileDetails(reqUpdates).subscribe((res: any) => { + if (res.responseCode === 'OK') { + this.allCompetencies = [] + this.updatecompList = [] + this.ngOnInit() + } + }) + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.html new file mode 100644 index 000000000..45c8a8584 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.html @@ -0,0 +1,3 @@ + diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.spec.ts new file mode 100644 index 000000000..2d78fe166 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { PlatformWalkthroughComponent } from './platform-walkthrough.component' + +describe('PlatformWalkthroughComponent', () => { + let component: PlatformWalkthroughComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [PlatformWalkthroughComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(PlatformWalkthroughComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.ts new file mode 100644 index 000000000..db56a224f --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core' + +@Component({ + selector: 'ws-app-platform-walkthrough', + templateUrl: './platform-walkthrough.component.html', + styleUrls: ['./platform-walkthrough.component.scss'], +}) +export class PlatformWalkthroughComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.html new file mode 100644 index 000000000..d8c950bf0 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.html @@ -0,0 +1,55 @@ +
+

{{currentStep}}. {{message}}

+ + +
+ + + +
+
+
+ + +
+
+
+
+ + + +
+ +
+
+ +
+
+
+ + + diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.scss new file mode 100644 index 000000000..ad939f395 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.scss @@ -0,0 +1,128 @@ +@import 'ws-common'; +@import 'ws-vars'; +@import 'ws-mixins'; + +.container-balanced { + @extend %page-center; + height: auto; + // min-height: 400px; + min-height: calc(100vh - 160px); + + @media (max-width:1024px) { + padding:0px 8px; + } +} + +.container-balanced-banner { + @extend %page-center; + height: auto; +} + +a.skip_link { + border:1px solid rgba($color: #000000, $alpha: 0.16); + border-radius: 4px 4px; + text-align: center; + padding:8px 12px; + height: 40px; + box-sizing: border-box; + cursor: pointer; +} + +a.next_link { + border:1px solid #0074b6; + background-color: #0074b6; + color: #fff; + border-radius: 4px 4px; + text-align: center; + padding:8px 12px; + height: 40px; + box-sizing: border-box; + cursor: pointer; +} + +.footer_box { + width: 100%; + position: fixed; + bottom:0; + background-color: #fff; + padding: 24px 155px; + z-index: 99; + box-sizing: border-box; +} + +// .container-balanced-updated { + +// } + + +.flex-3 { + flex: 3; +} + +.flex-5 { + flex: 5; +} +.marbot{ + margin-bottom: 250px; +} + +.border-0 { + border-right: none !important; + background: inherit !important; +} + +.flex-update { + flex-direction: row; + + @include breakpoint-xs { + flex-direction: column; + } + + @include breakpoint-s { + flex-direction: column; + } +} + +.margin-top-56 { + margin-top: 56px; +} + +.margin-top-48 { + margin-top: 48px; +} + +.margin-top-0 { + margin-top: 0px; +} + + +.sticky { + position: sticky; + top: calc(#{$mat-toolbar-gt-xs}); + overflow: hidden; + // z-index: 10; + // width: 100%; +} + +.margin-fix { + @media (max-width:1024px) { + margin:0; + } +} + +.sidenav_inner { + width: 260px; + left: 0; +} + +// .main_network_box { +// margin-left: 32px; + +// @media (max-width:992px) { +// margin-left: 0; +// } +// } + +// .knowledge_box_full { +// overflow: hidden; +// } diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.spec.ts new file mode 100644 index 000000000..5ce50d939 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { ProfileHomeComponent } from './profile-home.component' + +describe('ProfileHomeComponent', () => { + let component: ProfileHomeComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ProfileHomeComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(ProfileHomeComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.ts new file mode 100644 index 000000000..cfd354fd7 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.ts @@ -0,0 +1,93 @@ +import { Component, OnInit, ElementRef, ViewChild, OnDestroy } from '@angular/core' +import { map } from 'rxjs/operators' +import { ValueService } from '@sunbird-cb/utils' +import { NsWidgetResolver } from '@sunbird-cb/resolver' +import { ActivatedRoute, NavigationEnd, NavigationStart, Router } from '@angular/router' +import { NSProfileDataV3 } from '../../models/profile-v3.models' +// tslint:disable-next-line +import _ from 'lodash' +import { Subscription } from 'rxjs' +@Component({ + selector: 'ws-app-profile-home', + templateUrl: './profile-home.component.html', + styleUrls: ['./profile-home.component.scss'], +}) +export class ProfileHomeComponent implements OnInit, OnDestroy { + @ViewChild('stickyMenu', { static: true }) menuElement!: ElementRef + isLtMedium$ = this.valueSvc.isLtMedium$ + private defaultSideNavBarOpenedSubscription: any + sideNavBarOpened = true + public screenSizeIsLtMedium = false + sticky = false + currentRoute = 'all' + banner!: NsWidgetResolver.IWidgetData + userRouteName = '' + private routerSubscription: Subscription | null = null + + tabs!: NSProfileDataV3.IProfileTab[] + tabsData = this.route.parent && this.route.parent.snapshot.data.pageData.data.tabs || [] + message = `Enter all your 'Role & Activities' to complete your profile` + currentStep = 1 + + mode$ = this.isLtMedium$.pipe(map((isMedium: any) => (isMedium ? 'over' : 'side'))) + constructor( + private valueSvc: ValueService, + private route: ActivatedRoute, + private router: Router, + ) { + this.tabs = _.orderBy(this.tabsData, 'step') + this.init() + } + init() { + if (this.routerSubscription) { + this.routerSubscription.unsubscribe() + } + this.routerSubscription = this.router.events.subscribe((event: any) => { + if (event instanceof NavigationStart) { // do not delete this + // console.log(event) + } + if (event instanceof NavigationEnd) { + _.each(this.tabs, t => { + if (event.url.indexOf(t.routerLink) !== -1) { + this.message = t.description + this.currentStep = t.step + } + }) + } + }) + } + updateProfile() { + // need to update profile + } + ngOnInit() { + this.defaultSideNavBarOpenedSubscription = this.isLtMedium$.subscribe(isLtMedium => { + this.sideNavBarOpened = !isLtMedium + this.screenSizeIsLtMedium = isLtMedium + }) + + } + + ngOnDestroy() { + if (this.defaultSideNavBarOpenedSubscription) { + this.defaultSideNavBarOpenedSubscription.unsubscribe() + } + if (this.routerSubscription) { + this.routerSubscription.unsubscribe() + } + } + get next() { + const nextStep = _.first(_.filter(this.tabs, { step: this.currentStep + 1 })) + if (nextStep) { + return nextStep + } + return 'done' + } + + get previous() { + const previousStep = _.first(_.filter(this.tabs, { step: this.currentStep - 1 })) + if (previousStep !== undefined) { + return previousStep + } + return 'first' + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.html new file mode 100644 index 000000000..fc4899ca8 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.html @@ -0,0 +1,65 @@ +

roles-activities works!

+
+
+ + + + + + Role + + + + + Activity + + + + + +
+ + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+
diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.spec.ts new file mode 100644 index 000000000..7522c0b26 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RolesActivitiesComponent } from './roles-activities.component'; + +describe('RolesActivitiesComponent', () => { + let component: RolesActivitiesComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RolesActivitiesComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RolesActivitiesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.ts new file mode 100644 index 000000000..7a6d3eca6 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-activities/roles-activities.component.ts @@ -0,0 +1,32 @@ +import { Component, OnInit } from '@angular/core' +import { FormGroup, FormControl } from '@angular/forms' + +@Component({ + selector: 'ws-app-roles-activities', + templateUrl: './roles-activities.component.html', + styleUrls: ['./roles-activities.component.scss'] +}) +export class RolesActivitiesComponent implements OnInit { +data = '' +role = '' +activity = '' + +roleForm: FormGroup + constructor() { } + + + ngOnInit() { + } + + // onClickSubmit(data:any) { + // this.role = data.role + // this.activity = data.activity + // console.log("Entered data is : " + JSON.stringify(this.role + this.activity) ) + // // console.log("Entered data role is : " + JSON.stringify(data)) + // } + + this.roleForm = new FormGroup({ + role: new FormControl(''), + activity: new FormControl('') + }) +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.html new file mode 100644 index 000000000..14e448711 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.html @@ -0,0 +1,83 @@ +
+ +
+ +
+
+ + + + +
+
+ + + + + {{ hob }} + cancel + + + + +
+ +
+
+ +
+ + + {{role.name}} + +
+ +
+ + + {{r.name}} + +
+ + +
+ +
+ +
+
+
+
+
+
diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.scss new file mode 100644 index 000000000..840e816c3 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.scss @@ -0,0 +1,23 @@ + + +.role-card { + width: 100%; +} +.form_field { + width: 400px; +} +.mat-card { + box-sizing: border-box; +} +.mat-input-wrapper{ + width:400px !important; + } + +.activity_span { + padding:6px 10px; + border-radius: 18px 18px; + border:1px solid rgba($color: #000000, $alpha: .08); + background-color: rgba(0,0,0,.02); + width: auto; + display: inline-block; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.ts new file mode 100644 index 000000000..6e84a834e --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.ts @@ -0,0 +1,100 @@ +import { Component, OnDestroy, OnInit } from '@angular/core' +import { FormControl, FormGroup, Validators } from '@angular/forms' +import { ConfigurationsService } from '@sunbird-cb/utils/src/public-api' +import { NSProfileDataV3 } from '../../models/profile-v3.models' +// tslint:disable-next-line +import _ from 'lodash' +import { MatChipInputEvent, MatSnackBar } from '@angular/material' +import { COMMA, ENTER } from '@angular/cdk/keycodes' +import { RolesAndActivityService } from '../../services/rolesandActivities.service' + +@Component({ + selector: 'ws-app-roles-and-activities', + templateUrl: './roles-and-activities.component.html', + styleUrls: ['./roles-and-activities.component.scss'], + /* tslint:disable */ + host: { class: 'w-100 role-card flex flex-1' }, + /* tslint:enable */ +}) +export class RolesAndActivitiesComponent implements OnInit, OnDestroy { + createRole!: FormGroup + public selectedActivity: any[] = [] + separatorKeysCodes: number[] = [ENTER, COMMA] + userRoles: NSProfileDataV3.IRolesAndActivities[] = [] + constructor( + private configSvc: ConfigurationsService, + private rolesAndActivityService: RolesAndActivityService, + private snackBar: MatSnackBar) { + this.updateRoles() + // [{ + // id: '1', name: 'role1', + // childNodes: [{ id: '1.1', name: 'Act1', description: 'desc1' }] + // }, + // { + // id: '2', name: 'role2', + // childNodes: [{ id: '2.1', name: 'Act2', description: 'desc2' }] + // }] + } + updateRoles() { + this.userRoles = _.get(this.configSvc.unMappedUser, 'profileDetails.userRoles') || [] + } + ngOnInit(): void { + this.createRole = new FormGroup( + { + roleName: new FormControl(null, [Validators.required]), + activity: new FormControl(null, [Validators.required]), + }) + } + ngOnDestroy(): void { + } + create() { + const role = this.createRole.get('roleName') + if (role && this.selectedActivity && this.configSvc.userProfile) { + // console.log(this.createRole.value, this.selectedActivity) + const reqObj = { + request: { + userId: this.configSvc.userProfile.userId, + profileDetails: { + userRoles: [{ + name: role.value, + // tslint:disable-next-line:arrow-return-shorthand + activities: _.map(this.selectedActivity, a => { return { name: a } as NSProfileDataV3.IRolesActivity }), + }, ...this.userRoles] as NSProfileDataV3.IRolesAndActivities[], + }, + }, + } + this.rolesAndActivityService.createRoles(reqObj).subscribe(res => { + if (res) { + this.snackBar.open('updated Successfully!!') + this.createRole.reset() + this.configSvc.updateGlobalProfile(true) + setTimeout(this.updateRoles, 3000) + } + }) + } + } + addActivity(event: MatChipInputEvent) { + const input = event.input + const value = event.value as unknown as NSProfileDataV3.IChipItems + + if ((value || '')) { + this.selectedActivity.push(value) + } + + if (input) { + input.value = '' + } + + if (this.createRole.get('activity')) { + // tslint:disable-next-line: no-non-null-assertion + this.createRole.get('activity')!.setValue(null) + } + } + + removeActivity(interest: any) { + const index = this.selectedActivity.indexOf(interest) + if (index >= 0) { + this.selectedActivity.splice(index, 1) + } + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html new file mode 100644 index 000000000..6adf21014 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html @@ -0,0 +1,19 @@ + +
+
+ + + Add topic + + + Not finding a topic of your interest? +
+
+ + + + + + +
+
\ No newline at end of file diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.spec.ts b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.spec.ts new file mode 100644 index 000000000..3b79fccb7 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { TopicComponent } from './topic.component' + +describe('TopicComponent', () => { + let component: TopicComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TopicComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(TopicComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.ts new file mode 100644 index 000000000..bc905bea0 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.ts @@ -0,0 +1,148 @@ +import { Component, OnDestroy, OnInit } from '@angular/core' +import { MatDialog, MatSnackBar } from '@angular/material' +import { ActivatedRoute } from '@angular/router' +import { ConfigurationsService } from '@sunbird-cb/utils/src/public-api' +// tslint:disable-next-line +import _ from 'lodash' +import { Subscription } from 'rxjs' +import { AddTopicDialogComponent } from '../../components/add-topic/add-topic.component' +import { NSProfileDataV3 } from '../../models/profile-v3.models' +import { TopicService } from '../../services/topics.service' + +@Component({ + selector: 'ws-app-topic', + templateUrl: './topic.component.html', + styleUrls: ['./topic.component.scss'], +}) +export class TopicComponent implements OnInit, OnDestroy { + + topics!: NSProfileDataV3.ITopic[] + addedByYou!: NSProfileDataV3.ITopic + private topicUpdateSubscription: Subscription | null = null + constructor( + private aRoute: ActivatedRoute, + private dialog: MatDialog, + private snackBar: MatSnackBar, + private topicService: TopicService, + private configSvc: ConfigurationsService, + + ) { + this.loadTopics() + if (this.topicUpdateSubscription) { + this.topicUpdateSubscription.unsubscribe() + } + this.topicUpdateSubscription = this.topicService.selectedTopics + .subscribe(data => { + if (this.topicService.autoSave.value) { + let desiredTopic: NSProfileDataV3.ITopic[] = [] + const systemTopic: NSProfileDataV3.ITopic[] = [] + _.each(data, topic => { + if (topic.identifier) { + systemTopic.push(topic) + } else { + desiredTopic = topic.children + } + }) + + if (desiredTopic.length > 0) { + this.saveDesiredTopic(_.compact(desiredTopic) || []) + } + if (systemTopic.length > 0) { + this.saveSystemTopic(_.compact(systemTopic) || []) + } + } + }) + } + ngOnDestroy(): void { + if (this.topicUpdateSubscription) { + this.topicUpdateSubscription.unsubscribe() + } + } + + ngOnInit() { + // console.log(this.configSvc.unMappedUser.profileDetails.desiredTopics) + // console.log(this.configSvc.unMappedUser.profileDetails.systemTopics) + const desiredTopics = _.get(this.configSvc.unMappedUser, 'profileDetails.desiredTopics') + const systemTopics = _.get(this.configSvc.unMappedUser, 'profileDetails.systemTopics') + this.topicService.autoSave.next(false) + this.addedByYou = { + children: desiredTopics || [], + code: '', + description: '', + identifier: '', + index: 0, + name: 'Added by you', + noOfHoursConsumed: 0, + status: '', + } + if (systemTopics) { + this.topicService.addInitTopics([...systemTopics, this.addedByYou]) + } + } + loadTopics() { + if ( + this.aRoute.snapshot.data + && this.aRoute.snapshot.data.topics + && this.aRoute.snapshot.data.topics.data + ) { + this.topics = this.aRoute.snapshot.data.topics.data + } + } + showPoup() { + const dialogRef = this.dialog.open(AddTopicDialogComponent, { + autoFocus: false, + data: {}, + }) + dialogRef.afterClosed().subscribe((response: any) => { + if (response) { + if (response) { + // this.addedByYou.children.push(response) + this.topicService.autoSave.next(true) + this.topicService.addTopicsAddedByYou(response) + } + } + }) + } + + saveDesiredTopic(desiredTopic: any[]) { + if (this.configSvc.userProfile && this.configSvc.userProfile.userId) { + const reqObj = { + request: { + userId: this.configSvc.userProfile.userId, + profileDetails: { + desiredTopics: desiredTopic, + }, + }, + } + this.topicService.saveDesiredTopic(reqObj).subscribe(res => { + if (res) { + this.snackBar.open('Updated!') + } + }) + } + } + + saveSystemTopic(systemTopic: NSProfileDataV3.ITopic[]) { + if (this.configSvc.userProfile && this.configSvc.userProfile.userId) { + const reqObj: NSProfileDataV3.ISystemTopic = { + request: { + userId: this.configSvc.userProfile.userId, + profileDetails: { + systemTopics: _.map(systemTopic, st => { + return { + children: st.children, + identifier: st.identifier, + name: st.name, + } as NSProfileDataV3.ISystemTopicChield + }), + }, + }, + } + this.topicService.saveSystemTopic(reqObj).subscribe(res => { + if (res) { + this.snackBar.open('Updated!') + } + }) + } + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/services/profile_v3.service.ts b/project/ws/app/src/lib/routes/profile-v3/services/profile_v3.service.ts new file mode 100644 index 000000000..e93fbe325 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/services/profile_v3.service.ts @@ -0,0 +1,36 @@ +import { Injectable } from '@angular/core' +import { HttpClient } from '@angular/common/http' +import { Observable } from 'rxjs' +import { map } from 'rxjs/operators' +// tslint:disable +import _ from 'lodash' +// tslint:enable + +const API_END_POINTS = { + GET_ALL_COMPETENCY: '/apis/protected/v8/frac/searchNodes', + UPDATE_PROFILE: '/apis/proxies/v8/user/v1/extPatch', + getUserdetailsFromRegistry: '/apis/proxies/v8/api/user/v2/read', +} + +@Injectable({ + providedIn: 'root', +}) +export class ProfileV3Service { + constructor(private http: HttpClient) { } + + getAllCompetencies(req: any) { + return this.http.post(API_END_POINTS.GET_ALL_COMPETENCY, req) + } + + updateProfileDetails(data: any) { + return this.http.post(API_END_POINTS.UPDATE_PROFILE, data) + } + + getUserdetailsFromRegistry(wid: string): Observable<[any]> { + return this.http.get<[any]>(`${API_END_POINTS.getUserdetailsFromRegistry}/${wid}`) + .pipe(map((res: any) => { + return res.result.response + })) + } + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/services/rolesandActivities.service.ts b/project/ws/app/src/lib/routes/profile-v3/services/rolesandActivities.service.ts new file mode 100644 index 000000000..ce06f5012 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/services/rolesandActivities.service.ts @@ -0,0 +1,25 @@ +import { HttpClient } from '@angular/common/http' +import { Injectable } from '@angular/core' +// tslint:disable-next-line +import _ from 'lodash' +import { Observable } from 'rxjs' +import { NSProfileDataV3 } from '../models/profile-v3.models' + +const API_END_POINTS = { + getRoles: 'apis/protected/v8/roleactivity', + UPDATE_PROFILE: '/apis/proxies/v8/user/v1/extPatch', +} +@Injectable({ + providedIn: 'root', +}) +export class RolesAndActivityService { + constructor( + private http: HttpClient) { + } + loadRoles(keyword: string): Observable { + return this.http.get(`${API_END_POINTS.getRoles}/${keyword}`) + } + createRoles(role: { request: { userId: string, profileDetails: { userRoles: NSProfileDataV3.IRolesAndActivities[] } } }) { + return this.http.post(API_END_POINTS.UPDATE_PROFILE, role) + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/services/topics.service.ts b/project/ws/app/src/lib/routes/profile-v3/services/topics.service.ts new file mode 100644 index 000000000..dc74d6699 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/services/topics.service.ts @@ -0,0 +1,73 @@ +import { HttpClient } from '@angular/common/http' +import { Injectable } from '@angular/core' +// tslint:disable-next-line +import _ from 'lodash' +import { BehaviorSubject, Observable } from 'rxjs' +import { NSProfileDataV3 } from '../models/profile-v3.models' + +const API_END_POINTS = { + getTopics: '/apis/protected/v8/catalog', + addTopic: '/apis/proxies/v8/user/v1/extPatch', +} +@Injectable({ + providedIn: 'root', +}) +export class TopicService { + public selectedTopics = new BehaviorSubject([]) + public autoSave = new BehaviorSubject(false) + constructor( + private http: HttpClient) { + } + loadTopics(): Observable { + return this.http.get(API_END_POINTS.getTopics) + } + addTopics(topic: NSProfileDataV3.ITopic) { + const topics = this.selectedTopics.value + topics.push(topic) + this.selectedTopics.next(topics) + } + /** + * this method will fill all already added topics from users Profile. + * @param topics + */ + addInitTopics(topics: NSProfileDataV3.ITopic[]) { + this.selectedTopics.next(topics) + } + removeTopics(topic: NSProfileDataV3.ITopic) { + const topics = this.selectedTopics.value || [] + if (topic.identifier) { + const index = _.findIndex(topics, { identifier: topic.identifier }) + topics.splice(index, 1) + } + this.selectedTopics.next(topics) + } + removeTopicsAddedByYou(topic: string) { + const topics = this.selectedTopics.value || [] + if (topic) { + const index = _.findIndex(topics, { name: 'Added by you' }) + const cIdx = _.indexOf(topics[index].children, topic) + topics[index].children.splice(cIdx, 1) + } + this.selectedTopics.next(topics) + } + addTopicsAddedByYou(topic: string) { + const topics = this.selectedTopics.value || [] + if (topic) { + const index = _.findIndex(topics, { name: 'Added by you' }) + topics[index].children.push(topic) + } + this.selectedTopics.next(topics) + } + get getCurrentSelectedTopics(): NSProfileDataV3.ITopic[] | [] { + if (this.selectedTopics.value) { + return this.selectedTopics.value + } + return [] + } + saveDesiredTopic(data: NSProfileDataV3.IDesiredTopic) { + return this.http.post(API_END_POINTS.addTopic, data) + } + saveSystemTopic(data: NSProfileDataV3.ISystemTopic) { + return this.http.post(API_END_POINTS.addTopic, data) + } +} diff --git a/project/ws/app/src/lib/routes/search-v2/routes/global-search/global-search.component.ts b/project/ws/app/src/lib/routes/search-v2/routes/global-search/global-search.component.ts index e78fb1363..c5976d3ff 100644 --- a/project/ws/app/src/lib/routes/search-v2/routes/global-search/global-search.component.ts +++ b/project/ws/app/src/lib/routes/search-v2/routes/global-search/global-search.component.ts @@ -33,16 +33,23 @@ export class GlobalSearchComponent implements OnInit { if (queryParams.has('f')) { const sfilters = JSON.parse(queryParams.get('f') || '{}') const paramfilter = [{ - mainType: 'primaryCategory', + mainType: 'primaryCategory', name: sfilters.contentType[0].toLowerCase(), count: '', ischecked: true, }, { - mainType: 'competencies_v3.name', + mainType: 'competencies_v3.name', name: 'competencies_v3.name', count: '', values: sfilters['competencies_v3.name'], ischecked: true, + }, + { + mainType: 'topics', + name: 'topics', + count: '', + values: sfilters['topics'], + ischecked: true, }] this.searchparamFilters = paramfilter } diff --git a/project/ws/app/src/lib/routes/search-v2/routes/learn-search/learn-search.component.ts b/project/ws/app/src/lib/routes/search-v2/routes/learn-search/learn-search.component.ts index f90247e5b..73be1737b 100644 --- a/project/ws/app/src/lib/routes/search-v2/routes/learn-search/learn-search.component.ts +++ b/project/ws/app/src/lib/routes/search-v2/routes/learn-search/learn-search.component.ts @@ -23,11 +23,12 @@ export class LearnSearchComponent implements OnInit, OnChanges, OnDestroy { mediaType: [], status: ['Live'], 'competencies_v3.name': [], + topics: [], }, query: '', sort_by: { lastUpdatedOn: 'desc' }, fields: [], - facets: ['primaryCategory', 'mimeType', 'source', 'competencies_v3.name'], + facets: ['primaryCategory', 'mimeType', 'source', 'competencies_v3.name', 'topics'], limit: 100, offset: 0, }, @@ -266,6 +267,9 @@ export class LearnSearchComponent implements OnInit, OnChanges, OnDestroy { } else if (mf.mainType === 'competencies_v3.name') { this.competencNames = (mf.values) queryparam.request.filters['competencies_v3.name'] = mf.values + } else if (mf.mainType === 'topics') { + this.competencNames = (mf.values) + queryparam.request.filters['topics'] = mf.values } }) diff --git a/project/ws/app/src/lib/routes/user-profile/components/user-profile/user-profile.component.html b/project/ws/app/src/lib/routes/user-profile/components/user-profile/user-profile.component.html index 86def0c23..cbc5c7766 100755 --- a/project/ws/app/src/lib/routes/user-profile/components/user-profile/user-profile.component.html +++ b/project/ws/app/src/lib/routes/user-profile/components/user-profile/user-profile.component.html @@ -1053,11 +1053,11 @@

- - + + + - + - + + +
diff --git a/proxy/localhost.proxy.json b/proxy/localhost.proxy.json index f9d735e2e..cb74d9bef 100755 --- a/proxy/localhost.proxy.json +++ b/proxy/localhost.proxy.json @@ -8,7 +8,7 @@ "/apis": "/apis" }, "headers": { - "Cookie": "connect.sid=s%3AyiiQMmY_eGm4One0r1DOwKNvXxODqGgQ.i4lgFAjW7EjDPqJ2Ui%2FP60LGGGdA0zr87LISIowF7h4" + "Cookie": "connect.sid=s%3A7j6jjrz9gYwgFPtDoJMVILGXg6aPADlH.EgCjVgd8Bdwy1989SdCp0ukKVoUlTwiOa1VnHAjF7GE" } }, "/content-api/*": { diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 18fa7d1e3..c7b7e7704 100755 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -20,6 +20,8 @@ import { TncAppResolverService } from './services/tnc-app-resolver.service' import { TncPublicResolverService } from './services/tnc-public-resolver.service' import { AppTocResolverService } from '@ws/app/src/lib/routes/app-toc/resolvers/app-toc-resolver.service' import { PublicLogoutComponent } from './routes/public/public-logout/public-logout.component' +import { PublicSignupComponent } from './routes/public/public-signup/public-signup.component' +import { PublicHomeComponent } from './routes/public/public-home/public-home.component' // 💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥💥 // Please declare routes in alphabetical order @@ -141,6 +143,7 @@ const routes: Routes = [ pageData: PageResolve, }, }, + { path: 'app/taxonomy', loadChildren: () => @@ -235,6 +238,21 @@ const routes: Routes = [ // data: { // }, // }, + { + path: 'app/setup', + loadChildren: () => + import('./routes/route-profile-v3.module').then(u => u.RouteProfileV3Module), + canActivate: [GeneralGuard], + data: { + pageType: 'feature', + pageKey: 'profile-v3', + pageId: 'app/profile-v3', + module: 'profile-v3', + }, + resolve: { + pageData: PageResolve, + }, + }, { path: 'app/feedback', loadChildren: () => @@ -695,6 +713,18 @@ const routes: Routes = [ path: 'public/logout', component: PublicLogoutComponent, }, + { + path: 'public/home', + component: PublicHomeComponent, + }, + { + path: 'public/signup', + component: PublicSignupComponent, + data: { + module: 'Login', + pageId: 'public/signup', + }, + }, { path: 'public/mobile-app', component: MobileAppHomeComponent, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a94f9e5e7..5a3cebf0c 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -21,6 +21,7 @@ import { MatInputModule, MatFormFieldModule, MatCheckboxModule, + MatTabsModule, } from '@angular/material' import { BrowserModule, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' @@ -67,6 +68,8 @@ import { QuickTourModule } from '@ws/app/src/lib/routes/info/quick-tour/quick-to import { AppIntroComponent } from './component/app-intro/app-intro.component' import { NoConnectionComponent } from './component/no-connection/no-connection.component' import { PublicLogoutModule } from './routes/public/public-logout/public-logout.module' +import { PublicSignupModule } from './routes/public/public-signup/public-signup.module' +import { PublicHomeComponent } from './routes/public/public-home/public-home.component' // import { ServiceWorkerModule } from '@angular/service-worker' // import { environment } from '../environments/environment' @@ -104,6 +107,7 @@ const getBaseHref = (platformLocation: PlatformLocation): string => { LoginRootComponent, LoginRootDirective, NoConnectionComponent, + PublicHomeComponent, ], imports: [ FormsModule, @@ -141,9 +145,11 @@ const getBaseHref = (platformLocation: PlatformLocation): string => { PublicAboutModule, PublicContactModule, PublicLogoutModule, + PublicSignupModule, MobileAppModule, PipeSafeSanitizerModule, TourModule, + MatTabsModule, DiscussionUiModule.forRoot(ConfigService), ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }), ], diff --git a/src/app/component/app-nav-bar/app-nav-bar.component.html b/src/app/component/app-nav-bar/app-nav-bar.component.html index 412b3eb4a..418e0b8f9 100755 --- a/src/app/component/app-nav-bar/app-nav-bar.component.html +++ b/src/app/component/app-nav-bar/app-nav-bar.component.html @@ -78,12 +78,20 @@
--> -
diff --git a/src/app/routes/public/public-logout/public-logout.component.ts b/src/app/routes/public/public-logout/public-logout.component.ts index 0fb4a50fb..6a7a31050 100644 --- a/src/app/routes/public/public-logout/public-logout.component.ts +++ b/src/app/routes/public/public-logout/public-logout.component.ts @@ -24,7 +24,7 @@ export class PublicLogoutComponent implements OnInit, OnDestroy { ngOnInit() { this.subscriptionContact = this.activateRoute.data.subscribe(data => { - this.contactPage = data.pageData.data + this.contactPage = data.pageData && data.pageData.data }) if (this.configSvc.instanceConfig) { this.contactUsMail = this.configSvc.instanceConfig.mailIds.contactUs diff --git a/src/app/routes/public/public-logout/public-logout.module.ts b/src/app/routes/public/public-logout/public-logout.module.ts index 965cf32cc..98e24301e 100644 --- a/src/app/routes/public/public-logout/public-logout.module.ts +++ b/src/app/routes/public/public-logout/public-logout.module.ts @@ -10,6 +10,7 @@ import { } from '@angular/material' import { BtnPageBackModule } from '@sunbird-cb/collection' import { PipeSafeSanitizerModule } from '@sunbird-cb/utils' +import { RouterModule } from '@angular/router' @NgModule({ declarations: [PublicLogoutComponent], @@ -22,6 +23,7 @@ import { PipeSafeSanitizerModule } from '@sunbird-cb/utils' MatIconModule, MatExpansionModule, PipeSafeSanitizerModule, + RouterModule, ], exports: [PublicLogoutComponent], }) diff --git a/src/app/routes/public/public-signup/public-signup.component.html b/src/app/routes/public/public-signup/public-signup.component.html new file mode 100644 index 000000000..c0862b7f1 --- /dev/null +++ b/src/app/routes/public/public-signup/public-signup.component.html @@ -0,0 +1,225 @@ +
+
+
+ logo +
+ +
+ +
+ karmayogi + + +
+ + + + + + + + + +
+
+ + +
+
+
+
+ +

+ Register +

+
+
+
+
+
+
+ + + + + First name is mandatory + + + Name fields cannot contain numbers and special characters except ' + + +
+
+ + + + + Last name is mandatory + + + Name fields cannot contain numbers and special characters except ' + + +
+ +
+ + + + + Position is mandatory + + + You must enter value from suggested list only. + + + + + {{ option.name }} + + +
+
+ + + + Only government email ids are allowed + + Email id is mandatory + + + Email id is not valid + + +
+
+ + + + + Department is mandatory + + + You must enter value from suggested list only. + + + + + {{ option.channel }} + + +
+
+
+ + + +
+
+
+
+ +
+
+
+
+
+
+
+ +
+
\ No newline at end of file diff --git a/src/app/routes/public/public-signup/public-signup.component.scss b/src/app/routes/public/public-signup/public-signup.component.scss new file mode 100644 index 000000000..3a2e8660d --- /dev/null +++ b/src/app/routes/public/public-signup/public-signup.component.scss @@ -0,0 +1,764 @@ +@import 'ws-common'; +@import 'ws-vars'; +@import 'ws-mixins'; + +.main_container { + font-family: 'Poppins', sans-serif; + position: relative; + letter-spacing: 0.2px; + + background-size: cover; + } + .submitBtn { + width: 100%; + height: 40px; + line-height: 40px; + } + + ::ng-deep .mat-checkbox-layout{ + white-space: break-spaces !important; + } + + .mat-checkbox-layout{ + white-space: break-spaces !important; + } + + + + .submitBtn:disabled, + .submitBtn[disabled] { + opacity: 0.6; + } + + .right_container { + background-color: #fff; + width: 45%; + min-height: 100vh; + box-sizing: border-box; + box-shadow: 0px 20px 60px #3e3e3e29; + + @include breakpoint-xs { + width: 100%!important; + } + } + + .left_container { + padding: 5rem 6rem; + box-sizing: border-box; + width: 55%; + height: 100vh; + + @include breakpoint-xs { + display: none!important; + } + } + + .logo_box { + width: 320px; + img.logo_img { + width: 100%; + } + } + + .slider_box { + padding: 5rem 0 2rem 0; + width: 320px; + box-sizing: border-box; + box-sizing: border-box; + } + + .text_box { + margin: 3rem 0 1rem; + } + + .right_inner_container { + width: 348px; + + @include breakpoint-xs { + width: 300px!important; + } + } + + .m_b_2 { + margin-bottom: 1rem; + } + + + + // .main_container { + // background-image : url(assets/instances/eagle/banners/home/9/Login_background.png) no-repeat center center fixed; + // } + + ::ng-deep .top-nav-bar { + display: none; + } + + ::ng-deep .height-on-top { + padding-top: 0!important; + } + + + + +.slideshow-container { + padding: 5rem 0 2rem 0; + + @include breakpoint-s { + padding: 3rem 0 2rem 0!important; + } +} + + .mySlides { + height: auto; + + img { + height: 430px; + width: auto; + + @include breakpoint-s { + height: 325px!important; + } + } + } + + .container-balanced { + @extend %page-center; + } + + .sidenav-content-min-height { + min-height: calc(100vh - 168px); + + @include breakpoint-s { + min-height: calc(100vh - 182px); + } + } + + .flex-align { + align-items: center; + justify-content: flex-start; + } + + .disable { + pointer-events: none !important; + cursor: text !important; + // background: gainsboro; + + .txt { + + animation-duration: 3000ms; + animation-name: blink; + animation-iteration-count: infinite; + animation-direction: alternate; + // tslint:disable-next-line + -webkit-animation: blink 3000ms infinite; + /* Safari and Chrome */ + + + @keyframes blink { + from { + color: red; + } + + to { + color: blueviolet; + } + } + + @-webkit-keyframes blink { + from { + color: red; + } + + to { + color: blueviolet; + } + } + + } + } + + ::ng-deep mat-form-field .mat-form-field-infix .mat-form-field-label, + ::ng-deep mat-form-field .mat-form-field-infix .mat-select-value { + line-height: normal !important; + } + + ::ng-deep .theme-igot.day-mode .mat-form-field.mat-focused .mat-form-field-label { + color: #333232 !important; + } + + .text-input-col { + @include breakpoint-xs { + padding-left: 0; + padding-right: 0; + } + + } + + .language-box { + @include breakpoint-xs { + margin-top: 16px; + } + } + + .margin-right-10 { + margin-right: 10px !important; + } + + /* Chrome, Safari, Edge, Opera */ + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + /* Firefox */ + input[type=number] { + -moz-appearance: textfield; + } + + .profile-box { + // background: #FFFFFF 0% 0% no-repeat padding-box; + // box-shadow: 0px 20px 60px #3E3E3E29; + // border-radius: 8px; + // margin: 3rem; + margin-top: $size-xs; + // padding: 2rem; + min-height: calc(100vh - 12rem); + + ::ng-deep .mat-tab-header { + margin: 0 3rem; + border-bottom: none!important; + + @include breakpoint-xs { + margin: 0 0.5rem; + } + } + + ::ng-deep .mat-tab-header-pagination { + box-shadow: none!important; + } + + + + .profile-cols { + margin: 0 1rem; + padding: 1rem 3rem; + + @include breakpoint-xs { + margin: 0 0.5rem; + } + + .section-input { + .item { + min-width: 340px; + margin-right: 30px; + display: contents; + + + &:last-child { + margin-right: 0; + } + } + } + } + + .profile-cols-full { + margin: 20px 0; + padding: 1rem 3rem; + + &:first-child { + margin: 0; + margin-bottom: 20px; + } + + .section-input { + .item { + min-width: 340px; + margin-right: 30px; + width: 340px; + + @include breakpoint-xs { + width:auto; + } + + // display: contents; + &:last-child { + margin-right: 0; + } + + &.w-auto { + min-width: auto !important; + } + } + } + + .section-input-single { + .item { + display: contents; + } + } + } + + + .heading { + color: #222222; + + &.mt-10 { + margin-top: 2.5rem !important; + } + } + + .bg-grey { + background: #EDEDED 0% 0% no-repeat padding-box; + border-radius: 4px; + height: 100%; + } + + .img-column { + flex: 100px 0 0; + } + + .input-column { + flex: auto; + } + + .radio-toolbar input[type="radio"] { + opacity: 0; + position: fixed; + width: 0; + } + + .radio-toolbar { + padding: 10px 0; + } + + .radio-toolbar label { + display: inline-block; + padding: 7px 21px; + font-size: 14px; + background: #FFFFFF 0% 0% no-repeat padding-box; + border: 1px solid #5F5F5F; + border-radius: 4px; + margin: 0 10px 10px 0; + color: #5F5F5F; + cursor: pointer; + transition: all 0.125s ease-in-out; + } + + .radio-toolbar input[type="radio"]:checked+label { + background: #0074b6 0% 0% no-repeat padding-box; + border-radius: 4px; + border-color: #0074b6; + color: #fff; + } + + .radio-toolbar input[type="radio"]:focus+label { + background: #0074b6 0% 0% no-repeat padding-box; + border-radius: 4px; + border-color: #0074b6; + color: #fff; + } + + + .radio-toolbar label:hover { + background: none; + border-color: #0074b6; + color: #0074b6; + } + + ::ng-deep .mat-form-field { + width: 100%; + max-width: 340px; + + &.full-width { + max-width: 100%; + } + + &.no-pb .mat-form-field-wrapper { + padding-bottom: 0; + } + } + + .mat-form-field-wrapper{ + + } + + + .combined-field { + width: 100%; + max-width: 340px; + } + + .w-full-imp { + width: 100% !important; + } + + .button { + font-family: 'Poppins', sans-serif; + color: #F9F9F9; + font-size: 14px; + line-height: 19px; + height: 40px; + background-color: rgb(0, 116, 182, 1); + border-radius: 4px; + transition: all .25s ease-in; + width: 100%; + border:0; + cursor: pointer; + } + + .submitBtn{ + color: #fff !important; + } + + .submitBtn:disabled, + .submitBtn[disabled] { + opacity: 0.6; + } + + .btn-success { + background-color: rgb(48, 105, 51) !important; + border-radius: 4px; + width: 240px; + box-shadow: none; + margin-right: 16px; + + &.btn-responsive { + width: 100%; + max-width: 340px; + } + } + + .btn-success:disabled, + .btn-success[disabled] { + opacity: 0.6; + } + + .btn-danger { + height: 30px; + width: 30px + } + + .color-danger { + font-size: 30px; + height: 30px; + width: 30px; + color: #e44; + } + + ::ng-deep .mat-form-field-outline { + min-height: 48px; + background: #fff; + border-radius: 4px; + + .mat-form-field-outline-start { + border: 1px solid #70707069; + border-radius: 4px 0 0 4px; + border-right-style: none; + /* border: 1px solid currentColor; */ + min-width: 4px; + border-right-style: none; + } + + .mat-form-field-outline-gap { + border: 1px solid currentColor; + border-radius: 82px; + border-left-style: none; + border-right-style: none; + } + + .mat-form-field-outline-end { + border: 1px solid #70707069; + border-left-style: none; + border-radius: 0 4px 4px 0; + } + } + + ::ng-deep .mat-form-field-outline.mat-form-field-outline-thick { + min-height: 48px; + background: #fff; + border-radius: 4px; + + .mat-form-field-outline-start { + border-radius: 4px 0 0 4px; + min-width: 4px; + border: 1px solid currentColor; + border-right-style: none; + } + + .mat-form-field-outline-gap { + border-width: 1px; + border: 1px solid currentColor; + border-radius: 4px; + border-left-style: none; + border-right-style: none; + } + + .mat-form-field-outline-end { + border-width: 1px; + border-radius: 0 4px 4px 0; + border: 1px solid currentColor; + border-left-style: none; + } + } + + ::ng-deep .mat-form-field-infix { + padding: 0; + margin: 0; + border: none; + } + + ::ng-deep .mat-form-field-flex { + min-height: 48px; + align-items: center; + } + + ::ng-deep .mat-form-field-infix { + padding: 0; + margin: 16px 0 0 0; + border: none; + } + } + + .form-label { + color: #222222; + font-size: 16px; + margin-bottom: 0.5rem; + font-family: 'Lato'; + + @include breakpoint-xs { + display: block; + } + @include breakpoint-s { + display: block; + } + } + + input.mat-input-element { + color: #5F5F5F; + } + + ::ng-deep.mat-radio-group { + padding-bottom: 1.34375em; + } + + ::ng-deep.mat-chip-list-wrapper { + margin: 0 !important; + } + + ::ng-deep.mat-chip { + font-weight: normal; + background: #F1F9FF 0% 0% no-repeat padding-box !important; + border-radius: 12px !important; + color: #0074b6 !important; + + &:hover { + + filter: brightness(90%); + + } + + + + .mat-chip-remove { + opacity: 1 !important; + color: #0074b6 !important; + border-radius: 50%; + } + } + + ::ng-deeptextarea.mat-input-element { + padding: 8px 0; + } + + ::ng-deep .mat-checkbox-checked.mat-accent .mat-checkbox-background { + background: #0074b6 0% 0% no-repeat padding-box !important; + border-radius: 4px; + } + + ::ng-deep .mat-checkbox .mat-checkbox-frame { + border-radius: 4px !important; + } + + ::ng-deep .mat-form-field-appearance-outline .mat-select-arrow-wrapper { + transform: none !important; + } + + + ::ng-deep .mat-tab-label-container .mat-tab-list { + .mat-tab-labels .mat-tab-label { + font-size: 18px; + color: #222222; + } + + .mat-tab-labels .mat-tab-label-active { + .mat-tab-label-content { + color: #0074b6; + } + } + + .mat-ink-bar { + height: 3px; + background-color: #0074b6 !important; + } + } + + .form-control { + background: #FFFFFF 0% 0% no-repeat padding-box; + border: 1px solid #70707069; + border-radius: 4px; + display: block; + + &::placeholder { + color: #BEBEBE; + font-size: 14px; + } + + &:focus { + border: 2px solid #0074b6; + outline: none; + } + + } + + .input-wrapper { + flex: 1; + display: flex; + flex-wrap: wrap; + flex-direction: column; + } + + .profile-img-wrapper { + height: 90px; + width: 90px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background: #D9F2FE 0% 0% no-repeat padding-box; + border: 2px solid #FFFFFF; + position: relative; + + .photo { + object-fit: cover; + border-radius: 50%; + height: inherit; + width: 100%; + } + + mat-icon.person { + color: #0074b6; + font-size: 4rem; + width: auto; + height: auto; + } + + .camera-wrapper { + background: #0074b6 0% 0% no-repeat padding-box; + box-shadow: 0px 2px 4px #00000029; + position: absolute; + height: 20px; + width: 20px; + right: 3px; + bottom: -3%; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + + mat-icon.camera { + color: #fff; + font-size: 11px; + width: auto; + height: auto; + } + } + } + + ::ng-deep .mat-checkbox-inner-container { + height: 23px !important; + width: 23px !important; + margin-top: 4px !important; + } + + ::ng-deep .mat-checkbox-ripple { + position: absolute; + left: calc(50% - 13px); + /* top: calc(50% - 20px); */ + height: 23px; + width: 23px; + z-index: 1; + pointer-events: none; + } + + .w80 { + width: 80px !important; + } + + .flex-expand { + flex: 1 !important; + } + + .w-minus-w80 { + max-width: calc(100% - 80px)!important; + } + + + .btn-success { + @include breakpoint-xs { + margin:0px 8px!important; + } + @include breakpoint-s { + margin-right:1rem!important; + } + } + + @media screen and (max-width: 768px) { + .profile-box { + // margin: 0 1rem; + // padding: 0.5rem 1rem; + margin: 0; + padding: 10px 0; + + .btn-success { + // margin-right: 0; + // margin: 0 8px!important; + } + + .profile-cols { + padding: 1rem; + + .section-input { + .item { + min-width: 100%; + margin-right: 30px; + display: contents; + + &:last-child { + margin-right: 0; + } + } + } + } + + .profile-cols-full { + padding: 1rem; + margin: 10px !important; + + &:first-child { + margin: 10px !important; + } + + .section-input { + .item { + min-width: 100%; + margin-right: 30px; + display: block; + } + } + } + } + + } + diff --git a/src/app/routes/public/public-signup/public-signup.component.ts b/src/app/routes/public/public-signup/public-signup.component.ts new file mode 100644 index 000000000..6ce476980 --- /dev/null +++ b/src/app/routes/public/public-signup/public-signup.component.ts @@ -0,0 +1,226 @@ +import { Component, OnInit, OnDestroy } from '@angular/core' +import { Subscription, Observable } from 'rxjs' +import { FormGroup, FormControl, Validators, AbstractControl, ValidatorFn } from '@angular/forms' +import { SignupService } from './signup.service' +import { LoggerService, ConfigurationsService, NsInstanceConfig } from '@sunbird-cb/utils/src/public-api' +import { debounceTime, distinctUntilChanged, startWith, map } from 'rxjs/operators' +import { environment } from 'src/environments/environment' +import { MatSnackBar, MatDialog } from '@angular/material' +import { SignupSuccessDialogueComponent } from './signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component' + +export function forbiddenNamesValidator(optionsArray: any): ValidatorFn { + return (control: AbstractControl): { [key: string]: any } | null => { + if (!optionsArray) { + return null + // tslint:disable-next-line: no-else-after-return + } else { + const index = optionsArray.findIndex((op: any) => { + // tslint:disable-next-line: prefer-template + // return new RegExp('^' + op.channel + '$').test(control.channel) + return op.channel === control.value.channel + }) + return index < 0 ? { forbiddenNames: { value: control.value.channel } } : null + } + } +} + +export function forbiddenNamesValidatorPosition(optionsArray: any): ValidatorFn { + return (control: AbstractControl): { [key: string]: any } | null => { + if (!optionsArray) { + return null + // tslint:disable-next-line: no-else-after-return + } else { + const index = optionsArray.findIndex((op: any) => { + // tslint:disable-next-line: prefer-template + // return new RegExp('^' + op.channel + '$').test(control.channel) + return op.name === control.value.name + }) + return index < 0 ? { forbiddenNames: { value: control.value.name } } : null + } + } +} + +@Component({ + selector: 'ws-public-signup', + templateUrl: './public-signup.component.html', + styleUrls: ['./public-signup.component.scss'], +}) + +export class PublicSignupComponent implements OnInit, OnDestroy { + registrationForm!: FormGroup + namePatern = `^[a-zA-Z\\s\\']{1,32}$` + // emailWhitelistPattern = `^[a-zA-Z0-9._-]{3,}\\b(@gov|@nic)\\b\.\\b(in)\\b$` + departments!: any + masterDepartments!: Observable | undefined + masterDepartmentsOriginal!: [] + positionsOriginal!: [] + postions!: any + masterPositions!: Observable | undefined + telemetryConfig: NsInstanceConfig.ITelemetryConfig | null = null + portalID = '' + confirm = false + + private subscriptionContact: Subscription | null = null + + constructor( + private signupSvc: SignupService, + private loggerSvc: LoggerService, + private configSvc: ConfigurationsService, + private snackBar: MatSnackBar, + private dialog: MatDialog, + ) { + this.registrationForm = new FormGroup({ + firstname: new FormControl('', [Validators.required, Validators.pattern(this.namePatern)]), + lastname: new FormControl('', [Validators.required, Validators.pattern(this.namePatern)]), + position: new FormControl('', [Validators.required, forbiddenNamesValidatorPosition(this.masterPositions)]), + email: new FormControl('', [Validators.required, Validators.email]), + department: new FormControl('', [Validators.required, forbiddenNamesValidator(this.masterDepartments)]), + confirmBox: new FormControl(false, [Validators.required]), + }) + } + + ngOnInit() { + this.fetchDepartments() + const instanceConfig = this.configSvc.instanceConfig + this.positionsOriginal = this.configSvc.positions || [] + this.onPositionsChange() + if (instanceConfig) { + this.telemetryConfig = instanceConfig.telemetryConfig + this.portalID = `${this.telemetryConfig.pdata.id}` + } + } + + fetchDepartments() { + this.signupSvc.getDepartments().subscribe( + (res: any) => { + if (res && res.result) { + this.masterDepartmentsOriginal = res.result.content + this.onDepartmentsChange() + } + }, + (err: any) => { + this.loggerSvc.error('USER RATING FETCH ERROR >', err) + } + ) + } + + onDepartmentsChange(): void { + + // tslint:disable-next-line: no-non-null-assertion + this.masterDepartments = this.registrationForm.get('department')!.valueChanges + .pipe( + debounceTime(500), + distinctUntilChanged(), + startWith(''), + map(value => typeof (value) === 'string' ? value : (value && value.name ? value.name : '')), + map(name => name ? this.filterDepartments(name) : this.masterDepartmentsOriginal.slice()) + ) + + this.masterDepartments.subscribe((event: any) => { + // tslint:disable-next-line: no-non-null-assertion + this.registrationForm.get('department')!.setValidators([Validators.required, forbiddenNamesValidator(event)]) + this.registrationForm.updateValueAndValidity() + }) + } + + onPositionsChange() { + // tslint:disable-next-line: no-non-null-assertion + this.masterPositions = this.registrationForm.get('position')!.valueChanges + .pipe( + debounceTime(500), + distinctUntilChanged(), + startWith(''), + map(value => typeof (value) === 'string' ? value : (value && value.name ? value.name : '')), + map(name => name ? this.filterPositions(name) : this.positionsOriginal.slice()) + ) + + this.masterPositions.subscribe((event: any) => { + // tslint:disable-next-line: no-non-null-assertion + this.registrationForm.get('position')!.setValidators([Validators.required, forbiddenNamesValidatorPosition(event)]) + this.registrationForm.updateValueAndValidity() + }) + } + + private filterDepartments(name: string): any { + if (name) { + const filterValue = name.toLowerCase() + return this.masterDepartmentsOriginal.filter((option: any) => option.channel.toLowerCase().includes(filterValue)) + } + return this.masterDepartmentsOriginal + } + + private filterPositions(name: string): any { + if (name) { + const filterValue = name.toLowerCase() + return this.positionsOriginal.filter((option: any) => option.name.toLowerCase().includes(filterValue)) + } + return this.positionsOriginal + } + + public confirmChange() { + this.confirm = !this.confirm + this.registrationForm.patchValue({ + confirmBox: this.confirm, + }) + } + + ngOnDestroy() { + if (this.subscriptionContact) { + this.subscriptionContact.unsubscribe() + } + } + + displayFn = (value: any) => { + return value ? value.channel : undefined + } + + displayFnPosition = (value: any) => { + return value ? value.name : undefined + } + + signup() { + const req = { + firstName: this.registrationForm.value.firstname || '', + lastName: this.registrationForm.value.lastname || '', + email: this.registrationForm.value.email || '', + deptId: this.registrationForm.value.department.identifier || '', + deptName: this.registrationForm.value.department.channel || '', + position: this.registrationForm.value.position.name || '', + source: `${environment.name}.${this.portalID}` || '', + } + + // console.log('req: ', req) + + this.signupSvc.register(req).subscribe( + (_res: any) => { + // console.log('success', res) + this.openDialog() + }, + (err: any) => { + this.loggerSvc.error('Error in registering new user >', err) + if (err.error && err.error.params && err.error.params.errmsg) { + this.openSnackbar(err.error.params.errmsg) + } else { + this.openSnackbar('Something went wrong, please try again later!') + } + // this.dialogRef.close(false) + } + ) + } + + private openSnackbar(primaryMsg: string, duration: number = 5000) { + this.snackBar.open(primaryMsg, 'X', { + duration, + }) + } + + openDialog(): void { + const dialogRef = this.dialog.open(SignupSuccessDialogueComponent, { + // height: '400px', + width: '500px', + // data: { content, userId: this.userId, userRating: this.userRating }, + }) + dialogRef.afterClosed().subscribe((_result: any) => { + }) + } +} diff --git a/src/app/routes/public/public-signup/public-signup.module.ts b/src/app/routes/public/public-signup/public-signup.module.ts new file mode 100644 index 000000000..fbe97d931 --- /dev/null +++ b/src/app/routes/public/public-signup/public-signup.module.ts @@ -0,0 +1,69 @@ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { + MatToolbarModule, + MatIconModule, + MatButtonModule, + MatTooltipModule, + MatListModule, + MatSidenavModule, + MatCardModule, + MatExpansionModule, + MatRadioModule, + MatChipsModule, + MatInputModule, + MatFormFieldModule, + MatDialogModule, + MatSnackBarModule, + MatSelectModule, + MatDatepickerModule, + MatNativeDateModule, + MatTableModule, + MatCheckboxModule, + MatProgressSpinnerModule, + MatButtonToggleModule, + MatTabsModule, + MatAutocompleteModule, +} from '@angular/material' +import { PublicSignupComponent } from './public-signup.component' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { RouterModule } from '@angular/router' +import { SignupService } from './signup.service' +import { SignupSuccessDialogueComponent } from './signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component' + +@NgModule({ + declarations: [PublicSignupComponent, SignupSuccessDialogueComponent], + imports: [ + CommonModule, + FormsModule, + RouterModule, + ReactiveFormsModule, + MatToolbarModule, + MatIconModule, + MatButtonModule, + MatTooltipModule, + MatListModule, + MatSidenavModule, + MatCardModule, + MatExpansionModule, + MatRadioModule, + MatChipsModule, + MatInputModule, + MatFormFieldModule, + MatDialogModule, + MatSnackBarModule, + MatSelectModule, + MatDatepickerModule, + MatNativeDateModule, + MatTableModule, + MatCheckboxModule, + MatProgressSpinnerModule, + MatButtonToggleModule, + MatTabsModule, + MatAutocompleteModule, + ], + exports: [PublicSignupComponent], + providers: [SignupService], + entryComponents: [SignupSuccessDialogueComponent], +}) +export class PublicSignupModule { } diff --git a/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.html b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.html new file mode 100644 index 000000000..0fd75462d --- /dev/null +++ b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.html @@ -0,0 +1,12 @@ +
+

+ Thank you for registering! +

+

+ Please check your registered email to activate your account. +

+ +
\ No newline at end of file diff --git a/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.scss b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.spec.ts b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.spec.ts new file mode 100644 index 000000000..71a5c1edb --- /dev/null +++ b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing' + +import { SignupSuccessDialogueComponent } from './signup-success-dialogue.component' + +describe('SignupSuccessDialogueComponent', () => { + let component: SignupSuccessDialogueComponent + let fixture: ComponentFixture + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SignupSuccessDialogueComponent], + }) + .compileComponents() + })) + + beforeEach(() => { + fixture = TestBed.createComponent(SignupSuccessDialogueComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) + + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.ts b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.ts new file mode 100644 index 000000000..f73920786 --- /dev/null +++ b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core' +import { MatDialogRef } from '@angular/material' +import { Router } from '@angular/router' + +@Component({ + selector: 'ws-signup-success-dialogue', + templateUrl: './signup-success-dialogue.component.html', + styleUrls: ['./signup-success-dialogue.component.scss'], +}) +export class SignupSuccessDialogueComponent implements OnInit { + + constructor( + public dialogRef: MatDialogRef, + private router: Router + ) { } + + ngOnInit() { + } + + closeDialog() { + this.dialogRef.close() + this.router.navigate(['/public/logout']) + } + +} diff --git a/src/app/routes/public/public-signup/signup.service.spec.ts b/src/app/routes/public/public-signup/signup.service.spec.ts new file mode 100644 index 000000000..da35f01ea --- /dev/null +++ b/src/app/routes/public/public-signup/signup.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing' + +import { SignupService } from './signup.service' + +describe('SignupService', () => { + beforeEach(() => TestBed.configureTestingModule({})) + + it('should be created', () => { + const service: SignupService = TestBed.get(SignupService) + expect(service).toBeTruthy() + }) +}) diff --git a/src/app/routes/public/public-signup/signup.service.ts b/src/app/routes/public/public-signup/signup.service.ts new file mode 100644 index 000000000..4cb6c9d0c --- /dev/null +++ b/src/app/routes/public/public-signup/signup.service.ts @@ -0,0 +1,26 @@ +import { Injectable } from '@angular/core' +import { Observable } from 'rxjs' +import { HttpClient } from '@angular/common/http' + +const API_END_POINTS = { + GET_DEPARTMENTS: `/api/user/registration/v1/getDeptDetails`, + REGISTER: `/api/user/registration/v1/register`, +} + +@Injectable({ + providedIn: 'root', +}) +export class SignupService { + + constructor(private http: HttpClient) { } + + getDepartments(): Observable { + return this.http.get(API_END_POINTS.GET_DEPARTMENTS) + } + + register(req: any) { + return this.http.post( + API_END_POINTS.REGISTER, req + ) + } +} diff --git a/src/app/routes/route-profile-v3.module.ts b/src/app/routes/route-profile-v3.module.ts new file mode 100644 index 000000000..6a6d9c167 --- /dev/null +++ b/src/app/routes/route-profile-v3.module.ts @@ -0,0 +1,9 @@ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { ProfileV3Module } from '@ws/app/src/lib/routes/profile-v3/profile-v3.module' +@NgModule({ + imports: [ + CommonModule, ProfileV3Module], + exports: [ProfileV3Module], +}) +export class RouteProfileV3Module { } diff --git a/src/app/services/init.service.ts b/src/app/services/init.service.ts index 9ef4a6eb9..8dabdbcd3 100755 --- a/src/app/services/init.service.ts +++ b/src/app/services/init.service.ts @@ -265,6 +265,7 @@ export class InitService { // TODO: set one org as default org :: use user preference this.configSvc.activeOrg = publicConfig.org[0] this.configSvc.appSetup = publicConfig.appSetup + this.configSvc.positions = publicConfig.positions return publicConfig } @@ -336,6 +337,8 @@ export class InitService { dealerCode: null, isManager: false, competencies: _.get(profileV2, 'competencies') || [], + systemTopics: _.get(profileV2, 'systemTopics') || [], + desiredTopics: _.get(profileV2, 'desiredTopics') || [], } if (!this.configSvc.nodebbUserProfile) { @@ -492,6 +495,7 @@ export class InitService { this.configSvc.org = publicConfig.org this.configSvc.portalUrls = publicConfig.portalUrls this.configSvc.activeOrg = publicConfig.org[0] + this.configSvc.positions = publicConfig.positions this.updateAppIndexMeta() return publicConfig } diff --git a/src/themes/_theme-mixins.scss b/src/themes/_theme-mixins.scss index 470e2f597..c56de7132 100755 --- a/src/themes/_theme-mixins.scss +++ b/src/themes/_theme-mixins.scss @@ -589,6 +589,10 @@ color: $colorOrange !important; } + .ws-mat-white-text { + color: $colorWhite !important; + } + .ws-mat-primary-border { border: 1px solid $colorPrimary; } From 8a995df09752616410e7001907ed689dc9b095d9 Mon Sep 17 00:00:00 2001 From: NandiniAV Date: Tue, 7 Jun 2022 14:12:24 +0530 Subject: [PATCH 02/15] Added level info tooltip --- .../competency-card.component.html | 13 +- .../competency-card.component.scss | 10 + .../competency-card.component.ts | 4 + .../level-card/level-card.component.html | 11 + .../level-card/level-card.component.scss | 206 ++++++++++++++++++ .../level-card/level-card.component.ts | 43 ++++ .../level-info/level-info.component.html | 7 + .../level-info/level-info.component.scss | 56 +++++ .../level-info/level-info.component.ts | 16 ++ .../directives/tooltip.directive.ts | 67 ++++++ .../routes/profile-v3/profile-v3.module.ts | 6 + 11 files changed, 436 insertions(+), 3 deletions(-) create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss create mode 100644 project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.ts create mode 100644 project/ws/app/src/lib/routes/profile-v3/directives/tooltip.directive.ts diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html index 2d393bd49..c95f48eed 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html @@ -26,11 +26,18 @@

{{ competency?.name}}

Select level

- + - + info_outlined + + +
+ +
+
+ -->
diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss index 25c091655..efc704859 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss @@ -194,3 +194,13 @@ a.level_item_active .mat-icon { } +[wsCompTooltipDirective] { + position: relative; +} + +.tooltip { + position: absolute; + opacity: 1; + z-index: 999; + padding: 5px; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts index a5071237a..9df9f5ee5 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts @@ -38,4 +38,8 @@ export class CompetencyCardComponent implements OnInit { this.selectedCompetency.emit(this.selectedCompList) } } + + newselectedCompetency(event: any) { + this.selectedCompetency.emit(event) + } } diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.html b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.html new file mode 100644 index 000000000..627d80d87 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.html @@ -0,0 +1,11 @@ + + {{competencyLevelData.name}} + info_outlined + + +
+ +
+
+
diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss new file mode 100644 index 000000000..efc704859 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss @@ -0,0 +1,206 @@ +@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; +} +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; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.ts new file mode 100644 index 000000000..7137aa4e0 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.ts @@ -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() + + 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) + } + } + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html new file mode 100644 index 000000000..821b2107d --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html @@ -0,0 +1,7 @@ + + +
{{complevel.name}}
+
{{complevel.description}}
+
+
+ diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss new file mode 100644 index 000000000..abb8a27a0 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss @@ -0,0 +1,56 @@ +@import 'ws-common'; +@import 'ws-vars'; +@import 'ws-mixins'; + +.card-container { + height: 338px; + width: 320px; + // border: 1px solid rgba(0, 0, 0, 8%); + border-radius: calc(#{$size-s}-#{$size-xs}); + padding: 0; + min-height: 338px; + min-width: 320px; +} + +.m-t-fix { + margin-top: calc(2* #{$size-m} + #{$size-xs}); +} + +.fixd { + position: absolute; + position: absolute; + display: flex; + left: 24px; + top: 31px; +} + +.photo-container { + background: #F8F4F9; + padding: $size-m 0; + min-height: 60px; +} + +.name-container { + padding: $size-m $size-l; +} + +.name { + text-transform: capitalize; +} + +.designation { + line-height: 21px; +} + +.action-container { + padding: $size-m 0; +} + +.m-margin { + margin-top: $size-xs; + // margin-bottom: $size-xs; +} + +.p-inherit { + position: inherit !important; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.ts new file mode 100644 index 000000000..fdace5c83 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.ts @@ -0,0 +1,16 @@ +import { Component, OnInit, Input } from '@angular/core' + +@Component({ + selector: 'ws-app-level-info', + templateUrl: './level-info.component.html', + styleUrls: ['./level-info.component.scss'], +}) +export class LevelInfoComponent implements OnInit { + @Input() complevel!: any + + constructor() { } + + ngOnInit() { + } + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/directives/tooltip.directive.ts b/project/ws/app/src/lib/routes/profile-v3/directives/tooltip.directive.ts new file mode 100644 index 000000000..32960c89b --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/directives/tooltip.directive.ts @@ -0,0 +1,67 @@ +import { + Input, + Renderer2, HostListener, + Directive, ElementRef, + TemplateRef, ViewContainerRef, + ContentChild, +} from '@angular/core' + +@Directive({ selector: '[wsCompTooltipDirective]' }) +export class CompTooltipDirective { + // private tooltipId!: string + constructor( + private renderer: Renderer2, + private elementRef: ElementRef, + private viewContainerRef: ViewContainerRef) { } + + @Input() parametroPlantilla!: TemplateRef + @Input() placement = 'top' + // @Input() close + @ContentChild('tooltipTemplate', { static: false }) + private tooltipTemplateRef!: TemplateRef + offset = 10 + @HostListener('mouseenter') onMouseEnter(): void { + const view = this.viewContainerRef.createEmbeddedView(this.tooltipTemplateRef) + view.rootNodes.forEach(node => + this.renderer.appendChild(this.elementRef.nativeElement, node)) + } + + @HostListener('mouseleave') onMouseLeave(): void { + if (this.viewContainerRef) { + this.viewContainerRef.clear() + } + } + + setPosition() { + const hostPos = this.elementRef.nativeElement.getBoundingClientRect() + const tooltipPos = this.tooltipTemplateRef.elementRef.nativeElement.getBoundingClientRect() + const scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 + + let top + let left + + if (this.placement === 'top') { + top = hostPos.top - tooltipPos.height - this.offset + left = hostPos.left + (hostPos.width - tooltipPos.width) / 2 + } + + if (this.placement === 'bottom') { + top = hostPos.bottom + this.offset + left = hostPos.left + (hostPos.width - tooltipPos.width) / 2 + } + + if (this.placement === 'left') { + top = hostPos.top + (hostPos.height - tooltipPos.height) / 2 + left = hostPos.left - tooltipPos.width - this.offset + } + + if (this.placement === 'right') { + top = hostPos.top + (hostPos.height - tooltipPos.height) / 2 + left = hostPos.right + this.offset + } + + // 스크롤이 발생한 경우, tooltip 요소의 top에 세로 스크롤 좌표값을 반영하여야 한다. + this.renderer.setStyle(this.tooltipTemplateRef, 'top', `${top + scrollPos}px`) + this.renderer.setStyle(this.tooltipTemplateRef, 'left', `${left}px`) + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts b/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts index a16250c2c..0934799fd 100644 --- a/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts +++ b/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts @@ -23,6 +23,9 @@ import { PlatformWalkthroughComponent } from './routes/platform-walkthrough/plat import { AddTopicDialogComponent } from './components/add-topic/add-topic.component' import { RolesAndActivitiesComponent } from './routes/roles-and-activities/roles-and-activities.component' import { RolesAndActivityService } from './services/rolesandActivities.service' +import { LevelCardComponent } from './components/level-card/level-card.component' +import { LevelInfoComponent } from './components/level-info/level-info.component' +import { CompTooltipDirective } from './directives/tooltip.directive' @NgModule({ declarations: [ @@ -37,6 +40,9 @@ import { RolesAndActivityService } from './services/rolesandActivities.service' // VideoWrapperComponent, AddTopicDialogComponent, RolesAndActivitiesComponent, + LevelCardComponent, + LevelInfoComponent, + CompTooltipDirective, ], imports: [ CommonModule, From 351a55e849d3bdbb8dfba1eb62874ac9bceb3223 Mon Sep 17 00:00:00 2001 From: nitin raj Date: Tue, 7 Jun 2022 14:42:15 +0530 Subject: [PATCH 03/15] tooltip resolved --- .../competency-card/competency-card.component.scss | 2 +- .../components/level-card/level-card.component.scss | 4 +++- .../components/level-info/level-info.component.html | 4 ++-- .../components/level-info/level-info.component.scss | 13 +++++++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss index efc704859..d29f5216c 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss @@ -113,7 +113,7 @@ .learn-card { // padding: 24px !important; - overflow: hidden; + // overflow: hidden; width: 100%; box-sizing: border-box; diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss index efc704859..21506734b 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss @@ -113,7 +113,7 @@ .learn-card { // padding: 24px !important; - overflow: hidden; + // overflow: hidden; width: 100%; box-sizing: border-box; @@ -203,4 +203,6 @@ a.level_item_active .mat-icon { opacity: 1; z-index: 999; padding: 5px; + top: 35px; + left: -10px; } diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html index 821b2107d..939453152 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html @@ -1,7 +1,7 @@ -
{{complevel.name}}
-
{{complevel.description}}
+
{{complevel.name}}
+
{{complevel.description}}
diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss index abb8a27a0..0fbee7672 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss @@ -3,13 +3,14 @@ @import 'ws-mixins'; .card-container { - height: 338px; + // height: 338px; width: 320px; // border: 1px solid rgba(0, 0, 0, 8%); border-radius: calc(#{$size-s}-#{$size-xs}); padding: 0; - min-height: 338px; + min-height: 200px; min-width: 320px; + text-align: center; } .m-t-fix { @@ -32,6 +33,7 @@ .name-container { padding: $size-m $size-l; + box-sizing: border-box; } .name { @@ -54,3 +56,10 @@ .p-inherit { position: inherit !important; } + +.title_text, .desc_text { + word-break: break-word; + white-space: initial; + text-overflow: ellipsis; + display: -webkit-box; +} From 8a5744ed6a8631ad824574a1fe8a8c1957c647b6 Mon Sep 17 00:00:00 2001 From: nitin raj Date: Tue, 7 Jun 2022 15:02:22 +0530 Subject: [PATCH 04/15] tooltip text and role title text change --- .../components/level-info/level-info.component.html | 4 ++-- .../components/level-info/level-info.component.scss | 3 +++ .../roles-and-activities/roles-and-activities.component.html | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html index 939453152..604f46c74 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html @@ -1,7 +1,7 @@ -
{{complevel.name}}
-
{{complevel.description}}
+
{{complevel.name}}
+
{{complevel.description}}
diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss index 0fbee7672..d5e3b941a 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss @@ -63,3 +63,6 @@ text-overflow: ellipsis; display: -webkit-box; } +.title_text { + color: rgba($color: #000000, $alpha: 0.4); +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.html index f6c82c450..bc50af68b 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.html @@ -56,7 +56,7 @@
- {{role.name}} +

{{role.name}}

From 862574561f153d0c057ede95c576e7368ca65181 Mon Sep 17 00:00:00 2001 From: nitin raj Date: Tue, 7 Jun 2022 15:31:54 +0530 Subject: [PATCH 05/15] competency card level css bug fix --- .../components/competency-card/competency-card.component.html | 2 +- .../profile-v3/components/level-card/level-card.component.html | 2 +- .../profile-v3/components/level-card/level-card.component.scss | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html index c95f48eed..d6278b6c1 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html @@ -25,7 +25,7 @@

{{ competency?.name}}

Select level

-
+
diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss index f041c5176..d29f5216c 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss @@ -113,7 +113,7 @@ .learn-card { // padding: 24px !important; - overflow: hidden; + // overflow: hidden; width: 100%; box-sizing: border-box; @@ -170,6 +170,7 @@ a.level_item { height: 40px; + line-height: 26px; padding:6px 12px; border-radius: 18px 18px; text-align: center; @@ -185,4 +186,21 @@ a.level_item_active { 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; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts index a5071237a..9df9f5ee5 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.ts @@ -38,4 +38,8 @@ export class CompetencyCardComponent implements OnInit { this.selectedCompetency.emit(this.selectedCompList) } } + + newselectedCompetency(event: any) { + this.selectedCompetency.emit(event) + } } diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.html b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.html new file mode 100644 index 000000000..e1392c9cc --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.html @@ -0,0 +1,11 @@ + + {{competencyLevelData.level}} + info_outlined + + +
+ +
+
+
diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss new file mode 100644 index 000000000..7c3fc8227 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.scss @@ -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; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.ts new file mode 100644 index 000000000..7137aa4e0 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-card/level-card.component.ts @@ -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() + + 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) + } + } + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html new file mode 100644 index 000000000..d54263a8c --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.html @@ -0,0 +1,8 @@ + + +
{{complevel.level}}
+
{{complevel.name}}
+
{{complevel.description}}
+
+
+ diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss new file mode 100644 index 000000000..d5e3b941a --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.scss @@ -0,0 +1,68 @@ +@import 'ws-common'; +@import 'ws-vars'; +@import 'ws-mixins'; + +.card-container { + // height: 338px; + width: 320px; + // border: 1px solid rgba(0, 0, 0, 8%); + border-radius: calc(#{$size-s}-#{$size-xs}); + padding: 0; + min-height: 200px; + min-width: 320px; + text-align: center; +} + +.m-t-fix { + margin-top: calc(2* #{$size-m} + #{$size-xs}); +} + +.fixd { + position: absolute; + position: absolute; + display: flex; + left: 24px; + top: 31px; +} + +.photo-container { + background: #F8F4F9; + padding: $size-m 0; + min-height: 60px; +} + +.name-container { + padding: $size-m $size-l; + box-sizing: border-box; +} + +.name { + text-transform: capitalize; +} + +.designation { + line-height: 21px; +} + +.action-container { + padding: $size-m 0; +} + +.m-margin { + margin-top: $size-xs; + // margin-bottom: $size-xs; +} + +.p-inherit { + position: inherit !important; +} + +.title_text, .desc_text { + word-break: break-word; + white-space: initial; + text-overflow: ellipsis; + display: -webkit-box; +} +.title_text { + color: rgba($color: #000000, $alpha: 0.4); +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.ts new file mode 100644 index 000000000..fdace5c83 --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/components/level-info/level-info.component.ts @@ -0,0 +1,16 @@ +import { Component, OnInit, Input } from '@angular/core' + +@Component({ + selector: 'ws-app-level-info', + templateUrl: './level-info.component.html', + styleUrls: ['./level-info.component.scss'], +}) +export class LevelInfoComponent implements OnInit { + @Input() complevel!: any + + constructor() { } + + ngOnInit() { + } + +} diff --git a/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.ts index b7a9cad37..ac90e5673 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.ts @@ -21,37 +21,37 @@ export class TopicCardComponent implements OnInit { clicked(top: NSProfileDataV3.ITopic | string) { this.topicService.autoSave.next(true) if (typeof (top) === 'object') { - const index = _.findIndex(this.topicService.getCurrentSelectedTopics, { identifier: top.identifier }) + const index = _.findIndex(this.topicService.getCurrentSelectedSysTopics, { identifier: top.identifier }) if (index !== -1) { /// remove from store - this.topicService.removeTopics(top) + this.topicService.removeSystemTopics(top) } else { /// add to store - this.topicService.addTopics(top) + this.topicService.addSystemTopics(top) } } else { - const index = _.findIndex(this.topicService.getCurrentSelectedTopics, { name: 'Added by you' }) - const cIndex = _.indexOf(this.topicService.getCurrentSelectedTopics[index].children, top) - if (cIndex !== -1) { + const index = _.indexOf(this.topicService.getCurrentSelectedDesTopics, top) + // const cIndex = _.indexOf(this.topicService.getCurrentSelectedTopics[index].children, top) + if (index !== -1) { /// remove from store - this.topicService.removeTopicsAddedByYou(top) + this.topicService.removeDesiredTopics(top) } else { /// add to store - this.topicService.addTopicsAddedByYou(top) + this.topicService.addDesiredTopics(top) } } } - isSelected(top: NSProfileDataV3.ITopic): boolean { + isSelected(top: NSProfileDataV3.ITopic | string): boolean { if (top) { - if (!top.identifier) { - const index = _.indexOf(this.topicService.getCurrentSelectedTopics, top) + if (typeof (top) !== 'object') { + const index = _.indexOf(this.topicService.getCurrentSelectedDesTopics, top) if (index === -1) { return false } return true } - const index1 = _.findIndex(this.topicService.getCurrentSelectedTopics, { identifier: top.identifier }) + const index1 = _.findIndex(this.topicService.getCurrentSelectedSysTopics, { identifier: top.identifier }) if (index1 === -1) { return false } diff --git a/project/ws/app/src/lib/routes/profile-v3/directives/tooltip.directive.ts b/project/ws/app/src/lib/routes/profile-v3/directives/tooltip.directive.ts new file mode 100644 index 000000000..32960c89b --- /dev/null +++ b/project/ws/app/src/lib/routes/profile-v3/directives/tooltip.directive.ts @@ -0,0 +1,67 @@ +import { + Input, + Renderer2, HostListener, + Directive, ElementRef, + TemplateRef, ViewContainerRef, + ContentChild, +} from '@angular/core' + +@Directive({ selector: '[wsCompTooltipDirective]' }) +export class CompTooltipDirective { + // private tooltipId!: string + constructor( + private renderer: Renderer2, + private elementRef: ElementRef, + private viewContainerRef: ViewContainerRef) { } + + @Input() parametroPlantilla!: TemplateRef + @Input() placement = 'top' + // @Input() close + @ContentChild('tooltipTemplate', { static: false }) + private tooltipTemplateRef!: TemplateRef + offset = 10 + @HostListener('mouseenter') onMouseEnter(): void { + const view = this.viewContainerRef.createEmbeddedView(this.tooltipTemplateRef) + view.rootNodes.forEach(node => + this.renderer.appendChild(this.elementRef.nativeElement, node)) + } + + @HostListener('mouseleave') onMouseLeave(): void { + if (this.viewContainerRef) { + this.viewContainerRef.clear() + } + } + + setPosition() { + const hostPos = this.elementRef.nativeElement.getBoundingClientRect() + const tooltipPos = this.tooltipTemplateRef.elementRef.nativeElement.getBoundingClientRect() + const scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 + + let top + let left + + if (this.placement === 'top') { + top = hostPos.top - tooltipPos.height - this.offset + left = hostPos.left + (hostPos.width - tooltipPos.width) / 2 + } + + if (this.placement === 'bottom') { + top = hostPos.bottom + this.offset + left = hostPos.left + (hostPos.width - tooltipPos.width) / 2 + } + + if (this.placement === 'left') { + top = hostPos.top + (hostPos.height - tooltipPos.height) / 2 + left = hostPos.left - tooltipPos.width - this.offset + } + + if (this.placement === 'right') { + top = hostPos.top + (hostPos.height - tooltipPos.height) / 2 + left = hostPos.right + this.offset + } + + // 스크롤이 발생한 경우, tooltip 요소의 top에 세로 스크롤 좌표값을 반영하여야 한다. + this.renderer.setStyle(this.tooltipTemplateRef, 'top', `${top + scrollPos}px`) + this.renderer.setStyle(this.tooltipTemplateRef, 'left', `${left}px`) + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts b/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts index a16250c2c..fc6c61d7f 100644 --- a/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts +++ b/project/ws/app/src/lib/routes/profile-v3/profile-v3.module.ts @@ -23,6 +23,9 @@ import { PlatformWalkthroughComponent } from './routes/platform-walkthrough/plat import { AddTopicDialogComponent } from './components/add-topic/add-topic.component' import { RolesAndActivitiesComponent } from './routes/roles-and-activities/roles-and-activities.component' import { RolesAndActivityService } from './services/rolesandActivities.service' +import { LevelCardComponent } from './components/level-card/level-card.component' +import { LevelInfoComponent } from './components/level-info/level-info.component' +import { CompTooltipDirective } from './directives/tooltip.directive' @NgModule({ declarations: [ @@ -37,6 +40,9 @@ import { RolesAndActivityService } from './services/rolesandActivities.service' // VideoWrapperComponent, AddTopicDialogComponent, RolesAndActivitiesComponent, + LevelCardComponent, + LevelInfoComponent, + CompTooltipDirective, ], imports: [ CommonModule, @@ -47,16 +53,13 @@ import { RolesAndActivityService } from './services/rolesandActivities.service' RouterModule, MatButtonModule, ProfileV3RoutingModule, - ReactiveFormsModule, FormsModule, - MatFormFieldModule, MatCheckboxModule, PipeFilterV2Module, MatInputModule, TreeCatalogModule, MatSnackBarModule, MatDialogModule, - MatInputModule, MatFormFieldModule, ReactiveFormsModule, BrowseByCompetencyModule, diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html index 7a65b5b8a..72d423d41 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html @@ -1,4 +1,4 @@ -

Popular competencies

+

Self-Attested Competencies

- +
-
+
- + + formControlName="roleName" class="flex flex-1" />
- - + @@ -35,8 +35,8 @@ cancel - @@ -56,7 +56,7 @@
- {{role.name}} +

{{role.name}}

diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.scss index 840e816c3..92d43f597 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.scss @@ -3,16 +3,23 @@ .role-card { width: 100%; } -.form_field { - width: 400px; -} +// .form_field { +// // width: 400px; +// } .mat-card { box-sizing: border-box; } -.mat-input-wrapper{ - width:400px !important; - } - +// .mat-input-wrapper{ +// // width:400px !important; +// } +::ng-deep.mat-form-field-wrapper{ + flex: 1; +} +::ng-deep.mat-chip-input{ + width: auto !important; + min-width: 100%; + flex: 1; +} .activity_span { padding:6px 10px; border-radius: 18px 18px; diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.ts index 6e84a834e..86a8b1aa3 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/routes/roles-and-activities/roles-and-activities.component.ts @@ -13,8 +13,8 @@ import { RolesAndActivityService } from '../../services/rolesandActivities.servi templateUrl: './roles-and-activities.component.html', styleUrls: ['./roles-and-activities.component.scss'], /* tslint:disable */ - host: { class: 'w-100 role-card flex flex-1' }, - /* tslint:enable */ + host: { class: 'w-100 role-card flex flex-1' }, + /* tslint:enable */ }) export class RolesAndActivitiesComponent implements OnInit, OnDestroy { createRole!: FormGroup @@ -49,7 +49,7 @@ export class RolesAndActivitiesComponent implements OnInit, OnDestroy { } create() { const role = this.createRole.get('roleName') - if (role && this.selectedActivity && this.configSvc.userProfile) { + if (role && role.value && this.selectedActivity.length > 0 && this.configSvc.userProfile) { // console.log(this.createRole.value, this.selectedActivity) const reqObj = { request: { @@ -66,11 +66,22 @@ export class RolesAndActivitiesComponent implements OnInit, OnDestroy { this.rolesAndActivityService.createRoles(reqObj).subscribe(res => { if (res) { this.snackBar.open('updated Successfully!!') + this.userRoles.push({ + id: role.value, + description: role.value, + name: role.value, + activities: _.map(this.selectedActivity, a => { + return { name: a } as NSProfileDataV3.IRolesActivity + }), + }) this.createRole.reset() + this.selectedActivity = [] this.configSvc.updateGlobalProfile(true) setTimeout(this.updateRoles, 3000) } }) + } else { + this.snackBar.open('Role and Activities both are required.') } } addActivity(event: MatChipInputEvent) { diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html index 6adf21014..345e77c20 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html @@ -9,8 +9,8 @@ Not finding a topic of your interest?
- - + + diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.ts index bc905bea0..f90700732 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.ts @@ -17,8 +17,10 @@ import { TopicService } from '../../services/topics.service' export class TopicComponent implements OnInit, OnDestroy { topics!: NSProfileDataV3.ITopic[] + desiredTopics!: string[] addedByYou!: NSProfileDataV3.ITopic - private topicUpdateSubscription: Subscription | null = null + private desTopicUpdateSubscription: Subscription | null = null + private sysTopicUpdateSubscription: Subscription | null = null constructor( private aRoute: ActivatedRoute, private dialog: MatDialog, @@ -28,45 +30,54 @@ export class TopicComponent implements OnInit, OnDestroy { ) { this.loadTopics() - if (this.topicUpdateSubscription) { - this.topicUpdateSubscription.unsubscribe() + this.updateInitValues() + if (this.desTopicUpdateSubscription) { + this.desTopicUpdateSubscription.unsubscribe() } - this.topicUpdateSubscription = this.topicService.selectedTopics + if (this.sysTopicUpdateSubscription) { + this.sysTopicUpdateSubscription.unsubscribe() + } + } + ngOnDestroy(): void { + if (this.desTopicUpdateSubscription) { + this.desTopicUpdateSubscription.unsubscribe() + } + if (this.sysTopicUpdateSubscription) { + this.sysTopicUpdateSubscription.unsubscribe() + } + } + + ngOnInit() { + this.sysTopicUpdateSubscription = this.topicService.systemTopics .subscribe(data => { if (this.topicService.autoSave.value) { - let desiredTopic: NSProfileDataV3.ITopic[] = [] const systemTopic: NSProfileDataV3.ITopic[] = [] _.each(data, topic => { - if (topic.identifier) { - systemTopic.push(topic) - } else { - desiredTopic = topic.children - } + systemTopic.push(topic) }) - - if (desiredTopic.length > 0) { - this.saveDesiredTopic(_.compact(desiredTopic) || []) - } - if (systemTopic.length > 0) { + if (systemTopic.length >= 0) { this.saveSystemTopic(_.compact(systemTopic) || []) } } }) - } - ngOnDestroy(): void { - if (this.topicUpdateSubscription) { - this.topicUpdateSubscription.unsubscribe() - } - } + this.desTopicUpdateSubscription = this.topicService.desiredTopics + .subscribe(data => { + if (this.topicService.autoSave.value) { + const desiredTopic: string[] = [] + _.each(data, topic => { + desiredTopic.push(topic) + }) + if (desiredTopic.length >= 0) { + this.saveDesiredTopic(_.compact(desiredTopic) || []) + this.desiredTopics = (_.compact(desiredTopic) || []) + } + } + }) - ngOnInit() { - // console.log(this.configSvc.unMappedUser.profileDetails.desiredTopics) - // console.log(this.configSvc.unMappedUser.profileDetails.systemTopics) - const desiredTopics = _.get(this.configSvc.unMappedUser, 'profileDetails.desiredTopics') - const systemTopics = _.get(this.configSvc.unMappedUser, 'profileDetails.systemTopics') - this.topicService.autoSave.next(false) + } + get desiredTopicsTemplate() { this.addedByYou = { - children: desiredTopics || [], + children: this.desiredTopics || [], code: '', description: '', identifier: '', @@ -75,8 +86,20 @@ export class TopicComponent implements OnInit, OnDestroy { noOfHoursConsumed: 0, status: '', } + return this.addedByYou + } + updateInitValues() { + // console.log(this.configSvc.unMappedUser.profileDetails.desiredTopics) + // console.log(this.configSvc.unMappedUser.profileDetails.systemTopics) + const desiredTopics = _.get(this.configSvc.unMappedUser, 'profileDetails.desiredTopics') || [] + const systemTopics = _.get(this.configSvc.unMappedUser, 'profileDetails.systemTopics') || [] + this.topicService.autoSave.next(false) if (systemTopics) { - this.topicService.addInitTopics([...systemTopics, this.addedByYou]) + this.topicService.addInitSystemTopics([...systemTopics]) + } + if (desiredTopics) { + this.topicService.addInitDesiredTopics([...desiredTopics]) + this.desiredTopics = [...desiredTopics] } } loadTopics() { @@ -98,7 +121,7 @@ export class TopicComponent implements OnInit, OnDestroy { if (response) { // this.addedByYou.children.push(response) this.topicService.autoSave.next(true) - this.topicService.addTopicsAddedByYou(response) + this.topicService.addDesiredTopics(response) } } }) @@ -116,6 +139,7 @@ export class TopicComponent implements OnInit, OnDestroy { } this.topicService.saveDesiredTopic(reqObj).subscribe(res => { if (res) { + this.configSvc.updateGlobalProfile(true) this.snackBar.open('Updated!') } }) @@ -140,6 +164,7 @@ export class TopicComponent implements OnInit, OnDestroy { } this.topicService.saveSystemTopic(reqObj).subscribe(res => { if (res) { + this.configSvc.updateGlobalProfile(true) this.snackBar.open('Updated!') } }) diff --git a/project/ws/app/src/lib/routes/profile-v3/services/topics.service.ts b/project/ws/app/src/lib/routes/profile-v3/services/topics.service.ts index dc74d6699..8597556b3 100644 --- a/project/ws/app/src/lib/routes/profile-v3/services/topics.service.ts +++ b/project/ws/app/src/lib/routes/profile-v3/services/topics.service.ts @@ -13,7 +13,8 @@ const API_END_POINTS = { providedIn: 'root', }) export class TopicService { - public selectedTopics = new BehaviorSubject([]) + public systemTopics = new BehaviorSubject([]) + public desiredTopics = new BehaviorSubject([]) public autoSave = new BehaviorSubject(false) constructor( private http: HttpClient) { @@ -21,46 +22,70 @@ export class TopicService { loadTopics(): Observable { return this.http.get(API_END_POINTS.getTopics) } - addTopics(topic: NSProfileDataV3.ITopic) { - const topics = this.selectedTopics.value + addSystemTopics(topic: NSProfileDataV3.ITopic) { + const topics = this.systemTopics.value topics.push(topic) - this.selectedTopics.next(topics) + this.systemTopics.next(topics) + } + addDesiredTopics(topic: string) { + const topics = this.desiredTopics.value + topics.push(topic) + this.desiredTopics.next(topics) } /** * this method will fill all already added topics from users Profile. * @param topics */ - addInitTopics(topics: NSProfileDataV3.ITopic[]) { - this.selectedTopics.next(topics) + addInitSystemTopics(topics: NSProfileDataV3.ITopic[]) { + this.systemTopics.next(topics) + } + addInitDesiredTopics(topics: string[]) { + this.desiredTopics.next(topics) } - removeTopics(topic: NSProfileDataV3.ITopic) { - const topics = this.selectedTopics.value || [] + removeSystemTopics(topic: NSProfileDataV3.ITopic) { + const topics = this.systemTopics.value || [] if (topic.identifier) { const index = _.findIndex(topics, { identifier: topic.identifier }) - topics.splice(index, 1) + if (index !== -1) { + topics.splice(index, 1) + } } - this.selectedTopics.next(topics) + this.systemTopics.next(topics) } - removeTopicsAddedByYou(topic: string) { - const topics = this.selectedTopics.value || [] - if (topic) { - const index = _.findIndex(topics, { name: 'Added by you' }) - const cIdx = _.indexOf(topics[index].children, topic) - topics[index].children.splice(cIdx, 1) + removeDesiredTopics(topic: string) { + const topics = this.desiredTopics.value || [] + const index = _.indexOf(topics, topic) + if (index !== -1) { + topics.splice(index, 1) + this.desiredTopics.next(topics) } - this.selectedTopics.next(topics) } - addTopicsAddedByYou(topic: string) { - const topics = this.selectedTopics.value || [] - if (topic) { - const index = _.findIndex(topics, { name: 'Added by you' }) - topics[index].children.push(topic) + // removeDesiredTopics(topic: string) { + // const topics = this.desiredTopics.value || [] + // if (topic) { + // const index = _.findIndex(topics,'Added by you') + // const cIdx = _.indexOf(topics, topic) + // topics[index].children.splice(cIdx, 1) + // } + // this.selectedTopics.next(topics) + // } + // addTopicsAddedByYou(topic: string) { + // const topics = this.selectedTopics.value || [] + // if (topic) { + // const index = _.findIndex(topics, { name: 'Added by you' }) + // topics[index].children.push(topic) + // } + // this.selectedTopics.next(topics) + // } + get getCurrentSelectedDesTopics(): string[] | [] { + if (this.desiredTopics.value) { + return this.desiredTopics.value } - this.selectedTopics.next(topics) + return [] } - get getCurrentSelectedTopics(): NSProfileDataV3.ITopic[] | [] { - if (this.selectedTopics.value) { - return this.selectedTopics.value + get getCurrentSelectedSysTopics(): NSProfileDataV3.ITopic[] | [] { + if (this.systemTopics.value) { + return this.systemTopics.value } return [] } diff --git a/src/app/component/app-nav-bar/app-nav-bar.component.html b/src/app/component/app-nav-bar/app-nav-bar.component.html index 418e0b8f9..922d4f5ce 100755 --- a/src/app/component/app-nav-bar/app-nav-bar.component.html +++ b/src/app/component/app-nav-bar/app-nav-bar.component.html @@ -78,10 +78,13 @@
--> -
--> -
+
@@ -22,7 +22,7 @@

Learn. Network. Grow your career.

Sign In Register --> - Sign In +
@@ -79,21 +79,21 @@

How does the platform enable you
-
-
+ +
video presentation
-
+
-
-
+
+
video presentation
-
+
@@ -102,6 +102,8 @@

How does the platform enable you + +

diff --git a/src/app/routes/public/public-signup/public-signup.component.html b/src/app/routes/public/public-signup/public-signup.component.html index c0862b7f1..d065d5ca6 100644 --- a/src/app/routes/public/public-signup/public-signup.component.html +++ b/src/app/routes/public/public-signup/public-signup.component.html @@ -1,6 +1,6 @@
-
+
logo
@@ -34,14 +34,14 @@
-->
-
+
diff --git a/src/app/routes/public/public-signup/public-signup.component.scss b/src/app/routes/public/public-signup/public-signup.component.scss index 3a2e8660d..69ad55b35 100644 --- a/src/app/routes/public/public-signup/public-signup.component.scss +++ b/src/app/routes/public/public-signup/public-signup.component.scss @@ -89,9 +89,9 @@ // background-image : url(assets/instances/eagle/banners/home/9/Login_background.png) no-repeat center center fixed; // } - ::ng-deep .top-nav-bar { - display: none; - } + // ::ng-deep .top-nav-bar { + // display: none; + // } ::ng-deep .height-on-top { padding-top: 0!important; @@ -515,7 +515,7 @@ ::ng-deep .mat-form-field-infix { padding: 0; - margin: 16px 0 0 0; + margin: 9px 0 0 0; border: none; } } diff --git a/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.ts b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.ts index f73920786..57256e996 100644 --- a/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.ts +++ b/src/app/routes/public/public-signup/signup-success-dialogue/signup-success-dialogue/signup-success-dialogue.component.ts @@ -19,7 +19,7 @@ export class SignupSuccessDialogueComponent implements OnInit { closeDialog() { this.dialogRef.close() - this.router.navigate(['/public/logout']) + this.router.navigate(['/public/home']) } } diff --git a/src/app/services/app-interceptor.service.ts b/src/app/services/app-interceptor.service.ts index f5930e152..6d7f34452 100755 --- a/src/app/services/app-interceptor.service.ts +++ b/src/app/services/app-interceptor.service.ts @@ -87,8 +87,8 @@ export class AppInterceptorService implements HttpInterceptor { // // tslint:disable-next-line: prefer-template // window.location.href = error.error.redirectUrl + `?q=${pageName} ` // } - // window.location.href = '/apis/reset' - this.authSvc.force_logout() + window.location.href = '/public/home' + // this.authSvc.force_logout() break } } diff --git a/src/app/services/init.service.ts b/src/app/services/init.service.ts index 8dabdbcd3..395e9d2d2 100755 --- a/src/app/services/init.service.ts +++ b/src/app/services/init.service.ts @@ -440,6 +440,8 @@ export class InitService { dealerCode: null, isManager: false, competencies: _.get(profileV2, 'competencies') || [], + systemTopics: _.get(profileV2, 'systemTopics') || [], + desiredTopics: _.get(profileV2, 'desiredTopics') || [], } if (!this.configSvc.nodebbUserProfile) { From 5e918ed81b1e164d8282f9dadaceea6a6bae37e9 Mon Sep 17 00:00:00 2001 From: nitin raj Date: Wed, 8 Jun 2022 11:58:36 +0530 Subject: [PATCH 12/15] some responsive css added --- .../topic-card/topic-card.component.scss | 2 +- .../public-home/public-home.component.html | 2 +- .../public-home/public-home.component.scss | 39 ++++++++++++++++++- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.scss index 0fb869e55..5af6a381b 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/components/topic-card/topic-card.component.scss @@ -3,7 +3,7 @@ padding: 8px 12px; box-sizing: border-box; border: 1px solid; - min-width: 200px; + min-width: 90px; cursor: pointer; } // .topic_tag_link.tag_link_active { diff --git a/src/app/routes/public/public-home/public-home.component.html b/src/app/routes/public/public-home/public-home.component.html index f07c7b73b..7185619e9 100644 --- a/src/app/routes/public/public-home/public-home.component.html +++ b/src/app/routes/public/public-home/public-home.component.html @@ -35,7 +35,7 @@

Learn. Network. Grow your career.

Learn and network with civil servants and subject matter experts across India

-
+
icon
diff --git a/src/app/routes/public/public-home/public-home.component.scss b/src/app/routes/public/public-home/public-home.component.scss index cda22e0ee..7dda2d878 100644 --- a/src/app/routes/public/public-home/public-home.component.scss +++ b/src/app/routes/public/public-home/public-home.component.scss @@ -218,14 +218,34 @@ width: 100%; background-color: #fff; background-size: 100% 85%; + box-sizing: border-box; + @include breakpoint-xs { + padding-left: 1rem; + padding-right: 1rem; + } + @include breakpoint-s { + padding-left: 1rem; + padding-right: 1rem; + } } .main-section .mainContent { padding-top: 6.9375rem; padding-bottom: 5.25rem; + @include breakpoint-xs { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + .content { - padding:0px 15px; + padding:0px 1rem; box-sizing: border-box; + + @include breakpoint-xs { + padding: 0; + } + @include breakpoint-s { + padding: 0; + } } } h1, h2, h3, h4, h5, h6, @@ -263,7 +283,13 @@ background-color: #ffffff; border-radius: 1rem; padding: 3rem; - box-shadow: 0 1px 5px rgba(0, 0, 0, .1) + box-shadow: 0 1px 5px rgba(0, 0, 0, .1); + + .recordBox { + @include breakpoint-xs { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + } } .analyticsRecord .listInfo { text-align: center; @@ -363,6 +389,15 @@ position: relative; z-index: -1; padding-top: 145px; */ + + @include breakpoint-xs { + padding-left: 1rem; + padding-right: 1rem; + } + @include breakpoint-s { + padding-left: 1rem; + padding-right: 1rem; + } } .servicesSection .servicesTab { text-align: center; From 2c984e7abdd5535093976ebb72bd7e1455ef15e6 Mon Sep 17 00:00:00 2001 From: NandiniAV Date: Wed, 8 Jun 2022 15:19:42 +0530 Subject: [PATCH 13/15] Updated competency listing --- .../src/lib/services/configurations.model.ts | 1 + .../current-competencies.component.ts | 30 +++++++++++++------ .../desired-competencies.component.ts | 24 ++++++++++----- src/app/services/init.service.ts | 2 ++ 4 files changed, 40 insertions(+), 17 deletions(-) diff --git a/library/ws-widget/utils/src/lib/services/configurations.model.ts b/library/ws-widget/utils/src/lib/services/configurations.model.ts index c9a6731e1..235160333 100644 --- a/library/ws-widget/utils/src/lib/services/configurations.model.ts +++ b/library/ws-widget/utils/src/lib/services/configurations.model.ts @@ -268,6 +268,7 @@ export namespace NsUser { competencies?: any systemTopics?: any desiredTopics?: any + desiredCompetencies?: any } export interface INodebbUserProfile { diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts index 770d60409..d4f55ccda 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts @@ -2,7 +2,9 @@ import { Component, OnInit } from '@angular/core' import { ProfileV3Service } from '../../services/profile_v3.service' import { NSProfileDataV3 } from '../../models/profile-v3.models' import { ConfigurationsService } from '@sunbird-cb/utils/src/public-api' -import * as _ from 'lodash' +// tslint:disable-next-line +import _ from 'lodash' + @Component({ selector: 'ws-app-current-competencies', templateUrl: './current-competencies.component.html', @@ -13,7 +15,7 @@ export class CurrentCompetenciesComponent implements OnInit { allCompetencies: any = [] overallCompetencies!: NSProfileDataV3.ICompetencie[] changedProperties: any = {} - userDetails: any + // userDetails: any updatecompList: any = [] competenciesList: any = [] @@ -24,13 +26,23 @@ export class CurrentCompetenciesComponent implements OnInit { } getUserDetails() { - if (this.configService.unMappedUser && this.configService.unMappedUser.id) { - this.competencySvc.getUserdetailsFromRegistry(this.configService.unMappedUser.id).subscribe( - (data: any) => { - this.userDetails = data - this.competenciesList = data.profileDetails.competencies - this.getCompetencies() - }) + // if (this.configService.unMappedUser && this.configService.unMappedUser.id) { + // this.competencySvc.getUserdetailsFromRegistry(this.configService.unMappedUser.id).subscribe( + // (data: any) => { + // this.userDetails = data + // this.competenciesList = data.profileDetails.competencies + // if (this.overallCompetencies && this.overallCompetencies.length > 0) { + // this.getCompLsit() + // } else { + // this.getCompetencies() + // } + // }) + // } + this.competenciesList = _.get(this.configService.unMappedUser, 'profileDetails.desiredCompetencies') || [] + if (this.overallCompetencies && this.overallCompetencies.length > 0) { + this.getCompLsit() + } else { + this.getCompetencies() } } diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts index f2a80c658..51884d8b1 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts @@ -2,6 +2,8 @@ import { Component, OnInit } from '@angular/core' import { ProfileV3Service } from '../../services/profile_v3.service' import { NSProfileDataV3 } from '../../models/profile-v3.models' import { ConfigurationsService } from '@sunbird-cb/utils/src/public-api' +// tslint:disable-next-line +import _ from 'lodash' @Component({ selector: 'ws-app-desired-competencies', @@ -12,7 +14,7 @@ export class DesiredCompetenciesComponent implements OnInit { searchJson!: NSProfileDataV3.ISearch[] allCompetencies: any = [] changedProperties: any = {} - userDetails: any + // userDetails: any updatecompList: any = [] overallCompetencies!: NSProfileDataV3.ICompetencie[] desiredcompList: any = [] @@ -24,13 +26,19 @@ export class DesiredCompetenciesComponent implements OnInit { } getUserDetails() { - if (this.configService.unMappedUser && this.configService.unMappedUser.id) { - this.competencySvc.getUserdetailsFromRegistry(this.configService.unMappedUser.id).subscribe( - (data: any) => { - this.userDetails = data - this.desiredcompList = data.profileDetails.desiredCompetencies - this.getCompetencies() - }) + // if (this.configService.unMappedUser && this.configService.unMappedUser.id) { + // this.competencySvc.getUserdetailsFromRegistry(this.configService.unMappedUser.id).subscribe( + // (data: any) => { + // this.userDetails = data + // this.desiredcompList = data.profileDetails.desiredCompetencies + // this.getCompetencies() + // }) + // } + this.desiredcompList = _.get(this.configService.unMappedUser, 'profileDetails.desiredCompetencies') || [] + if (this.overallCompetencies && this.overallCompetencies.length > 0) { + this.getCompLsit() + } else { + this.getCompetencies() } } diff --git a/src/app/services/init.service.ts b/src/app/services/init.service.ts index 395e9d2d2..4b31bdea3 100755 --- a/src/app/services/init.service.ts +++ b/src/app/services/init.service.ts @@ -337,6 +337,7 @@ export class InitService { dealerCode: null, isManager: false, competencies: _.get(profileV2, 'competencies') || [], + desiredCompetencies: _.get(profileV2, 'desiredCompetencies') || [], systemTopics: _.get(profileV2, 'systemTopics') || [], desiredTopics: _.get(profileV2, 'desiredTopics') || [], } @@ -440,6 +441,7 @@ export class InitService { dealerCode: null, isManager: false, competencies: _.get(profileV2, 'competencies') || [], + desiredCompetencies: _.get(profileV2, 'desiredCompetencies') || [], systemTopics: _.get(profileV2, 'systemTopics') || [], desiredTopics: _.get(profileV2, 'desiredTopics') || [], } From 06b662149f6f59a634ba22373f12d63b5cec1e2d Mon Sep 17 00:00:00 2001 From: nitin raj Date: Wed, 8 Jun 2022 16:30:13 +0530 Subject: [PATCH 14/15] responsive code --- .../competency-card.component.html | 80 +++---- .../competency-card.component.scss | 4 - .../current-competencies.component.html | 13 +- .../current-competencies.component.scss | 17 +- .../current-competencies.component.ts | 3 + .../desired-competencies.component.html | 4 +- .../desired-competencies.component.scss | 8 + .../desired-competencies.component.ts | 3 + .../platform-walkthrough.component.html | 4 +- .../platform-walkthrough.component.scss | 14 ++ .../profile-home/profile-home.component.html | 18 +- .../profile-home/profile-home.component.scss | 61 ++++- .../routes/topics/topic.component.html | 4 +- .../routes/topics/topic.component.scss | 15 ++ .../public-home/public-home.component.html | 25 +- .../public-home/public-home.component.scss | 214 ++++++------------ 16 files changed, 275 insertions(+), 212 deletions(-) diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html index d6278b6c1..28afe3d60 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.html @@ -1,45 +1,47 @@ - -
- -
-
- diff --git a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss index d29f5216c..0c4ab367d 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/components/competency-card/competency-card.component.scss @@ -112,8 +112,6 @@ } .learn-card { - // padding: 24px !important; - // overflow: hidden; width: 100%; box-sizing: border-box; @@ -126,9 +124,7 @@ } .card_inner_title_box { - // display: column; width: 220px; - // padding: 24px; box-sizing: border-box; @media (max-width: 768px) { diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html index 72d423d41..aed7bb1e0 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.html @@ -1,13 +1,6 @@ -

Self-Attested Competencies

+
- +

Self-Attested Competencies

+
diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.scss index d54d284d9..36ecc7119 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.scss @@ -1,10 +1,25 @@ +@import 'ws-common'; +@import 'ws-vars'; +@import 'ws-mixins'; +::ng-deep .comptency_main_div { + width: 100%; +} + +.main_title_text { + @include breakpoint-xs { + margin-top: 0.5rem; + } + @include breakpoint-s { + margin-top: 0.5rem; + } +} .left_card_box { // width: 890px; width: 75%; float: left; - @media (max-width:992px) { + @include breakpoint-m { width:100%; } diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts index 770d60409..81cf7e3f8 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/routes/current-competencies/current-competencies.component.ts @@ -7,6 +7,9 @@ import * as _ from 'lodash' selector: 'ws-app-current-competencies', templateUrl: './current-competencies.component.html', styleUrls: ['./current-competencies.component.scss'], + /* tslint:disable */ + host: { class: 'flex flex-1 comptency_main_div' }, + /* tslint:enable */ }) export class CurrentCompetenciesComponent implements OnInit { searchJson!: NSProfileDataV3.ISearch[] diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.html index 5f5188173..fbe6e4146 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.html @@ -1,3 +1,5 @@ -

Desired competencies

+
+

Desired competencies

+
diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.scss index e69de29bb..a80836aa6 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.scss @@ -0,0 +1,8 @@ + +@import 'ws-common'; +@import 'ws-vars'; +@import 'ws-mixins'; + +::ng-deep .comptency_main_div { + width: 100%; +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts index f2a80c658..cf8bf74a1 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/routes/desired-competencies/desired-competencies.component.ts @@ -7,6 +7,9 @@ import { ConfigurationsService } from '@sunbird-cb/utils/src/public-api' selector: 'ws-app-desired-competencies', templateUrl: './desired-competencies.component.html', styleUrls: ['./desired-competencies.component.scss'], + /* tslint:disable */ + host: { class: 'flex flex-1 comptency_main_div' }, + /* tslint:enable */ }) export class DesiredCompetenciesComponent implements OnInit { searchJson!: NSProfileDataV3.ISearch[] diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.html index 45c8a8584..6cfcacd9f 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/routes/platform-walkthrough/platform-walkthrough.component.html @@ -1,3 +1,5 @@ -
diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.scss index ad939f395..40f549c72 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.scss @@ -8,14 +8,28 @@ // min-height: 400px; min-height: calc(100vh - 160px); - @media (max-width:1024px) { - padding:0px 8px; + @include breakpoint-xs { + padding: 0 1rem; + flex-direction: column; + } + @include breakpoint-s { + padding: 0 1rem; + flex-direction: column; } + } .container-balanced-banner { @extend %page-center; height: auto; + @include breakpoint-xs { + padding: 0 1rem; + flex-direction: column; + } + @include breakpoint-s { + padding: 0 1rem; + flex-direction: column; + } } a.skip_link { @@ -26,6 +40,14 @@ a.skip_link { height: 40px; box-sizing: border-box; cursor: pointer; + + @include breakpoint-xs { + margin-top: 0.5rem; + // margin-bottom: 0.5rem; + } + @include breakpoint-s { + margin-top: 0.5rem; + } } a.next_link { @@ -38,6 +60,10 @@ a.next_link { height: 40px; box-sizing: border-box; cursor: pointer; + // @include breakpoint-xs { + // margin-top: 0.5rem; + // margin-bottom: 0.5rem; + // } } .footer_box { @@ -48,6 +74,25 @@ a.next_link { padding: 24px 155px; z-index: 99; box-sizing: border-box; + + @include breakpoint-xs { + padding: 12px 12px; + flex-direction: column; + } + @include breakpoint-s { + padding: 12px 25px; + } + + + +} +.comptency_main_div { + width: 100%; +} +.footer_text { + @include breakpoint-xs { + margin:0.5rem auto!important; + } } // .container-balanced-updated { @@ -123,6 +168,12 @@ a.next_link { // } // } -// .knowledge_box_full { -// overflow: hidden; -// } +.knowledge_box_full { + @include breakpoint-xs { + margin-left: 0!important; + } + + @include breakpoint-s { + margin-left: 0!important; + } +} diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html index 345e77c20..b6b183045 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.html @@ -1,6 +1,6 @@ diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.scss b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.scss index e69de29bb..85fe9f8ad 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.scss +++ b/project/ws/app/src/lib/routes/profile-v3/routes/topics/topic.component.scss @@ -0,0 +1,15 @@ + +@import 'ws-common'; +@import 'ws-vars'; +@import 'ws-mixins'; + + +.topicMainTitle { + @include breakpoint-xs { + margin:1rem auto; + } +} + +.mat-button { + min-width: auto!important; +} diff --git a/src/app/routes/public/public-home/public-home.component.html b/src/app/routes/public/public-home/public-home.component.html index 7185619e9..7ec7350b2 100644 --- a/src/app/routes/public/public-home/public-home.component.html +++ b/src/app/routes/public/public-home/public-home.component.html @@ -81,7 +81,13 @@

How does the platform enable you
-
video presentation
+
+ + + +
@@ -92,7 +98,12 @@

How does the platform enable you
-
video presentation
+
+ + +
@@ -158,7 +169,7 @@

Start your learning journey

Solutioning space for all of Government

-
+
learning icon
@@ -211,7 +222,11 @@

Events hub

Walkthrough of the iGOT Karmayogi Portal

- video image + + +
@@ -221,7 +236,7 @@

Walkthrough of the iGOT Karmayogi Portal

-
+

Learn. Network. Take your career growth to the next level.

diff --git a/src/app/routes/public/public-home/public-home.component.scss b/src/app/routes/public/public-home/public-home.component.scss index 7dda2d878..218d6d037 100644 --- a/src/app/routes/public/public-home/public-home.component.scss +++ b/src/app/routes/public/public-home/public-home.component.scss @@ -2,120 +2,11 @@ @import 'ws-vars'; @import 'ws-mixins'; -// .main_container { -// font-family: 'Poppins', sans-serif; -// position: relative; -// letter-spacing: 0.2px; - -// background-size: cover; -// } - -// .right_container { -// background-color: #fff; -// width: 45%; -// height: 100vh; -// box-sizing: border-box; -// box-shadow: 0px 20px 60px #3e3e3e29; - -// @include breakpoint-xs { -// width: 100%!important; -// } -// } - -// .left_container { -// padding: 5rem 6rem; -// box-sizing: border-box; -// width: 55%; -// height: 100vh; - -// @include breakpoint-xs { -// display: none!important; -// } -// } - -// .logo_box { -// width: 320px; -// img.logo_img { -// width: 100%; -// } -// } - - // .slider_box { - // padding: 5rem 0 2rem 0; - // width: 320px; - // box-sizing: border-box; - // box-sizing: border-box; - // } - - // .text_box { - // margin: 3rem 0 1rem; - // } - - // .right_inner_container { - // width: 320px; - - // @include breakpoint-xs { - // width: 300px!important; - // } - // } - - .m_b_2 { - margin-bottom: 1rem; - } - - - - // .button { - // font-family: 'Poppins', sans-serif; - // color: #F9F9F9; - // font-size: 14px; - // line-height: 19px; - // height: 40px; - // background-color: rgb(0, 116, 182, 1); - // border-radius: 8px; - // transition: all .25s ease-in; - // width: 100%; - // border:0; - // cursor: pointer; - // } - // .main_container { - // background-image : url(assets/instances/eagle/banners/home/9/Login_background.png) no-repeat center center fixed; - // } - - ::ng-deep .top-nav-bar { - display: none!important; - } - - ::ng-deep .height-on-top { - padding-top: 0!important; + .m_b_2 { + margin-bottom: 1rem; } - - - -// .slideshow-container { -// padding: 5rem 0 2rem 0; - -// @include breakpoint-s { -// padding: 3rem 0 2rem 0!important; -// } -// } - - // .mySlides { - // height: auto; - - // img { - // height: 430px; - // width: auto; - - // @include breakpoint-s { - // height: 325px!important; - // } - // } - // } - - h1.title-heading { font-size: 2.6875rem!important; font-weight: 600; @@ -128,30 +19,7 @@ -moz-transition: all 300ms ease-in-out; transition: all 300ms ease-in-out; } - // @font-face { - // font-family: 'latoregular'; - // src:url('../fonts/lato-regular-webfont.woff') format('woff'); - // font-weight: normal; - // font-style: normal; - // } - // @font-face { - // font-family: 'latosemibold'; - // src:url('../fonts/lato-semibold-webfont.woff') format('woff'); - // font-weight: normal; - // font-style: normal; - // } - // @font-face { - // font-family: 'latobold'; - // src:url('../fonts/lato-bold-webfont.woff') format('woff'); - // font-weight: normal; - // font-style: normal; - // } - // @font-face { - // font-family: 'latoblack'; - // src:url('../fonts/lato-black-webfont.woff') format('woff'); - // font-weight: normal; - // font-style: normal; - // } + html, body { max-width: 100%; height: 100%; @@ -227,6 +95,10 @@ padding-left: 1rem; padding-right: 1rem; } + @include breakpoint-m { + padding-left: 1rem; + padding-right: 1rem; + } } .main-section .mainContent { padding-top: 6.9375rem; @@ -309,10 +181,7 @@ content: ''; background-color: transparent!important; } - .servicesSection { - background-color: #373434; - min-height: 800px; - } + /* global button css start here */ .btn{ font-size: .875rem; @@ -368,6 +237,9 @@ // //does not require "!important" // } +.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination { + display: none!important; +} .btn-outline-secondary { color: rgba(0, 0, 0, 0.9); border: 1px solid #808188; @@ -380,8 +252,6 @@ background: -webkit-linear-gradient(top, #373434 0%,#373434 55%,#ffffff 55%,#ffffff 100%); /* Chrome10-25,Safari5.1-6 */ background: linear-gradient(to bottom, #373434 0%,#373434 55%,#ffffff 55%,#ffffff 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#373434', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */ - - min-height: 800px; // margin-top: 5.625rem; position: relative; @@ -393,11 +263,17 @@ @include breakpoint-xs { padding-left: 1rem; padding-right: 1rem; + background: linear-gradient(to bottom, #373434 0%, #373434 75%, #ffffff 75%, #ffffff 100%); + min-height: 675px; } @include breakpoint-s { padding-left: 1rem; padding-right: 1rem; } + @include breakpoint-m { + padding-left: 1rem; + padding-right: 1rem; + } } .servicesSection .servicesTab { text-align: center; @@ -425,6 +301,12 @@ opacity: 1!important; font-size: 16px; font-weight: 400; + + @include breakpoint-xs { + padding-left: 1rem!important; + padding-right: 1rem!important; + width: 93%; + } } // /* Styles for the active tab label */ @@ -490,20 +372,55 @@ /* journey css section start here */ .journeySection { background-color: #fff; + + @include breakpoint-xs { + padding-left: 1rem!important; + padding-right: 1rem!important; + } + @include breakpoint-s { + padding-left: 1rem!important; + padding-right: 1rem!important; + } + @include breakpoint-m { + padding-left: 1rem!important; + padding-right: 1rem!important; + } } .journeySection .journeyContent { background: #AEE6FE url('/assets/instances/eagle/landing-img/learningBg.svg') no-repeat center top; height: 258px; width: 100%; border-radius: 1rem; + text-align: center; + + @include breakpoint-xs { + padding: 0 0.5rem!important; + + } } .solutionService { background-color: #fff; + @include breakpoint-xs { + padding-left: 1rem!important; + padding-right: 1rem!important; + } + @include breakpoint-s { + padding-left: 1rem!important; + padding-right: 1rem!important; + } } .solutionService h4 { color: #ffffff; } + .solutionService .solutionServiceInner { + @include breakpoint-xs { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + @include breakpoint-s { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } .solutionService .servicesItem { background-color: #373434; min-height: 352px; @@ -551,6 +468,21 @@ min-height: 800px; padding-top: 80px; padding-bottom: 48px; + @include breakpoint-xs { + padding-left: 1rem!important; + padding-right: 1rem!important; + min-height: auto; + } + @include breakpoint-s { + padding-left: 1rem!important; + padding-right: 1rem!important; + min-height: auto; + } + @include breakpoint-m { + padding-left: 1rem!important; + padding-right: 1rem!important; + min-height: auto; + } } .growthSection { /* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#fae2c5+0,fca872+100 */ From 17fd16fb7bc792f2beea6047f3fdb667f072cbe3 Mon Sep 17 00:00:00 2001 From: nitin raj Date: Wed, 8 Jun 2022 16:34:01 +0530 Subject: [PATCH 15/15] footer bug fix with responsiveness --- .../profile-home/profile-home.component.html | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.html b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.html index efce666f8..8f0ab1c9d 100644 --- a/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.html +++ b/project/ws/app/src/lib/routes/profile-v3/routes/profile-home/profile-home.component.html @@ -37,31 +37,30 @@

{{currentStep}}. {{message}}

-
- + - + - + - +