Compare commits
2 Commits
505281f4e3
...
c6d8d64a41
Author | SHA1 | Date | |
---|---|---|---|
c6d8d64a41 | |||
edaf988eec |
10
www/app.js
10
www/app.js
|
@ -356,6 +356,13 @@ function displayFullSchedule() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayIndividualSchedule(person) {
|
function displayIndividualSchedule(person) {
|
||||||
|
if (person.kind === 'staff' && !schedule.all_staff.includes(person.name)
|
||||||
|
|| person.kind === 'student' && !schedule.all_students.includes(person.name)) {
|
||||||
|
updateHash({person: undefined});
|
||||||
|
displaySchedule();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (hash.day) {
|
if (hash.day) {
|
||||||
const grid = schedule.gridFor(person, hash.day);
|
const grid = schedule.gridFor(person, hash.day);
|
||||||
const title = document.createElement('h1');
|
const title = document.createElement('h1');
|
||||||
|
@ -446,6 +453,9 @@ async function refreshDisplay() {
|
||||||
|
|
||||||
function displaySchedule() {
|
function displaySchedule() {
|
||||||
utils.clearChildren(schedulesDiv);
|
utils.clearChildren(schedulesDiv);
|
||||||
|
if (hash.day && !schedule.all_days.includes(hash.day)) {
|
||||||
|
updateHash({day: undefined});
|
||||||
|
}
|
||||||
if (!hash.person) {
|
if (!hash.person) {
|
||||||
displayFullSchedule();
|
displayFullSchedule();
|
||||||
} else if (hash.person.kind) {
|
} else if (hash.person.kind) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user