diff --git a/app/composables/useAuth.ts b/app/composables/useAuth.ts index e9369ae..9b38c9d 100644 --- a/app/composables/useAuth.ts +++ b/app/composables/useAuth.ts @@ -71,7 +71,7 @@ export const useAuth = () => { const handleLoginSuccess = async (jwtToken: string) => { token.value = jwtToken tokenState.value = jwtToken - await syncUser({ redirectOnSuccess: true }) + await syncUser() window.location.reload(); } diff --git a/app/pages/admin/catalog.vue b/app/pages/admin/catalog.vue index 3632743..931aed7 100644 --- a/app/pages/admin/catalog.vue +++ b/app/pages/admin/catalog.vue @@ -12,7 +12,10 @@ const { createCategory, updateCategory, deleteCategory, createTeam, updateTeam, const { getCategories } = useReports() const { getTeams } = useOperator() -const { data: categoriesRes, refresh: refreshCategories } = await useAsyncData('report-categories-admin-view', () => getCategories()) +const { + data: categoriesRes, + refresh: refreshCategories +} = await useAsyncData('report-categories-admin-view', () => getCategories()) const { data: teamsRes, refresh: refreshTeams } = await useAsyncData('admin-teams', () => getTeams()) const { data: areasRes } = await useAsyncData('admin-team-areas', () => getAreas()) @@ -45,10 +48,10 @@ const categories = computed(() => categoriesRes.value?.categories || []) const teams = computed(() => teamsRes.value?.teams || []) const areas = computed(() => areasRes.value?.areas || []) const categoryDeleteMessage = computed(() => - categoryPendingDelete.value ? `Vuoi eliminare categoria "${categoryPendingDelete.value.name}"? Operazione irreversibile.` : '' + categoryPendingDelete.value ? `Vuoi eliminare categoria "${categoryPendingDelete.value.name}"? Operazione irreversibile.` : '' ) const teamDeleteMessage = computed(() => - teamPendingDelete.value ? `Vuoi eliminare team "${teamPendingDelete.value.name}"? Operazione irreversibile.` : '' + teamPendingDelete.value ? `Vuoi eliminare team "${teamPendingDelete.value.name}"? Operazione irreversibile.` : '' ) const resetCategoryForm = () => { @@ -236,7 +239,7 @@ const handleDeleteTeam = async () => {