|
@ -15,16 +15,16 @@ import Odevzdavatko from "./Odevzdavatko.svelte"; |
|
|
showSolution = false |
|
|
showSolution = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let status: TaskStatus | undefined |
|
|
|
|
|
$: if (task) status = $taskStatuses.get(task.id) |
|
|
|
|
|
let referenceId: string | null |
|
|
let referenceId: string | null |
|
|
$: { |
|
|
$: { |
|
|
if (task != null) { |
|
|
if (task != null) { |
|
|
const r = task.taskReference || task.id |
|
|
const r = task.taskReference |
|
|
if (referenceId != r) |
|
|
if (referenceId != r) |
|
|
referenceId = r |
|
|
referenceId = r |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
let status: TaskStatus | undefined |
|
|
|
|
|
$: if (task) status = $taskStatuses.get(referenceId!) |
|
|
|
|
|
|
|
|
let loginUrl: string = null! |
|
|
let loginUrl: string = null! |
|
|
function updateLoginUrl() { |
|
|
function updateLoginUrl() { |
|
@ -69,7 +69,7 @@ import Odevzdavatko from "./Odevzdavatko.svelte"; |
|
|
|
|
|
|
|
|
<div class="status"> |
|
|
<div class="status"> |
|
|
<p> |
|
|
<p> |
|
|
{task.id} | {task.points} bodů |
|
|
{referenceId} | {task.points} bodů |
|
|
{#if status && status.submitted} |
|
|
{#if status && status.submitted} |
|
|
{#if nonNull(status).solved} |
|
|
{#if nonNull(status).solved} |
|
|
| Vyřešeno 🥳 |
|
|
| Vyřešeno 🥳 |
|
@ -84,7 +84,7 @@ import Odevzdavatko from "./Odevzdavatko.svelte"; |
|
|
|
|
|
|
|
|
<hr class="clearfloat" /> |
|
|
<hr class="clearfloat" /> |
|
|
{#if isLoggedIn()} |
|
|
{#if isLoggedIn()} |
|
|
<Odevzdavatko id={task.id} /> |
|
|
<Odevzdavatko id={nonNull(referenceId)} /> |
|
|
{:else} |
|
|
{:else} |
|
|
<p class="zs-warning">Pro odevzdávání je potřeba se <a href={loginUrl}>přihlásit</a>.</p> |
|
|
<p class="zs-warning">Pro odevzdávání je potřeba se <a href={loginUrl}>přihlásit</a>.</p> |
|
|
{/if} |
|
|
{/if} |
|
|