Calender View Module and Semester names and Numbers are shown

Also in the Dashboard for Lecturers
This commit is contained in:
brausjonas
2023-06-16 11:59:06 +02:00
parent 8205b7d9d9
commit 7983e23815
5 changed files with 66803 additions and 323 deletions
@@ -26,19 +26,20 @@ export default function SemesteroverviewLecturer(p) {
let semesterURL = baseURL + "/semester/id/all?ids=" + args + "&sessionid=" + localStorage.getItem("sessionid");
fetch(semesterURL).then(r => r.json()).then(sem => {
sem.map(e => {
temp.push(e.name)
temp.push(e.name + " Sem. " + (e.number + 1))
})
}).then(() => setSemesterNames(temp))
})
}
function onClickSemester(e, m) {
function onClickSemester(e, m, name) {
if (e.activated == 1) {
if (m.target === m.currentTarget) {
localStorage.setItem("currentsid", e.semesterid)
localStorage.setItem("currentmodulename", e.name)
localStorage.setItem("moduleid", e.id)
localStorage.setItem("semestername", name)
router.push("/planning")
}
}
@@ -62,10 +63,10 @@ export default function SemesteroverviewLecturer(p) {
{entries.map((e, index) => (
<div className={"semester-tile box-shadow"} style={{
backgroundColor: e.activated == 1 ? "#ffffff" : "#aaaaaa"
}} onClick={(f) => onClickSemester(e, f)}>
}} onClick={(f) => onClickSemester(e, f, semesterNames[index])}>
<SemesterTile
editable={false} text={semesterNames[index]} text2={e.name}
onClick={(f) => onClickSemester(e, f)}
onClick={(f) => onClickSemester(e, f, semesterNames[index])}
/>
<StatusBar progress={0} modules={entries}/>
</div>