diff --git a/src/components/baruser/CreditLists.vue b/src/components/baruser/CreditLists.vue index edea3da..758e37f 100644 --- a/src/components/baruser/CreditLists.vue +++ b/src/components/baruser/CreditLists.vue @@ -91,13 +91,7 @@ 2 € @@ -107,13 +101,7 @@ 1 € @@ -123,13 +111,7 @@ 0,50 € @@ -139,13 +121,7 @@ 0,40 € @@ -155,13 +131,7 @@ 0,20 € @@ -171,13 +141,7 @@ 0,10 € @@ -213,8 +177,10 @@ (user.amount / 100).toFixed(2) }} € - + + + - {{(user.toSetAmount / 100).toFixed(2)}} + @@ -298,6 +264,18 @@ export default { deactivate: 'barUsers/deactivateMenu', commitStorno: 'barUsers/storno' }), + addingAmount(user, amount) { + clearTimeout(user.timeout) + user.toSetAmount = user.toSetAmount ? user.toSetAmount + amount : amount + user.timeout = setTimeout(() => { + this.addAmount({username: user.username, + amount: user.toSetAmount, + user}) + setTimeout(() => { + user.toSetAmount = null + }, 300) + }, 5000) + }, forceRender() { this.componentRenderer += 1 }, diff --git a/src/components/user/AddAmount.vue b/src/components/user/AddAmount.vue index e6a7c03..aeeefc3 100644 --- a/src/components/user/AddAmount.vue +++ b/src/components/user/AddAmount.vue @@ -84,7 +84,7 @@ 2 €1 €0,50 €0,40 €0,20 €0,10 € - + {{ (getAllSum() / 100).toFixed(2) - }} - € + }} + € + + + - {{(toSetAmount / 100).toFixed(2)}} + + @@ -228,6 +234,8 @@ export default { close: mdiClose, checkValidate: false, stornoMessage: null, + timeout: null, + toSetAmount: null } }, created() { @@ -238,6 +246,16 @@ export default { addAmount: 'user/addAmount', commitStorno: 'user/storno' }), + addingAmount(amount) { + clearTimeout(this.timeout) + this.toSetAmount = this.toSetAmount ? this.toSetAmount + amount : amount + this.timeout = setTimeout(() => { + this.addAmount(this.toSetAmount) + setTimeout(() => { + this.toSetAmount = null + }, 300) + }, 5000) + }, forceRender() { this.componentRenderer += 1 },