            @extends('master_header')

            @section('content')

                @include('includes.header-topbar')

                <!-- ========== App Menu ========== -->
                @include('md.sidebar-menu')
                <!-- Left Sidebar End -->
                <!-- Vertical Overlay-->
                <div class="vertical-overlay"></div>

                <!-- ============================================================== -->
                <!-- Start right Content here -->
                <!-- ============================================================== -->

                <div class="main-content">

                    <div class="page-content">
                        <div class="container-fluid">

                            <!-- start page title -->
                            <div class="row">
                                <div class="col-12">
                                    <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                                        <h4 class="mb-sm-0">APDC Application Forms</h4>

                                        <div class="page-title-right">
                                            <ol class="breadcrumb m-0">
                                                <li class="breadcrumb-item"><a href="javascript: void(0);">Documents</a></li>
                                                <li class="breadcrumb-item active">Application Forms</li>
                                            </ol>
                                        </div>

                                    </div>
                                </div>
                            </div>
                            <!-- end page title -->

                            <div class="row">
                                <div class="col-lg-12">
                                    <div class="card">

                                        <div class="card-body">
                                            <div class="listjs-table" id="customerList">
                                                <div class="row g-4 mb-3">

                                                    <div class="col-sm">
                                                        <div class="d-flex justify-content-sm-end">
                                                            <div class="search-box ms-2">
                                                                <input type="text" class="form-control" placeholder="Search for transactions..." id="myInput">
                                                                <i class="ri-search-line search-icon"></i>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="table-responsive table-card mt-3 mb-1">
                                                    <table class="table align-middle table-nowrap" id="myTable">
                                                        <thead class="table-light">
                                                        <tr>
                                                            <th class="sort" data-sort="customer_name">Serial NO</th>
                                                            <th class="sort" data-sort="email">Name</th>
                                                            <th class="sort" data-sort="phone">Phone</th>
                                                            <th class="sort" data-sort="date">Email</th>
                                                            <th class="sort" data-sort="status">Project</th>
                                                            <th class="sort" data-sort="action">Action</th>
                                                        </tr>
                                                        </thead>
                                                        <tbody class="list form-check-all">
                                                        @foreach($applications as $application)
                                                            <tr>

                                                            <td class="customer_name">{{$application->serial_no}}</td>
                                                            <td class="email">{{$application->name}}</td>
                                                            <td class="phone">{{$application->telephone}}</td>
                                                            <td class="date">{{$application->email}}</td>
                                                            <td class="date">{{$application->project}}</td>
                                                            <td>
                                                                <div class="dropdown">
                                                                    <a href="javascript:void(0);" class="btn btn-light btn-icon" id="dropdownMenuLink15" data-bs-toggle="dropdown" aria-expanded="false">
                                                                        <i class="ri-equalizer-fill"></i>
                                                                    </a>
                                                                    <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuLink15" style="">
                                                                        <form id="initiateOfferForm" action="{{ route('md-view-application') }}">
                                                                            @csrf
                                                                            <input type="hidden" name="id" value="{{$application->id}}">
                                                                            <li>
                                                                                <button type="submit" class="dropdown-item">
                                                                                    <i class="ri-download-2-document me-2 align-middle text-muted"></i>
                                                                                    View
                                                                                </button>
                                                                            </li>
                                                                        </form>

                                                                        <li class="dropdown-divider"></li>
                                                                        <li><a class="dropdown-item" href="javascript:void(0);"><i class="ri-delete-bin-5-line me-2 align-middle text-muted"></i>Delete</a></li>
                                                                    </ul>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        @endforeach

                                                        </tbody>
                                                    </table>

                                                    <script>
                                                        $(document).ready(function(){
                                                            $("#myInput").on("keyup", function() {
                                                                var value = $(this).val().toLowerCase();
                                                                $("#myTable tr").filter(function() {
                                                                    $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
                                                                });
                                                            });
                                                        });
                                                    </script>


                                                    <div class="noresult" style="display: none">
                                                        <div class="text-center">
                                                            <lord-icon src="https://cdn.lordicon.com/msoeawqm.json" trigger="loop" colors="primary:#121331,secondary:#08a88a" style="width:75px;height:75px"></lord-icon>
                                                            <h5 class="mt-2">Sorry! No Result Found</h5>
                                                            <p class="text-muted mb-0">We've searched more than 150+ Orders We did not find any orders for you search.</p>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="d-flex justify-content-end">
                                                    <div class="pagination-wrap hstack gap-2">
                                                        <a class="page-item pagination-prev disabled" href="javascript:void(0);">
                                                            Previous
                                                        </a>
                                                        <ul class="pagination listjs-pagination mb-0"></ul>
                                                        <a class="page-item pagination-next" href="javascript:void(0);">
                                                            Next
                                                        </a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div><!-- end card -->
                                    </div>
                                    <!-- end col -->
                                </div>
                                <!-- end col -->
                            </div>
                            <!-- end row -->

                        </div>
                        <!-- container-fluid -->
                    </div>
                    <!-- End Page-content -->

                @include('includes.footer')
                </div>
                <!-- end main content-->

            </div>
            <!-- END layout-wrapper -->
            @endsection



