Skip to content
Snippets Groups Projects
Verified Commit b828c250 authored by magicfelix's avatar magicfelix Committed by Tom Teichler
Browse files

Add simple check-in frontend

parent 22377b5b
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,12 @@
required
></v-text-field>
<v-text-field
v-model="personId"
label="Person ID"
type="number"
></v-text-field>
<v-btn
color="success"
class="mr-4"
......@@ -19,9 +25,36 @@
</template>
<script>
import gql from "graphql-tag";
export default {
data () {
return {
comment: "",
personId: null
}
},
methods: {
checkin () {
this.$apollo.mutate({
mutation: gql`mutation ($eventSlug:String!, $personId:Int!, $comment:String!, $lat:Int, $lon:Int) {
checkIn(eventSlug:$eventSlug, personId:$personId, comment:$comment, lat:$lat, lon:$lon){
checkpoint {
id
}
}
}`,
variables: {
"eventSlug": this.$route.params.slug,
"personId": parseInt(this.personId, 10),
"comment": this.comment
}
}).then((data) => {
console.log(data)
}).catch((error) => {
console.error(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