Skip to content
Snippets Groups Projects
Commit 778d6623 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

fix(status-update): remove manuscript status updates from frontend

parent fa6857cd
No related branches found
No related tags found
1 merge request!6Agree/Decline to work on a manuscript
......@@ -45,14 +45,6 @@ const submitManuscript = (
...values,
}),
)
.then(() =>
dispatch(
actions.updateCollection({
id: project.id,
status: 'submitted',
}),
),
)
.then(() => {
history.push(redirectPath, { project: project.id, version: version.id })
})
......
......@@ -35,22 +35,16 @@ class AssignHEModal extends React.Component {
showModal,
hideModal,
setModalError,
updateCollection,
getCollections,
} = this.props
assignHandlingEditor(email, collectionId).then(
() => {
updateCollection({
id: collectionId,
status: 'he-invited',
}).then(() => {
getCollections()
hideModal()
showModal({
type: 'confirmation',
title: 'Assignation Sent',
cancelText: 'OK',
})
getCollections()
hideModal()
showModal({
type: 'confirmation',
title: 'Assignation Sent',
cancelText: 'OK',
})
},
e => {
......
......@@ -65,7 +65,6 @@ export default compose(
connect(null, {
revokeHandlingEditor,
assignHandlingEditor,
updateCollection: actions.updateCollection,
getCollections: actions.getCollections,
}),
withTheme,
......@@ -85,7 +84,6 @@ export default compose(
getHandlingEditor,
hideModal,
setModalError,
updateCollection,
getCollections,
}) => actionType => {
const editor = get(project, 'handlingEditor')
......@@ -112,16 +110,11 @@ export default compose(
confirmText: 'Revoke invite',
onConfirm: () =>
revokeHandlingEditor(invitation.id, project.id).then(() => {
updateCollection({
id: project.id,
status: 'submitted',
}).then(() => {
getCollections()
hideModal()
showModal({
type: 'success',
title: 'Handling Editor Assignation Revoked',
})
getCollections()
hideModal()
showModal({
type: 'success',
title: 'Handling Editor Assignation Revoked',
})
}, handleError(setModalError)),
}
......
......@@ -55,7 +55,6 @@ const HandlingEditorActions = ({ showHEModal }) => (
export default compose(
connect(null, {
getCollections: actions.getCollections,
updateCollection: actions.updateCollection,
}),
withModal({
modalKey: 'he-action',
......@@ -68,7 +67,6 @@ export default compose(
hideModal,
project,
getCollections,
updateCollection,
setModalError,
}) => modalType => {
const invitation = project.invitations.find(
......@@ -80,13 +78,8 @@ export default compose(
subtitle: `Clicking "Agree" will assign you as Handling Editor for this Manuscript.`,
onConfirm: () => {
handlingEditorDecision(invitation.id, project.id, true).then(() => {
updateCollection({
id: project.id,
status: 'under-review',
}).then(() => {
getCollections()
hideModal()
})
getCollections()
hideModal()
}, handleError(setModalError))
},
}
......@@ -97,13 +90,8 @@ export default compose(
onConfirm: reason => () => {
handlingEditorDecision(invitation.id, project.id, false, reason).then(
() => {
updateCollection({
id: project.id,
status: 'submitted',
}).then(() => {
getCollections()
hideModal()
})
getCollections()
hideModal()
},
handleError(setModalError),
)
......
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