From e3810c1a49bf5a7ef7587bfbb2c274ebae0ee443 Mon Sep 17 00:00:00 2001 From: niyobertin Date: Mon, 28 Oct 2024 13:27:25 +0200 Subject: [PATCH] fix(#391):Enable Consistent Edit For All Cohorts -As an admin, I have ability to edit all cohorts that I am permitted to manage --- src/containers/admin-dashBoard/CohortTraineeModal.tsx | 2 +- src/containers/admin-dashBoard/UpdateCohortModal.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/admin-dashBoard/CohortTraineeModal.tsx b/src/containers/admin-dashBoard/CohortTraineeModal.tsx index a77d06ae0..c7c072ecd 100644 --- a/src/containers/admin-dashBoard/CohortTraineeModal.tsx +++ b/src/containers/admin-dashBoard/CohortTraineeModal.tsx @@ -46,7 +46,7 @@ export default function CohortTraineeModal({ if (traineeData && traineeData.length > 0) { traineeData?.map((data: any, index: number): any => { datum[index] = {}; - datum[index].name = data.profile.name; + datum[index].name = data.profile?.name; datum[index].email = data.email; datum[index].rating = '2'; datum[index].team = data.team.name; diff --git a/src/containers/admin-dashBoard/UpdateCohortModal.tsx b/src/containers/admin-dashBoard/UpdateCohortModal.tsx index e520344ac..4e359a5c9 100644 --- a/src/containers/admin-dashBoard/UpdateCohortModal.tsx +++ b/src/containers/admin-dashBoard/UpdateCohortModal.tsx @@ -12,7 +12,7 @@ export const UpdateCohort = gql` mutation UpdateCohort( $updateCohortId: ID! $orgToken: String - $coordinatorEmail: String! + $coordinatorEmail: String $programName: String! $name: String $phaseName: String