Options
All
  • Public
  • Public/Protected
  • All
Menu

Core resource model class.

tier

community

Hierarchy

Index

Properties

$project

The project instance, this entity belongs to.

project

The project instance, this entity belongs to.

Methods

calculateInvalidated

  • calculateInvalidated(): void
  • Hook called before project refresh, override and calculate required changes in subclasses

    Returns void

finalizeInvalidated

  • finalizeInvalidated(silent?: boolean): void
  • Called after project refresh, before dataReady. Announce updated data

    Parameters

    • Default value silent: boolean = false

    Returns void

getAssignmentById

getAssignmentStore

  • getAssignmentStore(): this["project"]["assignmentStore"]
  • Convenience method to get the instance of the assignment store in the project instance, this entity belongs to.

    Returns this["project"]["assignmentStore"]

getCalendarById

getCalendarManagerStore

  • getCalendarManagerStore(): this["project"]["calendarManagerStore"]
  • Convenience method to get the instance of the calendar manager store in the project instance, this entity belongs to.

    Returns this["project"]["calendarManagerStore"]

getCurrentOrProposed

  • getCurrentOrProposed(fieldName: string): any
  • Used to retrieve the proposed (before 'dataReady') or current (after 'dataReady') value for a field. If there is no proposed change, it is functionally equal to a normal record.get() call.

    Parameters

    • fieldName: string

    Returns any

getDependencyById

getDependencyStore

  • getDependencyStore(): this["project"]["dependencyStore"]
  • Convenience method to get the instance of the dependency store in the project instance, this entity belongs to.

    Returns this["project"]["dependencyStore"]

getEventById

getEventStore

  • getEventStore(): this["project"]["eventStore"]
  • Convenience method to get the instance of the event store in the project instance, this entity belongs to.

    Returns this["project"]["eventStore"]

getProject

  • getProject(): this["project"]

getResourceById

getResourceStore

  • getResourceStore(): this["project"]["resourceStore"]
  • Convenience method to get the instance of the resource store in the project instance, this entity belongs to.

    Returns this["project"]["resourceStore"]

hasCurrentOrProposed

  • hasCurrentOrProposed(fieldName: string): boolean
  • Determines if the specified field has a value or not, value can be either current or proposed.

    Parameters

    • fieldName: string

    Returns boolean

invalidate

  • invalidate(): void
  • Invalidates this record, queueing it for calculation on project commit.

    Returns void

joinProject

  • joinProject(): void
  • Template method, which is called when model is joining the project (through joining some store that has already joined the project)

    Returns void

leaveProject

  • leaveProject(isReplacing?: boolean): void
  • Template method, which is called when model is leaving the project (through leaving some store usually)

    Parameters

    • Default value isReplacing: boolean = false

    Returns void

propose

  • propose(changes: any): void
  • Propose changes, to be considered during calculation. Also invalidates the record.

    Parameters

    • changes: any

    Returns void

setChanged

  • setChanged(field: any, value: any, invalidate?: boolean, setData?: boolean): void
  • Similar to propose, but with more options. Mostly used by buckets, since they need data to update early.

    Parameters

    • field: any
    • value: any
    • Default value invalidate: boolean = true
    • Default value setData: boolean = false

    Returns void

setProject

  • setProject(project: this["project"]): this["project"]
  • The method to set the project instance, this entity belongs to.

    Parameters

    • project: this["project"]

    Returns this["project"]

Generated using TypeDoc