2019-12-21 07:20:25 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<TitleBar/>
|
2019-12-26 09:31:36 +00:00
|
|
|
<v-navigation-drawer mini-variant expand-on-hover app clipped permanent overflow>
|
|
|
|
<v-list>
|
2020-01-05 22:39:30 +00:00
|
|
|
<v-list-item class="title" link @click="setActiveUser(activeUser)">
|
2019-12-26 09:31:36 +00:00
|
|
|
<v-list-item-icon>
|
|
|
|
<v-icon>home</v-icon>
|
|
|
|
</v-list-item-icon>
|
|
|
|
<v-list-item-title>
|
|
|
|
Gesamtübersicht
|
|
|
|
</v-list-item-title>
|
2019-12-21 07:20:25 +00:00
|
|
|
|
2019-12-26 09:31:36 +00:00
|
|
|
</v-list-item>
|
|
|
|
</v-list>
|
|
|
|
<v-divider/>
|
|
|
|
<v-list>
|
2020-01-05 22:39:30 +00:00
|
|
|
<v-list-item v-for="user in users" v-bind:key="users.indexOf(user)" :class="user.username === activeUser.username ? 'v-list-item--highlighted' : ''" link @click="setActiveUser(user)">
|
2019-12-26 09:31:36 +00:00
|
|
|
<v-list-item-title>{{user.lastname}}, {{user.firstname}}</v-list-item-title>
|
|
|
|
</v-list-item>
|
|
|
|
</v-list>
|
2019-12-29 20:35:32 +00:00
|
|
|
<template v-slot:append>
|
|
|
|
<v-list>
|
|
|
|
<v-list-item>
|
|
|
|
<v-list-item-icon><v-icon>search</v-icon></v-list-item-icon>
|
|
|
|
<v-list-item-title>
|
|
|
|
<v-autocomplete outlined return-object v-model="user" style="margin-top: 3px"
|
|
|
|
placeholder="Suche Person" :items="allUsers" item-text="fullName"
|
|
|
|
prepend-inner-icon="search" full-width/>
|
|
|
|
</v-list-item-title>
|
|
|
|
</v-list-item>
|
|
|
|
<v-list-item>
|
|
|
|
<v-list-item-icon><v-icon>person_add</v-icon></v-list-item-icon>
|
|
|
|
<v-list-item-title>
|
2020-01-05 22:39:30 +00:00
|
|
|
<v-btn text block @click="addUser(user)">Hinzufügen</v-btn>
|
2019-12-29 20:35:32 +00:00
|
|
|
</v-list-item-title>
|
|
|
|
</v-list-item>
|
|
|
|
</v-list>
|
|
|
|
</template>
|
2019-12-26 09:31:36 +00:00
|
|
|
</v-navigation-drawer>
|
|
|
|
<v-content v-if="!activeUser.username">
|
2020-01-14 17:20:05 +00:00
|
|
|
<Overview/>
|
2019-12-26 09:31:36 +00:00
|
|
|
</v-content>
|
|
|
|
<v-content v-else>
|
2020-01-14 17:20:05 +00:00
|
|
|
<User/>
|
2019-12-21 07:20:25 +00:00
|
|
|
</v-content>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import TitleBar from "@/components/TitleBar";
|
2019-12-26 09:31:36 +00:00
|
|
|
import Overview from "../components/finanzer/Overview";
|
|
|
|
import User from "../components/finanzer/User";
|
2020-01-05 22:39:30 +00:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
|
import { mapGetters } from 'vuex';
|
|
|
|
import { mapActions } from 'vuex';
|
2019-12-21 07:20:25 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "FinanzerView",
|
2019-12-26 09:31:36 +00:00
|
|
|
components: {User, Overview, TitleBar},
|
2019-12-21 07:20:25 +00:00
|
|
|
created() {
|
2020-01-05 22:39:30 +00:00
|
|
|
this.getAllUsers()
|
|
|
|
this.getUsers()
|
2019-12-21 07:20:25 +00:00
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
2020-01-05 13:17:06 +00:00
|
|
|
user: null,
|
2019-12-21 07:20:25 +00:00
|
|
|
}
|
|
|
|
},
|
2020-01-14 17:20:05 +00:00
|
|
|
methods: mapActions({ getAllUsers: 'finanzerUsers/getAllUsers',
|
|
|
|
setActiveUser: 'finanzerUsers/setActiveUser',
|
|
|
|
getUsers: 'finanzerUsers/getUsers',
|
|
|
|
finanzerUsers: 'finanzerUsers/addUser'}),
|
|
|
|
computed: mapGetters({users: 'finanzerUsers/users',
|
|
|
|
activeUser: 'finanzerUsers/activeUser',
|
|
|
|
allUsers: 'finanzerUsers/allUsers'})
|
2019-12-21 07:20:25 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
</style>
|