Removed unsued data color vars and need to read from colors object now that colors are not independently in data.

This commit is contained in:
2020-03-20 17:33:44 +01:00
parent d1e5d60885
commit 5dd26753ea

View File

@@ -171,10 +171,6 @@ export default {
components: { TextToast, Wine, ScanToVinmonopolet },
data() {
return {
red: null,
blue: null,
green: null,
yellow: null,
payed: undefined,
winners: [],
wines: [],
@@ -314,10 +310,10 @@ export default {
}
sendObject.purchase.bought =
parseInt(this.blue) +
parseInt(this.red) +
parseInt(this.green) +
parseInt(this.yellow);
parseInt(colors.blue) +
parseInt(colors.red) +
parseInt(colors.green) +
parseInt(colors.yellow);
const stolen = sendObject.purchase.bought - parseInt(this.payed) / 10;
if (isNaN(stolen) || stolen == undefined) {
alert("Betalt må registreres");