Skip to content
Snippets Groups Projects
Commit d2ccab36 authored by Mihail Hagiu's avatar Mihail Hagiu
Browse files

fix(ManuscriptDecision): Changes applies to EiC and Admin too

parent 66894936
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!213fix(ManuscriptDecision): Changes applies to EiC and Admin too
...@@ -155,6 +155,7 @@ export default compose( ...@@ -155,6 +155,7 @@ export default compose(
values, values,
dispatch, dispatch,
{ {
reset,
submitDecision, submitDecision,
showModal, showModal,
setFetching, setFetching,
...@@ -164,6 +165,7 @@ export default compose( ...@@ -164,6 +165,7 @@ export default compose(
}, },
) => { ) => {
showModal({ showModal({
reset,
title: `${modalTitle}?`, title: `${modalTitle}?`,
confirmText: modalTitle, confirmText: modalTitle,
subtitle: modalSubtitle, subtitle: modalSubtitle,
......
...@@ -11,22 +11,23 @@ export default compose( ...@@ -11,22 +11,23 @@ export default compose(
fragment, fragment,
collection, collection,
fetchUpdatedCollection, fetchUpdatedCollection,
}) => (values, modalProps) => { }) => (values, { setFetching, setModalError, hideModal, reset }) => {
const recommendation = parseEicDecision(values) const recommendation = parseEicDecision(values)
modalProps.setFetching(true) setFetching(true)
createRecommendation({ createRecommendation({
recommendation, recommendation,
fragmentId: fragment.id, fragmentId: fragment.id,
collectionId: collection.id, collectionId: collection.id,
}) })
.then(() => { .then(() => {
modalProps.setFetching(false) setFetching(false)
modalProps.hideModal() hideModal()
reset()
fetchUpdatedCollection() fetchUpdatedCollection()
}) })
.catch(err => { .catch(err => {
modalProps.setFetching(false) setFetching(false)
handleError(modalProps.setModalError)(err) handleError(setModalError)(err)
}) })
}, },
onEditorialRecommendation: ({ onEditorialRecommendation: ({
......
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