`;
}
function updateViewHome(){
document.getElementById('app').innerHTML = /*HTML*/ `
-
Hello World!
+
Velkommen til Vinlotterix
${createMenu()}
`;
}
@@ -35,13 +36,13 @@ function updateViewRules(){
}
-function updateViewList(){
+function editList(){
let html = '';
const employees = model.employees;
for (let i = 0; i < employees.length; i++){
const person = employees[i];
html += /*html*/ `
-
${person.name}
+
${person.id}${person.name}
`;
}
app.innerHTML = html + 'This is the list '
@@ -50,15 +51,34 @@ function updateViewList(){
function showWinnersView(){
let winners = [];
let num = model.input.rules.numWinners;
-
+ app.innerHTML = /*html*/ `
Vinlotterix
${createMenu()}
+
Vinnere:
+ `;
for (i = 0; i < num; i++){
index = Math.floor(Math.random() * (model.employees.length));
- console.log(index)
- winners.push(model.employees[index])
+ winners.push(model.employees[index]);
}
for (i = 0; i < winners.length; i++){
app.innerHTML += /*html*/ `