@extends('layouts.web')

@section('content')
    <div class="container-fluid pt-3">
        <div class="row">
            <div class="col-12">
                <div class="card card-outline card-success">
                    <div class="card-header">
                        <h3 class="card-title">ข้อมูลส่วนตัวผู้ใช้</h3>
                        <form action="{{ route('user.info_edit')}}" method="post">
                            @csrf
                            <input type="hidden" name="uid" value="{{auth()->user()->id}}">
                            <button class="btn btn-outline-warning edit-outline-btn btn-sm float-right" type="submit"><i class="far fa-edit"></i> แก้ไขข้อมูล</button>
                        </form>
                    </div>

                    <div class="card-body">
                        <div class="row">
                            <div class="col-sm-3 col-md-2">
                                <p class="showTitle">ชื่อผู้ใช้ระบบ</p>
                            </div>
                            <div class="col-sm-9 col-md-10">
                                <p><i class="fas fa-angle-right mr-3"></i> {{ $user->username }}</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-3 col-md-2">
                                <p class="showTitle">ชื่อ - นามสกุล</p>
                            </div>
                            <div class="col-sm-9 col-md-10">
                                <p ><i class="fas fa-angle-right mr-3"></i> {{ $user->title.$user->firstname." ".$user->lastname }}</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-3 col-md-2">
                                <p class="showTitle">หมายเลขโทรศัพท์</p>
                            </div>
                            <div class="ol-sm-9 col-md-10">
                                <p><i class="fas fa-angle-right mr-3"></i> {{ $user->phone }}</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-3 col-md-2">
                                <p class="showTitle">อีเมล์</p>
                            </div>
                            <div class="col-sm-9 col-md-10">
                                <p><i class="fas fa-angle-right mr-3"></i> {{ $user->email }}</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-3 col-md-2">
                                <p class="showTitle">ประจำสาขา</p>
                            </div>
                            <div class="col-sm-9 col-md-10">
                                <p><i class="fas fa-angle-right mr-3"></i> {{ $user->name }}</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-3 col-md-2">
                                <p class="showTitle">สิทธิ์</p>
                            </div>
                            <div class="col-sm-9 col-md-10">
                                <p><i class="fas fa-angle-right mr-3"></i> {{ $user->role }}</p>
                            </div>
                        </div>
                    </div>  <!-- div card body -->
                </div>
            </div>
        </div>
    </div>
@endsection
