completeAction method

Future completeAction()

Implementation

Future completeAction() async {
  setBusy(true);
  await _causesService.completeAction(_action!.id).then((_) {
    setBusy(false);
    _navigationService.navigateTo(Routes.actions);
  }).onError((err, _) {
    setBusy(false);
    _dialogService.showDialog(
      BasicDialog(title: "Error", description: "Failed to complete action"),
    );
  });
}