Options
All
  • Public
  • Public/Protected
  • All
Menu

Service that handles the logic of finishing a task.

Hierarchy

Index

Constructors

Properties

_callChain: CallChainService
_changedFieldsService: ChangedFieldsService
_eventQueue: EventQueueService
_eventService: EventService
_selectedCaseService: SelectedCaseService = null
_snackBar: SnackBarService
_taskContentService: TaskContentService
_taskDataService: TaskDataService
_taskEvent: TaskEventService
_taskOperations: TaskOperations
_taskResourceService: TaskResourceService
_translate: TranslateService

Accessors

  • get _safeTask(): Task

Methods

  • dataIsEmpty(): boolean
  • isTaskPresent(): boolean
  • isTaskRelevant(requestedTaskId: string): boolean
  • Sends the finish request to backend and notifies the user about the outcome of the operation via a snack bar message.

    Doesn't send any requests if the loading indicator is in it's active state. Otherwise sets the indicator to the active state and disables it once the request response is received.

    The argument can be used to chain operations together, or to execute code conditionally based on the success state of the finish request.

    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 finish request completes successfully true will be emitted into this Subject, otherwise false will be emitted

    Returns void

  • Updates the task data to their current state from backend, checks the validity of the data and sends a finish request to backend.

    Finish request is not sent if the task contains invalid data.

    If an update to the data is already in progress waits for it's successful completion and sends the finish request after.

    Parameters

    • afterAction: AfterAction = ...

      if finish request completes successfully true will be emitted into this Subject, otherwise false will be emitted

    Returns void

Generated using TypeDoc