@if(Auth::user()->hasAnyPermission(['All','View Booking Document']))
           <div class = "col-md-12 col-sm-12">
          <div class= "card card-collapsed">
                        <div class="card-status bg-green">
                      </div>
                               <div class="card-header">             
             @if(Auth::user()->hasAnyPermission(['All','Upload Booking Document'])) 
               <button  class="float-right btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#md_upload_booking_document"><i class="fa fa-upload"></i></button> &nbsp;&nbsp;
               @endif

               <h3 class="card-title">Manage Documents</h3>

               <div class="card-options">
               <a onclick="cardCollapseOnce(event,this);" href="#" class="card-options-collapse btn btn-sm btn-outline-primary" >View<i class="fe fe-chevron-up"></i></a>
                      
             </div>

               </div>
               <div class="alert alert-primary card-alert mb-0">
                Documents
               </div>

                      <div class="table-responsive booking-table-height">
                    <table class="table table-hover table-outline table-vcenter text-nowrap card-table">
                      <thead>
                        <tr>
                          
                          <th>Sr #</th>
                          <th>Title</th>
                          <th>Description</th>
                          <th>Document</th>
                          <th style="text-align: center;"><i class="dropdown-icon fa fa-cogs"></i></th>                          
                        </tr>
                      </thead>
                      <tbody>
                          @isset($document_list)
                        @foreach($document_list as $rows)

                        <tr>
                        <td>{{$loop->iteration}}</td>
                        <td>{{$rows->title}}</td>
                        <td>{{$rows->description}}</td>
                        <td><a href="{{EF::getFile($rows->doc_file)}}" target="_blank">Click Here</a></td>
                       
                        @if(Auth::user()->hasAnyPermission(['All','Remove Booking Document']))    
                          <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="{{route('document.trash',['id' => Crypt::encrypt($rows->id)])}}" content ="remove document" class="dropdown-item  cls_delete"><i class="dropdown-icon  fa fa-trash"></i> Remove </a>
                                </div>
                            </div>       
                          </td>
                        @endif
                      </tr>
                        @endforeach
                        @endisset
                        </tbody>
                    </table>
                  </div>

                         </div>                        

                       
                    </div>
                    @endif
