{{__('gig.manage_gigs')}}

{{__('gig.filter_by')}}
@if( !empty($gigs) && $gigs->count() > 0 )
    @foreach($gigs as $gig)
  • @php $gig_image = 'images/default-img-150x150.png'; if(!empty($gig->attachments['files']) ){ $images = $gig->attachments['files']; $latest = current($images); if( !empty($latest) && substr($latest->mime_type, 0, 5) == 'image'){ if(!empty($latest->sizes['150x150'])){ $gig_image = 'storage/'.$latest->sizes['150x150']; } elseif(!empty($latest->file_path)){ $gig_image = 'storage/'.$latest->file_path; } } } @endphp {{ __('gig.alt_image') }}
    @if( !$gig->categories->isEmpty() ) @endif @php $in_queue = $completed = $cancelled = 0; $in_queue_ratio = $completed_ratio = $cancelled_ratio = 0; $total = count($gig->gig_orders); foreach($gig->gig_orders as $order){ if($order->status == 'hired'){ ++$in_queue; } elseif ( in_array($order->status, ['disputed', 'refunded', 'rejected'])){ ++$cancelled; } elseif($order->status == 'completed'){ ++$completed; } } if($total > 0){ $in_queue_ratio = ($in_queue/$total)*100; $completed_ratio = ($completed/$total)*100; $cancelled_ratio = ($cancelled/$total)*100; } @endphp
    {!! $gig->title !!}
    • {{ ratingFormat($gig->ratings_avg_rating) }} ( {{ $gig->ratings_count == 1 ? __('general.user_review') : __('general.user_reviews', ['count' => number_format($gig->ratings_count) ]) }} )
    • {{ $gig->gig_visits_count == 1 ? __('general.single_view') : __('general.user_views', ['count' => number_format($gig->gig_visits_count) ] ) }}
    • {{ $completed == 1 ? __('gig.gig_sale', ['count' => $completed]) : __('gig.gig_sales', ['count' => $completed] )}}
    • {{ $gig->status == 'publish' ? __('gig.publish_status') : __('general.draft') }}
    • {{ __('gig.in_queue',['count' => $in_queue]) }}
    • {{ __('gig.completed_gigs', ['count' => $completed]) }}
    • {{__('gig.cancelled_gigs', ['count' => $cancelled])}}
  • @endforeach
{{ $gigs->links('pagination.custom') }} @else
{{ __('general.no_record') }}

{{ __('general.no_record') }}

@endif
@push('scripts') @endpush