From da348fcc969e7565fff56b18a9a8cbf661687483 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 1 Oct 2017 22:07:15 +0300 Subject: [PATCH] Working on the time tracker --- app/Http/Controllers/TaskController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php index c15b711848..16dc60adad 100644 --- a/app/Http/Controllers/TaskController.php +++ b/app/Http/Controllers/TaskController.php @@ -232,12 +232,6 @@ class TaskController extends BaseController $task = $this->taskRepo->save($publicId, $request->input()); - if ($publicId) { - Session::flash('message', trans('texts.updated_task')); - } else { - Session::flash('message', trans('texts.created_task')); - } - if (in_array($action, ['invoice', 'add_to_invoice'])) { return self::bulk(); } @@ -246,6 +240,12 @@ class TaskController extends BaseController $task->time_log = json_decode($task->time_log); return $task->load(['client.contacts', 'project'])->toJson(); } else { + if ($publicId) { + Session::flash('message', trans('texts.updated_task')); + } else { + Session::flash('message', trans('texts.created_task')); + } + return Redirect::to("tasks/{$task->public_id}/edit"); } }