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
1 merge request!48Revert "Update pyproject"
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
required required
></v-text-field> ></v-text-field>
<v-text-field
v-model="personId"
label="Person ID"
type="number"
></v-text-field>
<v-btn <v-btn
color="success" color="success"
class="mr-4" class="mr-4"
...@@ -19,9 +25,36 @@ ...@@ -19,9 +25,36 @@
</template> </template>
<script> <script>
import gql from "graphql-tag";
export default { export default {
data () {
return {
comment: "",
personId: null
}
},
methods: { methods: {
checkin () { 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