gitflow-hotfix-stash: bug395 #395

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.
This commit is contained in:
Tim Gröger 2020-08-21 15:07:49 +02:00
parent aaf2a3ecca
commit cddda752e3
5 changed files with 10 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "newgruecht-vue", "name": "newgruecht-vue",
"version": "0.1.0", "version": "1.0.1",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

View File

@ -12,7 +12,7 @@
<v-btn icon @click="reload()"> <v-btn icon @click="reload()">
<v-img src="@/assets/logo-64.png" contain height="40"></v-img> <v-img src="@/assets/logo-64.png" contain height="40"></v-img>
</v-btn> </v-btn>
<v-toolbar-title>Flaschengeist</v-toolbar-title> <v-toolbar-title>Flaschengeist <span class="caption">v1.0.1</span></v-toolbar-title>
<v-spacer/> <v-spacer/>
<v-btn icon v-if="getRouteName == 'resetPassword'" @click="goTo('login')"> <v-btn icon v-if="getRouteName == 'resetPassword'" @click="goTo('login')">
<v-icon> <v-icon>

View File

@ -365,8 +365,8 @@ export default {
console.log(user) console.log(user)
if (user.toSetAmount && user.autoLock) { if (user.toSetAmount && user.autoLock) {
if ( if (
Math.abs(user.amount - Number.parseInt(user.toSetAmount)) > (user.amount - Number.parseInt(user.toSetAmount)) <
user.limit + 500 -(user.limit + 500)
) { ) {
this.overOverLimit = user this.overOverLimit = user
user.toSetAmount = null user.toSetAmount = null
@ -377,8 +377,9 @@ export default {
return true return true
}, },
checkOverLimit(user) { checkOverLimit(user) {
console.log(user)
if (user.toSetAmount) { if (user.toSetAmount) {
if (Math.abs(user.amount - user.toSetAmount) > user.limit) { if ((user.amount - user.toSetAmount) < -user.limit) {
return user.checkedOverLimit ? false : true return user.checkedOverLimit ? false : true
} }
} }

View File

@ -315,7 +315,7 @@ export default {
}, },
checkOverLimitIsValid(user) { checkOverLimitIsValid(user) {
if (this.toSetAmount && user.autoLock) { 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.overOverLimit = user
this.toSetAmount = null this.toSetAmount = null
this.value = null this.value = null
@ -326,7 +326,7 @@ export default {
}, },
checkOverLimit(user) { checkOverLimit(user) {
if (this.toSetAmount) { if (this.toSetAmount) {
if (Math.abs( this.getAllSum() - this.toSetAmount) > user.limit) { if (( this.getAllSum() - this.toSetAmount) < -user.limit) {
return user.checkedOverLimit ? false : true return user.checkedOverLimit ? false : true
} }
} }

View File

@ -1,8 +1,8 @@
//const main = 'https://192.168.5.128:5000/' //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 = 'http://192.168.5.118:5000/'
//const main = 'https://groeger-clan.duckdns.org: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 = { const url = {
login: main + 'login', login: main + 'login',