Home
SheetsRedirect
editMainSheet(Object e)
Function which processes behaviour when spreadsheet is edited
Arguments:
Name |
Type |
Description |
e |
Object |
event send from spreadsheet |
checkAssistantDuplicities()
Checks if sheet has duplicates in times for one assistant
resolveTriggers(Object id)
Resolves triggers of a spreadsheet and generates assistants sheets from data in 'Rozpis' sheet
Arguments:
Name |
Type |
Description |
id |
Object |
id of spreadsheet |
checkDayDuplicities(Object sheet, Object row, Object column, Object numberOfRows, Object width)
Checks if day in sheet has duplicates in times for one assistant
Arguments:
Name |
Type |
Description |
sheet |
Object |
sheet to check |
row |
Object |
row where to check |
column |
Object |
column where to check |
numberOfRows |
Object |
numberOfRows to check |
width |
Object |
width of one day(for now should be 6 only) |
setProp(Object prop, Object value)
Wrapper function.
Arguments:
Name |
Type |
Description |
prop |
Object |
|
value |
Object |
|
getLinks(Object files, Object group, Object owner)
Gets links for group in format for scriptlets to assemble the page sets array to user properties
Arguments:
Name |
Type |
Description |
files |
Object |
all files this function searches in |
group |
Object |
group we want to have links of |
owner |
Object |
it takes all files without owner, if this parameter set, takes files with this owner too |
initializeData()
Reloads data for spreadsheet to use, to user properties.
temporaryTestingLog(Object email, Object message)
Arguments:
Name |
Type |
Description |
email |
Object |
|
message |
Object |
|
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 |
resolveOnTrigger(Object ss, Object type, Object functionName)
If spreadsheet doesn't have any triggers assigned, this function assigns trigger to active user. If trigger capacity reaches maximum, it tries to delete
oldest trigger this function assigned.
Arguments:
Name |
Type |
Description |
ss |
Object |
spreadsheet for setting triggers |
type |
Object |
|
functionName |
Object |
|
include(Object filename)
Includes HMTL from a file. *just shortcut a for a long command
Arguments:
Name |
Type |
Description |
filename |
Object |
name of file to be included |
Return Values:
Type |
Description |
string |
string of html |
deleteLowestTrigger()
Tries to delete lowest trigger of active user
Return Values:
Type |
Description |
number |
number of deleted triggers |
isSelectedMainEvent(Object value)
Checks if is main event
Arguments:
Name |
Type |
Description |
value |
Object |
value of selected field |
Return Values:
Type |
Description |
boolean |
true if selected event is not a client |
constructUrlParameters(Object obj)
Maps obj properties to string as url parameters.
Arguments:
Name |
Type |
Description |
obj |
Object |
object to convert |
Return Values:
Type |
Description |
string |
parameter part of html |
getProp(Object prop)
Wrapper function.
Arguments:
Name |
Type |
Description |
prop |
Object |
|
checkIfPropsFull()
Checks if props are set corectly
makeRules(Object arrays)
Makes rules for data validation
Arguments:
Name |
Type |
Description |
arrays |
Object |
array of arrays, fields of each array are values used for each rule (i.e. only these values are valid) |
Return Values:
Type |
Description |
Array<Object> |
arrays of rules in the same order as input |
setRuntimeProperties(Object params)
Sets runtime properties
Arguments:
Name |
Type |
Description |
params |
Object |
object with properties to set |
getActors(Object group)
gets employees associated with this group
Arguments:
Name |
Type |
Description |
group |
Object |
group |
Return Values:
Type |
Description |
Array<Object> |
actors of this group |
setScriptProp(Object prop, Object value)
Wrapper function.
Arguments:
Name |
Type |
Description |
prop |
Object |
|
value |
Object |
|
setDuplicateCheck(Object bool)
Sets to user prop whether to check duplicates in sheet
Arguments:
Name |
Type |
Description |
bool |
Object |
if true checks duplicates |
rfc3986EncodeURIComponent(Object str)
Encodes URI component.
Arguments:
Name |
Type |
Description |
str |
Object |
string to encode |
Return Values:
Type |
Description |
string |
rfc3986 URI component |
employeeChanged(Object sheet, Object row, Object col)
Resolves colours and default tariff if employee selected
Arguments:
Name |
Type |
Description |
sheet |
Object |
sheet of event |
row |
Object |
row of event |
col |
Object |
col of event |
updateSpreadSheet(Object spreadSheet, Object checkIntegrity)
Reloads and prepares spreadsheet for a user.
Arguments:
Name |
Type |
Description |
spreadSheet |
Object |
object of a spreadSheet to update |
checkIntegrity |
Object |
if true checks color and data integrity |
includeAndEvaluate(Object filename)
Evaluates GAS scriptlets and includes HMTL from a file. *just shortcut a for a long command
Arguments:
Name |
Type |
Description |
filename |
Object |
name of file to be included |
Return Values:
Type |
Description |
string |
string of result html |
mainEventChanged(Object e, Object sheet, Object row, Object col)
Manipulates row if selected value is event or client
Arguments:
Name |
Type |
Description |
e |
Object |
event send from spreadsheet |
sheet |
Object |
sheet of event |
row |
Object |
row of event |
col |
Object |
col of event |
getParsedScriptProp(Object prop)
Wrapper function.
Arguments:
Name |
Type |
Description |
prop |
Object |
|
dateChanged(Object sheet, Object row, Object col)
Validates values of changed date
Arguments:
Name |
Type |
Description |
sheet |
Object |
sheet of event |
row |
Object |
row of event |
col |
Object |
col of event |
doGet(Object e)
Serves HTML
Arguments:
Name |
Type |
Description |
e |
Object |
url parameters setting this webapp's beahviour |
Return Values:
Type |
Description |
Object |
HTML page with javascript |
getScriptData(Object fieldName)
Wrapper function for getting data associated it with this spreadsheet
Arguments:
Name |
Type |
Description |
fieldName |
Object |
|
setIntegrityCheck(Object bool)
Sets to user prop whether to check integrity of sheet
Arguments:
Name |
Type |
Description |
bool |
Object |
if true checks integrity |
saveScriptData(Object fieldName, Object obj)
Wrapper function for saving data associated it with this spreadsheet
Arguments:
Name |
Type |
Description |
fieldName |
Object |
|
obj |
Object |
|
onOpenSheet()
Reloads data for spreadsheet, generates sheets for assistants and creates menu for admins/leaders
refreshAssistantsSheets(Object spreadSheet, Object actors, Object eventsNames)
Sorts data from sheet rozpis and creates sheets for all group actors and assigns appropriate data
Arguments:
Name |
Type |
Description |
spreadSheet |
Object |
spreadsheet for refreshing |
actors |
Object |
array of actors |
eventsNames |
Object |
array with names of events |
updateDayRange(Object sheet, Object row, Object column, Object numberOfRows, Object rules, Object width, Object turnOffColors)
Updates one day in a spreadsheet
Arguments:
Name |
Type |
Description |
sheet |
Object |
sheet to update |
row |
Object |
row where to start updating |
column |
Object |
column where to start updating |
numberOfRows |
Object |
numberOfRows to update |
rules |
Object |
rules to set for associated drop down lists |
width |
Object |
width of one day(for now should be 6 only) |
turnOffColors |
Object |
if true doesn't update colors |
resolveMisplacedTriggers(Object email, Object type, Object functionName)
Deletes misplaced triggers of this user. For example if we delete row of a trigger in db, this function deletes it for user.
Arguments:
Name |
Type |
Description |
email |
Object |
email of user who owns the triggers |
type |
Object |
type of trigger to resolve |
functionName |
Object |
name of trigger's funtion to resolve |