Browse Source

[GLOBAL] Bon cadeaux

feature/module_traiteur_v1
Fab 3 years ago
parent
commit
e0bf10200f
4 changed files with 13 additions and 12 deletions
  1. +6
    -5
      ShopBundle/Form/Frontend/EditGiftVoucherType.php
  2. +2
    -0
      ShopBundle/Resources/views/backend/default/list-fields/field_product_family_total_product_ordered.html.twig
  3. +3
    -3
      ShopBundle/Resources/views/backend/productfamily/macros.html.twig
  4. +2
    -4
      ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig

+ 6
- 5
ShopBundle/Form/Frontend/EditGiftVoucherType.php View File

{ {


$builder->add('activationDate', DateType::class, [ $builder->add('activationDate', DateType::class, [
'label' => 'Date d\'activation de votre bon cadeau',
'label' => 'Date d\'activation de votre bon cadeau :',
'widget'=> 'single_text', 'widget'=> 'single_text',
'help'=> 'Date à partir de laquelle la personne pourra utiliser ce bon cadeau.' 'help'=> 'Date à partir de laquelle la personne pourra utiliser ce bon cadeau.'
//'format'=> 'dd/MM/yyyy' //'format'=> 'dd/MM/yyyy'
]) ])
->add('title', TextType::class, [ ->add('title', TextType::class, [
'label' => 'Message personnalisé affiché dans le bon cadeau',
'help'=> 'Exemple "Joyeux Noël Tonton ! "'
'label' => 'Message personnalisé affiché dans le bon cadeau :',
'help'=> 'Exemple "Joyeux Noël Tata Suzanne !"'
]) ])
->add('email', EmailType::class, [ ->add('email', EmailType::class, [
'label' => 'Email de la personne à qui vous souhaitez offrir ce bon cadeau'
'label' => 'Email de la personne à qui vous souhaitez offrir ce bon cadeau :',
'help'=> 'Le bon ne sera utilisable qu\'avec cet adresse e-mail'
]) ])
->add('ownerName', TextType::class,[ ->add('ownerName', TextType::class,[
'label' => 'Nom de la ou des personnes qui offrent ce bon cadeau',
'label' => 'Offert par :',
'help'=> 'Sera affiché dans le bon cadeau' 'help'=> 'Sera affiché dans le bon cadeau'
]); ]);



+ 2
- 0
ShopBundle/Resources/views/backend/default/list-fields/field_product_family_total_product_ordered.html.twig View File

{% import '@LcShop/backend/productfamily/macros.html.twig' as macros %}
{{ macros.total_order_product_family(orderUtils.getTotalProductOrderedLastWeeks(item, 2, true)['total'], item, true) }}

+ 3
- 3
ShopBundle/Resources/views/backend/productfamily/macros.html.twig View File

{% endmacro total_order_product %} {% endmacro total_order_product %}




{% macro total_order_product_family(totalProductOrdered, productFamily) %}
{% macro total_order_product_family(totalProductOrdered, productFamily,forceByMeasure = false) %}
{% for weekNumber, weekNumberQuantity in totalProductOrdered %} {% for weekNumber, weekNumberQuantity in totalProductOrdered %}
<span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span> <span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span>
<span class="text-info"><i class="fa fa-shopping-basket"></i> <span class="text-info"><i class="fa fa-shopping-basket"></i>
<strong> <strong>
{{ weekNumberQuantity is null ? 0 : weekNumberQuantity}} {{ weekNumberQuantity is null ? 0 : weekNumberQuantity}}
{% if productFamily and productFamily.behaviorCountStock== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') %}
{% if productFamily and (productFamily.behaviorCountStock== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') or forceByMeasure)%}
{{ productFamily.unit.unitReference }} {{ productFamily.unit.unitReference }}
{% endif %} {% endif %}
</strong> </strong>
{{ _self.product_field(2, product.availableQuantityDefault, 'availableQuantityDefault',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\' && productFamily.behaviorStockWeek!= \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') ~ '\'"') }} {{ _self.product_field(2, product.availableQuantityDefault, 'availableQuantityDefault',false, '', 'v-show="productFamily.behaviorCountStock== \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') ~ '\' && productFamily.behaviorStockWeek!= \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') ~ '\'"') }}




<td colspan="2" v-show="productFamily.behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || productFamily.behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'">
<td colspan="2">


{{ _self.total_order_product(totalProductOrdered) }} {{ _self.total_order_product(totalProductOrdered) }}



+ 2
- 4
ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig View File

<button v-on:click="emptyProductsField('availableQuantityDefault');" <button v-on:click="emptyProductsField('availableQuantityDefault');"
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button>
</th> </th>
<th colspan="2"
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'">
<th colspan="2">
Semaine / Commandés Semaine / Commandés
</th> </th>
{#<th colspan="4" {#<th colspan="4"
<th colspan="2" <th colspan="2"
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' && behaviorStockWeek!= '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') }}'"> v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' && behaviorStockWeek!= '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_STOCK_WEEK_NON_RENEWABLE') }}'">
</th> </th>
<th colspan="2"
v-show="behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT') }}' || behaviorCountStock== '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') }}'">
<th colspan="2">
</th> </th>
{#<th colspan="4" {#<th colspan="4"
v-show="giftVoucherActive== true"> v-show="giftVoucherActive== true">

Loading…
Cancel
Save