diff --git a/Advanced Databases Final Report.pdf b/Advanced Databases Final Report.pdf new file mode 100644 index 0000000..387311e Binary files /dev/null and b/Advanced Databases Final Report.pdf differ diff --git a/Group 09 Final Presentation.pptx b/Group 09 Final Presentation.pptx new file mode 100644 index 0000000..708d757 Binary files /dev/null and b/Group 09 Final Presentation.pptx differ diff --git a/db_app/src/components/Login.js b/db_app/src/components/Login.js index f77ac44..8ff13b6 100644 --- a/db_app/src/components/Login.js +++ b/db_app/src/components/Login.js @@ -41,6 +41,10 @@ export function Login() { navigate('/Plan'); } + const navigateProg = () => { + navigate('/ThisWeek'); + } + //State variable for login data const [data,setData] = useState({ net_id:"", @@ -74,7 +78,7 @@ export function Login() { console.log(response.status); if (response.status === 200){ setSession(); - navigateHome(); + navigateProg(); } }); diff --git a/db_app/src/components/Plan.js b/db_app/src/components/Plan.js index 631415a..518553c 100644 --- a/db_app/src/components/Plan.js +++ b/db_app/src/components/Plan.js @@ -125,17 +125,17 @@ const submitGoalHandler = evt => { { net_id: net_id, week_date: weekStart(), - total_cal: Number(total_cal[0]), - total_fat: Number(total_fat[0]), - total_sat_fat: Number(total_sat_fat[0]), - total_trans_fat: Number(total_trans_fat[0]), - total_carbs: Number(total_carbs[0]), - total_fiber: Number(total_fiber[0]), - total_sugar: Number(total_sugar[0]), - total_protein: Number(total_protein[0]), - total_sodium: Number(total_sodium[0]), - total_potassium: Number(total_potassium[0]), - total_cholesterol: Number(total_cholesterol[0]) + total_cal: Number(total_cal[0])*7, + total_fat: Number(total_fat[0])*7, + total_sat_fat: Number(total_sat_fat[0])*7, + total_trans_fat: Number(total_trans_fat[0])*7, + total_carbs: Number(total_carbs[0])*7, + total_fiber: Number(total_fiber[0])*7, + total_sugar: Number(total_sugar[0])*7, + total_protein: Number(total_protein[0])*7, + total_sodium: Number(total_sodium[0])*7, + total_potassium: Number(total_potassium[0])*7, + total_cholesterol: Number(total_cholesterol[0])*7 }).then((response) => { console.log(response); console.log(response.status); diff --git a/db_app/src/components/ThisWeek.js b/db_app/src/components/ThisWeek.js index e2ec56e..2fdcaef 100644 --- a/db_app/src/components/ThisWeek.js +++ b/db_app/src/components/ThisWeek.js @@ -142,7 +142,7 @@ const net_id = ReactSession.get("net_id"); } - const [toDelete, setToDelete] = useState([]); + const [toDelete, setToDelete] = useState([{}]); const removeItem = (index) => { setToDelete([