A reference to the graph, this entity belongs to. Initially empty, and is populated when the entity instance is added to the replica (Replica.addEntity)
Maximum range the project calendars can iterate.
The value is defined in milliseconds and by default equals 5 years
roughly.
The Replica instance containing all data for this project.
An object, which properties corresponds to the ChronoGraph Identifiers, created for every field.
For example:
class Author extends Entity.mix(Base) {
@field()
firstName : string
@field()
lastName : string
}
const author = Author.new()
// identifier for the field `firstName`
author.$.firstName
const firstName = replica.read(author.$.firstName)
A graph identifier, that represents the whole entity.
An EntityMeta instance, representing the "meta" information about the entity class. It is shared among all instances of the class.
An EntityMeta instance, representing the "meta" information about the entity class. It is shared among all instances of the class.
This is a convenience method, that just delegates to the ChronoGraph.commit method of this entity's graph.
If there's no graph (entity has not been added to any replica) a CommitZero constant will be returned.
This is a convenience method, that just delegates to the ChronoGraph.commitAsync method of this entity's graph.
If there's no graph (entity has not been added to any replica) a resolved promise with CommitZero constant will be returned.
This method is called when entity is added to some replica.
This method is called when entity is removed from the replica it's been added to.
Overrides the project owned store identifiers calculation.
Object providing new identifier calculation function names.
The object is grouped by store identifiers. For example below code
overrides event startDate
, endDate
and duration
calculation so
the fields will always simply return their current values:
// event startDate, endDate and duration will use their userProvidedValue method
// which simply returns their current values as-is
const oldCalculations = await project.setCalculations({
events : {
startDate : "userProvidedValue",
endDate : "userProvidedValue",
duration : "userProvidedValue"
}
})
Promise that resolves with an object having the overridden calculations. The object can be used to toggle the calculations back in the future:
// override event duration calculation
const oldCalculations = await project.setCalculations({
events : {
duration : "userProvidedValue"
}
})
// revert the duration calculation back
project.setCalculations(oldCalculations)
Calculation function that simply returns current (proposed or previous) value of an identifier.
Generated using TypeDoc
This is an abstract project, which just lists the available stores.
The actual project classes are SchedulerBasicProjectMixin, SchedulerProProjectMixin, GanttProjectMixin.