Skip to content

Commit

Permalink
fix: update draft button conditional in action menu (#8366)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil20 authored Jan 21, 2025
1 parent 6e30787 commit 2dfa94a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/client/src/views/RecordAudit/ActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,23 @@ export const ActionMenu: React.FC<{
isActionable={isActionable}
/>
</ProtectedComponent>
<ProtectedComponent scopes={RECORD_ALLOWED_SCOPES.UPDATE}>
{isDraft ? (
<UpdateAction
declarationId={id}
declarationStatus={status}
type={type}
isActionable={isActionable || isDraft}
/>
</ProtectedComponent>
) : (
<ProtectedComponent scopes={RECORD_ALLOWED_SCOPES.UPDATE}>
<UpdateAction
declarationId={id}
declarationStatus={status}
type={type}
isActionable={isActionable || isDraft}
/>
</ProtectedComponent>
)}
<ProtectedComponent scopes={RECORD_ALLOWED_SCOPES.ARCHIVE}>
<ArchiveAction
toggleDisplayDialog={toggleDisplayDialog}
Expand Down

0 comments on commit 2dfa94a

Please sign in to comment.