@if($isLoading) @include('skeletons.invoices') @else
@slot('title') {{ __('invoices.invoices') }} @endslot

{{ __('invoices.invoices') }}

{{ __('invoices.filter_by') }}
@role('tutor') @elserole('student') @endrole @if (!$orders->isEmpty()) @foreach($orders as $order) @php $options = $order?->options; $subject = !empty($options['subject']) ? $options['subject'] : ''; $image = !empty($options['image']) ? $options['image'] : ''; $subjectGroup = !empty($options['subject_group']) ? $options['subject_group'] : ''; $tutor_payout = $order?->price - getCommission($order?->price); @endphp @role('student') @elserole('tutor') @endrole @endforeach @endif
{{ __('booking.id') }} {{ __('booking.date') }} {{ __('booking.transaction_id') }} {{ __('general.item' )}}{{ __('booking.student_name') }} {{ __('booking.amount') }} {{ __('booking.tutor_payout') }}{{ __('booking.tutor_name') }} {{ __('booking.amount') }}{{ __('booking.status') }}
{{ $order?->order_id }} {{ $order?->created_at->format('F j, Y') }} {{$order?->orders?->transaction_id }}
@if (!empty($image) && Storage::disk(getStorageDisk())->exists($image)) {{$image}} @else {{ $image }} @endif @if($order->orderable_type == App\Models\SlotBooking::class) {{ $subject }}{{ $subjectGroup }} @elseif($order->orderable_type == \Amentotech\Courses\Models\Course::class && !empty($options['title'])) {{ $options['title'] }} @endif
@if($order?->orderable_type == \Amentotech\Courses\Models\Course::class) @if (!empty($order?->orderable?->instructor?->profile?->image) && Storage::disk(getStorageDisk())->exists($order?->orderable?->instructor?->profile?->image)) {{$order?->orderable?->instructor?->profile?->image}} @else {{ $order?->orderable?->instructor?->profile?->image }} @endif {{ $order?->orderable?->instructor?->profile?->first_name }} @elseif($order?->orderable_type == App\Models\SlotBooking::class) @if (!empty($order?->orderable?->tutor?->image) && Storage::disk(getStorageDisk())->exists($order?->orderable?->tutor?->image)) {{$order?->orderable?->tutor?->image}} @else {{ $order?->orderable?->tutor?->image }} @endif {{ $order?->orderable?->tutor?->first_name }} @endif
{!! formatAmount($order?->price) !!}
@if (!empty($order?->orders?->userProfile?->image) && Storage::disk(getStorageDisk())->exists($order?->orders?->userProfile?->image)) {{$order?->orders?->userProfile?->image}} @else {{ $order?->orderable?->student?->image }} @endif {{ $order?->orders?->userProfile?->first_name }}
{!! formatAmount($order?->price) !!} {!! formatAmount($tutor_payout) !!} {{ $order?->orders?->status}}
@if ($orders->isEmpty()) @else {{ $orders->links('pagination.pagination') }} @endif
@endif
@push('scripts' ) @endpush