Fix imports

This commit is contained in:
orosmatthew 2023-04-29 15:44:42 -04:00
parent 23443b2907
commit e222c8966a
2 changed files with 8 additions and 10 deletions

View File

@ -1,5 +1,4 @@
<script lang="ts"> <script lang="ts">
import { SubmissionState } from '@prisma/client';
import type { PageData } from './$types'; import type { PageData } from './$types';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
@ -34,11 +33,11 @@
on:click={() => { on:click={() => {
goto('/admin/submissions/' + submission.id.toString()); goto('/admin/submissions/' + submission.id.toString());
}} }}
class={(submission.state == SubmissionState.InReview class={(submission.state == 'InReview'
? 'table-warning' ? 'table-warning'
: submission.state == SubmissionState.Correct : submission.state == 'Correct'
? 'table-success' ? 'table-success'
: submission.state == SubmissionState.Incorrect : submission.state == 'Incorrect'
? 'table-danger' ? 'table-danger'
: '') + ' submission-row'} : '') + ' submission-row'}
> >

View File

@ -1,5 +1,4 @@
<script lang="ts"> <script lang="ts">
import { SubmissionState } from '@prisma/client';
import type { PageData } from './$types'; import type { PageData } from './$types';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { Diff2HtmlUI } from 'diff2html/lib/ui/js/diff2html-ui-base'; import { Diff2HtmlUI } from 'diff2html/lib/ui/js/diff2html-ui-base';
@ -42,11 +41,11 @@
</thead> </thead>
<tbody> <tbody>
<tr <tr
class={(data.state == SubmissionState.InReview class={(data.state == 'InReview'
? 'table-warning' ? 'table-warning'
: data.state == SubmissionState.Correct : data.state == 'Correct'
? 'table-success' ? 'table-success'
: data.state == SubmissionState.Incorrect : data.state == 'Incorrect'
? 'table-danger' ? 'table-danger'
: '') + ' submission-row'} : '') + ' submission-row'}
> >
@ -71,13 +70,13 @@
</tbody> </tbody>
</table> </table>
{#if data.state == SubmissionState.InReview} {#if data.state == 'InReview'}
<div class="row"> <div class="row">
<div class="text-center"> <div class="text-center">
<a href={'/admin/diff/' + data.id} class="btn btn-warning">Review Submission</a> <a href={'/admin/diff/' + data.id} class="btn btn-warning">Review Submission</a>
</div> </div>
</div> </div>
{:else if data.state == SubmissionState.Incorrect} {:else if data.state == 'Incorrect'}
<h2 style="text-align:center">Diff</h2> <h2 style="text-align:center">Diff</h2>
<div id="diff" /> <div id="diff" />
{/if} {/if}