diff --git a/api/virtualLottery.js b/api/virtualLottery.js index 81107dc..e9ec85f 100644 --- a/api/virtualLottery.js +++ b/api/virtualLottery.js @@ -45,7 +45,7 @@ const attendees = async (req, res) => { attendee = attendees[i]; attendeesRedacted.push({ name: attendee.name, - ballots: attendee.red + attendee.blue + attendee.yellow + attendee.green, + raffles: attendee.red + attendee.blue + attendee.yellow + attendee.green, red: attendee.red, blue: attendee.blue, green: attendee.green, @@ -99,27 +99,27 @@ const drawWinner = async (req, res) => { message: "No attendees left that have not won." }); } - let ballotColors = []; + let raffleColors = []; for (let i = 0; i < allContestants.length; i++) { let currentContestant = allContestants[i]; for (let blue = 0; blue < currentContestant.blue; blue++) { - ballotColors.push("blue"); + raffleColors.push("blue"); } for (let red = 0; red < currentContestant.red; red++) { - ballotColors.push("red"); + raffleColors.push("red"); } for (let green = 0; green < currentContestant.green; green++) { - ballotColors.push("green"); + raffleColors.push("green"); } for (let yellow = 0; yellow < currentContestant.yellow; yellow++) { - ballotColors.push("yellow"); + raffleColors.push("yellow"); } } - ballotColors = shuffle(ballotColors); + raffleColors = shuffle(raffleColors); let colorToChooseFrom = - ballotColors[Math.floor(Math.random() * ballotColors.length)]; + raffleColors[Math.floor(Math.random() * raffleColors.length)]; let findObject = { winner: false }; findObject[colorToChooseFrom] = { $gt: 0 }; diff --git a/src/components/GeneratePage.vue b/src/components/GeneratePage.vue index a77e780..e149888 100644 --- a/src/components/GeneratePage.vue +++ b/src/components/GeneratePage.vue @@ -5,9 +5,9 @@ Velg hvilke farger du vil ha, fyll inn antall lodd og klikk 'generer'

- + - + @@ -27,7 +27,7 @@ export default { data() { return { hardStart: false, - numberOfBallots: null + numberOfRaffles: null }; }, mounted() { diff --git a/src/ui/Attendees.vue b/src/ui/Attendees.vue index 2cf1afb..92f4a64 100644 --- a/src/ui/Attendees.vue +++ b/src/ui/Attendees.vue @@ -4,10 +4,10 @@
{{ attendee.name }} -
{{ attendee.red }}
-
{{ attendee.blue }}
-
{{ attendee.green }}
-
{{ attendee.yellow }}
+
{{ attendee.red }}
+
{{ attendee.blue }}
+
{{ attendee.green }}
+
{{ attendee.yellow }}
diff --git a/src/ui/TotalBought.vue b/src/ui/TotalBought.vue index c68d899..4d1f936 100644 --- a/src/ui/TotalBought.vue +++ b/src/ui/TotalBought.vue @@ -8,7 +8,7 @@ color.name + '-container ' + color.name + - '-raffle inner-bought-container ballot-element' + '-raffle inner-bought-container raffle-element' " :key="color.name" > diff --git a/src/ui/WinnerDraw.vue b/src/ui/WinnerDraw.vue index c7ca7b2..81c04ec 100644 --- a/src/ui/WinnerDraw.vue +++ b/src/ui/WinnerDraw.vue @@ -4,7 +4,7 @@

TREKKER

{{ currentName }} @@ -20,7 +20,7 @@

VINNER

{{ currentName }} diff --git a/src/ui/Winners.vue b/src/ui/Winners.vue index 0fd7d37..cfd45d6 100644 --- a/src/ui/Winners.vue +++ b/src/ui/Winners.vue @@ -4,7 +4,7 @@
-
{{ winner.name }}
+
{{ winner.name }}