Skip to content

Commit

Permalink
Merge pull request #166 from OperationSpark/hs-fall-2024
Browse files Browse the repository at this point in the history
update for fall 2024
  • Loading branch information
ptbarnum4 authored Jul 23, 2024
2 parents 7a0b2a3 + f3926a7 commit 037d489
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 34 deletions.
38 changes: 27 additions & 11 deletions pages/programs/highschool/apply.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { GetStaticProps, NextPage } from 'next';

import Link from 'next/link';
import { FaArrowRight as RightArrowIcon } from 'react-icons/fa';
import { FiChevronLeft } from 'react-icons/fi';
import styled from 'styled-components';
import styled, { useTheme } from 'styled-components';

import Content from '@this/components/layout/Content';
import Main from '@this/components/layout/Main';
Expand All @@ -16,8 +17,23 @@ import Map from '@this/src/components/Elements/Map';
import { InfoIcon } from '@this/src/components/icons/Info';
import { Center } from '@this/src/components/layout/Center';
import { useClickAway } from '@this/src/hooks/useClickAway';
import { useState } from 'react';
import { FC, Fragment, useState } from 'react';

const CourseTime: FC<{ courseTime: string }> = ({ courseTime }) => {
const [startStr, endStr] = courseTime.split('→');
const theme = useTheme();
return (
<Fragment>
{startStr}
<RightArrowIcon
size={16}
color={theme.isLightMode ? theme.primary[0] : theme.secondary[0]}
style={{ margin: '0 0.25rem' }}
/>
{endStr}
</Fragment>
);
};
type HighschoolSignupProps = {
courses: IHighschoolPrograms['courses'];
};
Expand Down Expand Up @@ -55,20 +71,20 @@ const HighschoolSignup: NextPage<HighschoolSignupProps> = ({ courses }) => {
>
<div className='program-header'>
<div className='header-card'>
<h1 className='dynamic-xl secondary'>Summer 2024</h1>
<h1 className='dynamic-xl secondary'>Fall 2024</h1>
<h2 className='dynamic-h2 secondary'>Coding Camp Application</h2>
<p className='dynamic-txt'>
Open to rising sophomores, juniors, seniors, and 2024 grads
<b> (Graduating classes of 2024, 2025, 2026, and 2027)</b>.
<b> (Graduating classes of 2025, 2026, and 2027)</b>.
</p>
{/* Common meeting time */}
{/* <p className='dynamic-txt'>
Classes meet <b className='secondary'> three hours</b> a day,
<b className='secondary'> Monday</b> through <b className='secondary'>Friday</b>.
</p> */}
<p className='dynamic-txt'>
<b className='secondary'> May 30 to June 28, </b>
Monday-Friday, 3 hours daily.
Fall classes start the week of <b className='secondary'>August 19th</b> and end
the week of <b className='secondary'>December 19th</b>.
</p>
</div>
<Link
Expand All @@ -91,7 +107,7 @@ const HighschoolSignup: NextPage<HighschoolSignupProps> = ({ courses }) => {
<div className='left-col'>
<div className='hs-program-overview'>
<p>
{`This summer, we’re offering half day summer coding camps, with in-person and virtual options. You can enroll in one or the other- there is no hybrid option. If you're able to arrange for reliable transportation to our learning center in the Marigny, we recommend in-person classes. We have a great lab with brand new equipment and an awesome staff to get you started on your coding journey. You'll also meet other students from a wide range of schools and backgrounds!`}
{`This fall, we’re offering after-school courses, with in-person and virtual options. You can enroll in one or the other- there is no hybrid option. If you're able to arrange for reliable transportation to our learning center in the Marigny, we recommend in-person classes. We have a great lab with brand new equipment and an awesome staff to get you started on your coding journey. You'll also meet other students from a wide range of schools and backgrounds!`}
</p>
<br />

Expand Down Expand Up @@ -142,7 +158,7 @@ const HighschoolSignup: NextPage<HighschoolSignupProps> = ({ courses }) => {
</PlainCard>
<div className='program-time-details'>
<h2 className='dynamic-h2'>
<b>Summer Course Schedule:</b>
<b>Fall Course Schedule:</b>
</h2>
<div className='course-title'>
<b className='primary-secondary'>Fundamentals of HTML, CSS, and Javascript</b>
Expand Down Expand Up @@ -173,7 +189,7 @@ const HighschoolSignup: NextPage<HighschoolSignupProps> = ({ courses }) => {
{courseTimes.fundamentals.map((course) => (
<li key={course.value}>
<b className='primary-secondary'> {course.location}: </b>
{course.time}
<CourseTime courseTime={course.time} />
</li>
))}
</ul>
Expand Down Expand Up @@ -208,7 +224,7 @@ const HighschoolSignup: NextPage<HighschoolSignupProps> = ({ courses }) => {
{courseTimes.advanced.map((course) => (
<li key={course.value}>
<b className='primary-secondary'> {course.location}: </b>
{course.time}
<CourseTime courseTime={course.time} />
</li>
))}
</ul>
Expand All @@ -224,7 +240,7 @@ const HighschoolSignup: NextPage<HighschoolSignupProps> = ({ courses }) => {
<br />
<p>
{`If you go to school in a neighboring parish outside New Orleans, we may be running a
separate summer program in your school district. If this is the case, after you fill
separate fall program in your school district. If this is the case, after you fill
out the application, we will let you know who to contact to apply for the
appropriate program.`}
</p>
Expand Down
15 changes: 6 additions & 9 deletions src/Forms/Form.HighschoolApplication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const getSelectedCourseTimes = (selected: string): { options: TOption[]; note: s
interface HighSchoolApplicationProps {
onSubmitComplete?: () => void;
}
const gradYears = [2024, 2025, 2026, 2027];
const gradYears = [2025, 2026, 2027];

type GetInitSteps = <T>(length: number, cb: (index: number) => T) => Record<number, T>;
const getInitSteps: GetInitSteps = (length, cb) => {
Expand Down Expand Up @@ -108,14 +108,11 @@ const HighSchoolApplication = ({ onSubmitComplete }: HighSchoolApplicationProps)
};

const validateSteps = () => {
const stepErrs = Object.keys(stepFields).reduce(
(errs, stepNum) => {
const n = Number(stepNum);
errs[n] = getStepErrors(Number(n));
return errs;
},
{} as Record<number, string[]>,
);
const stepErrs = Object.keys(stepFields).reduce((errs, stepNum) => {
const n = Number(stepNum);
errs[n] = getStepErrors(Number(n));
return errs;
}, {} as Record<number, string[]>);

setStepErrors(stepErrs);
};
Expand Down
28 changes: 14 additions & 14 deletions src/Forms/formData/highSchoolApplicationData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,37 @@ export const courseTimes = {
fundamentals: [
{
course: 'fundamentals',
value: 'fundamentals-onsite-m-f-9-12',
value: 'fundamentals-onsite-w-4-8',
location: 'In Person',
preReq: 'No Prerequisite',
time: 'Monday to Friday | 9:00 AM to 12:00 PM',
name: 'In Person: Monday to Friday | 9:00 AM to 12:00 PM',
time: 'Wednesdays | 4:45 PM → 8:00 PM',
name: 'In Person: Wednesdays | 4:45 PM → 8:00 PM',
},
{
course: 'fundamentals',
value: 'fundamentals-virtual-m-f-1-4',
value: 'fundamentals-virtual-tues+thurs-5-7',
location: 'Virtual',
preReq: 'No Prerequisite',
time: 'Monday to Friday | 1:00 PM to 4:00 PM',
name: 'Virtual: Monday to Friday | 1:00 PM to 4:00 PM',
time: 'Tuesdays + Thursdays | 5:00 PM → 7:00 PM',
name: 'Virtual: Tuesdays + Thursdays | 5:00 PM → 7:00 PM',
},
],
advanced: [
{
course: 'advanced',
value: 'advanced-virtual-m-f-9-12',
location: 'Virtual',
value: 'advanced-onsite-thurs-4-8',
location: 'In Person',
preReq: 'Fundamentals of HTML, CSS, and Javascript',
time: 'Monday to Friday | 9:00 AM to 12:00 PM',
name: 'Virtual: Monday to Friday | 9:00 AM to 12:00 PM',
time: 'Thursdays | 4:45 PM → 8:00 PM',
name: 'In Person: Thursdays | 4:45 PM → 8:00 PM',
},
{
course: 'advanced',
value: 'advanced-onsite-m-f-1-4',
location: 'In Person',
value: 'advanced-virtual-tues+thurs-5-7',
location: 'Virtual',
preReq: 'Fundamentals of HTML, CSS, and Javascript',
time: 'Monday to Friday | 1:00 PM to 4:00 PM',
name: 'In Person: Monday to Friday | 1:00 PM to 4:00 PM',
time: 'Tuesdays + Thursdays | 5:00 PM → 7:00 PM',
name: 'Virtual: Tuesdays + Thursdays | 5:00 PM → 7:00 PM',
},
],
};
Expand Down

0 comments on commit 037d489

Please sign in to comment.