flaschengeist-frontend/src/views/MainView.vue

108 lines
2.9 KiB
Vue
Raw Normal View History

2020-01-17 00:01:10 +00:00
<template>
<div>
<v-navigation-drawer
v-if="isLoggedIn"
mini-variant
expand-on-hover
app
clipped
permanent
overflow
>
<v-list>
<v-list-item v-if="isUser" class="title" link to="/main/user/add">
<v-list-item-icon>
<v-icon>{{person}}</v-icon>
2020-01-17 00:01:10 +00:00
</v-list-item-icon>
2020-01-23 22:25:21 +00:00
<v-list-item-title>{{user.firstname}} {{user.lastname}}</v-list-item-title>
2020-01-17 00:01:10 +00:00
</v-list-item>
<v-list-item v-if="isBar" class="title" link to="/main/bar/geruecht">
<v-list-item-icon>
<v-icon>{{glass_cocktail}}</v-icon>
2020-01-17 00:01:10 +00:00
</v-list-item-icon>
<v-list-item-title>
2020-01-23 22:25:21 +00:00
Bar
2020-01-17 00:01:10 +00:00
</v-list-item-title>
</v-list-item>
<v-list-item v-if="isManagement" class="title" link to="/main/management/servicemanagement">
<v-list-item-icon>
<v-icon>{{king}}</v-icon>
</v-list-item-icon>
<v-list-item-title>
Vorstand
</v-list-item-title>
</v-list-item>
<v-list-item v-if="isGastro" class="title" link to="/main/gastro/pricelist">
<v-list-item-icon>
<v-icon>{{gastro}}</v-icon>
</v-list-item-icon>
<v-list-item-title>
Gastro
</v-list-item-title>
</v-list-item>
<v-list-item v-if="isFinanzer" class="title" link to="/main/finanzer/overview">
2020-01-17 00:01:10 +00:00
<v-list-item-icon>
<v-icon>{{attach_money}}</v-icon>
2020-01-17 00:01:10 +00:00
</v-list-item-icon>
<v-list-item-title>Finanzer</v-list-item-title>
</v-list-item>
</v-list>
<v-divider />
<router-view name="nav" />
2020-01-17 00:01:10 +00:00
<template v-slot:append>
<v-list>
<v-list-item>
<v-list-item-icon>
<v-icon>{{exit_to_app}}</v-icon>
2020-01-17 00:01:10 +00:00
</v-list-item-icon>
<v-list-item-title>
<v-btn block text @click="logout">Logout</v-btn>
</v-list-item-title>
</v-list-item>
</v-list>
</template>
</v-navigation-drawer>
<router-view />
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex'
import {mdiAccount, mdiCurrencyEur, mdiExitToApp, mdiGlassCocktail, mdiChessKing, mdiFoodForkDrink} from '@mdi/js'
2020-01-17 00:01:10 +00:00
export default {
name: 'MainView',
data () {
return {
person: mdiAccount,
attach_money: mdiCurrencyEur,
exit_to_app: mdiExitToApp,
glass_cocktail: mdiGlassCocktail,
king: mdiChessKing,
gastro: mdiFoodForkDrink
}
},
2020-01-17 00:01:10 +00:00
components: { },
created() {
},
methods: {
...mapActions({
logout: 'logout'
})
},
computed: {
...mapGetters({
group: 'group',
isBar: 'isBar',
isUser: 'isUser',
isFinanzer: 'isFinanzer',
isGastro: 'isGastro',
isManagement: 'isManagement',
2020-01-23 22:25:21 +00:00
isLoggedIn: 'isLoggedIn',
user: 'user'
2020-01-17 00:01:10 +00:00
})
}
}
</script>
<style scoped></style>