Current File : //home/tradevaly/text.tradevaly.com.bd/resources/views/backend/pages/rfq/index.blade.php
@extends('backend.ayaan.master')

@section('title') RFQS Data @endsection
@section('css')
    <!-- DataTables -->
    <link href="{{ asset('/assets/libs/datatables/datatables.min.css') }}" rel="stylesheet" type="text/css" />
@endsection
@section('content')

    @component('components.breadcrumb')
        @slot('li_1') Dashboards @endslot
        @slot('title') RFQS Data @endslot
    @endcomponent
    
    
    
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <div class="row mb-2">
                        <div class="col-sm-4"></div>
                        <div class="col-sm-8"></div><!-- end col-->
                    </div>

                    <div class="table-responsive">
            <table class="table" id="datatable-buttons">
              <thead>
                <tr>
                  <th class="text-center">#</th>
                  <th>{{translate("Image")}}</th>
                  <th>{{translate("Name")}}</th>
                  <th>{{translate("Email")}}</th>
                  <th>{{translate("Want To But")}}</th>
                  <th>{{translate("Qty")}}</th>
                  <th>Status</th>
                  <th class="text-right">{{translate("Actions")}}</th>
                </tr>
              </thead>
              <tbody>
                @php
                   $i = 0;
                @endphp
                @foreach ($rfqs as $rfq)
                <tr>
                  <?php $i++; ?>
                  <td class="text-center">{{$i}}</td>
                  <td><img style="height: 80px; width:150px; border-radius:10%;" src="{{asset('storage/images/admin/rfq/'.$rfq['image'])}}" alt=""></td>
                  <td>{{$rfq['name']}}</td>
                  <td>{{$rfq['email']}}</td>
                  <td>{{$rfq['want_buy']}}</td>
                  <td>{{$rfq['qty']}}</td>
                  <td>
                      <span hre="" class="btn text-{{  $rfq['status'] == 'pending' ? 'warning':'success' }}">
                          {{  $rfq['status'] }}
                      </span>
                  </td>
                  <td class="td-actions text-right">
                      @if($rfq['status'] == 'pending')
                      <a href="{{ url('b2b/rfq/approved',$rfq->id) }}" class="btn btn-success">
                          <i class="fas fa-check"></i>
                      </a>
                      @endif
                    <a href="{{url('b2b/rfq/show',$rfq->id)}}"  class="btn btn-warning" title="View details" style="color: #fff">
                      <i class="fa fa-eye"></i>
                    </a>
                    <a href="{{url('b2b/rfq/delete',$rfq->id)}}" name="rfq" class="btn btn-danger confirmDelete" title="Delete" style="color: #fff">
                      <i class="fas fa-times"></i>
                    </a>
                  </td>
                </tr>
                @endforeach
              </tbody>
            </table>
        </div>
                    
                </div>
            </div>
        </div>
    </div>
    <!-- end row -->
    
    
@endsection
@section('script')
    <!-- Required datatable js -->
    <script src="{{ asset('/assets/libs/datatables/datatables.min.js') }}"></script>
    <script src="{{ asset('/assets/libs/jszip/jszip.min.js') }}"></script>
    <script src="{{ asset('/assets/libs/pdfmake/pdfmake.min.js') }}"></script>
    <!-- Datatable init js -->
     
    <script type="text/javascript">
  $(function () {
    
    
    
    
    $(document).ready(function () {
 
  var table = $('#datatable-buttons').DataTable({
    lengthChange: false,
    processing: true,
    dom: 'Bfrtip',
        serverSide: false,
    buttons: ['copy', 'excel', 'pdf', 'colvis']
  });
  table.buttons().container().appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');
  $(".dataTables_length select").addClass('form-select form-select-sm');
});
});
</script>
@endsection