Skip to content

Commit

Permalink
Merge pull request #831 from UofT-Frosh-Orientation/dev
Browse files Browse the repository at this point in the history
Beta Retreat Testing
  • Loading branch information
ashleyleal authored Jul 31, 2024
2 parents d913487 + cc2571d commit f569678
Show file tree
Hide file tree
Showing 17 changed files with 363 additions and 110 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/src/assets/login/background-colour.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
185 changes: 185 additions & 0 deletions client/src/assets/mascots/dragon-retreat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
62 changes: 31 additions & 31 deletions client/src/components/MakeReceipt/MakeReceipt.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@ const MakeReceipt = (froshObject) => {
throw new Error('No ID provided to MakeReceipt.jsx');
}

const qr = (
<QRNormal
value={froshObject.id}
type="round"
opacity={100}
posType="round"
otherColor="#320846"
posColor="#28093A"
backgroundColor="white"
/>
);
// const qr = (
// <QRNormal
// value={froshObject.id}
// type="round"
// opacity={100}
// posType="round"
// otherColor="#320846"
// posColor="#28093A"
// backgroundColor="white"
// />
// );

const qr64 = ReactDOMServer.renderToString(qr);
// const qr64 = ReactDOMServer.renderToString(qr);
// create dummy element to hold the children
const svgg = document.createElement('div');
svgg.innerHTML = qr64;
// svgg.innerHTML = qr64;
const svg = svgg.childNodes[0];

let currKey = 1,
t1 = [],
// t1 = [],
t2 = [];

svg.childNodes.forEach((node, key, parent) => {
t1.push(
<Circle
key={currKey}
cx={Number.parseFloat(node.getAttribute('cx')) * 10}
cy={Number.parseFloat(node.getAttribute('cy')) * 10}
r={Number.parseFloat(node.getAttribute('r')) * 10}
fill={node.getAttribute('fill')}
stroke={node.getAttribute('stroke')}
strokeWidth={Number.parseFloat(node.getAttribute('stroke-width')) * 10}
/>,
);
currKey++;
});
// svg.childNodes.forEach((node, key, parent) => {
// t1.push(
// <Circle
// key={currKey}
// cx={Number.parseFloat(node.getAttribute('cx')) * 10}
// cy={Number.parseFloat(node.getAttribute('cy')) * 10}
// r={Number.parseFloat(node.getAttribute('r')) * 10}
// fill={node.getAttribute('fill')}
// stroke={node.getAttribute('stroke')}
// strokeWidth={Number.parseFloat(node.getAttribute('stroke-width')) * 10}
// />,
// );
// currKey++;
// });

// All nonintrusive displayable form information
const irrelevantFields = [
Expand Down Expand Up @@ -84,7 +84,7 @@ const MakeReceipt = (froshObject) => {
backgroundColor: '#E4E4E4',
}}
>
<View
{/* <View
style={{
display: 'flex',
alignItems: 'center',
Expand All @@ -93,11 +93,11 @@ const MakeReceipt = (froshObject) => {
>
<Svg fill="white" style={{ width: '250px', padding: '10px 0 0 0' }}>
{t1}
</Svg>
</Svg>
<Text style={{ fontSize: 16, padding: '10px 0 0 0' }} key={currKey++}>
Your Unique QRCode
</Text>
</View>
</View> */}
<View style={{ padding: '0 10px' }}>
<Text style={{ fontSize: 16, padding: '20px 0' }} key={currKey++}>
Please check all of your information to ensure it is correct. If you need to make any
Expand Down
7 changes: 7 additions & 0 deletions client/src/pages/FAQ/functions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ export async function getQuestions(setSnackbar) {
lastUpdated: '12:30pm, Jun 22, 2024',
category: 'Registration',
},
{
question: 'When is the deadline to register for F!rosh week?',
answer:
'No official deadline, but you should sign up before August 26th if you want to participate in all of the activities!',
lastUpdated: '13:30pm, Jun 30, 2024',
category: 'Registration',
},
/*{
question: 'What are in the F!rosh Kits?',
answer:
Expand Down
28 changes: 21 additions & 7 deletions client/src/pages/FroshRetreat/FroshRetreat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { useSelector } from 'react-redux';
import { RadioButtons } from '../../components/form/RadioButtons/RadioButtons';
import { ErrorSuccessBox } from '../../components/containers/ErrorSuccessBox/ErrorSuccessBox';
import { SnackbarContext } from '../../util/SnackbarProvider';
import waiverPDF from '../../assets/retreatWaiver/frosh-retreat-2T3-waiver.pdf';
import waiverPDF from '../../assets/retreatWaiver/frosh-retreat-2T4-waiver.pdf';
import useAxios from '../../hooks/useAxios';
import { SingleAccordion } from '../../components/text/Accordion/SingleAccordion/SingleAccordion';
import egglinton from '../../assets/mascots/Egglinton-1.png';
import dragon from '../../assets/mascots/dragon-retreat.svg';

export const FroshRetreat = () => {
const [remainingTickets, setRemainingTickets] = useState();
Expand Down Expand Up @@ -68,7 +68,7 @@ export const FroshRetreat = () => {
before they sell out!{' '}
</p>
<p style={{ color: 'var(--white)' }}>
Tickets to Retreat are $95.00 &#40;they include bus transportation; no tickets without
Tickets to Retreat are $103.00 &#40;they include bus transportation; no tickets without
bus transportation&#41;
</p>
</div>
Expand Down Expand Up @@ -130,6 +130,13 @@ const retreatFAQs = [
'• Anything appropriate for a 36-hour camping trip on a farm!',
],
},
{
title:
'What time does the bus leave?',
description: [
'The bus leaves from campus at 11:00am on August 31st and returns to campus at 1:00pm on September 1st.',
],
}
];

const FroshRetreatFAQ = () => {
Expand All @@ -147,9 +154,9 @@ const FroshRetreatFAQ = () => {
alignSelf: 'center',
}}
>
<img src={egglinton} style={{ width: '200px', margin: '20px' }}></img>
<img src={dragon} style={{ width: '350px', margin: '20px' }}></img>
<h2 style={{ marginBottom: '20px' }}>
GET MOO-VING WITH OUR FAQS: PREPARE FOR A GOOD TIME DOWN ON THE FARM!
FAQS: PREPARE FOR A GOOD TIME DOWN ON THE FARM!
</h2>
{retreatFAQs.map((item, index) => {
const [isOpen, setIsOpen] = useState(false);
Expand Down Expand Up @@ -206,7 +213,7 @@ const RetreatRegistration = () => {
const [buttonClicked, setButtonClicked] = useState(false);
const isRegistered = useSelector(registeredSelector);

const waiverLink = '../../assests/retreatWaiver/frosh-retreat-2T3-waiver.pdf';
const waiverLink = '../../assests/retreatWaiver/frosh-retreat-2T4-waiver.pdf';

const { user } = useSelector(userSelector);
const { setSnackbar } = useContext(SnackbarContext);
Expand All @@ -227,6 +234,13 @@ const RetreatRegistration = () => {
outOfTicketsSetter();
}, []);

useEffect(() => {
if (isWaiverUploaded) {
setViewedWaiver(true);
setIsUploaded(true);
}
}, [isWaiverUploaded]);

const handleFileChange = (event) => {
setFile(event.target.files[0]);
};
Expand Down Expand Up @@ -334,7 +348,7 @@ const RetreatRegistration = () => {

<div className="display-field">
<h3>UPLOAD SIGNED WAIVER:</h3>
<p>Only PDF files are accepted</p>
<p>Only PDF files under 1 MB are accepted</p>
{viewedWaiver ? (
<>
<input type="file" accept=".pdf" onChange={handleFileChange} />
Expand Down
25 changes: 16 additions & 9 deletions client/src/pages/Profile/PageProfileFrosh.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const PageProfileFrosh = () => {
<div className="profile-info-row">
<div className="profile-info-row-right">
{user?.attendingScunt === true ? <ProfilePageFroshScuntMessage /> : null}
{/* {isRegistered ? <ProfilePageRetreat /> : null} */}
<ProfilePageRetreat />
{/* <ProfilePageNitelife /> */}
<ProfilePageInstagrams />
<ProfilePageAnnouncements />
Expand Down Expand Up @@ -88,7 +88,7 @@ const ProfilePageRetreat = () => {
remainingTicketsSetter();
}, []);

if (!isRegistered || (remainingTickets <= 0 && !isRetreat)) {
if (remainingTickets <= 0 && !isRetreat) {
return null;
}
return (
Expand Down Expand Up @@ -173,7 +173,11 @@ const ProfilePageFroshScuntMessage = () => {
return (
<Link to="/skule-hunt">
<div className="frosh-instagram-container">
<img src={ScuntIcon} alt="Skule™ Hunt" style={{ filter: darkMode ? 'invert(1)' : 'unset' }} />
<img
src={ScuntIcon}
alt="Skule™ Hunt"
style={{ filter: darkMode ? 'invert(1)' : 'unset' }}
/>
<div>
<h2>SKULE™ HUNT</h2>
<p>Find more information about The Hunt by clicking here!</p>
Expand Down Expand Up @@ -228,14 +232,17 @@ const ProfilePageFroshHeader = ({ editButton }) => {
<h2>{froshYear}</h2>
</div>
{editButton !== false ? (
// {editButton !== false && isRegistered ? (
<Link to={isRegistered ? '/profile-edit' : '/profile-edit-unregistered'} className={'profile-edit-icon-link no-link-style'}>
// {editButton !== false && isRegistered ? (
<Link
to={isRegistered ? '/profile-edit' : '/profile-edit-unregistered'}
className={'profile-edit-icon-link no-link-style'}
>
<img src={EditIcon} alt={'edit'} className={'profile-edit-icon'} />
</Link>
// <Link to={'/profile-edit'} className={'profile-edit-icon-link no-link-style'}>
// <img src={EditIcon} alt={'edit'} className={'profile-edit-icon'} />
// </Link>
) : null}
) : // <Link to={'/profile-edit'} className={'profile-edit-icon-link no-link-style'}>
// <img src={EditIcon} alt={'edit'} className={'profile-edit-icon'} />
// </Link>
null}
</div>
</div>

Expand Down
12 changes: 6 additions & 6 deletions client/src/pages/ScuntGameSettings/ScuntGameSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ const scuntSettingsInfo = [
parameter: 'Max Amount of Points',
key: 'maxAmountPointsPercent',
description:
'The max amount of points allowed to be given out over the recommended amount for missions',
placeholder: 0.3,
'The max percentage of points allowed to be given out (enter as decimal value: 1.5 = 150%)',
placeholder: 1.5,
},
{
parameter: 'Min Amount of Points',
key: 'minAmountPointsPercent',
description:
'The min amount of points allowed to be given out over the recommended amount for missions',
placeholder: 0.3,
'The min percentage of points allowed to be given out (enter as decimal value: 0.5 = 50%)',
placeholder: 0.5,
},
];

Expand Down Expand Up @@ -103,8 +103,8 @@ const ScuntGameSettings = () => {
name: 'Scunt 2T3 Settings',
amountOfTeams: 10,
amountOfStarterBribePoints: 2500,
maxAmountPointsPercent: 0.3,
minAmountPointsPercent: 0.3,
maxAmountPointsPercent: 1.5,
minAmountPointsPercent: 0.5,
revealJudgesAndBribes: true,
revealTeams: true,
showDiscordLink: true,
Expand Down
31 changes: 13 additions & 18 deletions client/src/pages/ScuntHome/ScuntHome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { getScuntTeams } from '../../state/scuntTeams/saga';
// import { ProfilePageScuntTeam } from '../Profile/PageProfileFrosh';
const { axios } = useAxios();
import scuntLogo from '../../assets/scuntlogo/scunt_color_2t4.svg';
import arrowLogo from '../../assets/misc/left-arrow-svgrepo-com.svg'
import arrowLogo from '../../assets/misc/left-arrow-svgrepo-com.svg';
import { SingleAccordion } from '../../components/text/Accordion/SingleAccordion/SingleAccordion';

export const PageScuntHome = () => {
Expand All @@ -43,9 +43,9 @@ export const PageScuntHome = () => {
};

const BackToProfileButton = () => {

return (
<Link to="/profile" className="back-button">
<div className="circle"></div>
<img src={arrowLogo} alt="Back" className="back-icon" />
</Link>
);
Expand All @@ -65,22 +65,17 @@ const AboutScunt = () => {
{/* <div className="about-scunt-token">
<ProfilePageScuntTeam />
</div> */}
<div style={{ display: 'flex', alignItems: 'center' }}>
<img src={scuntLogo} style={{ width: '300px', margin: '20px' }} />
<div style={{ display: 'block' }}>
<h2 style={{ display: 'block' }}>THE HUNT</h2>
Come participate in the most iconic event that is part of Frosh Week: Skule™ Hunt!
<br />
<br />
Skule™ Hunt takes place the night of <b>Wednesday August 28th from 6PM to 11PM</b>. It
is completely free, so hurry and sign up by clicking YES on your registration!
<br />
<br />
{/* <div dangerouslySetInnerHTML={{ __html: aboutScunt }} /> */}
{/* <h4>
CHECK THE <Link to={'/skule-hunt-rules'}>RULES</Link> FOR MORE INFORMATION
</h4> */}
</div>

<img src={scuntLogo} style={{ width: '300px', margin: '20px' }} />
<div className="text-content">
<h2>THE HUNT</h2>
Come participate in the most iconic event that is part of Frosh Week: Skule™ Hunt!
<br />
<br />
Skule™ Hunt takes place the night of <b>Wednesday August 28th from 6PM to 11PM</b>. It
is completely free, so hurry and sign up by clicking YES on your registration!
<br />
<br />
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit f569678

Please sign in to comment.