diff --git a/app/Http/Controllers/ComprasController.php b/app/Http/Controllers/ComprasController.php index 7cc60c3..5c7e3d1 100644 --- a/app/Http/Controllers/ComprasController.php +++ b/app/Http/Controllers/ComprasController.php @@ -6,7 +6,11 @@ use App\GrupoDeCompra; class ComprasController { - public function pedidos() { + public function indexPedidos() { + return view('compras_pedidos'); + } + + public function descargarPedidos() { GrupoDeCompra::exportarTodosLosPedidosEnCSV(); $file = resource_path('csv/exports/total-pedidos.csv'); return response()->download($file); diff --git a/resources/js/components/compras/Body.vue b/resources/js/components/compras/Body.vue new file mode 100644 index 0000000..6b0a468 --- /dev/null +++ b/resources/js/components/compras/Body.vue @@ -0,0 +1,22 @@ + + + + + + + + + + Descargar planilla de totales + + + + + + + + diff --git a/resources/views/compras_pedidos.blade.php b/resources/views/compras_pedidos.blade.php new file mode 100644 index 0000000..92cf9fe --- /dev/null +++ b/resources/views/compras_pedidos.blade.php @@ -0,0 +1,5 @@ +@extends('layouts.app') + +@section('content') + +@endsection diff --git a/routes/web.php b/routes/web.php index 6872466..c2b0ea0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -79,5 +79,6 @@ Route::middleware('auth')->group( function() { Route::get('/compras', 'ComprasController@show')->name('compras_login.show'); Route::middleware(['compras'])->group( function() { - Route::get('/compras/pedidos', 'ComprasController@pedidos')->name('compras.pedidos'); + Route::get('/compras/pedidos', 'ComprasController@indexPedidos')->name('compras.pedidos'); + Route::get('/compras/pedidos/descargar', 'ComprasController@descargarPedidos')->name('compras.pedidos.descargar'); });
+ + + + + Descargar planilla de totales + +