attivato pagina dei permessi e rivisto menu
This commit is contained in:
parent
a819ef01ff
commit
e4b3ab0a3c
@ -376,7 +376,9 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
['header' => 'GESTIONE DOCUMENTALE'],
|
['header' => 'GESTIONE DOCUMENTALE',
|
||||||
|
'can' => ['documenti','contratti','progetti'],
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'text' => 'Documenti gen.',
|
'text' => 'Documenti gen.',
|
||||||
'url' => '/admin/documenti',
|
'url' => '/admin/documenti',
|
||||||
@ -396,7 +398,8 @@ return [
|
|||||||
'icon' => 'fas fa-fw fa-diagram-project',
|
'icon' => 'fas fa-fw fa-diagram-project',
|
||||||
'can' => ['progetti'],
|
'can' => ['progetti'],
|
||||||
],
|
],
|
||||||
['header' => 'GESTIONE BENI'],
|
['header' => 'GESTIONE BENI',
|
||||||
|
'can' => ['automobili'],],
|
||||||
|
|
||||||
[
|
[
|
||||||
'text' => 'Automobili',
|
'text' => 'Automobili',
|
||||||
@ -405,7 +408,9 @@ return [
|
|||||||
'can' => ['automobili'],
|
'can' => ['automobili'],
|
||||||
],
|
],
|
||||||
|
|
||||||
['header' => 'GESTIONE PIM'],
|
['header' => 'GESTIONE PIM',
|
||||||
|
'can' => ['contatti','tasks','appuntamenti','meetingroom'],
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'text' => 'Contatti',
|
'text' => 'Contatti',
|
||||||
'url' => '/admin/contatti',
|
'url' => '/admin/contatti',
|
||||||
@ -442,21 +447,30 @@ return [
|
|||||||
'icon' => 'fas fa-fw fa-file-video',
|
'icon' => 'fas fa-fw fa-file-video',
|
||||||
'can' => ['meetingroom']
|
'can' => ['meetingroom']
|
||||||
],
|
],
|
||||||
['header' => 'CONSUMI'],
|
['header' => 'CONSUMI',
|
||||||
|
'can' => ['consumi'],
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'text' => 'GAS',
|
'text' => 'GAS',
|
||||||
'route' => 'gas',
|
'route' => 'gas',
|
||||||
'icon' => 'fas fa-fw fa-fire',
|
'icon' => 'fas fa-fw fa-fire',
|
||||||
'can' => ['consumi'],
|
'can' => ['consumi'],
|
||||||
],
|
],
|
||||||
['header' => 'AMMINISTRAZIONE'],
|
['header' => 'AMMINISTRAZIONE',
|
||||||
|
'can' => ['amministrazione'],
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'text' => 'Utenti',
|
'text' => 'Utenti',
|
||||||
'url' => '/admin/users/new',
|
'url' => '/admin/users/new',
|
||||||
'icon' => 'fas fa-fw fa-user',
|
'icon' => 'fas fa-fw fa-user',
|
||||||
'can' => ['amministrazione']
|
'can' => ['amministrazione']
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'text' => 'Permessi',
|
||||||
|
'route' => 'permessi',
|
||||||
|
'icon' => 'fas fa-fw fa-solid fa-unlock-keyhole',
|
||||||
|
'can' => ['amministrazione']
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
@extends('admin')
|
@extends('adminlte::page')
|
||||||
|
|
||||||
|
@section('content_header')
|
||||||
|
<h1>Assegnazione permessi</h1>
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<h1 class="page-header">Assegnazione permessi</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@ -20,24 +20,27 @@
|
|||||||
<option value="{{$user->id}}"> {{$user->name}}</option>
|
<option value="{{$user->id}}"> {{$user->name}}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
<table>
|
<table width="100%" class="table table-striped table-bordered table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Permesso</th>
|
<th>Permesso</th>
|
||||||
<th>Azione</th>
|
<th colspan="2">Azione</th>
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($permissions as $perm)
|
@foreach($permissions as $perm)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$perm->name}}</td>
|
<td>{{$perm->name}}</td>
|
||||||
<td>
|
<td>
|
||||||
Attiva<input type="radio" name="permesso['{{$perm->name}}']" value="true">
|
<input type="radio" class="form-check-input" name="permesso['{{$perm->name}}']" value="true">
|
||||||
|
<label class="form-check-label">Attiva</label>
|
||||||
Disattiva <input type="radio" name="permesso['{{$perm->name}}']" value="false">
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="radio" class="form-check-input" name="permesso['{{$perm->name}}']" value="false" checked>
|
||||||
|
<label class="form-check-label">Disattiva</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
@csrf
|
@csrf
|
||||||
<input type="Submit" name="submit" value="associa">
|
<input type="Submit" name="submit" class="form-control" value="associa">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -132,7 +132,7 @@ Route::group(['middleware'=>['permission:amministrazione']], function(){
|
|||||||
Route::post('users/new',[Utenti::class,'createUser']);
|
Route::post('users/new',[Utenti::class,'createUser']);
|
||||||
Route::get('users/roles',[Utenti::class,'listRoles']);
|
Route::get('users/roles',[Utenti::class,'listRoles']);
|
||||||
Route::get('users/delete/{id}',[Utenti::class,'deleteUser']);
|
Route::get('users/delete/{id}',[Utenti::class,'deleteUser']);
|
||||||
Route::get('users/givepermission',[Utenti::class,'givePermissionToUser']);
|
Route::get('users/givepermission',[Utenti::class,'givePermissionToUser'])->name('permessi');
|
||||||
Route::post('users/givepermission',[Utenti::class,'assignPermission']);
|
Route::post('users/givepermission',[Utenti::class,'assignPermission']);
|
||||||
Route::get('users/giverole',[Utenti::class,'giveRoleToUser']);
|
Route::get('users/giverole',[Utenti::class,'giveRoleToUser']);
|
||||||
Route::post('users/giverole',[Utenti::class,'assignRole']);
|
Route::post('users/giverole',[Utenti::class,'assignRole']);
|
||||||
|
Loading…
Reference in New Issue
Block a user