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

feat(YourEditorialDecision): Forms are now reset and YourEditorialDecision...

feat(YourEditorialDecision): Forms are now reset and YourEditorialDecision contextual box is toggled
parent 6575f403
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!210feat(YourEditorialDecision): Forms are now reset and YourEditorialDecision…
...@@ -79,6 +79,7 @@ const HERecommendation = ({ ...@@ -79,6 +79,7 @@ const HERecommendation = ({
handleSubmit, handleSubmit,
formValues, formValues,
highlight, highlight,
toggle,
rejectRecommendation, rejectRecommendation,
publishRecommendation, publishRecommendation,
minorRevisionRecommendation, minorRevisionRecommendation,
...@@ -90,6 +91,7 @@ const HERecommendation = ({ ...@@ -90,6 +91,7 @@ const HERecommendation = ({
highlight={highlight} highlight={highlight}
label="Your Editorial Recommendation" label="Your Editorial Recommendation"
mb={2} mb={2}
toggle={toggle}
{...rest} {...rest}
> >
<Root> <Root>
...@@ -222,6 +224,8 @@ export default compose( ...@@ -222,6 +224,8 @@ export default compose(
values, values,
dispatch, dispatch,
{ {
reset,
toggle,
onRecommendationSubmit, onRecommendationSubmit,
showModal, showModal,
setFetching, setFetching,
...@@ -230,13 +234,14 @@ export default compose( ...@@ -230,13 +234,14 @@ export default compose(
}, },
) => { ) => {
showModal({ showModal({
reset,
title: `${modalTitle}?`, title: `${modalTitle}?`,
confirmText: confirmText:
confirmMessage === 'Submit Recommendation' confirmMessage === 'Submit Recommendation'
? 'Submit' ? 'Submit'
: confirmMessage, : confirmMessage,
onConfirm: props => { onConfirm: props => {
toggle()
onRecommendationSubmit(parseFormValues(values), { onRecommendationSubmit(parseFormValues(values), {
...props, ...props,
setFetching, setFetching,
......
...@@ -33,7 +33,10 @@ export default compose( ...@@ -33,7 +33,10 @@ export default compose(
fragment, fragment,
collection, collection,
fetchUpdatedCollection, fetchUpdatedCollection,
}) => (recommendation, { hideModal, setFetching, setModalError }) => { }) => (
recommendation,
{ hideModal, setFetching, setModalError, reset },
) => {
setFetching(true) setFetching(true)
createRecommendation({ createRecommendation({
recommendation, recommendation,
...@@ -42,6 +45,7 @@ export default compose( ...@@ -42,6 +45,7 @@ export default compose(
}) })
.then(r => { .then(r => {
setFetching(false) setFetching(false)
reset()
hideModal() hideModal()
fetchUpdatedCollection() fetchUpdatedCollection()
}) })
......
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