@extends('admin.layouts.index-template', [ 'pageTitle' => 'SubVariedades', 'items' => $subvariedades, 'icon' => 'stack', 'module' => 'SubVariedades', 'createRoute' => route('subvariedades.create'), 'indexRoute' => route('subvariedades.index'), 'searchPlaceholder' => 'Buscar por nombre, código o categoría...', 'emptyIcon' => 'layer-group', 'emptyTitle' => 'No hay subvariedades', 'emptyMessage' => 'Comience agregando su primera subvariedad al catálogo', 'stats' => [ 'all' => [ 'label' => 'Total', 'count' => $subvariedades->total(), 'color' => 'primary', 'icon' => 'stack' ], 'active' => [ 'label' => 'Activas', 'count' => \App\Models\Subvaweb::where('WEB_VTA', 'S')->where('BORRADO', 'N')->count(), 'color' => 'success', 'icon' => 'checkbox-circle' ], 'inactive' => [ 'label' => 'Inactivas', 'count' => \App\Models\Subvaweb::where('WEB_VTA', 'N')->where('BORRADO', 'N')->count(), 'color' => 'secondary', 'icon' => 'pause-circle' ], 'show_home' => [ 'label' => 'Inicio', 'count' => \App\Models\Subvaweb::where('showHome', 'Yes')->where('BORRADO', 'N')->count(), 'color' => 'warning', 'icon' => 'home' ], 'no_image' => [ 'label' => 'Sin Imagen', 'count' => \App\Models\Subvaweb::where('BORRADO', 'N') ->where(function($query) { $query->whereNull('image') ->orWhere('image', ''); })->count(), 'color' => 'info', 'icon' => 'image' ], 'no_products' => [ 'label' => 'Sin Productos', 'count' => \App\Models\Subvaweb::doesntHave('productos')->where('BORRADO', 'N')->count(), 'color' => 'danger', 'icon' => 'error-warning' ] ] ]) @push('css') @endpush @section('header-buttons') Nueva SubVariedad @endsection @section('action-buttons') @endsection @section('filters')
@endsection @section('table-headers') Código Imagen SubVariedad Categoría Subcategoría Variedad Productos Estado Inicio Orden SEO con IA Acciones @endsection @section('table-body') @foreach($subvariedades as $subvariedad) {{ trim($subvariedad->CO_CATEGOR) }} / {{ trim($subvariedad->CO_SUBCATE) }} / {{ trim($subvariedad->CO_VARIEDA) }} / {{ trim($subvariedad->CO_SUBVARI) }} @if(!empty($subvariedad->image)) {{ $subvariedad->DE_SUBVARI }} @else
@endif
{{ $subvariedad->DE_SUBVARI ?? 'Sin nombre' }}
Código: {{ $subvariedad->CO_SUBVARI }}
{{ $subvariedad->categoria ? $subvariedad->categoria->DE_CATEGOR : 'Sin categoría' }} {{ $subvariedad->subcategoria ? $subvariedad->subcategoria->DE_SUBCATE : 'Sin subcategoría' }} {{ $subvariedad->variedad ? $subvariedad->variedad->DE_VARIEDA : 'Sin variedad' }} @if($subvariedad->productos_count > 0) {{ $subvariedad->productos_count }} @else 0 @endif @if($subvariedad->WEB_VTA == 'S') Activa @else Inactiva @endif @if($subvariedad->showHome == 'Yes') @else No @endif {{ $subvariedad->OR_SUBVARI ?? 0 }} @if($subvariedad->ai_seo_enabled) Generado @else No generado @endif
@if($subvariedad->productos_count > 0) @endif
@endforeach @endsection @push('scripts') @endpush