Skip to content

Commit

Permalink
Merge pull request #841 from asmita-chandra/dev
Browse files Browse the repository at this point in the history
Skule-Hunt Point System and Drop Down for Mission Categories #837 #838 #839
  • Loading branch information
gaurikam2003 authored Aug 28, 2024
2 parents 3ffdb89 + 17408f1 commit 2dd7c05
Show file tree
Hide file tree
Showing 49 changed files with 394 additions and 250 deletions.
Binary file added client/src/assets/judges/Ashley.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 client/src/assets/judges/Ashlyn.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 client/src/assets/judges/Bhoovi.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 client/src/assets/judges/Brian.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 client/src/assets/judges/Carl.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 client/src/assets/judges/CoChairs.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 client/src/assets/judges/Hamza.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 client/src/assets/judges/Jason.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 client/src/assets/judges/Kiera.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 client/src/assets/judges/LC.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 client/src/assets/judges/Matthew.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 client/src/assets/judges/Nafew.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 client/src/assets/judges/Nidaa.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 client/src/assets/judges/Reid.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 client/src/assets/judges/Shosh.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 client/src/assets/judges/Tobin.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 client/src/assets/judges/Tori.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 client/src/assets/judges/Tudor.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 client/src/assets/judges/Will.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 removed client/src/assets/judges/alexi.jpg
Binary file not shown.
Binary file removed client/src/assets/judges/amelie.jpg
Binary file not shown.
Binary file removed client/src/assets/judges/ben.jpg
Binary file not shown.
Binary file removed client/src/assets/judges/celin.jpg
Binary file not shown.
Binary file removed client/src/assets/judges/emaan.jpg
Binary file not shown.
Binary file removed client/src/assets/judges/erika.jpg
Binary file not shown.
Binary file removed client/src/assets/judges/jeremy.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/kaija.jpeg
Diff not rendered.
Binary file removed client/src/assets/judges/karen.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/katie.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/khalil.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/luka.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/nat.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/novera.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/rimjot.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/tanya.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/tech.png
Diff not rendered.
Binary file removed client/src/assets/judges/tyler.png
Diff not rendered.
Binary file removed client/src/assets/judges/will.jpg
Diff not rendered.
2 changes: 1 addition & 1 deletion client/src/pages/Profile/PageProfileFrosh.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ export const ProfilePageScuntTeam = () => {
if (!isRegistered || !scuntSettings || !scuntSettings?.revealTeams) return null;
return (
<div className="profile-page-scunt-team profile-page-side-section">
<h3>Your Scunt Team:</h3>
<h3>YOUR SKULE™ HUNT TEAM:</h3>
<h2>
<b>{scuntTeam ? scuntTeam.name : null}</b>
</h2>
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/ScuntGameSettings/ScuntGameSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const scuntSettingsInfo = [
parameter: 'Max Amount of Points',
key: 'maxAmountPointsPercent',
description:
'The max percentage of points allowed to be given out (enter as decimal value: 1.5 = 150%)',
placeholder: 1.5,
'The max percentage of points allowed to be given out (enter as decimal value: 1.3 = 130%)',
placeholder: 1.3,
},
{
parameter: 'Min Amount of Points',
Expand Down Expand Up @@ -103,7 +103,7 @@ const ScuntGameSettings = () => {
name: 'Skule™ Hunt 2T4 Settings',
amountOfTeams: 10,
amountOfStarterBribePoints: 2500,
maxAmountPointsPercent: 1.5,
maxAmountPointsPercent: 1.3,
minAmountPointsPercent: 0.5,
revealJudgesAndBribes: true,
revealTeams: true,
Expand Down
48 changes: 45 additions & 3 deletions client/src/pages/ScuntJudgeForm/ScuntJudgeForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,19 @@ const ScuntMissionSelection = ({ missions, teams, teamObjs }) => {
}
}, [missionStatus]);

const getMissionSearchName = (searchName) => {
const getMissionSearchName = (searchName, category) => {
if (searchName === '') {
setSearchedMissions([]);
return;
}
const output = [];
for (let mission of missions) {
if (mission?.name?.toLowerCase().includes(searchName.toLowerCase())) {
output.push(mission);
if (currentCategory == 'Select Category') {
output.push(mission);
} else {
if (mission?.category == currentCategory) output.push(mission);
}
}
}
setSearchedMissions(output);
Expand All @@ -435,6 +439,31 @@ const ScuntMissionSelection = ({ missions, teams, teamObjs }) => {
getMissionSearchName('');
};

const missionCategories = [
'Select Category',
'✨ENCHANTED✨',
'B O U N D L E S S',
'But can you do THIS',
'Getting even STEAMier!',
'Getting STEAMy (arts and crafts)',
'Myhal and other nicely designed buildings',
'Ocomm',
'Ok Zoomer',
'Pop CULTured',
'S-K-U-L-E, Engineering U of T!',
'Skuligans at Skule Again??',
'Tales from time immemorial',
'The Classics',
'The Royal Wedding',
'This is some serious gourmet shit!',
'Turrono-wide items',
'Walk walk fashion baby',
'We live in a(n engineering) society',
'Wholesome 100',
];

const [currentCategory, setCurrentCategory] = useState(missionCategories[0]);

return (
<>
<QRScannerDisplay
Expand Down Expand Up @@ -462,6 +491,18 @@ const ScuntMissionSelection = ({ missions, teams, teamObjs }) => {
/>
<h2>Mission Points</h2>
<p className="text-input-title">{'Search for a mission'}</p>

<div style={{ width: '100%' }}>
<Dropdown
initialSelectedIndex={0}
values={missionCategories}
onSelect={(value) => {
setCurrentCategory(value);
}}
isDisabled={false}
/>
</div>

<div className="small-width-input">
<TextInput
clearText={clearText}
Expand All @@ -480,6 +521,7 @@ const ScuntMissionSelection = ({ missions, teams, teamObjs }) => {
}}
/>
</div>

<div className="fill-remaining-width-input">
<TextInput
clearText={clearText}
Expand All @@ -489,7 +531,7 @@ const ScuntMissionSelection = ({ missions, teams, teamObjs }) => {
onChange={(value) => {
if (hasQRScanned === true) setHasQRScanned(false);
setAssignedMission(undefined);
getMissionSearchName(value);
getMissionSearchName(value, currentCategory);
}}
onEnterKey={(value) => {
if (hasQRScanned === true) setHasQRScanned(false);
Expand Down
104 changes: 104 additions & 0 deletions client/src/pages/ScuntJudgeForm/ScuntJudgeForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,110 @@
height: 7px;
border-radius: 15px;
}

.dropdown-container {
width: fit-content;
padding-left: 5px;
padding-top: 8px;
}

.dropdown-header {
padding-left: 5px;
margin-top: 25px;
color: var(--black);
}
.dropdown-header-disabled {
opacity: 0.4;
}

.dropdown-selected {
cursor: pointer;
border-radius: 6px;
border: 2px solid var(--purple-shades-muted);
display: flex;
flex-direction: row;
justify-content: space-between;
position: relative;
align-items: center;
background-color: var(--dropdown-selected-bg);
.dropdown-image {
user-select: none;
height: 100%;
width: 16px;
margin-right: 10px;
margin-top: -3px;
transition: transform 300ms ease-in-out;
transform: rotate(0) translateY(2.5px);
&.open {
transform: rotate(180deg) translateY(2.5px);
}
}
transition: background-color 200ms;
&:hover {
background-color: var(--dropdown-hover);
}
color: var(--black);
&:focus {
outline: none;
background-color: var(--textinput-bg);
box-shadow: 0px 0px 15px -3px var(--textinput-shadow-focus);
transition: background-color 500ms, box-shadow 500ms;
}
}

.dropdown-selected-disabled {
@extend .dropdown-selected;
border: 2px solid var(--disabled);
background-color: var(--disabled-bg);
color: var(--gray);
opacity: 0.4;
cursor: not-allowed;
}

.dropdown-selected-label {
margin: 0.5em 1.3em 0.5em 1em;
@include devices(tablet) {
margin: 0.5em 1em 0.5em 1em;
}
}

.dropdown-list-container {
color: var(--black);
border: 2px solid var(--dropdown-list-border);
border-radius: 6px;
margin-top: 0.2em;
position: absolute;
z-index: 9;
background-color: var(--dropdown-list-bg);
opacity: 0;
transform: translateY(-30px);
transition: opacity 300ms, transform 300ms;
pointer-events: none;
}

.dropdown-list-container-open {
opacity: 1;
transform: translateY(0px);
transition: opacity 300ms, transform 300ms;
pointer-events: all;
}

.dropdown-item {
padding: 0.5em 1em 0.5em 1em;
cursor: pointer;
transition: background-color 300ms ease-in-out;

&:hover,
&:focus {
outline: none;
background-color: var(--dropdown-hover);
}

@include devices(tablet) {
padding: 0.5em 0.5em 0.5em 0.5em;
}
}

.horizontal-slider .slider-thumb {
width: 40px;
height: 40px;
Expand Down
1 change: 1 addition & 0 deletions client/src/pages/ScuntJudges/ScuntJudges.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const ScuntJudgesShow = ({ judges }) => {
{/* <Header text={'Judges'} underlineDesktop={'265px'} underlineMobile={'180px'}>
<ScuntLinks />
</Header> */}
<h2 className="legend-text"> Judges ✏️ , TechTeam 🖥️ , Co-Chairs 🧭 </h2>
<div className="scunt-judges-container">
{judges.map((judge) => {
const [clickProfile, setClickProfile] = useState(false);
Expand Down
14 changes: 13 additions & 1 deletion client/src/pages/ScuntJudges/ScuntJudges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

.scunt-judges-container {
display: grid;
//width: 90vw;
grid-template-columns: repeat(auto-fit, 450px);
align-items: center;
justify-items: center;
Expand All @@ -16,3 +15,16 @@
margin-top: 5px;
font-size: 17px;
}

.scunt-judges-profile {
width: 100%;
height: 100%;
object-fit: cover; /* Ensures the image covers the container while maintaining aspect ratio */
object-position: center; /* Center the image within the container */
}

.legend-text {
color: white;
text-align: center;
margin: 0 auto; /* Center the text horizontally */
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const ScuntCreateMissions = () => {
category: '',
points: '',
isHidden: false,
isJudgingStation: false,
};

const { setSnackbar } = useContext(SnackbarContext); // use Snackbar to send messages --> successfull hidden/deleted, etc.
Expand Down
26 changes: 4 additions & 22 deletions client/src/util/scunt-constants.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export const rules = {
'<strong>***The item must be on the list.***</strong>',
'Read the room. Don’t perform an item that makes anyone in the general public uncomfortable.',
'<strong>***The item must be on the list.***</strong>',
'Media consent must be acquired from strangers prior to all videos/photos which involve them. Additionally, do NOT share media involving strangers on social media unless they have explicitly consented to such.',
'Alright fine, if you clear it with a particular judge beforehand, you may perform something not on the list to THAT JUDGE IN PARTICULAR for bonus points. But again ONLY if you clear it beforehand, otherwise <b>***The item must be on the list.***</b>',
'Media consent must be acquired from strangers prior to all videos/photos which involve them. Additionally, do NOT share media involving strangers on social media unless they have explicitly consented to such. Do not heckle or harass anybody - ask for their consent for the item beforehand, and ask for their consent when filming as well. Be very mindful very demure, do not do anything that would make anyone uncomfortable.',
'Alright fine, if you clear it with a particular judge beforehand, you may perform something not on the list to THAT JUDGE IN PARTICULAR as “Bring a Reward In Beneficial to Expert” for bonus points. But again ONLY if you clear it beforehand, otherwise <b>***The item must be on the list.***</b>',
],
},
{
Expand All @@ -85,13 +85,9 @@ export const rules = {
title: 'Bribery',
items: [
'The Judges are unwavering in their tremendously unbiased and fair judging practices. That being said, you might want to check out the Judges page on the website… It is permissible to “Bring a Reward In Beneficial to Expert” for bonus points. <b>No liquid assets or anything else of substantial value</b> should be among your “Rewards”.',
'All bonus points must follow the same principles as used when pranking. They are as follows:<ol><li>Successful school rivalries, competitions, and pranks are built upon mutual respect for people, property and possessions.</li><li>A notable prank/kidnapping/mascot theft/etc. is one that leaves the affected group thinking "Damn, those crafty bastards!"</li></ol>',
'All bonus points must follow the same principles as used when pranking. They are as follows:<ol><li>Successful school rivalries, competitions, and pranks are built upon mutual respect for people, property and possessions.</li><li>A notable prank/mascot theft/etc. is one that leaves the affected group thinking "Damn, those crafty bastards!"</li></ol>',
],
},
{
title: 'COVID-19 Protocols',
sub: 'All participants are required to follow any COVID-19 Safety Protocols as outlined by the University of Toronto. Regular hand sanitizing and mask-wearing is encouraged, especially in crowded areas. ',
},
{
title: 'The Royal Wedding',
sub: 'The Royal Wedding is the wedding to bring Godiva’s Crown and Mr. Blue & Gold together eternally. The list items for the Royal Wedding will only be accepted by the bride and groom, as well as the SubComm Chairs. The wedding items and submissions for these items will be opened starting at 9:00 PM ish. Each group that wants to claim an item must bring the participating F!rosh and the item to the bride and groom, or SubComm chairs. The wedding will take place at 10:00 PM. Only the F!rosh approved beforehand may participate in the wedding. Any F!rosh that interferes during the wedding will be removed from the scene.',
Expand All @@ -100,20 +96,6 @@ export const rules = {
title: 'Winning',
sub: 'The group that accumulates the most points, in the absence of any obvious cheating and/or other misconduct, by the end of the night shall be declared the winners.',
},
{
title: 'Kidnapping',
sub: 'Any kidnapping requested by judges that occurs during the Skule™ Hunt must follow this code:',
items: [
'In accordance with the second guiding principle the kidnapping should be well planned. Knowing in advance how the kidnapee will respond, or pre-staging the kidnapping is essential for avoiding conflict.',
'Any use of force must desist if the kidnapee is unwilling to participate.',
'Kidnapees should be fed adequate, if not excessive, amounts of food and beverages.',
'Conditions for release should be feasible and reasonable. It should also be possible to meet these conditions within a time period of 24 hours.',
'Emergency release should be given in the case of impeding midterms, exams or other similar situations.',
'In the case where the guidelines of the “Code” have been respected, both schools should do their best to keep the ensuing discussion/debate between the student societies. If the “Code” was disregarded, however, the victim school has every right to alert the faculty, campus authorities or city police.',
'Kidnapped individuals can be ransomed to the judges for points over Discord. The amount of points is non-negotiable.',
'Each kidnapping may only be completed once during the event, unless the kidnapee consents otherwise. So if they tell you that they have already been kidnapped, leave them alone.',
],
},
{
title: 'Skule™ Hunt Chairs',
sub: 'Oh Hey, that’s us!',
Expand All @@ -123,7 +105,7 @@ export const rules = {
'The Chairs have the reserved right to deduct up to infinity points from any team found to be in violation of Section 12 rules (Kidnapping) as laid out above or for breaking the law. This is only an option for situations that can be resolved to the satisfaction of all parties.',
'The Chairs have the reserved right to disqualify teams or individuals that are found to be in irreparable breach of these rules. Furthermore, it is the Chairs’ responsibilities to bar judges that have proven to be in breach of their expected conduct.',
'We may decide to have certain “requests” throughout the evening. Do keep in mind that we can give out as many points as we please while the judges have only so many… ',
'Our names are Tyler and William. You can probably find out more about us if you try.',
'Our names are Emaan and Melanie. You can probably find out more about us if you try.',
],
},
{
Expand Down
Loading

0 comments on commit 2dd7c05

Please sign in to comment.