@extends('layouts.dashboard')
@section('page_title')
BOQ Requests
@endsection
@section('page_header_title')
BOQ Requests
@endsection
@php($label_list = EF::getWhiteLabel())

@section('page_body')
{{ Breadcrumbs::render('boqrequests') }}

	<div class="row row-cards row-deck">
              <div class="col-12">
                <div class="card">
                	  <div class="card-header">



					     <h3 class="card-title">BOQ Requests</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>Entry No</th>
                          <th>Remarks</th>
                          <th>BOQ Date</th>
                          <th>Status</th>
                          <th>Project</th>

                   <th style="text-align: center;"><i class="dropdown-icon fa fa-cogs"></i></th>
                        </tr>
                      </thead>
                     <tbody>
                      @if(isset($boq_list))
                      @foreach($boq_list as $rows)
                      <tr>
                        <td>{{$loop->iteration}}</td>
                        <td>{{$rows->sr_no}}</td>
                        <td><p style="word-wrap: break-word;">{!!wordwrap($rows->remarks,40,'<br>')!!}</p></td>
                        <td>{{EF::dateFormat($rows->created_at)}}</td>
                        <td>
              @if($rows->status == "Approved")
                <span class="badge badge-success"> {{$rows->status}}</span>
              @elseif($rows->status == "In Process" || $rows->status == "Waiting")
                  <span class="badge badge-success"> Approved</span>
              @elseif($rows->status == "Pending")
                <span class="badge badge-primary"> {{$rows->status}}</span>
              @else
                <span class="badge badge-danger"> {{$rows->status}}</span>
              @endif
                        </td>
                        <td>{{$rows->branch->name}}</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','BOQ Details']))
                                   <a  href="{{route('boq.details',['id' => Crypt::encrypt($rows->id)])}}"  class="dropdown-item"><i class="dropdown-icon fa fa-eye "></i> View Details</a>
                                   @endif

                                    </div>
                                  </div>
                               </td>
                      </tr>
                      @endforeach
                      @endif
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
          </div>
@endsection

@section('page_modal')

@endsection

@section('page_script')

@endsection
