From cddda752e3ec0df85cadec8f6e30a7fbe085afd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 21 Aug 2020 15:07:49 +0200 Subject: [PATCH] gitflow-hotfix-stash: bug395 #395 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bugfix: Das zu überschreitene Limit wird nun nicht mehr an absoluten werten gemssen. Somit kann jemand auch mit mehr Guthaben als das Anschreibelimit ist, auf das Gerücht schreiben. --- package.json | 2 +- src/components/TitleBar.vue | 2 +- src/components/baruser/CreditLists.vue | 7 ++++--- src/components/user/AddAmount.vue | 4 ++-- src/plugins/routes.js | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 7240f50..35207c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "newgruecht-vue", - "version": "0.1.0", + "version": "1.0.1", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/components/TitleBar.vue b/src/components/TitleBar.vue index 2acecd9..5396f36 100644 --- a/src/components/TitleBar.vue +++ b/src/components/TitleBar.vue @@ -12,7 +12,7 @@ - Flaschengeist + Flaschengeist v1.0.1 diff --git a/src/components/baruser/CreditLists.vue b/src/components/baruser/CreditLists.vue index 733638e..f90d8c5 100644 --- a/src/components/baruser/CreditLists.vue +++ b/src/components/baruser/CreditLists.vue @@ -365,8 +365,8 @@ export default { console.log(user) if (user.toSetAmount && user.autoLock) { if ( - Math.abs(user.amount - Number.parseInt(user.toSetAmount)) > - user.limit + 500 + (user.amount - Number.parseInt(user.toSetAmount)) < + -(user.limit + 500) ) { this.overOverLimit = user user.toSetAmount = null @@ -377,8 +377,9 @@ export default { return true }, checkOverLimit(user) { + console.log(user) if (user.toSetAmount) { - if (Math.abs(user.amount - user.toSetAmount) > user.limit) { + if ((user.amount - user.toSetAmount) < -user.limit) { return user.checkedOverLimit ? false : true } } diff --git a/src/components/user/AddAmount.vue b/src/components/user/AddAmount.vue index 55f5274..fa8c089 100644 --- a/src/components/user/AddAmount.vue +++ b/src/components/user/AddAmount.vue @@ -315,7 +315,7 @@ export default { }, checkOverLimitIsValid(user) { if (this.toSetAmount && user.autoLock) { - if (Math.abs(this.getAllSum() - Number.parseInt(this.toSetAmount)) > user.limit + 500) { + if ((this.getAllSum() - Number.parseInt(this.toSetAmount)) < -(user.limit + 500)) { this.overOverLimit = user this.toSetAmount = null this.value = null @@ -326,7 +326,7 @@ export default { }, checkOverLimit(user) { if (this.toSetAmount) { - if (Math.abs( this.getAllSum() - this.toSetAmount) > user.limit) { + if (( this.getAllSum() - this.toSetAmount) < -user.limit) { return user.checkedOverLimit ? false : true } } diff --git a/src/plugins/routes.js b/src/plugins/routes.js index 0128670..00fe5e4 100644 --- a/src/plugins/routes.js +++ b/src/plugins/routes.js @@ -1,8 +1,8 @@ //const main = 'https://192.168.5.128:5000/' -const main = 'http://localhost:5000/' +//const main = 'http://localhost:5000/' //const main = 'http://192.168.5.118:5000/' //const main = 'https://groeger-clan.duckdns.org:5000/' -//const main = 'https://flaschengeist.wu5.de:5000/' +const main = 'https://flaschengeist.wu5.de:5000/' const url = { login: main + 'login',