feat(frontend): Leerkrachten kunnen indieningen van verschillende groepen bekijken
This commit is contained in:
parent
e98fd8db3a
commit
90b5cd9d3a
5 changed files with 81 additions and 6 deletions
|
@ -1,4 +1,3 @@
|
|||
import type { ClassesResponse } from "@/controllers/classes";
|
||||
import { GroupController, type GroupResponse, type GroupsResponse } from "@/controllers/groups";
|
||||
import type { QuestionsResponse } from "@/controllers/questions";
|
||||
import type { SubmissionsResponse } from "@/controllers/submissions";
|
||||
|
@ -12,7 +11,6 @@ import {
|
|||
type UseQueryReturnType,
|
||||
} from "@tanstack/vue-query";
|
||||
import { computed, toValue, type MaybeRefOrGetter } from "vue";
|
||||
import { invalidateAllAssignmentKeys } from "./assignments";
|
||||
import { invalidateAllSubmissionKeys } from "./submissions";
|
||||
|
||||
export function groupsQueryKey(classid: string, assignmentNumber: number, full: boolean) {
|
||||
|
@ -132,7 +130,7 @@ export function useDeleteGroupMutation(): UseMutationReturnType<
|
|||
const gn = response.group.groupNumber;
|
||||
|
||||
await invalidateAllGroupKeys(queryClient, cid, an, gn);
|
||||
await invalidateAllSubmissionKeys(queryClient, cid, an, gn);
|
||||
await invalidateAllSubmissionKeys(queryClient, undefined, undefined, undefined, cid, an, gn);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ export function useGetLearningPathQuery(
|
|||
forGroup?: MaybeRefOrGetter<{forGroup: number, assignmentNo: number, classId: string} | undefined>,
|
||||
): UseQueryReturnType<LearningPath, Error> {
|
||||
return useQuery({
|
||||
queryKey: [LEARNING_PATH_KEY, "get", toValue(hruid), toValue(language), toValue(forGroup)],
|
||||
queryKey: [LEARNING_PATH_KEY, "get", hruid, language, forGroup],
|
||||
queryFn: async () => {
|
||||
const [hruidVal, languageVal, forGroupVal] = [toValue(hruid), toValue(language), toValue(forGroup)];
|
||||
return learningPathController.getBy(hruidVal, languageVal, forGroupVal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue