Class: TaskBoxSortOrder

TaskBoxSortOrder(data)

Class representing the order tasks should be displayed in all TaskBoxes. Since completing a Task causes the associated ActivityPlan._id to be removed from one TaskBox and added to another TaskBox, it seems best to keep all TaskBoxes together in a single doc, to prevent TaskBoxes from getting out of sync. So, the table represented by this class will have only one row. Each Task Box has an array of activityPlanId's, in the order to display the activityPlan's next task. This works because an activity plan can never have more than one next task, so an activity plan can only exist once in this table. When the final task for an activity plan is completed, the activity plan id is removed from this table. TaskBox names are all caps to match the TaskBox enum.

Constructor

new TaskBoxSortOrder(data)

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

Members

_id :string

Unique ID. There will be only one record, but I include the _id for convenience when using methods that require an _id.
Type:
  • string
Default Value:
  • ''
Source:

COMMUNITY :Array.<string>

Community sort order: array of IDs of ActivityPlans, in the sorted order. For each ActivityPlanId, show that ActivityPlan's next task (the task indicated by activityPlan.nextTaskIndex).
Type:
  • Array.<string>
Default Value:
  • []
Source:

HELPER :Array.<string>

Helper sort order: array of IDs of ActivityPlans, in the sorted order. For each ActivityPlanId, show that ActivityPlan's next task (the task indicated by activityPlan.nextTaskIndex).
Type:
  • Array.<string>
Default Value:
  • []
Source:

PLAN :Array.<string>

Plan sort order: array of IDs of ActivityPlans, in the sorted order. For each ActivityPlanId, show that ActivityPlan's next task (the task indicated by activityPlan.nextTaskIndex).
Type:
  • Array.<string>
Default Value:
  • []
Source:

PROCESS :Array.<string>

Process sort order: array of IDs of ActivityPlans, in the sorted order. For each ActivityPlanId, show that ActivityPlan's next task (the task indicated by activityPlan.nextTaskIndex).
Type:
  • Array.<string>
Default Value:
  • []
Source:

Methods

set(data) → {TaskBoxSortOrder}

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