Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kotahi
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Omo Oaiya
Kotahi
Commits
e540a112
Commit
e540a112
authored
3 years ago
by
Ben Whitmore
Browse files
Options
Downloads
Patches
Plain Diff
fix(review): fix a small error in cache update
parent
d9376f22
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/components/component-review/src/components/ReviewPage.js
+2
-2
2 additions, 2 deletions
app/components/component-review/src/components/ReviewPage.js
server/model-review/src/graphql.js
+3
-2
3 additions, 2 deletions
server/model-review/src/graphql.js
with
5 additions
and
4 deletions
app/components/component-review/src/components/ReviewPage.js
+
2
−
2
View file @
e540a112
...
@@ -206,7 +206,7 @@ const ReviewPage = ({ match, ...props }) => {
...
@@ -206,7 +206,7 @@ const ReviewPage = ({ match, ...props }) => {
[]
[]
).
find
(
statusTemp
=>
statusTemp
.
user
===
currentUser
.
id
)
||
{}
).
find
(
statusTemp
=>
statusTemp
.
user
===
currentUser
.
id
)
||
{}
const
updateReview
=
(
review
,
file
)
=>
{
const
updateReview
=
review
=>
{
const
reviewData
=
{
const
reviewData
=
{
recommendation
:
review
.
recommendation
,
recommendation
:
review
.
recommendation
,
manuscriptId
:
manuscript
.
id
,
manuscriptId
:
manuscript
.
id
,
...
@@ -243,7 +243,7 @@ const ReviewPage = ({ match, ...props }) => {
...
@@ -243,7 +243,7 @@ const ReviewPage = ({ match, ...props }) => {
if
(
if
(
existingReviewRefs
.
some
(
existingReviewRefs
.
some
(
ref
=>
readField
(
'
id
'
,
ref
)
===
updateReview
.
id
,
ref
=>
readField
(
'
id
'
,
ref
)
===
updateReview
Temp
.
id
,
)
)
)
{
)
{
return
existingReviewRefs
return
existingReviewRefs
...
...
This diff is collapsed.
Click to expand it.
server/model-review/src/graphql.js
+
3
−
2
View file @
e540a112
...
@@ -5,8 +5,7 @@ const resolvers = {
...
@@ -5,8 +5,7 @@ const resolvers = {
Mutation
:
{
Mutation
:
{
async
updateReview
(
_
,
{
id
,
input
},
ctx
)
{
async
updateReview
(
_
,
{
id
,
input
},
ctx
)
{
// We process comment fields into array
// We process comment fields into array
input
.
user
=
ctx
.
user
const
processedReview
=
{
...
input
,
user
:
ctx
.
user
}
const
processedReview
=
Object
.
assign
({},
input
)
processedReview
.
comments
=
[
processedReview
.
comments
=
[
input
.
reviewComment
,
input
.
reviewComment
,
input
.
confidentialComment
,
input
.
confidentialComment
,
...
@@ -34,9 +33,11 @@ const resolvers = {
...
@@ -34,9 +33,11 @@ const resolvers = {
async
completeReview
(
_
,
{
id
},
ctx
)
{
async
completeReview
(
_
,
{
id
},
ctx
)
{
const
review
=
await
ctx
.
models
.
Review
.
query
().
findById
(
id
)
const
review
=
await
ctx
.
models
.
Review
.
query
().
findById
(
id
)
const
manuscript
=
await
ctx
.
models
.
Manuscript
.
query
().
findById
(
const
manuscript
=
await
ctx
.
models
.
Manuscript
.
query
().
findById
(
review
.
manuscriptId
,
review
.
manuscriptId
,
)
)
const
team
=
await
manuscript
const
team
=
await
manuscript
.
$relatedQuery
(
'
teams
'
)
.
$relatedQuery
(
'
teams
'
)
.
where
(
'
role
'
,
'
reviewer
'
)
.
where
(
'
role
'
,
'
reviewer
'
)
...
...
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