Skip to content

Commit

Permalink
pkp/pkp-lib#4787 Reviewer suggestions 3 case consider WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Nov 27, 2024
1 parent 5cfc2bd commit 4469a7b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ export default {
* @param
*/
select() {
if (this.item.existingUserId && this.item.existingReviewerRole) {
pkp.eventBus.$emit('selected:reviewer', {
id: this.item.existingUserId,
fullName: this.localize(this.item.fullName),
});
return;
}
const {t} = useLocalize();
const {openLegacyModal} = useLegacyGridUrl({
Expand All @@ -110,7 +118,11 @@ export default {
submissionId: this.submissionId,
stageId: this.stageId,
reviewRoundId: this.reviewRoundId,
selectionType: pkp.const.REVIEWER_SELECT_CREATE,
selectionType: this.item.existingUserId
? this.item.existingReviewerRole
? pkp.const.REVIEWER_SELECT_ADVANCED_SEARCH
: pkp.const.REVIEWER_SELECT_ENROLL_EXISTING
: pkp.const.REVIEWER_SELECT_CREATE,
reviewerSuggestionId: this.item.id,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export const useReviewerSuggestionManagerStore = defineComponentStore(
fullName: localize(reviewerSuggestion.fullName),
affiliation: localize(reviewerSuggestion.affiliation),
suggestionReason: localize(reviewerSuggestion.suggestionReason),
existingReviewerRole: reviewerSuggestion.existingReviewerRole,
existingUserId: reviewerSuggestion.existingUserId,
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ export function useReviewerSuggestionManagerActions() {
submissionId: submission.id,
stageId: submissionStageId,
reviewRoundId: reviewRoundId,
selectionType: pkp.const.REVIEWER_SELECT_CREATE,
selectionType: reviewerSuggestion.existingUserId
? reviewerSuggestion.existingReviewerRole
? pkp.const.REVIEWER_SELECT_ADVANCED_SEARCH
: pkp.const.REVIEWER_SELECT_ENROLL_EXISTING
: pkp.const.REVIEWER_SELECT_CREATE,
reviewerSuggestionId: reviewerSuggestion.id,
},
});
Expand Down

0 comments on commit 4469a7b

Please sign in to comment.