Skip to content

Commit caaba5f

Browse files
pkp/pkp-lib#10768 Fix precedence for editorial activity for mixed role scenarios
1 parent f3e71d6 commit caaba5f

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/pages/dashboard/composables/useDashboardConfigEditorialActivity.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,6 @@ export function useDashboardConfigEditorialActivity() {
3535
}) {
3636
const activeStage = getActiveStage(submission);
3737

38-
if (submission.status === pkp.const.STATUS_DECLINED) {
39-
return [
40-
{
41-
component: 'DashboardCellSubmissionActivityActionAlert',
42-
props: {
43-
alert: t('dashboard.declinedDuringStage', {
44-
stageName: getStageLabel(submission),
45-
}),
46-
},
47-
},
48-
];
49-
}
50-
51-
// Not checking for submission stage, as OPS does not have it
52-
if (submission.submissionProgress) {
53-
return [
54-
{
55-
component: 'DashboardCellSubmissionActivityActionAlert',
56-
props: {
57-
actionName: 'openSubmissionWizard',
58-
actionLabel: t('submission.list.completeSubmission'),
59-
actionArgs: {submissionId: submission.id},
60-
},
61-
},
62-
];
63-
}
64-
6538
// Warning that I am assigned as author, relevant if I am NOT assigned via any editorial role
6639
if (
6740
hasCurrentUserAtLeastOneAssignedRoleInAnyStage(submission, [
@@ -102,6 +75,33 @@ export function useDashboardConfigEditorialActivity() {
10275
];
10376
}
10477

78+
if (submission.status === pkp.const.STATUS_DECLINED) {
79+
return [
80+
{
81+
component: 'DashboardCellSubmissionActivityActionAlert',
82+
props: {
83+
alert: t('dashboard.declinedDuringStage', {
84+
stageName: getStageLabel(submission),
85+
}),
86+
},
87+
},
88+
];
89+
}
90+
91+
// Not checking for submission stage, as OPS does not have it
92+
if (submission.submissionProgress) {
93+
return [
94+
{
95+
component: 'DashboardCellSubmissionActivityActionAlert',
96+
props: {
97+
actionName: 'openSubmissionWizard',
98+
actionLabel: t('submission.list.completeSubmission'),
99+
actionArgs: {submissionId: submission.id},
100+
},
101+
},
102+
];
103+
}
104+
105105
if (activeStage.id === pkp.const.WORKFLOW_STAGE_ID_SUBMISSION) {
106106
if (!submission.editorAssigned) {
107107
return [

0 commit comments

Comments
 (0)