add Download All Button, change route analogue to activity report

This commit is contained in:
Dampfklon 2021-07-17 00:15:33 +02:00
parent 9a9ca59544
commit 12ee06deb6
3 changed files with 15 additions and 8 deletions

View file

@ -991,13 +991,13 @@ class ReportsController extends Controller
}
/**
* exportAssetAcceptanceReport
* Exports the AssetAcceptance report to CSV
*
* @return \Illuminate\Http\Response
* @author Vincent Sposato <vincent.sposato@gmail.com>
* @version v1.0
*/
public function exportAssetAcceptanceReport()
public function postAssetAcceptanceReport()
{
$this->authorize('reports.view');

View file

@ -8,6 +8,13 @@
@parent
@stop
@section('header_right')
{{ Form::open(['method' => 'post', 'class' => 'form-horizontal']) }}
{{csrf_field()}}
<button type="submit" class="btn btn-default"><i class="fa fa-download icon-white" aria-hidden="true"></i> {{ trans('general.download_all') }}</button>
{{ Form::close() }}
@stop
{{-- Page content --}}
@section('content')

View file

@ -324,14 +324,14 @@ Route::group(['middleware' => ['auth']], function () {
)->name('reports/unaccepted_assets');
Route::get(
'reports/unaccepted_assets/{acceptanceId}/sent_reminder',
[ 'as' => 'reports/unaccepted_assets_sent_reminder', 'uses' => 'ReportsController@sentAssetAcceptanceReminder' ]
);
[ReportsController::class, 'sentAssetAcceptanceReminder']
)->name('reports/unaccepted_assets_sent_reminder');
Route::delete(
'reports/unaccepted_assets/{acceptanceId}/delete',
[ 'as' => 'reports/unaccepted_assets_delete', 'uses' => 'ReportsController@deleteAssetAcceptance' ]
);
Route::get(
'reports/export/unaccepted_assets',
[ReportsController::class, 'deleteAssetAcceptance']
)->name('reports/unaccepted_assets_delete');
Route::post(
'reports/unaccepted_assets',
[ReportsController::class, 'exportAssetAcceptanceReport']
)->name('reports/export/unaccepted_assets');
});