Skip to content

Commit

Permalink
Merge pull request #729 from UofT-Frosh-Orientation/dev
Browse files Browse the repository at this point in the history
Dev to Beta
  • Loading branch information
Freeassassin authored Aug 18, 2023
2 parents 3f9f4e5 + 3da97ec commit 59d99d0
Show file tree
Hide file tree
Showing 132 changed files with 3,679 additions and 3,567 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/backend-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Backend Issue
about: Submit an issue regarding the server and API
title: ''
labels: backend
labels: back-end

---

Expand Down Expand Up @@ -38,4 +38,4 @@ Link any resources or people that might be helpful in the accomplishment of the

- [Link 1]()
- [Link 2]()
- [Link 3]()
- [Link 3]()
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/frontend-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Frontend Issue
about: Submit an issue regarding the appearance and visuals
title: ''
labels: frontend
labels: front-end
assignees:

---
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/automated_tests.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/backend_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Backend Tests

on:
push:
paths:
- server/**
pull_request:
paths:
- server/**

jobs:
test_backend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3

- name: Start Docker
run: docker-compose -f docker-compose.test.yml up --build -d

- name: Run Tests
run: cd server && yarn install && yarn test:actions
19 changes: 19 additions & 0 deletions .github/workflows/frontend_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Frontend Tests

on:
push:
paths:
- client/**
pull_request:
paths:
- client/**

jobs:
build_frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3

- name: Build client
run: cd client && yarn install && yarn build
2 changes: 2 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "vite build",
"build:beta": "VITE_API_BASE_URL=https://api.beta.orientation.skule.ca vite build",
"preview": "vite preview",
"preview:build": "vite build && vite preview",
"lint": "eslint src",
"format": "prettier --write \"**/*.+(js|jsx|css|scss|json)\"",
"storybook": "start-storybook -p 6006",
Expand All @@ -19,6 +20,7 @@
"dependencies": {
"@react-pdf/renderer": "^3.1.12",
"@reduxjs/toolkit": "^1.9.5",
"@tanstack/react-table": "^8.9.3",
"axios": "^1.4.0",
"email-validator": "^2.0.4",
"export-from-json": "^1.7.2",
Expand Down
2 changes: 2 additions & 0 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import { AskQuestionButton } from './components/button/AskQuestionButton/AskQues
import { DarkModeProvider } from './util/DarkModeProvider';
import { SnackbarProvider } from './util/SnackbarProvider';


import { getScuntSettings } from './state/scuntSettings/saga';
import { scuntSettingsSelector } from './state/scuntSettings/scuntSettingsSlice';


export default function App() {
const dispatch = useDispatch();
Expand Down
Binary file removed client/src/assets/about/execs/oc.jpg
Binary file not shown.
Binary file removed client/src/assets/about/execs/vc_finance.jpg
Binary file not shown.
Binary file removed client/src/assets/about/execs/vc_internal.jpg
Binary file not shown.
Binary file removed client/src/assets/about/execs/vc_leadership.jpg
Binary file not shown.
Binary file removed client/src/assets/about/execs/vc_logistics.jpg
Binary file not shown.
Binary file removed client/src/assets/about/execs/vc_marketing.jpg
Binary file not shown.
Binary file removed client/src/assets/about/execs/vc_operations.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/Commuter_Profile.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/Content_Profile.jpg
Binary file not shown.
Binary file not shown.
Binary file removed client/src/assets/about/subcom/Dye_Profile.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/E4TW_Profile.jpg
Binary file not shown.
Binary file not shown.
Binary file removed client/src/assets/about/subcom/LGD_Profile.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/MHW_Profile.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed client/src/assets/about/subcom/Prank_Profile.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/Retreat_Profile.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/TechTeam_Profile.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/sub_distribution.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/sub_food_bev.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/sub_games.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/sub_internal.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/sub_kits.jpg
Binary file not shown.
Binary file removed client/src/assets/about/subcom/sub_ltc.jpg
Diff not rendered.
Diff not rendered.
Binary file removed client/src/assets/about/subcom/sub_outreach.jpg
Diff not rendered.
Binary file removed client/src/assets/about/subcom/sub_patrol.jpg
Diff not rendered.
Binary file removed client/src/assets/about/subcom/sub_registration.jpg
Diff not rendered.
Binary file removed client/src/assets/about/subcom/sub_scunt.jpg
Diff not rendered.
Binary file removed client/src/assets/about/subcom/sub_socialmedia.jpg
Diff not rendered.
Binary file removed client/src/assets/about/techteam/calum.jpg
Diff not rendered.
Binary file removed client/src/assets/about/techteam/emily.jpg
Diff not rendered.
Binary file removed client/src/assets/about/techteam/farbod.jpg
Diff not rendered.
Binary file removed client/src/assets/about/techteam/james.jpg
Diff not rendered.
Binary file removed client/src/assets/about/techteam/luke.jpg
Diff not rendered.
Binary file removed client/src/assets/about/techteam/natalie.jpg
Diff not rendered.
Binary file removed client/src/assets/about/techteam/neo.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/TechTeam.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/ana.jpeg
Diff not rendered.
Binary file removed client/src/assets/judges/badr.png
Diff not rendered.
Binary file removed client/src/assets/judges/chase.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/david.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/emma.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/harrison.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/jasmine.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/kat.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/mahshad.jpeg
Diff not rendered.
Binary file removed client/src/assets/judges/nikkie.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/owen.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/parker.png
Diff not rendered.
Binary file removed client/src/assets/judges/ryan.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/sam.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/spencer.jpg
Diff not rendered.
Binary file removed client/src/assets/judges/vuk.jpg
Diff not rendered.
296 changes: 148 additions & 148 deletions client/src/assets/schedule/data.jsx

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions client/src/assets/social/dino_test.svg
Diff not rendered.
Diff not rendered.
Binary file removed client/src/assets/sponsors/Hatchery.png
Diff not rendered.
Binary file removed client/src/assets/sponsors/NEO.png
Diff not rendered.
Binary file removed client/src/assets/sponsors/OSPE.png
Diff not rendered.
Binary file removed client/src/assets/sponsors/PEO.png
Diff not rendered.
31 changes: 16 additions & 15 deletions client/src/components/MakeReceipt/MakeReceipt.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Document, Page, Text, View, Svg, Circle, StyleSheet, Link } from '@react-pdf/renderer';
import { QRNormal } from 'react-qrbtf';
import ReactDOMServer from 'react-dom/server';

const styles = StyleSheet.create({
page: {
backgroundColor: '#E4E4E4',
},
qrcode: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
},
});
import { QRNormal } from 'react-qrbtf';
import { Document, Page, Text, View, Svg, Circle, Link } from '@react-pdf/renderer';

const MakeReceipt = (froshObject) => {
if (!froshObject.id) {
throw new Error('No ID provided to MakeReceipt.jsx');
}

const qr = (
<QRNormal
value={froshObject.id}
Expand Down Expand Up @@ -88,8 +78,19 @@ const MakeReceipt = (froshObject) => {

return (
<Document>
<Page size="A4" style={styles.page}>
<View style={styles.qrcode}>
<Page
size="A4"
style={{
backgroundColor: '#E4E4E4',
}}
>
<View
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Svg fill="white" style={{ width: '250px', padding: '10px 0 0 0' }}>
{t1}
</Svg>
Expand Down
87 changes: 87 additions & 0 deletions client/src/components/MakeSchedulePDF/MakeSchedulePDF.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import React from 'react';
import { getFroshGroupSchedule } from '../../pages/Profile/functions';
import { Document, Page, Text, View, Svg, Line, Font, StyleSheet } from '@react-pdf/renderer';
import MainFroshLogo from '../../assets/logo/frosh-main-logo-with-bg.svg';

const styles = StyleSheet.create({
page: {
backgroundColor: '#E4E4E4',
},
eventBubble: {
backgroundColor: '#58458f',
borderRadius: '10px',
padding: '10px',
margin: '10px'
},
eventName: {
fontSize: 12,
fontWeight: 'bold',
padding: '10px 0',
color: '#fff'
},
eventLoc: {
fontSize: 12,
padding: '10px 0',
color: '#fff'
},
eventDate: {
fontSize: 11,
fontStyle: 'italic',
color: '#fff',
padding: '5px 0'
},
eventDesc: {
fontSize: 12,
color: '#fff',
padding: '10px 0'
}
});

const MakeSchedulePDF = (froshObject) => {
const froshGroup = froshObject?.froshGroup;
const scheduleData = getFroshGroupSchedule(froshGroup);

return (
<Document>
<Page size="A4" style={styles.page}>
<View style={{ padding: '30px' }}>
<Text style={{ fontSize: 16, color: '#2c1370', padding: '20px 0', fontWeight: 'bold' }}>
F!rosh Schedule 2T3
</Text>
<Svg height="10" width="500">
<Line x1="0" y1="0" x2="500" y2="0" strokeWidth={4} stroke="rgb(49,25,87)" />
</Svg>
{Object.keys(scheduleData).map((day) => (
<div key={day}>
<Text style={{ fontSize: 14, padding: '20px 0', color: '#2c1370', fontWeight: 'bold' }}>
{day}
</Text>
{scheduleData[day].map((scheduleDay, index) => (
<div key={scheduleDay} style={styles.eventBubble}>
<Text style={styles.eventName}>
{scheduleDay['Event Name']}
</Text>
<Text style={styles.eventDate}>
{scheduleDay['Start Time']} - {scheduleDay['End Time']}
</Text>
{scheduleDay['Event Location'] ?
<Text style={styles.eventLoc}>
{scheduleDay['Event Location']}
</Text> : <></>
}
{scheduleDay['Event Description'] ?
<Text style={styles.eventDesc}>
{scheduleDay['Event Description']}
</Text> : <></>
}
</div>
))}
</div>
))}
</View>
</Page>
</Document>
);
};

export { MakeSchedulePDF };
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ const AskQuestionButton = () => {
const { user } = useSelector(userSelector);

const leader = user?.userType === 'leadur';
if (leader) {

if (leader || !user) {
// don't show FAQ button if leadur or if not logged in
return <></>;
}
return (
Expand Down
23 changes: 8 additions & 15 deletions client/src/components/form/Dropdown/Dropdown.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useState, useRef, useEffect, useContext } from 'react';
import React, { useState, useEffect, useContext } from 'react';
import PropTypes from 'prop-types';

import './Dropdown.scss';
import { useWrapperRef } from '../../../hooks/useWrapperRef';
import Arrow from '../../../../assets/icons/angle-down-solid.svg';
Expand All @@ -17,7 +16,7 @@ const Dropdown = ({
filterLabel,
maxLetters,
}) => {
const { darkMode, setDarkModeStatus } = useContext(DarkModeContext);
const { darkMode } = useContext(DarkModeContext);

useEffect(() => {
if (localStorageKey !== undefined) {
Expand Down Expand Up @@ -47,7 +46,7 @@ const Dropdown = ({
initialSelectedIndex === undefined ? values[0] : values[initialSelectedIndex],
);

const dropdownItems = values.map((value, index) => (
const dropdownItems = values.map((value) => (
<div
className={'dropdown-item'}
onClick={() => {
Expand All @@ -71,7 +70,7 @@ const Dropdown = ({
key={`dropdownItem-${value}`}
tabIndex="0"
>
{filterLabel ? filterLabel(value.toString()) : value.toString()}
{filterLabel ? filterLabel(value) : value}
</div>
));

Expand All @@ -97,17 +96,11 @@ const Dropdown = ({
>
<div className={'dropdown-selected-label'}>
{maxLetters
? (filterLabel ? filterLabel(selected.toString()) : selected.toString()).substring(
0,
maxLetters,
) +
((filterLabel ? filterLabel(selected.toString()) : selected.toString()).length >
maxLetters
? '...'
: '')
? (filterLabel ? filterLabel(selected) : selected).substring(0, maxLetters) +
((filterLabel ? filterLabel(selected) : selected).length > maxLetters ? '...' : '')
: filterLabel
? filterLabel(selected.toString())
: selected.toString()}
? filterLabel(selected)
: selected}
</div>
<div className={`dropdown-image${isOpen ? ' open' : ''}`}>
{darkMode ? (
Expand Down
16 changes: 5 additions & 11 deletions client/src/components/input/TextInput/TextInput.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
import React, { useContext, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import './TextInput.scss';
import EyeSolid from '../../../../assets/icons/eye-solid.svg';
Expand All @@ -15,7 +15,7 @@ const TextInput = ({
isRequiredInput,
errorFeedback,
onChange,
onEnterKey,
onKeyDown,
localStorageKey,
isDisabled,
inputArgs,
Expand Down Expand Up @@ -79,12 +79,6 @@ const TextInput = ({

const [type, setType] = useState(inputType ? inputType : 'text');

// const onKeyPress = (target) => {
// if (target.charCode === 13) {
// if (onEnterKey) onEnterKey(value);
// }
// };

const onInputChange = (event) => {
let value = event.target.value;
if (hasRestrictedInput) {
Expand Down Expand Up @@ -157,7 +151,7 @@ const TextInput = ({
}
required={isRequiredInput}
disabled={isDisabled}
// onKeyPress={onKeyPress}
onKeyDown={onKeyDown}
value={value ?? ''}
placeholder={placeholder}
type={type}
Expand All @@ -177,7 +171,7 @@ const TextInput = ({
}
required={isRequiredInput}
disabled={isDisabled}
// onKeyPress={onKeyPress}
onKeyDown={onKeyDown}
value={value ?? ''}
placeholder={placeholder}
type={type}
Expand Down Expand Up @@ -226,7 +220,7 @@ TextInput.propTypes = {
isRequiredInput: PropTypes.bool,
errorFeedback: PropTypes.string,
onChange: PropTypes.func,
onEnterKey: PropTypes.func,
onKeyDown: PropTypes.func,
localStorageKey: PropTypes.string,
isDisabled: PropTypes.bool,
inputArgs: PropTypes.object,
Expand Down
Loading

0 comments on commit 59d99d0

Please sign in to comment.