Skip to content
Snippets Groups Projects
Commit 423447c0 authored by yvesn's avatar yvesn
Browse files

SSDM-7588: renamed action for more consistency

parent 64eefbbb
No related branches found
No related tags found
No related merge requests found
......@@ -55,8 +55,8 @@ export default {
type: 'SAVE-ENTITY',
entity: entity
}),
savedEntity: (entity) => ({
type: 'SAVED-ENTITY',
saveEntityDone: (entity) => ({
type: 'SAVE-ENTITY-DONE',
entity: entity
}),
error: (exception) => ({
......
......@@ -76,7 +76,7 @@ function spaces(spaces = initialState.spaces, action) {
case 'SET-SPACES': {
return entitiesByPermId(action.spaces)
}
case 'SAVED-ENTITY': {
case 'SAVE-ENTITY-DONE': {
const newSpaces = Object.assign({}, spaces)
newSpaces[action.entity.permId.permId] = action.entity
return newSpaces
......
......@@ -33,7 +33,7 @@ function loading(loading = initialState.loading, action) {
case 'SAVE-ENTITY': {
return true
}
case 'SAVED-ENTITY': {
case 'SAVE-ENTITY-DONE': {
return false
}
case 'ERROR': {
......@@ -119,7 +119,7 @@ function dirtyEntities(dirtyEntities = initialState.dirtyEntities, action) {
return dirtyEntities.filter(e => e !== action.entityPermId)
}
}
case 'SAVED-ENTITY': {
case 'SAVE-ENTITY-DONE': {
return dirtyEntities.filter(permId => permId !== action.entity.permId.permId)
}
case 'CLOSE-ENTITY': {
......
......@@ -37,7 +37,7 @@ function* saveEntity(action) {
const result = yield call(openbis.getSpaces)
const spaces = result.getObjects()
const space = spaces.filter(space => space.permId.permId === action.entity.permId.permId)[0]
yield put(actions.savedEntity(space))
yield put(actions.saveEntityDone(space))
} catch(exception) {
yield put(actions.error(exception))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment