Skip to content

Commit

Permalink
#193: make submissionType match values in sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
Espen Norderud committed Oct 10, 2023
1 parent 7f905cd commit 265f10f
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<script lang="ts">
import Radio from '@smui/radio';
import type {SubmissionType} from "../../../../../enums/submission-type";
import {Submission} from "../../../../../enums/submission-type";
import JustifiedRow from "../../../../form/JustifiedRow.svelte";
import FormField from "@smui/form-field";
import {perfType} from "../../stores/performancesStore";
import {invalidFields, RequiredFields} from "../../stores/performanceValidation";
const types: SubmissionType[] = Object.values(Submission) as SubmissionType[];
export let width="100%";
let invalid: boolean;
Expand All @@ -19,14 +16,14 @@
<fieldset class="perftype-radiobuttons" style:width={width}>
<legend class="textfield-label required" class:invalid>Type</legend>
<JustifiedRow addClass="radiobutton-justified-row" justify="start">
{#each types as type}
{#each Object.keys(Submission) as type}
<FormField>
<Radio
bind:group={$perfType}
value={type}
/>
<span slot="label">
{type}
{Submission[type]}
</span>
</FormField>
{/each}
Expand Down

0 comments on commit 265f10f

Please sign in to comment.