reload on login for compatibility with autologout

This commit is contained in:
2021-09-02 15:09:35 +02:00
parent bc16158162
commit a535a2e3cf
9 changed files with 38 additions and 50 deletions

View File

@ -180,15 +180,19 @@ export default {
commit('setToken', response.data)
dispatch('getUser').then(userdata => {
console.log('User Loggedin', state.isAdmin, state.isAdherent)
if (state.isAdmin) {
window.location.reload(true)
}
// have to reload systematicly because of autologout library not loaded if not logged in the begining
// if (state.isAdmin) {
// window.location.reload()
// }
if (state.isAdherent) {
router.push({
name: 'base'
})
// TODO: openCloseHamMenu(false)
dispatch('Common/openCloseHamMenu', false)
// router.push({
// name: 'base'
// })
// // TODO: openCloseHamMenu(false)
// dispatch('Common/openCloseHamMenu', false)
window.location = '/base'
} else {
window.location.reload()
}
resolve()
})