Procházet zdrojové kódy

Merge branch 'develop'

master
Guillaume Bourgeois před 4 měsíci
rodič
revize
8c4b51e260
5 změnil soubory, kde provedl 29 přidání a 5 odebrání
  1. +4
    -1
      backend/views/distribution/index.php
  2. +6
    -1
      backend/views/product/_form.php
  3. +17
    -0
      backend/web/js/vuejs/distribution-index.js
  4. +1
    -2
      producer/views/order/order.php
  5. +1
    -1
      producer/views/site/products.php

+ 4
- 1
backend/views/distribution/index.php Zobrazit soubor

@@ -395,6 +395,8 @@ $this->setPageTitle('Distributions') ;
<span v-if="order.order_status_alias == 'canceled'" class="label label-danger" :title="order.orderStatusHistorySummaryTitleTag"><span class="glyphicon glyphicon-trash"></span></span>
<span v-if="order.order_status_alias == 'updated'" class="label label-warning" :title="order.orderStatusHistorySummaryTitleTag"><span class="glyphicon glyphicon-pencil"></span></span>
<span v-if="order.order_status_alias == 'ordered'" class="label label-success" :title="order.orderStatusHistorySummaryTitleTag"><span class="glyphicon glyphicon-check"></span></span>

<span v-if="containUnactiveProduct(order)" class="glyphicon glyphicon-warning-sign" title="Cette commande contient un produit qui n'est pas activé"></span>
</td>
<td class="column-origin" v-html="order.labelOrigin"></td>
<td class="column-user">
@@ -627,7 +629,8 @@ $this->setPageTitle('Distributions') ;
<strong><span class="glyphicon glyphicon-menu-right"></span> Produits</strong>
<ul>
<li v-for="product in products" v-if="getProductDistribution(product) && order.productOrder[product.id].quantity > 0">
{{ product.name }} : {{ order.productOrder[product.id].quantity }} {{ order.productOrder[product.id].unit == 'piece' ? ' pièce(s)' : ' '+order.productOrder[product.id].unit }} <span v-if="getProductDistribution(product).active == 0" class="glyphicon glyphicon-warning-sign" title="Ce produit n'est pas activé"></span>
{{ product.name }} : {{ order.productOrder[product.id].quantity }} {{ order.productOrder[product.id].unit == 'piece' ? ' pièce(s)' : ' '+order.productOrder[product.id].unit }}
<span v-if="getProductDistribution(product).active == 0" class="glyphicon glyphicon-warning-sign" title="Ce produit n'est pas activé"></span>
</li>
</ul>
<div v-if="order.comment && order.comment.length > 0" class="comment">

+ 6
- 1
backend/views/product/_form.php Zobrazit soubor

@@ -56,7 +56,12 @@ $accessoryModule = $this->getAccessoryModule();
<?php endif; ?>
<?= $form->field($model, 'id_product_category')->dropDownList($productCategoryModule->populateProductCategoriesDropdownList()); ?>
<?= $form->field($model, 'description')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'recipe')->textarea()->label('Description longue') ?>
<?= $form->field($model, 'recipe')->label('Description longue')
->widget(letyii\tinymce\Tinymce::class, [
'configs' => [
'plugins' => Yii::$app->parameterBag->get('tinyMcePlugins')
],
]); ?>
<?= $form->field($model, 'unit')
->dropDownList(ArrayHelper::map(Product::$unitsArray, 'unit', 'wording'))
->label('Unité (pièce, poids ou volume)'); ?>

+ 17
- 0
backend/web/js/vuejs/distribution-index.js Zobrazit soubor

@@ -1067,6 +1067,23 @@ if($(selector).length) {
$event.preventDefault();
navigator.clipboard.writeText(urlOrder);
appAlerts.alert('success', 'Lien vers la page de commande de la distribution copié.');
return false;
},
containUnactiveProduct: function(order) {
var app = this;
var product = null;
var productDistribution = false;
for(key in app.products) {
product = app.products[key];
productDistribution = app.getProductDistribution(product);
if(productDistribution
&& order.productOrder[product.id].quantity > 0
&& productDistribution.active == 0) {

return true;
}
}

return false;
}
},

+ 1
- 2
producer/views/order/order.php Zobrazit soubor

@@ -363,8 +363,7 @@ $this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDe
<div class="description-long" v-if="product.recipe.length">
<a href="javascript:void(0);" class="show-more-link">En savoir
plus</a>
<div class="content">
{{ product.recipe }}
<div class="content" v-html="product.recipe">
</div>
</div>
</td>

+ 1
- 1
producer/views/site/products.php Zobrazit soubor

@@ -88,7 +88,7 @@ $this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDe
$html .= '<div class="description">' . Html::encode($model->description).'</div>';
}
if (strlen($model->recipe)) {
$html .= '<div class="description-long"><a href="javascript:void(0);" class="show-more-link">En savoir plus</a><div class="content">' . nl2br(Html::encode($model->recipe)).'</div></div>';
$html .= '<div class="description-long"><a href="javascript:void(0);" class="show-more-link">En savoir plus</a><div class="content">' . $model->recipe .'</div></div>';
}
return $html;
}

Načítá se…
Zrušit
Uložit