From c53761d8bf14b74d269dde330a34deb0387eee9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Fri, 20 Mar 2020 14:19:54 +0100 Subject: [PATCH] Live overview of total tickets bought on virtual lottery page. --- src/components/VirtualLotteryPage.vue | 171 +++++++++++++++++++++++++- 1 file changed, 170 insertions(+), 1 deletion(-) diff --git a/src/components/VirtualLotteryPage.vue b/src/components/VirtualLotteryPage.vue index adbe7ff..7bddfab 100644 --- a/src/components/VirtualLotteryPage.vue +++ b/src/components/VirtualLotteryPage.vue @@ -21,6 +21,21 @@ Se her +
+ +

Live oversikt av kjøp i dag

+
+
+
+

{{ ticketsBought[color] }} kjøpt

+
+
+
+ list.map(object => object[key]).reduce((a, b) => a + b); + + this.ticketsBought = { + red: addValueOfListObjectByKey(response, "red"), + blue: addValueOfListObjectByKey(response, "blue"), + green: addValueOfListObjectByKey(response, "green"), + yellow: addValueOfListObjectByKey(response, "yellow"), + } } this.attendeesFetched = true; }, @@ -202,6 +226,151 @@ export default { } + +