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
G
Genesys Website
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Website
Commits
d00b5b9a
Commit
d00b5b9a
authored
Feb 01, 2019
by
Oleksii Savran
Committed by
Viacheslav Pavlov
Feb 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Logged in new user can see previous user profile info
Added clearing of other dashboard states in user logout
parent
197ad5f7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
0 deletions
+19
-0
src/datasets/reducers/dashboard.ts
src/datasets/reducers/dashboard.ts
+4
-0
src/descriptors/reducers/dashboard.ts
src/descriptors/reducers/dashboard.ts
+5
-0
src/subsets/reducers/dashboard.ts
src/subsets/reducers/dashboard.ts
+4
-0
src/user/reducers/dashboard.ts
src/user/reducers/dashboard.ts
+6
-0
No files found.
src/datasets/reducers/dashboard.ts
View file @
d00b5b9a
...
...
@@ -6,6 +6,7 @@ import { CREATE_DATASET, ADD_CREATOR_TO_DATASET, REMOVE_CREATOR_FROM_DATASET, UP
RECEIVE_LOCATION
,
REMOVE_LOCATION
,
DASHBOARD_REMOVE_DATASET
,
DASHBOARD_RECEIVE_DATASET_PAGE
,
RECEIVE_DATASET
,
DASHBOARD_APPEND_DATASET_PAGE
,
DASHBOARD_RECEIVE_ACCESSIONS_PAGE
,
DASHBOARD_APPEND_ACCESSIONS_PAGE
,
}
from
'
datasets/constants
'
;
import
{
LOGOUT
}
from
'
constants/login
'
;
import
Dataset
from
'
model/catalog/Dataset
'
;
import
{
AccessionRef
}
from
'
model/accession/AccessionRef
'
;
...
...
@@ -26,6 +27,9 @@ const INITIAL_STATE: {
function
datasetsDashboard
(
state
=
INITIAL_STATE
,
action
:
{
type
?:
string
,
payload
?:
any
}
=
{
type
:
''
,
payload
:
{}
})
{
switch
(
action
.
type
)
{
case
LOGOUT
:
{
return
update
(
state
,
{
$set
:
INITIAL_STATE
});
}
case
CREATE_DATASET
:
{
const
dataset
:
Dataset
=
new
Dataset
();
dataset
.
versionTag
=
'
1.0
'
;
...
...
src/descriptors/reducers/dashboard.ts
View file @
d00b5b9a
...
...
@@ -16,6 +16,7 @@ import {
DASHBOARD_REMOVE_DESCRIPTOR
,
DASHBOARD_APPEND_DESCRIPTOR_PAGE
,
}
from
'
descriptors/constants
'
;
import
{
LOGOUT
}
from
'
constants/login
'
;
const
INITIAL_STATE
:
{
...
...
@@ -35,6 +36,10 @@ const INITIAL_STATE: {
function
descriptorsDashboard
(
state
=
INITIAL_STATE
,
action
:
IReducerAction
)
{
switch
(
action
.
type
)
{
case
LOGOUT
:
{
return
update
(
state
,
{
$set
:
INITIAL_STATE
});
}
case
DASHBOARD_GET_DESCRIPTOR
:
{
return
update
(
state
,
{
loading
:
{
$set
:
{
uuid
:
action
.
payload
}
},
...
...
src/subsets/reducers/dashboard.ts
View file @
d00b5b9a
...
...
@@ -3,6 +3,7 @@ import update from 'immutability-helper';
import
{
IReducerAction
}
from
'
model/common.model
'
;
import
{
DASHBOARD_RECEIVE_SUBSETS
,
DASHBOARD_RECEIVE_SUBSET
,
DASHBOARD_REMOVE_SUBSET
,
DASHBOARD_APPEND_SUBSETS
,
ADD_CREATOR_TO_SUBSET
,
REMOVE_CREATOR_FROM_SUBSET
,
UPDATE_SUBSET_CREATOR
,
DASHBOARD_RECEIVE_ACCESSIONS
,
DASHBOARD_APPEND_ACCESSIONS
}
from
'
subsets/constants
'
;
import
{
LOGOUT
}
from
'
constants/login
'
;
import
FilteredPage
from
'
model/FilteredPage
'
;
import
Subset
from
'
model/subset/Subset
'
;
...
...
@@ -30,6 +31,9 @@ const INITIAL_STATE: {
function
dashboardSubsets
(
state
=
INITIAL_STATE
,
action
:
IReducerAction
)
{
switch
(
action
.
type
)
{
case
LOGOUT
:
{
return
update
(
state
,
{
$set
:
INITIAL_STATE
});
}
case
DASHBOARD_RECEIVE_SUBSET
:
{
const
{
subset
,
error
}
=
action
.
payload
;
...
...
src/user/reducers/dashboard.ts
View file @
d00b5b9a
import
{
RECEIVE_USER_PROFILE
}
from
'
constants/user
'
;
import
update
from
'
immutability-helper
'
;
import
{
User
}
from
'
model/user/User
'
;
import
{
LOGOUT
}
from
'
constants/login
'
;
const
INITIAL_STATE
:
{
userProfile
:
User
;
...
...
@@ -16,6 +17,11 @@ export default function user(state = INITIAL_STATE, action: { type?: string, pay
userProfile
:
{
$set
:
action
.
payload
},
});
}
case
LOGOUT
:
{
return
update
(
state
,
{
userProfile
:
{
$set
:
null
},
});
}
default
:
return
state
;
}
...
...
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