From d3c6adbf0714082c193390bc8a8459d90dacb7b3 Mon Sep 17 00:00:00 2001 From: Nik720 Date: Wed, 17 Aug 2022 12:12:15 +0530 Subject: [PATCH] Issue #SB-30707 fix: Mentor and participant list dropdown migration --- .../create-batch/create-batch.component.html | 4 ++-- .../update-course-batch.component.html | 18 +++++++++--------- .../update-course-batch.component.ts | 6 ++---- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/app/client/src/app/modules/learn/components/batch/create-batch/create-batch.component.html b/src/app/client/src/app/modules/learn/components/batch/create-batch/create-batch.component.html index b8548839bba..01f38a439d7 100644 --- a/src/app/client/src/app/modules/learn/components/batch/create-batch/create-batch.component.html +++ b/src/app/client/src/app/modules/learn/components/batch/create-batch/create-batch.component.html @@ -138,8 +138,8 @@
+ - {{resourceService?.frmelmnts?.lbl?.batchmentors}} @@ -159,8 +159,8 @@
+ - {{resourceService?.frmelmnts?.lbl?.bacthmembers}} diff --git a/src/app/client/src/app/modules/learn/components/batch/update-course-batch/update-course-batch.component.html b/src/app/client/src/app/modules/learn/components/batch/update-course-batch/update-course-batch.component.html index f212198463d..dcd9759b06e 100644 --- a/src/app/client/src/app/modules/learn/components/batch/update-course-batch/update-course-batch.component.html +++ b/src/app/client/src/app/modules/learn/components/batch/update-course-batch/update-course-batch.component.html @@ -149,17 +149,17 @@
+ - {{resourceService?.frmelmnts?.lbl?.batchmentors}} - {{selectedMentors ? selectedMentors[0].name : ''}} - - (+{{selectedMentorList.length - 1}} {{selectedMentorList?.length === 2 ? 'other' : 'others'}}) + {{selectedMentors ? selectedMentors[0] : ''}} + + (+{{selectedMentors.length - 1}} {{selectedMentors?.length === 2 ? 'other' : 'others'}}) - avatar image @@ -170,17 +170,17 @@
+ - {{resourceService?.frmelmnts?.lbl?.bacthmembers}} - {{selectedParticipants ? selectedParticipants[0].name : ''}} - + {{selectedParticipants ? selectedParticipants[0] : ''}} + (+{{selectedParticipants.length - 1}} {{selectedParticipants?.length === 2 ? 'other' : 'others'}}) - avatar image diff --git a/src/app/client/src/app/modules/learn/components/batch/update-course-batch/update-course-batch.component.ts b/src/app/client/src/app/modules/learn/components/batch/update-course-batch/update-course-batch.component.ts index 2c5cd229bc7..93aadf2a124 100644 --- a/src/app/client/src/app/modules/learn/components/batch/update-course-batch/update-course-batch.component.ts +++ b/src/app/client/src/app/modules/learn/components/batch/update-course-batch/update-course-batch.component.ts @@ -355,17 +355,15 @@ export class UpdateCourseBatchComponent implements OnInit, OnDestroy, AfterViewI _.forEach(this.batchDetails.participants, (value, key) => { const user = _.find(participantList, ['id', value]); if (user) { - this.selectedParticipants.push(user); + this.selectedParticipants.push(`${user.name}${user.otherDetail}`); } }); _.forEach(this.batchDetails.mentors, (value, key) => { const mentor = _.find(mentorList, ['id', value]); if (mentor) { - this.selectedMentors.push(mentor); + this.selectedMentors.push(`${mentor.name}${mentor.otherDetail}`); } }); - this.selectedParticipants = _.uniqBy(this.selectedParticipants, 'id'); - this.selectedMentors = _.uniqBy(this.selectedMentors, 'id'); this.disableSubmitBtn = false; this.showLoader = false; }