feat(frontend): echte klassen van tonen bij CreateAssignment
This commit is contained in:
parent
1328771551
commit
3758e7455f
1 changed files with 3 additions and 16 deletions
|
@ -16,7 +16,6 @@
|
||||||
import {useGetAllLearningPaths} from "@/queries/learning-paths.ts";
|
import {useGetAllLearningPaths} from "@/queries/learning-paths.ts";
|
||||||
import UsingQueryResult from "@/components/UsingQueryResult.vue";
|
import UsingQueryResult from "@/components/UsingQueryResult.vue";
|
||||||
import type {LearningPath} from "@/data-objects/learning-paths/learning-path.ts";
|
import type {LearningPath} from "@/data-objects/learning-paths/learning-path.ts";
|
||||||
import type {Language} from "@/data-objects/language.ts";
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const {t, locale} = useI18n();
|
const {t, locale} = useI18n();
|
||||||
|
@ -36,14 +35,10 @@
|
||||||
|
|
||||||
|
|
||||||
const language = computed(() => locale.value);
|
const language = computed(() => locale.value);
|
||||||
|
const form = ref();
|
||||||
//Fetch all learning paths
|
//Fetch all learning paths
|
||||||
const learningPathsQueryResults = useGetAllLearningPaths(language);
|
const learningPathsQueryResults = useGetAllLearningPaths(language);
|
||||||
|
|
||||||
watch(language, (newLanguage) => {
|
|
||||||
console.log(newLanguage);
|
|
||||||
learningPathsQueryResults.refetch();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Fetch and store all the teacher's classes
|
// Fetch and store all the teacher's classes
|
||||||
const { data: classes, isLoading, error, refetch } = useTeacherClassesQuery(username, true);
|
const { data: classes, isLoading, error, refetch } = useTeacherClassesQuery(username, true);
|
||||||
const allClasses = computed(() => {
|
const allClasses = computed(() => {
|
||||||
|
@ -56,22 +51,18 @@
|
||||||
return classes.value?.classes || [];
|
return classes.value?.classes || [];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const selectedClass = ref(null);
|
||||||
|
|
||||||
const form = ref();
|
|
||||||
|
|
||||||
const searchQuery = ref('');
|
|
||||||
|
|
||||||
const assignmentTitle = ref('');
|
const assignmentTitle = ref('');
|
||||||
const deadline = ref(null);
|
const deadline = ref(null);
|
||||||
const description = ref('');
|
const description = ref('');
|
||||||
const allLearningPaths = ref([]);
|
|
||||||
const selectedLearningPath = ref(null);
|
const selectedLearningPath = ref(null);
|
||||||
const selectedClass = ref(null);
|
|
||||||
const groups = ref<string[][]>([]);
|
const groups = ref<string[][]>([]);
|
||||||
|
|
||||||
const availableClass = computed(() => {
|
const availableClass = computed(() => {
|
||||||
//TODO: replace by real data
|
//TODO: replace by real data
|
||||||
return /*classes.find(cl => selectedClass.value?.value === cl.id) ||*/ null;
|
return classes.value?.classes.find(cl => selectedClass.value?.value === cl.id) || null;
|
||||||
});
|
});
|
||||||
|
|
||||||
const allStudents = computed(() => {
|
const allStudents = computed(() => {
|
||||||
|
@ -204,10 +195,6 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
|
||||||
margin-bottom: 1%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-card {
|
.form-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue