@extends('layout.backoffice') @section('content')
{{ isset($stickerEntidad['id_producto_sticker']) ? 'Editar' : 'Crear' }} sticker
@php $estadoSel = (string)($stickerEntidad['estado'] ?? '1'); @endphp
{{-- --}} {{-- --}} {{-- --}}
Puedes pegar la URL o subir una imagen. Se recomienda PNG/WebP con fondo transparente.
previsualizacion

Reglas de aplicación
Puede seleccionar varias marcas
Puede seleccionar varias categorías
@php $reglasEntidad = $stickerEntidad['reglas'] ?? []; if (is_string($reglasEntidad)) { $reglasEntidad = json_decode($reglasEntidad, true) ?: []; } $productosTxt = ''; if (!empty($reglasEntidad['productos']) && is_array($reglasEntidad['productos'])) { $productosTxt = implode(', ', $reglasEntidad['productos']); } @endphp

Stickers Registrados

@if(!empty($stickers)) @foreach($stickers as $sticker) @php $idSt = $sticker['id_producto_sticker'] ?? null; $estado = (int)($sticker['estado'] ?? 0); @endphp @endforeach @endif
Nombre Imagen Prioridad Estado Vigencia Reglas Acciones
{{$sticker["nombre"]}} {{$sticker["prioridad"] ?? 0}} {{ $estado ? 'Activo' : 'Inactivo' }} {{\Carbon\Carbon::parse($sticker["fecha_inicio"])->format('d/m/Y') . ' al ' . \Carbon\Carbon::parse($sticker["fecha_fin"])->format('d/m/Y')}} @php $reglas = $sticker['reglas'] ?? null; $reglas = is_string($reglas) ? json_decode($reglas, true) : $reglas; @endphp @if(!empty($reglas['marcas'])) Marcas: {{ implode(', ', $reglas['marcas']) }}
@endif @if(!empty($reglas['categorias'])) Categorías: {{ implode(', ', $reglas['categorias']) }}
@endif @if(!empty($reglas['productos'])) Productos: {{ implode(', ', $reglas['productos']) }} @endif
@endsection