@extends('backend._partials.app')
@section('maincontent')
    <div class="col-sm-6 col-md-6 col-lg-4">
        <div class="card card-user">

            <div class="content">
                <div class="author">
                    <a>
                        @if(empty($user->image))
                        <img src="{{asset("public/img/users/default-avatar.png")}}" height="100">
                        @else
                            <img class="avatar border-gray" src="{{asset("public/img/users/$user->image")}}" height="100">
                            @endif

                        <h4 class="title">{{$user->first_name}}<br>
                            <span class="text-info">{{@$user->designation->title}}</span><br>
                            <small>{{$user->email}}</small>
                        </h4>
                        @if($user->status==1)
                            <label class="label label-success">Active</label>
                        @else
                            <label class="label label-warning">Inactive</label>
                        @endif
                    </a>
                </div>
                <div class="row">
                    {!! Form::open(['url'=>'password-update']) !!}
                    <div class="col-md-4">
                        <div class="form-group">
                            <label>&nbsp;</label>
                            <input type="password" name="old_password" required="true" class="form-control" placeholder="Current Password" >
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <label>&nbsp;</label>
                            <input type="password" name="new_password" required="true" class="form-control" placeholder="New Password">
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <label> &nbsp;</label><br>
                            <button class="btn btn-success">&nbsp; Update &nbsp;</button>
                        </div>
                    </div>
                </div>
                {!! Form::close() !!}


            </div>

        </div>
    </div>
<div class="col-sm-6 col-md-6 col-lg-8">
    {!! Form::open(['url'=>'profileUpdate','files' => true]) !!}
    <div class="card">
        <div class="header">
            <h4 class="title">Edit Profile</h4>
        </div>
        <div class="content">
            <form>
                <div class="row">
                    <div class="col-md-4">
                        <div class="form-group">
                            <label>First Name</label>
                            <input type="text" name="first_name" class="form-control"placeholder="Company" value="{{$user->first_name}}">
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <label>Last Name</label>
                            <input type="text" name="last_name" class="form-control" placeholder="Username" value="{{$user->last_name}}">
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <label for="">Email address</label>
                            <input type="email" class="form-control" placeholder="Email" disabled="" value="{{$user->email}}">
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="">Contact No</label>
                            <input type="text" name="mobile_no" class="form-control"  value="{{$user->mobile_no}}">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>Join Date</label>
                            <input type="text" class="form-control"  disabled=""  value="{{$user->join_date}}">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label>IN Time</label>
                            <input type="text" class="form-control"  disabled=""  value="{{$user->in_time}}">
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="form-group">
                            <label for="">OUT Time</label>
                            <input type="text" class="form-control"  disabled="" value="{{$user->out_time}}">
                        </div>
                    </div>

                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Profile Picture</label>
                            <input type="file" class="form-control" name="photo">
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Present Address</label>
                            <textarea rows="4" name="present_address" class="form-control" placeholder="Here your address1">{{$user->present_address}}</textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>Permanent Address</label>
                            <textarea rows="4" name="permanent_address" class="form-control" placeholder="Here your address2">{{$user->permanent_address}}</textarea>
                        </div>
                    </div>
                </div>

                <button type="submit" class="btn btn-info btn-fill pull-right">Update Profile</button>
                <div class="clearfix"></div>
            </form>
        </div>
    </div>
</div>
    @endsection
