@extends(getTemplate() .'.panel.layouts.panel_layout') @push('styles_top') @endpush @section('content')

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

{{ $purchasedCount }} {{ trans('panel.purchased') }}
{{ convertMinutesToHourAndMinute($hours) }} {{ trans('home.hours') }}
{{ $upComing }} {{ trans('panel.upcoming') }}

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

@if(!empty($sales) and !$sales->isEmpty()) @foreach($sales as $sale) @php $item = !empty($sale->webinar) ? $sale->webinar : $sale->bundle; $lastSession = !empty($sale->webinar) ? $sale->webinar->lastSession() : null; $nextSession = !empty($sale->webinar) ? $sale->webinar->nextSession() : null; $isProgressing = false; if(!empty($sale->webinar) and $sale->webinar->start_date <= time() and !empty($lastSession) and $lastSession->date > time()) { $isProgressing = true; } @endphp @if(!empty($item))
@if(!empty($sale->webinar)) @if($item->type == 'webinar') @if($item->start_date > time()) {{ trans('panel.not_conducted') }} @elseif($item->isProgressing()) {{ trans('webinars.in_progress') }} @else {{ trans('public.finished') }} @endif @elseif(!empty($item->downloadable)) {{ trans('home.downloadable') }} @else {{ trans('webinars.'.$item->type) }} @endif @php $percent = $item->getProgress(); if($item->isWebinar()){ if($item->isProgressing()) { $progressTitle = trans('public.course_learning_passed',['percent' => $percent]); } else { $progressTitle = $item->sales_count .'/'. $item->capacity .' '. trans('quiz.students'); } } else { $progressTitle = trans('public.course_learning_passed',['percent' => $percent]); } @endphp @if(!empty($sale->gift_id) and $sale->buyer_id == $authUser->id) {{-- --}} @else
@endif @else {{ trans('update.bundle') }} @endif
@include(getTemplate() . '.includes.webinar.rate',['rate' => $item->getRate()])
@if($item->price > 0) @if($item->bestTicket() < $item->price) {{ handlePrice($item->bestTicket(), true, true, false, null, true) }} {{ handlePrice($item->price, true, true, false, null, true) }} @else {{ handlePrice($item->price, true, true, false, null, true) }} @endif @else {{ trans('public.free') }} @endif
@if(!empty($sale->gift_id) and $sale->buyer_id == $authUser->id)
{{ trans('update.gift_status') }}: @if(!empty($sale->gift_date) and $sale->gift_date > time()) {{ trans('public.pending') }} @else {{ trans('update.sent') }} @endif
@else
{{ trans('public.item_id') }}: {{ $item->id }}
@endif @if(!empty($sale->gift_id))
{{ trans('update.gift_receive_date') }}: {{ (!empty($sale->gift_date)) ? dateTimeFormat($sale->gift_date, 'j M Y H:i') : trans('update.instantly') }}
@else
{{ trans('public.category') }}: {{ !empty($item->category_id) ? $item->category->title : '' }}
@endif @if(!empty($sale->webinar) and $item->type == 'webinar') @if($item->isProgressing() and !empty($nextSession))
{{ trans('webinars.next_session_duration') }}: {{ convertMinutesToHourAndMinute($nextSession->duration) }} Hrs
{{ trans('webinars.next_session_start_date') }}: {{ dateTimeFormat($nextSession->date,'j M Y') }}
@else
{{ trans('public.duration') }}: {{ convertMinutesToHourAndMinute($item->duration) }} Hrs
{{ trans('public.start_date') }}: {{ dateTimeFormat($item->start_date,'j M Y') }}
@endif @elseif(!empty($sale->bundle))
{{ trans('public.duration') }}: {{ convertMinutesToHourAndMinute($item->getBundleDuration()) }} Hrs
@endif @if(!empty($sale->gift_id) and $sale->buyer_id == $authUser->id)
{{ trans('update.receipt') }}: {{ $sale->gift_recipient }}
@else
{{ trans('public.instructor') }}: {{ $item->teacher->full_name }}
@endif @if(!empty($sale->gift_id) and $sale->buyer_id != $authUser->id)
{{ trans('update.gift_sender') }}: {{ $sale->gift_sender }}
@else
{{ trans('panel.purchase_date') }}: {{ dateTimeFormat($sale->created_at,'j M Y') }}
@endif
@endif @endforeach @else @include(getTemplate() . '.includes.no-result',[ 'file_name' => 'student.png', 'title' => trans('panel.no_result_purchases') , 'hint' => trans('panel.no_result_purchases_hint') , 'btn' => ['url' => '/classes?sort=newest','text' => trans('panel.start_learning')] ]) @endif
{{ $sales->appends(request()->input())->links('vendor.pagination.panel') }}
@include('web.default.panel.webinar.join_webinar_modal') @endsection @push('scripts_bottom') @endpush