@extends('admin.pages.build')
@push('css')
    <link rel="stylesheet" href="/site/assets/vendors/simple-datatables/style.css">
@endpush
@section('content')
    <div class="table-responsive" style="background: #fff">
        <table id="dataTable" class="table data-table table-striped mb-0">
            <thead>
            <tr>
                <th>Kullanıcı</th>
                <th>Kullanıcı ID</th>
                <th>Durum</th>
                <th>Roller</th>
                <th>Derece</th>
                <th>Düzenle</th>
            </tr>
            </thead>
            <tbody>
            @foreach($users as $user)
                <tr>
                    <td>{{ $user->name }}</td>
                    <td>#{{ $user->id }}</td>
                    <td>{{ $user->status == 1 ? 'Aktif' : 'Pasif' }}</td>
                    <td>
                        @if($user->has_home_management)
                            Evimi Açabilirim <br>
                        @endif
                        @if($user->need_home_management)
                            Depremzede <br>
                        @endif
                        @if($user->user_management)
                            Yönetim Araçları
                        @endif
                    </td>
                    <td>0</td>
                    <td>
                        <a class="btn btn-success">Düzenle</a>
                        <a class="btn btn-danger">Sil</a>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
@endsection
@push('js')
    <script src="/site/assets/vendors/simple-datatables/simple-datatables.js"></script>
    <script src="/site/assets/js/bootstrap.min.js"></script>
    <script>
        let dataTable = new simpleDatatables.DataTable("#dataTable");
    </script>
@endpush
