Browse Source

Prevent worker to see job pricings

pull/6/head
Nafies Luthfi 8 years ago
parent
commit
90371bb14b
  1. 2
      resources/views/jobs/partials/job-show.blade.php
  2. 4
      resources/views/jobs/unfinished.blade.php
  3. 2
      resources/views/layouts/partials/sidebar.blade.php

2
resources/views/jobs/partials/job-show.blade.php

@ -4,7 +4,9 @@
<tbody>
<tr><th class="col-md-4">{{ trans('job.name') }}</th><td class="col-md-8">{{ $job->name }}</td></tr>
<tr><th>{{ trans('job.type') }}</th><td>{{ $job->type() }}</td></tr>
@can('see-pricings', $job->project)
<tr><th>{{ trans('job.price') }}</th><td>{{ formatRp($job->price) }}</td></tr>
@endcan
<tr><th>{{ trans('job.progress') }}</th><td>{{ formatDecimal($job->tasks->avg('progress')) }}%</td></tr>
<tr><th>{{ trans('job.worker') }}</th><td>{{ $job->worker->name }}</td></tr>
<tr><th>{{ trans('job.description') }}</th><td>{!! nl2br($job->description) !!}</td></tr>

4
resources/views/jobs/unfinished.blade.php

@ -13,7 +13,9 @@
<th>{{ trans('job.name') }}</th>
<th class="text-center">{{ trans('job.tasks_count') }}</th>
<th class="text-center">{{ trans('job.progress') }}</th>
@if(auth()->user()->hasRole('admin'))
<th class="text-right">{{ trans('job.price') }}</th>
@endauth
<th>{{ trans('job.worker') }}</th>
<th>{{ trans('app.action') }}</th>
</thead>
@ -37,7 +39,9 @@
</td>
<td class="text-center">{{ $job->tasks_count = $job->tasks->count() }}</td>
<td class="text-center">{{ formatDecimal($job->progress) }} %</td>
@if(auth()->user()->hasRole('admin'))
<td class="text-right">{{ formatRp($job->price) }}</td>
@endif
<td>{{ $job->worker->name }}</td>
<td>
{!! link_to_route('jobs.show', trans('app.show'),[$job->id],['class' => 'btn btn-info btn-xs']) !!}

2
resources/views/layouts/partials/sidebar.blade.php

@ -16,12 +16,12 @@
@include('layouts.partials.lang-switcher')
<ul class="nav" id="side-menu">
<li>{!! html_link_to_route('home', trans('nav_menu.dashboard'), [], ['icon' => 'dashboard']) !!}</li>
@can('manage_agency')
<li>{!! html_link_to_route('jobs.index', trans('job.on_progress').' <span class="badge pull-right">'.AdminDashboard::onProgressJobCount(auth()->user()).'</span>', [], ['icon' => 'tasks']) !!}</li>
<li>
{!! html_link_to_route('projects.index', trans('project.projects') . ' <span class="fa arrow"></span>', [], ['icon' => 'table']) !!}
@include('view-components.sidebar-project-list-links')
</li>
@can('manage_agency')
<li>{!! html_link_to_route('reports.payments.yearly', trans('dashboard.yearly_earnings'), [], ['icon' => 'line-chart']) !!}</li>
<li>{!! html_link_to_route('reports.current-credits', trans('dashboard.receiveable_earnings'), [], ['icon' => 'money']) !!}</li>
<li>{!! html_link_to_route('users.calendar', trans('nav_menu.calendar'), [], ['icon' => 'calendar']) !!}</li>

Loading…
Cancel
Save