Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xpub-faraday
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
xpub
xpub-faraday
Commits
792c0f57
Commit
792c0f57
authored
6 years ago
by
Alexandru Munteanu
Browse files
Options
Downloads
Patches
Plain Diff
feat(submit-revision): add confirmation modal
parent
9e998751
No related branches found
No related tags found
1 merge request
!14
Sprint #15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/component-manuscript/src/components/SubmitRevision.js
+7
-0
7 additions, 0 deletions
...ges/component-manuscript/src/components/SubmitRevision.js
packages/component-manuscript/src/components/utils.js
+12
-4
12 additions, 4 deletions
packages/component-manuscript/src/components/utils.js
with
19 additions
and
4 deletions
packages/component-manuscript/src/components/SubmitRevision.js
+
7
−
0
View file @
792c0f57
...
@@ -15,6 +15,10 @@ import {
...
@@ -15,6 +15,10 @@ import {
getFormValues
,
getFormValues
,
change
as
changeForm
,
change
as
changeForm
,
}
from
'
redux-form
'
}
from
'
redux-form
'
import
{
withModal
,
ConfirmationModal
,
}
from
'
pubsweet-component-modal/src/components
'
import
{
AuthorList
,
Files
}
from
'
pubsweet-components-faraday/src/components
'
import
{
AuthorList
,
Files
}
from
'
pubsweet-components-faraday/src/components
'
import
{
submitRevision
}
from
'
pubsweet-component-wizard/src/redux/conversion
'
import
{
submitRevision
}
from
'
pubsweet-component-wizard/src/redux/conversion
'
import
AutosaveIndicator
from
'
pubsweet-component-wizard/src/components/AutosaveIndicator
'
import
AutosaveIndicator
from
'
pubsweet-component-wizard/src/components/AutosaveIndicator
'
...
@@ -141,6 +145,9 @@ export default compose(
...
@@ -141,6 +145,9 @@ export default compose(
version
,
version
,
}),
}),
),
),
withModal
(
props
=>
({
modalComponent
:
ConfirmationModal
,
})),
connect
(
connect
(
state
=>
({
state
=>
({
fileFetching
:
getRequestStatus
(
state
),
fileFetching
:
getRequestStatus
(
state
),
...
...
This diff is collapsed.
Click to expand it.
packages/component-manuscript/src/components/utils.js
+
12
−
4
View file @
792c0f57
...
@@ -160,11 +160,11 @@ export const onReviewSubmit = (
...
@@ -160,11 +160,11 @@ export const onReviewSubmit = (
values
,
values
,
dispatch
,
dispatch
,
{
{
isSubmitting
,
showModal
,
hideModal
,
project
,
project
,
version
,
version
,
showModal
,
hideModal
,
isSubmitting
,
updateRecommendation
,
updateRecommendation
,
},
},
)
=>
{
)
=>
{
...
@@ -203,9 +203,17 @@ export const onRevisionChange = debounce(_onRevisionChange, 1000, {
...
@@ -203,9 +203,17 @@ export const onRevisionChange = debounce(_onRevisionChange, 1000, {
export
const
onRevisionSubmit
=
(
export
const
onRevisionSubmit
=
(
values
,
values
,
dispatch
,
dispatch
,
{
submitRevision
,
version
,
project
},
{
submitRevision
,
version
,
project
,
showModal
,
hideModal
},
)
=>
{
)
=>
{
// submitRevision(project.id, version.id)
// submitRevision(project.id, version.id)
showModal
({
title
:
'
Ready to submit your revision?
'
,
subtitle
:
`Once submitted, the submission can't be modified.`
,
onConfirm
:
()
=>
{
hideModal
()
},
onCancel
:
hideModal
,
})
}
}
// revision validators
// revision validators
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment