From 5cfb28c01cc32d690dd42d6b9eaccd919be9a9ff Mon Sep 17 00:00:00 2001 From: Sampo Tawast Date: Tue, 1 Aug 2023 13:32:18 +0300 Subject: [PATCH] fix: hide certain actions when app is archived or in a batch --- .../HandlingApplicationActions.tsx | 53 ++++++++++--------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/frontend/benefit/handler/src/components/applicationReview/actions/handlingApplicationActions/HandlingApplicationActions.tsx b/frontend/benefit/handler/src/components/applicationReview/actions/handlingApplicationActions/HandlingApplicationActions.tsx index 964edece1d..adfc291336 100644 --- a/frontend/benefit/handler/src/components/applicationReview/actions/handlingApplicationActions/HandlingApplicationActions.tsx +++ b/frontend/benefit/handler/src/components/applicationReview/actions/handlingApplicationActions/HandlingApplicationActions.tsx @@ -63,18 +63,21 @@ const HandlingApplicationActions: React.FC = ({ }` )} - {(application.status === APPLICATION_STATUSES.ACCEPTED || - application.status === APPLICATION_STATUSES.REJECTED) && ( - - )} + {[ + APPLICATION_STATUSES.ACCEPTED, + APPLICATION_STATUSES.REJECTED, + ].includes(application.status) && + !application.batch && + !application.archived && ( + + )} - {application.status !== APPLICATION_STATUSES.CANCELLED && ( - <$Column> - - - )} + {application.status !== APPLICATION_STATUSES.CANCELLED && + !application.batch && + !application.archived && ( + <$Column> + + + )} {isConfirmationModalOpen && (