Simplify codes with fix small view problems

This commit is contained in:
Alireza Ahmadi
2023-02-18 16:50:40 +01:00
parent 9ea9d4d4dd
commit ef0dd10fe7
5 changed files with 25 additions and 101 deletions

View File

@@ -447,7 +447,6 @@
}
}
}
},
getDownStats(dbInbound, email) {
clientStats = dbInbound.clientStats
@@ -476,20 +475,8 @@
}
},
isClientEnabled(dbInbound, email) {
clientStats = dbInbound.clientStats
if(clientStats.length > 0)
{
for (const key in clientStats) {
if (Object.hasOwnProperty.call(clientStats, key)) {
if(clientStats[key]['email'] == email)
return clientStats[key]['enable']
}
}
}
else{
return true
}
clientStats = dbInbound.clientStats ? dbInbound.clientStats.find(stats => stats.email === email) : null
return clientStats ? clientStats['enable'] : true
},
},
watch: {