fix : redirection après login + écran des heures chauffeurs
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
This commit is contained in:
@@ -68,7 +68,8 @@ const handleSubmit = async () => {
|
||||
try {
|
||||
await auth.login(username.value, password.value)
|
||||
|
||||
await router.push('/calendar')
|
||||
const isAdmin = auth.user?.roles?.includes('ROLE_ADMIN')
|
||||
await router.push(isAdmin ? '/calendar' : '/hours')
|
||||
} finally {
|
||||
isSubmitting.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user