From 20e2351ba98ff92057b43af5287dc99be58c45d8 Mon Sep 17 00:00:00 2001 From: AliGitGut Date: Wed, 21 Jun 2023 22:49:47 +0200 Subject: [PATCH] Bugfix Pausen Pausen werden nicht mehr angerecht aber dem Dozenten mitgeteilt --- anwendung/src/components/CalenderView.jsx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/anwendung/src/components/CalenderView.jsx b/anwendung/src/components/CalenderView.jsx index e37db31..cb7e235 100644 --- a/anwendung/src/components/CalenderView.jsx +++ b/anwendung/src/components/CalenderView.jsx @@ -171,8 +171,6 @@ export default function CalenderView(p) { let entriesURL = baseURL + "/entries/all/module?sessionid=" + localStorage.getItem("sessionid") + "&moduleid=" + localStorage.getItem("moduleid") fetch(entriesURL).then(r => r.json()).then(allEn => { - //console.log(allEn) - let moduleid = localStorage.getItem("moduleid") let sum = 0 @@ -180,10 +178,7 @@ export default function CalenderView(p) { for (let j = 0; j < allEn.length; j++) { if (allEn[j] != null && allEn[j].moduleid == moduleid) { sum += allEn[j].timeend - allEn[j].timestart - checkTime = Math.floor((allEn[j].timeend - allEn[j].timestart)/12) - sum -= checkTime } - } sum /= 3 @@ -655,7 +650,7 @@ export default function CalenderView(p) {

{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}

{d.info}


-

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause Angerechnet" : ""}

+

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause einplanen" : ""}

{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}

{d.info}


-

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause angerechnet" : ""}

+

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause einplanen" : ""}

{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}

{d.info}


-

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause angerechnet" : ""}

+

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause einplanen" : ""}

{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}

{d.info}


-

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause angerechnet" : ""}

+

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause einplanen" : ""}

{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}

{d.info}


-

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause angerechnet" : ""}

+

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause einplanen" : ""}

{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}

{d.info}


-

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause angerechnet" : ""}

+

{(Math.floor((d.timeend - d.timestart) / 12)) > 0 ? (Math.floor((d.timeend - d.timestart) / 12) * 15) + "min Pause einplanen" : ""}