fix: bug in assignment vertalingen
This commit is contained in:
parent
f67e3f5a1a
commit
0abe9b1bce
4 changed files with 37 additions and 119 deletions
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import { assignmentTitleRules, classRules } from "@/utils/assignment-rules.ts";
|
||||
import auth from "@/services/auth/auth-service.ts";
|
||||
import { useTeacherClassesQuery } from "@/queries/teachers.ts";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
|
@ -96,6 +95,25 @@ const learningPathRules = [
|
|||
}
|
||||
];
|
||||
|
||||
const assignmentTitleRules = [
|
||||
(value: string): string | boolean => {
|
||||
if (value?.length >= 1) {
|
||||
return true;
|
||||
} // Title must not be empty
|
||||
return t("title-required");
|
||||
},
|
||||
];
|
||||
|
||||
const classRules = [
|
||||
(value: string): string | boolean => {
|
||||
if (value) {
|
||||
return true;
|
||||
}
|
||||
return t("class-required");
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue