@extends('manage.layout')
@section('content')
    
User: {{ $user->name }}
    
    Core User Details
    
    
    User Permissions
    {{--    for loop, and make sure that only if the user has the DELETE_PERMISSION that they can delete it and if they have the UPDATE_PERMISSION that they can update it--}}
    
        
            
            
                | Permission | 
                Actions | 
            
            
            @foreach(auth()->user()->permissions as $permission)
                
                    | {{ $permission->permission_name }} | 
                    
                        
                     | 
                
            @endforeach
            
        
        Cinema Assignments
        
            
            
                | Assignment | 
                Actions | 
            
            
            @foreach(auth()->user()->cinemas() as $cinema)
                
                    | {{ $cinema->cinema_name }} | 
                    
                        @if($user->hasPermission('DELETE_CINEMA_ASSIGNMENT'))
                            
                                Delete
                            
                        @endif
                     | 
                
            @endforeach
            @if ($user->hasPermission('UPDATE_USER'))
                
            @endif
        
     
@endsection