mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-04 02:39:14 +02:00
Merge branch 'main' into 15-calendar-preview
# Conflicts: # frontend/src/view/AdditionalModules.vue # frontend/src/view/EditCalendarView.vue
This commit is contained in:
@@ -46,14 +46,22 @@ function loadCalendar(): void {
|
||||
moduleStore().removeAllModules();
|
||||
tokenStore().setToken(token.value);
|
||||
|
||||
getCalender(token.value).then((data) => {
|
||||
data.forEach((module) => {
|
||||
moduleStore().addModule(module);
|
||||
});
|
||||
modules.value = moduleStore().modules;
|
||||
getCalender(token.value).then((data: Module[]) => {
|
||||
if (data.length > 0) {
|
||||
data.forEach((module) => {
|
||||
moduleStore().addModule(module);
|
||||
});
|
||||
modules.value = moduleStore().modules;
|
||||
router.push("/edit-additional-modules");
|
||||
} else {
|
||||
toast.add({
|
||||
severity: "error",
|
||||
summary: t("editCalendarView.error"),
|
||||
detail: t("editCalendarView.noCalendarFound"),
|
||||
life: 3000,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
router.push("/edit-additional-modules");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user