From 79a6e4f33afbba7a533efc142e03e0d24adf9246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Mon, 18 Nov 2024 10:46:24 +0100 Subject: [PATCH 1/2] I10599 (#447) * pkp/pkp-lib#10599 Refining which editorial decisions are displayed and when --- src/composables/useSubmission.js | 8 + .../action/WorkflowActionChangeDecision.vue | 24 +- .../workflowConfigEditorialOJS.js | 334 +++++++++++------- .../workflowConfigEditorialOMP.js | 238 ++++++++----- .../workflowConfigEditorialOPS.js | 87 ++--- .../composables/useWorkflowDecisions.js | 14 +- 6 files changed, 425 insertions(+), 280 deletions(-) diff --git a/src/composables/useSubmission.js b/src/composables/useSubmission.js index 79919628d..5416538e3 100644 --- a/src/composables/useSubmission.js +++ b/src/composables/useSubmission.js @@ -233,6 +233,13 @@ export function useSubmission() { .map((assignment) => assignment.userId); } + function isDecisionAvailable(submission, decisionId) { + const stage = getActiveStage(submission); + return stage?.availableEditorialDecisions?.some( + (decision) => decision.id === decisionId, + ); + } + return { getSubmissionById, getActiveStage, @@ -256,5 +263,6 @@ export function useSubmission() { getReviewMethodIcons, InProgressReviewAssignmentStatuses, getRecommendOnlyUserIdsForStage, + isDecisionAvailable, }; } diff --git a/src/pages/workflow/components/action/WorkflowActionChangeDecision.vue b/src/pages/workflow/components/action/WorkflowActionChangeDecision.vue index 88bc6d3e1..7ed3effee 100644 --- a/src/pages/workflow/components/action/WorkflowActionChangeDecision.vue +++ b/src/pages/workflow/components/action/WorkflowActionChangeDecision.vue @@ -1,12 +1,18 @@