From a76c8d3c747efcf79b7f65e06ed98173b59d4863 Mon Sep 17 00:00:00 2001 From: nitin raj Date: Fri, 14 Oct 2022 12:54:26 +0530 Subject: [PATCH 1/2] setup page & course link fix --- .../app-toc-content-card.component.html | 8 +++++--- .../current-competency-card.component.ts | 10 +++++----- .../components/topic-card/topic-card.component.ts | 2 ++ .../roles-and-activities.component.scss | 6 +++--- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/project/ws/app/src/lib/routes/app-toc/components/app-toc-content-card/app-toc-content-card.component.html b/project/ws/app/src/lib/routes/app-toc/components/app-toc-content-card/app-toc-content-card.component.html index 9d823d862..0f80d7116 100755 --- a/project/ws/app/src/lib/routes/app-toc/components/app-toc-content-card/app-toc-content-card.component.html +++ b/project/ws/app/src/lib/routes/app-toc/components/app-toc-content-card/app-toc-content-card.component.html @@ -192,11 +192,13 @@
- - + + +

diff --git a/project/ws/app/src/lib/routes/profile-v3/components/current-competency-card/current-competency-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/current-competency-card/current-competency-card.component.ts index a6663df10..e400e2bdf 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/current-competency-card/current-competency-card.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/components/current-competency-card/current-competency-card.component.ts @@ -44,13 +44,13 @@ export class CurrentCompetencyCardComponent implements OnInit { // this.selectedCompetency.emit(this.selectedCompList) } else { if (_.findIndex(this.compLocalService.currentComps.value, { id: competency.id }) !== -1) { - // if (_.findIndex(this.compLocalService.currentComps.value, { competencySelfAttestedLevel: complevel.id }) !== -1) { - // // this.compLocalService.removecurrentComps(compobj) - // } - // else { + if (_.findIndex(this.compLocalService.currentComps.value, { competencySelfAttestedLevel: complevel.id }) !== -1) { + this.compLocalService.removecurrentComps(compobj) + } + else { this.compLocalService.removecurrentComps(compobj) this.compLocalService.addcurrentComps(compobj) - // } + } } } } 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 59e89a92b..86627bf44 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 @@ -49,12 +49,14 @@ export class TopicCardComponent implements OnInit { if (top) { if (typeof (top) !== 'object') { const index = _.indexOf(this.topicService.getCurrentSelectedDesTopics, top) + if (index === -1) { return false } return true } 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/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 7ecac2d07..66681421a 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 @@ -67,9 +67,9 @@ a.hint_span { color: rgba($color: #000000, $alpha: .4); } -.mat-subheading-1{ - margin-left: 10px; -} +// .mat-subheading-1{ +// margin-left: 10px; +// } .left-input-div { width: 74%; From 05eaf11086dfd23074ba6cd36a75eeffb5a025b9 Mon Sep 17 00:00:00 2001 From: nitin raj Date: Fri, 14 Oct 2022 13:09:19 +0530 Subject: [PATCH 2/2] lint fixes --- .../components/app-toc-banner/app-toc-banner.component.ts | 3 +-- .../current-competency-card.component.ts | 3 +-- .../profile-v3/components/topic-card/topic-card.component.ts | 2 +- .../ws/viewer/src/lib/plugins/practice/practice.component.ts | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/project/ws/app/src/lib/routes/app-toc/components/app-toc-banner/app-toc-banner.component.ts b/project/ws/app/src/lib/routes/app-toc/components/app-toc-banner/app-toc-banner.component.ts index 6ca1fe67e..d784cb04e 100755 --- a/project/ws/app/src/lib/routes/app-toc/components/app-toc-banner/app-toc-banner.component.ts +++ b/project/ws/app/src/lib/routes/app-toc/components/app-toc-banner/app-toc-banner.component.ts @@ -274,7 +274,6 @@ export class AppTocBannerComponent implements OnInit, OnChanges, OnDestroy { }) } - getMimeType(content: NsContent.IContent, identifier: string): NsContent.EMimeTypes { if (content.identifier === identifier) { return content.mimeType @@ -292,7 +291,7 @@ export class AppTocBannerComponent implements OnInit, OnChanges, OnDestroy { const getAllItemsPerChildren: any = (item: NsContent.IContent) => { flatList.push(item) if (item.children) { - return item.children.map((i: NsContent.IContent) => getAllItemsPerChildren(i)); + return item.children.map((i: NsContent.IContent) => getAllItemsPerChildren(i)) } return } diff --git a/project/ws/app/src/lib/routes/profile-v3/components/current-competency-card/current-competency-card.component.ts b/project/ws/app/src/lib/routes/profile-v3/components/current-competency-card/current-competency-card.component.ts index e400e2bdf..14d091d08 100644 --- a/project/ws/app/src/lib/routes/profile-v3/components/current-competency-card/current-competency-card.component.ts +++ b/project/ws/app/src/lib/routes/profile-v3/components/current-competency-card/current-competency-card.component.ts @@ -46,8 +46,7 @@ export class CurrentCompetencyCardComponent implements OnInit { if (_.findIndex(this.compLocalService.currentComps.value, { id: competency.id }) !== -1) { if (_.findIndex(this.compLocalService.currentComps.value, { competencySelfAttestedLevel: complevel.id }) !== -1) { this.compLocalService.removecurrentComps(compobj) - } - else { + } else { this.compLocalService.removecurrentComps(compobj) this.compLocalService.addcurrentComps(compobj) } 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 86627bf44..dcd4f000f 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 @@ -56,7 +56,7 @@ export class TopicCardComponent implements OnInit { return true } const index1 = _.findIndex(this.topicService.getCurrentSelectedSysTopics, { identifier: top.identifier }) - + if (index1 === -1) { return false } diff --git a/project/ws/viewer/src/lib/plugins/practice/practice.component.ts b/project/ws/viewer/src/lib/plugins/practice/practice.component.ts index 839d41f0b..5ee10a935 100755 --- a/project/ws/viewer/src/lib/plugins/practice/practice.component.ts +++ b/project/ws/viewer/src/lib/plugins/practice/practice.component.ts @@ -595,8 +595,8 @@ export class PracticeComponent implements OnInit, OnChanges, OnDestroy { // debugger // console.log(this.questionAnswerHash, '+++++') if (question.questionType && question.questionType === 'mtf') { - const mTfval=this.quizSvc.mtfSrc.getValue() - mTfval[question.questionId]= { + const mTfval = this.quizSvc.mtfSrc.getValue() + mTfval[question.questionId] = { source: _.map(optionId, 'source.innerText'), target: _.map(optionId, 'target.innerText'), }