forked from kompetenzinventar/ki-frontend
fix profile display
This commit is contained in:
@ -54,17 +54,20 @@ export default {
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
onError({commit}) {
|
||||
onError({commit, dispatch}) {
|
||||
commit('setError')
|
||||
commit('clearProfileId')
|
||||
commit('clearProfile')
|
||||
commit('setNotLoading')
|
||||
commit('hideSpinner')
|
||||
dispatch('clear')
|
||||
},
|
||||
onNotFound({commit, dispatch}) {
|
||||
dispatch('onError')
|
||||
commit('setNotFound', true)
|
||||
},
|
||||
clear({commit}) {
|
||||
commit('clearProfileId')
|
||||
commit('clearProfile')
|
||||
commit('hideSpinner')
|
||||
commit('setNotLoading')
|
||||
},
|
||||
async load({state, commit, dispatch, rootState}, profileId) {
|
||||
if (state.loading) {
|
||||
return
|
||||
@ -111,7 +114,7 @@ export default {
|
||||
const responseData = await response.json()
|
||||
commit('setProfile', responseData.profile)
|
||||
commit('hideSpinner')
|
||||
commit('setNotSearching')
|
||||
commit('setNotLoading')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user