Class: basedata

basedata(logger)

Class handles all basedata related functionality and offers methods for dealing with basedata objects.

Constructor

new basedata(logger)

Constructor of Basedata
Parameters:
Name Type Description
logger object logger to be used
Source:

Methods

addBasedata(reqBody, reqFiles, callback)

Adding basedata enty to core database
Parameters:
Name Type Description
reqBody object req.body with form data
reqFiles object req.files with files information from form
callback function true or false
Source:

editBasedata(reqBody, basedataId, callback)

Updates information for a basedata entry in core database
Parameters:
Name Type Description
reqBody object form data wirh form fields, usually req.body (hint: avatar can not be updated with this method. setAvatar should has to used for avatar updates)
basedataId integer id of basedata entry to be updated / edited
callback function success (true / false)
Source:

getBaseDataForId(callback)

Returns basedata row for given basedata id
Parameters:
Name Type Description
callback function rows
Source:

getBaseDataForUUID(callback)

Returns basedata row for given uuid
Parameters:
Name Type Description
callback function rows
Source:

getBaseDataStaffCount(callback)

Returns rows of all existing basedata entries in core database independent of state
Parameters:
Name Type Description
callback function rows
Source:

getBaseDataStaffCountActive(callback)

Returns rows of active staff from core database
Parameters:
Name Type Description
callback function rows
Source:

getBaseDataStatisticsBirthdaylist(callback)

Returns list of upcomig birthdays of members
Parameters:
Name Type Description
callback function rows
Source:

getBaseDataStatisticsStaff(callback)

Returns statistics of basedata for organization from core database
Parameters:
Name Type Description
callback *
Source:

getImageForBasedata(bdId, callback)

Returns image filename for basedata image
Parameters:
Name Type Description
bdId integer id of basedata entry in core database table basedata
callback function returns string of image or null if not set or not found
Source:

getListOfBasedata(callback)

returns a list of all basedata entries
Parameters:
Name Type Description
callback function rows with all basedata records or null if error during database querying
Source:

getListOfBasedataByOrganizations(callback)

returns basedata entries from core database with organization information
Parameters:
Name Type Description
callback function rows
Source:

getListOfBasedataForTable(callback)

Returns list of basedata combined with organization information
Parameters:
Name Type Description
callback function rows of basedata for table view in UI
Source:

removeBasedata(bdId, callback)

Removes a basedata entry in core database
Parameters:
Name Type Description
bdId integer id of basedata entry in core database table basedata
callback function true or false
Source:

setAvatar(imagePath, basedataId, callback)

Sets the avatar for a basedata entry in core database
Parameters:
Name Type Description
imagePath string Path to the image to be set as avatar for basedata-entry in core database
basedataId integer id of basedata entry the avatar should be updated for
callback function success (true or false)
Source: