fix : redirection après login + écran des heures chauffeurs
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled

This commit is contained in:
2026-03-16 09:13:35 +01:00
parent 3d26d6b50f
commit 01f8058f56
14 changed files with 255 additions and 77 deletions

View File

@@ -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
}