@extends('panel.layouts.master') @section('content') @php use App\Models\Plan;use Illuminate\Support\Facades\Gate; @endphp
کنکور مپ
برنامه مطالعاتی
@if($plan->term)
ترم {{ $plan->term }}
@endif @if($plan->week)
{{ $plan->is_special == 0 ? 'هفته' : '' }} {{ $plan->week }}
@endif @if($plan->level)
سطح {{ $plan->level }}
@endif
رشته {{ $plan->field->name }}
@if($plan->type)
@if($plan->type == 'hardo') {{ Plan::KONKORS[$plan->type] }} @else مطابق کنکور {{ Plan::KONKORS[$plan->type] }} @endif
@endif @if($plan->test_type)
@if($plan->test_type == 'without_test') {{ Plan::TEST_TYPES[$plan->test_type] }} @else مطابق آزمون {{ Plan::TEST_TYPES[$plan->test_type] }} @endif
@endif @if($plan->is_farhangian)
متقاضی کنکور فرهنگیان {{ Plan::IS_FARHANGIAN[$plan->is_farhangian] }}
@endif
@php if(Gate::any(['user', 'adviser'])){ $prevPlan = $user->plans()->where('plan_id', '<', $plan->id)->orderByDesc('id')->first(); $nextPlan = $user->plans()->where('plan_id', '>', $plan->id)->first(); } else{ $prevPlan = Plan::where('id', '<', $plan->id)->orderByDesc('id')->first(); $nextPlan = Plan::where('id', '>', $plan->id)->first(); } @endphp @if($prevPlan) @php if(Gate::allows('adviser')){ $prevRoute = route('plans.adviser.show', ['plan' => $prevPlan->id, 'user_id' => $user->id]); }else{ $prevRoute = route('plans.show', $prevPlan->id); } @endphp {{ $prevPlan->is_special == 0 ? 'هفته' : '' }} {{ $prevPlan->week }} @endif {{ $plan->is_special == 0 ? 'هفته ' . $plan->week : $plan->desc }} @if($nextPlan) @php if(Gate::allows('adviser')){ $nextRoute = route('plans.adviser.show', ['plan' => $nextPlan->id, 'user_id' => $user->id]); }else{ $nextRoute = route('plans.show', $nextPlan->id); } @endphp {{ $nextPlan->is_special == 0 ? 'هفته' : '' }} {{ $nextPlan->week }} @endif
    @foreach($plan->dates as $key => $item) @php $isActive = null; if($item->date == verta()->format('Y/m/d')){ $isActive = 'active'; } @endphp @endforeach
@if($plan->files()->whereType('test')->count() > 0) @endif @if($plan->files()->whereType('bank')->count() > 0) @endif
@foreach($plan->dates as $key => $date) @php $isActive = null; if($date->date == verta()->format('Y/m/d')){ $isActive = 'active'; } @endphp
@foreach($date->boxes as $key => $item) @php $color = $item->boxType->color; $boxKey = $item->boxType->name; @endphp
{{ $item->boxType->title }}
@if($item->box_type_id != \App\Models\BoxType::findType('quiz_time')) باکس {{ ++$key }} @else @endif
{{ $item->lesson?->name }}
@if($item->box_type_id != \App\Models\BoxType::findType('quiz_time'))
@if($item->subject) {{ $item->subject }} @else {{ !empty($item->subjects) ? implode(' ، ', $item->subjects()->with('subject')->get()->pluck('subject.name')->toArray()) : '' }} @endif
@endif
@if(in_array($item->box_type_id, \App\Models\BoxType::findType(['learn_test', 'quiz_test', 'desc_question']))) {{ $item->resource }} @can('admin') ({{ $item->file_code }}) @endcan @elseif($item->box_type_id == \App\Models\BoxType::findType('quiz_time')) @if($item->quiz) @php $userQuiz = $item->quiz->users()->whereUserId($authUser->id)->first(); $item->quiz->end($userQuiz); $btnTxt = 'شروع آزمون'; if($userQuiz){ if(!is_null($userQuiz->end_at)){ $btnTxt = 'نمایش نتایج آزمون'; }else{ $btnTxt = 'ادامه آزمون'; } } @endphp {{ $btnTxt }} @else @can('user') {{ $item->resource }} @can('admin') ({{ $item->file_code }}) @endcan @endcan @endif @can('admin') {{ $item->resource }} @can('admin') ({{ $item->file_code }}) @endcan @endcan @endif
{{ $item->time ?? '-' }} دقیقه
مدت زمان
@if(in_array($boxKey, ['learn_test', 'quiz_test', 'quiz_time', 'desc_question']))
{{ $item->test_count ?? '-' }}
تعداد تست
@endif
@if(!$item->report()) ثبت گزارش @else نمایش گزارش @endif
@endforeach @can('admin') @endcan
@endforeach
@endsection @section('script') @endsection