{% set tableColumnsWidth = { 'checkAllRecords' : 5, 'connection' : 20, 'name' : 15, 'type' : 20, 'value' : 10, 'startAt' : 15, 'endAt' : 15, 'status' : 15, 'actions' : 15 } %} {% for rule in goldenRules %} {% else %} {% endfor %}
Canal Nombre de la regla Tipo Valor Fecha de inicio Fecha de finalización Estado Acciones
{{ rule.goldenRule.marketplaceConnection.nombreconfiguracion ?? '-' }} {{ rule.goldenRule.marketplaceConnection.nombreconfiguracion ?? '-' }}
{{ rule.goldenRule.name ?? '-' }}
{% if rule.goldenRule.entityRelated == 'product' %} Producto {% if rule.entity %} ({{ rule.entity.sku }}) {{ rule.entity.titulo|default('Sin título') }} {% else %} Entidad no encontrada {% endif %} {% elseif rule.goldenRule.entityRelated == 'brand' %} Marca {% if rule.entity %} {{ rule.entity.nombre }} {% else %} Entidad no encontrada {% endif %} {% elseif rule.goldenRule.entityRelated == 'category' %} Categoría {% if rule.entity %} {{ rule.entity.name }} {% else %} Entidad no encontrada {% endif %} {% elseif rule.goldenRule.entityRelated == 'tag' %} Tag {% if rule.entity %} {{ rule.entity.name }} {% else %} Entidad no encontrada {% endif %} {% elseif rule.goldenRule.entityRelated == 'publication_options' %} Opción de publicación {% if rule.entity %} {% set options = rule.entity.data %} {% if options %}
{% for option in options %}
{{ option.label }}: {% if option.text is defined %} {{ option.text }} {% elseif option.value is same as(true) %} {% elseif option.value is same as(false) %} No {% else %} {{ option.value }} {% endif %}
{% endfor %}
{% else %} Datos no disponibles {% endif %} {% else %} Entidad no encontrada {% endif %} {% else %} Desconocido Tipo no válido {% endif %}
{% set pm = rule.goldenRule.priceMode %} {% set lpm = rule.goldenRule.listPriceMode %} {% set scope = rule.goldenRule.scope %} {# --- Mixed: mostrar ambas líneas, cada una con su unidad según su mode --- #} {% if scope == 'mixedPrice' %}
Precio Venta:
{% if pm == 'percent' %} {{ rule.goldenRule.getPriceValue() }}% {% elseif pm == 'absolute' %} ${{ rule.goldenRule.getPriceValue() }} {% else %} {{ rule.goldenRule.getPriceValue() }} {% endif %}
Precio Lista:
{% if lpm == 'percent' %} {{ rule.goldenRule.getListPriceValue() }}% {% elseif lpm == 'absolute' %} ${{ rule.goldenRule.getListPriceValue() }} {% else %} {{ rule.goldenRule.getListPriceValue() }} {% endif %} {# --- Scope = price: mostrar solo precio con la unidad correspondiente --- #} {% elseif scope == 'price' %}
{% if pm == 'percent' %} Precio Venta: {% else %} Precio Venta: {% endif %}
{% if pm == 'percent' %} {{ rule.goldenRule.getPriceValue() }}% {% else %} ${{ rule.goldenRule.getPriceValue() }} {% endif %} {# --- Scope = listPrice: mostrar solo precio lista con su unidad --- #} {% elseif scope == 'listPrice' %}
{% if lpm == 'percent' %} Precio Lista: {% else %} Precio Lista: {% endif %}
{% if lpm == 'percent' %} {{ rule.goldenRule.getListPriceValue() }}% {% else %} ${{ rule.goldenRule.getListPriceValue() }} {% endif %} {# --- Scope = stock --- #} {% elseif scope == 'stock' %}
Stock:
{{ rule.goldenRule.getStock() }} {% endif %} {# --- Cuota de stock (si aplica y no estamos mostrando solo stock) --- #} {% if rule.goldenRule.hasStock() and scope != 'stock' %}
Cuota de stock: {{ rule.goldenRule.getStock() }}
{% endif %}
{% if rule.goldenRule.getStartAt() %} {{ rule.goldenRule.getStartAt().format('d/m/Y H:i') }}
{{ rule.goldenRule.getStartAt()|relative_date }} {{ rule.goldenRule.getStartAt().format('d/m/Y H:i') }}hs
{% else %} (dd/mm/yyyy h:m)
(fecha en texto)
{% endif %}
{% if rule.goldenRule.getEndAt() %} {{ rule.goldenRule.getEndAt().format('d/m/Y H:i') }}
{{ rule.goldenRule.getEndAt()|relative_date }} {{ rule.goldenRule.getEndAt().format('d/m/Y H:i') }}hs
{% else %} Sin fecha de finalización {% endif %}
{% if rule.goldenRule.current %} Activa {% else %} Pendiente {% endif %}
No se encontraron reglas