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

Merge branch 'HIN-1243-Editorial-Decision-Form-Reset' into 'develop'

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

See merge request !210
parents f698fd43 ddd098bc
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,8 @@ const HERecommendation = ({
handleSubmit,
formValues,
highlight,
expanded,
toggle,
rejectRecommendation,
publishRecommendation,
minorRevisionRecommendation,
......@@ -86,10 +88,11 @@ const HERecommendation = ({
...rest
}) => (
<ContextualBox
expanded
expanded={expanded}
highlight={highlight}
label="Your Editorial Recommendation"
mb={2}
toggle={toggle}
{...rest}
>
<Root>
......@@ -222,6 +225,8 @@ export default compose(
values,
dispatch,
{
reset,
toggle,
onRecommendationSubmit,
showModal,
setFetching,
......@@ -230,13 +235,14 @@ export default compose(
},
) => {
showModal({
reset,
title: `${modalTitle}?`,
confirmText:
confirmMessage === 'Submit Recommendation'
? 'Submit'
: confirmMessage,
onConfirm: props => {
toggle()
onRecommendationSubmit(parseFormValues(values), {
...props,
setFetching,
......
......@@ -33,7 +33,10 @@ export default compose(
fragment,
collection,
fetchUpdatedCollection,
}) => (recommendation, { hideModal, setFetching, setModalError }) => {
}) => (
recommendation,
{ hideModal, setFetching, setModalError, reset },
) => {
setFetching(true)
createRecommendation({
recommendation,
......@@ -42,6 +45,7 @@ export default compose(
})
.then(r => {
setFetching(false)
reset()
hideModal()
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