@extends('adminlte::page') @section('title', 'Drepturi Utilizator') @section('content')
{{-- Card wrapper --}}

Utilizează drepturi pentru {{ $user->username }}

@csrf
@php $drepturiItems = [ 'clienti', 'contracte', 'dosare', 'contabilitate', 'documente', 'termene' ,'setari' ]; $actions = ['show','edit','delete']; @endphp @foreach($drepturiItems as $item) @foreach($actions as $action) @php $checked = $user->drepturi ->where('item', $item) ->where('action', $action) ->count() == 1; @endphp @if( ($item == 'documente' && $action != 'show') || ($item == 'termene' && $action != 'show') || ($item == 'setari' && $action != 'show') || ($item == 'raport_lucru' && $action != 'show') || ($item == 'registru_acces_persoane' && $action == 'delete') ) @else @endif @endforeach @endforeach
Acțiune Vizualizează Editează Șterge
{{ ucfirst(str_replace('_',' ',$item)) }}
@endsection