flaschengeist-frontend/src/components/baruser/CreditLists.vue

94 lines
4.1 KiB
Vue
Raw Normal View History

2019-12-21 07:20:25 +00:00
<template>
<v-content>
<v-container>
2019-12-21 11:22:21 +00:00
<v-card v-for="user in users" :key="user.id" raised shaped>
<v-list-item three-line>
<v-list-item-content>
<v-list-item-title class="title">{{user.firstname}} {{user.lastname}}</v-list-item-title>
<v-row>
<v-spacer/>
<v-row>
<v-col>
<v-container>
<v-row>
<v-container>
<v-btn @click="addAmount(user.username, 200)" :color="color">2 </v-btn>
</v-container>
</v-row>
<v-row>
<v-container>
<v-btn @click="addAmount(user.username, 100)" :color="color">1 </v-btn>
</v-container>
</v-row>
</v-container>
</v-col>
<v-col>
<v-container>
<v-row>
<v-container>
<v-btn @click="addAmount(user.username, 50)" :color="color">0,50 </v-btn>
</v-container>
</v-row>
<v-row>
<v-container>
<v-btn @click="addAmount(user.username, 40)" :color="color">0,40 </v-btn>
</v-container>
</v-row>
</v-container>
</v-col>
<v-col>
<v-container>
<v-row>
<v-container>
<v-btn @click="addAmount(user.username, 20)" :color="color">0,20 </v-btn>
</v-container>
</v-row>
<v-row>
<v-container>
<v-btn @click="addAmount(user.username, 10)" :color="color">0,10 </v-btn>
</v-container>
</v-row>
</v-container>
</v-col>
</v-row>
<v-col align-self="center">
<v-container>
<v-row>
<v-container>
<v-list-item-action-text class="title">{{(user.amount/100).toFixed(2)}} </v-list-item-action-text>
</v-container>
</v-row>
</v-container>
</v-col>
</v-row>
</v-list-item-content>
</v-list-item>
</v-card>
2019-12-21 07:20:25 +00:00
</v-container>
</v-content>
</template>
<script>
export default {
2019-12-21 11:22:21 +00:00
name: "CreditLists",
props: {
users: Array
},
data () {
return {
color: 'green accent-4'
}
},
methods: {
addAmount(username, amount) {
this.$emit("add:amount", username, amount)
}
}
2019-12-21 07:20:25 +00:00
}
</script>
<style scoped>
</style>