fix: extra frontend tests
This commit is contained in:
parent
9af2f136eb
commit
1d84d60737
5 changed files with 195 additions and 38 deletions
|
@ -90,11 +90,6 @@
|
|||
}
|
||||
|
||||
function saveRandomGroups(): void {
|
||||
if (randomGroupsPreview.value.length === 0) {
|
||||
alert(t("please-generate-groups-first"));
|
||||
return;
|
||||
}
|
||||
|
||||
emit(
|
||||
"groupsUpdated",
|
||||
randomGroupsPreview.value.map((g) => g.map((s) => s.username)),
|
||||
|
@ -104,11 +99,11 @@
|
|||
emit("close");
|
||||
}
|
||||
|
||||
function addNewGroup() {
|
||||
function addNewGroup(): void {
|
||||
currentGroups.value.push([]);
|
||||
}
|
||||
|
||||
function removeGroup(index: number) {
|
||||
function removeGroup(index: number): void {
|
||||
// Move students back to unassigned
|
||||
unassignedStudents.value.push(...currentGroups.value[index]);
|
||||
currentGroups.value.splice(index, 1);
|
||||
|
@ -317,11 +312,6 @@
|
|||
}
|
||||
|
||||
function saveDragDrop(): void {
|
||||
if (unassignedStudents.value.length > 0) {
|
||||
alert(t("please-assign-all-students"));
|
||||
return;
|
||||
}
|
||||
|
||||
emit(
|
||||
"groupsUpdated",
|
||||
currentGroups.value.map((g) => g.map((s) => s.username)),
|
||||
|
@ -331,9 +321,7 @@
|
|||
emit("close");
|
||||
}
|
||||
|
||||
const showGroupsPreview = computed(() => {
|
||||
return currentGroups.value.length > 0 || unassignedStudents.value.length > 0;
|
||||
});
|
||||
const showGroupsPreview = computed(() => currentGroups.value.length > 0 || unassignedStudents.value.length > 0);
|
||||
|
||||
function removeStudent(groupIndex: number, student: StudentItem): void {
|
||||
const group = currentGroups.value[groupIndex];
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
/**
|
||||
* Validation rule for the assignment title.
|
||||
*
|
||||
* Ensures that the title is not empty.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Validation rule for the classes selection.
|
||||
*
|
||||
* Ensures that at least one class is selected.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Validation rule for the deadline field.
|
||||
*
|
||||
* Ensures that a valid deadline is selected and is in the future.
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue