mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
chore: set approval status to idle if previous status is rejected
This commit is contained in:
@@ -130,10 +130,17 @@ export const formatGroupedApprovalsToApprovalSteps = (
|
||||
|
||||
if (!approvalGroup) {
|
||||
const isWaiting = currentStepNumber === latestApproval.step_number + 1;
|
||||
const isPreviousApprovalRejected =
|
||||
groupedApprovals[groupedApprovals.length - 1].approvals[0].action ===
|
||||
'REJECTED';
|
||||
|
||||
return {
|
||||
name: approvalLineItem.step_name,
|
||||
status: isWaiting ? 'WAITING' : 'IDLE',
|
||||
status: isPreviousApprovalRejected
|
||||
? 'IDLE'
|
||||
: isWaiting
|
||||
? 'WAITING'
|
||||
: 'IDLE',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user