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

fix(submission-flow): add initial values for the two new radio groups

parent d3afee00
No related branches found
No related tags found
1 merge request!43Sprint #19
......@@ -22,7 +22,6 @@ const StepTwo = ({
addAuthor,
changeForm,
formValues,
hasConflicts,
authorsError,
manuscriptTypes,
...rest
......
......@@ -130,7 +130,7 @@ export default compose(
},
),
withStateHandlers(
{ step: 1 },
{ step: 0 },
{
nextStep: ({ step }) => () => ({
step: Math.min(wizardSteps.length - 1, step + 1),
......@@ -155,7 +155,6 @@ export default compose(
authorsError:
(submitFailed && get(formSyncErrors, 'authors', '')) ||
reduxAuthorError,
hasConflicts: get(formValues, 'conflicts.hasConflicts', 'no') === 'yes',
}),
),
withHandlers({
......
......@@ -20,7 +20,11 @@ export const setInitialValues = ({ version }) => ({
files: get(version, 'files', {}),
authors: get(version, 'authors', []),
metadata: get(version, 'metadata', {}),
conflicts: get(version, 'conflicts', { hasConflicts: 'no' }),
conflicts: get(version, 'conflicts', {
hasConflicts: 'no',
hasDataAvailability: 'yes',
hasFunding: 'yes',
}),
declarations: get(version, 'declarations', { agree: false }),
},
})
......
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