@extends('layouts.app')

@section('content')
<main>
    @if (session('success'))
    <div class="alert alert-success">
        {{ session('success') }}
    </div>
    @endif
    <header class="alert alert-success">
        <h4 class="container">ユーザー情報確認 > ユーザー情報</h4>
    </header>
    <section class="container mt30 mb50">
        <form class="row form" action="{{ url('/user/edit') }}">
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_name">お名前</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_name }}</h3>
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_phonetic">フリガナ</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_phonetic }}</h3>
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_regident">居住所</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_regident_zip }}{{ $user->user_regident_pre }}{{ $user->user_regident_city }}{{ $user->user_regident_add }}</h3>
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_homephone">自宅電話番号</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_homephone }}</h3>
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_mobile">携帯電話番号</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_mobile }}</h3>
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_primemail">メールアドレス</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_primemail }}</h3>
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_submail">予備メールアドレス</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_submail }}</h3>
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_category">利用者区分</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user_category }}</h3>
            </div>
            @if ($user_category === '一般')
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_workplace">勤務先名</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_workplace }}</h3>
            </div>
            @endif
            @if ($user_category === '学生')
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_school">学校名</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_school }}</h3>
            </div>
            @endif
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_relate">住所</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>{{ $user->user_relate_zip }}{{ $user->user_relate_pre }}{{ $user->user_relate_city }}{{ $user->user_relate_add }}</h3>
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="photo_filename1">本人確認書類1</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                @if(!empty($user->photo_filename1))
                <h3><img src="{{ asset('storage/photo/' . $user->photo_filename1) }}"></h3>
                @else
                <h3></h3>
                @endif
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="photo_filename2">本人確認書類2</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                @if(!empty($user->photo_filename2))
                <h3><img src="{{ asset('storage/photo/' . $user->photo_filename2) }}"></h3>
                @else
                <h3></h3>
                @endif
            </div>
            <div class="col-12 col-md-3 offset-0 offset-md-2">
                <label for="user_pass">パスワード</label>
            </div>
            <div class="col-12 col-lg-6 mb10">
                <h3>＊＊＊＊＊＊＊＊</h3>
            </div>
            <div class="col-12 col-md-5 offset-0 offset-md-1 mt10">
                <input type="submit" class="btn btn-lg btn-block btn-success" value="ユーザー情報を変更する" />
            </div>
            <div class="col-12 col-md-5 mt10">
                <a class="btn btn-lg btn-block btn-outline-success" href="{{ url('/user/withdraw') }}">退会する</a>
            </div>
            <div class="col-12 col-md-4 offset-0 offset-md-4 mt50 mb50">
                <a class="btn btn-lg btn-block btn-success" href="{{ url('/user/tag_reissue') }}">タグの再発行を行う</a>
            </div>
        </form>
    </section>
</main>
@endsection