@extends('web.layouts.master')
@section('content')     
        <!-- Hero Start -->
       <section class="bg-half-170 d-table w-100 it-home mt-5" style="background-color: #efefef; height:600px;">
            <div class="container">
               <div class="row">
                     <!-- <div class="col-md-3 mt-1" style="padding: 20px;"> 
                                <div class="card p-3 rounded border-0" style="background-color: white;">
                                    <div class="info-palate mt-0" style="padding-bottom: 10px;">
                                        <div class="left">
                                            <div class="stage_form_header">
                                                <div class="left">
                                                    <i class="fa fa-user icn" style="padding: 5.5px 7.5px;"></i>
                                                </div>
                                                <div class="right" style="align-self: center;">
                                                    <span class="main_title">Demo Account</span>
                                                    <span class="sub_title">Demo</span>
                                                </div>
                                                <div>
                                                 <a href="">
                                                     <i class="fa fa-pencil change_pass_btn" style="font-size: 13px !important; padding: 4px;"></i>
                                                </a>
                                            </div>
                                        </div>
                                            
                                            <div class="load_primary_information">
                                                <dd class="tbl">Given Name</dd>
                                                <dt class="tbl2 mb-2">{{$user_info->first_name}}</dt>
                                                <dd class="tbl">Family Name</dd>
                                                <dt class="tbl2 mb-2">{{$user_info->last_name}}</dt>
                                                <dd class="tbl">Date Of Birth</dd>
                                                <dt class="tbl2">{{date("d M, Y", strtotime($user_info->dob))}}</dt>
                                                <dd class="tbl">Nationality</dd>
                                                <dt class="tbl2">{{$user_info->country_name->name ?? 'Notspecified'}}</dt>                                            
                                            </div>
                                        </div>
                                    </div>
                             </div>
                             <div class="full-box mt-4" style="padding:10px; background-color:white; border-radius:6px;">
                                        <div class="card-body" style="padding:11px !important;">
                                               <span class="h6"> Contact Information</span>
                                             <div class="info">
                                                  <dl style="position: relative;">
                                                       <dt style="font-size: 11px; font-weight: 200;"> 
                                                          <i class="fa fa-phone"></i>
                                                          <span>+441142725444</span>
                                                       </dt>
                                                       <dt class="mt-1" style="font-size: 11px; font-weight: 200;"> 
                                                          <i class="fa fa-envelope-o"></i>
                                                          <span>hadiur.iecc@gmail.com2</span>
                                                       </dt>
                                                  </dl>
                                             </div>
                                         </div>
                                    </div> 
                        </div> -->
                        <!--end col-->

                    <div class="col-md-12 mt-4 mb-3">
                        @if(Auth::user()->save_as_complete==0)
                        <div class="card border-0" style="border-radius:0px !important;">
                            <div class="container-fluid">
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="row align-items-center">
                                            <div class="col-md-12" style="background: rgb(255, 255, 255);border-radius: 0.25rem;">
                                                <div class="education">
                                                    <i class="fa fa-graduation-cap" style="padding: 7px;"></i>Education History
                                                </div>
                                                <div class="mt-3 mb-2">
                                                    <div class="container-fluid" style="padding:0px !important;">
                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <div class="text-end" style="margin:0px !important;">
                                                                    <a role="button" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
                                                                        <button type="button" class="btn btn2" data-toggle="collapse" data-target="#demo">Add</button>
                                                                    </a>
                                                                </div>
                                                            </div> <!--box-end-->
                                                            <div class="col-md-12 mt-1">
                                                                <div id="demo" class="collapse">
                                                                    <div class="panel-body" style="padding:10px; background-color:#dedbf1;  border: 1px solid #e9e5e5; border-radius: 5px;">
                                                                        <form method="POST" action="{{ route('institution-save') }}">
                                                                        @csrf
                                                                           <div class="row">
                                                                                <div class="col-md-3">
                                                                                    <div class="mb-1">
                                                                                            <label class="form-label">Academic level <span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <select name="academiclevel" id="academic level" class="form-control frm" required="">
                                                                                                   <option disabled="" selected="" value="">Choose one....</option>
                                                                                                @foreach($academic_level as $row)
                                                                                                    <option value="{{$row->id}}">{{$row->name}}</option>
                                                                                                @endforeach                                                                                          
                                                                                               
                                                                                            </select>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="mb-1">
                                                                                            <label class="form-label" for="subject">Subject <span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <input type="text" for="subject" name="subject" class="form-control ps-2" required="">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                        <div class="mb-1">
                                                                                            <label class="form-label" for="">Institution<span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <input type="text"  for="institution" name="institution" class="form-control ps-2" placeholder="" required="">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="mb-1">
                                                                                            <label class="form-label">Passing Year <span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <select name="passingyear" id="passing year" class="form-control frm" required="">
                                                                                                <option disabled="" selected="" value="">Year</option>
                                                                                                @php
                                                                                                    $firstYear = (int)date('Y') - 20;
                                                                                                    $lastYear = $firstYear + 20;
                                                                                                    for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                @endphp
                                                                                                <option value="{{$i}}">{{$i}}</option>
                                                                                                @php
                                                                                                    }
                                                                                                @endphp
                                                                                            </select>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="mb-1">
                                                                                            <label class="form-label">Result <span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <input type="text" class="form-control ps-2" name="result" placeholder="" required="">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="row">
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1">
                                                                                                    <label class="form-label">Start Date <span class="text-danger">*</span></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="startdate" id="start date" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Year</option>
                                                                                                        @php
                                                                                                            $firstYear = (int)date('Y') - 20;
                                                                                                            $lastYear = $firstYear + 20;
                                                                                                            for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                        @endphp
                                                                                                        <option value="{{$i}}">{{$i}}</option>
                                                                                                        @php
                                                                                                            }
                                                                                                        @endphp

                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1 mt-2">
                                                                                                    <label class="form-label"></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="startmonth" id="month" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Month</option>
                                                                                                        <option value="01">January</option>
                                                                                                        <option value="02">February</option>
                                                                                                        <option value="03">March</option>
                                                                                                        <option value="04">April</option>
                                                                                                        <option value="05">May</option>
                                                                                                        <option value="06">June</option>
                                                                                                        <option value="07">July</option>
                                                                                                        <option value="08">August</option>
                                                                                                        <option value="09">September</option>
                                                                                                        <option value="10">October</option>
                                                                                                        <option value="11">November</option>
                                                                                                        <option value="12">December</option>
                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="row">
                                                                                         <div class="col-md-6">
                                                                                            <div class="mb-1">
                                                                                                    <label class="form-label">End Date <span class="text-danger">*</span></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="enddate" id="end date" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Year</option>
                                                                                                        @php
                                                                                                            $firstYear = (int)date('Y') - 20;
                                                                                                            $lastYear = $firstYear + 20;
                                                                                                            for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                        @endphp
                                                                                                        <option value="{{$i}}">{{$i}}</option>
                                                                                                        @php
                                                                                                            }
                                                                                                        @endphp

                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1 mt-2">
                                                                                                    <label class="form-label"></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="endmonth" id="month" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Month</option>
                                                                                                        <option value="01">January</option>
                                                                                                        <option value="02">February</option>
                                                                                                        <option value="03">March</option>
                                                                                                        <option value="04">April</option>
                                                                                                        <option value="05">May</option>
                                                                                                        <option value="06">June</option>
                                                                                                        <option value="07">July</option>
                                                                                                        <option value="08">August</option>
                                                                                                        <option value="09">September</option>
                                                                                                        <option value="10">October</option>
                                                                                                        <option value="11">November</option>
                                                                                                        <option value="12">December</option>
                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="mt-4 pt-3">
                                                                                        <div class="text-end">
                                                                                            <button class="btn btncl"><i class="fa fa-refresh"></i></button> 
                                                                                            <button class="btn btn2">Save</button>                                                                                                                
                                                                                        </div>
                                                                                    </div>
                                                                                </div>                                                                                                                                           
                                                                         </div>
                                                                        </form>
                                                                    </div>
                                                                </div>
                                                            </div><!--end col-->                               
                                                        </div>
                                                    </div>
                                                    <div class="table-responsive mt-2">
                                                        @if(count($institution)>0)
                                                        <table class="table table-bordered list_table" style="margin-bottom:10px;">
                                                            <thead>
                                                                <tr>
                                                                    <th>Institution</th>
                                                                    <th>Subject</th>
                                                                    <th>Result</th>
                                                                    <th>During</th>
                                                                    <th>Action</th>
                                                                </tr>
                                                            </thead>
                                                            <tbody>
                                                                @foreach($institution as $row)  
                                                                    <tr>
                                                                        <td style="font-size: 11px;">{{$row->institution}}</td>
                                                                        <td style="font-size: 11px;">{{$row->subject}}
                                                                            <div class="right">
                                                                                <span class="label_badge_radius" style="background-image: linear-gradient(90deg,rgba(46,17,83,.19),#f5f4fd) !important;">{{$row->academic_level_info->name}}</span>
                                                                            </div>
                                                                       </td> 
                                                                        <td style="font-size: 11px;">{{$row->result}}
                                                                            <div class="right">
                                                                                <span style="font-weight: 400; font-size: 12px;">PYear: {{$row->passing_year}}</span>
                                                                            </div>
                                                                        </td>
                                                                        <td style="font-size: 11px;">{{date("d M, Y", strtotime($row->start_date)).'-'.date("d M, Y", strtotime($row->end_date))}}</td>
                                                                          <td class="text-center" style="width: 75px;">
                                                                                <div class="icon_bar" style="border: none;">                                                                                              
                                                                                    <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
                                                                                        <i class="fa fa-edit" data-toggle="collapse" data-target="#demo11" onclick="editInstitute({{$row}})"></i>
                                                                                    </a>
                                                                                    
                                                                                        <i class="fa fa-trash delete_education" data-id="{{ $row->id }}"></i>
                                                                                                                                                                       
                                                                                </div>
                                                                         </td>   
                                                                    </tr>
                                                                @endforeach
                                                            </tbody>
                                                        </table>
                                                        @else
                                                        <div class="alert  mt-1 mb-3" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px;">
                                                            <span>No Education History available.</span>
                                                        </div> 
                                                        @endif
                                                    </div>
                                                          <div class="col-md-12">
                                                                <div id="demo11" class="collapse">
                                                                    <div class="panel-body mb-2" style="padding:10px; background-color:#dedbf1;  border: 1px solid #e9e5e5; border-radius: 5px;">
                                                                        <form method="POST" action="" id="edit-institute">
                                                                        @csrf
                                                                           <div class="row">
                                                                                <div class="col-md-3">
                                                                                    <div class="mb-1">
                                                                                            <label class="form-label">Academic level <span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <select name="academiclevel" id="academic level" class="form-control frm" required="">
                                                                                                   <option disabled="" selected="" value="">Choose one....</option>
                                                                                                @foreach($academic_level as $row)
                                                                                                    <option value="{{$row->id}}">{{$row->name}}</option>
                                                                                                @endforeach                                                                                          
                                                                                               
                                                                                            </select>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="mb-1">
                                                                                            <label class="form-label" for="subject">Subject <span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <input type="text" for="subject" name="subject" class="form-control ps-2" required="">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                        <div class="mb-1">
                                                                                            <label class="form-label" for="">Institution<span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <input type="text"  for="institution" name="institution" class="form-control ps-2" placeholder="" required="">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="mb-1">
                                                                                            <label class="form-label">Passing Year <span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <select name="passingyear" id="passing year" class="form-control frm" required="">
                                                                                                <option disabled="" selected="" value="">Year</option>
                                                                                                @php
                                                                                                    $firstYear = (int)date('Y') - 20;
                                                                                                    $lastYear = $firstYear + 20;
                                                                                                    for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                @endphp
                                                                                                <option value="{{$i}}">{{$i}}</option>
                                                                                                @php
                                                                                                    }
                                                                                                @endphp
                                                                                            </select>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="mb-1">
                                                                                            <label class="form-label">Result <span class="text-danger">*</span></label>
                                                                                        <div class="form-icon position-relative">
                                                                                            <input type="text" class="form-control ps-2" name="result" placeholder="" required="">
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="row">
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1">
                                                                                                    <label class="form-label">Start Date <span class="text-danger">*</span></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="startdate" id="start date" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Year</option>
                                                                                                        @php
                                                                                                            $firstYear = (int)date('Y') - 20;
                                                                                                            $lastYear = $firstYear + 20;
                                                                                                            for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                        @endphp
                                                                                                        <option value="{{$i}}">{{$i}}</option>
                                                                                                        @php
                                                                                                            }
                                                                                                        @endphp

                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1 mt-2">
                                                                                                    <label class="form-label"></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="startmonth" id="month" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Month</option>
                                                                                                        <option value="01">January</option>
                                                                                                        <option value="02">February</option>
                                                                                                        <option value="03">March</option>
                                                                                                        <option value="04">April</option>
                                                                                                        <option value="05">May</option>
                                                                                                        <option value="06">June</option>
                                                                                                        <option value="07">July</option>
                                                                                                        <option value="08">August</option>
                                                                                                        <option value="09">September</option>
                                                                                                        <option value="10">October</option>
                                                                                                        <option value="11">November</option>
                                                                                                        <option value="12">December</option>
                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="row">
                                                                                         <div class="col-md-6">
                                                                                            <div class="mb-1">
                                                                                                    <label class="form-label">End Date <span class="text-danger">*</span></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="enddate" id="end date" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Year</option>
                                                                                                        @php
                                                                                                            $firstYear = (int)date('Y') - 20;
                                                                                                            $lastYear = $firstYear + 20;
                                                                                                            for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                        @endphp
                                                                                                        <option value="{{$i}}">{{$i}}</option>
                                                                                                        @php
                                                                                                            }
                                                                                                        @endphp

                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1 mt-2">
                                                                                                    <label class="form-label"></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="endmonth" id="month" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Month</option>
                                                                                                        <option value="01">January</option>
                                                                                                        <option value="02">February</option>
                                                                                                        <option value="03">March</option>
                                                                                                        <option value="04">April</option>
                                                                                                        <option value="05">May</option>
                                                                                                        <option value="06">June</option>
                                                                                                        <option value="07">July</option>
                                                                                                        <option value="08">August</option>
                                                                                                        <option value="09">September</option>
                                                                                                        <option value="10">October</option>
                                                                                                        <option value="11">November</option>
                                                                                                        <option value="12">December</option>
                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="mt-4 pt-3">
                                                                                        <div class="text-end">
                                                                                            <button class="btn btncl"><i class="fa fa-refresh"></i></button> 
                                                                                            <button class="btn btn2">Update</button>                                                                                                                
                                                                                        </div>
                                                                                    </div>
                                                                                </div>                                                                                                                                           
                                                                            </div>
                                                                        </form>
                                                                    </div>
                                                                </div>
                                                            </div><!--end col-->                                                               
                                                        </div>
                                                    </div>
                                                </div><!--end row--> 
                                       
                                         <div class="row align-items-center mt-4">
                                                <div class="col-md-12" style="background: rgb(255, 255, 255);border-radius: 0.25rem;">
                                                    <div class="education">
                                                        <i class="fa fa-briefcase" style="padding: 7px;"></i>Work Experience
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-md-6 mt-2">
                                                            <div style="margin:0px !important; font-size:12px;font-weight: 600;">
                                                                   Do you have any Work Experience?
                                                                <div class="form-check-inline ps-3">
                                                                    <label class="form-check-label" for="radio1">
                                                                        <input type="radio" {{ Auth::user()->is_work_experience == 1 ? 'checked' : ''}} class="form-check-input" name="work_experience" value="Yes"  style="font-size: 12px;" onclick="checkWorkExperience('1')"> Yes
                                                                    </label>
                                                                </div>
                                                                <div class="form-check-inline">
                                                                    <label class="form-check-label" for="radio2">
                                                                        <input type="radio" {{ Auth::user()->is_work_experience == 0 ? 'checked' : ''}} class="form-check-input" name="work_experience" value="No"  style="font-size: 12px;" onclick="checkWorkExperience('0')"> No
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                                                    
                                                        <div class="col-md-6 mt-2" id="add_div" style="display:none;">
                                                            <div class="text-end" style="margin:0px !important;">
                                                                <a role="button" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
                                                                    <button type="button" class="btn btn2" data-toggle="collapse" data-target="#demo1">Add</button>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>
                                                       <div class="col-md-12 mt-2">
                                                            <div id="demo1" class="collapse">
                                                                <div class="panel-body" style="padding:10px; background-color:#dedbf1;  border: 1px solid #e9e5e5; border-radius: 5px;">
                                                                   <form method="POST" action="{{ route('work-save') }}">
                                                                        @csrf
                                                                    <div class="row">
                                                                        <div class="col-md-3">
                                                                            <div class="mb-1">
                                                                                    <label class="form-label">Company Name <span class="text-danger">*</span></label>
                                                                                 <div class="form-icon position-relative">
                                                                                        <input type="text" for="company name" name="companyname" class="form-control ps-2" placeholder="Company Name" required="">
                                                                                 </div>
                                                                             </div>
                                                                        </div>
                                                                        <div class="col-md-3">
                                                                            <div class="mb-1">
                                                                                    <label class="form-label" for="designation">Designation <span class="text-danger">*</span></label>
                                                                              <div class="form-icon position-relative">
                                                                                    <input type="text" for="designation" name="designation" class="form-control ps-2" placeholder="Designation" required="">
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-md-3 mt-4" style="display:flex; font-size:15px; font-weight:600;">
                                                                                Currently working in that company?
                                                                            <div class="form-check form-switch" id="checkCurrentlyWorking" style="margin-left: 7px; margin-top: 14px;">
                                                                                    <input class="form-check-input" type="checkbox" name="currentlyworking" value="0" onchange="checkCurrentlyWorking(this)">
                                                                                    <label class="form-check-label" for="checkCurrentlyWorking"></label>
                                                                            </div>
                                                                        </div>
                                                                              <div class="col-md-3">
                                                                                    <div class="row">
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1">
                                                                                                    <label class="form-label">Start Date <span class="text-danger">*</span></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="startdate" id="start date" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Year</option>
                                                                                                        @php
                                                                                                            $firstYear = (int)date('Y') - 20;
                                                                                                            $lastYear = $firstYear + 20;
                                                                                                            for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                        @endphp
                                                                                                        <option value="{{$i}}">{{$i}}</option>
                                                                                                        @php
                                                                                                            }
                                                                                                        @endphp

                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1 mt-2">
                                                                                                    <label class="form-label"></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="startmonth" id="month" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Month</option>
                                                                                                        <option value="01">January</option>
                                                                                                        <option value="02">February</option>
                                                                                                        <option value="03">March</option>
                                                                                                        <option value="04">April</option>
                                                                                                        <option value="05">May</option>
                                                                                                        <option value="06">June</option>
                                                                                                        <option value="07">July</option>
                                                                                                        <option value="08">August</option>
                                                                                                        <option value="09">September</option>
                                                                                                        <option value="10">October</option>
                                                                                                        <option value="11">November</option>
                                                                                                        <option value="12">December</option>
                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3" id="end_date_div">
                                                                                    <div class="row">
                                                                                         <div class="col-md-6">
                                                                                            <div class="mb-1">
                                                                                                    <label class="form-label">End Date <span class="text-danger">*</span></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="enddate" id="end date" class="form-control frm">
                                                                                                        <option disabled="" selected="" value="">Year</option>
                                                                                                        @php
                                                                                                            $firstYear = (int)date('Y') - 20;
                                                                                                            $lastYear = $firstYear + 20;
                                                                                                            for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                        @endphp
                                                                                                        <option value="{{$i}}">{{$i}}</option>
                                                                                                        @php
                                                                                                            }
                                                                                                        @endphp

                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1 mt-2">
                                                                                                    <label class="form-label"></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="endmonth" id="month" class="form-control frm">
                                                                                                        <option disabled="" selected="" value="">Month</option>
                                                                                                        <option value="01">January</option>
                                                                                                        <option value="02">February</option>
                                                                                                        <option value="03">March</option>
                                                                                                        <option value="04">April</option>
                                                                                                        <option value="05">May</option>
                                                                                                        <option value="06">June</option>
                                                                                                        <option value="07">July</option>
                                                                                                        <option value="08">August</option>
                                                                                                        <option value="09">September</option>
                                                                                                        <option value="10">October</option>
                                                                                                        <option value="11">November</option>
                                                                                                        <option value="12">December</option>
                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                          </div>
                                                                        <div class="col-md-12">
                                                                             <div class="mt-2">
                                                                                <div class="text-end">
                                                                                    <button class="btn btncl"><i class="fa fa-refresh"></i></button> 
                                                                                    <button class="btn btn2" type="submit">Save</button>                                                                                                              
                                                                                </div>
                                                                            </div>
                                                                        </div>  
                                                                   </form>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    <div class="table-responsive mt-2">
                                                    @if(count($work_experience)>0)
                                                        <table class="table table-bordered list_table" style="margin-bottom: 10px;">
                                                            <thead>
                                                                <tr>
                                                                    <th>Company Name</th>
                                                                    <th>Designation</th>
                                                                    <th>Currently working</th>
                                                                    <th>Start Date</th>
                                                                    <th>End Date</th>
                                                                    <th>Action</th>
                                                                </tr>
                                                            </thead>
                                                            <tbody>
                                                               @foreach($work_experience as $row)                                                               
                                                                    <tr>
                                                                        <td style="font-size: 11px;">{{$row->company_name}}</td>
                                                                        <td style="font-size: 11px;">{{$row->designation}}</td> 
                                                                        <td style="font-size: 11px;">{{$row->currently_working == 0 ? 'off' : 'on'}}</td> 
                                                                        <td style="font-size: 11px;">{{date("d M, Y", strtotime($row->start_date))}}</td>
                                                                        <td style="font-size: 11px;">{{date("d M, Y", strtotime($row->end_date))}}</td>
                                                                         <td class="text-center" style="width: 75px;">
                                                                                <div class="icon_bar" style="border: none;">
                                                                                   <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
                                                                                        <i class="fa fa-edit" data-toggle="collapse" data-target="#demo12" onclick="editWork({{$row}})"></i>
                                                                                    </a>
                                                                                    <i class="fa fa-trash delete_work" data-id="{{ $row->id }}"></i>
                                                                                </div>
                                                                         </td>   
                                                                    </tr> 
                                                                @endforeach                                                              
                                                            </tbody>
                                                        </table>
                                                        @else
                                                        <div class="alert  mt-1 mb-3" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px;">
                                                            <span>No Work Experience available.</span>
                                                        </div> 
                                                        @endif
                                                    </div>
                                                    <div class="col-md-12 mb-1">
                                                            <div id="demo12" class="collapse">
                                                                <div class="panel-body mb-2" style="padding:10px; background-color:#dedbf1;  border: 1px solid #e9e5e5; border-radius: 5px;">
                                                                   <form method="POST" action="{{ route('work-save') }}"  id="edit-work">
                                                                        @csrf
                                                                    <div class="row">
                                                                        <div class="col-md-3">
                                                                            <div class="mb-1">
                                                                                    <label class="form-label">Company Name <span class="text-danger">*</span></label>
                                                                                 <div class="form-icon position-relative">
                                                                                        <input type="text" for="company name" name="companyname" class="form-control ps-2" placeholder="Company Name" required="">
                                                                                 </div>
                                                                             </div>
                                                                        </div>
                                                                        <div class="col-md-3">
                                                                            <div class="mb-1">
                                                                                    <label class="form-label" for="designation">Designation <span class="text-danger">*</span></label>
                                                                              <div class="form-icon position-relative">
                                                                                    <input type="text" for="designation" name="designation" class="form-control ps-2" placeholder="Designation" required="">
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-md-3 mt-4" style="display:flex; font-size:15px; font-weight:600;">
                                                                                Currently working in that company?
                                                                            <div class="form-check form-switch" style="margin-left: 7px; margin-top: 14px;">
                                                                                    <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" name="checkbox">
                                                                                    <label class="form-check-label" for="flexSwitchCheckChecked"></label>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-md-3">
                                                                                    <div class="row">
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1">
                                                                                                    <label class="form-label">Start Date <span class="text-danger">*</span></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="startdate" id="start date" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Year</option>
                                                                                                        @php
                                                                                                            $firstYear = (int)date('Y') - 20;
                                                                                                            $lastYear = $firstYear + 20;
                                                                                                            for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                        @endphp
                                                                                                        <option value="{{$i}}">{{$i}}</option>
                                                                                                        @php
                                                                                                            }
                                                                                                        @endphp

                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1 mt-2">
                                                                                                    <label class="form-label"></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="startmonth" id="month" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Month</option>
                                                                                                        <option value="01">January</option>
                                                                                                        <option value="02">February</option>
                                                                                                        <option value="03">March</option>
                                                                                                        <option value="04">April</option>
                                                                                                        <option value="05">May</option>
                                                                                                        <option value="06">June</option>
                                                                                                        <option value="07">July</option>
                                                                                                        <option value="08">August</option>
                                                                                                        <option value="09">September</option>
                                                                                                        <option value="10">October</option>
                                                                                                        <option value="11">November</option>
                                                                                                        <option value="12">December</option>
                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-md-3">
                                                                                    <div class="row">
                                                                                         <div class="col-md-6">
                                                                                            <div class="mb-1">
                                                                                                    <label class="form-label">End Date <span class="text-danger">*</span></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="enddate" id="end date" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Year</option>
                                                                                                        @php
                                                                                                            $firstYear = (int)date('Y') - 20;
                                                                                                            $lastYear = $firstYear + 20;
                                                                                                            for($i=$firstYear;$i<=$lastYear;$i++){
                                                                                                        @endphp
                                                                                                        <option value="{{$i}}">{{$i}}</option>
                                                                                                        @php
                                                                                                            }
                                                                                                        @endphp

                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="col-md-6">
                                                                                            <div class="mb-1 mt-2">
                                                                                                    <label class="form-label"></label>
                                                                                                <div class="form-icon position-relative">
                                                                                                    <select name="endmonth" id="month" class="form-control frm" required="">
                                                                                                        <option disabled="" selected="" value="">Month</option>
                                                                                                        <option value="01">January</option>
                                                                                                        <option value="02">February</option>
                                                                                                        <option value="03">March</option>
                                                                                                        <option value="04">April</option>
                                                                                                        <option value="05">May</option>
                                                                                                        <option value="06">June</option>
                                                                                                        <option value="07">July</option>
                                                                                                        <option value="08">August</option>
                                                                                                        <option value="09">September</option>
                                                                                                        <option value="10">October</option>
                                                                                                        <option value="11">November</option>
                                                                                                        <option value="12">December</option>
                                                                                                    </select>
                                                                                                </div>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                        <div class="col-md-12">
                                                                             <div class="mt-3">
                                                                                <div class="text-end">
                                                                                    <button class="btn btncl"><i class="fa fa-refresh"></i></button> 
                                                                                    <button class="btn btn2">Update</button>                                                                                                                
                                                                                </div>
                                                                            </div>
                                                                        </div>                                                                                                                                   
                                                                    </div>
                                                                </form>
                                                                </div>
                                                            </div>
                                                        </div>
                                                </div>
                                           </div><!--end row-->  
                                           <div class="row align-items-center mt-4">
                                                <div class="col-md-12" style="background: rgb(255, 255, 255);border-radius: 0.25rem;">
                                                    <div class="education">
                                                        <i class="fa fa-align-center" style="padding: 7px;"></i>Test Score
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-md-6 mt-2">
                                                            <div style="margin:0px !important; font-size:12px;font-weight: 600;">
                                                                   Do you have any Test Score?
                                                                <div class="form-check-inline ps-3">
                                                                    <label class="form-check-label" for="radio1">
                                                                        <input type="radio" {{ Auth::user()->is_test_score == 1 ? 'checked' : ''}} class="form-check-input" name="test_score" value="yes"  style="font-size: 12px;"  onclick="checkTestScore('1')"> Yes
                                                                    </label>
                                                                </div>
                                                                <div class="form-check-inline">
                                                                    <label class="form-check-label" for="radio2">
                                                                        <input type="radio" {{ Auth::user()->is_test_score == 0 ? 'checked' : ''}} class="form-check-input" name="test_score" value="no"  style="font-size: 12px;"  onclick="checkTestScore('0')"> No
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="col-md-6 mt-2" id="add_test_div" style="display:none;">
                                                            <div class="text-end" style="margin:0px !important;">
                                                                <a role="button" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
                                                                    <button type="button" class="btn btn2" data-toggle="collapse" data-target="#demo2">Add</button>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div id="demo2" class="collapse">
                                                            <div class="col-md-12">
                                                                                                                 
                                                              <div class="col-md-2">
                                                                   <div class="btn-group test_list">
                                                                        <button class="btn btn5" onclick="changeTestName('IELTS')">IELTS</button>       
                                                                        <button class="btn btn6" onclick="changeTestName('PTE')">PTE</button>       
                                                                        <button class="btn btn7" onclick="changeTestName('TOEFL')">TOEFL</button>           
                                                                    </div>
                                                              </div>
                                                     
                                                        <div class="panel-body" style="padding:10px; background-color:adedbf1;  border: 1px solid #e9e5e5; border-radius: 5px;">
                                                            <form method="POST" action="{{ route('score-save') }}">
                                                                        @csrf
                                                               <div class="row">
                                                                    <div class="col-md-4">
                                                                        <div class="mb-1">
                                                                               <label class="form-label" for="test date">Test Date</label>
                                                                            <div class="form-icon position-relative">
                                                                               <input name="testdate" type="text" class="form-control start" placeholder="Test Date" autocomplete="off">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4">
                                                                       <div class="mb-1">
                                                                               <label class="form-label" for="expiration date">Expiration Date</label>
                                                                            <div class="form-icon position-relative">
                                                                               <input name="expirationdate" type="text" class="form-control end" placeholder="Expiration Date" autocomplete="off">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4">
                                                                        <div class="mb-1">
                                                                                <label class="form-label" for="test name">Test Name</label>
                                                                            <div class="form-icon position-relative">
                                                                                <input type="text"  for="test name" name="testname" class="form-control ps-2" id="testname" placeholder="IELTS" required="">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    
                                                                        <div class="row">
                                                                            <div class="col-md-2 mt-2">
                                                                                <div class="mb-1">
                                                                                        <label class="form-label">Overall Score</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="overall score" name="overallscore" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mb-1 mt-2">
                                                                                        <label class="form-label">Listening</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="listening" name="listening" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mb-1 mt-2">
                                                                                        <label class="form-label">Speaking</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="speaking" name="speaking" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mb-1 mt-2">
                                                                                        <label class="form-label">Writing</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="writing" name="writing" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mb-1 mt-2">
                                                                                        <label class="form-label">Reading</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="reading" name="reading" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mt-4 pt-4">
                                                                                    <div class="text-end">
                                                                                        <button class="btn btncl"><i class="fa fa-refresh"></i></button> 
                                                                                        <button class="btn btn2">Save</button>                                                                                                                
                                                                                    </div>
                                                                                </div>
                                                                            </div>     
                                                                        </div>                                                                                                                                                                                                                                                                     
                                                                   </div>
                                                              </form>
                                                            </div> 
                                                       
                                                        </div>
                                                    </div>
                                                    <div class="table-responsive mt-2">
                                                    @if(count($score)>0)
                                                        <table class="table table-bordered list_table" style="margin-bottom:10px;">
                                                            <tbody>
                                                            @foreach($score as $row)
                                                                <tr>
                                                                    <td>
                                                                         <div class="institute_info">
                                                                            <div class="left">
                                                                                <i class="fa fa-align-center" style="padding: 7px;"></i>
                                                                            </div>
                                                                            <div class="right">
                                                                                <span class="main_title" style="font-size: 11px;font-weight: 600; display: flex;"> Testing System</span>
                                                                                <span class="label_badge_light test_score_level">{{$row->test_name}}</span>
                                                                                <span style="font-weight: 400; font-size: 12px;">Test Date: {{date("d M, Y", strtotime($row->test_date))}}</span>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                    <td class="text-center">
                                                                        <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->overall_score}}</strong><br>
                                                                        <strong style="color: rgb(57, 59, 62); font-size: 12px;">Overall</strong>
                                                                    </td>
                                                                    <td class="text-center">
                                                                        <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->listening}}</strong><br>
                                                                        <strong style="font-size: 12px;">Listening</strong>
                                                                    </td>
                                                                    <td class="text-center">
                                                                        <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->speaking}}</strong><br>
                                                                        <strong style="font-size: 12px;">Speaking</strong>
                                                                    </td>
                                                                    <td class="text-center">
                                                                        <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->writing}}</strong><br>
                                                                        <strong style="font-size: 12px;">Writing</strong>
                                                                    </td>
                                                                    <td class="text-center">
                                                                        <strong style="color: rgb(57, 59, 62); font-size: 12px;">{{$row->reading}}</strong><br>
                                                                        <strong style="font-size: 12px;">Reading</strong>
                                                                    </td>
                                                                    <td class="text-center" style="width: 75px;">
                                                                        <div class="icon_bar">
                                                                             <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
                                                                                    <i class="fa fa-edit" data-toggle="collapse" data-target="#demo13" onclick="editScore({{$row}})"></i>
                                                                                </a>
                                                                                <i class="fa fa-trash delete_score" data-id="{{ $row->id }}"></i>
                                                                        </div>
                                                                    </td>                                                       
                                                                </tr>
                                                                @endforeach
                                                            </tbody>
                                                        </table>
                                                        @else
                                                            <div class="alert  mt-1 mb-3" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px;">
                                                                <span>No Test Score available.</span>
                                                            </div> 
                                                        @endif
                                                    </div>
                                            <div class="col-md-12">
                                                <div id="demo13" class="collapse">
                                                    <div class="col-md-12">                                                                                                                                                                                             
                                                        <div class="panel-body mb-2" style="padding:10px; background-color:#dedbf1;  border: 1px solid #e9e5e5; border-radius: 5px;">
                                                            <form method="POST" action="{{ route('score-save') }}" id="edit-score">
                                                                        @csrf
                                                               <div class="row">
                                                                    <div class="col-md-4">
                                                                        <div class="mb-1">
                                                                               <label class="form-label" for="test date">Test Date</label>
                                                                            <div class="form-icon position-relative">
                                                                               <input name="testdate" type="text" class="form-control date" placeholder="Test Date" autocomplete="off">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4">
                                                                       <div class="mb-1">
                                                                               <label class="form-label" for="expiration date">Expiration Date</label>
                                                                            <div class="form-icon position-relative">
                                                                               <input name="expirationdate" type="text" class="form-control date1" placeholder="Expiration Date" autocomplete="off">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4">
                                                                        <div class="mb-1">
                                                                                <label class="form-label" for="test name">Test Name</label>
                                                                            <div class="form-icon position-relative">
                                                                                <input type="text"  for="test name" name="testname" class="form-control ps-2" id="testname" placeholder="IELTS" required="">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    
                                                                        <div class="row">
                                                                            <div class="col-md-2 mt-2">
                                                                                <div class="mb-1">
                                                                                        <label class="form-label">Overall Score</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="overall score" name="overallscore" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mb-1 mt-2">
                                                                                        <label class="form-label">Listening</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="listening" name="listening" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mb-1 mt-2">
                                                                                        <label class="form-label">Speaking</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="speaking" name="speaking" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mb-1 mt-2">
                                                                                        <label class="form-label">Writing</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="writing" name="writing" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mb-1 mt-2">
                                                                                        <label class="form-label">Reading</label>
                                                                                    <div class="form-icon position-relative">
                                                                                        <input type="text"  for="reading" name="reading" class="form-control ps-2" placeholder="Enter Score" required="">
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-2">
                                                                                <div class="mt-4 pt-4">
                                                                                    <div class="text-end">
                                                                                        <button class="btn btncl"><i class="fa fa-refresh"></i></button> 
                                                                                        <button class="btn btn2">Update</button>                                                                                                                
                                                                                    </div>
                                                                                </div>
                                                                            </div>     
                                                                        </div>                                                                                                                                                                                                                                                                     
                                                                   </div>
                                                              </form>
                                                            </div> 
                                                       
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>                                                           
                                         </div><!--end col-->
                                        @php
                                        $button_status=false;
                                        if(Auth::user()->is_work_experience == 1 && count($work_experience)>0 &&  Auth::user()->is_test_score == 1 && count($score)>0){
                                            $button_status=true;   
                                        }
                                        if(Auth::user()->is_work_experience == 0 &&  Auth::user()->is_test_score == 1 && count($score)>0){
                                            $button_status=true;   
                                        }
                                        if(Auth::user()->is_work_experience == 1 && count($work_experience)>0 &&  Auth::user()->is_test_score == 0){
                                            $button_status=true;   
                                        }
                                        if(Auth::user()->is_work_experience == 0  &&  Auth::user()->is_test_score == 0){
                                            $button_status=true;   
                                        }
                                        @endphp
                                        @if($button_status)
                                            <div class="col-lg-12 mt-3 mb-3 ms-3" style="width:100%;">
                                                <a href="{{route('save-as-complete')}}" class="btn btn3 pull-right">Save as complete</a>    
                                            </div>
                                        @endif
                                </div><!--end col-->
                                    
                                    
                                </div><!--end row-->
                            </div><!--end container-->
                        </div>

                        @else
                        <div class="card rounded border-0 shadow" style="background-color:white;">
                                <div class="row">
                                    <div class="col-12">
                                        <div class="tab">
                                            <!-- Proposal Tab -->
                                                <div class="col-md-12 p-4">
                                                    <form method="POST" action="{{ route('proposal-save') }}">
                                                        @csrf
                                                       
                                                            <div class="col-md-12">
                                                                <div class="mb-2">
                                                                    <label class="form-label">Title</label>
                                                                    <div class="form-icon position-relative">
                                                                        <input type="text" class="form-control" placeholder="Title" name="title" required="">
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        <div class="row">
                                                            <div class="col-md-4 back">
                                                                <div class="mb-2">
                                                                    <label class="form-label">Methology</label>
                                                                    <select class="form-control" id="" name="methology">
                                                                        <option>Methology</option>
                                                                        <option>Quantitative </option>
                                                                        <option>Qualitative </option>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                
                                                            <div class="col-md-4">
                                                                <div class="mb-2">
                                                                    <label class="form-label">Department</label>
                                                                    <div class="form-icon position-relative">
                                                                        <input type="text" class="form-control" placeholder="Department" name="department" required="">
                                                                    </div>
                                                                </div>
                                                            </div>
                                                    
                                                            <div class="col-md-4 back">
                                                                <div class="mb-2">
                                                                    <label class="form-label">Funding Status</label>
                                                                    <select class="form-control" id="" name="status">
                                                                        <option>Funding Status</option>
                                                                        <option>Self-Funded</option>
                                                                        <option>Govt. Scholarship</option>
                                                                        <option>Other Scholarship</option>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                        <div class="col-md-10">
                                                                <label class="form-label" for="proposal">Proposal</label>
                                                                <input type="file" accept="application/pdf,application/docx,application/doc" name="documentfile" id="documentfile" class="form-control">
                                                            </div>
                                                        <div class="col-md-2">
                                                            <div class="mt-4 pt-3">
                                                                <div class="text-end">
                                                                    <button class="btn btn2">Save</button>                                                                                                                
                                                                </div>
                                                            </div>
                                                        </div> 
                                                        </div>    
                                                    </form>
                                                </div>
                                                
                                                <!--proposal table -->

                                                <div class="col-md-12 mb-1">
                                                    <div class="scrolled_content_part" style="width: 96%; margin-left: 20px;">
                                                        <div class="single_ad_pref_item1">                                                                         
                                                            <div class="serial">
                                                                <strong style="font-size:13px; margin-left: 10px;">Serial No</strong>
                                                            </div>
                                                            <div class="pro_title"  style="margin-right:9rem !important;">                                                         
                                                                <strong style="font-size:13px;">Title</strong></br>                                                   
                                                            </div>
                                                            <div class="pro_type"  style="margin-right:3rem !important;">                                                                          
                                                                <strong style="font-size:13px;">Proposal</strong>                                                                         
                                                            </div>
                                                            <div class="actions">                                                                          
                                                                <strong style="font-size:13px; margin-right: 20px;">Action</strong>                                                                            
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>  
                                                <div class="col-md-12 mb-1">
                                                    <div style="width: 96%; margin-left: 20px;">
                                                        @foreach($proposal as $row)    
                                                            <div class="single_ad_pref_item2">
                                                                <div class="student mt-2 pt-1" style="width: 20%; margin-left: 10px;">                                                                                                                                    
                                                                    <strong style="font-size:13px; margin-left: 20px;">{{$row->student_id}}</strong>                                                               
                                                                </div>
                                                                <div class="pro_title" style="width: 46%; margin-left: 5.5rem;">
                                                                    <strong style="font-size:13px;">{{$row->title}}</strong></br>
                                                                    <span style="font-size:10px;">{{$row->methology}}</span>
                                                                    <span>.</span>
                                                                    <span style="font-size:10px;">{{$row->department}}</span> 
                                                                    <span>.</span>  
                                                                    <span style="font-size:10px;">{{$row->status}}</span>                                              
                                                                </div>
                                                                <div class="pro_type mt-2 pt-1" style="width: 20%;">                                                                          
                                                                    <strong style="font-size:13px;">pdf</strong>                                                                         
                                                                </div>
                                                                <div class="mt-2 pt-1" style="margin-right: 10px; width: 20%; text-align: end;">                                                                          
                                                                    <a role="" data-bs-toggle="collapse" data-bs-parent="#collapse" href="#collapse2" aria-expanded="true" aria-controls="collapse2">
                                                                        <i class="fa fa-edit change_pass_btn" style="font-size: 13px !important; padding: 4px;"  data-toggle="collapse" data-target="#demo14" onclick="editProposal({{$row}})"></i>
                                                                    </a> 
                                                                        <i class="fa fa-eye change_pass_btn" style="font-size: 13px !important; padding: 4px;"></i>
                                                                        <i class="fa fa-trash change_pass_btn delete_proposal" style="font-size: 13px !important; padding: 4px;" data-id="{{ $row->id }}"></i>                                                                          
                                                                </div>
                                                            </div>
                                                        @endforeach   
                                                    </div>
                                                </div>  

                                                <!-- proposal Edit -->

                                                <div class="col-md-12 mb-4">
                                                    <div id="demo14" class="collapse" style="width: 95%; margin-left: 24px;">
                                                        <div class="panel-body" style="padding:10px; background-color:#dedbf1;  border: 1px solid #e9e5e5; border-radius: 5px;">
                                                            <form method="POST" action="" id="edit-proposal">
                                                                @csrf
                                                                    <div class="col-md-12">
                                                                        <div class="mb-1">
                                                                            <label class="form-label">Title</label>
                                                                            <div class="form-icon position-relative">
                                                                                <input type="text" class="form-control" placeholder="Title" name="title" required="">
                                                                            </div>
                                                                        </div>
                                                                    </div>  
                                                                    <div class="row">                                                                               
                                                                        <div class="col-md-4 back">
                                                                            <div class="mb-1">
                                                                                    <label class="form-label">Methology</label>
                                                                                <select class="form-control" id="" name="methology">
                                                                                    <option>Methology</option>
                                                                                    <option>Quantitative </option>
                                                                                    <option>Qualitative </option>
                                                                                </select>
                                                                            </div>
                                                                        </div> 

                                                                        <div class="col-md-4">
                                                                            <div class="mb-1">
                                                                                <label class="form-label">Department</label>
                                                                                <div class="form-icon position-relative">
                                                                                    <input type="text" class="form-control" placeholder="Department" name="department" required="">
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                            
                                                                        <div class="col-md-4 back">
                                                                            <div class="mb-1">
                                                                                <label class="form-label">Funding Status</label>
                                                                                <select class="form-control" id="" name="status">
                                                                                    <option>Funding Status</option>
                                                                                    <option>Self-Funded</option>
                                                                                    <option>Govt. Scholarship</option>
                                                                                    <option>Other Scholarship</option>
                                                                                </select>
                                                                            </div>
                                                                        </div>
                                                                  </div>
                                                                <div class="row">
                                                                    <div class="col-md-10 mb-3">
                                                                        <label class="form-label" for="proposal">Proposal</label>
                                                                        <input type="file" accept="application/pdf,application/docx,application/doc" name="documentfile" id="documentfile" class="form-control">
                                                                    </div>  
                                                                    <div class="col-md-2">
                                                                        <div class="mt-4 pt-3">
                                                                            <div class="text-end">
                                                                                <button class="btn btncl"><i class="fa fa-refresh"></i></button> 
                                                                                <button class="btn btn2">Update</button>                                                                                                                
                                                                            </div>
                                                                        </div>
                                                                    </div> 
                                                                </div>                                                                                                                                             
                                                            </form>
                                                        </div>
                                                    </div>                                                                                                                    
                                                </div> 
 
                                                <div class="col-md-12">
                                                    <!-- <form method="POST" enctype="multipart/form-data" action="{{route('proposal_media_upload')}}">
                                                        @csrf
                                                        <div class="col-md-12 p-4" style="margin-top: -1rem; display:flex;">
                                                            <div class="col-md-10">
                                                                <label class="form-label" for="proposal">Proposal</label>
                                                                <input type="file" accept="application/pdf,application/docx,application/doc" name="documentfile" id="documentfile" class="form-control">
                                                            </div>
                                                            <div class="col-md-2 text-end mt-4 pt-3">
                                                                <button class="btn btn2">Upload</button>                                                                                                                
                                                            </div>                               
                                                        </div>
                                                    </form> -->
                                                    <!-- @foreach($proposal_files as $row)         
                                                        <div class="col-md-12 mb-4">
                                                            <div class="scrolled_content_part" style="width: 96%; margin-left: 20px;">
                                                                <div class="single_ad_pref_item">
                                                                    <div class="destination">                                                                           
                                                                        <div class="destination_info">
                                                                            <strong style="font-size:13px;">Proposal</strong>
                                                                        </div>
                                                                    </div>
                                                                    <div class="left">
                                                                        <div class="uni_details">                                                                                
                                                                            <div class="inner_right">
                                                                                <strong style="font-size:13px;">{{$row->file_type}}</strong></br>                                                   
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="middle">
                                                                        <span style="font-size:11px;">{{$row->created_at}}</span></br>
                                                                        
                                                                    </div>
                                                                    <div class="left">                                                                          
                                                                            <span style="font-size:11px;">0 views</span>                                                                            
                                                                        </div>
                                                                    <div class="status_column">
                                                                                                                      
                                                                        <div class="right">
                                                                            <i class="fa fa-eye change_pass_btn" style="font-size: 13px !important; padding: 4px;"></i>
                                                                            <i class="fa fa-trash change_pass_btn delete_proposal" style="font-size: 13px !important; padding: 4px;" data-id="{{ $row->id }}"></i>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>  
                                                    @endforeach -->
                                                </div>
                                       

                                        </div>
                                    </div>
                                </div>
                                
                            </div> 
                        @endif
                </div><!--end row-->
            </div><!--end container-->
        </section><!--end section-->
        <!-- Hero End -->

@endsection
@push('js')

<script type="text/javascript">
    $( function() {
        datepicker('.date');
        datepicker('.date1');
    });    
    $('.delete_education').on('click', function(e) {
        e.preventDefault();  
        var delete_url="{{ url('education-remove') }}/"+$(this).data('id');
        swal({
            title: "Are you sure?",
            text: "You will not be able to recover this data!",
            type: "warning",
            showCancelButton: true,
            buttonsStyling: false,
            confirmButtonClass: 'btn btn-primary',
            cancelButtonClass: 'btn btn-light',
            confirmButtonText: "Yes, delete!",
            cancelButtonText: "No, cancel!"
        },
        function(isConfirm){
            if(isConfirm){
                $.ajax({
                    url:delete_url,
                    type: "GET",
                    success: function(data){
                        setTimeout(function() { location.reload(); }, 1000);
                    }
                });
            }
        });
    });
    $('.delete_work').on('click', function(e) {
        e.preventDefault();  
        var delete_url="{{ url('work-remove') }}/"+$(this).data('id');
        swal({
            title: "Are you sure?",
            text: "You will not be able to recover this data!",
            type: "warning",
            showCancelButton: true,
            buttonsStyling: false,
            confirmButtonClass: 'btn btn-primary',
            cancelButtonClass: 'btn btn-light',
            confirmButtonText: "Yes, delete!",
            cancelButtonText: "No, cancel!"
        },
        function(isConfirm){
            if(isConfirm){
                $.ajax({
                    url:delete_url,
                    type: "GET",
                    success: function(data){
                        setTimeout(function() { location.reload(); }, 1000);
                    }
                });
            }
        });
    });
    $('.delete_score').on('click', function(e) {
        e.preventDefault();  
        var delete_url="{{ url('score-remove') }}/"+$(this).data('id');
        swal({
            title: "Are you sure?",
            text: "You will not be able to recover this data!",
            type: "warning",
            showCancelButton: true,
            buttonsStyling: false,
            confirmButtonClass: 'btn btn-primary',
            cancelButtonClass: 'btn btn-light',
            confirmButtonText: "Yes, delete!",
            cancelButtonText: "No, cancel!"
        },
        function(isConfirm){
            if(isConfirm){
                $.ajax({
                    url:delete_url,
                    type: "GET",
                    success: function(data){
                        setTimeout(function() { location.reload(); }, 1000);
                    }
                });
            }
        });
    });
    $('.delete_proposal').on('click', function(e) {
        e.preventDefault();  
        var delete_url="{{ url('proposal-remove') }}/"+$(this).data('id');
        swal({
            title: "Are you sure?",
            text: "You will not be able to recover this data!",
            type: "warning",
            showCancelButton: true,
            buttonsStyling: false,
            confirmButtonClass: 'btn btn-primary',
            cancelButtonClass: 'btn btn-light',
            confirmButtonText: "Yes, delete!",
            cancelButtonText: "No, cancel!"
        },
        function(isConfirm){
            if(isConfirm){
                $.ajax({
                    url:delete_url,
                    type: "GET",
                    success: function(data){
                        setTimeout(function() { location.reload(); }, 1000);
                    }
                });
            }
        });
    });
    function editInstitute(row){       
        $('#edit-institute').attr("action","{{ url('institution-update') }}/"+row.id);
        $('#edit-institute').find('select[name="academiclevel"]').val(row.academic_level).trigger('change'); 
        $('#edit-institute').find('input[name="subject"]').val(row.subject);
        $('#edit-institute').find('input[name="institution"]').val(row.institution);
        $('#edit-institute').find('select[name="passingyear"]').val(row.passing_year).trigger('change');
        $('#edit-institute').find('input[name="result"]').val(row.result);
        $('#edit-institute').find('select[name="startdate"]').val(new Date(row.start_date).getFullYear()).trigger('change');
        $('#edit-institute').find('select[name="startmonth"]').val(String(new Date(row.start_date).getUTCMonth() + 1).padStart(2, '0')).trigger('change');
        $('#edit-institute').find('select[name="enddate"]').val(new Date(row.end_date).getFullYear()).trigger('change');
        $('#edit-institute').find('select[name="endmonth"]').val(String(new Date(row.end_date).getUTCMonth() + 1).padStart(2, '0')).trigger('change');
    }
    function editWork(row){
        $('#edit-work').attr("action","{{ url('work-update') }}/"+row.id);       
        $('#edit-work').find('input[name="companyname"]').val(row.company_name); 
        $('#edit-work').find('input[name="designation"]').val(row.designation);
        // $('#edit-work').find('input[name="checkbox"]').val(row.checkbox);
        $('#edit-work').find('select[name="startdate"]').val(new Date(row.start_date).getFullYear()).trigger('change');
        $('#edit-work').find('select[name="startmonth"]').val(String(new Date(row.start_date).getUTCMonth() + 1).padStart(2, '0')).trigger('change'); 
        $('#edit-work').find('select[name="enddate"]').val(new Date(row.end_date).getFullYear()).trigger('change');
        $('#edit-work').find('select[name="endmonth"]').val(String(new Date(row.end_date).getUTCMonth() + 1).padStart(2, '0')).trigger('change');
    }
     function editScore(row){  
        console.log(new Date(row.test_date).toDateString());
        $('#edit-score').attr("action","{{ url('score-update') }}/"+row.id);            
        $('#edit-score').find('input[name="testdate"]').val(new Date(row.test_date).toDateString()); 
        $('#edit-score').find('input[name="expirationdate"]').val(new Date(row.expiration_date).toDateString());
        $('#edit-score').find('input[name="testname"]').val(row.test_name);
        $('#edit-score').find('input[name="overallscore"]').val(row.overall_score);
        $('#edit-score').find('input[name="listening"]').val(row.listening);
        $('#edit-score').find('input[name="writing"]').val(row.writing);
        $('#edit-score').find('input[name="reading"]').val(row.reading);
        $('#edit-score').find('input[name="speaking"]').val(row.speaking);
    }
      function editProposal(row){   
        // console.log(row); 
        $('#edit-proposal').attr("action","{{ url('proposal-update') }}/"+row.id); 
        $('#edit-proposal').find('input[name="title"]').val(row.title);
        $('#edit-proposal').find('select[name="methology"]').val(row.methology).trigger('change');
        $('#edit-proposal').find('input[name="department"]').val(row.department);
        $('#edit-proposal').find('select[name="status"]').val(row.status).trigger('change');
     }
</script>
@endpush