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.',
|
||||
'url' => '/admin/documenti',
|
||||
@ -396,7 +398,8 @@ return [
|
||||
'icon' => 'fas fa-fw fa-diagram-project',
|
||||
'can' => ['progetti'],
|
||||
],
|
||||
['header' => 'GESTIONE BENI'],
|
||||
['header' => 'GESTIONE BENI',
|
||||
'can' => ['automobili'],],
|
||||
|
||||
[
|
||||
'text' => 'Automobili',
|
||||
@ -405,7 +408,9 @@ return [
|
||||
'can' => ['automobili'],
|
||||
],
|
||||
|
||||
['header' => 'GESTIONE PIM'],
|
||||
['header' => 'GESTIONE PIM',
|
||||
'can' => ['contatti','tasks','appuntamenti','meetingroom'],
|
||||
],
|
||||
[
|
||||
'text' => 'Contatti',
|
||||
'url' => '/admin/contatti',
|
||||
@ -442,21 +447,30 @@ return [
|
||||
'icon' => 'fas fa-fw fa-file-video',
|
||||
'can' => ['meetingroom']
|
||||
],
|
||||
['header' => 'CONSUMI'],
|
||||
['header' => 'CONSUMI',
|
||||
'can' => ['consumi'],
|
||||
],
|
||||
[
|
||||
'text' => 'GAS',
|
||||
'route' => 'gas',
|
||||
'icon' => 'fas fa-fw fa-fire',
|
||||
'can' => ['consumi'],
|
||||
],
|
||||
['header' => 'AMMINISTRAZIONE'],
|
||||
['header' => 'AMMINISTRAZIONE',
|
||||
'can' => ['amministrazione'],
|
||||
],
|
||||
[
|
||||
'text' => 'Utenti',
|
||||
'url' => '/admin/users/new',
|
||||
'icon' => 'fas fa-fw fa-user',
|
||||
'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')
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Assegnazione permessi</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@ -20,24 +20,27 @@
|
||||
<option value="{{$user->id}}"> {{$user->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<table>
|
||||
<table width="100%" class="table table-striped table-bordered table-hover">
|
||||
<tr>
|
||||
<th>Permesso</th>
|
||||
<th>Azione</th>
|
||||
<th colspan="2">Azione</th>
|
||||
</tr>
|
||||
@foreach($permissions as $perm)
|
||||
<tr>
|
||||
<td>{{$perm->name}}</td>
|
||||
<td>
|
||||
Attiva<input type="radio" name="permesso['{{$perm->name}}']" value="true">
|
||||
|
||||
Disattiva <input type="radio" name="permesso['{{$perm->name}}']" value="false">
|
||||
<input type="radio" class="form-check-input" name="permesso['{{$perm->name}}']" value="true">
|
||||
<label class="form-check-label">Attiva</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="radio" class="form-check-input" name="permesso['{{$perm->name}}']" value="false" checked>
|
||||
<label class="form-check-label">Disattiva</label>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@csrf
|
||||
<input type="Submit" name="submit" value="associa">
|
||||
<input type="Submit" name="submit" class="form-control" value="associa">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -132,7 +132,7 @@ Route::group(['middleware'=>['permission:amministrazione']], function(){
|
||||
Route::post('users/new',[Utenti::class,'createUser']);
|
||||
Route::get('users/roles',[Utenti::class,'listRoles']);
|
||||
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::get('users/giverole',[Utenti::class,'giveRoleToUser']);
|
||||
Route::post('users/giverole',[Utenti::class,'assignRole']);
|
||||
|
Loading…
Reference in New Issue
Block a user