Connected SemesterOverviewLecturer and Calenderview

This commit is contained in:
brausjonas
2023-06-07 21:58:54 +02:00
parent 7446fca94d
commit 530047ac68
6 changed files with 27308 additions and 10 deletions
+9 -7
View File
@@ -43,7 +43,7 @@ export default function CalenderView(p) {
"usercreatedbyid": localStorage.getItem("userid"),
"timestart": row,
"timeend": row + 3,
"info": ""
"info": localStorage.getItem("currentmodulename")
}
fetch(url, {
method: "POST",
@@ -250,6 +250,8 @@ export default function CalenderView(p) {
let url = baseURL + "/semester/id?sessionid=" + localStorage.getItem("sessionid") +
"&id=" + localStorage.getItem("currentsid");
console.log(localStorage.getItem("currentsid"))
fetch(url).then(r => r.json()).then(s => {
currentWeekStartDay = s.startday - new Date(s.startyear, 0, s.startday).getUTCDay();
currentYear = s.startyear;
@@ -363,7 +365,7 @@ export default function CalenderView(p) {
}}></div>
<div style={{maxHeight: "60%"}} className={"no-pointer-events"}>
<p>{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}</p>
<p>Modul</p>
<p>{d.info}</p>
</div>
<div className={"resize-grab"} id={"grabdown"} style={{
backgroundColor: getResizeBarColor(d.usercreatedbyid)
@@ -390,7 +392,7 @@ export default function CalenderView(p) {
}}></div>
<div style={{maxHeight: "60%"}} className={"no-pointer-events"}>
<p>{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}</p>
<p>Modul</p>
<p>{d.info}</p>
</div>
<div className={"resize-grab"} id={"grabdown"} style={{
backgroundColor: getResizeBarColor(d.usercreatedbyid)
@@ -418,7 +420,7 @@ export default function CalenderView(p) {
}}></div>
<div style={{maxHeight: "60%"}} className={"no-pointer-events"}>
<p>{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}</p>
<p>Modul</p>
<p>{d.info}</p>
</div>
<div className={"resize-grab"} id={"grabdown"} style={{
backgroundColor: getResizeBarColor(d.usercreatedbyid)
@@ -445,7 +447,7 @@ export default function CalenderView(p) {
}}></div>
<div style={{maxHeight: "60%"}} className={"no-pointer-events"}>
<p>{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}</p>
<p>Moduel etc.</p>
<p>{d.info}</p>
</div>
<div className={"resize-grab"} id={"grabdown"} style={{
backgroundColor: getResizeBarColor(d.usercreatedbyid)
@@ -472,7 +474,7 @@ export default function CalenderView(p) {
}}></div>
<div style={{maxHeight: "60%"}} className={"no-pointer-events"}>
<p>{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}</p>
<p>Modul</p>
<p>{d.info}</p>
</div>
<div className={"resize-grab"} id={"grabdown"} style={{
backgroundColor: getResizeBarColor(d.usercreatedbyid)
@@ -499,7 +501,7 @@ export default function CalenderView(p) {
}}></div>
<div style={{maxHeight: "60%"}} className={"no-pointer-events"}>
<p>{internal_to_time(d.timestart) + " - " + internal_to_time(d.timeend)}</p>
<p>Modul</p>
<p>{d.info}</p>
</div>
<div className={"resize-grab"} id={"grabdown"} style={{
backgroundColor: getResizeBarColor(d.usercreatedbyid)
+2 -1
View File
@@ -1 +1,2 @@
export const baseURL = "http://185.245.96.48:8080"
// export const baseURL = "http://185.245.96.48:8080"
export const baseURL = "http://localhost:8080"
@@ -38,7 +38,8 @@ export default function SemesteroverviewLecturer(p) {
function onClickSemester(e, m) {
if (m.target === m.currentTarget) {
localStorage.setItem("currentsid", e.id)
localStorage.setItem("currentsid", e.semesterid)
localStorage.setItem("currentmodulename", e.name)
router.push("/planning")
}