@extends('admin.layouts.app') @push('css') @endpush @section('content')

Publicaciones MercadoLibre

{{-- Stats Cards --}}
@foreach($stats as $key => $stat)

{{ $stat['label'] }}

{{ number_format($stat['count']) }}

@endforeach
{{-- Main Card --}}
Gestión de Publicaciones
@csrf
@csrf
@csrf
Nueva Publicación
{{-- Filters --}}
@if(request()->hasAny(['estado', 'cate_publ', 'search'])) Limpiar @endif
{{-- Table --}}
@forelse($publications as $pub) @empty @endforelse
Producto Título ML ML ID Precio Margen Stock Estado Sync Acciones
@if($pub->url_image) @else
@endif
{{ $pub->co_arti }} @if($pub->stock)
{{ \Illuminate\Support\Str::limit($pub->stock->DESCRI ?? '', 30) }} @endif
{{ \Illuminate\Support\Str::limit($pub->titu_publ, 40) }} @if($pub->ml_id) @if($pub->ml_link) {{ $pub->ml_id }} @else {{ $pub->ml_id }} @endif @else - @endif ${{ number_format($pub->prec_publ, 2, ',', '.') }} @if($pub->cost_snapshot > 0) @php $margin = $pub->computed_margin; @endphp @if($margin < 0) {{ number_format($margin, 1, ',', '.') }}% @elseif($margin < 15) {{ number_format($margin, 1, ',', '.') }}% @else {{ number_format($margin, 1, ',', '.') }}% @endif @else @endif {{ $pub->stck_actu }} @switch($pub->estado) @case('active') Activa @break @case('paused') Pausada @break @case('closed') Cerrada @break @default Borrador @endswitch @if($pub->isPublished())
@else @endif
@if($pub->isPublished()) @endif @if(!$pub->isPublished())
@csrf
@endif @if($pub->estado == 'active')
@csrf
@endif @if($pub->estado == 'paused')
@csrf
@endif
No hay publicaciones
Crear Primera Publicación
@if($publications->hasPages())
Mostrando {{ $publications->firstItem() }} a {{ $publications->lastItem() }} de {{ $publications->total() }}
{{ $publications->links() }}
@endif
@endsection @push('js') @endpush