From b0e4e2a8307112ea5d15784a116a75aab900aea2 Mon Sep 17 00:00:00 2001 From: Barry Dwyer Date: Wed, 13 Nov 2024 11:15:49 +0200 Subject: [PATCH] fix: logic around disabling review button GIVEN i don't have the record.declaration-submit-incomplete but the record.declaration-submit-for-review WHEN on the review page and the declaration is incomplete THEN show the incomplete state with the button "Send for review" disabled --- .../components/form/ReviewActionComponent.tsx | 61 ++++++++++--------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/packages/client/src/components/form/ReviewActionComponent.tsx b/packages/client/src/components/form/ReviewActionComponent.tsx index 90b815fff9..e899ad2a5f 100644 --- a/packages/client/src/components/form/ReviewActionComponent.tsx +++ b/packages/client/src/components/form/ReviewActionComponent.tsx @@ -388,35 +388,40 @@ const ReviewActionComponent = ({ {intl.formatMessage(buttonMessages.sendForApproval)} - ) : !completeDeclaration ? ( - - - ) : ( - - - + <> + {!completeDeclaration && ( + + + + )} + + + + )} {rejectDeclarationAction && !alreadyRejectedDeclaration && (