phpvms/resources/views/admin/subfleets/ranks.blade.php

75 lines
2.9 KiB
PHP
Raw Normal View History

<div id="subfleet_ranks_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div class="header">
<h3>ranks</h3>
2018-02-23 04:21:00 +08:00
@component('admin.components.info')
These ranks are allowed to fly aircraft in this subfleet. The pay can be
set as a fixed amount, or a percentage of the rank's base payrate
2018-02-23 04:21:00 +08:00
@endcomponent
</div>
<br />
2018-02-27 09:23:22 +08:00
<table id="subfleet_ranks" class="table table-hover">
@if(count($subfleet->ranks))
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Base rate</th>
<th style="text-align: center;">ACARS pay</th>
<th style="text-align: center;">Manual pay</th>
<th></th>
</tr>
</thead>
2018-02-27 09:23:22 +08:00
@endif
<tbody>
@foreach($subfleet->ranks as $rank)
<tr>
<td class="sorting_1">{!! $rank->name !!}</td>
<td style="text-align: center;">{!! $rank->base_pay_rate ?: '-' !!}</td>
<td style="text-align: center;">
<a href="#" data-pk="{!! $rank->id !!}"
data-name="acars_pay">{!! $rank->pivot->acars_pay !!}</a>
</td>
<td style="text-align: center;">
<a href="#" data-pk="{!! $rank->id !!}"
data-name="manual_pay">{!! $rank->pivot->manual_pay !!}</a>
</td>
<td style="text-align: right; width:3%;">
{!! Form::open(['url' => '/admin/subfleets/'.$subfleet->id.'/ranks',
'method' => 'delete',
'class' => 'modify_rank'])
!!}
{!! Form::hidden('rank_id', $rank->id) !!}
{!! Form::button('<i class="fa fa-times"></i>',
['type' => 'submit',
'class' => 'btn btn-sm btn-danger btn-icon']) !!}
{!! Form::close() !!}
</td>
</tr>
@endforeach
</tbody>
</table>
<hr />
<div class="row">
<div class="col-xs-12">
<div class="text-right">
{!! Form::open(['url' => '/admin/subfleets/'.$subfleet->id.'/ranks',
'method' => 'post',
'class' => 'modify_rank form-inline'])
!!}
{!! Form::select('rank_id', $avail_ranks, null, [
'placeholder' => 'Select Rank',
'class' => 'ac-fare-dropdown form-control input-lg select2',
])
!!}
{!! Form::button('<i class="glyphicon glyphicon-plus"></i> add',
['type' => 'submit',
'class' => 'btn btn-success btn-s']) !!}
{!! Form::close() !!}
</div>
</div>
</div>
</div>
{{--</div></div>--}}