Browse Source

validate bools

modals-to-spa
stingl 4 years ago
parent
commit
60fa1ced20
  1. 7
      js/app.js

7
js/app.js

@ -603,18 +603,24 @@ const TimeTrack = {
}, },
timeBoxTimeLeft(ticket) { timeBoxTimeLeft(ticket) {
return Number(ticket.timeBoxMinutes - this.getTotalTime(ticket, true)); return Number(ticket.timeBoxMinutes - this.getTotalTime(ticket, true));
},
validateBooleans(value) {
return value === 'true' || value === true;
} }
}, },
watch: { watch: {
publicDB() { publicDB() {
this.publicDB = this.validateBooleans(this.publicDB)
this.updateStorage(); this.updateStorage();
this.$forceUpdate(); this.$forceUpdate();
}, },
showPT() { showPT() {
this.showPT = this.validateBooleans(this.showPT)
this.updateStorage(); this.updateStorage();
this.$forceUpdate(); this.$forceUpdate();
}, },
dontShowMinutes() { dontShowMinutes() {
this.dontShowMinutes = this.validateBooleans(this.dontShowMinutes)
this.updateStorage(); this.updateStorage();
this.$forceUpdate(); this.$forceUpdate();
}, },
@ -623,6 +629,7 @@ const TimeTrack = {
this.$forceUpdate(); this.$forceUpdate();
}, },
fun() { fun() {
this.fun = this.validateBooleans(this.fun)
this.updateStorage(); this.updateStorage();
this.$forceUpdate(); this.$forceUpdate();
} }