Fix imports
This commit is contained in:
parent
23443b2907
commit
e222c8966a
@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { SubmissionState } from '@prisma/client';
|
||||
import type { PageData } from './$types';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
@ -34,11 +33,11 @@
|
||||
on:click={() => {
|
||||
goto('/admin/submissions/' + submission.id.toString());
|
||||
}}
|
||||
class={(submission.state == SubmissionState.InReview
|
||||
class={(submission.state == 'InReview'
|
||||
? 'table-warning'
|
||||
: submission.state == SubmissionState.Correct
|
||||
: submission.state == 'Correct'
|
||||
? 'table-success'
|
||||
: submission.state == SubmissionState.Incorrect
|
||||
: submission.state == 'Incorrect'
|
||||
? 'table-danger'
|
||||
: '') + ' submission-row'}
|
||||
>
|
||||
|
@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { SubmissionState } from '@prisma/client';
|
||||
import type { PageData } from './$types';
|
||||
import { onMount } from 'svelte';
|
||||
import { Diff2HtmlUI } from 'diff2html/lib/ui/js/diff2html-ui-base';
|
||||
@ -42,11 +41,11 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
class={(data.state == SubmissionState.InReview
|
||||
class={(data.state == 'InReview'
|
||||
? 'table-warning'
|
||||
: data.state == SubmissionState.Correct
|
||||
: data.state == 'Correct'
|
||||
? 'table-success'
|
||||
: data.state == SubmissionState.Incorrect
|
||||
: data.state == 'Incorrect'
|
||||
? 'table-danger'
|
||||
: '') + ' submission-row'}
|
||||
>
|
||||
@ -71,13 +70,13 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{#if data.state == SubmissionState.InReview}
|
||||
{#if data.state == 'InReview'}
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<a href={'/admin/diff/' + data.id} class="btn btn-warning">Review Submission</a>
|
||||
</div>
|
||||
</div>
|
||||
{:else if data.state == SubmissionState.Incorrect}
|
||||
{:else if data.state == 'Incorrect'}
|
||||
<h2 style="text-align:center">Diff</h2>
|
||||
<div id="diff" />
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user