AssignmentStore
A store representing a collection of assignments between events in the EventStore and resources in the ResourceStore.
This store only accepts a model class inheriting from AssignmentModel.
An AssignmentStore is usually connected to a project, which binds it to other related stores (EventStore, ResourceStore and DependencyStore). The project also handles references (event, resource) to related records for the records in the store.
Resolving the references happens async, records are not guaranteed to have up to date references until calculations are finished. To be certain that references are resolved, call await project.commitAsync() after store actions. Or use one of the xxAsync functions, such as loadDataAsync().
Using commitAsync():
assignmentStore.data = [{ eventId, resourceId }, ...];
// references (event, resource) not resolved yet
await assignmentStore.project.commitAsync();
// now they are
Using loadDataAsync():
await assignmentStore.loadDataAsync([{ eventId, resourceId }, ...]);
// references (event, resource) are resolved
See also
- AssignmentModel - Assignment data model
- EventStore - Event store
- ResourceStore - Resource store
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of AssignmentStore class, or subclass thereof.
-
Identifies an object as an instance of AssignmentStore class, or subclass thereof.