@extends('layouts.dashboard')

@section('page_title')
  Minute Sheet
@endsection

@section('page_header_title')
HR
@endsection



@section('page_body')
{{ Breadcrumbs::render('minutesheets') }}
	<div class="row row-cards row-deck">
  <div class="col-12">
                <div class="card">
                	  <div class="card-header">		    

      @if(Auth::user()->hasAnyPermission(['All','Generate MinuteSheet']))
					     <button  class="float-right btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#md_add_minute_sheet"><i class="fa fa-plus"></i></button> &nbsp;&nbsp;
               @endif

					     <h3 class="card-title">Generate Minute Sheet</h3>
					  </div>

                	<div class="card-status card-status-left bg-blue"></div>
                  <div class="table-responsive table-height">
                    <table class="table table-hover table-outline table-vcenter text-nowrap card-table cls_datatable">
                      <thead>
                        <tr>
                          
                          <th>#</th>
                          <th>Title</th>
                          <th>Month</th>
                          <th>Date</th>    
                          <th>Status</th>
                                         
                          <th style="text-align: center;"><i class="dropdown-icon fa fa-cogs"></i></th>
                          
                        </tr>
                      </thead>
                      <tdody>
                         @php($pass_data = [])
                        @foreach($minute_sheet_list as $rows)
                         @php(
        $pass_data = array(
          'minute_sheet'    => Crypt::encrypt($rows->id),
          'title'           => $rows->title,
          'date'            => EF::dateHtml($rows->date),
          
                        )
                        )
                        <tr>
                          <td>{{$loop->iteration}}</td>
                          <td>{{$rows->title}}</td>
                          <td>{{EF::getdateByFormat('F',$rows->date)}}</td>
                          <td>{{EF::dateFormat($rows->date)}}</td>
                          <td>@if($rows->status == 'Locked')<abbr title= "locked"><i  class = "fa fa-lock fa-2x" style ="color:red;"></i></abbr>@else<abbr title= "unlocked"><i class = "fa fa-unlock fa-2x" style ="color:blue;"></i></abbr>@endif</td>
                          
                            <td class="text-center">

                                  <div class="item-action dropdown">
                                    <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fa fa-list-ul"></i></a>
                                    <div class="dropdown-menu dropdown-menu-right">
                                       <a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-cogs"></i> Action</a>
                                    
                     @if(Auth::user()->hasAnyPermission(['All','View MinuteSheet Details']))
                       <div class="dropdown-divider"></div>
                                 <a  href="{{route('minute_sheet.details',['id' => Crypt::encrypt($rows->id)])}}" content="View Details" class="dropdown-item"><i class="dropdown-icon fa fa-eye "></i> View Details</a>
                                 @endif


                     @if(Auth::user()->hasAnyPermission(['All','Download MinuteSheet']))
                      <div class="dropdown-divider"></div>
                      <a  href="{{route('minute_sheet.download',['id' => Crypt::encrypt($rows->id)])}}"  class="dropdown-item"><i class="dropdown-icon fa fa-download"></i>Download</a>
                                    
                                      @endif
                                 {{--

                                      @if(Auth::user()->hasAnyPermission(['All','Update Minute Sheet']))
                                       <div class="dropdown-divider"></div>
                                      <a onclick="update(event,'{{json_encode($pass_data)}}','form_update_minute_sheet','md_update_minute_sheet')" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-edit"></i> Update </a>
                                      @endif

                                  --}}
                              

                                        @if(Auth::user()->hasAnyPermission(['All','Refresh MinuteSheet']))
                                       <div class="dropdown-divider"></div>
                                         <a  href="{{route('minute_sheet.refresh',['id' => Crypt::encrypt($rows->id)])}}" content="Refresh" class="dropdown-item"><i class="dropdown-icon fa fa-refresh "></i>Refresh</a>
                                    
                                      @endif
                                     
                                     
                                     
                                    </div>
                                  </div>
                        </tr>
                        @endforeach
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
          </div>

@endsection

@section('page_modal')


  @include('hr.minute_sheet.modals.add_minute_sheet') 

  @include('hr.minute_sheet.modals.update_minute_sheet')

@endsection

@section('page_script')
  
@endsection
