Skip to content

Commit

Permalink
pkp/pkp-lib#10674 Fix logic for review assignment statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Feb 27, 2025
1 parent 77f1b52 commit b9515c8
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ export function useDashboardConfigEditorialActivity() {
];
}
// if the submission moved to editorial / production stage
else if (
if (
[
pkp.const.WORKFLOW_STAGE_ID_EDITING,
pkp.const.WORKFLOW_STAGE_ID_PRODUCTION,
Expand All @@ -424,7 +424,9 @@ export function useDashboardConfigEditorialActivity() {
},
];
}
} else if (
}

if (
[
pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE,
pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND,
Expand All @@ -441,7 +443,8 @@ export function useDashboardConfigEditorialActivity() {
},
},
];
} else if (
}
if (
reviewAssignment.status ===
pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE
) {
Expand All @@ -455,7 +458,8 @@ export function useDashboardConfigEditorialActivity() {
},
},
];
} else if (
}
if (
reviewAssignment.status === pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED
) {
const date = reviewAssignment.dateDue;
Expand All @@ -470,7 +474,8 @@ export function useDashboardConfigEditorialActivity() {
},
},
];
} else if (
}
if (
reviewAssignment.status ===
pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE
) {
Expand All @@ -484,9 +489,8 @@ export function useDashboardConfigEditorialActivity() {
},
},
];
} else if (
CompletedReviewAssignmentStatuses.includes(reviewAssignment.status)
) {
}
if (CompletedReviewAssignmentStatuses.includes(reviewAssignment.status)) {
const date = reviewAssignment.dateCompleted;

return [
Expand All @@ -499,7 +503,8 @@ export function useDashboardConfigEditorialActivity() {
},
},
];
} else if (
}
if (
// Cancelled review assignments should be filtered out, this should not appear, just for documentation
reviewAssignment.status === pkp.const.REVIEW_ASSIGNMENT_STATUS_CANCELLED
) {
Expand Down

0 comments on commit b9515c8

Please sign in to comment.