Skip to content

Commit

Permalink
restore frosh group specific schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyleal committed Aug 22, 2024
1 parent 2f66155 commit 1550a5d
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getDaysSchedule, getFroshGroupSchedule } from '../../../pages/Profile/f
import { ButtonSelector } from '../../buttonSelector/buttonSelector/ButtonSelector';
import { ScheduleComponentAccordion } from '../../schedule/ScheduleHome/ScheduleHome';
import './ProfilePageSchedule.scss';
// import { froshGroups } from '../../../util/frosh-groups';
import { froshGroups } from '../../../util/frosh-groups';

export const ProfilePageSchedule = () => {
const { user } = useSelector(userSelector);
Expand Down Expand Up @@ -33,10 +33,10 @@ export const ProfilePageSchedule = () => {
return { name: item };
});

// const froshGroupNames = [];
// for (let froshGroup of froshGroups) {
// froshGroupNames.push(froshGroup?.name);
// } // i think this is for leedur page, but not sure where the code went...
const froshGroupNames = [];
for (let froshGroup of froshGroups) {
froshGroupNames.push(froshGroup?.name);
} // i think this is for leedur page, but not sure where the code went...

return (
<div className="profile-page-schedule">
Expand Down
112 changes: 67 additions & 45 deletions client/src/pages/Profile/functions.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
import { data } from '../../assets/schedule/data';
import {
data,
dataAlpha,
dataBeta,
dataIota,
dataPhi,
dataPsi,
dataRho,
dataZeta,
dataGamma,
dataOmega,
dataChi,
dataUpsilon,
dataPi,
dataNu,
dataDelta,
dataSigma,
dataTau,
dataKappa,
dataTheta,
dataLambda,
dataOmicron,
} from '../../assets/schedule/data';

// function checks if email is valid and sends a reset password email
export async function resetPassword(email) {
Expand All @@ -23,50 +45,50 @@ export function getDaysSchedule(scheduleData) {
}

export function getFroshGroupSchedule(froshGroup) {
return data; // for now, return the default schedule
// if (froshGroup === 'Alpha') {
// return dataAlpha;
// } else if (froshGroup === 'Beta') {
// return dataBeta;
// } else if (froshGroup === 'Iota') {
// return dataIota;
// } else if (froshGroup === 'Phi') {
// return dataPhi;
// } else if (froshGroup === 'Psi') {
// return dataPsi;
// } else if (froshGroup === 'Rho') {
// return dataRho;
// } else if (froshGroup === 'Zeta') {
// return dataZeta;
// } else if (froshGroup === 'Gamma') {
// return dataGamma;
// } else if (froshGroup === 'Omega') {
// return dataOmega;
// } else if (froshGroup === 'Chi') {
// return dataChi;
// } else if (froshGroup === 'Upsilon') {
// return dataUpsilon;
// } else if (froshGroup === 'Pi') {
// return dataPi;
// } else if (froshGroup === 'Nu') {
// return dataNu;
// } else if (froshGroup === 'Delta') {
// return dataDelta;
// } else if (froshGroup === 'Sigma') {
// return dataSigma;
// } else if (froshGroup === 'Tau') {
// return dataTau;
// } else if (froshGroup === 'Kappa') {
// return dataKappa;
// } else if (froshGroup === 'Theta') {
// return dataTheta;
// } else if (froshGroup === 'Lambda') {
// return dataLambda;
// } else if (froshGroup === 'Omicron') {
// return dataOmicron;
// } else {
// return data;
// }
// return data; // for now, return the default schedule
if (froshGroup === 'Alpha') {
return dataAlpha;
} else if (froshGroup === 'Beta') {
return dataBeta;
} else if (froshGroup === 'Iota') {
return dataIota;
} else if (froshGroup === 'Phi') {
return dataPhi;
} else if (froshGroup === 'Psi') {
return dataPsi;
} else if (froshGroup === 'Rho') {
return dataRho;
} else if (froshGroup === 'Zeta') {
return dataZeta;
} else if (froshGroup === 'Gamma') {
return dataGamma;
} else if (froshGroup === 'Omega') {
return dataOmega;
} else if (froshGroup === 'Chi') {
return dataChi;
} else if (froshGroup === 'Upsilon') {
return dataUpsilon;
} else if (froshGroup === 'Pi') {
return dataPi;
} else if (froshGroup === 'Nu') {
return dataNu;
} else if (froshGroup === 'Delta') {
return dataDelta;
} else if (froshGroup === 'Sigma') {
return dataSigma;
} else if (froshGroup === 'Tau') {
return dataTau;
} else if (froshGroup === 'Kappa') {
return dataKappa;
} else if (froshGroup === 'Theta') {
return dataTheta;
} else if (froshGroup === 'Lambda') {
return dataLambda;
} else if (froshGroup === 'Omicron') {
return dataOmicron;
} else {
return data;
}
}

export function capitalizeFirstLetter(string) {
Expand Down

0 comments on commit 1550a5d

Please sign in to comment.