Skip to content
Snippets Groups Projects
Commit b7cdf747 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

fix: change refused status to declined and wordings

BREAKING CHANGE: applies for new invitations or purge db
parent 9fe0ab70
No related branches found
No related tags found
1 merge request!6Agree/Decline to work on a manuscript
...@@ -14,7 +14,7 @@ const ReviewerDecision = ({ showAcceptModal, showDeclineModal, ...rest }) => ( ...@@ -14,7 +14,7 @@ const ReviewerDecision = ({ showAcceptModal, showDeclineModal, ...rest }) => (
<div> <div>
<DecisionButton onClick={showDeclineModal}>Decline</DecisionButton> <DecisionButton onClick={showDeclineModal}>Decline</DecisionButton>
<DecisionButton onClick={showAcceptModal} primary> <DecisionButton onClick={showAcceptModal} primary>
Accept Agree
</DecisionButton> </DecisionButton>
</div> </div>
) )
...@@ -49,6 +49,7 @@ export default compose( ...@@ -49,6 +49,7 @@ export default compose(
}) => () => { }) => () => {
showModal({ showModal({
title: 'Agree to review Manuscript?', title: 'Agree to review Manuscript?',
confirmText: 'Agree',
onConfirm: () => { onConfirm: () => {
reviewerDecision(invitation.id, project.id, true).then( reviewerDecision(invitation.id, project.id, true).then(
decisionSuccess, decisionSuccess,
...@@ -65,6 +66,7 @@ export default compose( ...@@ -65,6 +66,7 @@ export default compose(
}) => () => { }) => () => {
showModal({ showModal({
title: 'Decline to review Manuscript?', title: 'Decline to review Manuscript?',
confirmText: 'Decline',
onConfirm: () => { onConfirm: () => {
reviewerDecision(invitation.id, project.id, false).then( reviewerDecision(invitation.id, project.id, false).then(
decisionSuccess, decisionSuccess,
......
...@@ -24,7 +24,7 @@ const reviewerReduce = (acc, r) => ({ ...@@ -24,7 +24,7 @@ const reviewerReduce = (acc, r) => ({
}) })
const invitationReduce = (acc, i) => { const invitationReduce = (acc, i) => {
const key = i.isAccepted ? 'accepted' : 'refused' const key = i.isAccepted ? 'accepted' : 'declined'
return { return {
...acc, ...acc,
[key]: acc[key] + 1, [key]: acc[key] + 1,
...@@ -60,7 +60,7 @@ export default compose( ...@@ -60,7 +60,7 @@ export default compose(
type === BREAKDOWN_TYPES.invitation ? invitationReduce : reviewerReduce, type === BREAKDOWN_TYPES.invitation ? invitationReduce : reviewerReduce,
{ {
accepted: 0, accepted: 0,
refused: 0, declined: 0,
}, },
) )
...@@ -68,7 +68,7 @@ export default compose( ...@@ -68,7 +68,7 @@ export default compose(
<BreakdownText> <BreakdownText>
<b>{values.length}</b> invited, <b>{values.length}</b> invited,
<b> {report.accepted}</b> agreed, <b> {report.accepted}</b> agreed,
<b> {report.refused}</b> declined <b> {report.declined}</b> declined
</BreakdownText> </BreakdownText>
) )
}, },
......
...@@ -4,7 +4,7 @@ export const orderReviewers = r => { ...@@ -4,7 +4,7 @@ export const orderReviewers = r => {
return -1 return -1
case 'accepted': case 'accepted':
return 0 return 0
case 'refused': case 'declined':
default: default:
return 1 return 1
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment