{% extends 'Shop/base.html.twig' %} {% block title %}{{ 'app.shop_owner.pages.promotions.head_title'|trans }}{% endblock %} {% block toolbar_actions %} {% if false == shop.hasLoyalty %} {{ 'app.global.buttons.add'|trans }} {% endif %} {% endblock %} {% block component_body %} {% if shop.hasLoyalty %}
{% include 'Extentions/Icons/danger.html.twig' with {'size' : 'btn-size-20'} %}

{{ 'app.global.flash_messages.attention'|trans }}

{{ 'app.shop_owner.pages.promotions.loyalty_enabled'|trans }}
{% endif %}
{% for promotion in shop.promotions %} {% if promotion.type == constant('APP\\Entity\\Shop\\PromotionInterface::FREE_DELIVERY') %} {% else %} {% endif %} {% else %} {% endfor %}
{{ 'app.global.fields.status'|trans }} {{ 'app.global.fields.image.label'|trans }} {{ 'app.global.fields.name'|trans }} {{ 'app.global.fields.code'|trans }} {{ 'app.global.fields.start'|trans }} {{ 'app.global.fields.end'|trans }} {{ 'app.global.fields.value'|trans }} {{ 'app.global.fields.type'|trans }} {{ 'app.shop_owner.pages.promotions.list.minimum_amount'|trans }} {{ 'app.shop_owner.pages.promotions.list.modes'|trans }}
{% set image = promotion.imageUrl ? promotion.imageUrl : getImage(promotions_images ~ promotion.image.name) %} {{ promotion.name|capitalize }} {{ promotion.code }} {{ promotion.start|date('d/m/Y') }} {{ promotion.end|date('d/m/Y') }} {{ ('app.shop_owner.pages.promotions.form.free_delivery'|trans)|badge }} {% if constant('APP\\Entity\\Shop\\PromotionInterface::VALUE') == promotion.type %} {{ promotion.value|price }} {% else %} {{ promotion.value * 100 }}% {% endif %} {{ constant('APP\\Entity\\Shop\\PromotionInterface::VALUE') == promotion.type ? '€' : '%' }} {{ promotion.minimumAmount|price }} {{ promotion.shopModes|list_to_badges(shopModes) }}
{{ link('edit','modal', 'success', {'entity-id' : promotion.id, 'entity-name' : promotion.name, 'modalId': 'foxorders_modal_form_shop' }) }} {% include 'Includes/delete.html.twig' with { 'route': path('foxorders_shop_promotion_delete', {'id': promotion.id}) , 'token': csrf_token('delete' ~ promotion.id), 'button': 'list_delete' } %}
{{ 'app.global.detail.no_record_found'|trans }}
{% include 'List/pagination.html.twig' with { 'data' : promotions } %}
{% endblock %} {% block modals %} {% include 'Modal/form.html.twig' with { 'title': 'app.shop_owner.pages.promotions.new.title'|trans, 'id': 'shop', } %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}