Skip to content

Commit

Permalink
dont allow enable action if already enabled (since enabled is no long…
Browse files Browse the repository at this point in the history
…er its own package status)
  • Loading branch information
bflynn-cms committed Nov 6, 2023
1 parent c43c5a3 commit bea6cb3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion services/app-api/utils/actionDelegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ function getDefaultActions(
case Workflow.ONEMAC_STATUS.PENDING:
if (userRole.canAccessForms)
actions.push(Workflow.PACKAGE_ACTION.WITHDRAW);
if (userRole.isCMSUser && hasRaiResponse && formSource === "detail") {
if (
userRole.isCMSUser &&
hasRaiResponse &&
packageSubStatus !== Workflow.ONEMAC_STATUS.WITHDRAW_RAI_ENABLED &&
formSource === "detail"
) {
actions.push(Workflow.PACKAGE_ACTION.ENABLE_RAI_WITHDRAWAL);
}
break;
Expand Down

0 comments on commit bea6cb3

Please sign in to comment.