diff --git a/src/pages/Deployments/ParticipantRecord/index.tsx b/src/pages/Deployments/ParticipantRecord/index.tsx index 5fde5b1..d501015 100644 --- a/src/pages/Deployments/ParticipantRecord/index.tsx +++ b/src/pages/Deployments/ParticipantRecord/index.tsx @@ -72,7 +72,7 @@ const ParticipantRecord = ({ > - {participantData.firstName + {!participantData.firstName || !participantData.lastName ? participantRole[0] : `${participantData.firstName[0]}${participantData.lastName[0]}`} @@ -81,7 +81,7 @@ const ParticipantRecord = ({ {participantData.email ?? } - {participantData.firstName && ( + {participantData.firstName && participantData.lastName && ( <> diff --git a/src/pages/Participant/ParticipantDataCard/index.tsx b/src/pages/Participant/ParticipantDataCard/index.tsx index b0aa8c6..5c51cd6 100644 --- a/src/pages/Participant/ParticipantDataCard/index.tsx +++ b/src/pages/Participant/ParticipantDataCard/index.tsx @@ -71,8 +71,8 @@ const ParticipantDataCard = () => { }, [participantGroupStatus]); const participantDataFromik = getParticipantDataFormik( - study?.protocolSnapshot.expectedParticipantData.toArray(), - participantData?.common.values.toArray().filter((v) => v), + study?.protocolSnapshot.expectedParticipantData ? study?.protocolSnapshot.expectedParticipantData.toArray() : [], + participantData?.common.values ? participantData?.common.values.toArray().filter((v) => v) : [], setParticipantData, participant?.role, setEditing,