
    @isset($booking_list)
    @foreach($booking_list as $rows)
     @php(
            $pass_data = array(
                'id'         => Crypt::encrypt($rows->id),
                'reg_date'   => EF::dateFormat(($rows->created_at)),
                'end_date'   => date('Y-m-d',strtotime($rows->reserve_edate)),

                'reg_number' => $rows->ms,
                'booking_detail' => $rows->plot->plot_id.' '.$rows->plot->type.' ('.ucfirst($rows->plot->status).')',



                )
            )

    <tr>
      <td>{{$loop->iteration}}</td>

      <td>{{$rows->ms}}</td>

      <td> {{ucfirst($rows->user->name)}}</td>

      <td>{{EF::showPlotFormat($rows->plot)}} </td>
      

      <td >
      {{EF::dateFormat($rows->created_at)}} - 
      {{EF::dateFormat($rows->reserve_edate)}}
      </td>


      <td>
        @if($rows->plot->status == "reserve") 
          <span class="badge badge-primary">{{ucfirst($rows->plot->status)}}</span>
        @elseif($rows->plot->status == "sold") 
          <span class="badge badge-success">{{ucfirst($rows->plot->status)}}</span>
        @elseif($rows->plot->status == "unsold") 
          <span class="badge badge-danger">{{ucfirst($rows->plot->status)}}</span>
        @endif
      </td>
      <td>{{$rows->branch->name}}</td>

      <td>
        @if($rows->status == "Reserved") 
          <span class="badge badge-success">{{EF::getstatus($rows->status)}}</span>
        @elseif($rows->status == "Expired") 
          <span class="badge badge-danger">{{EF::getstatus($rows->status)}}</span>
        @endif
      </td>




      
      


      {{--<td>{{EF::dateFormat($rows->created_at)}}</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">
    
         @if(Auth::user()->hasAnyPermission(['All','Mature Soft Booking']))
            <a  href="{{route('booking.mature',['id' => Crypt::encrypt($rows->id)])}}"  class="dropdown-item cls_delete" content="mature booking"><i class="dropdown-icon fa fa-eye "></i> Mature Booking</a>
         @endif

         @if(Auth::user()->hasAnyPermission(['All','Update Soft Booking']))

           @if($rows->plot->status == "reserve" || $rows->plot->status == "unsold" )
            <a  onclick="update(event,'{{json_encode($pass_data)}}','form_update_soft_booking','md_update_soft_booking')" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-check"></i>Update </a>
            @endif
         @endif

         @if(Auth::user()->hasAnyPermission(['All','Delete Booking']))

         <a  href="{{route('booking.trash',['id' => Crypt::encrypt($rows->id)])}}"  class="dropdown-item cls_delete" content="delete"><i class="dropdown-icon fa fa-trash "></i> Delete </a>
         @endif

          

       </div>
     </div>

   </td>
 </tr>

 @endforeach
 @endisset   
