Skip to content

Commit

Permalink
Merge branch 'retreat-accessibility' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurikam2003 committed Jul 30, 2024
2 parents 7adb5e5 + 01fb818 commit 6da2035
Show file tree
Hide file tree
Showing 47 changed files with 1,899 additions and 162 deletions.
Binary file added client/src/assets/misc/backarrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions client/src/assets/misc/left-arrow-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
983 changes: 983 additions & 0 deletions client/src/assets/scuntlogo/scunt_color_2t4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const DashboardDropdown = ({ open, setOpen, items, title, icon }) => {
<div className={'dashboard-dropdown-links'} key={title} ref={refContainer}>
<div className={'dashboard-dropdown-title'} onClick={() => setOpen(!open)}>
<img src={icon} className={'dashboard-dropdown-icon'} />
<h3 className={'dashboard-dropdown-text'}>{title}</h3>
<h3 className={'dashboard-dropdown-text'}>{title.toUpperCase()}</h3>
<div className={`dashboard-dropdown-image${open ? ' open' : ''}`}>
{darkMode ? (
<img alt={'arrow'} src={ArrowDarkMode} className="dashboard-dropdown-arrow" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const FAQAskQuestion = () => {
pageState !== 'form' ? 'faq-page-disappear' : 'faq-page-appear'
}`}
>
<h1 className={'faq-ask-question-title'}>Ask a Question</h1>
<h1 className={'faq-ask-question-title'}>ASK A QUESTION</h1>
<p className="faq-ask-question-paragraph">We will get back to you in an email soon!</p>
<form>
<label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const ProfilePageLeaderPermissionDashboardLinks = () => {
const dropdowns = [
{
label: 'data',
title: 'DATA',
title: 'Data',
state: openDataDropdown,
setState: setOpenDataDropdown,
icon: DataDashboardIcon,
Expand All @@ -46,7 +46,7 @@ export const ProfilePageLeaderPermissionDashboardLinks = () => {
},
{
label: 'outreach',
title: 'OUTREACH',
title: 'Outreach',
state: openOutreachDropdown,
setState: setOpenOutreachDropdown,
icon: OutreachDashboardIcon,
Expand Down Expand Up @@ -81,7 +81,7 @@ export const ProfilePageLeaderPermissionDashboardLinks = () => {
{
label: 'Skule™ Hunt Judge Panel',
anyRegisterScope: false,
link: '/scunt-judge-form',
link: '/skule-hunt-judge-form',
authScopes: [
'scunt:exec allow leaderboard',
'scunt:exec allow missions page',
Expand All @@ -98,7 +98,7 @@ export const ProfilePageLeaderPermissionDashboardLinks = () => {
{
label: 'Skule™ Hunt Mission Panel',
anyRegisterScope: false,
link: '/scunt-missions-dashboard',
link: '/skule-hunt-missions-dashboard',
authScopes: [
'scunt:exec show missions',
'scunt:exec hide missions',
Expand All @@ -109,13 +109,13 @@ export const ProfilePageLeaderPermissionDashboardLinks = () => {
{
label: 'Skule™ Hunt Point Transactions',
anyRegisterScope: false,
link: '/scunt-transactions',
link: '/skule-hunt-transactions',
authScopes: ['scunt:exec view transactions'],
},
{
label: 'Skule™ Hunt Settings',
anyRegisterScope: false,
link: '/scunt-game-controls',
link: '/skule-hunt-game-controls',
authScopes: ['scunt:exec game controls'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const ProfilePageQRScanner = ({ scopes }) => {

return (
<div className="profile-page-qr-code-scanner profile-page-side-section">
<h2 className="profile-page-manual-entry-header">{`Scanning for ${scannerType}`}</h2>
<h2 className="profile-page-manual-entry-header">{`SCANNING FOR ${scannerType.toUpperCase()}`}</h2>
<QRScannerDisplay
setScannedData={(userID) => {
if (userID) {
Expand Down Expand Up @@ -174,7 +174,7 @@ export const ProfilePageQRScanner = ({ scopes }) => {

{/* Manual Search */}

<h2 className="profile-page-manual-entry-header">Manual Entry</h2>
<h2 className="profile-page-manual-entry-header">MANUAL ENTRY</h2>
<div style={{ padding: '0px 10px', width: '100%' }}>
<TextInput
placeholder={'Search by Email, Name, or UtorID'}
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/text/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Header = ({ text, children, underlineDesktop, underlineMobile }) => {
<>
<div className="header-page-container">
<div className="header-page-subcontainer">
<h2 className="header-page-title">{text}</h2>
<h2 className="header-page-title">{text.toUpperCase()}</h2>
<div
className="header-page-title-underline display-only-desktop"
style={{ width: underlineDesktop }}
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/About/ExecProfile/ExecProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const ScuntJudgeDescription = ({ name, bribes, description }) => {
style={{ textAlign: 'center' }}
>
<div className="exec-profile-title-cont" style={{ marginBottom: '10px' }}>
<h3 className="exec-profile-name">{name}</h3>
<h3 className="exec-profile-name">{name.toUpperCase()}</h3>
</div>

{description !== undefined ? (
Expand Down
1 change: 1 addition & 0 deletions client/src/pages/FAQLeaders/FAQLeaders.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
}

.faq-leaders-questions-titles {
font-family: 'Proxima Nova', sans-serif;
font-size: 23px;
margin-bottom: 10px;
color: var(--text-dark-use);
Expand Down
107 changes: 76 additions & 31 deletions client/src/pages/FroshRetreat/FroshRetreat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@ export const FroshRetreat = () => {
const { setSnackbar } = useContext(SnackbarContext);
const navigate = useNavigate();
const isRegistered = useSelector(registeredSelector);
const { user } = useSelector(userSelector);
const accountObj = {
firstName: user.firstName || '',
lastName: user.lastName || '',
preferredName: user.preferredName || '',
phoneNumber: user.phoneNumber || '',
phoneNumberCountryCode: user.phoneNumberCountryCode || '',
emergencyContactName: user.emergencyContactName || '',
emergencyContactRelationship: user.emergencyContactRelationship || '',
emergencyContactCountryCode: user.emergencyContactCountryCode || '',
emergencyContactNumber: user.emergencyContactNumber || '',
email: user.email || '',
allergies: user.allergies || [],
allergiesOther: user.allergiesOther || '',
medicalInfo: user.medicalInfo || '',
specficMedicalInfo: user.specficMedicalInfo || '',
medication: user.medication || '',
};

const remainingTicketsSetter = async () => {
setRemainingTickets(await getRemainingTickets(setSnackbar));
Expand All @@ -28,11 +46,11 @@ export const FroshRetreat = () => {
remainingTicketsSetter();
}, []);

useEffect(() => {
if (!isRegistered) {
navigate('/profile');
}
}, [isRegistered]);
// useEffect(() => {
// if (!isRegistered) {
// navigate('/profile');
// }
// }, [isRegistered]);

return (
<div className="frosh-retreat-page">
Expand All @@ -43,8 +61,7 @@ export const FroshRetreat = () => {
ESCAPE THE CITY TO THE LOVELY HART HOUSE FARMS FOR A WEEKEND OF WHOLESOME CAMP VIBES!
</h3>
<p style={{ color: 'var(--white)' }}>
The retreat is taking place on August 31st and September 1st, 2024 at Hart House
Farm.
The retreat is taking place on August 31st and September 1st, 2024 at Hart House Farm.
</p>
<p style={{ color: 'var(--white)' }}>
Due to limited spaces, we are selling a limited number of tickets so purchase yours
Expand Down Expand Up @@ -187,6 +204,7 @@ const RetreatRegistration = () => {
const [viewedWaiver, setViewedWaiver] = useState(false);
const [waiverValue, setWaiverValue] = useState();
const [buttonClicked, setButtonClicked] = useState(false);
const isRegistered = useSelector(registeredSelector);

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

Expand All @@ -195,6 +213,9 @@ const RetreatRegistration = () => {
const { axios } = useAxios();
const isRetreat = user?.isRetreat === true;

const [file, setFile] = useState(null);
const [isUploaded, setIsUploaded] = useState(false);

const [outOfTickets, setOutOfTickets] = useState(false);

const outOfTicketsSetter = async () => {
Expand All @@ -205,12 +226,39 @@ const RetreatRegistration = () => {
outOfTicketsSetter();
}, []);

const handleFileChange = (event) => {
setFile(event.target.files[0]);
};

const handleUpload = async () => {
if (!file) {
setSnackbar('Please select a PDF file to upload.');
return;
}
const formData = new FormData();
formData.append('waiver', file);
formData.append('username', user.firstName);

try {
const response = await axios.post('/frosh/upload-waiver', formData, {
headers: { 'content-type': 'multipart/form-data' },
});
setSnackbar('File uploaded successfully!');
setIsUploaded(true);
} catch (error) {
console.error('File upload failed:', error);
setSnackbar('File upload failed. Please try again.');
setIsUploaded(false);
}
};

return (
<div style={{ margin: '0 20px' }}>
<p style={{ textAlign: 'center' }}>
In order to register, the following information will be collected from your account. Please
ensure this information is accurate and up to date. If any information needs to be modified,
please edit your information <Link to={'/profile-edit'}>here</Link>.
please edit your information{' '}
<Link to={isRegistered ? '/profile-edit' : '/profile-edit-unregistered'}>here</Link>.
</p>
<div className="retreat-registration-form">
<div className="display-field">
Expand Down Expand Up @@ -267,37 +315,34 @@ const RetreatRegistration = () => {
}}
style={{ marginBottom: '25px' }}
/>
<h3>I HAVE READ AND AGREE TO THE FROSH RETREAT WAIVER.</h3>
<h4>
<i>
By pressing &apos;Yes&apos; you/a guardian if you are under 18 have digitally signed
the waiver.
</i>
</h4>
<div style={{ height: '10px' }} />
{viewedWaiver ? (
<RadioButtons
initialSelectedIndex={1}
values={['Yes', 'No']}
onSelected={(value) => {
setWaiverValue(value);
if (value === 'Yes') setSnackbar('Thanks for reading the waiver!');
}}
/>
) : (
<></>
)}
<div className="display-field">
<h3>UPLOAD SIGNED WAIVER:</h3>
<p>Only PDF files are accepted</p>
{viewedWaiver ? (
<>
<input type="file" accept=".pdf" onChange={handleFileChange} />
<Button
label="Upload PDF"
isSecondary
onClick={handleUpload}
style={{ marginTop: '10px' }}
/>
</>
) : (
<p>Please view the waiver before uploading the signed copy.</p>
)}
</div>
</div>
{isRetreat ? (
<h2>You have already payed for Frosh Retreat!</h2>
<h2>You have already paid for Frosh Retreat!</h2>
) : outOfTickets ? (
<h2>Sorry there are no more tickets available!</h2>
) : viewedWaiver ? (
<Button
label={'Continue to Payment'}
isDisabled={waiverValue !== 'Yes' || buttonClicked}
isDisabled={!isUploaded || buttonClicked}
onClick={() => {
if (waiverValue === 'Yes') {
if (isUploaded) {
setButtonClicked(true);
axios
.post('/payment/frosh-retreat-payment')
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/PagePaymentSuccess/PagePaymentSuccess.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const PagePaymentSuccess = ({ title, message }) => {
<>
<div className="navbar-space-top"></div>
<div className="payment-success-page">
<h1>{title}</h1>
<h1>{title.toUpperCase()}</h1>
<p>Payment Successful!</p>
<h3>{message}</h3>
<h3 className='proxima-nova-text'>{message}</h3>
<div>
<Link to={'/profile'} className="no-link-style">
<Button label="Profile" />
Expand Down
8 changes: 8 additions & 0 deletions client/src/pages/PagePaymentSuccess/PagePaymentSuccess.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@import '../../scssStyles/mixins';

@font-face {
font-family: 'Proxima Nova';
src: url('../../../../client/assets/fonts/proximanova_regular.ttf') format('opentype');
}

.payment-success-page {
color: var(--text-dynamic);
text-align: center;
Expand All @@ -19,6 +24,9 @@
font-size: 22px;
margin-bottom: 20px;
}
h3 .proxima-nova-text{
font-family: 'Proxima Nova', sans-serif;
}
@for $i from 1 to 4 {
:nth-child(#{$i}) {
transform: translateY(100px) scale(0.8);
Expand Down
15 changes: 11 additions & 4 deletions client/src/pages/Profile/PageProfileFrosh.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ const ProfilePageFroshScuntMessage = () => {
}

return (
<Link to="/scunt">
<Link to="/skule-hunt">
<div className="frosh-instagram-container">
<img src={ScuntIcon} alt="Scunt" 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 All @@ -193,6 +193,9 @@ const ProfilePageFroshHeader = ({ editButton }) => {
const lastDigitF = gradYear.toString().slice(-1);
let froshYear = `${firstDigitF}T${lastDigitF}`;

console.log('ProfilePageFroshHeader user:', user);
console.log('ProfilePageFroshHeader isRegistered:', isRegistered);

return (
<>
<div className="profile-page-header">
Expand Down Expand Up @@ -224,10 +227,14 @@ const ProfilePageFroshHeader = ({ editButton }) => {
<p>Class of</p>
<h2>{froshYear}</h2>
</div>
{editButton !== false && isRegistered ? (
<Link to={'/profile-edit'} className={'profile-edit-icon-link no-link-style'}>
{editButton !== false ? (
// {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}
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions client/src/pages/Profile/PageProfileLeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ export const ProfilePageLeaderScuntMessage = () => {
const { darkMode, setDarkModeStatus } = useContext(DarkModeContext);

return (
<Link to="/scunt">
<Link to="/skule-hunt">
<div className="frosh-instagram-container">
<img src={ScuntIcon} alt="Scunt" style={{ filter: darkMode ? 'invert(1)' : 'unset' }} />
<div>
<h2>SKULE™ HUNT!</h2>
<p>Find more information about The Hunt by clicking here!</p>
<p>Find more information about the Hunt by clicking here!</p>
</div>
</div>
</Link>
Expand Down Expand Up @@ -155,8 +155,8 @@ const ProfilePageLeaderHeader = () => {
/>
{leaderApproved === false ? (
<div className={'profile-not-registered'}>
<h1>Your Leedur Account is not Approved!</h1>
<h2>Please contact a VC to get your account approved.</h2>
<h1>YOUR LEEDUR ACCOUNT IS NOT APPROVED!</h1>
<h2>Please contact VCM or Webmasters to get your account approved.</h2>
</div>
) : null}
</>
Expand Down
Loading

0 comments on commit 6da2035

Please sign in to comment.