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
f98d9eba
Commit
f98d9eba
authored
6 years ago
by
Iosif Boanca
Browse files
Options
Downloads
Patches
Plain Diff
name was split in firstName and lastName
parent
d117a605
No related branches found
No related tags found
2 merge requests
!110
Sprint 21 Features
,
!91
Hin 904 fixes after merge
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/component-manuscript/src/components/ManuscriptPage.js
+27
-21
27 additions, 21 deletions
...ges/component-manuscript/src/components/ManuscriptPage.js
packages/component-manuscript/src/components/utils.js
+1
-18
1 addition, 18 deletions
packages/component-manuscript/src/components/utils.js
with
28 additions
and
39 deletions
packages/component-manuscript/src/components/ManuscriptPage.js
+
27
−
21
View file @
f98d9eba
...
@@ -3,7 +3,7 @@ import { actions } from 'pubsweet-client'
...
@@ -3,7 +3,7 @@ import { actions } from 'pubsweet-client'
import
{
ConnectPage
}
from
'
xpub-connect
'
import
{
ConnectPage
}
from
'
xpub-connect
'
import
{
withJournal
}
from
'
xpub-journal
'
import
{
withJournal
}
from
'
xpub-journal
'
import
{
withRouter
}
from
'
react-router-dom
'
import
{
withRouter
}
from
'
react-router-dom
'
import
{
head
,
get
,
isUndefined
}
from
'
lodash
'
import
{
head
,
get
,
last
,
isUndefined
}
from
'
lodash
'
import
{
getFormValues
,
change
as
changeForm
}
from
'
redux-form
'
import
{
getFormValues
,
change
as
changeForm
}
from
'
redux-form
'
import
{
import
{
selectFragment
,
selectFragment
,
...
@@ -84,7 +84,7 @@ export default compose(
...
@@ -84,7 +84,7 @@ export default compose(
withJournal
,
withJournal
,
withRouter
,
withRouter
,
withFetching
,
withFetching
,
withState
(
'
publonReviewers
'
,
'
setPub
'
,
[]),
withState
(
'
publonReviewers
'
,
'
setPub
lonsReviewers
'
,
[]),
withState
(
'
editorInChief
'
,
'
setEiC
'
,
'
N/A
'
),
withState
(
'
editorInChief
'
,
'
setEiC
'
,
'
N/A
'
),
ConnectPage
(({
match
})
=>
[
ConnectPage
(({
match
})
=>
[
actions
.
getCollection
({
id
:
match
.
params
.
project
}),
actions
.
getCollection
({
id
:
match
.
params
.
project
}),
...
@@ -222,8 +222,6 @@ export default compose(
...
@@ -222,8 +222,6 @@ export default compose(
setEiC
(
`
${
firstName
}
${
lastName
}
`
)
setEiC
(
`
${
firstName
}
${
lastName
}
`
)
}
}
},
},
setPublons
:
({
setPub
})
=>
(
publonReviewers
=
[])
=>
setPub
(
publonReviewers
),
assignHE
:
({
assignHE
:
({
assignHandlingEditor
,
assignHandlingEditor
,
fetchUpdatedCollection
,
fetchUpdatedCollection
,
...
@@ -423,7 +421,6 @@ export default compose(
...
@@ -423,7 +421,6 @@ export default compose(
collection
,
collection
,
fragment
,
fragment
,
fetchUpdatedCollection
,
fetchUpdatedCollection
,
setPublons
,
setFetching
:
setListFetching
,
setFetching
:
setListFetching
,
setError
,
setError
,
clearError
,
clearError
,
...
@@ -433,19 +430,15 @@ export default compose(
...
@@ -433,19 +430,15 @@ export default compose(
reviewerData
:
values
,
reviewerData
:
values
,
fragmentId
:
fragment
.
id
,
fragmentId
:
fragment
.
id
,
collectionId
:
collection
.
id
,
collectionId
:
collection
.
id
,
isPublon
s
:
true
,
isPublon
:
true
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
setFetching
(
false
)
setFetching
(
false
)
hideModal
()
hideModal
()
fetchUpdatedCollection
()
fetchUpdatedCollection
()
getPublonsReviewers
({
getPublonsReviewers
(
'
plm
'
)
// fragment.id)
fragmentId
:
fragment
.
id
,
.
then
(
r
=>
console
.
log
(
'
dupa publons
'
,
r
))
setPublons
,
.
catch
(
handleError
(
setError
))
setFetching
:
setListFetching
,
setError
,
clearError
,
})
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
setFetching
(
false
)
setFetching
(
false
)
...
@@ -485,11 +478,11 @@ export default compose(
...
@@ -485,11 +478,11 @@ export default compose(
match
,
match
,
history
,
history
,
location
,
location
,
setPublons
,
shouldReview
,
shouldReview
,
reviewerReports
,
reviewerReports
,
setEditorInChief
,
setEditorInChief
,
clearCustomError
,
clearCustomError
,
setPublonsReviewers
,
hasManuscriptFailure
,
hasManuscriptFailure
,
fetchUpdatedCollection
,
fetchUpdatedCollection
,
currentUser
:
{
currentUser
:
{
...
@@ -523,13 +516,26 @@ export default compose(
...
@@ -523,13 +516,26 @@ export default compose(
)
)
if
(
canInviteReviewers
)
{
if
(
canInviteReviewers
)
{
getPublonsReviewers
({
clearError
()
fragmentId
,
setFetching
(
true
)
setPublons
,
getPublonsReviewers
(
fragmentId
)
setFetching
,
.
then
(
res
=>
{
setError
,
setFetching
(
false
)
clearError
,
setPublonsReviewers
(
})
res
.
map
(
r
=>
{
const
names
=
r
.
name
.
split
(
'
'
)
return
{
...
r
,
firstName
:
names
[
0
],
lastName
:
last
(
names
),
}
}),
)
})
.
catch
(
e
=>
{
setFetching
(
false
)
handleError
(
setError
)(
e
)
})
}
}
if
(
isInvitedHE
)
{
if
(
isInvitedHE
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/component-manuscript/src/components/utils.js
+
1
−
18
View file @
f98d9eba
...
@@ -306,22 +306,5 @@ export const parseEicDecision = ({ decision, message }) => ({
...
@@ -306,22 +306,5 @@ export const parseEicDecision = ({ decision, message }) => ({
})
})
// handle publons
// handle publons
export
const
getPublons
API
=
fragmentId
=>
export
const
getPublons
Reviewers
=
fragmentId
=>
apiGet
(
`/fragments/
${
fragmentId
}
/publons`
)
apiGet
(
`/fragments/
${
fragmentId
}
/publons`
)
export
const
getPublonsReviewers
=
({
fragmentId
,
setPublons
,
setFetching
,
setError
,
clearError
,
})
=>
{
clearError
()
setFetching
(
true
)
getPublonsAPI
(
fragmentId
)
.
then
(
res
=>
{
setPublons
(
res
)
setFetching
(
false
)
})
.
catch
(
handleError
(
setError
))
}
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