Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
catalog.genesys-pgr.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Catalog
catalog.genesys-pgr.org
Commits
9793cde1
Commit
9793cde1
authored
Nov 20, 2018
by
Maxym Borodenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated reducers
parent
84e485e2
Pipeline
#7738
passed with stages
in 4 minutes
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
18 deletions
+9
-18
src/datasets/reducers/dashboard.ts
src/datasets/reducers/dashboard.ts
+2
-4
src/datasets/reducers/public.ts
src/datasets/reducers/public.ts
+2
-4
src/datasets/ui/dataset-stepper/steps/accessions-list/ListOfAccesion.tsx
.../dataset-stepper/steps/accessions-list/ListOfAccesion.tsx
+1
-2
src/datasets/ui/dataset-stepper/steps/accessions-list/index.tsx
...tasets/ui/dataset-stepper/steps/accessions-list/index.tsx
+2
-4
src/datasets/ui/dataset-stepper/steps/review/index.tsx
src/datasets/ui/dataset-stepper/steps/review/index.tsx
+2
-4
No files found.
src/datasets/reducers/dashboard.ts
View file @
9793cde1
...
...
@@ -12,13 +12,11 @@ import AccessionRef from 'model/accession/AccessionRef';
import
{
Page
}
from
'
model/common.model
'
;
const
INITIAL_STATE
:
{
currentUuid
:
string
,
dataset
:
Dataset
,
accessionRefs
:
Page
<
AccessionRef
>
paged
:
Page
<
Dataset
>
,
pagedQuery
:
any
,
}
=
{
currentUuid
:
null
,
dataset
:
null
,
accessionRefs
:
null
,
paged
:
null
,
...
...
@@ -37,11 +35,12 @@ function datasetsDashboard(state = INITIAL_STATE, action: { type?: string, paylo
}
case
RECEIVE_DATASET
:
{
const
receivedIndex
=
state
.
paged
?
_
.
findIndex
(
state
.
paged
.
content
,
(
item
)
=>
item
.
uuid
===
action
.
payload
.
uuid
)
:
-
1
;
const
mustRemoveAccessions
=
state
.
dataset
&&
(
action
.
payload
.
uuid
!==
state
.
dataset
.
uuid
);
if
(
receivedIndex
!==
-
1
)
{
return
update
(
state
,
{
dataset
:
{
$set
:
action
.
payload
},
accessionRefs
:
{
$set
:
action
.
payload
.
uuid
===
state
.
currentUuid
?
state
.
accessionRefs
:
null
},
accessionRefs
:
{
$set
:
mustRemoveAccessions
?
null
:
state
.
accessionRefs
},
paged
:
{
content
:
{
[
receivedIndex
]:
{
$set
:
action
.
payload
},
...
...
@@ -59,7 +58,6 @@ function datasetsDashboard(state = INITIAL_STATE, action: { type?: string, paylo
case
DASHBOARD_RECEIVE_ACCESSIONS_PAGE
:
{
return
update
(
state
,
{
accessionRefs
:
{
$set
:
action
.
payload
.
accessionRefs
},
currentUuid
:
{
$set
:
action
.
payload
.
currentUuid
},
});
}
...
...
src/datasets/reducers/public.ts
View file @
9793cde1
...
...
@@ -9,13 +9,11 @@ import AccessionRef from 'model/accession/AccessionRef';
import
{
Page
}
from
'
model/common.model
'
;
const
INITIAL_STATE
:
{
currentUuid
:
string
,
dataset
:
Dataset
,
accessionRefs
:
Page
<
AccessionRef
>
paged
:
Page
<
Dataset
>
,
pagedQuery
:
any
,
}
=
{
currentUuid
:
null
,
dataset
:
null
,
accessionRefs
:
null
,
paged
:
null
,
...
...
@@ -34,11 +32,12 @@ function datasetsPublic(state = INITIAL_STATE, action: { type?: string, payload?
case
RECEIVE_DATASET
:
{
const
receivedIndex
=
state
.
paged
?
_
.
findIndex
(
state
.
paged
.
content
,
(
item
)
=>
item
.
uuid
===
action
.
payload
.
uuid
)
:
-
1
;
const
mustRemoveAccessions
=
state
.
dataset
&&
(
action
.
payload
.
uuid
!==
state
.
dataset
.
uuid
);
if
(
receivedIndex
!==
-
1
)
{
return
update
(
state
,
{
dataset
:
{
$set
:
action
.
payload
},
accessionRefs
:
{
$set
:
action
.
payload
.
uuid
===
state
.
currentUuid
?
state
.
accessionRefs
:
null
},
accessionRefs
:
{
$set
:
mustRemoveAccessions
?
null
:
state
.
accessionRefs
},
paged
:
{
content
:
{
[
receivedIndex
]:
{
$set
:
action
.
payload
},
...
...
@@ -63,7 +62,6 @@ function datasetsPublic(state = INITIAL_STATE, action: { type?: string, payload?
case
RECEIVE_ACCESSIONS_PAGE
:
{
return
update
(
state
,
{
accessionRefs
:
{
$set
:
action
.
payload
.
accessionRefs
},
currentUuid
:
{
$set
:
action
.
payload
.
currentUuid
},
});
}
...
...
src/datasets/ui/dataset-stepper/steps/accessions-list/ListOfAccesion.tsx
View file @
9793cde1
...
...
@@ -143,8 +143,7 @@ class ListOfAccession extends React.Component<IListOfAccession, any> {
{
uploading
&&
<
Loading
message
=
{
uploadText
}
/>
}
<
h3
>
{
t
(
'
datasets.dashboard.p.stepper.listOfAccessions.rowCount
'
,
{
count
:
accessionRefs
&&
accessionRefs
.
content
?
accessionRefs
.
content
.
length
:
0
})
}
</
h3
>
<
h3
>
{
t
(
'
datasets.dashboard.p.stepper.listOfAccessions.rowCount
'
,
{
count
:
accessionRefs
?
accessionRefs
.
totalElements
:
0
})
}
</
h3
>
<
AccessionRefsTable
loadNextPage
=
{
loadAccessions
}
paged
=
{
accessionRefs
}
...
...
src/datasets/ui/dataset-stepper/steps/accessions-list/index.tsx
View file @
9793cde1
...
...
@@ -21,7 +21,6 @@ interface IAccessionsListStep extends React.ClassAttributes<any> {
onPublish
:
()
=>
void
;
onGotoStep
:
(
id
:
number
)
=>
()
=>
void
;
location
:
any
;
currentUuid
:
string
;
uuid
:
string
;
}
...
...
@@ -36,8 +35,8 @@ class AccessionsListStep extends React.Component<IAccessionsListStep, any> {
}
public
componentWillMount
()
{
const
{
currentUuid
,
uuid
,
loadAccession
s
}
=
this
.
props
;
if
(
!
currentUuid
||
(
currentU
uid
!==
uuid
))
{
const
{
dataset
,
uuid
,
loadAccessions
,
accessionRef
s
}
=
this
.
props
;
if
(
!
accessionRefs
||
(
dataset
&&
dataset
.
u
uid
!==
uuid
))
{
loadAccessions
(
uuid
);
}
}
...
...
@@ -75,7 +74,6 @@ class AccessionsListStep extends React.Component<IAccessionsListStep, any> {
const
mapStateToProps
=
(
state
,
ownProps
)
=>
({
uuid
:
ownProps
.
match
.
params
.
uuid
,
currentUuid
:
state
.
datasets
.
dashboard
.
currentUuid
,
dataset
:
state
.
datasets
.
dashboard
.
dataset
,
accessionRefs
:
state
.
datasets
.
dashboard
.
accessionRefs
,
stillLoading
:
ownProps
.
stillLoading
,
...
...
src/datasets/ui/dataset-stepper/steps/review/index.tsx
View file @
9793cde1
...
...
@@ -20,7 +20,6 @@ interface IReviewAndPublishStep extends React.ClassAttributes<any> {
onPublish
:
()
=>
void
;
onGotoStep
:
(
id
:
number
)
=>
()
=>
void
;
location
:
any
;
currentUuid
:
string
;
uuid
:
string
;
}
...
...
@@ -31,8 +30,8 @@ class ReviewAndPublishStep extends React.Component<IReviewAndPublishStep, any> {
];
public
componentWillMount
()
{
const
{
currentUuid
,
uuid
,
loadAccessions
}
=
this
.
props
;
if
(
!
currentUuid
||
(
currentU
uid
!==
uuid
))
{
const
{
accessionRefs
,
uuid
,
loadAccessions
,
dataset
}
=
this
.
props
;
if
(
!
accessionRefs
||
(
dataset
&&
dataset
.
u
uid
!==
uuid
))
{
loadAccessions
(
uuid
);
}
}
...
...
@@ -67,7 +66,6 @@ class ReviewAndPublishStep extends React.Component<IReviewAndPublishStep, any> {
const
mapStateToProps
=
(
state
,
ownProps
)
=>
({
dataset
:
state
.
datasets
.
dashboard
.
dataset
,
uuid
:
ownProps
.
match
.
params
.
uuid
,
currentUuid
:
state
.
datasets
.
dashboard
.
currentUuid
,
accessionRefs
:
state
.
datasets
.
dashboard
.
accessionRefs
,
stillLoading
:
ownProps
.
stillLoading
,
location
:
ownProps
.
location
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment