@php use App\Models\Plan;use Illuminate\Support\Facades\Gate; @endphp @extends('panel.layouts.master') @section('content')
چک بوک
گزارش
ترم {{ $plan->term }}
{{ $plan->is_special == 0 ? 'هفته' : '' }} {{ $plan->week }}
سطح {{ $plan->level }}
رشته {{ $plan->field->name }}
@if($plan->type == 'hardo') {{ Plan::KONKORS[$plan->type] }} @else مطابق کنکور {{ Plan::KONKORS[$plan->type] }} @endif
@if($plan->test_type == 'without_test') {{ Plan::TEST_TYPES[$plan->test_type] }} @else مطابق آزمون {{ Plan::TEST_TYPES[$plan->test_type] }} @endif
@if($plan->is_farhangian)
متقاضی کنکور فرهنگیان {{ Plan::IS_FARHANGIAN[$plan->is_farhangian] }}
@endif
@php if(Gate::any(['admin', 'adviser'])){ $prevPlan = $user->plans()->where('plan_id', '<', $plan->id)->orderByDesc('id')->first(); $nextPlan = $user->plans()->where('plan_id', '>', $plan->id)->first(); }else{ $prevPlan = $authUser->plans()->where('plan_id', '<', $plan->id)->orderByDesc('id')->first(); $nextPlan = $authUser->plans()->where('plan_id', '>', $plan->id)->first(); } @endphp @if($prevPlan) {{ $prevPlan->is_special == 0 ? 'هفته' : '' }} {{ $prevPlan->week }} @endif {{ $plan->is_special == 0 ? 'هفته ' . $plan->week : $plan->desc }} @if($nextPlan) {{ $nextPlan->is_special == 0 ? 'هفته' : '' }} {{ $nextPlan->week }} @endif
    @foreach($plan->dates as $key => $item) @php $isActive = ''; if($item->date == verta()->format('Y/m/d')){ $isActive = 'active'; } @endphp @endforeach
@foreach($plan->dates as $key => $date) @php $isActive = ''; if($date->date == verta()->format('Y/m/d')){ $isActive = 'active'; } @endphp
@if($reports) @php $i = 0; @endphp @foreach($reports as $key => $item) @if($item->box->date->id == $date->id) @php $color = $item->box->boxType->color; $boxKey = $item->box->boxType->name; $i++; @endphp
{{ $item->box->boxType->title }}
گزارش {{ $i }}
{{ $item->lesson?->name }}
{{ !empty($item->subjects) ? implode(' ، ', $item->subjects()->with('subject')->get()->pluck('subject.name')->toArray()) : '' }}
{{ $item->time ?? '-' }} دقیقه
مدت زمان
@if(in_array($boxKey, ['learn_test', 'quiz_test']))
{{ $item->test_count ?? '-' }}
تعداد تست
@endif
@endif @endforeach @endif
@endforeach
@endsection