Skip to content

Commit

Permalink
Fix mismatched dialog text for task approval/failure (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
amschel-de-r authored Nov 22, 2024
1 parent 77c59b1 commit 3924ef8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/TaskApprovementPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ function TaskApprovementPanel({
return () => confirmed && clearConfirm(false);
}, [confirmed]);

const openResolveTaskConfirmDialog = () => coreConfirm(
const openResolveTaskConfirmDialog = (choiceString) => coreConfirm(
formatMessage('task.resolve.confirm.title'),
approveOrFail === APPROVED ? formatMessage('task.resolve.confirm.fail.message')
: formatMessage('task.resolve.confirm.approve.message'),
choiceString === APPROVED ? formatMessage('task.resolve.confirm.approve.message')
: formatMessage('task.resolve.confirm.fail.message'),
);

const handleButtonClick = (choiceString) => {
if (task?.id && user?.id) {
openResolveTaskConfirmDialog(approveOrFail);
openResolveTaskConfirmDialog(choiceString);
setApproveOrFail(choiceString);
}
};
Expand Down

0 comments on commit 3924ef8

Please sign in to comment.