2018-01-04 10:39:24 +08:00
|
|
|
<table class="">
|
2020-02-09 02:29:34 +08:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
|
|
|
|
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
|
|
|
'method' => 'post',
|
|
|
|
'name' => 'accept_'.$pirep->id,
|
|
|
|
'id' => $pirep->id.'_accept',
|
|
|
|
'pirep_id' => $pirep->id,
|
|
|
|
'new_status' => PirepState::ACCEPTED,
|
|
|
|
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
|
|
|
{{ Form::button('Accept', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
|
|
|
{{ Form::close() }}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td> </td>
|
|
|
|
<td>
|
|
|
|
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
|
|
|
|
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
|
|
|
'method' => 'post',
|
|
|
|
'name' => 'reject_'.$pirep->id,
|
|
|
|
'id' => $pirep->id.'_reject',
|
|
|
|
'pirep_id' => $pirep->id,
|
|
|
|
'new_status' => PirepState::REJECTED,
|
|
|
|
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
2021-03-03 04:43:34 +08:00
|
|
|
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-warning']) }}
|
2020-02-09 02:29:34 +08:00
|
|
|
{{ Form::close() }}
|
|
|
|
@endif
|
|
|
|
</td>
|
2021-03-03 04:43:34 +08:00
|
|
|
<td>
|
|
|
|
{{ Form::open(['url' => route('admin.pireps.destroy', [$pirep->id]),
|
|
|
|
'method' => 'delete',
|
|
|
|
'name' => 'delete_'.$pirep->id,
|
|
|
|
'id' => $pirep->id.'_delete'
|
|
|
|
]) }}
|
|
|
|
{{ Form::button('Delete', ['type' => 'submit', 'class' => 'btn btn-danger']) }}
|
|
|
|
{{ Form::close() }}
|
|
|
|
</td>
|
2020-02-09 02:29:34 +08:00
|
|
|
@if ($on_edit_page === false)
|
|
|
|
<td>
|
|
|
|
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">
|
|
|
|
<button type="submit"
|
|
|
|
class='btn btn-info'>
|
|
|
|
<i class="fas fa-pencil-alt"></i> Edit
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
@endif
|
|
|
|
</tr>
|
2018-01-04 10:39:24 +08:00
|
|
|
</table>
|