mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2026-01-18 20:42:26 +01:00
feat: Introduce data manager service with PocketBase authentication and professor dashboard.
This commit is contained in:
@@ -68,6 +68,7 @@ onMounted(async () => {
|
||||
return (b.confidenceScore || 0) - (a.confidenceScore || 0); // Descending order
|
||||
});
|
||||
|
||||
// Clear temporary entries and set actual modules
|
||||
modules.value = sortedModules;
|
||||
|
||||
// Pre-select modules with confidence score >= 0.7 (good match or better)
|
||||
@@ -77,12 +78,15 @@ onMounted(async () => {
|
||||
} catch (error: unknown) {
|
||||
console.error("Failed to fetch modules", error);
|
||||
const err = error as { status?: number; message?: string };
|
||||
// Clear temporary entries on error
|
||||
modules.value = [];
|
||||
// If unauthorized, redirect to home
|
||||
if (err.status === 401 || err.message?.includes("401")) {
|
||||
pb.authStore.clear();
|
||||
router.push("/");
|
||||
}
|
||||
} finally {
|
||||
// Always disable loading animation
|
||||
loading.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user