`;
}
function updateViewHome(){
document.getElementById('app').innerHTML = /*HTML*/ `
Velkommen til Vinlotterix
${createMenu()}
`;
}
function updateViewRules(){
app.innerHTML = /*HTML*/ `
Hello from rules
${createMenu()}
Nummer: ${model.input.rules.numWinners}
`;
}
function editList(){
let html = '';
const employees = model.employees;
for (let i = 0; i < employees.length; i++){
const person = employees[i];
html += /*html*/ `
${person.id}${person.name}
`;
}
app.innerHTML = html + 'This is the list '
}
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));
winners.push(model.employees[index]);
}
for (i = 0; i < winners.length; i++){
app.innerHTML += /*html*/ `
${winners[i].name}
`;}
}
function goToEditPage(id){
const person = model.employees[id];
let newPerson = '';
app.innerHTML = /*html*/ `