From e4877133a770d4ae8d35692eb7c17bb26cef06cf Mon Sep 17 00:00:00 2001 From: Daniel Jakab Date: Tue, 22 Oct 2024 16:44:32 +0200 Subject: [PATCH] Only show expected participant data card when valid --- src/pages/Participant/ParticipantDataCard/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/Participant/ParticipantDataCard/index.tsx b/src/pages/Participant/ParticipantDataCard/index.tsx index da857af..b0aa8c6 100644 --- a/src/pages/Participant/ParticipantDataCard/index.tsx +++ b/src/pages/Participant/ParticipantDataCard/index.tsx @@ -93,6 +93,15 @@ const ParticipantDataCard = () => { ); } + if ( + study?.protocolSnapshot.expectedParticipantData.toArray().length === 0 || + (study?.protocolSnapshot.expectedParticipantData.toArray().length === 1 && + study?.protocolSnapshot.expectedParticipantData.toArray()[0].inputDataType + .name === "informed_consent") + ) { + return null; + } + return (