Calender View Module and Semester names and Numbers are shown
Also in the Dashboard for Lecturers
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user