@extends('admin.master') @section('content')
@if($anuncio !== null)

Visualizando Anúncio

{{$anuncio->car_status->name}} @if($anuncio->car_status_id === 9) TURBINADO @endif @if($anuncio->site_only) OFERTA EXCLUSIVA DO SITE @endif
@if($pedidos) @foreach($pedidos as $pedido) @if ($pedido->delayed_schedule)
Atenção: Anúncio turbinado e pago pendente de aprovação
@endif @endforeach @endif @if($car->car_status_id == 5) @if($car->moderator) @foreach($car->moderator as $mods)
Anúncio enviado automaticamente a moderação em: {{$mods->created_at->format('d/m/Y H:i:s')}}, motivos:
    @foreach($mods->reasons as $reason)
  • {{$reason['reason']}} @if(!empty($reason['car_id']) ) Ver anúncio @endif
  • @endforeach
@endforeach @endif @endif
@if($anuncio->car_status_id === 9) @endif
Marca: {{$anuncio->brand->name}}
Modelo: {{$anuncio->fipe->model}} ({{$anuncio->fipe->code}})
Ano: {{$anuncio->fipe->year}}
Cor: {{$anuncio->color->name}}
Portas: {{$anuncio->doors}}
Combustível: {{$anuncio->fipe->fuel}}
Quilometragem: {{$anuncio->km}}
Valor: R$: {{number_format($anuncio->price, 2, ',', '.')}} {{$anuncio->fipe_percent_off}}
Fipe: R$ {{number_format($anuncio->fipe_price, 2, ',', '.')}}
Custo: R$ {{isset($anuncio->cost) ? number_format($anuncio->cost, 2, ',', '.') : 'Não informado'}}
Data de cadastro: {{ ($anuncio->created_at <= 0) ? 'Não publicado' : date('d/m/Y H:i:s', strtotime($anuncio->created_at)) }}
Data da publicação: {{ ($anuncio->published_at <= 0) ? 'Não publicado' : date('d/m/Y H:i:s', strtotime($anuncio->published_at)) }}
Patrocinado até: {{($anuncio->boosted_until <= 0) ? 'Não patrocinado' : date('d/m/Y H:i:s', strtotime($anuncio->boosted_until))}}
Descrição: {{$anuncio->observation}}
Opcionais:
    @foreach($anuncio->optionals as $optional)
  • {{$optional['name'] }}
  • @endforeach
DDD do anúncio: {{$anuncio->user_ddd}}
Visível para: @if($anuncio->site_only) Site do cliente @else
    @foreach($anuncio->visible_to as $publico)
  • {{$publico->name}}
  • @endforeach
@endif
Anunciante: ({{$anuncio->user->id}}) {{$anuncio->user->dealership}} ({{$anuncio->user->type['name']}}) Ver Estoque Editar usuário
Loja vinculada: @if($car->store) ({{$car->store->id}}) {{$car->store->trade_name}} Ver detalhes @else Sem loja vinculada! @endif
Nome: {{$anuncio->user->name}}
Documento: {{$anuncio->user->document}}
Endereço: {{ $anuncio->user->address }} , {{ $anuncio->user->number }} {{$anuncio->user->neighborhood}} {{$anuncio->user->city}} {{$anuncio->user->state}}
Telefone Fixo: {{mascara_telefone($anuncio->user->phone)}}
Telefone Celular: {{mascara_telefone($anuncio->user->cell_phone)}}
Situação do usuário: {{ ($anuncio->user->is_aprovado == 0) ? 'Bloqueado' : 'Ativo' }}
Data de Cadastro {{date('d/m/Y H:i:s', strtotime($anuncio->user->created_at))}}
Visto por último: {{($anuncio->user->last_seen <= 0) ? 'Não entrou no chat' : date('d/m/Y H:i:s', strtotime($anuncio->user->last_seen))}}

@if( count($anuncio->photos) === 0 )

Nenhuma foto foi enviada

@endif
  • @if($anuncio->sharefilename) Imagem de compartilhamento (não aparece no anúncio) @endif @if(!$anuncio->sharefilename && count($anuncio->photos) >= 4 ) @endif
  • @foreach($anuncio->photos as $photo)
  • @endforeach
@else

Anúncio não encontrado

@endif

Chat
@if(count($interessados) == 0)

Não há conversas

@else @foreach($interessados as $interessado) @endforeach
Nome Tipo Data Estoque
{{$interessado->nome}} {{$interessado->tipo}} {{$interessado->created_at->format('d/m/Y H:i:s')}} Ver
@endif

Telefone
@if(count($ligacoes) == 0)

Não há ligações

@else @foreach($ligacoes as $interessado) @endforeach
Nome Tipo Data Estoque
{{$interessado->nome}} {{$interessado->tipo}} {{$interessado->created_at->format('d/m/Y H:i:s')}} Ver
@endif
@if(isset($edits)) @if(count($edits) == 0 )

Não há edições para este anúncio

@else @foreach($edits as $e)

Editado por: {{$e->name}} em {{ date('d/m/Y H:i:s', strtotime($e->created_at)) }}

    @foreach($e->edits['changes'] as $a) @if($a['is_edited'])
  • Campo: {{$a['label']}} era: {{$a['old']}} agora: {{$a['new']}}
  • @endif @endforeach @if($e->edits['photos']['is_edited'] === true)

    Fotos

    Antes:

      @foreach($e->edits['photos']['old'] as $photo)
    • Imagem anterior do anúncio
    • @endforeach

    Agora:

      @foreach($e->edits['photos']['new'] as $photo)
    • Imagem atualmente no anúncio
    • @endforeach
    @endif

@endforeach @endif @endif
@if(isset($denuncias)) @if(count($denuncias) == 0 )

Não há denúncias para este anúncio

@else @foreach($denuncias as $d) @endforeach
Data da denúncia Denunciante Motivo Observações Ações
{{ date('d/m/Y H:i:s', strtotime($d->created_at)) }} ({{$d->user->id}}) {{$d->user->name}} {{$d->reason}} {{$d->observation}}
@endif @endif

Pedidos
@if($pedidos->count() === 0)
Não há pedidos
@else
@foreach($pedidos as $pedido) @endforeach
Data Produto Valor Situação
{{$pedido->created_at->format('d/m/Y H:i:s')}} {{$pedido->product->name}} {{$pedido->price}} {{$pedido->situation}}
@endif

Publicações
@if($car->pushes->count() == 0)
Não há publicações
@else
@foreach($car->pushes as $push) @endforeach
Data Selecionados Enviados
{{date('d/m/Y H:i:s', strtotime($push->created_at))}} {{$push->eligible_tokens}} {{$push->sent_push}}
@endif
@endsection @section('scripts') @endsection @section('css') @endsection