@extends(getTemplate() . '.panel.layouts.panel_layout') @push('styles_top') @endpush @section('content')
{{-- Filters will go here --}}
@if (!empty($webinars) and !$webinars->isEmpty()) @foreach ($webinars as $webinar) @php $lastSession = $webinar->lastSession(); $nextSession = $webinar->nextSession(); $isProgressing = false; if ( $webinar->start_date <= time() and !empty($lastSession) and $lastSession->date > time() ) { $isProgressing = true; } @endphp
{{ $webinar->title }}
@if (!empty($webinar->deleteRequest) and $webinar->deleteRequest->status == 'pending') {{ trans('update.removal_request_sent') }} @else @switch($webinar->status) @case(\App\Models\Webinar::$active) @if ($webinar->isWebinar()) @if ($webinar->start_date > time()) {{ trans('panel.not_conducted') }} @elseif($webinar->isProgressing()) {{ trans('webinars.in_progress') }} @else {{ trans('public.finished') }} @endif @else {{ trans('webinars.' . $webinar->type) }} @endif @break @case(\App\Models\Webinar::$isDraft) {{ trans('public.draft') }} @break @case(\App\Models\Webinar::$pending) {{ trans('public.waiting') }} @break @case(\App\Models\Webinar::$inactive) {{ trans('public.rejected') }} @break @endswitch @endif
@if ($webinar->isWebinar())
@endif

{{ $webinar->title }} {{ trans('webinars.' . $webinar->type) }}

@if ($webinar->isOwner($authUser->id) or $webinar->isPartnerTeacher($authUser->id)) @endif
@include(getTemplate() . '.includes.webinar.rate', ['rate' => $webinar->getRate()])
@if ($webinar->price > 0) @if ($webinar->bestTicket() < $webinar->price) {{ handlePrice($webinar->price, true, true, false, null, true) }} {{ handlePrice($webinar->bestTicket(), true, true, false, null, true) }} @else {{ handlePrice($webinar->price, true, true, false, null, true) }} @endif @else {{ trans('public.free') }} @endif
{{ trans('public.item_id') }}: {{ $webinar->id }}
{{ trans('public.category') }}: {{ !empty($webinar->category_id) ? $webinar->category->title : '' }}
@if ($webinar->isProgressing() and !empty($nextSession))
{{ trans('webinars.next_session_duration') }}: {{ convertMinutesToHourAndMinute($nextSession->duration) }} Hrs
@if ($webinar->isWebinar())
{{ trans('webinars.next_session_start_date') }}: {{ dateTimeFormat($nextSession->date, 'j M Y') }}
@endif @else
{{ trans('public.duration') }}: {{ convertMinutesToHourAndMinute($webinar->duration) }} Hrs
@if ($webinar->isWebinar())
{{ trans('public.start_date') }}: {{ dateTimeFormat($webinar->start_date, 'j M Y') }}
@endif @endif @if ($webinar->isTextCourse() or $webinar->isCourse())
{{ trans('public.files') }}: {{ $webinar->files->count() }}
@endif @if ($webinar->isTextCourse())
{{ trans('webinars.text_lessons') }}: {{ $webinar->textLessons->count() }}
@endif @if ($webinar->isCourse())
{{ trans('home.downloadable') }}: {{ $webinar->downloadable ? trans('public.yes') : trans('public.no') }}
@endif
{{ trans('panel.sales') }}: {{ count($webinar->sales) }} ({{ (!empty($webinar->sales) and count($webinar->sales)) ? handlePrice($webinar->sales->sum('amount')) : 0 }})
@if (!empty($webinar->partner_instructor) and $webinar->partner_instructor and $authUser->id != $webinar->teacher_id and $authUser->id != $creator_id)
{{ trans('panel.invited_by') }}: {{ $webinar->teacher->full_name }}
@elseif($authUser->id != $webinar->teacher_id and $authUser->id != $webinar->creator_id)
{{ trans('webinars.teacher_name') }}: {{ $webinar->teacher->full_name }}
@elseif($authUser->id == $webinar->teacher_id and $authUser->id != $webinar->creator_id and $webinar->creator->isOrganization())
{{ trans('webinars.organization_name') }}: {{ $webinar->creator->full_name }}
@endif
@endforeach
{{ $webinars->appends(request()->input())->links() }}
@else
No Webinars

{{ trans('panel.you_not_have_any_webinar') }}

{{ trans('panel.no_result_hint') }}

{{ trans('panel.create_a_webinar') }}
@endif
@endsection @push('scripts') @endpush