diff --git a/src/composables/useSubmission.js b/src/composables/useSubmission.js
index 5c4ad9d3f..404c45c51 100644
--- a/src/composables/useSubmission.js
+++ b/src/composables/useSubmission.js
@@ -66,12 +66,13 @@ const InProgressReviewAssignmentStatuses = [
pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED,
pkp.const.REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE,
];
-const CompletedReviewAssignmentStatuses = [
+
+// Submitted reviews
+export const CompletedReviewAssignmentStatuses = [
pkp.const.REVIEW_ASSIGNMENT_STATUS_RECEIVED,
pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE,
pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED,
- pkp.const.REVIEW_ASSIGNMENT_STATUS_CANCELLED,
- pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND,
+ pkp.const.REVIEW_ASSIGNMENT_STATUS_VIEWED,
];
const IgnoredReviewAssignmentStatuses = [
diff --git a/src/pages/dashboard/DashboardPage.stories.js b/src/pages/dashboard/DashboardPage.stories.js
index f323e18a5..343848ed1 100644
--- a/src/pages/dashboard/DashboardPage.stories.js
+++ b/src/pages/dashboard/DashboardPage.stories.js
@@ -243,8 +243,11 @@ export const ReviewAssignmentStatusesReviewer = {
8.REVIEW_ASSIGNMENT_STATUS_THANKED - reviewer has been thanked
9.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND - request resent to reviewer after they declined
10.REVIEW_ASSIGNMENT_STATUS_VIEWED -editor viewed the review, but not confirm
- 11.REVIEW_ASSIGNMENT_STATUS_CANCELLED - reviewer cancelled review request // should not be displayed
-
+ 11.REVIEW_ASSIGNMENT_STATUS_ACCEPTED + copy/prod stage - submission moved to the copyediting/production stage, considered as incomplete
+ 12.REVIEW_ASSIGNMENT_STATUS_DECLINED + copy/prod stage - submission moved to the copyediting/production stage, still indicate declined
+ 13.REVIEW_ASSIGNMENT_STATUS_CANCELLED - reviewer cancelled review request / should not be displayed
+
+
`,
}),
diff --git a/src/pages/dashboard/components/DashboardTable/DashboardCellReviewAssignmentActions.vue b/src/pages/dashboard/components/DashboardTable/DashboardCellReviewAssignmentActions.vue
index f9eb80999..6f4e02ff9 100644
--- a/src/pages/dashboard/components/DashboardTable/DashboardCellReviewAssignmentActions.vue
+++ b/src/pages/dashboard/components/DashboardTable/DashboardCellReviewAssignmentActions.vue
@@ -1,6 +1,7 @@
{
+ // Submission progress to copyediting/production stage
+ if (
+ [
+ pkp.const.WORKFLOW_STAGE_ID_EDITING,
+ pkp.const.WORKFLOW_STAGE_ID_PRODUCTION,
+ ].includes(props.item.stageId)
+ ) {
+ // It the review assignment is incomplete, show no action
+ // for complete sceario it will fallback to the 'View' below
+ if (!CompletedReviewAssignmentStatuses.includes(props.item.status)) {
+ return null;
+ }
+ }
switch (props.item.status) {
case pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE:
case pkp.const.REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE:
diff --git a/src/pages/dashboard/composables/useDashboardConfigEditorialActivity.js b/src/pages/dashboard/composables/useDashboardConfigEditorialActivity.js
index dd3408fe1..bd6470fcb 100644
--- a/src/pages/dashboard/composables/useDashboardConfigEditorialActivity.js
+++ b/src/pages/dashboard/composables/useDashboardConfigEditorialActivity.js
@@ -1,4 +1,7 @@
-import {useSubmission} from '@/composables/useSubmission.js';
+import {
+ useSubmission,
+ CompletedReviewAssignmentStatuses,
+} from '@/composables/useSubmission.js';
import {useLocalize} from '@/composables/useLocalize';
import {useDate} from '@/composables/useDate';
import {Actions as ParticipantManagerActions} from '@/managers/ParticipantManager/useParticipantManagerActions';
@@ -383,34 +386,61 @@ export function useDashboardConfigEditorialActivity() {
}
function getEditorialActivityForMyReviewAssignments(reviewAssignment) {
+ console.log(
+ 'getEditorialActivityForMyReviewAssignments',
+ reviewAssignment.status,
+ );
+
+ // When declined always show the same status regardless of the stage
if (
- [
- pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE,
- pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND,
- ].includes(reviewAssignment.status)
+ reviewAssignment.status === pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED
) {
- const date = reviewAssignment.dateResponseDue;
+ // indeed when declined, the dateConfirmed gets set regardless if its accepted or declined
+ const date = reviewAssignment.dateConfirmed;
+
return [
{
component: 'DashboardCellReviewAssignmentActivityAlert',
props: {
- alert: t('dashboard.reviewAssignment.acceptOrDeclineRequestDate', {
+ alert: t('dashboard.reviewAssignment.declined', {
date: formatShortDate(date),
}),
},
},
];
+ }
+ // if the submission moved to editorial / production stage
+ else if (
+ [
+ pkp.const.WORKFLOW_STAGE_ID_EDITING,
+ pkp.const.WORKFLOW_STAGE_ID_PRODUCTION,
+ ].includes(reviewAssignment.stageId)
+ ) {
+ // It the review assignment is incomplete
+ if (
+ !CompletedReviewAssignmentStatuses.includes(reviewAssignment.status)
+ ) {
+ return [
+ {
+ component: 'DashboardCellReviewAssignmentActivityAlert',
+ props: {
+ alert: t(`submissions.incomplete`),
+ },
+ },
+ ];
+ }
} else if (
- reviewAssignment.status === pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED
+ [
+ pkp.const.REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE,
+ pkp.const.REVIEW_ASSIGNMENT_STATUS_REQUEST_RESEND,
+ ].includes(reviewAssignment.status)
) {
- // indeed when declined, the dateConfirmed gets set regardless if its accepted or declined
- const date = reviewAssignment.dateConfirmed;
-
+ const date = reviewAssignment.dateResponseDue;
return [
{
component: 'DashboardCellReviewAssignmentActivityAlert',
props: {
- alert: t('dashboard.reviewAssignment.declined', {
+ alert: t('dashboard.reviewAssignment.acceptOrDeclineRequestDate', {
date: formatShortDate(date),
}),
},
@@ -439,7 +469,9 @@ export function useDashboardConfigEditorialActivity() {
{
component: 'DashboardCellReviewAssignmentActivityAlert',
props: {
- alert: t('dashboard.reviewAssignment.completeReviewByDate', {date}),
+ alert: t('dashboard.reviewAssignment.completeReviewByDate', {
+ date,
+ }),
},
},
];
@@ -463,7 +495,7 @@ export function useDashboardConfigEditorialActivity() {
pkp.const.REVIEW_ASSIGNMENT_STATUS_VIEWED,
pkp.const.REVIEW_ASSIGNMENT_STATUS_COMPLETE,
pkp.const.REVIEW_ASSIGNMENT_STATUS_THANKED,
- ].includes(reviewAssignment.statusId)
+ ].includes(reviewAssignment.status)
) {
const date = reviewAssignment.dateCompleted;
diff --git a/src/pages/dashboard/mocks/reviewAssignmentScenariosMock.js b/src/pages/dashboard/mocks/reviewAssignmentScenariosMock.js
index 09dc22f6e..d9b85efd3 100644
--- a/src/pages/dashboard/mocks/reviewAssignmentScenariosMock.js
+++ b/src/pages/dashboard/mocks/reviewAssignmentScenariosMock.js
@@ -1,5 +1,6 @@
import {getReviewAssignmentFullMock} from './reviewAssignmentsMock';
export const ReviewAssignmentEditorialActivityScenario = [
+ // Review stage
//REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE // request has been sent but reviewer has not responded
getReviewAssignmentFullMock({
submissionId: 1,
@@ -50,4 +51,18 @@ export const ReviewAssignmentEditorialActivityScenario = [
submissionId: 10,
statusId: pkp.const.REVIEW_ASSIGNMENT_STATUS_VIEWED,
}),
+ // When moved to copyediting / production stage
+ // When the review was not completed (submitted)
+ getReviewAssignmentFullMock({
+ submissionId: 11,
+ statusId: pkp.const.REVIEW_ASSIGNMENT_STATUS_ACCEPTED,
+ stageId: pkp.const.WORKFLOW_STAGE_ID_PRODUCTION,
+ }),
+ // When moved to copyediting / production stage
+ // When the review was declined - same indication for declined regardless of the stage
+ getReviewAssignmentFullMock({
+ submissionId: 12,
+ statusId: pkp.const.REVIEW_ASSIGNMENT_STATUS_DECLINED,
+ stageId: pkp.const.WORKFLOW_STAGE_ID_PRODUCTION,
+ }),
];