v7.3.0

ProjectModel

This class represents a global project of your TaskBoard - a central place for all data.

It holds and links the stores usually used by TaskBoard:

Loading remote data

const taskBoard = new TaskBoard({
    project : {
        // Project configuration
    }
});

Working with inline data

The project provides an inlineData getter/setter that can be used to manage data from all Project stores at once. Populating the stores this way can be useful if you do not want to use the CrudManager for server communication but instead load data using Axios or similar.

Getting data

const data = taskboard.project.inlineData;

// use the data in your application

Setting data

// Get data from server manually
const data = await axios.get('/project?id=12345');

// Feed it to the project taskboard.project.inlineData = data;

See also loadInlineData

Getting modifications

const taskBoard = new TaskBoard({
    project : {
        // Project configuration
    }
});

Built-in StateTrackingManager

The project also has a built-in StateTrackingManager (STM for short), that handles undo/redo for the project stores (additional stores can also be added). You can enable it to track all project store changes:

// Turn on auto recording when you create your TaskBoard:
const taskBoard = new TaskBoard({
    project : {
        stm : {
            autoRecord : true
        }
    }
});

// Undo a transaction project.stm.undo();

// Redo project.stm.redo();
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class

Functions

Functions are methods available for calling on the class

    Source path

    TaskBoard/model/ProjectModel.js

    Contents