Module: EventJobService

Event Job Service Layer This service manages job assignments in events. Jobs represent roles and responsibilities assigned to persons within events, with qualification tracking and template-based structure. Key concepts: - Event Jobs: Role assignments linking persons to events - Job Templates: Define job structure, qualifications, and permissions - Qualifications: Track if person meets job requirements - Responsibilities: Jobs can be responsible (admin), visible, or role-based Database structure: - ObjectBase: Stores eventJob objects with Type='eventJob' - Links: Junction table for job-event and job-template relationships - Visible: Access control based on job assignments
Source:

Members

(static, constant) createFreeJob

Create free job without template
Source:

(static, constant) deleteJob

Delete a job
Source:

(static, constant) deleteLeaderJobs

Delete all jobs for a person in an event
Source:

(static, constant) getJob

Get single job details
Source:

(static, constant) getJobsListing

Get list of jobs for an event
Source:

(static, constant) jobQualified

Check if a person is qualified for a job Verifies that the person has all required qualifications/achievements for the job based on the qualification requirements.
Source:

(static, constant) putMemberFunctionTemplate

Create or update job with template
Source:

(static, constant) recreateJobsFunction

Recreate all jobs for a function template
Source:

(static, constant) recreateJobsGroup

Recreate all jobs for a group
Source:

(static, constant) requalify

Requalify all jobs for a function template
Source:

(static, constant) setResponsible

Set responsible person for event
Source:

(static, constant) updateJobTemplate

Update job template assignment
Source:

Methods

(async, inner) addJob(req, functionUID, memberUID, eventUID, UIDjob, update) → {Promise.<Object>}

Add a job to an event Creates or updates a job assignment linking a person to an event with a specific function template.
Parameters:
Name Type Default Description
req ExpressRequestAuthorized Request object
functionUID Buffer Function template UID
memberUID Buffer Member/person UID
eventUID Buffer Event UID
UIDjob Buffer Job UID to create/update
update boolean false Whether this is an update operation
Source:
Throws:
When validation fails
Type
Error
Returns:
Result with created job object
Type
Promise.<Object>

(async, inner) recreateJobs(root, jobs, requalify) → {Promise.<void>}

Recreate job objects from templates Re-renders job objects based on their templates, updating titles, sorting, and qualification status.
Parameters:
Name Type Default Description
root Buffer Organization root UID
jobs Array Array of job objects to recreate
requalify boolean false Whether to recheck qualifications
Source:
Returns:
Type
Promise.<void>