Creating processes

This commit is contained in:
James Barnsley
2017-04-05 20:28:41 +12:00
parent 14509e6c8b
commit f292e512dc
8 changed files with 65 additions and 28 deletions

View File

@ -224,28 +224,21 @@ export function createBrowserNotification( data ){
}
}
export function createNotification(content, type = 'default', id = helpers.generateGuid()){
export function createNotification(content, type = 'default', key = helpers.generateGuid()){
return {
type: 'CREATE_NOTIFICATION',
notification: {
id: id,
key: key,
type: type,
content: content
}
}
}
export function cancelLoading(id){
return {
type: 'CANCEL_LOADING_'+id,
id: id
}
}
export function removeNotification(id){
export function removeNotification(key){
return {
type: 'REMOVE_NOTIFICATION',
id: id
key: key
}
}
@ -268,3 +261,24 @@ export function stopLoading(key){
key: key
}
}
export function startProcess(key){
return {
type: 'START_PROCESS',
key: key
}
}
export function cancelProcess(key){
return {
type: 'CANCEL_PROCESS',
key: key
}
}
export function stopProcess(key){
return {
type: 'STOP_PROCESS',
key: key
}
}