@extends('layouts.app')

@section('title', '本人確認手動処理')

@section('content')
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-lg-6">
                    <h1 class="m-0 text-dark">本人確認手動処理</h1>
                </div>
                <div class="col-lg-6">
                    <ol class="breadcrumb float-sm-right text-sm">
                        <li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
                        <li class="breadcrumb-item active">本人確認手動処理</li>
                    </ol>
                </div>
            </div>
        </div>
    </div>

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

            <div class="card">
                <div class="card-body table-responsive">
                    <table class="table table-bordered table-hover text-nowrap" style="min-width:1400px;">
                        <thead class="thead-light">
                            <tr>
                                <th style="width:80px;">操作</th>
                                <th>利用者ID</th>
                                <th>利用者分類ID</th>
                                <th>利用者名</th>
                                <th>フリガナ</th>
                                <th>性別</th>
                                <th>生年月日</th>
                                <th>携帯電話番号</th>
                                <th>自宅電話番号</th>
                                <th>メールアドレス</th>
                                <th>居住所:郵便番号</th>
                                <th>居住所:都道府県</th>
                                <th>居住所:市区群</th>
                                <th>居住所:住所</th>
                                <th>関連住所:郵便番号</th>
                                <th>関連住所:都道府県</th>
                                <th>関連住所:市区群</th>
                                <th>関連住所:住所</th>
                                <th>学校</th>
                                <th>卒業予定</th>
                                <th>備考</th>
                                <th>本人確認書類</th>
                                <th>確認状態</th>
                            </tr>
                        </thead>
                        <tbody>
                            @forelse($users as $user)
                                <tr>
                                    <td style="background-color:#faebd7;">
                                        <a href="{{ route('personal_edit', ['seq' => $user->user_seq]) }}" class="btn btn-sm btn-default">編集</a>
                                    </td>
                                    <td>{{ $user->user_id }}</td>
                                    <td>
                                        {{ $user->usertype_subject1 ?? '' }}
                                        @if($user->usertype_subject2)/{{ $user->usertype_subject2 }}@endif
                                        @if($user->usertype_subject3)/{{ $user->usertype_subject3 }}@endif
                                    </td>
                                    <td>{{ $user->user_name }}</td>
                                    <td>{{ $user->user_phonetic }}</td>
                                    <td>{{ $user->user_gender }}</td>
                                    <td>{{ $user->user_birthdate }}</td>
                                    <td>{{ $user->user_mobile }}</td>
                                    <td>{{ $user->user_homephone }}</td>
                                    <td>{{ $user->user_primemail }}</td>
                                    <td>{{ $user->user_regident_zip }}</td>
                                    <td>{{ $user->user_regident_pre }}</td>
                                    <td>{{ $user->user_regident_city }}</td>
                                    <td>{{ $user->user_regident_add }}</td>
                                    <td>{{ $user->user_relate_zip }}</td>
                                    <td>{{ $user->user_relate_pre }}</td>
                                    <td>{{ $user->user_relate_city }}</td>
                                    <td>{{ $user->user_relate_add }}</td>
                                    <td>{{ $user->user_school }}</td>
                                    <td>{{ $user->user_graduate }}</td>
                                    <td>{{ $user->user_remarks }}</td>
                                    <td>{{ $user->user_idcard }}</td>
                                    <td>
                                        @switch($user->user_idcard_chk_flag)
                                            @case(1)<span class="badge badge-warning">未チェック</span>@break
                                            @case(2)<span class="badge badge-success">自動OK</span>@break
                                            @case(3)<span class="badge badge-primary">手動OK</span>@break
                                            @case(4)<span class="badge badge-danger">手動NG</span>@break
                                            @case(5)<span class="badge badge-secondary">自動NG</span>@break
                                            @default<span class="badge badge-light">不明</span>
                                        @endswitch
                                    </td>
                                </tr>
                            @empty
                                <tr>
                                    <td colspan="23" class="text-center text-muted">データがありません。</td>
                                </tr>
                            @endforelse
                        </tbody>
                    </table>
                    <div class="mt-2">
                        {{ $users->links('pagination') }}
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection