Add logout button
This commit is contained in:
parent
42f888d0d6
commit
7641e5dcaa
|
|
@ -2,5 +2,30 @@
|
|||
<div class="no-class public-page">
|
||||
<h1 class="public-page__title">Sie sind keiner Klasse zugeteilt</h1>
|
||||
<p>Sie können mySkillbox nur verwenden wenn Sie in einer Klasse zugeteilt sind. Aktuell kann Sie nur der mySkillbox-Support einer Klasse zuteilen.</p>
|
||||
<button class="button button--primary button--big logout-button" @click="logout">Abmelden</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LOGOUT_MUTATION from '@/graphql/gql/mutations/logoutUser.gql';
|
||||
|
||||
export default {
|
||||
|
||||
methods: {
|
||||
logout() {
|
||||
this.$apollo.mutate({
|
||||
mutation: LOGOUT_MUTATION,
|
||||
}).then(({data}) => {
|
||||
if (data.logout.success) { location.replace('/') }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/_variables.scss";
|
||||
|
||||
.logout-button {
|
||||
margin-top: $large-spacing;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -22,3 +22,4 @@ class LicenseTypeAdmin(admin.ModelAdmin):
|
|||
class LicenseAdmin(admin.ModelAdmin):
|
||||
list_display = ('license_type', 'licensee')
|
||||
list_filter = ('license_type', 'licensee')
|
||||
raw_id_fields = ('licensee',)
|
||||
|
|
|
|||
Loading…
Reference in New Issue