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

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

{{ !empty($bundles) ? $bundlesCount : 0}} {{ trans('update.bundles') }}
{{ convertMinutesToHourAndMinute($bundlesHours) }} {{ trans('home.hours') }}
{{ handlePrice($bundleSalesAmount) }} {{ trans('update.bundle_sales') }}
{{ $bundleSalesCount }} {{ trans('update.bundle_sales_count') }}

{{ trans('update.my_bundles') }}

@if(!empty($bundles) and !$bundles->isEmpty()) @foreach($bundles as $bundle)
@switch($bundle->status) @case(\App\Models\Bundle::$active) {{ trans('panel.active') }} @break @case(\App\Models\Bundle::$isDraft) {{ trans('public.draft') }} @break @case(\App\Models\Bundle::$pending) {{ trans('public.waiting') }} @break @case(\App\Models\Bundle::$inactive) {{ trans('public.rejected') }} @break @endswitch

{{ $bundle->title }}

@if($authUser->id == $bundle->creator_id or $authUser->id == $bundle->teacher_id) @endif
@include(getTemplate() . '.includes.webinar.rate',['rate' => $bundle->getRate()])
@if($bundle->price > 0) @if($bundle->bestTicket() < $bundle->price) {{ handlePrice($bundle->bestTicket(), true, true, false, null, true) }} {{ handlePrice($bundle->price, true, true, false, null, true) }} @else {{ handlePrice($bundle->price, true, true, false, null, true) }} @endif @else {{ trans('public.free') }} @endif
{{ trans('public.item_id') }}: {{ $bundle->id }}
{{ trans('public.category') }}: {{ !empty($bundle->category_id) ? $bundle->category->title : '' }}
{{ trans('public.duration') }}: {{ convertMinutesToHourAndMinute($bundle->getBundleDuration()) }} Hrs
{{ trans('product.courses') }}: {{ $bundle->bundleWebinars->count() }}
{{ trans('panel.sales') }}: {{ count($bundle->sales) }} ({{ (!empty($bundle->sales) and count($bundle->sales)) ? handlePrice($bundle->sales->sum('amount')) : 0 }})
@if($authUser->id == $bundle->teacher_id and $authUser->id != $bundle->creator_id and $bundle->creator->isOrganization())
{{ trans('webinars.organization_name') }}: {{ $bundle->creator->full_name }}
@endif
@endforeach
{{ $bundles->appends(request()->input())->links('vendor.pagination.panel') }}
@else @include(getTemplate() . '.includes.no-result',[ 'file_name' => 'webinar.png', 'title' => trans('update.you_not_have_any_bundle'), 'hint' => trans('update.no_result_bundle_hint') , 'btn' => ['url' => '/panel/bundles/new','text' => trans('update.create_a_bundle') ] ]) @endif
@endsection @push('scripts_bottom') @endpush