Development: Frontend: Actions - zhaw-timetable/zhawo GitHub Wiki

Content

Global Actions

setCurrentUser

Dispatches action to set a specific user as the current global user requries username and type (student, teacher)

Param Type
name string
type string

getPossibleNames

Dispatches action to make API call to fetch all Usernames

toggleDrawer

Dispatches action to toggle Drawer State in Store

logout

Dispatches action to remove current global user and remove View State from DB

changeTheme

Dispatches action to set a global theme requries theme type (darkTheme,lightTheme)

Param Type
value string

setDayView

Dispatches action to set if dayview or not (=weekview)

Param Type
value boolean

setViewState

Dispatches action to set current ViewState

Param Type
value number

getViewState

Dispatches action to read saved ViewSate from idb and sets it as current ViewState

Mensa Actions

getAllMensas

Dispatches action to make API call to fetch all mensas

getMenuPlan

Dispatches action to get menuplan for specific facility on specific date

Param Type
facilityId string
facilityName string
date Date

swipeRight

Dispatches action to perform swipe right

swipeLeft

Dispatches action to perform swipe left

gotoDay

Dispatches action to navigate to a specific targetDate

Param Type
targetDate Date

Room Search Actions

fetchFreeRoomData

Dispatches action to make API call to fetch free room data

getFreeRoomsByTime

Dispatches action to get free rooms by time between parameters for startTime and endTime

Param Type
startTime string
endTime string

changeFloor

Dispatches action to change selected floor

Param Type
selectedFloor string

Schedule Actions

getSchedule

Dispatches action to get Schedule for user Differentiates between logged in user and user in search

Param Type
route string
name string
startDate string

swipeRight

Dispatches action to perform swipe right

swipeLeft

Dispatches action to perform swipe left

gotoDay

Dispatches action to set current view day in store

Param Type
targetDate Date

clearSearch

Dispatches action to clear current search from store

VsZhaw Actions

getVszhawFeed

Dispatches action to make api call to get vszhaw rss feed

getVszhawEvents

Dispatches action to make api request to get next zszhaw event

⚠️ **GitHub.com Fallback** ⚠️