@extends('frontend.layouts.app')

@section('content')
@php
    $breadCrump2 = 'Candidate Detail';
@endphp



<!--Job listing start -->
<div class="wrapper-inner">
   <div class="my-job">
    <div class="container">
    <div class="headingBlock d-flex align-items-center justify-content-between">
      <h4>Candidate Detail</h4>
      <div>
        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#shortlistModal">
            Shortlist
        </button>
      </div>
    </div>
    <div class="row">
      <div class="col-md-4">
        <div class="form-group">
          <label>First Name </label>
          <div class="form-group-input">
            <strong>{{$user->first_name?? ''}}</strong>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label>Last Name</label>
          <div class="form-group-input">
            <strong>{{$user->last_name?? ''}}</strong>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label>Mobile Number </label>
          <div class="form-group-input">
            <strong>{{$user->mobile}}</strong>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label>Email</label>
          <div class="form-group-input">
            <strong>{{$user->email}}</strong>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label>Education & Qualification</label>
          <div class="form-group-input">
            <strong>{{$user->userInformations?->qualification}}</strong>
          </div>
        </div>
      </div>
      @if($user->userInformations?->resume)
      <div class="col-md-4">
        <div class="form-group">
          <label>Resume</label>
          <div class="form-group-input">
            <div class="d-flex resume-bx align-items-center g-10">
                <img src="{{ asset('frontend/jobseeker/resume/' . $user->userInformations?->resume) }}" alt="">
                <a href="{{ asset('frontend/jobseeker/resume/' . $user->userInformations?->resume) }}" download class="btn-custom ml-2">Download</a>
            </div>
          </div>
        </div>
      </div>
      @endif
      <div class="col-md-4">
        <div class="form-group">
          <label>Professional Summary</label>
          <div class="form-group-input">
           <strong>{!!$user->userInformations?->about_us!!}</strong>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label>Address Line</label>
          <div class="form-group-input">
            <strong>{{ $user->userInformations?->address }}</strong>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label>Country</label>
          <div class="form-group-input">
            <strong>{{$user->userInformations?->country?->name}}</strong>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label>State</label>
          <strong class="d-block">{{$user->userInformations?->state?->name}}</strong>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label>City</label>
          <div class="form-group-input">
            <strong>{{$user->userInformations?->city?->name}}</strong>
          </div>
        </div>
      </div>


    <div class="col-md-4">
      <div class="form-group">
        <label>Zip Code</label>
        <div class="form-group-input">
          <strong>{{$user->userInformations?->post_code}}</strong>
        </div>
      </div>
    </div>

    <div class="col-md-12">
        <br>
        <br>
        <u><h4>Experience Details</h4></u>
    </div>
@foreach ($user->jobSeekerExperiences as $jobSeekerExperience)
<div class="col-md-4">
    <div class="form-group">
      <label>Company Name</label>
      <div class="form-group-input">
        <strong>{{$jobSeekerExperience->company_name}}</strong>
      </div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="form-group">
      <label>Job Title</label>
      <div class="form-group-input">
        <strong>{{$jobSeekerExperience->job_title}}</strong>
      </div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="form-group">
      <label>Start Date </label>
      <div class="form-group-input">
        <strong>{{Carbon::parse($jobSeekerExperience->start_date)->format(config('GET.front_date_format'))}}</strong>
      </div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="form-group">
      <label>End Date</label>
      <div class="form-group-input">
        <strong>{{Carbon::parse($jobSeekerExperience->end_date)->format(config('GET.front_date_format'))}}</strong>
      </div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="form-group">
      <label>Responsibilities</label>
      <div class="form-group-input">
        <strong>{{$jobSeekerExperience->responsibilities}}</strong>
      </div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="form-group">

    </div>
  </div>
  @endforeach

  <div class="col-md-12">
      <br>
      <br>
    <u><h4>Skills & Competencies</h4></u>
</div>
  @foreach ($user->jobSeekerSkills as $jobSeekerSkill)
   <div class="col-md-4">
    <div class="form-group">
      <label>Skills & Competencies</label>
      <div class="form-group-input">
        <strong>{{$jobSeekerSkill->skill?->title}}</strong>
      </div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="form-group">
        <label>Level</label>
      <div class="form-group-input">
        <strong>{{$jobSeekerSkill->skill_level}}</strong>
    </div>
</div>
  </div>

  <div class="col-md-4">
    <div class="form-group">
      <div class="form-group-input">
    </div>
    </div>
  </div>


  @endforeach
  <div class="col-md-12">

    <div class="form-group">

  <br>
  <br>
</div>
</div>
    <div class="col-md-4">

      <div class="form-group">
        <label>linkedin</label>
        <div class="form-group-input">
          <strong>{{($user->userInformations?->linkedin)?? '-'}}</strong>
        </div>
      </div>
    </div>

    <div class="col-md-4">
      <div class="form-group">
        <label>Portfolio Url</label>
        <div class="form-group-input">
          <strong>{{(($user->userInformations?->portfolio)?? '-')}}</strong>
        </div>
      </div>
    </div>
    <div class="col-md-4">
      <div class="form-group">
        <label>Language</label>
        <div class="form-group-input">
           <strong>
            {{ $user->jobSeekerLanguages->pluck('language')->implode(', ') }}
           </strong>

        </div>
      </div>
    </div>
  </div>

    </div>
   </div>

</div>

<!-- Shortlist Modal -->
<div class="modal fade" id="shortlistModal" tabindex="-1" role="dialog" aria-labelledby="shortlistModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="shortlistModalLabel">Shortlist for Job</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form id="shortlistForm"  action="{{route('employer.request.sent')}}">
                    @csrf
                    <div class="form-group">

                        <label for="jobSelect">Select Job</label>
                        <select class="form-control" id="jobSelect" name="job_id" required>
                            <option value="">Select a Job</option>
                            @foreach ($jobs as $job)
                                <option value="{{ $job->id }}">{{ $job->title }}</option>
                            @endforeach
                        </select>
                        <input type="hidden" value="{{$user->id}}" name="user_id">
                    </div>
                    <button type="submit" class="btn btn-primary">Submit</button>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- Job listing start -->

    <!-- Job listing start -->

@endsection


@push('front-script')
<script>

</script>
@endpush
