@extends('Admin.layouts.master')

@section('content')
@php
$currentPage = 'manage-restaurant_app';
@endphp




        <div class="layout-px-spacing">
            <div class="middle-content container-xxl p-0">
                <div class="row layout-top-spacing ">
                    <div class="top-tabel">
                        <div class="row">
                            <div class="col-md-4">
                                <!-- <h6 class="card-title">Archive patient list</h6> -->
                                <a class="d-flex align-items-center justify-content-center pl-2" href="{{ route('restraunt_users') }}">
                                    <img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg') }}">
                                    <h6 class="card-title p-0">Archive Manage Customers</h6>
                                </a>
                            </div>
                            
                        </div>
                    </div>
                    <div class="col-xl-12 col-lg-12 col-sm-12  layout-spacing">
                        <div class="widget-content widget-content-area br-8 position-btn" style="overflow: scroll;">
                            <table id="zero-config" class="table dt-table-hover" style="width:100%">
                                <thead class="text-center">
                                    <tr>
                                        <th class="text-start">Sr no</th>
                                        <th class="text-start">Resturant Name</th>
                                        <th class="text-start">Resturant ID</th>
                                        <th class="text-start">Email Id</th>
                                        <th class="text-start">Date Onboarded</th>
                                        <th class="text-start">Phone Number</th>
                                        <th class="text-start">Location</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody class="text-center">
                                @foreach ($rest_user as $rest_users)

                                    <tr>
                                        <td class="text-start"></td>
                                        <td class="text-start">{{$rest_users->first_name}}</td>
                                        <td class="text-start">{{$rest_users->id}}</td>
                                        <td class="text-start">{{$rest_users->email_address}}</td>
                                        <td class="text-start">{{ \Carbon\Carbon::parse($rest_users->created_at)->format('d-m-y') }}</td>
                                        <td class="text-start">{{$rest_users->phone_number }}</td>
                                        <td class="text-start">{{ $rest_users->state->name}}</td>

                                        <td class="view-transcation">
                                        <a class="pointer rest_unarchive_btn" data-id="{{$rest_users->id}}" data-toggle="modal" data-target="#restore-modal">
                                        <img src="{{ asset('public/assets/img/restore.svg')}}" />
                                        <span>Restore</span>
                                    </a>
                                        </td>
                                    </tr>
                                    @endforeach  

                                    
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="restore-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">

            <div class="modal-body">
                <div class="modal-header">
                    <button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
                        x
                    </button>
                </div>
                <input type="hidden" id="unarchive_id" name="unarchive_restaurant_id">
                <p class="modal-text restore-modal-heading">Are you sure you want to<br>Unarchive?</p>
                <div class="modal-btn d-flex ">
                    <a class="extra-btn pointer" data-dismiss="modal">No</a>
                    <a class="download-btn-custom restaurant_unarchive" href="">Yes, Unarchive</a>
                </div>

            </div>
        </div>
    </div>
</div>

        @endsection
        @section('section_script')


<script>
    $('#zero-config').DataTable({
        "dom": "<'dt--top-section'<'row'<'col-12 col-sm-6 d-flex justify-content-sm-start justify-content-center'l><'col-12 col-sm-6 d-flex justify-content-sm-end justify-content-center mt-sm-0 mt-3'f>>>" +
            "<'table-responsive'tr>" +
            "<'dt--bottom-section d-sm-flex justify-content-sm-between text-center'<'dt--pages-count  mb-sm-0 mb-3'i><'dt--pagination'p>>",
        "oLanguage": {
            "oPaginate": { "sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>', "sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>' },
            "sInfo": "Showing page _PAGE_ of _PAGES_",
            "sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
            "sSearchPlaceholder": "Search...",
            "sLengthMenu": "Results :  _MENU_",
        },
        "stripeClasses": [],
        "lengthMenu": [7, 10, 20, 50],
        "pageLength": 10
    });
</script>
@endsection
