Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/routes/event/[id=eventID]/components/registration.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { EventsAPI, type BallotResponseData, type EventResponseData } from '$lib/api/events';
import { getStorageContext } from '$lib/storage/storage';
import QRCode from '@castlenine/svelte-qrcode';
import { Button, Heading } from 'flowbite-svelte';
import { Button, Heading, P } from 'flowbite-svelte';
import { ClipboardCheckOutline, ClipboardCleanOutline } from 'flowbite-svelte-icons';

const {
Expand Down Expand Up @@ -42,7 +42,13 @@
</script>

<div>
<Heading tag="h2" class="mb-2">Registration ({event.name})</Heading>
<Heading tag="h2" class="mb-8">Registration ({event.name})</Heading>

<P class="mb-4">
Share the QR-code with voters to allow them to register. Atleast 2 voters have to be registered
to <i>begin voting</i>.
<b>If you <i>begin voting</i>, users will no longer be able to register.</b>
</P>

<Button
onclick={onCopyClick}
Expand Down
9 changes: 7 additions & 2 deletions src/routes/event/[id=eventID]/components/voting.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@

<Heading tag="h2">Voting ({event.name})</Heading>

<P>
Once all voters have submitted their ballots you can close the voting. This will calculate the
results and prevent voters from submitting any more votes.
</P>

{#if unsubmittedBallots !== undefined && submittedBallots !== undefined}
<Heading tag="h3" class="my-2 text-center">Active ({unsubmittedBallots.length})</Heading>
<Heading tag="h3" class="my-2 text-center">Active Ballots ({unsubmittedBallots.length})</Heading>
<ul class="text-center">
{#each unsubmittedBallots as ballot (ballot.id)}
<li>{ballot.voter_name}</li>
{/each}
</ul>
<Heading tag="h3" class="my-2 text-center">Submitted ({submittedBallots.length})</Heading>
<Heading tag="h3" class="my-2 text-center">Submitted Ballots ({submittedBallots.length})</Heading>
<ul class="text-center">
{#each submittedBallots as ballot (ballot.id)}
<li>{ballot.voter_name}</li>
Expand Down