@extends('layouts.landing') @section('title', 'Mentor') @section('content')

Mentor's Profile

@if(isset($user->cover)) image @elseif($user->cover == null) image @elseif($user->cover == 'null') image @else image @endif
image

{{$user->first_name}} {{$user->last_name}} {{$user->area_of_specialization}}

@if(Auth::user()->isSuperAdmin() || Auth::user()->isTenant() || Auth::user()->isAdmin()) @if($mentor->status == 'pending')
@csrf
@elseif($mentor->status == 'accepted')
@csrf
@elseif($mentor->status == 'declined')
@csrf
@endif @elseif($mentor->user_id == Auth::user()->id) @if($mentor->status == 'pending') Status: Pending @elseif($mentor->status == 'accepted') Status: Approved @elseif($mentor->status == 'declined') Status: Declined @endif @else @if($mentor_request) @if($mentor_request->status == 'pending') Request sent Book a Session @elseif($mentor_request->status == 'accepted') @if($mentor_booking) @if($mentor_booking->status == 'pending') Booking request pending @elseif($mentor_booking->status == 'rescheduled') Confirm reschedule @elseif($mentor_booking->status == 'accepted') Booked @endif @else Book a Session @endif @elseif($mentor_request->status == 'declined') Request declined @endif @else @if($accepted_requested_users->count() < $group->no_of_mentee) Request Mentorship Book a Session @endif @endif @endif
Bio

{{$mentor_profile->bio}}

Work Experience
@php $experiences = json_decode($mentor_profile->work_experience); @endphp @if($experiences) @foreach ($experiences as $experience)
{{$experience->company_name}}
{{\Carbon\Carbon::parse($experience->start_date)->toFormattedDateString()}} - @if($experience->end_date == null) Present @else {{\Carbon\Carbon::parse($experience->end_date)->toFormattedDateString()}} @endif
@endforeach @endif
Academic qualifications
@php $qualifications = json_decode($mentor_profile->academic_qualifications); @endphp @if($qualifications) @foreach ($qualifications as $qualification)

{{$qualification->school_degree}}

{{$qualification->school_name}}

{{\Carbon\Carbon::parse($qualification->school_start_date)->toFormattedDateString()}} - @if($qualification->school_end_date == null) Present @else {{\Carbon\Carbon::parse($qualification->school_end_date)->toFormattedDateString()}} @endif

@endforeach @endif
Cases handled
@php $cases = json_decode($mentor_profile->cases_handled) @endphp @if($cases) @foreach ($cases as $case)

{{$case}}

@endforeach @endif
Articles Published
@php $articles = json_decode($mentor_profile->articles_published); @endphp @if($articles) @foreach ($articles as $article)

{{$article}}

@endforeach @endif
Certification
@php $certifications = json_decode($mentor_profile->certifications); @endphp @if($certifications) @foreach ($certifications as $certification)

{{$certification->name}}

{{$certification->year}}

@endforeach @endif
Socials

Reviews

@forelse ($reviews as $review)
@php $user = App\Models\User::where('id', $review->user_id)->first(); @endphp
{{$user->first_name}} {{$user->last_name}}

{{$user->area_of_specialization}}

@if($review->rating) {{getRating($review->rating)}} @endif

{{$review->review}}

@empty

There are no reviews

@endforelse

Mentees

@forelse ($accepted_requested_users as $accepted_requested_user)
@empty

There are no mentees

@endforelse

Requests

@forelse ($requested_users as $requested_user)
@empty

There are no requests

@endforelse
Sessions
@forelse ($mentor_bookings as $mentor_booking)
Mentorship Session
@php $user = App\Models\User::where('id', $mentor_booking->user_id)->first(); @endphp

with {{$user->first_name}} {{$user->last_name}}

@if($mentor_booking->status == 'pending')

{{\Carbon\Carbon::parse($mentor_booking->mentee_session_time)->toFormattedDateString()}}

{{substr($mentor_booking->mentee_session_time, 11)}}

@elseif($mentor_booking->status == 'rescheduled') @php $mentor_session_times = json_decode($mentor_booking->mentor_session_time); @endphp @foreach($mentor_session_times as $mentor_session_time) {{\Carbon\Carbon::parse($mentor_session_time)->toFormattedDateString()}} {{substr($mentor_session_time, 11)}} @endforeach @elseif($mentor_booking->status == 'accepted')

{{\Carbon\Carbon::parse($mentor_booking->mentee_session_time)->toFormattedDateString()}}

@if(substr($mentor_booking->mentee_session_time, 11) > 11.59) {{substr($mentor_booking->mentee_session_time, 11)}} PM @else {{substr($mentor_booking->mentee_session_time, 11)}} AM @endif

@if($mentor_booking->mentee_session_time < now()) Ended @else Scheduled @endif
@endif @if($mentor_booking->status == 'pending')
Reschedule
@csrf
@elseif($mentor_booking->status == 'rescheduled') Rescheduled @elseif($mentor_booking->status == 'accepted') @if($mentor_booking->mentee_session_time > now()) Start Session @elseif($mentor_booking->mentee_session_time < now()) Session closed @elseif($mentor_booking->mentee_session_time == now()) Start Session @endif @endif
@empty

No Session has been created

@endforelse
Mentorship Group
@if($group) @if($mentor->user_id == Auth::user()->id)

Hold conversations in your mentorship group with your mentees

@else

You've been added to this mentor's group

@endif View group @else @if($mentor->user_id == Auth::user()->id)

To create a group for your mentees, you need to have a mentee

@else

No group has been created yet

@endif @endif
@endsection