CalendarAndFilesScheduler
correctDbProtections(Object employees)
Corrects database permissions for all empoyees
Arguments:
Name | Type | Description |
---|---|---|
employees | Object |
object of all employees |
correctProtections()
Corrects permission for all Schedule spreadsheets and sheet 'Rozpis'
refreshSpreadSheet(Object day, Object week, Object data)
Creates all spreadsheets not existing in this week
Arguments:
Name | Type | Description |
---|---|---|
day | Object |
monday of week to be set |
week | Object |
week to be refreshed |
data | Object |
object with data |
runOnceAWeek()
automatic script which reloads calendar and creates missing Schedule Sheets
runEveryTwoHours()
automatic script which refreshes rights for Sheets and Sites
correctSitesRights(Object employees)
Corrects database permissions for all empoyees
Arguments:
Name | Type | Description |
---|---|---|
employees | Object |
object of all employees |
refreshCalendar(Object day, Object till, Object week)
refreshes calendar events
Arguments:
Name | Type | Description |
---|---|---|
day | Object |
monday of week to be set in calendar |
till | Object |
end of week to be set in calendar |
week | Object |
week number to be set in calendar |
runEverySixHours()
automatic script which creates missing Schedule Sheets
refreshAll()
not automatic
createPresentableHTML(Object content, Object sourceType, Object title)
Creates presentable HTML for a browser *cannot be run from library, becaouse of filename
Arguments:
Name | Type | Description |
---|---|---|
content | Object |
depends on a sourceType, if sourceType isn't string, it includes file with name == content |
sourceType | Object |
is string indicating values 'string'/'file' for source type, takes file as default for any other value |
title | Object |
title of a window |
Return Values:
Type | Description |
---|---|
Object |
html object |
appplyProtections(Object protection, Object emails)
Refreshes protections. Deletes protections not existing in emails and sets all permissions in emails.
Arguments:
Name | Type | Description |
---|---|---|
protection | Object |
protection object to be changed |
emails | Object |
emails of desired editors |
doGet()
Serves HTML of refresh button for super admin only, this script can run only as super admin
Return Values:
Type | Description |
---|---|
Object |
HTML page with javascript |
deleteOldTriggers()
deletes old triggers of not active users
isFileInDB(Object files, Object obj)
Checks if obj is in DB. Uses cached files obj, because looking into the database all the time would be inefficient.
Arguments:
Name | Type | Description |
---|---|---|
files | Object |
all files in db |
obj | Object |
Object to be checked for |
Return Values:
Type | Description |
---|---|
boolean |
true if is in DB |