Remove unused query import
This commit is contained in:
parent
a4ff9d2942
commit
45db4e3258
|
|
@ -8,15 +8,13 @@
|
|||
cancel-text="Abbrechen"
|
||||
@input="updateName"
|
||||
@cancel="cancel"
|
||||
@confirm="createClass"
|
||||
@confirm="createTeam"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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';
|
||||
|
||||
export default {
|
||||
|
|
@ -36,22 +34,23 @@
|
|||
this.name = event.target.value;
|
||||
this.error = '';
|
||||
},
|
||||
createClass(name) {
|
||||
let self = this;
|
||||
this.$apollo.mutate({
|
||||
mutation: CREATE_CLASS_MUTATION,
|
||||
variables: {
|
||||
input: {
|
||||
name,
|
||||
},
|
||||
},
|
||||
update(store, {data: {createSchoolClass: {schoolClass}}}) {
|
||||
self.addSchoolClass(store, schoolClass);
|
||||
self.$router.push({
|
||||
name: 'my-class',
|
||||
});
|
||||
},
|
||||
});
|
||||
createTeam(name) {
|
||||
throw new Error('not implemented', name);
|
||||
// let self = this;
|
||||
// this.$apollo.mutate({
|
||||
// mutation: CREATE_CLASS_MUTATION,
|
||||
// variables: {
|
||||
// input: {
|
||||
// name,
|
||||
// },
|
||||
// },
|
||||
// update(store, {data: {createSchoolClass: {schoolClass}}}) {
|
||||
// self.addSchoolClass(store, schoolClass);
|
||||
// self.$router.push({
|
||||
// name: 'my-class',
|
||||
// });
|
||||
// },
|
||||
// });
|
||||
},
|
||||
cancel() {
|
||||
this.$router.go(-1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue