@extends('layouts.inner')





@section('content')


<section id="lalit-mod">


    <div class="head-top">


        <div class="head-top-left"> <img src="{{asset('frontend/images/2024/01/logo.png')}}"> </div>


        <div class="head-top-right">


            <h1>Welcome @if(Auth::user()->role==1) Superadmin @elseif(Auth::user()->role==2) Admin


                @elseif(Auth::user()->role==3) Staff @elseif(Auth::user()->role==4) Client


                @elseif(Auth::user()->role==5) Manager @elseif(Auth::user()->role==6) Supervisor


                @elseif(Auth::user()->role==7) HOD  


                @elseif(Auth::user()->role==8) Corporate Trainer @endif


            </h1>


            <p>@if(session()->has('message'))


            <div class="alert alert-success" style="color: green;     font-weight: bold;">


                {{ session()->get('message') }}


            </div>


            @endif</p>


        </div>


    </div>





    <div class="lalit-mod">





        @include('container.left')





        <div class="lalit-mod-right">


            @php if(Auth::user()->role==1) { $urlProfile= 'superadmin'; } elseif(Auth::user()->role==2) { $urlProfile=


            'admin'; } elseif(Auth::user()->role==3) { $urlProfile= 'staff'; } elseif(Auth::user()->role==4) {


            $urlProfile= 'client'; } elseif(Auth::user()->role==5) { $urlProfile= 'manager'; }


            elseif(Auth::user()->role==6) { $urlProfile= 'supervisor'; } 


            elseif(Auth::user()->role==7) { $urlProfile='hod'; } 


            elseif(Auth::user()->role==8) { $urlProfile='corporate_training'; } 


            @endphp


            <div class="submitted-reports-mod">


                <form autocomplete="off" method="post" action="{{url($urlProfile)}}/updateProfile" enctype="multipart/form-data">


                    @csrf


                    <input type="hidden" name="id" value="{{$data['id']}}">


                    <input type="hidden" name="ho_image" value="{{$data['image']}}">


                    <div class="profile-mod-frame">


                        <div class="scrollbar-1">


                            <div class="profile-mod-box">


                                <div class="profile-mod-box-left">


                                    <h3>Avatar</h3>


                                    <p>Edit your profile picture</p>


                                </div>


                                <div class="profile-mod-box-right">





                                    <div class="avatar-upload">





                                        <div class="avatar-preview">


                                            <div id="imagePreview"


                                                style="background-image: url(@if(empty($data['image'])){{asset('frontend/images/2024/01/img.jpg')}}@else{{asset('profile')}}/{{$data['image']}}@endif);">


                                            </div>


                                        </div>


                                        <div class="avatar-edit">


                                            <input type="file" name="image" id="imageUpload" accept=".png, .jpg, .jpeg">


                                            <label for="imageUpload"><img


                                                    src="{{asset('frontend/images/2024/01/e-icon.png')}}"></label>


                                        </div>


                                    </div>





                                </div>


                            </div>


                            <!---END-->





                            <div class="profile-mod-box">


                                <div class="profile-mod-box-left">


                                    <h3>Personal Information</h3>


                                    <p>Edit your identity informations</p>


                                </div>


                                <div class="profile-mod-box-right">





                                    <div class="profile-form-box">


                                        <div class="profile-contact-form-box">


                                            <label>Name</label>


                                            <input type="text" placeholder="{{$data['name']}}" value="{{$data['name']}}"


                                                name="name" required="">


                                        </div>


                                    </div>





                                    <div class="profile-form-box">


                                        <div class="profile-contact-form-box">


                                            <label>Email</label>


                                            <input type="text" placeholder="{{$data['email']}}"


                                                value="{{$data['email']}}" name="email" disabled>


                                        </div>


                                    </div>





                                    <div class="profile-form-box">


                                        <div class="profile-contact-form-box">


                                            <label>Mobile</label>


                                            <input type="number" min='1' class="form-control mobile_code"


                                                placeholder="Phone Number" name="phone" value="{{$data['phone']}}">


                                        </div>


                                    </div>








                                </div>


                            </div>


                            <!---END-->





                            <div class="profile-mod-box">


                                <div class="profile-mod-box-left">


                                    <h3>Personal Information</h3>


                                    <p>Edit your identity informations</p>


                                </div>


                                <div class="profile-mod-box-right">





                                    


                                    <div class="profile-form-box">


                                        <div class="profile-contact-form-box">


                                            <label>Designation</label>


                                            <input type="text" autocomplete="false"  placeholder="Designation" name="designation"


                                                value="{{$data['designation']}}">


                                        </div>


                                    </div>


                                    <div class="profile-form-box">


                                        <div class="profile-contact-form-box">


                                            <label>Password</label>


                                            <input type="password" autocomplete="false"  placeholder="" name="password">


                                            <input type="hidden" name="new" value="{{$data['password']}}">


                                        </div>


                                    </div>





                                    <div class="profile-form-box">


                                        <div class="profile-contact-form-box">


                                            <button type="submit" name="en" class="submit-now"> Update


                                                Information</button>


                                        </div>


                                    </div>





                                </div>


                            </div>


                            <!---END-->


                        </div>


                    </div>


                    <!---frame END-->


                </form>


            </div>


            <!---END-->








        </div>


        <!---right END-->





    </div>


</section>


@endsection