TaskBoardStores

Configs

6

Data

Inline assignments, will be loaded into an internally created AssignmentStore as a part of a project.

Default values to apply to task records created by task boards features (such as the column header menu and the column toolbar)

A project config object or an instance that holds all stores and data used by the TaskBoard.

const taskBoard = new TaskBoard({
    project : {
        // Use a custom task model
        taskModelClass : MyTaskModel,

        // Supply inline data
        tasks : [
            { id : 1, name: 'Task 1', ... },
            ...
        ]
});

Project has built-in crud manager functionality to handle syncing with a backend:

const taskBoard = new TaskBoard({
    project : {
        loadUrl : 'data/data.json'
    },
    autoLoad : true
});

Also has built-in state tracking manager functionality to handle undo/redo:

```javascript
const taskBoard = new TaskBoard({
    stm : {
        autoRecord : true,
        disabled   : false
    }
});

Inline resources, will be loaded into an internally created ResourceStore as a part of a project.

Inline tasks, will be loaded into an internally created TaskStore as a part of a project.

Masking

syncMask: String | Object | null= null

TaskBoard does not use a sync mask by default. If you want one, see syncMask for configuration options.

Properties

6

Common

The ProjectModel instance, containing the data visualized by the TaskBoard.

Class hierarchy

isTaskBoardStores: Boolean= truereadonly
Identifies an object as an instance of TaskBoardStores class, or subclass thereof.
isTaskBoardStores: Boolean= truereadonlystatic
Identifies an object as an instance of TaskBoardStores class, or subclass thereof.

Data

Inline assignments, will be loaded into an internally created AssignmentStore as a part of a project.

Inline resources, will be loaded into an internally created ResourceStore as a part of a project.

Inline tasks, will be loaded into an internally created TaskStore as a part of a project.

Functions

2

Add a new task to the specified column / swimlane intersection (swimlane is optional), scroll it into view and start editing it (if an editing feature is enabled).

By default the task is created using the data defined in the newTaskDefaults combined with values for the columnField, the swimlaneField and a generated weight to place it last. To override these or to supply your own values for any field, pass the taskData argument.

If project is configured to auto sync changes to backend, the sync request will be awaited before editing starts.

ParameterTypeDescription
columnRecordColumnModel

Column to add the task to

swimlaneRecordColumnModel

Swimlane to add the task to

taskDataObject

Data for the new task

Removes one or more tasks from the linked task store (and thus the TaskBoard).

First fires a 'beforeTaskRemove' event, which is preventable and async. Return false or a promise that resolves to false from a listener to prevent the operation.

taskBoard.on({
    async beforeRemoveTask() {
        const result = await askForConfirmation();
        return result;
    }
});

taskBoard.remove(myTask);
ParameterTypeDescription
taskRecordTaskModel | TaskModel[]

A single task or an array thereof to remove from the task store.

Returns: Boolean -

Returns true if the tasks were removed, false if the operation was prevented.

Events

1

Triggered when one or more tasks are to be removed by a call to removeTask().

The UI routes through removeTask() (currently only the task menu offers task removal), this event can be used to add a confirmation flow or similar to those actions.

Return false or a promise that resolves to false in a listener to prevent removal.

taskBoard.on({
    async beforeRemoveTask() {
        const result = await askForConfirmation();
        return result;
    }
});
// Adding a listener using the "on" method
taskBoardStores.on('beforeTaskRemove', ({ source, taskRecords }) => {

});
ParameterTypeDescription
sourceTaskBoard

This TaskBoard

taskRecordsTaskModel[]

Task records to be removed

Event handlers

1

Called when one or more tasks are to be removed by a call to removeTask().

The UI routes through removeTask() (currently only the task menu offers task removal), this event can be used to add a confirmation flow or similar to those actions.

Return false or a promise that resolves to false in a listener to prevent removal.

taskBoard.on({
    async beforeRemoveTask() {
        const result = await askForConfirmation();
        return result;
    }
});
new TaskBoardStores({
    onBeforeTaskRemove({ source, taskRecords }) {

    }
});
ParameterTypeDescription
sourceTaskBoard

This TaskBoard

taskRecordsTaskModel[]

Task records to be removed