Notifications by SweetAlert2 (#1508)

This commit is contained in:
Kevin Papst
2020-10-02 19:37:30 +02:00
committed by GitHub
parent 0aa6baea2f
commit 825e492891
21 changed files with 161 additions and 62 deletions

View File

@@ -170,7 +170,7 @@ final class ActivityController extends AbstractController
return $this->redirectToRoute('activity_details', ['id' => $activity->getId()]);
} catch (Exception $ex) {
$this->flashError('action.update.error', ['%reason%' => $ex->getMessage()]);
$this->flashUpdateException($ex);
}
}
@@ -215,7 +215,7 @@ final class ActivityController extends AbstractController
return $this->redirectToRoute('admin_activity');
} catch (Exception $ex) {
$this->flashError('action.update.error', ['%reason%' => $ex->getMessage()]);
$this->flashUpdateException($ex);
}
}
@@ -246,7 +246,7 @@ final class ActivityController extends AbstractController
try {
$teamRepository->saveTeam($defaultTeam);
} catch (Exception $ex) {
$this->flashError('action.update.error', ['%reason%' => $ex->getMessage()]);
$this->flashUpdateException($ex);
}
return $this->redirectToRoute('activity_details', ['id' => $activity->getId()]);
@@ -298,7 +298,7 @@ final class ActivityController extends AbstractController
$this->repository->deleteActivity($activity, $deleteForm->get('activity')->getData());
$this->flashSuccess('action.delete.success');
} catch (Exception $ex) {
$this->flashError('action.delete.error', ['%reason%' => $ex->getMessage()]);
$this->flashDeleteException($ex);
}
return $this->redirectToRoute('admin_activity');
@@ -370,7 +370,7 @@ final class ActivityController extends AbstractController
return $this->redirectToRoute('admin_activity');
}
} catch (Exception $ex) {
$this->flashError('action.update.error', ['%reason%' => $ex->getMessage()]);
$this->flashUpdateException($ex);
}
}