diff --git a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js index 982b3a240d16cb977aad022fc3c171c463633350..f5154945aded6835452a393d09eda3f4894e86ee 100644 --- a/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js +++ b/packages/component-faraday-ui/src/manuscriptDetails/ManuscriptEicDecision.js @@ -155,6 +155,7 @@ export default compose( values, dispatch, { + reset, submitDecision, showModal, setFetching, @@ -164,6 +165,7 @@ export default compose( }, ) => { showModal({ + reset, title: `${modalTitle}?`, confirmText: modalTitle, subtitle: modalSubtitle, diff --git a/packages/component-manuscript/src/handleRecommendation/withHandleRecommendation.js b/packages/component-manuscript/src/handleRecommendation/withHandleRecommendation.js index 59831291296fdf9f2a82e559540090777e37a15f..7c3bbe4d5f43464e7f7c417ce3b0983a41eeb146 100644 --- a/packages/component-manuscript/src/handleRecommendation/withHandleRecommendation.js +++ b/packages/component-manuscript/src/handleRecommendation/withHandleRecommendation.js @@ -11,22 +11,23 @@ export default compose( fragment, collection, fetchUpdatedCollection, - }) => (values, modalProps) => { + }) => (values, { setFetching, setModalError, hideModal, reset }) => { const recommendation = parseEicDecision(values) - modalProps.setFetching(true) + setFetching(true) createRecommendation({ recommendation, fragmentId: fragment.id, collectionId: collection.id, }) .then(() => { - modalProps.setFetching(false) - modalProps.hideModal() + setFetching(false) + hideModal() + reset() fetchUpdatedCollection() }) .catch(err => { - modalProps.setFetching(false) - handleError(modalProps.setModalError)(err) + setFetching(false) + handleError(setModalError)(err) }) }, onEditorialRecommendation: ({