Skip to content
Snippets Groups Projects
Verified Commit c8136f41 authored by magicfelix's avatar magicfelix
Browse files

Adjust frontend GraphQL mutation

parent e62399df
No related branches found
No related tags found
1 merge request!284Draft: Redesign entering of lesson documentation
......@@ -43,7 +43,11 @@ export default {
computed: {
lessonDocumentationMutationInputObject() {
return {
id: this.id,
year: this.year,
week: this.week,
lessonPeriodId: this.lessonPeriod ? this.lessonPeriod.id : null,
eventId: this.event ? this.event.id : null,
extraLessonId: this.extraLesson ? this.extraLesson.id : null,
topic: this.editTopic,
groupNote: this.editGroupNote,
homework: this.editHomework,
......@@ -59,18 +63,18 @@ export default {
template: `
<ApolloMutation
:mutation="gql => gql\`
mutation UpdateLessonDocumentation($input: LessonDocumentationMutationInput!) {
updateLessonDocumentation(input: $input) {
lessonDocumentation {
mutation UpdateLessonDocumentation($year:Int!, $week:Int!, $lessonPeriodId:ID, $topic:String, $homework:String, $groupNote:String){
updateOrCreateLessonDocumentation(year:$year, week:$week, lessonPeriodId:$lessonPeriodId, topic:$topic, homework:$homework, groupNote:$groupNote){
lessonDocumentation{
id
topic
groupNote
homework
groupNote
}
}
}
\`"
:variables="{ input: lessonDocumentationMutationInputObject }"
:variables=lessonDocumentationMutationInputObject
@done="onDone"
>
<template v-slot="{ mutate, loading, error }">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment