Browse Source

[GLOBAL] Bon cadeaux

feature/module_traiteur_v1
Fab 4 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

@@ -31,20 +31,21 @@ class EditGiftVoucherType extends AbstractType
{

$builder->add('activationDate', DateType::class, [
'label' => 'Date d\'activation de votre bon cadeau',
'label' => 'Date d\'activation de votre bon cadeau :',
'widget'=> 'single_text',
'help'=> 'Date à partir de laquelle la personne pourra utiliser ce bon cadeau.'
//'format'=> 'dd/MM/yyyy'
])
->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, [
'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,[
'label' => 'Nom de la ou des personnes qui offrent ce bon cadeau',
'label' => 'Offert par :',
'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

@@ -0,0 +1,2 @@
{% 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

@@ -13,13 +13,13 @@
{% 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 %}
<span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span>
<span class="text-info"><i class="fa fa-shopping-basket"></i>
<strong>
{{ 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 }}
{% endif %}
</strong>
@@ -113,7 +113,7 @@
{{ _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) }}


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

@@ -105,8 +105,7 @@
<button v-on:click="emptyProductsField('availableQuantityDefault');"
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button>
</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
</th>
{#<th colspan="4"
@@ -193,8 +192,7 @@
<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') }}'">
</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 colspan="4"
v-show="giftVoucherActive== true">

Loading…
Cancel
Save