Skip to content
Open
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
23 changes: 23 additions & 0 deletions src/components/elections-vote/elections-vote.ce.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
<template>
<div>
<div>
<div class="mb-6 flex justify-between gap-4">
<Button
arrow
title="Back to all elections"
url="/elections"
class="btn-student-voice"
/>
<button
class="btn btn-student-voice flex items-center"
@click="skipElection"
>
Skip for now
<FontAwesomeIcon
icon="fa-solid fa-arrow-right"
class="ml-2 h-4 w-4"
/>
</button>
</div>
<div
class="body-style mb-6 flex flex-col gap-2 border-l-4 border-gray-400 bg-gray-100 p-2"
>
Expand Down Expand Up @@ -223,6 +241,7 @@ import { library } from "@fortawesome/fontawesome-svg-core";
import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";
import { submitVoteHandler } from "./election-vote.js";
import Modal from "../modal/modal.ce.vue";
import Button from "../button/button.ce.vue";
library.add(faCircleInfo);
export default {
name: "ElectionsVote",
Expand All @@ -241,6 +260,7 @@ export default {
VoteModal,
FontAwesomeIcon,
Modal,
Button,
},
data() {
return {
Expand Down Expand Up @@ -364,6 +384,9 @@ export default {
confirmVotes() {
this.VoteModalClosed = false;
},
skipElection() {
this.checkForMoreElections();
},
submitVotes() {
if (this.votes.length > 0 && this.voteSpoiled == false) {
console.log("Voting submitted, votes: ");
Expand Down
Loading