diff --git a/pages/teams.tsx b/pages/teams.tsx index c1a1f89..0a81450 100644 --- a/pages/teams.tsx +++ b/pages/teams.tsx @@ -150,53 +150,56 @@ export default function ViewTeams(props: SSRDataAuth['props']) {
+ - - - {!loading ? ( -
{ - e.preventDefault(); - router.push('/teams/create'); - }} - > - + + + {!loading ? ( + { + e.preventDefault(); + router.push('/teams/create'); + }} + > + + Create new team + + + ) : null} + +
+ +
+
+
+ - Create new team - - - ) : null} - -
- + Open Teams +
-
-
- - Open Teams - -
- {emptyMessage} - - - {teams - .sort((a, b) => +a._id - +b._id) - .map((team, idx) => ( - - ))} - -
- + {emptyMessage} + + + {teams + .sort((a, b) => +a._id - +b._id) + .map((team, idx) => ( + + ))} + +
+ +
{ <> -
+
{ownTeamFetched && !isOwnTeam ? ( diff --git a/public/THCodeOfConduct.pdf b/public/THCodeOfConduct.pdf deleted file mode 100644 index 2cd38f6..0000000 Binary files a/public/THCodeOfConduct.pdf and /dev/null differ diff --git a/src/actions/user.ts b/src/actions/user.ts index 8d9466b..932ebfb 100644 --- a/src/actions/user.ts +++ b/src/actions/user.ts @@ -92,7 +92,6 @@ export const rejectAll = (): DispatchAction => ({ export const confirm = ( signatureLiability: boolean, - signatureCodeOfConduct: boolean, willMentor: boolean, ): DispatchAction => ({ type: DispatchActionType.USER_CONFIRM, @@ -102,7 +101,6 @@ export const confirm = ( method: 'PUT', body: { signatureLiability, - signatureCodeOfConduct, willMentor, }, }, diff --git a/src/components/admin/AdminDialog/index.module.scss b/src/components/admin/AdminDialog/index.module.scss index 824a958..56dc663 100644 --- a/src/components/admin/AdminDialog/index.module.scss +++ b/src/components/admin/AdminDialog/index.module.scss @@ -1,6 +1,14 @@ @import '~/styles/variables.scss'; @import '~/styles/mixins.scss'; +.dialog { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + .tabs { width: 100%; justify-content: space-between; diff --git a/src/components/admin/AdminDialog/index.tsx b/src/components/admin/AdminDialog/index.tsx index 86d0290..b70ce49 100644 --- a/src/components/admin/AdminDialog/index.tsx +++ b/src/components/admin/AdminDialog/index.tsx @@ -28,34 +28,36 @@ const AdminDialog = (): ReactElement => { }, []); return ( - - - - setTabIndex(newIndex)} - className={styles.tabs} - variant="scrollable" - > - - - - - - - - - - - - - - - - - - - - +
+ + + + setTabIndex(newIndex)} + className={styles.tabs} + variant="scrollable" + > + + + + + + + + + + + + + + + + + + + + +
) } diff --git a/src/components/confirmation/ConfirmationDialog/index.tsx b/src/components/confirmation/ConfirmationDialog/index.tsx index 30e48cf..f0249c8 100644 --- a/src/components/confirmation/ConfirmationDialog/index.tsx +++ b/src/components/confirmation/ConfirmationDialog/index.tsx @@ -3,6 +3,7 @@ import { Collapse, FormControlLabel, FormGroup, + Hidden, IconButton, LinearProgress, Link, @@ -26,7 +27,6 @@ const ConfirmationDialog = (): ReactElement => { const [loading, setLoading] = useState(false); const [signatureLiability, setSignatureLiability] = useState(false); - const [signatureCodeOfConduct, setSignatureCodeOfConduct] = useState(false); const [willMentor, setWillMentor] = useState(false); const confirmTime = useSelector( @@ -43,7 +43,6 @@ const ConfirmationDialog = (): ReactElement => { await dispatch( actions.user.confirm( signatureLiability, - signatureCodeOfConduct, willMentor, ), ); @@ -75,6 +74,7 @@ const ConfirmationDialog = (): ReactElement => {
{ } /> - - setSignatureCodeOfConduct( - e.target.checked, - ) - } - /> - } - label={ - - I agree with the{' '} - - TartanHacks Code of Conduct - - .* - - } - /> {
Non-CMU students need to complete their application by - 11:59pm EST, January 19th. + 11:59pm EST, January 24th. The deadline to be eligible + for travel reimbursement is January 3rd.
- CMU students have time until January 26th. + CMU students have until January 31st.
diff --git a/src/components/form/ApplicationForm/BasicSection.tsx b/src/components/form/ApplicationForm/BasicSection.tsx index f762e4f..8b65715 100644 --- a/src/components/form/ApplicationForm/BasicSection.tsx +++ b/src/components/form/ApplicationForm/BasicSection.tsx @@ -245,6 +245,7 @@ const BasicSection = ({ error={ageErrorStatus} helperText={ageHelper} variant="outlined" + required fullWidth value={age} onChange={(e) => { diff --git a/src/components/form/ApplicationForm/TravelSection.tsx b/src/components/form/ApplicationForm/TravelSection.tsx index c077562..b6ab261 100644 --- a/src/components/form/ApplicationForm/TravelSection.tsx +++ b/src/components/form/ApplicationForm/TravelSection.tsx @@ -31,10 +31,22 @@ const TravelSection = ({ const [wantsTravelReimbursement, setWantsTravelReimbursement] = useState(false); const [travelDetails, setTravelDetails] = useState(''); + // Error fields + const [travelInfoErrorStatus, setTravelInfoErrorStatus] = useState(false); + const [travelInfoHelper, setTravelInfoHelper] = useState(''); + const validateForm = async () => { const data: TravelFields = { wantsTravelReimbursement, travelDetails }; await dispatch(actions.application.saveTravel(data)); - setValid(true); + + let valid = true; + if (wantsTravelReimbursement && travelDetails.length === 0) { + setTravelInfoErrorStatus(true); + setTravelInfoHelper('Please provide travel details if you want to apply for travel reimbursement'); + valid = false; + } + + setValid(valid); setValidate(false); }; @@ -81,6 +93,8 @@ const TravelSection = ({