feat(auth) : redirect client users to /portal after login and extract ticket helpers composable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 19:42:53 +01:00
parent 0d21e59023
commit 68dd9599a9
3 changed files with 152 additions and 1 deletions

View File

@@ -63,7 +63,8 @@ const handleSubmit = async () => {
try {
await auth.login(username.value, password.value)
await router.push('/')
const isClient = auth.user?.roles?.includes('ROLE_CLIENT') ?? false
await router.push(isClient ? '/portal' : '/')
} finally {
isSubmitting.value = false
}