@extends('layouts.masterHome2')

@section('content')

    <br/>
    @if( auth()->user()->create_ )
    <a href="{{ url('/employee/create') }}"  class="btn" style="background-color:#2C4E71;color:#FFF;margin-left:10px">Create New Employee </a><br/><br/>
    @else
	    <span>&nbsp;&nbsp;</span>
    @endif

 
    
    <div class="card">
               
              <!-- /.card-header -->
              <div class="card-body">
                <table id="example1" class="table table-bordered table-striped">
                  <thead>
                  
                 <tr >
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"></th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> أسم الموظف    </th>

                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> الايميل    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> الموبايل    </th>
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> العنوان    </th>

                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> Actions   </th>
                  

                 </tr>
                 </thead>
              <tbody>
                           
                @foreach( $employees as $employee )   
                 
                 

                 
                <tr>
                <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" > 
                                 
                <a   href='{{url("/employee/image/$employee->id")}}'  style="color:'#0000003c'"> 
                <img class="profile-user-img img-fluid " src='{{asset("theme/dist/img/$employee->id.PNG")}}' alt="No Image" style="width:100px;height:80px">
                </a>   
                </td>

                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" > <a   href='{{url("/employee/details/$employee->id")}}'  > {{$employee->name}} </a> 
                  <br>
                  

                </td>

                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" >{{$employee->email}} </td>

                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" >{{$employee->mobile}} </td>

                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" >{{$employee->address}} </td>
                  <td style="text-align:center; width:50px;word-break: break-word;" > 
                  
                  <a   href='{{url("/employee/edit/$employee->id")}}'  > <i class="fa fa-edit" style="font-size:18px;color:blue"></i>  </a>
                  
                  <a   href='{{url("/employee/edit_analysis/$employee->id")}}'  > <i class="fa fa-edit" style="font-size:18px;color:red"></i>  </a>
                  <a   href='{{url("/employee/edit_trusts/$employee->id")}}'  > <i class="fa fa-edit" style="font-size:18px;color:green"></i>  </a>
                 
                </td>

                </tr>
               @endforeach
                </tbody>
                </table>
              </div>
              <!-- /.card-body -->
            </div>  

@endsection
