-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/statuses #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
noahk004
wants to merge
8
commits into
main
Choose a base branch
from
feature/statuses
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/statuses #291
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
bf7712b
Change <img> to next/image
noahk004 afdcbb1
Add statuses to portal page
noahk004 7a1f30c
Update apps/site/src/app/confirmation/page.tsx
noahk004 563b4e7
Prettier changes
noahk004 88287ee
Merge branch 'feature/statuses' of https://github.com/HackAtUCI/zotha…
noahk004 bf3beb3
Add PR changes
noahk004 000fba6
Prettier changes
noahk004 32eb5b0
Remove StatusIndicator hover color change
noahk004 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import ConfirmationPage from "./ConfirmationPage"; | ||
|
|
||
| export default function Confirmation() { | ||
| return <ConfirmationPage />; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| @use "zothacks-theme" as theme; | ||
|
|
||
| .container { | ||
| min-height: 100vh; | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| gap: 2rem; | ||
|
noahk004 marked this conversation as resolved.
|
||
| background: url("~@/assets/background/mountains-background.png"); | ||
| font-family: var(--next-font-reddit-mono), monospace; | ||
| padding: 150px 0 100px 0; | ||
|
|
||
| * { | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| h1 { | ||
| color: theme.$white; | ||
| font-size: 4rem; | ||
| } | ||
|
|
||
| p { | ||
| font-weight: 400; | ||
| letter-spacing: 1px; | ||
| } | ||
|
|
||
| .wrapper { | ||
| max-width: 600px; | ||
| margin: 0 40px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 16px; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import { Status } from "@/lib/userRecord"; | ||
| import PrimaryButton from "@/components/PrimaryButton/PrimaryButton"; | ||
|
|
||
| interface ActionButtonProps { | ||
| status: Status; | ||
| } | ||
|
|
||
| export default function ActionButton({ status }: ActionButtonProps) { | ||
| let buttonJSX: JSX.Element; | ||
|
|
||
| switch (status) { | ||
| case Status.Rejected: | ||
| case Status.Void: | ||
| case Status.Pending: | ||
| case Status.Reviewed: | ||
| case Status.Accepted: | ||
| case Status.Waitlisted: | ||
| case Status.Signed: | ||
| case Status.Confirmed: | ||
| case Status.Attending: { | ||
| buttonJSX = ( | ||
| <PrimaryButton variant="large" href="/"> | ||
| Return to Homepage | ||
| </PrimaryButton> | ||
| ); | ||
| break; | ||
| } | ||
|
|
||
| // case Status.Waitlisted: { | ||
| // buttonJSX = <button className={styles.actionButton}>I am no longer able to attend ZotHacks 2025</button>; | ||
| // break; | ||
| // } | ||
|
|
||
| default: { | ||
| const exhaustiveCheck: never = status; | ||
| throw new Error(`Unhandled status: ${exhaustiveCheck}`); | ||
| } | ||
| } | ||
|
|
||
| return buttonJSX; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| @use "zothacks-theme" as theme; | ||
|
|
||
| .messageWrapper { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 8px; | ||
| color: theme.$white; | ||
| margin-top: 32px; | ||
|
|
||
| p { | ||
| font-size: 1.1rem; | ||
| } | ||
|
|
||
| h4 { | ||
| font-size: 1.5rem; | ||
| margin-bottom: 0; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| import { Status } from "@/lib/userRecord"; | ||
| import styles from "./Message.module.scss"; | ||
|
|
||
| interface MessageProps { | ||
| status: Status; | ||
| } | ||
|
|
||
| export default function Message({ status }: MessageProps) { | ||
| let message: string; | ||
| let header: string; | ||
|
|
||
| switch (status) { | ||
| case Status.Pending: | ||
| case Status.Reviewed: { | ||
| header = ""; | ||
| message = `Thank you for submitting your application! We are currently reviewing | ||
|
IanWearsHat marked this conversation as resolved.
|
||
| applications on a rolling basis, and you will hear back from us soon!`; | ||
| break; | ||
| } | ||
|
|
||
| case Status.Accepted: { | ||
| header = "Congratulations!"; | ||
| message = `Congratulations! You have been admitted to ZotHacks 2025! Please check | ||
| your email to sign your waiver and confirm your attendance!`; | ||
| break; | ||
| } | ||
| case Status.Waitlisted: { | ||
| header = "RSVP"; | ||
| message = `Thank you for applying to ZotHacks this year. We have read through | ||
| many applications so far, and are able to offer you a spot on the | ||
| event waitlist. Please check your email for more info about the | ||
| waitlist and waitlist walk-ins!`; | ||
| break; | ||
| } | ||
| case Status.Rejected: { | ||
| header = "Sorry..."; | ||
| message = `Thank you for applying to ZotHacks this year. We have read through | ||
| many applications so far, and unfortunately are unable to offer you a | ||
| spot at our event. We highly encourage you to continue developing your | ||
| skills and passion for technology. We would love to see you apply | ||
| again next year!`; | ||
| break; | ||
| } | ||
|
|
||
| case Status.Signed: | ||
| case Status.Confirmed: | ||
| case Status.Attending: { | ||
| header = ""; | ||
| message = ``; | ||
| break; | ||
| } | ||
|
|
||
| case Status.Void: { | ||
| header = ""; | ||
| message = `Unfortunately, you are not able to RSVP for IrvineHacks at this time | ||
| and will not be able to come to the event. However, we would love to | ||
| see you apply again next year!`; | ||
| break; | ||
| } | ||
|
|
||
| default: { | ||
| const exhaustiveCheck: never = status; | ||
| throw new Error(`Unhandled status: ${exhaustiveCheck}`); | ||
| } | ||
| } | ||
|
|
||
| return ( | ||
| <div className={styles.messageWrapper}> | ||
| <h4>{header}</h4> | ||
| <p>{message}</p> | ||
| </div> | ||
| ); | ||
| } | ||
30 changes: 30 additions & 0 deletions
30
apps/site/src/app/portal/components/StatusIndicator.module.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| @use "zothacks-theme" as theme; | ||
|
|
||
| .dark { | ||
| background-color: rgba(theme.$dark-green, 0.69); | ||
| } | ||
|
|
||
| .light { | ||
| background-color: rgba(theme.$light-green, 0.69); | ||
| } | ||
|
|
||
| .indicator { | ||
| border: 5px solid theme.$dark-green; | ||
| border-radius: 30px; | ||
| padding: 30px 40px; | ||
| width: 100%; | ||
| box-sizing: border-box; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| font-size: 1.3rem; | ||
| color: theme.$off-white; | ||
|
|
||
| p { | ||
| margin: 0; | ||
| } | ||
| } | ||
|
|
||
| .icon { | ||
| margin-left: 30px; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import Image, { StaticImageData } from "next/image"; | ||
| import styles from "./StatusIndicator.module.scss"; | ||
|
|
||
| interface StatusIndicatorProps { | ||
| icon: StaticImageData; | ||
| dark: boolean; | ||
| children: React.ReactNode; | ||
| } | ||
|
|
||
| export default function StatusIndicator({ | ||
| icon, | ||
| dark, | ||
| children, | ||
| }: StatusIndicatorProps) { | ||
| return ( | ||
| <div | ||
| className={styles.indicator + " " + (dark ? styles.dark : styles.light)} | ||
| > | ||
| <p>{children}</p> | ||
| <Image src={icon} className={styles.icon} alt="Status icon" /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| @use "zothacks-theme" as theme; | ||
|
|
||
| .statusWrapper { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 16px; | ||
| width: 100%; | ||
|
|
||
| h2 { | ||
| font-size: 2.5rem; | ||
| color: theme.$white; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| import { Status, Decision } from "@/lib/userRecord"; | ||
| import StatusIndicator from "./StatusIndicator"; | ||
|
|
||
| import check from "@/assets/icons/check.svg"; | ||
| import dots from "@/assets/icons/dots.svg"; | ||
| import x from "@/assets/icons/x.svg"; | ||
|
|
||
| import styles from "./Timeline.module.scss"; | ||
|
|
||
| interface TimelineProps { | ||
| status: Status; | ||
| } | ||
|
|
||
| export default function Timeline({ status }: TimelineProps) { | ||
| return ( | ||
| <div className={styles.statusWrapper}> | ||
| {(Object.values(Decision).includes(status as Decision) || | ||
| status === Status.Signed || | ||
| status === Status.Confirmed) && ( | ||
| <StatusIndicator icon={check} dark={true}> | ||
| Application Submitted | ||
| </StatusIndicator> | ||
| )} | ||
|
|
||
| {(status === Status.Accepted || | ||
| status === Status.Signed || | ||
| status === Status.Confirmed) && ( | ||
| <> | ||
| <StatusIndicator icon={check} dark={true}> | ||
| Application Accepted | ||
| </StatusIndicator> | ||
| <StatusIndicator | ||
| icon={dots} | ||
| dark={status === Status.Signed || status === Status.Confirmed} | ||
| > | ||
| Waiver Signed | ||
| </StatusIndicator> | ||
| <StatusIndicator icon={dots} dark={status === Status.Confirmed}> | ||
| Attendance Confirmed | ||
| </StatusIndicator> | ||
| </> | ||
| )} | ||
|
|
||
| {status === Status.Waitlisted && ( | ||
| <StatusIndicator icon={dots} dark={true}> | ||
| Waitlisted | ||
| </StatusIndicator> | ||
| )} | ||
|
|
||
| {status === Status.Rejected && ( | ||
| <StatusIndicator icon={x} dark={true}> | ||
| Application Rejected | ||
| </StatusIndicator> | ||
| )} | ||
| </div> | ||
| ); | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.