@extends('shaun_core::admin.layouts.master') @section('content')
{{__('Manage Listings')}}
search
{{ csrf_field() }} @if(!empty($listings)) @foreach($listings as $listing) @php $owner = $listing->getUser(); @endphp @endforeach @endif
{{__('ID')}} {{__('Name')}} {{__('Created')}} {{__('Agent')}} {{__('Status')}} {{__('Location')}} {{__('Featured')}} {{__('Action')}}
{{$listing->code}} {{$listing->created_at->setTimezone(setting('site.timezone'))->longAbsoluteDiffForHumans(['parts'=>1])}} {{$owner->name}} {{Packages\ShaunSocial\MarketPlace\Models\Enums\ListingStatus::getLabel($listing->status->value)}} @php $location = $listing->getAddress(); if ($location) { $locationName = $location->address; } else { $locationName = __('No location'); } @endphp {{$locationName}} @if ($listing->is_feature) {{__('Yes')}} @else {{__('No')}} @endif @if ($listing->status == \Packages\ShaunSocial\MarketPlace\Models\Enums\ListingStatus::pending) @if ($listing->canApprove()) {{__('Approve')}} @endif @if ($listing->canReject()) {{__('Delete')}} @endif @else @if ($listing->canApprove()) {{__('Approve')}} @endif @if ($listing->canReject()) {{__('Delete')}} @endif @if ($listing->canActive()) {{__('Active')}} @endif @if ($listing->canDisable()) {{__('Disable')}} @endif {{__('Delete')}} @endif
{{ $listings->withQueryString()->links('shaun_core::admin.partial.paginate') }}
@stop @push('scripts-body') @endpush