From cea9baa8388be479fdd53b2272b53d5765f965ba Mon Sep 17 00:00:00 2001 From: FlavioBarachino Date: Wed, 18 Oct 2023 13:39:31 +0200 Subject: [PATCH] Aggiunto documenti generici --- app/Http/Controllers/DocumentiController.php | 2 +- config/adminlte.php | 42 +++++++++++++------- resources/views/documenti/lista.blade.php | 31 ++++++++++----- routes/admin.php | 14 +++++-- 4 files changed, 61 insertions(+), 28 deletions(-) diff --git a/app/Http/Controllers/DocumentiController.php b/app/Http/Controllers/DocumentiController.php index e6b6d3b..6748ade 100644 --- a/app/Http/Controllers/DocumentiController.php +++ b/app/Http/Controllers/DocumentiController.php @@ -46,4 +46,4 @@ class DocumentiController extends Controller { return view('documenti.lista',['data'=>Documenti::all()]); } -} +} \ No newline at end of file diff --git a/config/adminlte.php b/config/adminlte.php index eb270fc..1661cdb 100644 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -309,13 +309,13 @@ return [ [ 'text' => 'Dashboard', 'url' => '/admin', - 'can' => 'manage-blog', + // 'can' => 'manage-blog', ], [ 'text' => 'Gestione Economica', 'url' => '#', 'icon' => 'fas fa-fw fa-money-bill', // - + 'can' => ['conti'], 'submenu' => [ [ 'text' => 'Lista movimenti', @@ -376,33 +376,40 @@ return [ ], ], ], - ['header' => 'GESTIONE BENI'], + ['header' => 'GESTIONE DOCUMENTALE'], + [ + 'text' => 'Documenti gen.', + 'url' => '/admin/documenti', + 'icon' => 'fas fa-fw fa-newspaper', + 'can' => ['documenti'], + ], [ 'text' => 'Contratti', 'route' => 'contratti', 'icon' => 'fas fa-fw fa-newspaper', - 'can' => 'contratti', - ], - [ - 'text' => 'Automobili', - 'url' => '/admin/auto', - 'icon' => 'fas fa-fw fa-car', + 'can' => ['contratti'], ], [ 'text' => 'Progetti', 'route' => 'progetti', 'icon' => 'fas fa-fw fa-diagram-project', + 'can' => ['progetti'], ], + ['header' => 'GESTIONE BENI'], + [ - 'text' => 'Attività', - 'route' => 'tasks', - 'icon' => 'fas fa-fw fa-circle-check', + 'text' => 'Automobili', + 'url' => '/admin/auto', + 'icon' => 'fas fa-fw fa-car', + 'can' => ['automobili'], ], + ['header' => 'GESTIONE PIM'], [ 'text' => 'Contatti', 'url' => '/admin/contatti', 'icon' => 'fas fa-fw fa-user', + 'can' => ['contatti'], 'submenu' => [ [ 'text' => 'Nuovo Contatto', @@ -416,17 +423,24 @@ return [ ], ], ], + [ + 'text' => 'Attività', + 'route' => 'tasks', + 'icon' => 'fas fa-fw fa-circle-check', + 'can' => ['tasks'], + ], [ 'text' => 'Appuntamenti', 'route' => 'calendario', 'icon' => 'fas fa-fw fa-calendar', + // 'can' => 'appuntamenti', ], ['header' => 'CONSUMI'], [ 'text' => 'GAS', 'route' => 'gas', 'icon' => 'fas fa-fw fa-fire', - 'can' => ['consumi'] + 'can' => ['consumi'], ], ['header' => 'AMMINISTRAZIONE'], [ @@ -440,7 +454,7 @@ return [ 'text' => 'Meeting Room', 'route' => 'meeting', 'icon' => 'fas fa-fw fa-file-video', - // 'can' => ['amministrazione'] + 'can' => ['meetingroom'] ], ], diff --git a/resources/views/documenti/lista.blade.php b/resources/views/documenti/lista.blade.php index fd597af..421b45a 100644 --- a/resources/views/documenti/lista.blade.php +++ b/resources/views/documenti/lista.blade.php @@ -1,21 +1,34 @@ -@extends('admin') +@extends('adminlte::page') + +@section('content_header') +

Lista delle Cartelle

+ @section('content') -
-
-

Lista dei Documenti

-
-
- Lista documenti + Lista cartelle
- + + + + + + + + + @foreach($data as $dato) + + + + @endforeach + +
Nome Cartella
{{$dato->descrizione}}
diff --git a/routes/admin.php b/routes/admin.php index 8985c43..f5c6f85 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -176,6 +176,13 @@ Route::group(['middleware'=>['permission:avvisi']], function(){ }); // -- ONLY FOR TEST -- TO BE REMOVED // +// DOCUMENTI GENERICI +Route::group(['middleware'=>['permission:documenti']], function(){ + Route::get('documenti', [DocumentiController::class, 'listaDocumenti']); + Route::post('documenti', [DocumentiController::class, 'storeFile']); + +}); + /// TEST ROUTES Route::get('test/fullcalendar', [FullCalenderController::class, 'index']); Route::post('test/fullcalendar', [FullCalenderController::class, 'ajax']); @@ -189,7 +196,6 @@ Route::group(['middleware'=>['permission:avvisi']], function(){ $name='Flavio'; Mail::to('flavio.barachino@lavorain.cloud')->send(new myTestEmail($name)); }); - - Route::get('meeting', function() { - return view('meetings.meeting'); - })->name('meeting'); +Route::group(['middleware'=>['permission:meetingroom']], function(){ + Route::get('meeting', function() { return view('meetings.meeting'); })->name('meeting'); +}); \ No newline at end of file