fixed bug, sodass user, dessen autolock vom finanzer abgestellt ist, soviel anschreiben können wie sie wollen
This commit is contained in:
parent
65decabfb5
commit
d6651046d8
|
@ -362,7 +362,8 @@ export default {
|
|||
this.overLimitUser = null
|
||||
},
|
||||
checkOverLimitIsValid(user) {
|
||||
if (user.toSetAmount) {
|
||||
console.log(user)
|
||||
if (user.toSetAmount && user.autoLock) {
|
||||
if (
|
||||
Math.abs(user.amount - Number.parseInt(user.toSetAmount)) >
|
||||
user.limit + 500
|
||||
|
@ -387,7 +388,7 @@ export default {
|
|||
clearTimeout(user.timeout)
|
||||
user.toSetAmount = user.toSetAmount ? user.toSetAmount + amount : amount
|
||||
if (this.checkOverLimitIsValid(user)) {
|
||||
if (this.checkOverLimit(user)) {
|
||||
if (this.checkOverLimit(user) && user.autoLock) {
|
||||
this.overLimitUser = user
|
||||
} else {
|
||||
user.timeout = setTimeout(() => {
|
||||
|
@ -437,7 +438,7 @@ export default {
|
|||
? user.toSetAmount + Math.round(Math.abs(user.value * 100))
|
||||
: Math.round(Math.abs(user.value * 100))
|
||||
if (this.checkOverLimitIsValid(user)) {
|
||||
if (this.checkOverLimit(user)) {
|
||||
if (this.checkOverLimit(user) && user.autoLock) {
|
||||
this.overLimitUser = user
|
||||
} else {
|
||||
this.addAmount({
|
||||
|
|
|
@ -314,7 +314,7 @@ export default {
|
|||
this.overLimitUser = null
|
||||
},
|
||||
checkOverLimitIsValid(user) {
|
||||
if (this.toSetAmount) {
|
||||
if (this.toSetAmount && user.autoLock) {
|
||||
if (Math.abs(this.getAllSum() - Number.parseInt(this.toSetAmount)) > user.limit + 500) {
|
||||
this.overOverLimit = user
|
||||
this.toSetAmount = null
|
||||
|
@ -336,7 +336,7 @@ export default {
|
|||
clearTimeout(this.timeout)
|
||||
this.toSetAmount = this.toSetAmount ? this.toSetAmount + amount : amount
|
||||
if (this.checkOverLimitIsValid(this.user)) {
|
||||
if (this.checkOverLimit(this.user)) {
|
||||
if (this.checkOverLimit(this.user) && this.user.autoLock) {
|
||||
this.overLimitUser = this.user
|
||||
} else {
|
||||
this.timeout = setTimeout(() => {
|
||||
|
@ -389,7 +389,7 @@ export default {
|
|||
? this.toSetAmount + Math.round(Math.abs(this.value * 100))
|
||||
: Math.round(Math.abs(this.value * 100))
|
||||
if (this.checkOverLimitIsValid(this.user)) {
|
||||
if (this.checkOverLimit(this.user)) {
|
||||
if (this.checkOverLimit(this.user) && this.user.autoLock) {
|
||||
this.overLimitUser = this.user
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -45,6 +45,7 @@ const mutations = {
|
|||
existuser.type = users[user].type
|
||||
existuser.limit = users[user].limit
|
||||
existuser.last_seen = users[user].last_seen
|
||||
existuser.autoLock = users[user].autoLock ? users[user].autoLock : existuser.autoLock
|
||||
} else {
|
||||
state.users.push({
|
||||
username: users[user].username,
|
||||
|
@ -55,7 +56,8 @@ const mutations = {
|
|||
type: users[user].type,
|
||||
loading: false,
|
||||
limit: users[user].limit,
|
||||
last_seen: users[user].last_seen
|
||||
last_seen: users[user].last_seen,
|
||||
autoLock: users[user].autoLock
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue