Implement PIREP deletion #1014 (#1055)

* Implement PIREP deletion #1014

* Style fixes

* Add delete button to PIREP listing page

* Remove extra import
This commit is contained in:
Nabeel S
2021-03-02 15:43:34 -05:00
committed by GitHub
parent e22d6d5996
commit 936cd2efd3
16 changed files with 142 additions and 29 deletions

View File

@@ -23,11 +23,19 @@
'pirep_id' => $pirep->id,
'new_status' => PirepState::REJECTED,
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-danger']) }}
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-warning']) }}
{{ Form::close() }}
@endif
</td>
<td>&nbsp;</td>
<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>
@if ($on_edit_page === false)
<td>
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">