2018-02-27 05:16:12 +08:00
|
|
|
<table class="table table-hover table-responsive" id="expenses-table">
|
|
|
|
<thead>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th style="text-align: center;">Amount</th>
|
|
|
|
<th>Airline</th>
|
|
|
|
<th class="text-center">Active</th>
|
|
|
|
<th></th>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($expenses as $expense)
|
|
|
|
<tr>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td><a href="{{ route('admin.expenses.edit', [$expense->id]) }}">
|
|
|
|
{{ $expense->name }}</a>
|
2018-02-27 05:16:12 +08:00
|
|
|
</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</td>
|
|
|
|
<td style="text-align: center;">{{ $expense->amount }}</td>
|
2018-02-27 05:16:12 +08:00
|
|
|
<td>
|
|
|
|
@if(filled($expense->airline))
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ $expense->airline->name }}
|
2018-02-27 05:16:12 +08:00
|
|
|
@else
|
|
|
|
<span class="description">-</span>
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td class="text-center">
|
2018-03-13 06:58:12 +08:00
|
|
|
<span class="label label-{{ $expense->active?'success':'default' }}">
|
|
|
|
{{ \App\Models\Enums\ActiveState::label($expense->active) }}
|
2018-02-27 05:16:12 +08:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::open(['route' => ['admin.expenses.destroy', $expense->id], 'method' => 'delete']) }}
|
|
|
|
<a href="{{ route('admin.expenses.edit', [$expense->id]) }}"
|
2018-02-27 05:16:12 +08:00
|
|
|
class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a>
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
|
|
|
{{ Form::close() }}
|
2018-02-27 05:16:12 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|