Remove unused query import

This commit is contained in:
Ramon Wenger 2021-03-25 00:16:45 +01:00
parent a4ff9d2942
commit 45db4e3258
1 changed files with 18 additions and 19 deletions

View File

@ -8,15 +8,13 @@
cancel-text="Abbrechen" cancel-text="Abbrechen"
@input="updateName" @input="updateName"
@cancel="cancel" @cancel="cancel"
@confirm="createClass" @confirm="createTeam"
/> />
</template> </template>
<script> <script>
import addSchoolClassMixin from '@/mixins/add-school-class'; import addSchoolClassMixin from '@/mixins/add-school-class';
import CREATE_CLASS_MUTATION from '@/graphql/gql/mutations/createClass.gql';
import MY_SCHOOL_CLASS_QUERY from '@/graphql/gql/mySchoolClass';
import JoinForm from '@/components/profile/JoinForm'; import JoinForm from '@/components/profile/JoinForm';
export default { export default {
@ -36,22 +34,23 @@
this.name = event.target.value; this.name = event.target.value;
this.error = ''; this.error = '';
}, },
createClass(name) { createTeam(name) {
let self = this; throw new Error('not implemented', name);
this.$apollo.mutate({ // let self = this;
mutation: CREATE_CLASS_MUTATION, // this.$apollo.mutate({
variables: { // mutation: CREATE_CLASS_MUTATION,
input: { // variables: {
name, // input: {
}, // name,
}, // },
update(store, {data: {createSchoolClass: {schoolClass}}}) { // },
self.addSchoolClass(store, schoolClass); // update(store, {data: {createSchoolClass: {schoolClass}}}) {
self.$router.push({ // self.addSchoolClass(store, schoolClass);
name: 'my-class', // self.$router.push({
}); // name: 'my-class',
}, // });
}); // },
// });
}, },
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);