Skip to content

Commit

Permalink
Update EGM page (#65)
Browse files Browse the repository at this point in the history
* Update EGM page

* Add note for proposed constitution updates

* Update EGM voting link
  • Loading branch information
lhvy authored Apr 11, 2024
1 parent 5a579a0 commit 4777667
Show file tree
Hide file tree
Showing 26 changed files with 388 additions and 261 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "npm"

- name: Install dependencies
run: yarn
Expand Down
482 changes: 242 additions & 240 deletions data/NominationsData.js

Large diffs are not rendered by default.

164 changes: 143 additions & 21 deletions pages/egm.jsx
Original file line number Diff line number Diff line change
@@ -1,46 +1,168 @@
import React from "react";
import Head from "next/head";
import Image from "next/image";

// reactstrap components
import { Row, Col, Container, Button } from "reactstrap";

// yess let's get those animations
import "animate.css";

// Reactstrap components
import { Container, Row, Col } from "reactstrap";
// core components
import NomineeCard from "components/nominations/NomineeCard";
import NomineeModal from "components/nominations/NomineeModal";

import NOMINEES from "data/NominationsData.js";
import { useState } from "react";

import styles from "styles/modules/nominations.module.scss";

const Egm = () => {
const [showModal, setShowModal] = useState(false);
const [nominee, setNominee] = useState({});

// Given a person's name, returns all roles they're nominated for
const getNominatedRoles = (name) => {
const roles = [];

for (const role of NOMINEES) {
const role_name = role.role;

if (role.nominees.find((data) => data.name === name)) {
roles.push(role_name);
}
}

return roles;
};

const clickNominee = (nominee) => {
setShowModal(true);
setNominee(nominee);
};

const toggleModal = () => {
setShowModal(!showModal);
};

return (
<>
<Head>
<title>EGM | UNSW Co-op Society</title>
<meta name="robots" content="noindex"></meta>
</Head>

<section className="section section-lg">
<Row className="justify-content-center text-center ">
{/* Title */}
<Row className="justify-content-center text-center">
<Col lg="8">
<h1 className="animate__animated animate__zoomIn animate__fast">
COMING SOON
EGM EXEC/DIRECTOR NOMINEES
</h1>
</Col>
</Row>

<Container className="py-lg-md d-flex">
<Row className="justify-content-center text-center">
<Col lg="10">
<p className="lead text-muted">
Coop-soc will be holding an Extraordinary General Meeting (EGM)
on Friday 12th April, 2024. The meeting will go from 6:00pm to
approximately 6:45pm, and be held online. <br /> At this meeting
we will be updating our Club&apos;s constitution and hold
elections to replace Executives who are departing the team for
the remainder of the year. <br /> Check back soon for
information about nominees!
</p>
</Col>
</Row>
</Container>
{/* PreferenceKey */}
<Row className="justify-content-center text-center mb-md">
<Col lg="8">
<Button
className="mt-4"
color="primary"
target="_blank"
href="https://forms.office.com/r/d6ayhJmHdG"
>
Vote Now!
</Button>
</Col>
</Row>

<Row className="justify-content-center text-center">
<h4>
<mark className={styles["mark-1"]}>
&nbsp;&nbsp;&nbsp;&nbsp;First Preference&nbsp;&nbsp;&nbsp;
</mark>
</h4>
&nbsp;&nbsp;&nbsp;&nbsp;
<h4>
<mark className={styles["mark-2"]}>
&nbsp;Second Preference&nbsp;
</mark>
</h4>
</Row>

<br></br>

<Row className="justify-content-center text-center">
<h3>Click on each nominee to find out more!</h3>
</Row>

{/* Rendering all nominees using map functions */}
<div className="container">
{/* Iterate over every role */}
{NOMINEES.map((role, index) => (
<>
<hr />
<br />
{role.role === "Marketing Director" ? (
<div>
<Row className="justify-content-center text-center">
<h2>{role.role}</h2>
</Row>
<Row className="justify-content-center text-center mb-md">
<p style={{ fontSize: 20 }}>
Two directors will be elected.
</p>
</Row>
</div>
) : (
<Row className="justify-content-center text-center mb-md">
<h2>{role.role}</h2>
</Row>
)}
<div className="row justify-content-center">
<Container>
<div className="row justify-content-center">
{/* Iterate over every nominee going for that role */}
{role.nominees
// Sort by last name
.sort((a, b) =>
a.name
.split(" ")
.slice(-1)[0]
.localeCompare(b.name.split(" ").slice(-1)[0]),
)
.map((nominee, nomineeIndex) => (
<NomineeCard
key={`nominee-${index}-${nomineeIndex}`}
data={nominee}
onClick={() => clickNominee(nominee)}
/>
))}
</div>
</Container>
</div>
</>
))}
</div>
<div className="container justify-content-center text-center">
<hr />
<h1>Constitution Updates</h1>
<p style={{ fontWeight: "bold" }}>
Proposed updates to the constitution can be seen{" "}
<a href="/Constitution_Proposal.pdf" target="_blank">
here.
</a>{" "}
Please read and be prepared to vote for/against during the EGM.{" "}
<br />
Note: Changes are highlighted in yellow.
</p>
</div>
</section>

<NomineeModal
data={nominee}
roles={getNominatedRoles(nominee.name)}
isOpen={showModal}
toggle={toggleModal}
/>
</>
);
};
Expand Down
Binary file added public/Constitution_Proposal.pdf
Binary file not shown.
Binary file removed public/img/exec/2024/Amal.jpg
Binary file not shown.
Binary file removed public/img/exec/2024/Franklin.png
Binary file not shown.
Binary file removed public/img/exec/2024/Matthew.jpg
Binary file not shown.
Binary file removed public/img/exec/2024/Peter.png
Binary file not shown.
Binary file added public/img/nominee/Aiden.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Alex.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Angellinah.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Athen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Karen.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Mariam.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/MatthewL.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/MatthewM.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Meckenzie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Meera.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Peter.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Prapann.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Sania.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Shreya.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Tony.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Tyrone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/nominee/Vicky.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
User-agent: *
Disallow: /img/exec
Disallow: /img/nominee
Disallow: /egm
Disallow: /nominations

0 comments on commit 4777667

Please sign in to comment.