Skip to content

Commit

Permalink
pkp/pkp-lib#4787 enable suggestion list in workflow submission page w…
Browse files Browse the repository at this point in the history
…ith no action
  • Loading branch information
touhidurabir committed Nov 27, 2024
1 parent 2549ddb commit 5cfc2bd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
></div>
</div>
</div>
<div>
<div v-if="reviewerSuggestionManagerStore.hasActiveReviewStage">
<DropdownActions
:actions="reviewerSuggestionManagerStore.itemActions"
:label="`${reviewerSuggestion.fullName} ${t('common.moreActions')}`"
Expand Down Expand Up @@ -66,7 +66,7 @@ import DropdownActions from '@/components/DropdownActions/DropdownActions.vue';
const props = defineProps({
submission: {type: Object, required: true},
submissionStageId: {type: String, required: true},
reviewRoundId: {type: Number, required: true},
reviewRoundId: {type: Number, required: false},
});
const reviewerSuggestionManagerStore = useReviewerSuggestionManagerStore(props);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export const useReviewerSuggestionManagerStore = defineComponentStore(

const itemActions = computed(() => _actionFns.getItemActions({}));

const hasActiveReviewStage = props.reviewRoundId ? true : false;

function enrichActionArg(args) {
return {
submissionStageId: props.submissionStageId,
Expand All @@ -86,6 +88,7 @@ export const useReviewerSuggestionManagerStore = defineComponentStore(
_actionFns,
itemActions,
reviewerSuggestionApprove,
hasActiveReviewStage,
};
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,14 @@ export const WorkflowConfig = {

return items;
},
getSecondaryItems: ({submission, selectedReviewRound, selectedStageId}) => {
getSecondaryItems: ({
submission,
selectedReviewRound,
selectedStageId,
pageInitConfig,
}) => {
const items = [];

items.push({
component: 'ParticipantManager',
props: {
Expand All @@ -119,6 +125,17 @@ export const WorkflowConfig = {
},
});

if (pageInitConfig.publicationSettings.isReviewerSuggestionEnabled) {
items.push({
component: 'ReviewerSuggestionManager',
props: {
submission,
submissionStageId: selectedStageId,
reviewRoundId: selectedReviewRound?.id,
},
});
}

return items;
},

Expand Down

0 comments on commit 5cfc2bd

Please sign in to comment.