@extends('layouts.app') @section('title', 'Mentor Report') @section('header') @vite(['resources/sass/bootstrap-table.scss', 'resources/js/bootstrap-table.js']) @endsection @section('content')
Mentor ID | Mentor | Area | Last training | Teaching |
---|---|---|---|---|
{{ $mentor->id }} | {{ $mentor->name }} | {{ $mentor->getInlineMentoringAreas() }} | @if($mentor->trainingReports->count() > 0) @php $reportDate = Carbon\Carbon::make($mentor->trainingReports->sortBy('report_date')->last()->report_date); @endphp @if($reportDate->isToday()) Today @elseif($reportDate->isYesterday()) Yesterday @elseif($reportDate->diffInDays() <= 7) {{ $reportDate->diffForHumans(['parts' => 1])}} @else {{ $reportDate->diffForHumans(['parts' => 2])}} @endif @else No registered training yet @endif |
@foreach($mentor->teaches as $training)
status]["color"] }}">
@isset($training->paused_at)
@endisset
{{ $training->user->name }} / Last training:
@if($training->reports->count() > 0)
@php
$reportDate = Carbon\Carbon::make($training->reports->sortBy('report_date')->last()->report_date);
$trainingIntervalExceeded = $reportDate->diffInDays() >= Setting::get('trainingInterval');
@endphp
@if($reportDate->isToday())
Today
@elseif($reportDate->isYesterday())
Yesterday
@elseif($reportDate->diffInDays() <= 7)
{{ $reportDate->diffForHumans(['parts' => 1]) }}
@else
{{ $reportDate->diffForHumans(['parts' => 2]) }}
@endif
@else
No registered training yet
@endif
@endforeach
|