Browse Source

Remove project value for worker on project index page

Fixed invalid back_to_index link query string on project
detail page.
pull/6/head
Nafies Luthfi 8 years ago
parent
commit
ec03c84d55
  1. 2
      app/Http/Controllers/Projects/ProjectsController.php
  2. 4
      resources/views/projects/index.blade.php
  3. 2
      resources/views/projects/show.blade.php

2
app/Http/Controllers/Projects/ProjectsController.php

@ -26,7 +26,7 @@ class ProjectsController extends Controller
public function index(Request $request)
{
$status = null;
$statusId = $request->get('status_id', 2);
$statusId = $request->get('status_id');
if ($statusId) {
$status = $this->repo->getStatusName($statusId);
}

4
resources/views/projects/index.blade.php

@ -25,7 +25,9 @@
<th>{{ trans('project.name') }}</th>
<th class="text-center">{{ trans('project.start_date') }}</th>
<th class="text-center">{{ trans('project.work_duration') }}</th>
@can('see-pricings', new App\Entities\Projects\Project)
<th class="text-right">{{ trans('project.project_value') }}</th>
@endcan
<th class="text-center">{{ trans('app.status') }}</th>
<th>{{ trans('project.customer') }}</th>
<th>{{ trans('app.action') }}</th>
@ -37,7 +39,9 @@
<td>{{ $project->nameLink() }}</td>
<td class="text-center">{{ $project->start_date }}</td>
<td class="text-right">{{ $project->present()->workDuration }}</td>
@can('see-pricings', new App\Entities\Projects\Project)
<td class="text-right">{{ formatRp($project->project_value) }}</td>
@endcan
<td class="text-center">{{ $project->present()->status }}</td>
<td>{{ $project->customer->name }}</td>
<td>

2
resources/views/projects/show.blade.php

@ -4,7 +4,7 @@
@can('update', $project)
{!! link_to_route('projects.edit', trans('project.edit'), [$project->id], ['class' => 'btn btn-warning']) !!}
@endcan
{!! link_to_route('projects.index', trans('project.back_to_index'), ['status' => $project->status_id], ['class' => 'btn btn-default']) !!}
{!! link_to_route('projects.index', trans('project.back_to_index'), ['status_id' => $project->status_id], ['class' => 'btn btn-default']) !!}
@endsection
@section('content-project')

Loading…
Cancel
Save