ProjectConsumer
Configs
2
Configs
2Configure as true to destroy the Project and stores when this is destroyed.
A ProjectModel instance or a config object. The project holds all Scheduler data. Can be omitted in favor of individual store configs or crudManager config.
Note: In SchedulerPro the project is instance of SchedulerPro.model.ProjectModel class.
Properties
4
Properties
4Class hierarchy
Data
A ProjectModel instance or a config object. The project holds all Scheduler data. Can be omitted in favor of individual store configs or crudManager config.
Note: In SchedulerPro the project is instance of SchedulerPro.model.ProjectModel class.
Misc
Returns true if engine is in a stable calculated state, false otherwise.
Functions
2
Functions
2Implement in subclass to take action when project is replaced.
super.updateProject(...arguments) must be called first.
| Parameter | Type | Description |
|---|---|---|
project | ProjectModel |
Accepts a callback that will be called when the underlying project is ready (no commit pending and current commit finalized)
| Parameter | Type | Description |
|---|---|---|
callback | function |
Events
1
Events
1Fired when data in any of the projects stores changes.
Basically a relayed version of each store's own change event, decorated with which store it originates from. See the store change event documentation for more information.
// Adding a listener using the "on" method
projectConsumer.on('dataChange', ({ source, project, store, action, record, records, changes }) => {
});| Parameter | Type | Description |
|---|---|---|
source | ProjectConsumer | Owning component |
project | ProjectModelMixin | Project model |
store | Store | Affected store |
action | remove | removeAll | add | clearchanges | filter | update | dataset | replace | Name of action which triggered the change. May be one of:
|
record | Model | Changed record, for actions that affects exactly one record ( |
records | Model[] | Changed records, passed for all actions except |
changes | Object | Passed for the |
Event handlers
1
Event handlers
1Called when data in any of the projects stores changes.
Basically a relayed version of each store's own change event, decorated with which store it originates from. See the store change event documentation for more information.
new ProjectConsumer({
onDataChange({ source, project, store, action, record, records, changes }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | ProjectConsumer | Owning component |
project | ProjectModelMixin | Project model |
store | Store | Affected store |
action | remove | removeAll | add | clearchanges | filter | update | dataset | replace | Name of action which triggered the change. May be one of:
|
record | Model | Changed record, for actions that affects exactly one record ( |
records | Model[] | Changed records, passed for all actions except |
changes | Object | Passed for the |