@extends('admin.layouts.admin')
@section('content')
    <div class="pagetitle">
      <h1>Dashboard</h1>
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a href="#">Home</a></li>
          <li class="breadcrumb-item">Dashboard</li>
          <li class="breadcrumb-item active">Users</li>
        </ol>
      </nav>
    </div><!-- End Page Title -->

    <section class="section dashboard">
      <div class="row">

        <!-- Left side columns -->
        <div class="col-lg-12">


            <div class="card">
                <div class="card-body">
                    <h5 class="card-title">Business Accounts</h5>
                    <p>Business accounts list where admin can edit, update and delete their records.</p>

                    <table class="table table-bordered data-table">
                        <thead>
                            <tr>
                                <th>No</th>
                                {{-- <th>User Type</th> --}}
                                <th>Standing ID</th>
                                <th>First Name</th>
                                <th>Last Name</th>
                                <th>Business Name</th>
                                <th>Email</th>
                                <th width="100px">Action</th>
                            </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>

                </div>
            </div>

        </div><!-- End Left side columns -->



      </div>
    </section>


    <script type="text/javascript">
    $(function () {

        var table = $('.data-table').DataTable({
            processing: true,
            serverSide: true,
            ajax: "{{ route('admin.users.business') }}",
            columns: [
                {data: 'id', name: 'id'},
                // {data: 'user_type', name: 'user_type'},
                {data: 'standing_id', name: 'standing_id'},
                {data: 'first_name', name: 'first_name'},
                {data: 'last_name', name: 'last_name'},
                {data: 'business_name', name: 'business_name'},
                {data: 'email', name: 'email'},
                {data: 'action', name: 'action', orderable: false, searchable: false},
            ]
        });

    });
    </script>

@endsection
