Browse Source

[Administration] Utilisateurs : alerte confiance

feature/souke
Guillaume Bourgeois 8 months ago
parent
commit
34e0bc135f
10 changed files with 166 additions and 55 deletions
  1. +10
    -5
      backend/controllers/DistributionController.php
  2. +9
    -0
      backend/controllers/UserController.php
  3. +1
    -1
      backend/views/distribution/index.php
  4. +21
    -0
      backend/views/user/_form.php
  5. +33
    -0
      backend/views/user/view.php
  6. +48
    -44
      backend/web/css/screen.css
  7. +4
    -0
      backend/web/sass/distribution/_index.scss
  8. +28
    -0
      console/migrations/m240320_092736_add_columns_user_trust_alert.php
  9. +7
    -3
      domain/User/User/User.php
  10. +5
    -2
      domain/User/UserProducer/UserProducer.php

+ 10
- 5
backend/controllers/DistributionController.php View File

$orderModule = $this->getOrderModule(); $orderModule = $this->getOrderModule();
$paymentManager = $this->getPaymentModule(); $paymentManager = $this->getPaymentModule();
$productOrderModule = $this->getProductOrderModule(); $productOrderModule = $this->getProductOrderModule();
$userProducerModule = $this->getUserProducerModule();


if ($ordersArray) { if ($ordersArray) {
foreach ($ordersArray as &$order) { foreach ($ordersArray as &$order) {
]; ];
} }


$arrayCreditUser = [];
if(isset($order->user)) {
$arrayCreditUser['credit'] = $userModule->getCredit($order->user);
$arrayCreditUser['credit_active'] = $userModule->getCreditActive($order->user);
$arrayDatasUser = [];
if(isset($order->user) && $order->user) {
$arrayDatasUser['credit'] = $userModule->getCredit($order->user);
$arrayDatasUser['credit_active'] = $userModule->getCreditActive($order->user);

$userProducer = $userProducerModule->getRepository()->findOneUserProducer($order->user);
$arrayDatasUser['trust_alert'] = $userProducer->trust_alert;
$arrayDatasUser['trust_alert_comment'] = $userProducer->trust_alert_comment;
} }


$oneProductUnactivated = false; $oneProductUnactivated = false;
'amount_surplus' => Price::numberTwoDecimals($orderModule->getOrderAmount($order, Order::AMOUNT_SURPLUS)), 'amount_surplus' => Price::numberTwoDecimals($orderModule->getOrderAmount($order, Order::AMOUNT_SURPLUS)),
'user' => (isset($order->user)) ? array_merge( 'user' => (isset($order->user)) ? array_merge(
$order->user->getAttributes(), $order->user->getAttributes(),
$arrayCreditUser
$arrayDatasUser
) : null, ) : null,
'pointSale' => $order->pointSale ? ['id' => $order->pointSale->id, 'name' => $order->pointSale->name] : null, 'pointSale' => $order->pointSale ? ['id' => $order->pointSale->id, 'name' => $order->pointSale->name] : null,
'productOrder' => $productOrderArray, 'productOrder' => $productOrderArray,

+ 9
- 0
backend/controllers/UserController.php View File

$userBelongToProducer = UserProducer::findOne(['id_user' => $id, 'id_producer' => GlobalParam::getCurrentProducerId()]); $userBelongToProducer = UserProducer::findOne(['id_user' => $id, 'id_producer' => GlobalParam::getCurrentProducerId()]);
if ($userBelongToProducer) { if ($userBelongToProducer) {
$model->newsletter = $userBelongToProducer->newsletter; $model->newsletter = $userBelongToProducer->newsletter;
$model->trust_alert = $userBelongToProducer->trust_alert;
$model->trust_alert_comment = $userBelongToProducer->trust_alert_comment;

if ($model->load(\Yii::$app->request->post()) && $model->save()) { if ($model->load(\Yii::$app->request->post()) && $model->save()) {


// on envoie le mail de bienvenue si le mail vient d'être défini // on envoie le mail de bienvenue si le mail vient d'être défini
$this->processLinkUserGroup($model); $this->processLinkUserGroup($model);
//$this->processProductPricePercent($model); //$this->processProductPricePercent($model);


// Newsletter
if ($model->newsletter) { if ($model->newsletter) {
$userModule->getNewsletterManager()->subscribeUserNewsletter($model); $userModule->getNewsletterManager()->subscribeUserNewsletter($model);
} else { } else {
$userModule->getNewsletterManager()->unsubscribeUserNewsletter($model); $userModule->getNewsletterManager()->unsubscribeUserNewsletter($model);
} }


// Alerte confiance
$userBelongToProducer->trust_alert = $model->trust_alert;
$userBelongToProducer->trust_alert_comment = $model->trust_alert_comment;
$userBelongToProducer->save();

$this->setFlash('success', 'Utilisateur <strong>' . Html::encode($userModule->getUsername($model)) . '</strong> modifié.'); $this->setFlash('success', 'Utilisateur <strong>' . Html::encode($userModule->getUsername($model)) . '</strong> modifié.');
return $this->redirect(['view', 'id' => $model->id]); return $this->redirect(['view', 'id' => $model->id]);
} }

+ 1
- 1
backend/views/distribution/index.php View File

<span class="label label-success" v-if="!order.date_update && !order.date_delete"><span class="glyphicon glyphicon-check"></span></span> <span class="label label-success" v-if="!order.date_update && !order.date_delete"><span class="glyphicon glyphicon-check"></span></span>
</td> </td>
<td class="column-user"> <td class="column-user">
<a :href="baseUrl+'/user/view?id='+order.id_user" target="_blank" v-if="order.user">
<a v-if="order.user" :href="baseUrl+'/user/view?id='+order.id_user" target="_blank" :class="order.user.trust_alert ? 'user-trust-alert' : ''" :title="order.user.trust_alert ? order.user.trust_alert_comment : ''">
<template v-if="order.user.name_legal_person && order.user.name_legal_person.length"> <template v-if="order.user.name_legal_person && order.user.name_legal_person.length">
{{ order.user.name_legal_person }} {{ order.user.name_legal_person }}
</template> </template>

+ 21
- 0
backend/views/user/_form.php View File

</div> </div>
</div> </div>


<div class="panel panel-default panel-newsletter">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-exclamation-triangle"></i>
Alerte confiance
</h3>
</div>
<div class="panel-body">
<?= $form->field($model, 'trust_alert')->widget(Toggle::class,
[
'options' => [
'data-id' => $model->id,
'data-on' => 'Oui',
'data-off' => 'Non',
],
]
)->hint('Si activé, le nom du client sera mis en avant dans la liste des commandes'); ?>
<?= $form->field($model, 'trust_alert_comment')->textarea(['rows' => 7]); ?>
</div>
</div>

<?php if ( <?php if (
$distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF) $distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)
|| $producerModule->getSolver()->getConfig('option_export_evoliz')): ?> || $producerModule->getSolver()->getConfig('option_export_evoliz')): ?>

+ 33
- 0
backend/views/user/view.php View File

use common\helpers\Price; use common\helpers\Price;
use domain\Order\Order\OrderModule; use domain\Order\Order\OrderModule;
use domain\User\User\UserModule; use domain\User\User\UserModule;
use domain\User\UserProducer\UserProducerModule;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;


$orderModule = OrderModule::getInstance(); $orderModule = OrderModule::getInstance();
$userModule = UserModule::getInstance(); $userModule = UserModule::getInstance();
$userProducerModule = UserProducerModule::getInstance();
$userProducer = $userProducerModule->findOneUserProducer($model);
$username = Html::encode($userModule->getSolver()->getUsername($model)); $username = Html::encode($userModule->getSolver()->getUsername($model));
$this->setTitle($username.' (#'.$model->id.')') ; $this->setTitle($username.' (#'.$model->id.')') ;
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ; $this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ;
</div> </div>
</div> </div>


<?php if($userProducer->trust_alert): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-exclamation-triangle"></i>
Alerte confiance
</h3>
</div>
<div class="panel-body">
<ul class="list-group list-group-unbordered">
<li class="list-group-item">
<strong>Alerte confiance</strong>
<span class="pull-right">
<span class="label label-danger">Oui</span>
</span>
</li>
<?php if($userProducer->trust_alert_comment && strlen($userProducer->trust_alert_comment) > 0): ?>
<li class="list-group-item">
<strong>Commentaire</strong>
<span class="pull-right">
<?= nl2br($userProducer->trust_alert_comment) ?>
</span>
<div class="clr"></div>
</li>
<?php endif; ?>
</ul>
</div>
</div>
<?php endif; ?>

<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"> <h3 class="panel-title">

+ 48
- 44
backend/web/css/screen.css View File

color: gray; color: gray;
font-style: italic; font-style: italic;
} }
/* line 286, ../sass/distribution/_index.scss */
/* line 285, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-user .user-trust-alert {
color: red;
}
/* line 290, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-delivery-note { .distribution-index #orders table td.column-delivery-note {
position: relative; position: relative;
} }
/* line 290, ../sass/distribution/_index.scss */
/* line 294, ../sass/distribution/_index.scss */
.distribution-index #orders table td.tiller { .distribution-index #orders table td.tiller {
width: 60px; width: 60px;
} }
/* line 293, ../sass/distribution/_index.scss */
/* line 297, ../sass/distribution/_index.scss */
.distribution-index #orders table td.tiller label { .distribution-index #orders table td.tiller label {
font-size: 12px; font-size: 12px;
cursor: pointer; cursor: pointer;
top: -2px; top: -2px;
font-weight: normal; font-weight: normal;
} }
/* line 302, ../sass/distribution/_index.scss */
/* line 306, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions { .distribution-index #orders table td.column-actions {
position: relative; position: relative;
text-align: right; text-align: right;
} }
/* line 306, ../sass/distribution/_index.scss */
/* line 310, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .wrapper-button-dropdown { .distribution-index #orders table td.column-actions .wrapper-button-dropdown {
display: inline-block; display: inline-block;
} }
/* line 310, ../sass/distribution/_index.scss */
/* line 314, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .dropdown-menu { .distribution-index #orders table td.column-actions .dropdown-menu {
left: -70px; left: -70px;
width: 227px; width: 227px;
} }
/* line 315, ../sass/distribution/_index.scss */
/* line 319, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .modal-form-order, .distribution-index #orders table td.column-actions .modal-form-order,
.distribution-index #orders table td.column-actions .modal-payment { .distribution-index #orders table td.column-actions .modal-payment {
text-align: left; text-align: left;
} }
/* line 320, ../sass/distribution/_index.scss */
/* line 324, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .add-subscription { .distribution-index #orders table td.column-actions .add-subscription {
position: relative; position: relative;
} }
/* line 323, ../sass/distribution/_index.scss */
/* line 327, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-actions .add-subscription .glyphicon-plus { .distribution-index #orders table td.column-actions .add-subscription .glyphicon-plus {
position: absolute; position: absolute;
top: 4px; top: 4px;
right: 4px; right: 4px;
font-size: 7px; font-size: 7px;
} }
/* line 332, ../sass/distribution/_index.scss */
/* line 336, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-state-payment { .distribution-index #orders table td.column-state-payment {
width: 133px; width: 133px;
} }
/* line 338, ../sass/distribution/_index.scss */
/* line 342, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-credit a.positive { .distribution-index #orders table td.column-credit a.positive {
color: green; color: green;
} }
/* line 341, ../sass/distribution/_index.scss */
/* line 345, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-credit a.negative { .distribution-index #orders table td.column-credit a.negative {
color: red; color: red;
} }
/* line 347, ../sass/distribution/_index.scss */
/* line 351, ../sass/distribution/_index.scss */
.distribution-index #orders table .state-payment-mobile { .distribution-index #orders table .state-payment-mobile {
display: none; display: none;
} }
/* line 351, ../sass/distribution/_index.scss */
/* line 355, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-payment { .distribution-index #orders table td.column-payment {
position: relative; position: relative;
} }
/* line 354, ../sass/distribution/_index.scss */
/* line 358, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-payment div.btn-group { .distribution-index #orders table td.column-payment div.btn-group {
width: 125px; width: 125px;
} }
/* line 360, ../sass/distribution/_index.scss */
/* line 364, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view ul { .distribution-index #orders table tr.view ul {
list-style-type: none; list-style-type: none;
margin-left: 0px; margin-left: 0px;
padding-left: 15px; padding-left: 15px;
} }
/* line 370, ../sass/distribution/_index.scss */
/* line 374, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view .comment { .distribution-index #orders table tr.view .comment {
margin-top: 20px; margin-top: 20px;
} }
/* line 374, ../sass/distribution/_index.scss */
/* line 378, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view .delivery { .distribution-index #orders table tr.view .delivery {
margin-top: 20px; margin-top: 20px;
} }
/* line 383, ../sass/distribution/_index.scss */
/* line 387, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container { .distribution-index .modal-form-order .modal-container {
width: 100%; width: 100%;
padding: 0px; padding: 0px;
} }
/* line 387, ../sass/distribution/_index.scss */
/* line 391, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-body { .distribution-index .modal-form-order .modal-container .modal-body {
padding-right: 15px; padding-right: 15px;
} }
/* line 390, ../sass/distribution/_index.scss */
/* line 394, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-body table { .distribution-index .modal-form-order .modal-container .modal-body table {
margin-bottom: 150px; margin-bottom: 150px;
} }
/* line 395, ../sass/distribution/_index.scss */
/* line 399, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer { .distribution-index .modal-form-order .modal-container .modal-footer {
border-top-color: #f4f4f4; border-top-color: #f4f4f4;
position: fixed; position: fixed;
text-align: center; text-align: center;
border-top: solid 1px #e0e0e0; border-top: solid 1px #e0e0e0;
} }
/* line 407, ../sass/distribution/_index.scss */
/* line 411, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer .actions-form button { .distribution-index .modal-form-order .modal-container .modal-footer .actions-form button {
float: none; float: none;
} }
/* line 411, ../sass/distribution/_index.scss */
/* line 415, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer .actions-form div.right { .distribution-index .modal-form-order .modal-container .modal-footer .actions-form div.right {
float: right; float: right;
} }
/* line 418, ../sass/distribution/_index.scss */
/* line 422, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .btn-credit { .distribution-index .modal-form-order .btn-credit {
float: right; float: right;
} }
/* line 424, ../sass/distribution/_index.scss */
/* line 428, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products .product-ordered td { .distribution-index .modal-form-order table.table-products .product-ordered td {
background-color: #e9e9e9; background-color: #e9e9e9;
} }
/* line 428, ../sass/distribution/_index.scss */
/* line 432, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products .product-ordered input.input-quantity { .distribution-index .modal-form-order table.table-products .product-ordered input.input-quantity {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
/* line 434, ../sass/distribution/_index.scss */
/* line 438, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price { .distribution-index .modal-form-order table.table-products td.price {
width: 150px; width: 150px;
} }
/* line 437, ../sass/distribution/_index.scss */
/* line 441, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price input { .distribution-index .modal-form-order table.table-products td.price input {
text-align: center; text-align: center;
} }
/* line 441, ../sass/distribution/_index.scss */
/* line 445, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price .input-group-addon { .distribution-index .modal-form-order table.table-products td.price .input-group-addon {
background-color: #eee; background-color: #eee;
} }
/* line 445, ../sass/distribution/_index.scss */
/* line 449, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price .invoice-price { .distribution-index .modal-form-order table.table-products td.price .invoice-price {
margin-top: 8px; margin-top: 8px;
} }
/* line 447, ../sass/distribution/_index.scss */
/* line 451, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price .invoice-price .label-invoice-price { .distribution-index .modal-form-order table.table-products td.price .invoice-price .label-invoice-price {
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: bold;
color: gray; color: gray;
} }
/* line 455, ../sass/distribution/_index.scss */
/* line 459, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity { .distribution-index .modal-form-order table.table-products td.quantity {
width: 165px; width: 165px;
} }
/* line 458, ../sass/distribution/_index.scss */
/* line 462, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity input { .distribution-index .modal-form-order table.table-products td.quantity input {
text-align: center; text-align: center;
color: black; color: black;
} }
/* line 463, ../sass/distribution/_index.scss */
/* line 467, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity .form-control { .distribution-index .modal-form-order table.table-products td.quantity .form-control {
border-right: 0px none; border-right: 0px none;
padding-right: 4px; padding-right: 4px;
} }
/* line 468, ../sass/distribution/_index.scss */
/* line 472, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity .input-group-addon { .distribution-index .modal-form-order table.table-products td.quantity .input-group-addon {
padding: 5px; padding: 5px;
padding-left: 0px; padding-left: 0px;
border-left: 0px none; border-left: 0px none;
border-right: 0px none; border-right: 0px none;
} }
/* line 477, ../sass/distribution/_index.scss */
/* line 481, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining { .distribution-index .modal-form-order table.table-products td.quantity-remaining {
text-align: right; text-align: right;
} }
/* line 480, ../sass/distribution/_index.scss */
/* line 484, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.quantity-remaining, .distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite { .distribution-index .modal-form-order table.table-products td.quantity-remaining.quantity-remaining, .distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite {
color: #00A65A; color: #00A65A;
} }
/* line 484, ../sass/distribution/_index.scss */
/* line 488, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.negative { .distribution-index .modal-form-order table.table-products td.quantity-remaining.negative {
color: #DD4B39; color: #DD4B39;
} }
/* line 488, ../sass/distribution/_index.scss */
/* line 492, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite, .distribution-index .modal-form-order table.table-products td.quantity-remaining.empty { .distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite, .distribution-index .modal-form-order table.table-products td.quantity-remaining.empty {
font-size: 18px; font-size: 18px;
} }
/* line 495, ../sass/distribution/_index.scss */
/* line 499, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .actions-form button { .distribution-index .modal-form-order .actions-form button {
margin-left: 15px; margin-left: 15px;
} }
/* line 503, ../sass/distribution/_index.scss */
/* line 507, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-icon { .distribution-index .modal-payment .info-box .info-box-icon {
width: 50px; width: 50px;
} }
/* line 506, ../sass/distribution/_index.scss */
/* line 510, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-icon i { .distribution-index .modal-payment .info-box .info-box-icon i {
font-size: 30px; font-size: 30px;
} }
/* line 511, ../sass/distribution/_index.scss */
/* line 515, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-content { .distribution-index .modal-payment .info-box .info-box-content {
margin-left: 50px; margin-left: 50px;
} }

+ 4
- 0
backend/web/sass/distribution/_index.scss View File

color: gray; color: gray;
font-style: italic; font-style: italic;
} }

.user-trust-alert {
color: red;
}
} }


td.column-delivery-note { td.column-delivery-note {

+ 28
- 0
console/migrations/m240320_092736_add_columns_user_trust_alert.php View File

<?php

use yii\db\Migration;
use yii\db\Schema;

/**
* Class m240320_092736_add_columns_user_trust_alert
*/
class m240320_092736_add_columns_user_trust_alert extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('user_producer', 'trust_alert', Schema::TYPE_BOOLEAN);
$this->addColumn('user_producer', 'trust_alert_comment', Schema::TYPE_TEXT);
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('user_producer', 'trust_alert');
$this->dropColumn('user_producer', 'trust_alert_comment');
}
}

+ 7
- 3
domain/User/User/User.php View File

var $product_price_percent; var $product_price_percent;
var $newsletter; var $newsletter;
var $send_mail_welcome; var $send_mail_welcome;
var $trust_alert;
var $trust_alert_comment;


/** /**
* @inheritdoc * @inheritdoc
[['no_mail', 'mail_distribution_monday', 'mail_distribution_tuesday', 'mail_distribution_wednesday', [['no_mail', 'mail_distribution_monday', 'mail_distribution_tuesday', 'mail_distribution_wednesday',
'mail_distribution_thursday', 'mail_distribution_friday', 'mail_distribution_saturday', 'mail_distribution_thursday', 'mail_distribution_friday', 'mail_distribution_saturday',
'mail_distribution_sunday', 'is_main_contact', 'newsletter', 'exclude_export_shopping_cart_labels', 'mail_distribution_sunday', 'is_main_contact', 'newsletter', 'exclude_export_shopping_cart_labels',
'send_mail_welcome'], 'boolean'],
[['lastname', 'name', 'phone', 'address', 'type', 'name_legal_person', 'evoliz_code'], 'string'],
'send_mail_welcome', 'trust_alert'], 'boolean'],
[['lastname', 'name', 'phone', 'address', 'type', 'name_legal_person', 'evoliz_code', 'trust_alert_comment'], 'string'],
['lastname', 'verifyOneName', 'skipOnError' => false, 'skipOnEmpty' => false], ['lastname', 'verifyOneName', 'skipOnError' => false, 'skipOnEmpty' => false],
[['email', 'email_sending_invoicing_documents'], 'email', 'message' => 'Cette adresse email n\'est pas valide'], [['email', 'email_sending_invoicing_documents'], 'email', 'message' => 'Cette adresse email n\'est pas valide'],
['email', 'verifyEmail'], ['email', 'verifyEmail'],
'newsletter' => "Inscrit au bulletin d'information", 'newsletter' => "Inscrit au bulletin d'information",
'exclude_export_shopping_cart_labels' => "Exclure de l'export d'étiquettes", 'exclude_export_shopping_cart_labels' => "Exclure de l'export d'étiquettes",
'send_mail_welcome' => "Envoyer un email de bienvenue", 'send_mail_welcome' => "Envoyer un email de bienvenue",
'email_sending_invoicing_documents' => 'Email facturation'
'email_sending_invoicing_documents' => 'Email facturation',
'trust_alert' => 'Alerte confiance',
'trust_alert_comment' => 'Commentaire',
]; ];
} }



+ 5
- 2
domain/User/UserProducer/UserProducer.php View File

return [ return [
[['id_user', 'id_producer'], 'required'], [['id_user', 'id_producer'], 'required'],
[['id_user', 'id_producer', 'product_price_percent'], 'integer'], [['id_user', 'id_producer', 'product_price_percent'], 'integer'],
[['active', 'bookmark', 'credit_active', 'newsletter'], 'boolean'],
[['active', 'bookmark', 'credit_active', 'newsletter', 'trust_alert'], 'boolean'],
[['credit', 'product_price_percent'], 'double'], [['credit', 'product_price_percent'], 'double'],
[['trust_alert_comment'], 'string']
]; ];
} }


'active' => 'Actif', 'active' => 'Actif',
'bookmark' => 'Favoris', 'bookmark' => 'Favoris',
'credit_active' => 'Crédit', 'credit_active' => 'Crédit',
'product_price_percent' => 'Prix produits : pourcentage'
'product_price_percent' => 'Prix produits : pourcentage',
'trust_alert' => 'Alert confiance',
'trust_alert_comment' => 'Commentaire',
]; ];
} }



Loading…
Cancel
Save