@extends('layouts.app')

@section('content')

<!-- Content wrapper scroll start -->
<div class="content-wrapper-scroll">

<!-- Content wrapper start -->
<div class="content-wrapper">
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
    </div>
    <!-- Row start -->
    <div class="row gutters">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
           
            <div class="card">
                <div class="card-body">
                <div style="padding-bottom:12px">
                <button class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#exampleModalCenterHouse">
                     <i class="icon-add-user"></i> Add Beneficiary
                </button>
                </div>
                    <div class="table-responsive">
                    <table id="copy-print-csv" class="table v-middle">
                            <thead>
                                <tr>
                                  <th>Person</th>
                                  <th>Phone Number</th>
                                  <th>Order Number</th>
                                  <th>Order Date</th>
                                  <th>Comment</th>										  
                                </tr>
                            </thead>
                            <tbody>
                                @foreach($onhouse as $item)
                                <tr>
                                  <td>
                                      <div class="media-box">
                                          <div class="media-box-body">
                                              <a href="#" class="text-truncate">{{@strtoupper($item->name)}}</a>
                                          </div>
                                      </div>
                                  </td>
                                  <td>{{$item->phone}}</td>
                                  <td><a href="/ceqa-dashboard/order/transaction-details/<?=$item->order_number?>">{{$item->order_number}}</a></td>	
                                  <td>{{$item->created_at}}</td>	
                                  <td>{{$item->comment}} </td>													  
                                </tr>
                                @endforeach
                            </tbody>
                    </table>
                    </div>

                </div>
            </div>

        </div>
    </div>
    <!-- Row end -->

</div>
<!-- Content wrapper end -->



<!-- Modal start -->
<div class="modal fade" id="exampleModalCenterHouse" tabindex="-1" aria-labelledby="exampleModalFullScreenTitle" aria-hidden="true">
    <div class="modal-dialog modal-fullscreen">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalFullScreenTitle">More Options</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                @include('inc.on-house-register')
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
<!-- Modal end -->


@endsection