|
@ -197,23 +197,25 @@ |
|
|
requires: [], |
|
|
requires: [], |
|
|
position: [0, 0], |
|
|
position: [0, 0], |
|
|
title: t.name, |
|
|
title: t.name, |
|
|
points: t.points! |
|
|
points: t.points!, |
|
|
})); |
|
|
})); |
|
|
tasks.tasks = [...tasks.tasks, ...newDescriptors]; |
|
|
tasks.tasks = [...tasks.tasks, ...newDescriptors]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function loadMaxPoints() { |
|
|
async function loadMaxPoints() { |
|
|
const loadedTasks = await Promise.all(tasks.tasks.map(async t => { |
|
|
const loadedTasks = await Promise.all( |
|
|
|
|
|
tasks.tasks.map(async (t) => { |
|
|
if (t.type != "open-data") { |
|
|
if (t.type != "open-data") { |
|
|
return t |
|
|
return t; |
|
|
} |
|
|
} |
|
|
const a = await grabAssignment(t.taskReference) |
|
|
const a = await grabAssignment(t.taskReference); |
|
|
return { ...t, points: a.points! } |
|
|
return { ...t, points: a.points! }; |
|
|
})) |
|
|
}) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
tasks = { ...tasks, tasks: loadedTasks } |
|
|
tasks = { ...tasks, tasks: loadedTasks }; |
|
|
|
|
|
|
|
|
alert("Načteno :)") |
|
|
alert("Načteno :)"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function hideSelection() { |
|
|
function hideSelection() { |
|
@ -233,8 +235,6 @@ |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |
|
|
.container { |
|
|
.container { |
|
|
/*display: flex;*/ |
|
|
|
|
|
/* flex-direction: row;*/ |
|
|
|
|
|
margin: 0; |
|
|
margin: 0; |
|
|
height: 99vh; |
|
|
height: 99vh; |
|
|
width: 100%; |
|
|
width: 100%; |
|
@ -275,13 +275,25 @@ |
|
|
padding: 5px; |
|
|
padding: 5px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
label { |
|
|
|
|
|
display: block; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
input:disabled { |
|
|
|
|
|
color: #ccc; |
|
|
|
|
|
} |
|
|
button { |
|
|
button { |
|
|
|
|
|
font-family: inherit; |
|
|
|
|
|
font-size: inherit; |
|
|
|
|
|
padding: 0.4em; |
|
|
|
|
|
margin: 0 0 0.5em 0; |
|
|
width: 45%; |
|
|
width: 45%; |
|
|
border-radius: 0.5em; |
|
|
border-radius: 0.5em; |
|
|
border: 2px solid white; |
|
|
border: 2px solid white; |
|
|
background-color: transparent; |
|
|
background-color: transparent; |
|
|
color: white; |
|
|
color: white; |
|
|
transition: auto; |
|
|
transition: auto; |
|
|
|
|
|
box-sizing: border-box; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
button:hover:not(:disabled) { |
|
|
button:hover:not(:disabled) { |
|
@ -393,8 +405,7 @@ |
|
|
</button> |
|
|
</button> |
|
|
<button |
|
|
<button |
|
|
on:click={loadMaxPoints} |
|
|
on:click={loadMaxPoints} |
|
|
title="Stáhne ke každé úloze maximální počet bodů" |
|
|
title="Stáhne ke každé úloze maximální počet bodů"> |
|
|
> |
|
|
|
|
|
Aktualizovat počty bodů |
|
|
Aktualizovat počty bodů |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|