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
62e45441
Commit
62e45441
authored
6 years ago
by
Tania Fecheta
Browse files
Options
Downloads
Plain Diff
feat(authsome-mode): filter out manuscripts with deleted status
parents
1c079ba6
d8192034
No related branches found
No related tags found
3 merge requests
!222
Sprint #26
,
!217
Sprint #26
,
!198
Hin 1166 admin delete manuscript
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/component-faraday-ui/src/ManuscriptCard.js
+51
-27
51 additions, 27 deletions
packages/component-faraday-ui/src/ManuscriptCard.js
packages/components-faraday/src/components/Dashboard/DashboardPage.js
+5
-3
5 additions, 3 deletions
...ponents-faraday/src/components/Dashboard/DashboardPage.js
with
56 additions
and
30 deletions
packages/component-faraday-ui/src/ManuscriptCard.js
+
51
−
27
View file @
62e45441
...
@@ -26,6 +26,7 @@ const ManuscriptCard = ({
...
@@ -26,6 +26,7 @@ const ManuscriptCard = ({
isAdmin
,
isAdmin
,
isDraft
,
isDraft
,
onDelete
,
onDelete
,
isDeleted
,
isFetching
,
isFetching
,
deleteManuscript
,
deleteManuscript
,
onCardClick
,
onCardClick
,
...
@@ -87,34 +88,56 @@ const ManuscriptCard = ({
...
@@ -87,34 +88,56 @@ const ManuscriptCard = ({
<
ReviewerBreakdown
fragment
=
{
fragment
}
label
=
"
Reviewer Reports
"
/>
<
ReviewerBreakdown
fragment
=
{
fragment
}
label
=
"
Reviewer Reports
"
/>
<
/Fragment
>
<
/Fragment
>
)}
)}
{
isDraft
&&
(
<
Item
justify
=
"
flex-end
"
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
<
OpenModal
confirmText
=
"
Delete
"
isFetching
=
{
isFetching
}
modalKey
=
{
`delete-
${
collId
}
`
}
onConfirm
=
{
onDelete
}
title
=
"
Are you sure you want to delete this submission?
"
>
{
showModal
=>
(
<
ActionLink
height
=
{
16
}
icon
=
"
trash
"
onClick
=
{
showModal
}
size
=
"
small
"
>
Delete
<
/ActionLink
>
)}
<
/OpenModal
>
<
/Item
>
)}
{
isDraft
&&
(
<
Item
justify
=
"
flex-end
"
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
<
OpenModal
confirmText
=
"
Delete
"
isFetching
=
{
isFetching
}
modalKey
=
{
`delete-
${
collId
}
`
}
onConfirm
=
{
onDelete
}
title
=
"
Are you sure you want to delete this submission?
"
>
{
showModal
=>
(
<
ActionLink
>
<
DeleteIcon
fontIcon
=
"
deleteIcon
"
onClick
=
{
showModal
}
paddingBottom
=
{
2
}
paddingRight
=
{
0
}
size
=
{
1.6
}
>
DELETE
<
/DeleteIcon
>
<
/ActionLink
>
)}
<
/OpenModal
>
<
/Item
>
)}
{
isAdmin
&&
{
isAdmin
&&
isDraft
&&
(
!
isDraft
&&
<
Item
justify
=
"
flex-end
"
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
!
isDeleted
&&
(
<
OpenModal
confirmText
=
"
Delete
"
isFetching
=
{
isFetching
}
modalKey
=
{
`delete-
${
collId
}
`
}
onConfirm
=
{
onDelete
}
title
=
"
Are you sure you want to delete this submission?
"
>
{
showModal
=>
(
<
ActionLink
>
<
DeleteIcon
fontIcon
=
"
deleteIcon
"
onClick
=
{
showModal
}
paddingBottom
=
{
2
}
paddingRight
=
{
0
}
size
=
{
1.6
}
>
DELETE
<
/DeleteIcon
>
<
/ActionLink
>
)}
<
/OpenModal
>
<
/Item
>
)}
{
isAdmin
&&
!
isDraft
&&
(
<
Item
justify
=
"
flex-end
"
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
<
Item
justify
=
"
flex-end
"
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
<
FormModal
<
FormModal
collectionId
=
{
collId
}
collectionId
=
{
collId
}
...
@@ -182,6 +205,7 @@ export default compose(
...
@@ -182,6 +205,7 @@ export default compose(
t
=>
t
.
value
===
get
(
metadata
,
'
type
'
,
''
),
t
=>
t
.
value
===
get
(
metadata
,
'
type
'
,
''
),
),
),
isDraft
:
status
===
'
draft
'
,
isDraft
:
status
===
'
draft
'
,
isDeleted
:
status
===
'
deleted
'
,
}),
}),
),
),
setDisplayName
(
'
ManuscriptCard
'
),
setDisplayName
(
'
ManuscriptCard
'
),
...
...
This diff is collapsed.
Click to expand it.
packages/components-faraday/src/components/Dashboard/DashboardPage.js
+
5
−
3
View file @
62e45441
...
@@ -46,9 +46,11 @@ export default compose(
...
@@ -46,9 +46,11 @@ export default compose(
deleteCollection
:
actions
.
deleteCollection
,
deleteCollection
:
actions
.
deleteCollection
,
},
},
),
),
shouldUpdate
(
shouldUpdate
((
props
,
nextProps
)
=>
(
props
,
nextProps
)
=>
props
.
collections
.
some
(
props
.
collections
.
length
!==
nextProps
.
collections
.
length
,
(
collection
,
index
)
=>
collection
.
status
!==
nextProps
.
collections
[
index
].
status
,
),
),
),
withRouter
,
withRouter
,
withJournal
,
withJournal
,
...
...
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