fix: mag geen lege groepen aanmaken

This commit is contained in:
Joyelle Ndagijimana 2025-05-19 14:53:11 +02:00
parent 2f67033251
commit 59ed7ab3b5

View file

@ -314,13 +314,16 @@
function saveDragDrop(): void {
emit(
"groupsUpdated",
currentGroups.value.map((g) => g.map((s) => s.username)),
currentGroups.value
.filter((g) => g.length > 0) // Filter out empty groups
.map((g) => g.map((s) => s.username)),
);
activeDialog.value = null;
emit("done");
emit("close");
}
const showGroupsPreview = computed(() => currentGroups.value.length > 0 || unassignedStudents.value.length > 0);
function removeStudent(groupIndex: number, student: StudentItem): void {
@ -472,7 +475,13 @@
v-if="currentGroups.length === 0"
class="text-center py-4"
>
<v-alert type="info">{{ t("no-groups-yet") }}</v-alert>
<div>
<v-icon
icon="mdi-information-outline"
size="small"
/>
{{ t("currently-no-groups") }}
</div>
</div>
<template v-else>