Working on projects

This commit is contained in:
Hillel Coren 2017-12-25 12:39:00 +02:00
parent 565df2fe98
commit 56dc889879
3 changed files with 5 additions and 4 deletions

View File

@ -39,7 +39,7 @@ class BaseController extends Controller
if ($action == 'restore' && count($ids) == 1) { if ($action == 'restore' && count($ids) == 1) {
return redirect("{$entityTypes}/" . $ids[0]); return redirect("{$entityTypes}/" . $ids[0]);
// when viewing from a datatable list // when viewing from a datatable list
} elseif (strpos($referer, '/clients/')) { } elseif (strpos($referer, '/clients/') || strpos($referer, '/projects/')) {
return redirect($referer); return redirect($referer);
} elseif ($isDatatable || ($action == 'archive' || $action == 'delete')) { } elseif ($isDatatable || ($action == 'archive' || $action == 'delete')) {
return redirect("{$entityTypes}"); return redirect("{$entityTypes}");

View File

@ -263,7 +263,8 @@ class TaskController extends BaseController
if (in_array($action, ['resume', 'stop'])) { if (in_array($action, ['resume', 'stop'])) {
$this->taskRepo->save($ids, ['action' => $action]); $this->taskRepo->save($ids, ['action' => $action]);
return Redirect::to('tasks')->withMessage(trans($action == 'stop' ? 'texts.stopped_task' : 'texts.resumed_task')); Session::flash('message', trans($action == 'stop' ? 'texts.stopped_task' : 'texts.resumed_task'));
return $this->returnBulk($this->entityType, $action, $ids);
} elseif ($action == 'invoice' || $action == 'add_to_invoice') { } elseif ($action == 'invoice' || $action == 'add_to_invoice') {
$tasks = Task::scope($ids)->with('account', 'client', 'project')->orderBy('project_id', 'id')->get(); $tasks = Task::scope($ids)->with('account', 'client', 'project')->orderBy('project_id', 'id')->get();
$clientPublicId = false; $clientPublicId = false;

View File

@ -81,11 +81,11 @@
<table class="table" style="width:100%"> <table class="table" style="width:100%">
<tr> <tr>
<td><small>{{ trans('texts.tasks') }}</small></td> <td><small>{{ trans('texts.tasks') }}</small></td>
<td style="text-align: right">3</td> <td style="text-align: right">{{ $chartData->count }}</td>
</tr> </tr>
<tr> <tr>
<td><small>{{ trans('texts.duration') }}</small></td> <td><small>{{ trans('texts.duration') }}</small></td>
<td style="text-align: right">04:15:00</td> <td style="text-align: right">{{ Utils::formatTime($chartData->duration) }}</td>
</tr> </tr>
</table> </table>
</h3> </h3>