Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HL-868 | Hide archived / batched app's actions #2162

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,21 @@ const HandlingApplicationActions: React.FC<Props> = ({
}`
)}
</Button>
{(application.status === APPLICATION_STATUSES.ACCEPTED ||
application.status === APPLICATION_STATUSES.REJECTED) && (
<Button
onClick={onBackToHandling}
theme="black"
variant="secondary"
disabled={!!application.batch}
iconLeft={<IconArrowUndo />}
>
{t(`${translationsBase}.backToHandling`)}
</Button>
)}
{[
APPLICATION_STATUSES.ACCEPTED,
APPLICATION_STATUSES.REJECTED,
].includes(application.status) &&
!application.batch &&
!application.archived && (
<Button
onClick={onBackToHandling}
theme="black"
variant="secondary"
iconLeft={<IconArrowUndo />}
>
{t(`${translationsBase}.backToHandling`)}
</Button>
)}
<Button
onClick={toggleMessagesDrawerVisiblity}
theme="black"
Expand All @@ -84,18 +87,20 @@ const HandlingApplicationActions: React.FC<Props> = ({
{t(`${translationsBase}.handlingPanel`)}
</Button>
</$Column>
{application.status !== APPLICATION_STATUSES.CANCELLED && (
<$Column>
<Button
onClick={openDialog}
theme="black"
variant="supplementary"
iconLeft={<IconTrash />}
>
{t(`${translationsBase}.cancel`)}
</Button>
</$Column>
)}
{application.status !== APPLICATION_STATUSES.CANCELLED &&
!application.batch &&
!application.archived && (
<$Column>
<Button
onClick={openDialog}
theme="black"
variant="supplementary"
iconLeft={<IconTrash />}
>
{t(`${translationsBase}.cancel`)}
</Button>
</$Column>
)}

{isConfirmationModalOpen && (
<Modal
Expand Down
Loading