Options
All
  • Public
  • Public/Protected
  • All
Menu

Handles the loading and updating of data fields and behaviour of a single Task object managed by a TaskContentService instance.

Hierarchy

Implements

  • OnDestroy

Index

Constructors

Properties

_afterActionFactory: CallChainService
_changedFieldsService: ChangedFieldsService
_dataReloadSubscription: Subscription
_eventQueue: EventQueueService
_eventService: EventService
_fieldConverterService: FieldConverterService
_frontActionService: FrontActionService
_selectedCaseService: SelectedCaseService = null
_snackBar: SnackBarService
_taskContentService: TaskContentService
_taskEvent: TaskEventService
_taskOperations: TaskOperations
_taskResourceService: TaskResourceService
_translate: TranslateService
_updateSuccess$: Subject<boolean>
_userComparator: UserComparatorService

Accessors

  • get _safeTask(): Task
  • get updateSuccess$(): Observable<boolean>

Methods

  • addFieldToSetDataRequestBody(context: TaskSetDataRequestContext, taskId: string, field: DataField<any>): void
  • compareBackendFormattedFieldValues(current: any, old: any): boolean
  • initializeTaskDataFields(afterAction?: AfterAction, force?: boolean): void
  • Loads the Data Fields of an uninitialized Task from backend and populates the Task managed by TaskContentService with the appropriate objects.

    Beware that if the Task has some data already loaded this function does nothing and only passes true to the afterAction argument.

    If the task held within the TaskContentService changes before a response is received, the response will be ignored and the afterAction will not be executed.

    Parameters

    • afterAction: AfterAction = ...

      if the request completes successfully emits true into the Subject, otherwise false will be emitted

    • force: boolean = false

      set to true if you need force reload of all task data

    Returns void

  • isAutocompleteEnumException(field: DataField<unknown>): boolean
  • isTaskPresent(): boolean
  • isTaskRelevant(requestedTaskId: string): boolean
  • ngOnDestroy(): void
  • performSetDataRequest(setTaskId: string, context: TaskSetDataRequestContext, afterAction: AfterAction, nextEvent: AfterAction): void
  • processErroneousGetDataRequest(gottenTaskId: string, error: Error | HttpErrorResponse, afterAction: AfterAction, nextEvent: AfterAction): void
  • processErroneousSetDataRequest(setTaskId: string, error: HttpErrorResponse, afterAction: AfterAction, nextEvent: AfterAction, context: TaskSetDataRequestContext): void
  • revertSetDataRequest(context: TaskSetDataRequestContext): void
  • revertToPreviousValue(context: TaskSetDataRequestContext): void
  • Collects all changed data fields and notifies the backend of the changes.

    If the request is successful clears the [changed]{@link DataField#changed} flag on all data fields that were a part of the request and emits a ChangedFields object into this object's [changedFields$]{@link TaskDataService#changedFields$} stream.

    If the task held within the TaskContentService changes before a response is received, the response will be ignored and the afterAction will not be executed.

    Parameters

    • afterAction: AfterAction = ...

      if the request completes successfully emits true into the Subject, otherwise false will be emitted

    Returns void

  • wasFieldUpdated(field: DataField<unknown>): boolean

Generated using TypeDoc