Class: Task

Task(data)

This represents a Task in an Activity or ActivityPlan. We do not have a Tasks table. Instead, a table (or other data structure) has an array of Tasks.

Constructor

new Task(data)

Creates a Task object
Parameters:
Name Type Description
data Task | Object
Source:

Members

droppableTypes :Array.<Draggable>

types of items that can be dropped on this task
Type:
Source:

nextTaskSameSession :boolean

true if the next task should be done in the same session as this one. I.e., if you are working with a helper, false if it's ok to stop after this task and pick up with the next task the next time you get together with that helper; true if you really should do the next task immediately.
Type:
  • boolean
Source:

playerButtonType :PlayerType|string

button to show on the Mobile task detail screen, to launch the appropriate player. If playerButtonType is empty string, do not show a play button.
Type:
Source:

recorderButtonType :RecorderButtonType|string

type of record button to show on Mobile task detail screen, to launch the appropriate recorder. If recorderButtonType is empty string, do not show a record button.
Type:
Source:

taskBox :TaskBox|string

The taskBox this Task appears in
Type:
Source:

taskBoxGroup :number

All tasks that must have the same taskBox will have the same taskBoxGroup > 0. So, when taskBox changes for a task that has taskBoxGroup > 0, all tasks in the ActivityPlan that have the same taskBoxGroup will also have their taskBoxes changed.
Type:
  • number
Source:

taskBoxOptions :Array.<TaskBox>

array of TaskBox keys the user is allowed to change this task to
Type:
Source:

taskClaFileId :string

CLA File (CE/DRE) associated with this task.
Type:
  • string
Source:

taskNotes :Array.<string>

Array of strings, to be displayed on separate lines
Type:
  • Array.<string>
Source:

taskPhotos :Array.<string>

filenames of photos associated with this task (no path, but does include extension). Files in a PhotoGroup will be copied to media/photos when user adds a PhotoGroup to a task.
Type:
  • Array.<string>
Source:

taskText :string

taskText is empty for tasks in an Activity. When an ActivityPlan is created, each task in the underlying activity is added to the ActivityPlan, and for each task in the ActivityPlan, taskText is set to taskTitle followed by taskNotes, joined with a newline character. In a task in an ActivityPlan, taskText can be edited by the user.
Type:
  • string
Source:

taskTitle :string

Type:
  • string
Source:

Methods

set(data) → {Task}

Creates an updated Task object
Parameters:
Name Type Description
data Task | Object
Source:
Returns:
Type
Task