Module: supervision_shifts

Contains the functionalities related to the supervision shifts page.
Author:
  • Joonas Konki
  • Anu Koskela
  • Mikko Kuhno
  • Henrik Paananen
  • Atte Räty
License:
  • BSD 3-clause, see LICENSE for more details.
Source:

Methods

(static) addExperimentsInfo(timeslot, index, parent)

Creates a list element that includes the information of the reserved unit, the extra information it may have and its participants.
Parameters:
Name Type Description
timeslot object The selected time slot.
index number The index of the wanted unit.
parent object The element where the information is added.
Source:

(static) calendarClick(event, element, view)

Selects the event clicked on the calendar.
Parameters:
Name Type Description
event Contains the event information.
element Contains information what kind of element the clicked event is.
view Contains the viewmode in which the element is shown.
Source:

(static) calendarEventRender(event, element, view)

Renders the events to the calendar using a default renderer.
Parameters:
Name Type Description
event Contains the event information.
element Contains information what kind of element the clicked event is.
view Contains the viewmode in which the element is shown.
Source:

(static) doc_ready()

This is executed after the HTML page has been loaded. This is a common procedure of all of the client-side modules to initialise the page content.
Source:

(static) getNumberOfReservations(timeslot)

Gets the number of reservations for the specific time slot.
Parameters:
Name Type Description
timeslot The time slot for which the information is fetched for.
Source:

(static) initCalendar(calendarClick, calendarEventRender)

Initialises the calendar.
Parameters:
Name Type Description
calendarClick The click function to be added to the calendar events.
calendarEventRender The render options to be added to the calendar events.
Source:

(static) initTable()

Creates a table which displays all the supervision shifts, and a toggleable area for each shift, which includes the information of the reserved unit groups and of the participants. Adds a "cancel shift" button (and a listener for it) for each upcoming shift.
Source:

(static) reloadTimeSlots()

Reloads the information of the time slots from the database, empties and updates the list of the time slots.
Source:

(static) updateCalendar()

Initialises and updates the calendar.
Source:

(static) updateTable()

Shows the wanted time slots based on which options (past, present, future) are checked and hides the rest. If no time slots match the selected time frame, shows a notification.
Source:

(inner) supervisorSelection change()

Updates the view to shows the supervision time slots of the selected user.
Source:

(inner) toggleCalendarBtn click()

Toggles between the calendar and list views when the button is clicked.
Source: