Skip to content

Commit

Permalink
pkp/pkp-lib#4787 WIP : suggestion lists to reviewers list in review s…
Browse files Browse the repository at this point in the history
…tage
  • Loading branch information
touhidurabir committed Dec 2, 2024
1 parent a27ed04 commit 98b3276
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/ListPanel/users/SelectReviewerListPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
:stage-id="getParams.reviewStage"
:review-round-id="getParams.reviewRoundId"
:select-reviewer-label="selectReviewerLabel"
:currently-assigned="
currentlyAssigned.includes(item.existingUserId)
"
:currently-assigned-label="currentlyAssignedLabel"
@update:suggestions="updateReviewerSuggestionList"
/>
</template>
Expand Down Expand Up @@ -478,6 +482,9 @@ export default {
headers: {
'X-Csrf-Token': pkp.currentUser.csrfToken,
},
data: {
include_reviewer_data: true,
},
error: this.ajaxErrorCallback,
success(r) {
// TODO : may be some better appraoch than this ?
Expand All @@ -487,6 +494,13 @@ export default {
reviewerSuggestion.approvedAt = r.approvedAt;
}
});
if (r.reviewer) {
let reviewers = this.items.map((i) => i);
reviewers.push(r.reviewer);
this.setItems(reviewers, this.itemsMax + 1);
this.currentlyAssigned.push(r.reviewer.id);
}
}
},
complete(r) {
Expand Down

0 comments on commit 98b3276

Please sign in to comment.