@@ -80,7 +80,8 @@ class DashboardController extends BackendController | |||
'pointsSaleCount' => $this->getPointSaleModule()->getRepository()->countPointSales(), | |||
'distributionsArray' => $this->getDistributionModule()->getRepository()->findDistributionsDashboard(), | |||
'ordersArray' => $this->getOrderModule()->getRepository()->findOrdersDashboard(), | |||
'subscriptionsLatestAddedArray' => $this->getSubscriptionModule()->getRepository()->findSubscriptionsLatestAdded() | |||
'subscriptionsLatestAddedArray' => $this->getSubscriptionModule()->getRepository()->findSubscriptionsLatestAdded(), | |||
'forumDiscussionsArray' => \Yii::$app->forumFlarumClient->getLastDiscussions() | |||
]); | |||
} | |||
} |
@@ -449,17 +449,19 @@ class DistributionController extends BackendController | |||
return $missingSubscriptionsArray; | |||
} | |||
public function actionAjaxPointSaleFavorite($idUser) | |||
public function actionAjaxPointSaleFavorite($idUser, $idDistribution) | |||
{ | |||
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; | |||
$userModule = $this->getUserModule(); | |||
$orderModule = $this->getOrderModule(); | |||
$distributionModule = $this->getDistributionModule(); | |||
$user = $userModule->findOneUserById($idUser); | |||
$distribution = $distributionModule->getRepository()->findOneDistributionById($idDistribution); | |||
$idFavoritePointSale = 0; | |||
if($user) { | |||
$favoritePointSale = $orderModule->getUserFavoritePointSale($user); | |||
$favoritePointSale = $orderModule->getUserFavoritePointSale($user, $distribution); | |||
if ($favoritePointSale) { | |||
$idFavoritePointSale = $favoritePointSale->id; | |||
} |
@@ -41,6 +41,7 @@ use common\logic\Distribution\Distribution\Module\DistributionModule; | |||
use common\logic\Order\Order\Model\Order; | |||
use common\logic\Order\Order\Module\OrderModule; | |||
use common\logic\Producer\Producer\Module\ProducerModule; | |||
use common\logic\Setting\SettingModule; | |||
use common\logic\Subscription\Subscription\Module\SubscriptionModule; | |||
use common\logic\User\User\Module\UserModule; | |||
use yii\helpers\Html ; | |||
@@ -50,90 +51,129 @@ $userModule = UserModule::getInstance(); | |||
$orderModule = OrderModule::getInstance(); | |||
$subscriptionModule = SubscriptionModule::getInstance(); | |||
$producerModule = ProducerModule::getInstance(); | |||
$settingModule = SettingModule::getInstance(); | |||
$adminSettingBag = $settingModule->getAdminSettingBag(); | |||
$this->setTitle('Tableau de bord'); | |||
?> | |||
<div class="dashboard-index"> | |||
<?php if(Yii::$app->request->get('error_products_points_sale')): ?> | |||
<div class="alert alert-warning"> | |||
Vous devez ajouter <?php if(!$productsCount): ?> des produits<?php endif; ?> | |||
<?php if(!$productsCount && !$pointsSaleCount): ?> et<?php endif; ?> | |||
<?php if(!$pointsSaleCount): ?> un ou des points de vente <?php endif; ?> | |||
avant d'effectuer cette action. | |||
</div> | |||
<?php endif; ?> | |||
<div <?php if($adminSettingBag->get('forumFlarumUrl')): ?>class="col-md-8"<?php endif; ?>> | |||
<?php if(Yii::$app->request->get('error_products_points_sale')): ?> | |||
<div class="alert alert-warning"> | |||
Vous devez ajouter <?php if(!$productsCount): ?> des produits<?php endif; ?> | |||
<?php if(!$productsCount && !$pointsSaleCount): ?> et<?php endif; ?> | |||
<?php if(!$pointsSaleCount): ?> un ou des points de vente <?php endif; ?> | |||
avant d'effectuer cette action. | |||
</div> | |||
<?php endif; ?> | |||
<?php if(!$productsCount): ?> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-yellow"><i class="fa fa-clone"></i></span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"><br /><?= Html::a('Ajouter des produits', ['product/create'], ['class' => 'btn btn-default']); ?></span> | |||
<?php if(!$productsCount): ?> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-yellow"><i class="fa fa-clone"></i></span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"><br /><?= Html::a('Ajouter des produits', ['product/create'], ['class' => 'btn btn-default']); ?></span> | |||
</div> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
<?php endif; ?> | |||
<?php if(!$pointsSaleCount): ?> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-yellow"><i class="fa fa-map-marker"></i></span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"><br /><?= Html::a('Ajouter des points de vente', ['point-sale/create'], ['class' => 'btn btn-default']); ?></span> | |||
<?php if(!$pointsSaleCount): ?> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-yellow"><i class="fa fa-map-marker"></i></span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"><br /><?= Html::a('Ajouter des points de vente', ['point-sale/create'], ['class' => 'btn btn-default']); ?></span> | |||
</div> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
<?php endif; ?> | |||
<?php if($productsCount && $pointsSaleCount && !count($distributionsArray)): ?> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-yellow"><i class="fa fa-calendar"></i></span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"><br /><?= Html::a('Ajouter des jours de distribution', ['distribution/index'], ['class' => 'btn btn-default']); ?></span> | |||
<?php if($productsCount && $pointsSaleCount && !count($distributionsArray)): ?> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-yellow"><i class="fa fa-calendar"></i></span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"><br /><?= Html::a('Ajouter des jours de distribution', ['distribution/index'], ['class' => 'btn btn-default']); ?></span> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
<?php if(count($distributionsArray)): ?> | |||
<div id="distributions"> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Prochaines distributions | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<!-- distributions --> | |||
<?php foreach($distributionsArray as $distribution): ?> | |||
<div class="col-md-6 col-sm-12 col-xs-12"> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-green date"> | |||
<span class="day"><?= strftime('%A', strtotime($distribution->date)) ?></span> | |||
<span class="num"><?= date('d', strtotime($distribution->date)) ?></span> | |||
<span class="month"><?= strftime('%B', strtotime($distribution->date)) ?></span> | |||
</span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"> | |||
<?php if(count($distribution->order)): ?> | |||
<strong><?= count($distribution->order); ?></strong> COMMANDES | |||
<?php else: ?> | |||
AUCUNE COMMANDE | |||
<?php endif; ?> | |||
</span> | |||
<span class="info-box-number"></span> | |||
<div class="buttons"> | |||
<?= Html::a('<span class="fa fa-eye"></span>', ['distribution/index', 'date' => $distribution->date], ['class' => 'btn btn-default']); ?> | |||
<?php if(count($distribution->order)): ?> | |||
<?php | |||
$exportsEnabledArray = $distributionModule->getExportManager()->getAllEnabled(); | |||
foreach($exportsEnabledArray as $name => $export) { | |||
echo Html::a('<span class="fa fa-download"></span>', ['distribution/export', 'name' => $name, 'date' => $distribution->date], ['class' => 'btn btn-default', 'title' => $export[0]]).' '; | |||
} | |||
?> | |||
<?php endif; ?> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<?php endforeach; ?> | |||
</div> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
<?php endif; ?> | |||
</div> | |||
<?php if(count($distributionsArray)): ?> | |||
<div id="distributions"> | |||
<?php if($adminSettingBag->get('forumFlarumUrl')): ?> | |||
<div class="col-md-4"> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Prochaines distributions | |||
</h3> | |||
<h3 class="panel-title"> | |||
Derniers sujets sur le forum | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<!-- distributions --> | |||
<?php foreach($distributionsArray as $distribution): ?> | |||
<div class="col-md-4 col-sm-12 col-xs-12"> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-green date"> | |||
<span class="day"><?= strftime('%A', strtotime($distribution->date)) ?></span> | |||
<span class="num"><?= date('d', strtotime($distribution->date)) ?></span> | |||
<span class="month"><?= strftime('%B', strtotime($distribution->date)) ?></span> | |||
</span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"> | |||
<?php if(count($distribution->order)): ?> | |||
<strong><?= count($distribution->order); ?></strong> COMMANDES | |||
<?php else: ?> | |||
AUCUNE COMMANDE | |||
<?php endif; ?> | |||
</span> | |||
<span class="info-box-number"></span> | |||
<div class="buttons"> | |||
<?= Html::a('<span class="fa fa-eye"></span>', ['distribution/index', 'date' => $distribution->date], ['class' => 'btn btn-default']); ?> | |||
<?php if(count($distribution->order)): ?> | |||
<?php | |||
$exportsEnabledArray = $distributionModule->getExportManager()->getAllEnabled(); | |||
foreach($exportsEnabledArray as $name => $export) { | |||
echo Html::a('<span class="fa fa-download"></span>', ['distribution/export', 'name' => $name, 'date' => $distribution->date], ['class' => 'btn btn-default', 'title' => $export[0]]).' '; | |||
} | |||
?> | |||
<?php endif; ?> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<?php endforeach; ?> | |||
<?php //echo print_r($forumDiscussionsArray); ?> | |||
<?php if($forumDiscussionsArray && count($forumDiscussionsArray['data'])): ?> | |||
<table class="table"> | |||
<?php $forumDiscussionsLimitedArray = array_slice($forumDiscussionsArray['data'], 0, min(3, count($forumDiscussionsArray['data']))); ?> | |||
<?php foreach($forumDiscussionsLimitedArray as $forumDiscussion): ?> | |||
<tr> | |||
<?php //echo print_r($forumDiscussion); ?> | |||
<td><?= $forumDiscussion['attributes']['title']; ?></td> | |||
<td><?= date('d/m à H:i', strtotime($forumDiscussion['attributes']['lastPostedAt'])); ?></td> | |||
</tr> | |||
<?php endforeach; ?> | |||
</table> | |||
<?php else: ?> | |||
<p>Aucun sujet sur le forum.</p> | |||
<?php endif; ?> | |||
<p> | |||
<a href="<?= $settingModule->getAdminSettingBag()->get('forumFlarumUrl'); ?>" class="btn btn-default"> | |||
<span class="fa fa-comments"></span> | |||
Consulter le forum | |||
</a> | |||
</p> | |||
</div> | |||
</div> | |||
</div> |
@@ -249,6 +249,7 @@ $this->setPageTitle('Distributions') ; | |||
v-if="showModalFormOrderCreate" | |||
create="1" | |||
:date="date" | |||
:distribution="distribution" | |||
:order="orderCreate" | |||
:points-sale="pointsSale" | |||
:id-active-point-sale="idActivePointSale" | |||
@@ -505,6 +506,7 @@ $this->setPageTitle('Distributions') ; | |||
<order-form | |||
v-if="showModalFormOrderUpdate && idOrderUpdate == order.id" | |||
create="0" | |||
:distribution="distribution" | |||
:date="date" | |||
:date-format="dateFormat" | |||
:points-sale="pointsSale" | |||
@@ -649,11 +651,15 @@ $this->setPageTitle('Distributions') ; | |||
<a v-if="producer && producer.credit && order.id_user > 0 && user.id_user == order.id_user" class="btn btn-xs btn-primary btn-credit" :href="baseUrl+'/user/credit?id='+user.id_user" v-for="user in users">{{ parseFloat(user.credit).toFixed(2).replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }}</a> | |||
<label class="control-label" for="select-id-user"> | |||
Utilisateur | |||
<a v-if="!order.id_user || order.id_user == 0" class="btn btn-default btn-xs" href="<?= Yii::$app->urlManager->createUrl('user/create'); ?>"> | |||
<span class="glyphicon glyphicon-plus"></span> | |||
Créer un utilisateur | |||
</a> | |||
</label> | |||
<select class="form-control select2-order-form" v-model="order.id_user" @change="userChange"> | |||
<option value="0">--</option> | |||
<option v-for="user in users" :value="user.id_user"> | |||
<template v-if="user.name_legal_person && user.name_legal_person.length"> | |||
<template v-if="user.type == 'legal-person' && user.name_legal_person && user.name_legal_person.length"> | |||
{{ user.name_legal_person }} (personne morale) | |||
</template> | |||
<template v-else> |
@@ -45,6 +45,7 @@ $userModule = UserModule::getInstance(); | |||
$userProducerModule = $this->getUserProducerModule(); | |||
$ticketModule = $this->getTicketModule(); | |||
$featureChecker = $this->getFeatureModule()->getChecker(); | |||
$adminSettingBag = $this->getSettingModule()->getAdminSettingBag(); | |||
$producer = GlobalParam::getCurrentProducer(); | |||
$userCurrent = GlobalParam::getCurrentUser(); | |||
@@ -67,7 +68,12 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran | |||
$countTicketsProducerUnreadLabel = ''; | |||
$countTicketsProducerUnread = $ticketModule->countTicketsUnreadByUser($this->getUserCurrent()); | |||
if($countTicketsProducerUnread && !$isUserCurrentGrantedAsAdministrator) { | |||
$countTicketsProducerUnreadLabel = '<span class="pull-right-container"><small class="label pull-right bg-green">'.$countTicketsProducerUnread.'</small></span>'; | |||
$countTicketsProducerUnreadLabel = '<small class="label pull-right bg-blue">'.$countTicketsProducerUnread.'</small>'; | |||
} | |||
$developerOnlineLabel = ''; | |||
if($adminSettingBag->get('supportDeveloperOnline')) { | |||
$developerOnlineLabel = '<small class="label pull-right bg-green"><i class="fa fa-phone"></i></small>'; | |||
} | |||
$countTicketsAdminUnreadLabel = ''; | |||
@@ -88,11 +94,11 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran | |||
'items' => [ | |||
['label' => "Besoin d'aide ?", 'options' => ['class' => 'header'], 'visible' => $isUserCurrentGrantedAsProducer], | |||
[ | |||
'label' => 'Support', | |||
'label' => 'Support', | |||
'icon' => 'comments', | |||
'url' => ['support/index'], | |||
'visible' => $isUserCurrentGrantedAsProducer, | |||
'template' => '<a href="{url}">{icon} {label}' . $countTicketsProducerUnreadLabel . '</a>' | |||
'template' => '<a href="{url}">{icon} {label} <span class="pull-right-container">' . $developerOnlineLabel . $countTicketsProducerUnreadLabel . '</span></a>' | |||
], | |||
['label' => $producer->name, 'options' => ['class' => 'header'], 'visible' => $isUserCurrentGrantedAsProducer], | |||
['label' => 'Tableau de bord', 'icon' => 'dashboard', 'url' => ['/dashboard/index'], 'visible' => $isUserCurrentGrantedAsProducer], | |||
@@ -102,7 +108,7 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran | |||
'icon' => 'clone', | |||
'url' => ['/product/index'], | |||
'visible' => $isUserCurrentGrantedAsProducer, | |||
'active' => Yii::$app->controller->id == 'product', | |||
'active' => Yii::$app->controller->id == 'product' || Yii::$app->controller->id == 'product-category', | |||
'items' => [ | |||
['label' => 'Liste', 'icon' => 'th-list', 'url' => ['/product/index'], 'visible' => $isUserCurrentGrantedAsProducer], | |||
['label' => 'Catégories', 'icon' => 'book', 'url' => ['/product-category/index'], 'visible' => $isUserCurrentGrantedAsProducer], |
@@ -39,6 +39,7 @@ | |||
use common\logic\Distribution\Distribution\Module\DistributionModule; | |||
use common\logic\Distribution\Distribution\Service\ExportManager; | |||
use common\logic\Producer\Producer\Module\ProducerModule; | |||
use lo\widgets\Toggle; | |||
use yii\helpers\Html; | |||
use yii\widgets\ActiveForm; | |||
use yii\helpers\ArrayHelper; | |||
@@ -53,76 +54,164 @@ $distributionModule = DistributionModule::getInstance(); | |||
<div class="point-sale-form"> | |||
<?php $form = ActiveForm::begin(); ?> | |||
<?php $form = ActiveForm::begin([ | |||
'enableClientValidation' => false | |||
]); ?> | |||
<div class="col-md-8"> | |||
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?> | |||
<?= $form->field($model, 'locality')->textInput(['maxlength' => 255]) ?> | |||
<?= $form->field($model, 'address')->textarea(['rows' => 6]) ?> | |||
<?= $form->field($model, 'id_user', [ | |||
'template' => '{label} <a href="' . Yii::$app->urlManager->createUrl(['user/create']) . '" class="btn btn-xs btn-default">Nouvel utilisateur <span class="glyphicon glyphicon-plus"></span></a><div>{input}</div>{hint}', | |||
]) | |||
->dropDownList($userModule->populateUserDropdownList(), ['class' => 'select2']) | |||
->hint('Utilisé lors de la facturation'); ?> | |||
<?php | |||
$addHintCredit = ''; | |||
if (!$producerModule->getConfig('credit')): | |||
$addHintCredit = '<br /><strong>Attention, le système de Crédit est désactivé au niveau des ' . Html::a('paramètres globaux', ['producer/update']) . '.</strong>'; | |||
endif; | |||
echo $form->field($model, 'credit') | |||
->checkbox() | |||
->hint('Cochez cette case si le client peut régler ses commandes via son compte <strong>Crédit</strong> pour ce point de vente.' | |||
. $addHintCredit); | |||
?> | |||
<?= $form->field($model, 'credit_functioning') | |||
->dropDownList([ | |||
'' => 'Paramètres globaux (' . Producer::$creditFunctioningArray[$producerModule->getConfig('credit_functioning')] . ')', | |||
Producer::CREDIT_FUNCTIONING_OPTIONAL => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_OPTIONAL], | |||
Producer::CREDIT_FUNCTIONING_MANDATORY => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_MANDATORY], | |||
Producer::CREDIT_FUNCTIONING_USER => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_USER], | |||
], [])->hint(Producer::HINT_CREDIT_FUNCTIONING); ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-th-list"></i> | |||
Général | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?> | |||
<?= $form->field($model, 'locality')->textInput(['maxlength' => 255]) ?> | |||
<?= $form->field($model, 'address')->textarea(['rows' => 4]) ?> | |||
<?= $form->field($model, 'minimum_order_amount')->textInput() ?> | |||
</div> | |||
</div> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<span class="glyphicon glyphicon-piggy-bank"></span> | |||
Crédit | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div id="credit"> | |||
<?php | |||
$addHintCredit = ''; | |||
if (!$producerModule->getConfig('credit')): | |||
$addHintCredit = '<br /><strong>Attention, le système de Crédit est désactivé au niveau des ' . Html::a('paramètres globaux', ['producer/update']) . '.</strong>'; | |||
endif; | |||
echo $form->field($model, 'credit')->widget(Toggle::class, | |||
[ | |||
'options' => [ | |||
'data-id' => $model->id, | |||
'data-on' => 'Oui', | |||
'data-off' => 'Non', | |||
], | |||
] | |||
)->hint('Activez cette option si vous souhaitez que vos clients puissent régler leurs commandes via leur compte <strong>Crédit</strong> pour ce point de vente.' | |||
. $addHintCredit); ?> | |||
<?= $form->field($model, 'credit_functioning') | |||
->dropDownList([ | |||
'' => 'Paramètres globaux (' . Producer::$creditFunctioningArray[$producerModule->getConfig('credit_functioning')] . ')', | |||
Producer::CREDIT_FUNCTIONING_OPTIONAL => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_OPTIONAL], | |||
Producer::CREDIT_FUNCTIONING_MANDATORY => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_MANDATORY], | |||
Producer::CREDIT_FUNCTIONING_USER => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_USER], | |||
], [])->hint(Producer::HINT_CREDIT_FUNCTIONING); ?> | |||
</div> | |||
</div> | |||
</div> | |||
<?php /*$form->field($model, 'product_price_percent') | |||
->dropDownList( ProductPrice::percentValues(), [])->hint('Pourcentage appliqué aux prix de chaque produit dans ce point de vente.');*/ ?> | |||
<?= $form->field($model, 'maximum_number_orders')->textInput() ?> | |||
<?= $form->field($model, 'minimum_order_amount')->textInput() ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-truck"></i> | |||
Livraison à domicile | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div id="home-delivery"> | |||
<?= $form->field($model, 'is_home_delivery')->widget(Toggle::class, | |||
[ | |||
'options' => [ | |||
'data-id' => $model->id, | |||
'data-on' => 'Oui', | |||
'data-off' => 'Non', | |||
], | |||
] | |||
); ?> | |||
</div> | |||
</div> | |||
</div> | |||
<div id="delivery-days"> | |||
<h2>Jours de livraison</h2> | |||
<?= $form->field($model, 'delivery_monday')->checkbox() ?> | |||
<?= $form->field($model, 'delivery_tuesday')->checkbox() ?> | |||
<?= $form->field($model, 'delivery_wednesday')->checkbox() ?> | |||
<?= $form->field($model, 'delivery_thursday')->checkbox() ?> | |||
<?= $form->field($model, 'delivery_friday')->checkbox() ?> | |||
<?= $form->field($model, 'delivery_saturday')->checkbox() ?> | |||
<?= $form->field($model, 'delivery_sunday')->checkbox() ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-th-large"></i> | |||
Boîte à pain | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div id="bread-box"> | |||
<?= $form->field($model, 'is_bread_box')->widget(Toggle::class, | |||
[ | |||
'options' => [ | |||
'data-id' => $model->id, | |||
'data-on' => 'Oui', | |||
'data-off' => 'Non', | |||
], | |||
] | |||
); ?> | |||
<?= $form->field($model, 'bread_box_code')->textInput() ?> | |||
<?= $form->field($model, 'maximum_number_orders')->textInput() ?> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
<h2>Informations</h2> | |||
<?= $form->field($model, 'infos_monday')->textarea(['rows' => 3]) ?> | |||
<?= $form->field($model, 'infos_tuesday')->textarea(['rows' => 3]) ?> | |||
<?= $form->field($model, 'infos_wednesday')->textarea(['rows' => 3]) ?> | |||
<?= $form->field($model, 'infos_thursday')->textarea(['rows' => 3]) ?> | |||
<?= $form->field($model, 'infos_friday')->textarea(['rows' => 3]) ?> | |||
<?= $form->field($model, 'infos_saturday')->textarea(['rows' => 3]) ?> | |||
<?= $form->field($model, 'infos_sunday')->textarea(['rows' => 3]) ?> | |||
<h2>Livraison à domicile</h2> | |||
<?= $form->field($model, 'is_home_delivery')->checkbox() ?> | |||
<h2>Boîte à pain</h2> | |||
<?= $form->field($model, 'is_bread_box')->checkbox() ?> | |||
<?= $form->field($model, 'bread_box_code')->textInput() ?> | |||
</div> | |||
<div class="col-md-4"> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title">Accès</h3> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-calendar"></i> | |||
Jours de livraison | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div id="days-distribution"> | |||
<?php $optionsTextareaInfos = ['rows' => 2, 'placeholder' => 'Informations'] ?> | |||
<div class="day"> | |||
<?= $form->field($model, 'delivery_monday')->checkbox() ?> | |||
<?= $form->field($model, 'infos_monday')->textarea($optionsTextareaInfos) ?> | |||
</div> | |||
<div class="day"> | |||
<?= $form->field($model, 'delivery_tuesday')->checkbox() ?> | |||
<?= $form->field($model, 'infos_tuesday')->textarea($optionsTextareaInfos) ?> | |||
</div> | |||
<div class="day"> | |||
<?= $form->field($model, 'delivery_wednesday')->checkbox() ?> | |||
<?= $form->field($model, 'infos_wednesday')->textarea($optionsTextareaInfos) ?> | |||
</div> | |||
<div class="day"> | |||
<?= $form->field($model, 'delivery_thursday')->checkbox() ?> | |||
<?= $form->field($model, 'infos_thursday')->textarea($optionsTextareaInfos) ?> | |||
</div> | |||
<div class="day"> | |||
<?= $form->field($model, 'delivery_friday')->checkbox() ?> | |||
<?= $form->field($model, 'infos_friday')->textarea($optionsTextareaInfos) ?> | |||
</div> | |||
<div class="day"> | |||
<?= $form->field($model, 'delivery_saturday')->checkbox() ?> | |||
<?= $form->field($model, 'infos_saturday')->textarea($optionsTextareaInfos) ?> | |||
</div> | |||
<div class="day"> | |||
<?= $form->field($model, 'delivery_sunday')->checkbox() ?> | |||
<?= $form->field($model, 'infos_sunday')->textarea($optionsTextareaInfos) ?> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-lock"></i> | |||
Accès | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'code') | |||
@@ -152,11 +241,32 @@ $distributionModule = DistributionModule::getInstance(); | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title">Génération des bons de livraison</h3> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-sticky-note-o"></i> | |||
Facturation | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'id_user', [ | |||
'template' => '{label} <a href="' . Yii::$app->urlManager->createUrl(['user/create']) . '" class="btn btn-xs btn-default">Nouvel utilisateur <span class="glyphicon glyphicon-plus"></span></a><div>{input}</div>{hint}', | |||
]) | |||
->dropDownList($userModule->populateUserDropdownList(), ['class' => 'select2']) | |||
->hint('Utilisateur au nom duquel les factures de ce point de vente seront éditées'); ?> | |||
</div> | |||
</div> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-sticky-note-o"></i> | |||
Génération des bons de livraison | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'button_generate_delivery_note_point_sale')->checkbox() ?> | |||
<?= $form->field($model, 'button_generate_delivery_note_each_user')->checkbox() ?> | |||
<div id="delivery-note-generation"> | |||
<?= $form->field($model, 'button_generate_delivery_note_point_sale')->checkbox() ?> | |||
<?= $form->field($model, 'button_generate_delivery_note_each_user')->checkbox() ?> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -177,7 +287,5 @@ $distributionModule = DistributionModule::getInstance(); | |||
<?= Html::a('Retour', ['point-sale/index'], ['class' => 'btn btn-default']) ?> | |||
<?= Html::submitButton($model->isNewRecord ? 'Créer' : 'Modifier', ['class' => 'btn btn-primary']) ?> | |||
</div> | |||
<?php ActiveForm::end(); ?> | |||
</div> |
@@ -100,9 +100,20 @@ $this->addBreadcrumb($this->getTitle()); | |||
<h4>Général</h4> | |||
<?= $form->field($model, 'name') ?> | |||
<?= $form->field($model, 'type') ?> | |||
<?= $form->field($model, 'description') | |||
<?php /*$form->field($model, 'description') | |||
->textarea(['rows' => 4]) | |||
->hint('Affiché sur la page d\'accueil') ?> | |||
->hint('Affiché sur la page d\'accueil')*/ ?> | |||
<?= $form->field($model, 'description')->widget(letyii\tinymce\Tinymce::class, [ | |||
'options' => [ | |||
'id' => 'testid', | |||
], | |||
'configs' => [ // Read more: https://www.tiny.cloud/docs/tinymce/6/full-featured-open-source-demo/ | |||
//'plugins' => 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons accordion' , | |||
'plugins' => 'preview searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link lists wordcount help' , | |||
] | |||
])->hint('Affiché sur la page d\'accueil') ; ?> | |||
<?= $form->field($model, 'address') | |||
->textarea(['rows' => 4]) ?> | |||
<?= $form->field($model, 'postcode') ?> |
@@ -45,13 +45,22 @@ use yii\widgets\ActiveForm; | |||
<?php $form = ActiveForm::begin(); ?> | |||
<div class="col-md-8"> | |||
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-th-list"></i> | |||
Général | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
<div class="form-group"> | |||
<?= Html::submitButton($model->isNewRecord ? 'Ajouter' : 'Modifier', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> | |||
<div class="form-group form-actions"> | |||
<?= Html::a('Retour', ['product-category/index'], ['class' => 'btn btn-default']) ?> | |||
<?= Html::submitButton($model->isNewRecord ? 'Ajouter' : 'Modifier', ['class' => 'btn btn-primary']) ?> | |||
</div> | |||
<?php ActiveForm::end(); ?> | |||
</div> |
@@ -1,6 +1,7 @@ | |||
<?php | |||
use common\helpers\Image; | |||
use lo\widgets\Toggle; | |||
use yii\helpers\Html; | |||
use yii\bootstrap\ActiveForm; | |||
use yii\helpers\ArrayHelper; | |||
@@ -8,6 +9,7 @@ use common\helpers\GlobalParam; | |||
use common\logic\Product\Product\Model\Product; | |||
use common\logic\PointSale\PointSale\Model\PointSale; | |||
$producerModule = $this->getProducerModule(); | |||
$productCategoryModule = $this->getProductCategoryModule(); | |||
$taxRateModule = $this->getTaxRateModule(); | |||
@@ -22,42 +24,75 @@ $taxRateModule = $this->getTaxRateModule(); | |||
<div> | |||
<div class="col-md-8"> | |||
<?= $form->field($model, 'status')->radioList([1 => 'Oui', 0 => 'Non']) ?> | |||
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?> | |||
<?= $form->field($model, 'reference')->textInput(['maxlength' => 255]) ?> | |||
<?= $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, 'unit') | |||
->dropDownList(ArrayHelper::map(Product::$unitsArray, 'unit', 'wording')) | |||
->label('Unité (pièce, poids ou volume)'); ?> | |||
<?php | |||
//Récupère la tva par défaut du producteur courant | |||
$producer = \common\helpers\GlobalParam::getCurrentProducer(); | |||
$taxRateDefault = $producer->taxRate; | |||
$taxRateNamesArray = array_merge(array(0 => 'Tva par défaut'), ArrayHelper::map($taxRateModule->findTaxRates(), 'id', function ($model) { | |||
return $model->name; | |||
})); | |||
$taxRateValuesArray = array_merge(array(0 => $taxRateDefault->value), ArrayHelper::map($taxRateModule->findTaxRates(), 'id', function ($model) { | |||
return $model->value; | |||
})); | |||
foreach ($taxRateValuesArray as $key => $taxRateValue) { | |||
$taxRateValuesArrayFormatted[$key] = array('data-tax-rate-value' => $taxRateValue); | |||
} | |||
?> | |||
<?php if ($taxRateDefault->value != 0): ?> | |||
<?= $form->field($model, 'id_tax_rate')->dropDownList($taxRateNamesArray, ['options' => $taxRateValuesArrayFormatted])->label('Taxe'); ?> | |||
<?php endif; ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-th-list"></i> | |||
Général | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'status')->widget(Toggle::class, | |||
[ | |||
'options' => [ | |||
'data-id' => $model->id, | |||
'data-on' => 'Oui', | |||
'data-off' => 'Non', | |||
], | |||
] | |||
); ?> | |||
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?> | |||
<?php if($producerModule->getSolver()->getConfig('option_export_display_product_reference')): ?> | |||
<?= $form->field($model, 'reference')->textInput(['maxlength' => 255]) ?> | |||
<?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, 'unit') | |||
->dropDownList(ArrayHelper::map(Product::$unitsArray, 'unit', 'wording')) | |||
->label('Unité (pièce, poids ou volume)'); ?> | |||
<?= $form->field($model, 'step')->textInput()->hint('Définit ce qui est ajouté ou enlevé lors des changements de quantité.') ?> | |||
<?= $form->field($model, 'weight')->textInput()->label('Poids (g)')->hint("Si unité au poids ou volume, utilisé pour déterminer le nombre de pièces dans les exports.") ?> | |||
</div> | |||
</div> | |||
<?= $form->field($model, 'price', [ | |||
'template' => ' | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-euro"></i> Prix | |||
<a href="<?= Yii::$app->urlManager->createUrl(['product/prices-list', 'id' => $model->id]) ?>" | |||
class="btn btn-default btn-xs"> | |||
Prix spécifiques (<?= count($model->productPrice) ?>) | |||
</a> | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?php | |||
//Récupère la tva par défaut du producteur courant | |||
$producer = \common\helpers\GlobalParam::getCurrentProducer(); | |||
$taxRateDefault = $producer->taxRate; | |||
$taxRateNamesArray = array_merge(array(0 => 'Tva par défaut'), ArrayHelper::map($taxRateModule->findTaxRates(), 'id', function ($model) { | |||
return $model->name; | |||
})); | |||
$taxRateValuesArray = array_merge(array(0 => $taxRateDefault->value), ArrayHelper::map($taxRateModule->findTaxRates(), 'id', function ($model) { | |||
return $model->value; | |||
})); | |||
foreach ($taxRateValuesArray as $key => $taxRateValue) { | |||
$taxRateValuesArrayFormatted[$key] = array('data-tax-rate-value' => $taxRateValue); | |||
} | |||
?> | |||
<?php if ($taxRateDefault->value != 0): ?> | |||
<?= $form->field($model, 'id_tax_rate')->dropDownList($taxRateNamesArray, ['options' => $taxRateValuesArrayFormatted])->label('Taxe'); ?> | |||
<?php endif; ?> | |||
<?= $form->field($model, 'price', [ | |||
'template' => ' | |||
<div class="row"> | |||
<div class="col-xs-6"> | |||
<label for="product-price" class="control-label without-tax"></label> | |||
@@ -73,86 +108,115 @@ $taxRateModule = $this->getTaxRateModule(); | |||
</div> | |||
</div> | |||
</div> | |||
', | |||
]) ?> | |||
<?= $form->field($model, 'step')->textInput()->hint('Définit ce qui est ajouté ou enlevé lors des changements de quantité.') ?> | |||
<?= $form->field($model, 'weight')->textInput()->label('Poids (g)')->hint("Si unité au poids ou volume, utilisé pour déterminer le nombre de pièces dans les exports.") ?> | |||
<div class="col-md-3"> | |||
<?= $form->field($model, 'quantity_max')->textInput() ?> | |||
</div> | |||
<div class="col-md-3"> | |||
<?= $form->field($model, 'quantity_max_monday')->textInput() ?> | |||
</div> | |||
<div class="col-md-3"> | |||
<?= $form->field($model, 'quantity_max_tuesday')->textInput() ?> | |||
</div> | |||
<div class="col-md-3"> | |||
<?= $form->field($model, 'quantity_max_wednesday')->textInput() ?> | |||
</div> | |||
<div class="col-md-3"> | |||
<?= $form->field($model, 'quantity_max_thursday')->textInput() ?> | |||
</div> | |||
<div class="col-md-3"> | |||
<?= $form->field($model, 'quantity_max_friday')->textInput() ?> | |||
]) ?> | |||
</div> | |||
</div> | |||
<div class="col-md-3"> | |||
<?= $form->field($model, 'quantity_max_saturday')->textInput() ?> | |||
</div> | |||
<div class="col-md-3"> | |||
<?= $form->field($model, 'quantity_max_sunday')->textInput() ?> | |||
<?php if (!$model->isNewRecord): ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-edit"></i> | |||
Distributions à venir | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'apply_distributions') | |||
->checkbox() | |||
->hint('Sélectionnez cette option si vous souhaitez que ces modifications (actif / non actif, quantités maximum) soient répercutées dans les distributions à venir.'); ?> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
<?php | |||
if (!$model->isNewRecord) { | |||
echo $form->field($model, 'apply_distributions') | |||
->checkbox() | |||
->hint('Sélectionnez cette option si vous souhaitez que ces modifications (actif / non actif, quantité max) soient répercutées dans les distributions à venir déjà initialisées.'); | |||
} | |||
?> | |||
<?php endif; ?> | |||
</div> | |||
<div class="col-md-4"> | |||
<?= $form->field($model, 'photoFile')->fileInput() ?> | |||
<?php | |||
if (strlen($model->photo)) { | |||
echo '<img class="photo-product" src="' . Image::getThumbnailSmall($model->photo, true) . '" width="200px" /><br />'; | |||
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label>'; | |||
} | |||
?> | |||
<div id="days-production"> | |||
<h2>Jours de distribution</h2> | |||
<?= $form->field($model, 'monday')->checkbox() ?> | |||
<?= $form->field($model, 'tuesday')->checkbox() ?> | |||
<?= $form->field($model, 'wednesday')->checkbox() ?> | |||
<?= $form->field($model, 'thursday')->checkbox() ?> | |||
<?= $form->field($model, 'friday')->checkbox() ?> | |||
<?= $form->field($model, 'saturday')->checkbox() ?> | |||
<?= $form->field($model, 'sunday')->checkbox() ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-image"></i> | |||
Photo | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'photoFile')->fileInput()->label('') ?> | |||
<?php | |||
if (strlen($model->photo)) { | |||
echo '<img class="photo-product" src="' . Image::getThumbnailSmall($model->photo, true) . '" width="200px" /><br />'; | |||
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label>'; | |||
} | |||
?> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
<div id="availability-points-sale"> | |||
<h2>Disponibilité points de vente</h2> | |||
<?= $form->field($model, 'available_on_points_sale')->radioList([1 => 'Disponible', 0 => 'Indisponible']) ?> | |||
<strong id="label-availability-points-sale">Et | |||
<span><?php if ($model->available_on_points_sale): ?>indisponible<?php else: ?>disponible<?php endif; ?></span> | |||
sur les points de vente</strong> | |||
<?php $pointSaleArray = PointSale::find() | |||
->where([ | |||
'id_producer' => GlobalParam::getCurrentProducerId(), | |||
'status' => 1 | |||
]) | |||
->orderBy('is_bread_box ASC, name ASC') | |||
->all(); ?> | |||
<?= Html::activeCheckboxList($model, 'pointsSale', ArrayHelper::map($pointSaleArray, 'id', function ($pointSale, $defaultValue) use ($model) { | |||
return Html::encode($pointSale->name); | |||
}), ['encode' => false, 'class' => '']) ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-calendar"></i> | |||
Jours de production | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div id="days-production"> | |||
<?= $form->field($model, 'monday')->checkbox() ?> | |||
<?= $form->field($model, 'tuesday')->checkbox() ?> | |||
<?= $form->field($model, 'wednesday')->checkbox() ?> | |||
<?= $form->field($model, 'thursday')->checkbox() ?> | |||
<?= $form->field($model, 'friday')->checkbox() ?> | |||
<?= $form->field($model, 'saturday')->checkbox() ?> | |||
<?= $form->field($model, 'sunday')->checkbox() ?> | |||
</div> | |||
<div class="clr"></div> | |||
</div> | |||
</div> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-balance-scale"></i> | |||
Quantités maximum par jour | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div id="maximum-quantities"> | |||
<?= $form->field($model, 'quantity_max')->textInput() ?> | |||
<?= $form->field($model, 'quantity_max_monday')->textInput() ?> | |||
<?= $form->field($model, 'quantity_max_tuesday')->textInput() ?> | |||
<?= $form->field($model, 'quantity_max_wednesday')->textInput() ?> | |||
<?= $form->field($model, 'quantity_max_thursday')->textInput() ?> | |||
<?= $form->field($model, 'quantity_max_friday')->textInput() ?> | |||
<?= $form->field($model, 'quantity_max_saturday')->textInput() ?> | |||
<?= $form->field($model, 'quantity_max_sunday')->textInput() ?> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-map-marker"></i> | |||
Disponibilité par point de vente | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div id="availability-points-sale"> | |||
<?= $form->field($model, 'available_on_points_sale')->radioList([1 => 'Disponible', 0 => 'Indisponible']) ?> | |||
<strong id="label-availability-points-sale">Et | |||
<span><?php if ($model->available_on_points_sale): ?>indisponible<?php else: ?>disponible<?php endif; ?></span> | |||
sur les points de vente</strong> | |||
<?php $pointSaleArray = PointSale::find() | |||
->where([ | |||
'id_producer' => GlobalParam::getCurrentProducerId(), | |||
'status' => 1 | |||
]) | |||
->orderBy('is_bread_box ASC, name ASC') | |||
->all(); ?> | |||
<?= Html::activeCheckboxList($model, 'pointsSale', ArrayHelper::map($pointSaleArray, 'id', function ($pointSale, $defaultValue) use ($model) { | |||
return Html::encode($pointSale->name); | |||
}), ['encode' => false, 'class' => '']) ?> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
</div> |
@@ -130,7 +130,6 @@ $this->addButton(['label' => 'Nouveau produit <span class="glyphicon glyphicon-p | |||
if ($model->price) { | |||
$return = Price::format($productModule->getPriceWithTax($model)) . ' (' . $productModule->getSolver()->strUnit($model, 'wording_unit', true) . ')'; | |||
} | |||
return $return; | |||
} | |||
], |
@@ -6,7 +6,7 @@ | |||
'model' => $model, | |||
]); ?> | |||
<?= $this->render('_nav_item', [ | |||
'title' => 'Prix spécifiques', | |||
'title' => 'Prix spécifiques ('.count($model->productPrice).')', | |||
'action' => 'prices-list', | |||
'currentAction' => $action, | |||
'model' => $model, |
@@ -15,33 +15,38 @@ $productModule = ProductModule::getInstance(); | |||
?> | |||
<div class="product-form"> | |||
<?= | |||
$this->render('_base_price', [ | |||
'model' => $modelProduct, | |||
]) ; | |||
?> | |||
<?php $form = ActiveForm::begin([ | |||
'enableClientValidation' => false, | |||
'options' => ['enctype' => 'multipart/form-data'] | |||
]); ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-euro"></i> | |||
<?= $model->isNewRecord ? 'Ajouter un prix' : 'Modifier un prix'; ?> | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'id_user')->dropDownList($userModule->populateUserDropdownList()); ?> | |||
<?= $form->field($model, 'id_user_group')->dropDownList($userGroupModule->populateUserGroupDropdownList()); ?> | |||
<?= $form->field($model, 'id_point_sale')->dropDownList($pointSaleModule->populatePointSaleDropdownList()); ?> | |||
<?= $form->field($model, 'from_quantity')->label('À partir de la quantité ('. $productModule->getSolver()->strUnit($modelProduct, 'wording', true).')'); ?> | |||
<?= $this->render('_base_price', [ | |||
'model' => $modelProduct, | |||
]) ; ?> | |||
<?= $form->field($model, 'id_user')->dropDownList($userModule->populateUserDropdownList()); ?> | |||
<?= $form->field($model, 'id_user_group')->dropDownList($userGroupModule->populateUserGroupDropdownList()); ?> | |||
<?= $form->field($model, 'id_point_sale')->dropDownList($pointSaleModule->populatePointSaleDropdownList()); ?> | |||
<?= $form->field($model, 'from_quantity')->label('À partir de la quantité ('. $productModule->getSolver()->strUnit($modelProduct, 'wording', true).')'); ?> | |||
<?php | |||
$producer = GlobalParam::getCurrentProducer(); | |||
$taxRateValue = $producer->taxRate->value; | |||
if($modelProduct->taxRate) { | |||
<?php | |||
$producer = GlobalParam::getCurrentProducer(); | |||
$taxRateValue = $producer->taxRate->value; | |||
if($modelProduct->taxRate) { | |||
$taxRateValue = $modelProduct->taxRate->value ; | |||
} | |||
?> | |||
} | |||
?> | |||
<?= $form->field($model, 'price', [ | |||
'template' => ' | |||
<?= $form->field($model, 'price', [ | |||
'template' => ' | |||
<div class="row"> | |||
<div class="col-xs-4"> | |||
<label for="reduction-increase-percent" class="control-label">Réduction / augmentation</label> | |||
@@ -64,10 +69,12 @@ $productModule = ProductModule::getInstance(); | |||
</div> | |||
</div> | |||
</div>', | |||
]) ?> | |||
]) ?> | |||
</div> | |||
</div> | |||
<div class="form-group"> | |||
<?= Html::a('Annuler', ['prices-list', 'id' => $model->id_product], ['class' => 'btn btn-default']) ?> | |||
<div class="form-group form-actions"> | |||
<?= Html::a('Retour', ['prices-list', 'id' => $model->id_product], ['class' => 'btn btn-default']) ?> | |||
<?= Html::submitButton($model->isNewRecord ? 'Ajouter' : 'Modifier', ['class' => 'btn btn-primary']) ?> | |||
</div> | |||
@@ -64,7 +64,8 @@ $this->render('../_nav', [ | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Prix spécifiques à ce produit | |||
<i class="fa fa-th-list"></i> | |||
Liste des prix | |||
<a href="<?= Yii::$app->urlManager->createUrl(['product/prices-create', 'idProduct' => $model->id]) ?>" | |||
class="btn btn-default btn-xs"> | |||
Nouveau prix | |||
@@ -73,8 +74,11 @@ $this->render('../_nav', [ | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?php | |||
<?= $this->render('_base_price', [ | |||
'model' => $model, | |||
]) ; ?> | |||
<?php | |||
echo GridView::widget([ | |||
'dataProvider' => $dataProvider, | |||
'columns' => [ | |||
@@ -151,17 +155,7 @@ $this->render('../_nav', [ | |||
], | |||
], | |||
]); | |||
?> | |||
</div> | |||
</div> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title">Rappel du prix de base</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<p>Prix de base : <strong><?= Price::format($productModule->getPrice($model)); ?> HT</strong> / | |||
<strong><?= Price::format($productModule->getPriceWithTax($model)); ?> TTC</strong><br/></p> | |||
</div> | |||
</div> | |||
</div> |
@@ -93,7 +93,7 @@ function field($form, $model, $settingDetail) { | |||
return $field->checkbox(); | |||
} | |||
elseif($settingDetail->getFormType() == 'toggle') { | |||
return $form->field($model, $settingDetail->getName(), ['options' => ['class' => 'form-group form-toggle']])->widget(Toggle::class, ['options' => ['data-on' => 'Oui', 'data-off' => 'Non', 'data-offstyle' => 'default']]); | |||
return $form->field($model, $settingDetail->getName(), ['options' => ['class' => 'form-group form-toggle']])->widget(Toggle::class, ['options' => ['data-on' => 'Oui', 'data-off' => 'Non', 'data-offstyle' => 'danger']]); | |||
} | |||
elseif($settingDetail->getFormType() == 'select') { | |||
return $field->dropDownList($settingDetail->getOptions()); |
@@ -53,77 +53,127 @@ $pointSaleModule = $this->getPointSaleModule(); | |||
<?php if($model->id): ?> | |||
<?= $form->field($model, 'id')->hiddenInput() ?> | |||
<?php endif; ?> | |||
<div class="col-md-5" id="bloc-select-user"> | |||
<?= $form->field($model, 'id_user')->dropDownList($userModule->populateUserDropdownList(), ['class' => 'select2']); ?> | |||
</div> | |||
<div class="col-md-1" id="or-user"> | |||
<span>OU</span> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-th-list"></i> | |||
Général | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div class="col-md-5" id="bloc-select-user"> | |||
<?= $form->field($model, 'id_user')->dropDownList($userModule->populateUserDropdownList(), ['class' => 'select2']); ?> | |||
</div> | |||
<div class="col-md-1" id="or-user"> | |||
<span>OU</span> | |||
</div> | |||
<div class="col-md-6"> | |||
<?= $form->field($model, 'username')->textInput() ?> | |||
</div> | |||
<div class="clr"></div> | |||
<?= $form->field($model, 'id_producer')->hiddenInput() ?> | |||
<?= $form->field($model, 'id_point_sale')->dropDownList(ArrayHelper::map($pointSaleModule->findPointSales(), 'id', function($model, $defaultValue) { | |||
return $model['name']; | |||
}), ['prompt' => '--','class' => 'form-control user-id']) ?> | |||
<?= $form->field($model, 'date_begin') ?> | |||
<?= $form->field($model, 'date_end')->hint('Laisser vide pour une durée indéterminée') ?> | |||
</div> | |||
</div> | |||
<div class="col-md-6"> | |||
<?= $form->field($model, 'username')->textInput() ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-calendar"></i> | |||
Jours et fréquence | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div class="days"> | |||
<?= $form->field($model, 'monday')->checkbox() ?> | |||
<?= $form->field($model, 'tuesday')->checkbox() ?> | |||
<?= $form->field($model, 'wednesday')->checkbox() ?> | |||
<?= $form->field($model, 'thursday')->checkbox() ?> | |||
<?= $form->field($model, 'friday')->checkbox() ?> | |||
<?= $form->field($model, 'saturday')->checkbox() ?> | |||
<?= $form->field($model, 'sunday')->checkbox() ?> | |||
</div> | |||
<div class="clr"></div> | |||
<?= $form->field($model, 'week_frequency')->dropDownList([1=>1, 2=>2, 3=>3, 4=>4]) ?> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
<?= $form->field($model, 'id_producer')->hiddenInput() ?> | |||
<?= $form->field($model, 'id_point_sale')->dropDownList(ArrayHelper::map($pointSaleModule->findPointSales(), 'id', function($model, $defaultValue) { | |||
return $model['name']; | |||
}), ['prompt' => '--','class' => 'form-control user-id']) ?> | |||
<?= $form->field($model, 'date_begin') ?> | |||
<?= $form->field($model, 'date_end')->hint('Laisser vide pour une durée indéterminée') ?> | |||
<div class="days"> | |||
<h2>Jours</h2> | |||
<?= $form->field($model, 'monday')->checkbox() ?> | |||
<?= $form->field($model, 'tuesday')->checkbox() ?> | |||
<?= $form->field($model, 'wednesday')->checkbox() ?> | |||
<?= $form->field($model, 'thursday')->checkbox() ?> | |||
<?= $form->field($model, 'friday')->checkbox() ?> | |||
<?= $form->field($model, 'saturday')->checkbox() ?> | |||
<?= $form->field($model, 'sunday')->checkbox() ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<span class="glyphicon glyphicon-piggy-bank"></span> | |||
Crédit | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'auto_payment') | |||
->dropDownList([ | |||
Subscription::AUTO_PAYMENT_DEDUCTED => 'Déduit', | |||
Subscription::AUTO_PAYMENT_YES => 'Oui', | |||
Subscription::AUTO_PAYMENT_NO => 'Non' | |||
]) | |||
->hint('Attention, un compte client existant doit être spécifié en haut de ce formulaire.') ?> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
<?= $form->field($model, 'week_frequency')->dropDownList([1=>1, 2=>2, 3=>3, 4=>4]) ?> | |||
<?= $form->field($model, 'auto_payment') | |||
->dropDownList([ | |||
Subscription::AUTO_PAYMENT_DEDUCTED => 'Déduit', | |||
Subscription::AUTO_PAYMENT_YES => 'Oui', | |||
Subscription::AUTO_PAYMENT_NO => 'Non' | |||
]) | |||
->hint('Attention, un compte client existant doit être spécifié en haut de ce formulaire.') ?> | |||
<div class="products"> | |||
<h2>Produits</h2> | |||
<?php if(isset($model->errors['products']) && count($model->errors['products'])) | |||
{ | |||
echo '<div class="alert alert-danger">'.$model->errors['products'][0].'</div>' ; | |||
} | |||
?> | |||
<table class="table table-bordered table-condensed table-hover" id="products"> | |||
<tr v-for="product in products"> | |||
<td>{{ product.name }}</td> | |||
<td> | |||
<input type="hidden" :value="product.step" :name="'product_step_'+product.step" /> | |||
<input type="hidden" :value="product.price" :name="'product_price_'+product.price" /> | |||
<div class="input-group"> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-clone"></i> | |||
Produits | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<div class="products"> | |||
<?php if(isset($model->errors['products']) && count($model->errors['products'])) | |||
{ | |||
echo '<div class="alert alert-danger">'.$model->errors['products'][0].'</div>' ; | |||
} | |||
?> | |||
<table class="table table-bordered table-condensed table-hover" id="products"> | |||
<tr v-for="product in products"> | |||
<td>{{ product.name }}</td> | |||
<td> | |||
<input type="hidden" :value="product.step" :name="'product_step_'+product.step" /> | |||
<input type="hidden" :value="product.price" :name="'product_price_'+product.price" /> | |||
<div class="input-group"> | |||
<span class="input-group-btn"> | |||
<button class="btn btn-default" type="button" @click="changeQuantityProductSubscription(false, product)"><span class="glyphicon glyphicon-minus"></span></button> | |||
</span> | |||
<input v-model="product.quantity" :name="'SubscriptionForm[products][product_'+product.id+']'" class="form-control input-quantity" /> | |||
<div class="input-group-addon"> | |||
<input v-model="product.quantity" :name="'SubscriptionForm[products][product_'+product.id+']'" class="form-control input-quantity" /> | |||
<div class="input-group-addon"> | |||
<span> | |||
{{ product.wording_unit }} | |||
</span> | |||
</div> | |||
<span class="input-group-btn"> | |||
</div> | |||
<span class="input-group-btn"> | |||
<button class="btn btn-default" type="button" @click="changeQuantityProductSubscription(true, product)"><span class="glyphicon glyphicon-plus"></span></button> | |||
</span> | |||
</div> | |||
</td> | |||
</tr> | |||
</table> | |||
</div> | |||
</td> | |||
</tr> | |||
</table> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-comment"></i> | |||
Commentaire | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'comment')->textarea(['rows' => 6]) ?> | |||
</div> | |||
</div> | |||
<?= $form->field($model, 'comment')->textarea(['rows' => 6]) ?> | |||
<div class="form-group form-actions"> | |||
<?= Html::a('Retour', ['subscription/index'], ['class' => 'btn btn-default']) ?> |
@@ -51,20 +51,27 @@ $userCurrent = $this->getUserCurrent(); | |||
$this->setTitle('Support & contact'); | |||
$this->addBreadcrumb($this->getTitle()); | |||
$supportDeveloperOnline = $adminSettingBag->get('supportDeveloperOnline'); | |||
?> | |||
<div class="support-index"> | |||
<?php if($context == 'producer'): ?> | |||
<div class="callout callout-info"> | |||
<p><i class="icon fa fa-info-circle"></i> Pour toutes vos remarques, suggestions et remontées de bugs.</p> | |||
<p><i class="icon fa fa-info-circle"></i> Pour toutes vos questions, remarques, suggestions et remontées de bugs.</p> | |||
</div> | |||
<div> | |||
<div class="col-md-6 col-left"> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-yellow"><i class="fa fa-phone"></i></span> | |||
<span class="info-box-icon <?php if($supportDeveloperOnline): ?>bg-green<?php else: ?>bg-yellow<?php endif; ?>"><i class="fa fa-phone"></i></span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text">Me contacter directement</span> | |||
<span class="info-box-text"> | |||
Me contacter directement | |||
<?php if($supportDeveloperOnline): ?> | |||
<br /><span class="label label-success">Disponible</span> | |||
<?php endif; ?> | |||
</span> | |||
<span class="info-box-text"> | |||
<br/> | |||
<strong><?= $adminSettingBag->get('administratorPhoneNumber'); ?></strong> | |||
@@ -98,6 +105,16 @@ $this->addBreadcrumb($this->getTitle()); | |||
</div> | |||
</div> | |||
</div> | |||
<?php if($adminSettingBag->get('forumFlarumUrl')): ?> | |||
<div class="col-md-6 col-left"> | |||
<div class="info-box"> | |||
<span class="info-box-icon bg-yellow"><i class="fa fa-users"></i></span> | |||
<div class="info-box-content"> | |||
<span class="info-box-text"><br/><?= Html::a("Ouvrir une discussion sur le forum", $adminSettingBag->get('forumFlarumUrl'), ['class' => 'btn btn-sm btn-default', 'target' => '_blank']); ?></span> | |||
</div> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
</div> | |||
<div class="clr"></div> | |||
<?php endif; ?> |
@@ -43,16 +43,24 @@ use yii\helpers\ArrayHelper; | |||
?> | |||
<div class="user-group-form"> | |||
<?php $form = ActiveForm::begin(); ?> | |||
<div class="col-md-8"> | |||
<?php $form = ActiveForm::begin(); ?> | |||
<div class="col-md-8"> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-th-list"></i> | |||
Général | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?> | |||
</div> | |||
</div> | |||
<div class="clr"></div> | |||
<div class="form-group"> | |||
<?= Html::submitButton($model->isNewRecord ? 'Ajouter' : 'Modifier', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> | |||
</div> | |||
<?php ActiveForm::end(); ?> | |||
</div> | |||
<div class="clr"></div> | |||
<div class="form-group form-actions"> | |||
<?= Html::a('Retour', ['user-group/index'], ['class' => 'btn btn-default']) ?> | |||
<?= Html::submitButton($model->isNewRecord ? 'Ajouter' : 'Modifier', ['class' => 'btn btn-primary']) ?> | |||
</div> | |||
<?php ActiveForm::end(); ?> | |||
</div> |
@@ -40,6 +40,7 @@ use common\logic\Distribution\Distribution\Module\DistributionModule; | |||
use common\logic\Distribution\Distribution\Service\ExportManager; | |||
use common\logic\Producer\Producer\Module\ProducerModule; | |||
use common\logic\User\User\Module\UserModule; | |||
use lo\widgets\Toggle; | |||
use yii\helpers\Html; | |||
use yii\widgets\ActiveForm; | |||
use yii\helpers\ArrayHelper; | |||
@@ -59,52 +60,114 @@ $distributionModule = DistributionModule::getInstance(); | |||
'enableClientValidation' => false | |||
]); ?> | |||
<?= $form->field($model, 'type') | |||
->dropDownList($userModule->getTypeChoicesArray(), [ | |||
'v-model' => 'type' | |||
]); ?> | |||
<?= $form->field($model, 'name_legal_person', ['options' => ['v-show' => "type == 'legal-person'"]])->textInput() ?> | |||
<?= $form->field($model, 'lastname')->textInput() ?> | |||
<?= $form->field($model, 'name')->textInput() ?> | |||
<?= $form->field($model, 'phone')->textInput() ?> | |||
<?= $form->field($model, 'email')->textInput() ?> | |||
<?php if(!$model->email): ?> | |||
<?= $form->field($model, 'send_mail_welcome')->checkbox() ?> | |||
<?php endif; ?> | |||
<?= $form->field($model, 'address')->textarea() ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-th-list"></i> | |||
Général | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'type') | |||
->dropDownList($userModule->getTypeChoicesArray(), [ | |||
'v-model' => 'type' | |||
]); ?> | |||
<?= $form->field($model, 'name_legal_person', ['options' => ['v-show' => "type == 'legal-person'"]])->textInput() ?> | |||
<?= $form->field($model, 'lastname')->textInput() ?> | |||
<?= $form->field($model, 'name')->textInput() ?> | |||
<?= $form->field($model, 'phone')->textInput() ?> | |||
<?= $form->field($model, 'email')->textInput() ?> | |||
<?php if(!$model->email): ?> | |||
<?= $form->field($model, 'send_mail_welcome')->checkbox() ?> | |||
<?php endif; ?> | |||
<?= $form->field($model, 'address')->textarea() ?> | |||
</div> | |||
</div> | |||
<?php if ($producerModule->getSolver()->getConfig('option_export_evoliz')): ?> | |||
<?= $form->field($model, 'evoliz_code')->textInput() ?> | |||
<?php endif; ?> | |||
<?= $form->field($model, 'newsletter')->checkbox() ?> | |||
<div class="panel panel-default panel-newsletter"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-paper-plane"></i> | |||
Bulletin d'information | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'newsletter')->widget(Toggle::class, | |||
[ | |||
'options' => [ | |||
'data-id' => $model->id, | |||
'data-on' => 'Oui', | |||
'data-off' => 'Non', | |||
], | |||
] | |||
); ?> | |||
</div> | |||
</div> | |||
<?php if($distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)): ?> | |||
<?= $form->field($model, 'exclude_export_shopping_cart_labels')->checkbox(); ?> | |||
<?php if ( | |||
$distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF) | |||
|| $producerModule->getSolver()->getConfig('option_export_evoliz')): ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-download"></i> | |||
Exports | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?php if($distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)): ?> | |||
<?= $form->field($model, 'exclude_export_shopping_cart_labels')->checkbox(); ?> | |||
<?php endif; ?> | |||
<?php if ($producerModule->getSolver()->getConfig('option_export_evoliz')): ?> | |||
<?= $form->field($model, 'evoliz_code')->textInput() ?> | |||
<?php endif; ?> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
<?php if($pointsSaleArray && count($pointsSaleArray) > 0): ?> | |||
<?= $form->field($model, 'points_sale')->checkboxlist( | |||
ArrayHelper::map($pointsSaleArray, 'id', function ($pointSale) use ($model) { | |||
$commentUserPointSale = isset($pointSale->userPointSale[0]) ? $pointSale->userPointSale[0]->comment : ''; | |||
$html = Html::encode($pointSale->name); | |||
if ($pointSale->restricted_access) { | |||
$html .= '<input type="text" placeholder="Commentaire" class="form-control" name="User[comment_point_sale_' . $pointSale->id . ']" value="' . (($model->id) ? Html::encode($commentUserPointSale) : '') . '" />'; | |||
} | |||
return $html; | |||
}), [ | |||
'encode' => false | |||
]); | |||
?> | |||
<div class="panel panel-default panel-point-sales"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-map-marker"></i> | |||
Points de vente | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'points_sale')->checkboxlist( | |||
ArrayHelper::map($pointsSaleArray, 'id', function ($pointSale) use ($model) { | |||
$commentUserPointSale = isset($pointSale->userPointSale[0]) ? $pointSale->userPointSale[0]->comment : ''; | |||
$html = Html::encode($pointSale->name); | |||
if ($pointSale->restricted_access) { | |||
$html .= '<input type="text" placeholder="Commentaire" class="form-control" name="User[comment_point_sale_' . $pointSale->id . ']" value="' . (($model->id) ? Html::encode($commentUserPointSale) : '') . '" />'; | |||
} | |||
return $html; | |||
}), [ | |||
'encode' => false | |||
]); | |||
?> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
<?php if($userGroupsArray && count($userGroupsArray) > 0): ?> | |||
<?= $form->field($model, 'user_groups')->checkboxlist( | |||
ArrayHelper::map($userGroupsArray, 'id', function ($userGroup) use ($model) { | |||
return Html::encode($userGroup->name); | |||
}), [ | |||
'encode' => false | |||
]); | |||
?> | |||
<div class="panel panel-default panel-user-groups"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-users"></i> | |||
Groupes | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?= $form->field($model, 'user_groups')->checkboxlist( | |||
ArrayHelper::map($userGroupsArray, 'id', function ($userGroup) use ($model) { | |||
return Html::encode($userGroup->name); | |||
}), [ | |||
'encode' => false | |||
]); | |||
?> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
<?php /* $form->field($model, 'product_price_percent') | |||
@@ -119,25 +182,54 @@ $distributionModule = DistributionModule::getInstance(); | |||
</div> | |||
<div class="col-md-4"> | |||
<h3>Email de bienvenue</h3> | |||
<?php $form = ActiveForm::begin(); ?> | |||
<div class="form-group"> | |||
<?= Html::submitButton("Envoyer l'email de bienvenue", ['class' => 'btn btn-primary', 'name' => 'submit_mail_welcome', 'value' => 1]) ?> | |||
</div> | |||
<?php ActiveForm::end(); ?> | |||
<h3>Mot de passe</h3> | |||
<?php $form = ActiveForm::begin(); ?> | |||
<div class="form-group"> | |||
<?= Html::submitButton('Envoyer un nouveau mot de passe', ['class' => 'btn btn-primary', 'name' => 'submit_new_password', 'value' => 1]) ?> | |||
</div> | |||
<?php ActiveForm::end(); ?> | |||
<?php if($model->email): ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-envelope"></i> | |||
Envoi d'emails | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?php $form = ActiveForm::begin(); ?> | |||
<div class="form-group"> | |||
<?= Html::submitButton( | |||
'<i class="fa fa-home"></i> Envoyer l\'email de bienvenue', | |||
['class' => 'btn btn-default', 'name' => 'submit_mail_welcome', 'value' => 1] | |||
) ?> | |||
</div> | |||
<?php ActiveForm::end(); ?> | |||
<?php $form = ActiveForm::begin(); ?> | |||
<div class="form-group"> | |||
<?= Html::submitButton( | |||
'<i class="fa fa-key"></i> Envoyer un nouveau mot de passe', | |||
['class' => 'btn btn-default', 'name' => 'submit_new_password', 'value' => 1] | |||
) ?> | |||
</div> | |||
<?php ActiveForm::end(); ?> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
<?php if(isset($pointSaleBillingArray) && $pointSaleBillingArray && count($pointSaleBillingArray) > 0): ?> | |||
<h3>Facturation</h3> | |||
<?php foreach($pointSaleBillingArray as $pointSale): ?> | |||
<a href="<?= Yii::$app->urlManager->createUrl(['point-sale/update', 'id' => $pointSale->id]) ?>"><?= $pointSale->name ?></a><br /> | |||
<?php endforeach; ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
<i class="fa fa-sticky-note-o"></i> | |||
Facturation | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?php foreach($pointSaleBillingArray as $pointSale): ?> | |||
<a class="btn btn-default btn-sm" href="<?= Yii::$app->urlManager->createUrl(['point-sale/update', 'id' => $pointSale->id]) ?>"> | |||
<i class="fa fa-map-marker"></i> | |||
<?= $pointSale->name ?> | |||
</a><br /> | |||
<?php endforeach; ?> | |||
</div> | |||
</div> | |||
<?php endif; ?> | |||
</div> | |||
</div> |
@@ -67,13 +67,4 @@ use yii\helpers\Html; | |||
</a> | |||
<?php endforeach; ?> | |||
</div> | |||
<div id="submenu"> | |||
<a class="btn btn-xs <?php if($section == 'index'): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>" href="<?= Yii::$app->urlManager->createUrl(['user/index','idPointSale' => $idPointSaleActive]); ?>"> | |||
<span class="glyphicon glyphicon-th-list"></span> Liste | |||
</a> | |||
<a class="btn btn-xs <?php if($section == 'mail'): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>" href="<?= Yii::$app->urlManager->createUrl(['user/mail','idPointSale' => $idPointSaleActive]); ?>"> | |||
<span class="glyphicon glyphicon-envelope"></span> Envoyer un email | |||
</a> | |||
</div> | |||
</div> |
@@ -1388,25 +1388,20 @@ a.btn.btn-primary .glyphicon-triangle-bottom, button.btn.btn-primary .glyphicon- | |||
margin-bottom: 30px; | |||
} | |||
/* line 1362, ../sass/screen.scss */ | |||
#menu-users #submenu { | |||
margin-bottom: 30px; | |||
text-align: left; | |||
} | |||
/* line 1367, ../sass/screen.scss */ | |||
#menu-users a { | |||
margin-bottom: 15px; | |||
} | |||
/* line 1373, ../sass/screen.scss */ | |||
/* line 1368, ../sass/screen.scss */ | |||
.user-index .input-group { | |||
width: 180px; | |||
} | |||
/* line 1376, ../sass/screen.scss */ | |||
/* line 1371, ../sass/screen.scss */ | |||
.user-index .input-group .input-credit { | |||
text-align: center; | |||
} | |||
/* line 1383, ../sass/screen.scss */ | |||
/* line 1378, ../sass/screen.scss */ | |||
.user-credit .the-credit { | |||
float: right; | |||
font-weight: bold; | |||
@@ -1422,16 +1417,16 @@ a.btn.btn-primary .glyphicon-triangle-bottom, button.btn.btn-primary .glyphicon- | |||
} | |||
/* facturation */ | |||
/* line 1398, ../sass/screen.scss */ | |||
/* line 1393, ../sass/screen.scss */ | |||
#free-price { | |||
padding: 20px; | |||
background-color: #F9F9F9; | |||
} | |||
/* line 1402, ../sass/screen.scss */ | |||
/* line 1397, ../sass/screen.scss */ | |||
#free-price h2 { | |||
font-family: "myriadpro-it"; | |||
} | |||
/* line 1406, ../sass/screen.scss */ | |||
/* line 1401, ../sass/screen.scss */ | |||
#free-price .amount span { | |||
font-size: 25px; | |||
color: white; | |||
@@ -1443,25 +1438,25 @@ a.btn.btn-primary .glyphicon-triangle-bottom, button.btn.btn-primary .glyphicon- | |||
padding-top: 7px; | |||
font-family: "myriadpro-regular"; | |||
} | |||
/* line 1417, ../sass/screen.scss */ | |||
/* line 1412, ../sass/screen.scss */ | |||
#free-price label { | |||
text-transform: uppercase; | |||
font-family: "myriadpro-light"; | |||
font-size: 20px; | |||
} | |||
/* line 1422, ../sass/screen.scss */ | |||
/* line 1417, ../sass/screen.scss */ | |||
#free-price label span { | |||
font-size: 16px; | |||
} | |||
/* line 1428, ../sass/screen.scss */ | |||
/* line 1423, ../sass/screen.scss */ | |||
#free-price .field-producer-free_price .input-group { | |||
width: 200px; | |||
} | |||
/* line 1434, ../sass/screen.scss */ | |||
/* line 1429, ../sass/screen.scss */ | |||
#free-price .field-user-free_price label { | |||
display: none; | |||
} | |||
/* line 1439, ../sass/screen.scss */ | |||
/* line 1434, ../sass/screen.scss */ | |||
#free-price #producer-free_price { | |||
width: 100px; | |||
height: 60px; | |||
@@ -1470,37 +1465,37 @@ a.btn.btn-primary .glyphicon-triangle-bottom, button.btn.btn-primary .glyphicon- | |||
text-align: center; | |||
} | |||
/* line 1449, ../sass/screen.scss */ | |||
/* line 1444, ../sass/screen.scss */ | |||
.development-index ul#tabs-status-developments { | |||
margin-bottom: 30px; | |||
border-bottom: solid 3px #F39C12; | |||
} | |||
/* line 1453, ../sass/screen.scss */ | |||
/* line 1448, ../sass/screen.scss */ | |||
.development-index ul#tabs-status-developments a { | |||
text-transform: uppercase; | |||
} | |||
/* line 1456, ../sass/screen.scss */ | |||
/* line 1451, ../sass/screen.scss */ | |||
.development-index ul#tabs-status-developments .active { | |||
border: 0px none; | |||
background: none; | |||
} | |||
/* line 1459, ../sass/screen.scss */ | |||
/* line 1454, ../sass/screen.scss */ | |||
.development-index ul#tabs-status-developments .active a { | |||
background-color: #F39C12; | |||
color: white; | |||
} | |||
/* line 1467, ../sass/screen.scss */ | |||
/* line 1462, ../sass/screen.scss */ | |||
.development-index #tab-developments .btn-group-priority { | |||
width: 100%; | |||
margin-bottom: 5px; | |||
} | |||
/* line 1471, ../sass/screen.scss */ | |||
/* line 1466, ../sass/screen.scss */ | |||
.development-index #tab-developments .btn-group-priority .btn-priority { | |||
display: block; | |||
float: none; | |||
width: 100%; | |||
} | |||
/* line 1478, ../sass/screen.scss */ | |||
/* line 1473, ../sass/screen.scss */ | |||
.development-index #tab-developments .label-priority { | |||
display: block; | |||
width: 100%; | |||
@@ -1509,24 +1504,24 @@ a.btn.btn-primary .glyphicon-triangle-bottom, button.btn.btn-primary .glyphicon- | |||
} | |||
/* stats */ | |||
/* line 1491, ../sass/screen.scss */ | |||
/* line 1486, ../sass/screen.scss */ | |||
.stats-products #nav-year { | |||
float: right; | |||
} | |||
/* line 1496, ../sass/screen.scss */ | |||
/* line 1491, ../sass/screen.scss */ | |||
.stats-products tr.month th { | |||
text-align: center; | |||
} | |||
/* line 1501, ../sass/screen.scss */ | |||
/* line 1496, ../sass/screen.scss */ | |||
.stats-products tr.sub-head th { | |||
font-weight: normal; | |||
font-size: 12px; | |||
} | |||
/* line 1507, ../sass/screen.scss */ | |||
/* line 1502, ../sass/screen.scss */ | |||
.stats-products td.name { | |||
text-transform: uppercase; | |||
} | |||
/* line 1511, ../sass/screen.scss */ | |||
/* line 1506, ../sass/screen.scss */ | |||
.stats-products td.align-center { | |||
text-align: center; | |||
} | |||
@@ -1954,15 +1949,19 @@ body.login-page .login-box .login-box-body a:hover { | |||
} | |||
/* line 3, ../sass/subscription/_form.scss */ | |||
.subscription-form #bloc-select-user { | |||
padding-left: 0px; | |||
} | |||
/* line 6, ../sass/subscription/_form.scss */ | |||
.subscription-form .field-subscriptionform-id { | |||
display: none; | |||
} | |||
/* line 7, ../sass/subscription/_form.scss */ | |||
/* line 10, ../sass/subscription/_form.scss */ | |||
.subscription-form table#products .input-quantity { | |||
text-align: center; | |||
border-right: 0px none; | |||
} | |||
/* line 11, ../sass/subscription/_form.scss */ | |||
/* line 14, ../sass/subscription/_form.scss */ | |||
.subscription-form table#products .input-group-addon { | |||
padding: 5px; | |||
padding-left: 0px; | |||
@@ -1970,14 +1969,14 @@ body.login-page .login-box .login-box-body a:hover { | |||
border-left: 0px none; | |||
border-right: 0px none; | |||
} | |||
/* line 18, ../sass/subscription/_form.scss */ | |||
/* line 21, ../sass/subscription/_form.scss */ | |||
.subscription-form table#products .select-unit { | |||
padding: 0px; | |||
width: 58px; | |||
text-align: center; | |||
height: 22px; | |||
} | |||
/* line 24, ../sass/subscription/_form.scss */ | |||
/* line 27, ../sass/subscription/_form.scss */ | |||
.subscription-form table#products .glyphicon-warning-sign { | |||
position: relative; | |||
top: 10px; | |||
@@ -2005,48 +2004,101 @@ body.login-page .login-box .login-box-body a:hover { | |||
} | |||
/* line 6, ../sass/product/_form.scss */ | |||
.product-create .field-product-status label, | |||
.product-update .field-product-status label { | |||
display: block; | |||
} | |||
/* line 12, ../sass/product/_form.scss */ | |||
.product-create #product-active label, | |||
.product-update #product-active label { | |||
margin-right: 15px; | |||
} | |||
/* line 10, ../sass/product/_form.scss */ | |||
/* line 18, ../sass/product/_form.scss */ | |||
.product-create .field-product-photofile label, | |||
.product-update .field-product-photofile label { | |||
display: none; | |||
} | |||
/* line 24, ../sass/product/_form.scss */ | |||
.product-create #maximum-quantities label, .product-create #maximum-quantities .form-control, | |||
.product-update #maximum-quantities label, | |||
.product-update #maximum-quantities .form-control { | |||
width: 49%; | |||
height: 35px; | |||
margin-bottom: 5px; | |||
} | |||
/* line 29, ../sass/product/_form.scss */ | |||
.product-create #maximum-quantities label, | |||
.product-update #maximum-quantities label { | |||
float: left; | |||
line-height: 35px; | |||
} | |||
/* line 33, ../sass/product/_form.scss */ | |||
.product-create #maximum-quantities .form-control, | |||
.product-update #maximum-quantities .form-control { | |||
float: right; | |||
} | |||
/* line 38, ../sass/product/_form.scss */ | |||
.product-create #days-production, | |||
.product-create #availability-points-sale, | |||
.product-update #days-production, | |||
.product-update #availability-points-sale { | |||
margin-top: 30px; | |||
} | |||
/* line 14, ../sass/product/_form.scss */ | |||
.product-create #days-production h2, | |||
.product-create #availability-points-sale h2, | |||
.product-update #days-production h2, | |||
.product-update #availability-points-sale h2 { | |||
font-size: 20px; | |||
.product-update #days-production { | |||
padding-left: 3px; | |||
} | |||
/* line 20, ../sass/product/_form.scss */ | |||
/* line 41, ../sass/product/_form.scss */ | |||
.product-create #days-production .form-group, | |||
.product-update #days-production .form-group { | |||
margin-bottom: 7px; | |||
} | |||
/* line 45, ../sass/product/_form.scss */ | |||
.product-create #days-production label, | |||
.product-update #days-production label { | |||
font-weight: normal; | |||
} | |||
/* line 26, ../sass/product/_form.scss */ | |||
/* line 48, ../sass/product/_form.scss */ | |||
.product-create #days-production label input, | |||
.product-update #days-production label input { | |||
position: relative; | |||
top: 1px; | |||
left: -3px; | |||
} | |||
/* line 55, ../sass/product/_form.scss */ | |||
.product-create #days-production .checkbox, | |||
.product-update #days-production .checkbox { | |||
margin-top: 0px; | |||
} | |||
/* line 59, ../sass/product/_form.scss */ | |||
.product-create #days-production .field-product-sunday, | |||
.product-update #days-production .field-product-sunday { | |||
margin-bottom: 0px; | |||
} | |||
/* line 62, ../sass/product/_form.scss */ | |||
.product-create #days-production .field-product-sunday .checkbox, | |||
.product-update #days-production .field-product-sunday .checkbox { | |||
margin-bottom: 0px; | |||
} | |||
/* line 69, ../sass/product/_form.scss */ | |||
.product-create #availability-points-sale #label-availability-points-sale, | |||
.product-update #availability-points-sale #label-availability-points-sale { | |||
display: block; | |||
margin-bottom: 6px; | |||
} | |||
/* line 30, ../sass/product/_form.scss */ | |||
/* line 73, ../sass/product/_form.scss */ | |||
.product-create #availability-points-sale #label-availability-points-sale span, | |||
.product-update #availability-points-sale #label-availability-points-sale span { | |||
border-bottom: dotted 1px black; | |||
} | |||
/* line 36, ../sass/product/_form.scss */ | |||
/* line 79, ../sass/product/_form.scss */ | |||
.product-create #availability-points-sale .field-product-available_on_points_sale label.control-label, | |||
.product-update #availability-points-sale .field-product-available_on_points_sale label.control-label { | |||
margin-bottom: 0px; | |||
position: relative; | |||
top: 3px; | |||
} | |||
/* line 44, ../sass/product/_form.scss */ | |||
/* line 86, ../sass/product/_form.scss */ | |||
.product-create #availability-points-sale #product-pointssale, | |||
.product-update #availability-points-sale #product-pointssale { | |||
max-height: 300px; | |||
overflow-y: scroll; | |||
} | |||
/* line 90, ../sass/product/_form.scss */ | |||
.product-create #availability-points-sale #product-pointssale label, | |||
.product-update #availability-points-sale #product-pointssale label { | |||
display: block; | |||
@@ -2515,6 +2567,21 @@ termes. | |||
} | |||
/* line 6, ../sass/user/_form.scss */ | |||
.user-create .panel-newsletter label, | |||
.user-update .panel-newsletter label { | |||
display: block; | |||
} | |||
/* line 12, ../sass/user/_form.scss */ | |||
.user-create .panel-point-sales label.control-label, | |||
.user-update .panel-point-sales label.control-label { | |||
display: none; | |||
} | |||
/* line 18, ../sass/user/_form.scss */ | |||
.user-create .panel-user-groups label.control-label, | |||
.user-update .panel-user-groups label.control-label { | |||
display: none; | |||
} | |||
/* line 25, ../sass/user/_form.scss */ | |||
.user-create #user-points_sale label, | |||
.user-create #user-user_groups label, | |||
.user-update #user-points_sale label, | |||
@@ -2526,7 +2593,7 @@ termes. | |||
padding: 5px 10px; | |||
border: solid 1px #e0e0e0; | |||
} | |||
/* line 14, ../sass/user/_form.scss */ | |||
/* line 33, ../sass/user/_form.scss */ | |||
.user-create #user-points_sale label .form-control, | |||
.user-create #user-user_groups label .form-control, | |||
.user-update #user-points_sale label .form-control, | |||
@@ -2553,6 +2620,87 @@ termes. | |||
text-align: center; | |||
} | |||
/* line 6, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #credit .field-pointsale-credit label, | |||
.point-sale-update #credit .field-pointsale-credit label { | |||
display: block; | |||
} | |||
/* line 13, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #days-distribution .form-group, | |||
.point-sale-update #days-distribution .form-group { | |||
margin-bottom: 0px; | |||
} | |||
/* line 15, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #days-distribution .form-group label, | |||
.point-sale-update #days-distribution .form-group label { | |||
font-weight: normal; | |||
} | |||
/* line 18, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #days-distribution .form-group.has-success label, | |||
.point-sale-update #days-distribution .form-group.has-success label { | |||
color: #333; | |||
} | |||
/* line 21, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #days-distribution .form-group .help-block, | |||
.point-sale-update #days-distribution .form-group .help-block { | |||
display: none; | |||
} | |||
/* line 26, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #days-distribution .field-pointsale-infos_monday, | |||
.point-sale-create #days-distribution .field-pointsale-infos_tuesday, | |||
.point-sale-create #days-distribution .field-pointsale-infos_wednesday, | |||
.point-sale-create #days-distribution .field-pointsale-infos_thursday, | |||
.point-sale-create #days-distribution .field-pointsale-infos_friday, | |||
.point-sale-create #days-distribution .field-pointsale-infos_saturday, | |||
.point-sale-create #days-distribution .field-pointsale-infos_sunday, | |||
.point-sale-update #days-distribution .field-pointsale-infos_monday, | |||
.point-sale-update #days-distribution .field-pointsale-infos_tuesday, | |||
.point-sale-update #days-distribution .field-pointsale-infos_wednesday, | |||
.point-sale-update #days-distribution .field-pointsale-infos_thursday, | |||
.point-sale-update #days-distribution .field-pointsale-infos_friday, | |||
.point-sale-update #days-distribution .field-pointsale-infos_saturday, | |||
.point-sale-update #days-distribution .field-pointsale-infos_sunday { | |||
margin-bottom: 10px; | |||
} | |||
/* line 34, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #days-distribution .field-pointsale-infos_monday label, | |||
.point-sale-create #days-distribution .field-pointsale-infos_tuesday label, | |||
.point-sale-create #days-distribution .field-pointsale-infos_wednesday label, | |||
.point-sale-create #days-distribution .field-pointsale-infos_thursday label, | |||
.point-sale-create #days-distribution .field-pointsale-infos_friday label, | |||
.point-sale-create #days-distribution .field-pointsale-infos_saturday label, | |||
.point-sale-create #days-distribution .field-pointsale-infos_sunday label, | |||
.point-sale-update #days-distribution .field-pointsale-infos_monday label, | |||
.point-sale-update #days-distribution .field-pointsale-infos_tuesday label, | |||
.point-sale-update #days-distribution .field-pointsale-infos_wednesday label, | |||
.point-sale-update #days-distribution .field-pointsale-infos_thursday label, | |||
.point-sale-update #days-distribution .field-pointsale-infos_friday label, | |||
.point-sale-update #days-distribution .field-pointsale-infos_saturday label, | |||
.point-sale-update #days-distribution .field-pointsale-infos_sunday label { | |||
display: none; | |||
} | |||
/* line 41, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #delivery-note-generation .form-group, | |||
.point-sale-update #delivery-note-generation .form-group { | |||
margin-bottom: 0px; | |||
} | |||
/* line 44, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #delivery-note-generation .form-group label, | |||
.point-sale-update #delivery-note-generation .form-group label { | |||
margin-bottom: 0px; | |||
font-weight: normal; | |||
} | |||
/* line 52, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #home-delivery .field-pointsale-is_home_delivery label, | |||
.point-sale-update #home-delivery .field-pointsale-is_home_delivery label { | |||
display: block; | |||
} | |||
/* line 58, ../sass/point_sale/_form.scss */ | |||
.point-sale-create #bread-box .field-pointsale-is_bread_box label, | |||
.point-sale-update #bread-box .field-pointsale-is_bread_box label { | |||
display: block; | |||
} | |||
/** | |||
Copyright distrib (2018) | |||
@@ -2845,26 +2993,26 @@ termes. | |||
top: -1px; | |||
margin-right: 3px; | |||
} | |||
/* line 30, ../sass/setting/_form.scss */ | |||
/* line 29, ../sass/setting/_form.scss */ | |||
.setting-form .form-group.form-toggle .control-label { | |||
position: relative; | |||
/*position: relative; | |||
top: 7px; | |||
left: 10px; | |||
left: 10px;*/ | |||
} | |||
/* line 36, ../sass/setting/_form.scss */ | |||
/* line 35, ../sass/setting/_form.scss */ | |||
.setting-form .form-group.form-toggle .toggle { | |||
-moz-border-radius: 20px; | |||
-webkit-border-radius: 20px; | |||
border-radius: 20px; | |||
float: left; | |||
-moz-border-radius: 5px; | |||
-webkit-border-radius: 5px; | |||
border-radius: 5px; | |||
display: block; | |||
} | |||
/* line 41, ../sass/setting/_form.scss */ | |||
/* line 40, ../sass/setting/_form.scss */ | |||
.setting-form .form-group.form-toggle .toggle .toggle-group .btn.toggle-on { | |||
color: white; | |||
} | |||
/* line 45, ../sass/setting/_form.scss */ | |||
/* line 43, ../sass/setting/_form.scss */ | |||
.setting-form .form-group.form-toggle .toggle .toggle-group .btn.toggle-off { | |||
border-color: white; | |||
color: white; | |||
} | |||
/** |
@@ -55,6 +55,7 @@ $(document).ready(function () { | |||
opendistrib_producers_admin(); | |||
opendistrib_user_form(); | |||
opendistrib_features_index(); | |||
opendistrib_point_sale_form(); | |||
}); | |||
var UrlManager = { | |||
@@ -67,6 +68,28 @@ var UrlManager = { | |||
} | |||
}; | |||
function opendistrib_point_sale_form() { | |||
if($('.point-sale-form').length) { | |||
opendistrib_point_sale_form_days_distribution_event(); | |||
$('#days-distribution .day input[type=checkbox]').change(function() { | |||
opendistrib_point_sale_form_days_distribution_event(); | |||
}); | |||
} | |||
} | |||
function opendistrib_point_sale_form_days_distribution_event() { | |||
$('#days-distribution .day').each(function() { | |||
var isChecked = $(this).find('input[type=checkbox]').prop('checked'); | |||
var $textareaInfos = $(this).find('textarea'); | |||
if(isChecked) { | |||
$textareaInfos.show(); | |||
} | |||
else { | |||
$textareaInfos.hide(); | |||
} | |||
}); | |||
} | |||
function opendistrib_user_form() { | |||
if($('#app-user-form').length) { | |||
var $fieldUserEmail = $('#app-user-form .field-user-email input'); | |||
@@ -270,16 +293,16 @@ function opendistrib_products_event_unit(change) { | |||
if (unit == 'piece') { | |||
label_price_ttc.html('Prix (la pièce) TTC'); | |||
label_price_ht.html('Prix (la pièce) HT'); | |||
label_quantity_max.html('Quantité max par défaut (pièces)'); | |||
label_quantity_max.html('Par défaut (pièces)'); | |||
} else if (unit == 'g' || unit == 'kg') { | |||
label_price_ttc.html('Prix (au kg) TTC'); | |||
label_price_ht.html('Prix (au kg) HT'); | |||
label_quantity_max.html('Quantité max par défaut (kg)'); | |||
label_quantity_max.html('Par défaut (kg)'); | |||
label_step.html('Pas (' + unit + ')'); | |||
} else if (unit == 'mL' || unit == 'L') { | |||
label_price_ttc.html('Prix (au litre) TTC'); | |||
label_price_ht.html('Prix (au litre) HT'); | |||
label_quantity_max.html('Quantité max par défaut (litres)'); | |||
label_quantity_max.html('Par défaut (litres)'); | |||
label_step.html('Pas (' + unit + ')'); | |||
} | |||
@@ -971,7 +971,7 @@ Vue.component('modal', { | |||
}); | |||
Vue.component('order-form', { | |||
props: ['date', 'dateFormat', 'pointsSale', 'idActivePointSale', 'meansPayment', 'users', 'products', 'order', 'orders', 'producer', 'loadingUpdateProductOrder', 'create', 'units'], | |||
props: ['distribution', 'date', 'dateFormat', 'pointsSale', 'idActivePointSale', 'meansPayment', 'users', 'products', 'order', 'orders', 'producer', 'loadingUpdateProductOrder', 'create', 'units'], | |||
emits: ['updateProductPrice', 'updateInvoicePrices'], | |||
data: function () { | |||
return { | |||
@@ -1166,6 +1166,7 @@ Vue.component('order-form', { | |||
axios.get(UrlManager.getBaseUrlAbsolute() + "distribution/ajax-point-sale-favorite", { | |||
params: { | |||
idUser: app.order.id_user, | |||
idDistribution: app.distribution.id | |||
} | |||
}) | |||
.then(function (response) { |
@@ -249,17 +249,19 @@ var app = new Vue({ | |||
var pricesArray = product.prices; | |||
var unitCoefficient = product.unit_coefficient; | |||
if (theQuantity) { | |||
theQuantity = theQuantity / unitCoefficient; | |||
} | |||
if(pricesArray && unitCoefficient) { | |||
if (theQuantity) { | |||
theQuantity = theQuantity / unitCoefficient; | |||
} | |||
for (var i = 0; i < pricesArray.length; i++) { | |||
if(pricesArray[i]) { | |||
var price = pricesArray[i].price; | |||
var fromQuantity = pricesArray[i].from_quantity; | |||
for (var i = 0; i < pricesArray.length; i++) { | |||
if(pricesArray[i]) { | |||
var price = pricesArray[i].price; | |||
var fromQuantity = pricesArray[i].from_quantity; | |||
if (price < thePrice && fromQuantity <= theQuantity) { | |||
thePrice = price; | |||
if (price < thePrice && fromQuantity <= theQuantity) { | |||
thePrice = price; | |||
} | |||
} | |||
} | |||
} |
@@ -0,0 +1,62 @@ | |||
.point-sale-create, | |||
.point-sale-update { | |||
#credit { | |||
.field-pointsale-credit { | |||
label { | |||
display: block; | |||
} | |||
} | |||
} | |||
#days-distribution { | |||
.form-group { | |||
margin-bottom: 0px; | |||
label { | |||
font-weight: normal; | |||
} | |||
&.has-success label { | |||
color: #333; | |||
} | |||
.help-block { | |||
display: none; | |||
} | |||
} | |||
.field-pointsale-infos_monday, | |||
.field-pointsale-infos_tuesday, | |||
.field-pointsale-infos_wednesday, | |||
.field-pointsale-infos_thursday, | |||
.field-pointsale-infos_friday, | |||
.field-pointsale-infos_saturday, | |||
.field-pointsale-infos_sunday { | |||
margin-bottom: 10px; | |||
label { | |||
display: none; | |||
} | |||
} | |||
} | |||
#delivery-note-generation { | |||
.form-group { | |||
margin-bottom: 0px; | |||
label { | |||
margin-bottom: 0px; | |||
font-weight: normal; | |||
} | |||
} | |||
} | |||
#home-delivery { | |||
.field-pointsale-is_home_delivery label { | |||
display: block; | |||
} | |||
} | |||
#bread-box { | |||
.field-pointsale-is_bread_box label { | |||
display: block; | |||
} | |||
} | |||
} |
@@ -1,24 +1,67 @@ | |||
.product-create, | |||
.product-update { | |||
.field-product-status { | |||
label { | |||
display: block; | |||
} | |||
} | |||
#product-active { | |||
label { | |||
margin-right: 15px ; | |||
} | |||
} | |||
#days-production, | |||
#availability-points-sale { | |||
margin-top: 30px ; | |||
h2 { | |||
font-size: 20px ; | |||
.field-product-photofile { | |||
label { | |||
display: none; | |||
} | |||
} | |||
#maximum-quantities { | |||
label, .form-control { | |||
width: 49%; | |||
height: 35px; | |||
margin-bottom: 5px; | |||
} | |||
label { | |||
float: left; | |||
line-height: 35px; | |||
} | |||
.form-control { | |||
float: right; | |||
} | |||
} | |||
#days-production { | |||
padding-left: 3px; | |||
.form-group { | |||
margin-bottom: 7px; | |||
} | |||
label { | |||
font-weight: normal ; | |||
input { | |||
position: relative; | |||
top: 1px; | |||
left: -3px; | |||
} | |||
} | |||
.checkbox { | |||
margin-top: 0px; | |||
} | |||
.field-product-sunday { | |||
margin-bottom: 0px; | |||
.checkbox { | |||
margin-bottom: 0px; | |||
} | |||
} | |||
} | |||
@@ -41,6 +84,9 @@ | |||
} | |||
#product-pointssale { | |||
max-height: 300px; | |||
overflow-y: scroll ; | |||
label { | |||
display: block; | |||
font-weight: normal; |
@@ -1359,11 +1359,6 @@ a.btn, button.btn { | |||
margin-bottom: 30px ; | |||
} | |||
#submenu { | |||
margin-bottom: 30px ; | |||
text-align: left ; | |||
} | |||
a { | |||
margin-bottom: 15px ; | |||
} | |||
@@ -1526,7 +1521,8 @@ a.btn, button.btn { | |||
@import "user/_credit.scss" ; | |||
@import "user/_form.scss" ; | |||
@import "producer/_update.scss" ; | |||
@import "point_sale/_index.scss" ; | |||
@import "point_sale/_index.scss" ; | |||
@import "point_sale/_form.scss" ; | |||
@import "report/_index.scss" ; | |||
@import "document/_form.scss" ; | |||
@import "document/_index.scss" ; |
@@ -26,24 +26,22 @@ | |||
} | |||
&.form-toggle { | |||
.control-label { | |||
position: relative; | |||
/*position: relative; | |||
top: 7px; | |||
left: 10px; | |||
left: 10px;*/ | |||
} | |||
.toggle { | |||
@include border-radius(20px); | |||
float: left; | |||
@include border-radius(5px); | |||
display: block; | |||
.toggle-group { | |||
.btn.toggle-on { | |||
//border-color: white; | |||
color: white; | |||
} | |||
.btn.toggle-off { | |||
border-color: white; | |||
color: white; | |||
} | |||
} | |||
} |
@@ -1,5 +1,8 @@ | |||
.subscription-form { | |||
#bloc-select-user { | |||
padding-left: 0px; | |||
} | |||
.field-subscriptionform-id { | |||
display: none; | |||
} |
@@ -1,6 +1,25 @@ | |||
.user-create, | |||
.user-update { | |||
.panel-newsletter { | |||
label { | |||
display: block; | |||
} | |||
} | |||
.panel-point-sales { | |||
label.control-label { | |||
display: none; | |||
} | |||
} | |||
.panel-user-groups { | |||
label.control-label { | |||
display: none; | |||
} | |||
} | |||
#user-points_sale, | |||
#user-user_groups { | |||
label { |
@@ -11,7 +11,7 @@ abstract class AbstractApi | |||
public string $url; | |||
public array $auth; | |||
public function __construct(string $url, array $auth) | |||
public function __construct(string $url, array $auth = []) | |||
{ | |||
$this->url = $url; | |||
$this->auth = $auth; | |||
@@ -41,7 +41,11 @@ abstract class AbstractApi | |||
private function getClient() | |||
{ | |||
$curl = new Curl(); | |||
$curl->setHeader($this->auth[0], $this->auth[1]); | |||
if(count($this->auth)) { | |||
$curl->setHeader($this->auth[0], $this->auth[1]); | |||
} | |||
return $curl; | |||
} | |||
@@ -0,0 +1,11 @@ | |||
<?php | |||
namespace common\components; | |||
class ForumFlarumClient extends AbstractApi | |||
{ | |||
public function getLastDiscussions() | |||
{ | |||
return $this->get('discussions', ['offset' => 1]); | |||
} | |||
} |
@@ -38,6 +38,7 @@ | |||
use common\components\BusinessLogic; | |||
use common\components\DolibarrApi; | |||
use common\components\ForumFlarumClient; | |||
use common\logic\Distribution\Distribution\Model\Distribution; | |||
use common\logic\Document\DeliveryNote\Model\DeliveryNote; | |||
use common\logic\Order\Order\Model\Order; | |||
@@ -83,6 +84,16 @@ return [ | |||
'alwaysdataClient' => [ | |||
'class' => 'common\components\AlwaysdataClient' | |||
], | |||
'forumFlarumClient' => function() { | |||
return new ForumFlarumClient(Yii::$app->logic->getSettingModule()->getAdminSettingBag()->get('forumFlarumUrl').'api/'); | |||
}, | |||
'dolibarrApi' => function() { | |||
return new DolibarrApi( | |||
Yii::$app->parameterBag->get('dolibarrApiUrl'), | |||
['DOLAPIKEY', \Yii::$app->parameterBag->get('dolibarrApiKey')] | |||
); | |||
}, | |||
'assetManager' => [ | |||
'linkAssets' => YII_ENV == "dev" ? 'true' : false, | |||
], | |||
@@ -167,12 +178,6 @@ return [ | |||
'enableStrictParsing' => false, | |||
'rules' => [], | |||
], | |||
'dolibarrApi' => function() { | |||
return new DolibarrApi( | |||
Yii::$app->parameterBag->get('dolibarrApiUrl'), | |||
['DOLAPIKEY', \Yii::$app->parameterBag->get('dolibarrApiKey')] | |||
); | |||
}, | |||
'logic' => function () { | |||
return new BusinessLogic(); | |||
}, |
@@ -37,7 +37,7 @@ | |||
*/ | |||
return [ | |||
'version' => '23.12.C', | |||
'version' => '24.1.B', | |||
'maintenanceMode' => false, | |||
'siteName' => 'Opendistrib', | |||
'adminEmail' => 'contact@opendistrib.net', |
@@ -121,7 +121,7 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri | |||
} | |||
.td-order-amount.is-order-paid { | |||
background-color: #f1f1f1; | |||
background-color: #ddd; | |||
} | |||
', | |||
'methods' => [ |
@@ -20,6 +20,7 @@ use common\logic\Payment\Model\Payment; | |||
use common\logic\Payment\Service\PaymentSolver; | |||
use common\logic\PointSale\PointSale\Model\PointSale; | |||
use common\logic\PointSale\PointSale\Repository\PointSaleRepository; | |||
use common\logic\PointSale\PointSale\Service\PointSaleSolver; | |||
use common\logic\PointSale\UserPointSale\Repository\UserPointSaleRepository; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
use common\logic\Producer\Producer\Repository\ProducerRepository; | |||
@@ -46,6 +47,7 @@ class OrderRepository extends AbstractRepository | |||
protected InvoiceSolver $invoiceSolver; | |||
protected PaymentSolver $paymentSolver; | |||
protected ProducerSolver $producerSolver; | |||
protected PointSaleSolver $pointSaleSolver; | |||
public function loadDependencies(): void | |||
{ | |||
@@ -63,6 +65,7 @@ class OrderRepository extends AbstractRepository | |||
$this->invoiceSolver = $this->loadService(InvoiceSolver::class); | |||
$this->paymentSolver = $this->loadService(PaymentSolver::class); | |||
$this->producerSolver = $this->loadService(ProducerSolver::class); | |||
$this->pointSaleSolver = $this->loadService(PointSaleSolver::class); | |||
} | |||
public function getDefaultOptionsSearch(): array | |||
@@ -409,10 +412,10 @@ class OrderRepository extends AbstractRepository | |||
* Retourne le point de vente favoris d'un utilisateur : le point de vente auquel le client est lié, | |||
* le point de vente de la dernière commande sinon. | |||
*/ | |||
public function getUserFavoritePointSale(User $user): ?PointSale | |||
public function getUserFavoritePointSale(User $user, Distribution $distribution = null): ?PointSale | |||
{ | |||
$pointSale = null; | |||
$arrayUserPointSale = $this->userPointSaleRepository->findUserPointSalesByUser($user); | |||
$arrayUserPointSale = $this->userPointSaleRepository->findUserPointSalesByUser($user, $distribution); | |||
if (count($arrayUserPointSale) == 1) { | |||
$pointSale = $this->pointSaleRepository->findOnePointSaleById($arrayUserPointSale[0]->id_point_sale); | |||
@@ -420,6 +423,9 @@ class OrderRepository extends AbstractRepository | |||
$lastOrder = $this->findOneOrderLastByUser($user); | |||
if ($lastOrder) { | |||
$pointSale = $this->pointSaleRepository->findOnePointSaleById($lastOrder->id_point_sale); | |||
if($distribution && !$this->pointSaleSolver->isDelivered($pointSale, $distribution)) { | |||
$pointSale = null; | |||
} | |||
} | |||
} | |||
@@ -122,12 +122,12 @@ class PointSale extends ActiveRecordCommon | |||
'default' => 'Point de vente par défaut', | |||
'id_user' => 'Contact facturation', | |||
'product_price_percent' => 'Prix produits : pourcentage', | |||
'maximum_number_orders' => 'Nombre maximum de commandes', | |||
'maximum_number_orders' => 'Nombre maximum de commandes par distribution', | |||
'is_bread_box' => 'Boîte à pain', | |||
'bread_box_code' => 'Code boîte à pain', | |||
'status' => 'Statut', | |||
'button_generate_delivery_note_point_sale' => 'Activer le bouton de génération de bon de livraison par point de vente', | |||
'button_generate_delivery_note_each_user' => 'Activer le bouton de génération de bon de livraison par client', | |||
'button_generate_delivery_note_point_sale' => 'Par point de vente', | |||
'button_generate_delivery_note_each_user' => 'Par client', | |||
'exclude_export_shopping_cart_labels' => "Exclure de l'export d'étiquettes", | |||
'is_home_delivery' => "Livraison à domicile", | |||
'minimum_order_amount' => "Montant minimum de commande (€)" |
@@ -4,14 +4,35 @@ namespace common\logic\PointSale\PointSale\Service; | |||
use common\helpers\GlobalParam; | |||
use common\logic\AbstractService; | |||
use common\logic\Order\Order\Model\Order; | |||
use common\logic\Distribution\Distribution\Model\Distribution; | |||
use common\logic\PointSale\PointSale\Model\PointSale; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
use common\logic\SolverInterface; | |||
use yii\helpers\Html; | |||
class PointSaleSolver extends AbstractService implements SolverInterface | |||
{ | |||
public function filterUserPointSalesByDistribution(array $userPointSaleArray, Distribution $distribution): array | |||
{ | |||
foreach($userPointSaleArray as $key => $userPointSale) { | |||
if(!$this->isDelivered($userPointSale->pointSale, $distribution)) { | |||
unset($userPointSaleArray[$key]); | |||
} | |||
} | |||
return $userPointSaleArray; | |||
} | |||
public function isDelivered(PointSale $pointSale, Distribution $distribution): bool | |||
{ | |||
foreach($distribution->pointSaleDistribution as $pointSaleDistribution) { | |||
if($pointSaleDistribution->pointSale->id == $pointSale->id && $pointSaleDistribution->delivery) { | |||
return true; | |||
} | |||
} | |||
return false; | |||
} | |||
/** | |||
* Retourne le commentaire de l'utilisateur courant lié au point de vente. | |||
*/ |
@@ -6,11 +6,13 @@ use common\logic\AbstractModule; | |||
use common\logic\PointSale\UserPointSale\Repository\UserPointSaleRepository; | |||
use common\logic\PointSale\UserPointSale\Service\UserPointSaleBuilder; | |||
use common\logic\PointSale\UserPointSale\Service\UserPointSaleDefinition; | |||
use common\logic\PointSale\UserPointSale\Service\UserPointSaleSolver; | |||
/** | |||
* @mixin UserPointSaleDefinition | |||
* @mixin UserPointSaleRepository | |||
* @mixin UserPointSaleBuilder | |||
* @mixin UserPointSaleSolver | |||
*/ | |||
class UserPointSaleModule extends AbstractModule | |||
{ | |||
@@ -20,6 +22,7 @@ class UserPointSaleModule extends AbstractModule | |||
UserPointSaleDefinition::class, | |||
UserPointSaleRepository::class, | |||
UserPointSaleBuilder::class, | |||
UserPointSaleSolver::class | |||
]; | |||
} | |||
@@ -37,4 +40,9 @@ class UserPointSaleModule extends AbstractModule | |||
{ | |||
return UserPointSaleBuilder::getInstance(); | |||
} | |||
public function getSolver(): UserPointSaleSolver | |||
{ | |||
return UserPointSaleSolver::getInstance(); | |||
} | |||
} |
@@ -3,17 +3,20 @@ | |||
namespace common\logic\PointSale\UserPointSale\Repository; | |||
use common\logic\AbstractRepository; | |||
use common\logic\Distribution\Distribution\Model\Distribution; | |||
use common\logic\PointSale\PointSale\Model\PointSale; | |||
use common\logic\PointSale\UserPointSale\Model\UserPointSale; | |||
use common\logic\PointSale\PointSale\Service\PointSaleSolver; | |||
use common\logic\User\User\Model\User; | |||
class UserPointSaleRepository extends AbstractRepository | |||
{ | |||
protected UserPointSaleRepositoryQuery $query; | |||
protected PointSaleSolver $pointSaleSolver; | |||
public function loadDependencies(): void | |||
{ | |||
$this->loadQuery(UserPointSaleRepositoryQuery::class); | |||
$this->pointSaleSolver = $this->loadService(PointSaleSolver::class); | |||
} | |||
public function getDefaultOptionsSearch(): array | |||
@@ -26,12 +29,18 @@ class UserPointSaleRepository extends AbstractRepository | |||
] ; | |||
} | |||
public function findUserPointSalesByUser(User $user): array | |||
public function findUserPointSalesByUser(User $user, Distribution $distribution = null): array | |||
{ | |||
return $this->createDefaultQuery() | |||
$userPointSalesArray = $this->createDefaultQuery() | |||
->joinPointSale() | |||
->filterByUser($user) | |||
->find(); | |||
if($distribution) { | |||
$userPointSalesArray = $this->pointSaleSolver->filterUserPointSalesByDistribution($userPointSalesArray, $distribution); | |||
} | |||
return $userPointSalesArray; | |||
} | |||
public function findOneUserPointSale(User $user = null, PointSale $pointSale = null) |
@@ -0,0 +1,10 @@ | |||
<?php | |||
namespace common\logic\PointSale\UserPointSale\Service; | |||
use common\logic\AbstractSolver; | |||
class UserPointSaleSolver extends AbstractSolver | |||
{ | |||
} |
@@ -60,6 +60,11 @@ class ProducerModule extends AbstractModule | |||
return ProducerManager::getInstance(); | |||
} | |||
public function getManager(): ProducerManager | |||
{ | |||
return ProducerManager::getInstance(); | |||
} | |||
public function getProducerPageSizer(): ProducerPageSizer | |||
{ | |||
return ProducerPageSizer::getInstance(); |
@@ -11,6 +11,7 @@ use common\logic\PointSale\PointSale\Model\PointSale; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
use common\logic\Producer\Producer\Service\ProducerSolver; | |||
use common\logic\Producer\ProducerPriceRange\Repository\ProducerPriceRangeRepository; | |||
use common\logic\Setting\AdminSettingBag; | |||
use common\logic\User\User\Model\User; | |||
use yii\helpers\Html; | |||
@@ -369,6 +370,13 @@ class ProducerRepository extends AbstractRepository | |||
return $count; | |||
} | |||
public function countCacheProducersActiveWithTurnover(): int | |||
{ | |||
return \Yii::$app->cache->getOrSet('count_producers_active', function () { | |||
return $this->countProducersActiveWithTurnover(); | |||
}, 60 * 60 * 24); | |||
} | |||
public function findProducers() | |||
{ | |||
return $this->createQuery()->find(); |
@@ -5,9 +5,20 @@ namespace common\logic\Producer\Producer\Service; | |||
use common\logic\AbstractService; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
use common\logic\ManagerInterface; | |||
use common\logic\Producer\Producer\Repository\ProducerRepository; | |||
use common\logic\Setting\AdminSettingBag; | |||
class ProducerManager extends AbstractService implements ManagerInterface | |||
{ | |||
protected AdminSettingBag $adminSettingBag; | |||
protected ProducerRepository $producerRepository; | |||
public function loadDependencies(): void | |||
{ | |||
$this->adminSettingBag = $this->loadService(AdminSettingBag::class); | |||
$this->producerRepository = $this->loadService(ProducerRepository::class); | |||
} | |||
public function sendEmailNewProducer(Producer $producer): void | |||
{ | |||
\Yii::$app->mailerService->sendAdmin( | |||
@@ -18,4 +29,16 @@ class ProducerManager extends AbstractService implements ManagerInterface | |||
] | |||
); | |||
} | |||
public function isProducerSignupOpen(): bool | |||
{ | |||
return $this->adminSettingBag->get('maximumNumberProducers') | |||
> $this->producerRepository->countCacheProducersActiveWithTurnover(); | |||
} | |||
public function getProducerSignupRemainingPlaces(): int | |||
{ | |||
return max($this->adminSettingBag->get('maximumNumberProducers') | |||
- $this->producerRepository->countCacheProducersActiveWithTurnover(), 0); | |||
} | |||
} |
@@ -161,16 +161,16 @@ class Product extends ActiveRecordCommon implements StatusInterface | |||
'saturday' => 'Samedi', | |||
'sunday' => 'Dimanche', | |||
'order' => 'Ordre', | |||
'quantity_max' => 'Quantité max par défaut', | |||
'quantity_max_monday' => 'Quantité max : lundi', | |||
'quantity_max_tuesday' => 'Quantité max : mardi', | |||
'quantity_max_wednesday' => 'Quantité max : mercredi', | |||
'quantity_max_thursday' => 'Quantité max : jeudi', | |||
'quantity_max_friday' => 'Quantité max : vendredi', | |||
'quantity_max_saturday' => 'Quantité max : samedi', | |||
'quantity_max_sunday' => 'Quantité max : dimanche', | |||
'quantity_max' => 'Par défaut', | |||
'quantity_max_monday' => 'Lundi', | |||
'quantity_max_tuesday' => 'Mardi', | |||
'quantity_max_wednesday' => 'Mercredi', | |||
'quantity_max_thursday' => 'Jeudi', | |||
'quantity_max_friday' => 'Vendredi', | |||
'quantity_max_saturday' => 'Samedi', | |||
'quantity_max_sunday' => 'Dimanche', | |||
'unavailable' => 'Épuisé', | |||
'apply_distributions' => 'Appliquer ces modifications dans les distributions futures', | |||
'apply_distributions' => 'Appliquer ces modifications dans les distributions à venir', | |||
'unit' => 'Unité', | |||
'step' => 'Pas', | |||
'id_tax_rate' => 'TVA', |
@@ -7,6 +7,7 @@ use common\helpers\Price; | |||
use common\logic\AbstractService; | |||
use common\logic\Config\Unit\Service\UnitDefinition; | |||
use common\logic\Config\Unit\Service\UnitSolver; | |||
use common\logic\Order\ProductOrder\Model\ProductOrder; | |||
use common\logic\PointSale\PointSale\Model\PointSale; | |||
use common\logic\PointSale\PointSale\Service\PointSaleSolver; | |||
use common\logic\Product\Product\Model\Product; | |||
@@ -98,6 +99,30 @@ class ProductSolver extends AbstractService implements SolverInterface | |||
return $product->price; | |||
} | |||
public function getPriceUnitReference(Product $product): ?float | |||
{ | |||
$productPrice = $product->price; | |||
if($product->unit == 'piece') { | |||
if($product->weight) { | |||
$price = (1000 * $productPrice) / $product->weight; | |||
} | |||
else { | |||
return null; | |||
} | |||
} | |||
else { | |||
$price = $product->price; | |||
} | |||
return $price; | |||
} | |||
public function getPriceUnitReferenceWithTax(Product $product) | |||
{ | |||
$taxRateValue = $product->taxRate ? $product->taxRate->value : 0; | |||
return Price::getPriceWithTax($this->getPriceUnitReference($product), $taxRateValue); | |||
} | |||
/** | |||
* Retourne le prix du produit avec taxe | |||
*/ |
@@ -5,6 +5,9 @@ namespace common\logic\Setting\SettingDetails\Admin; | |||
use common\logic\Setting\SettingDefinition; | |||
use common\logic\Setting\SettingDetails\Admin\General\AdministratorEmailAdminSetting; | |||
use common\logic\Setting\SettingDetails\Admin\General\AdministratorPhoneNumberAdminSetting; | |||
use common\logic\Setting\SettingDetails\Admin\General\ForumFlarumUrlAdminSetting; | |||
use common\logic\Setting\SettingDetails\Admin\General\MaximumNumberProducersAdminSetting; | |||
use common\logic\Setting\SettingDetails\Admin\General\SupportDeveloperOnlineAdminSetting; | |||
class AdminSettingDefinition extends SettingDefinition | |||
{ | |||
@@ -16,8 +19,11 @@ class AdminSettingDefinition extends SettingDefinition | |||
return [ | |||
self::SECTION_GENERAL => [ | |||
self::SUBSECTION_GENERAL => [ | |||
new AdministratorEmailAdminSetting, | |||
new AdministratorPhoneNumberAdminSetting, | |||
new SupportDeveloperOnlineAdminSetting(), | |||
new AdministratorEmailAdminSetting(), | |||
new AdministratorPhoneNumberAdminSetting(), | |||
new MaximumNumberProducersAdminSetting(), | |||
new ForumFlarumUrlAdminSetting(), | |||
] | |||
], | |||
]; |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace common\logic\Setting\SettingDetails\Admin\General; | |||
use common\logic\Setting\SettingDetails\AbstractSettingDetail; | |||
class ForumFlarumUrlAdminSetting extends AbstractSettingDetail | |||
{ | |||
public function __construct() | |||
{ | |||
$this | |||
->setName('forumFlarumUrl') | |||
->setLabel("Url du forum Flarum") | |||
->setTypeString() | |||
->setFormTypeInput(); | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace common\logic\Setting\SettingDetails\Admin\General; | |||
use common\logic\Setting\SettingDetails\AbstractSettingDetail; | |||
class MaximumNumberProducersAdminSetting extends AbstractSettingDetail | |||
{ | |||
public function __construct() | |||
{ | |||
$this | |||
->setName('maximumNumberProducers') | |||
->setLabel("Nombre maximum de producteurs") | |||
->setTypeInteger() | |||
->setFormTypeInput(); | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace common\logic\Setting\SettingDetails\Admin\General; | |||
use common\logic\Setting\SettingDetails\AbstractSettingDetail; | |||
class SupportDeveloperOnlineAdminSetting extends AbstractSettingDetail | |||
{ | |||
public function __construct() | |||
{ | |||
$this | |||
->setName('supportDeveloperOnline') | |||
->setLabel("Support : développeur disponible") | |||
->setTypeBoolean() | |||
->setFormTypeToggle(); | |||
} | |||
} |
@@ -61,22 +61,6 @@ class UserSolver extends AbstractService implements SolverInterface | |||
return $user->type == User::TYPE_GUEST; | |||
} | |||
public function getUsernameFromArray(array $modelArray, $withType = false): string | |||
{ | |||
$username = ''; | |||
if (isset($modelArray['name_legal_person']) && strlen($modelArray['name_legal_person'])) { | |||
$username = $modelArray['name_legal_person']; | |||
} else { | |||
$username = $modelArray['lastname'] . ' ' . $modelArray['name']; | |||
} | |||
if ($withType && $modelArray['type'] == User::TYPE_LEGAL_PERSON) { | |||
$username = $username . ' (personne morale)'; | |||
} | |||
return $username; | |||
} | |||
public function getContactSummaryFromArrayAsHtml(array $user): string | |||
{ | |||
$html = ''; | |||
@@ -107,7 +91,26 @@ class UserSolver extends AbstractService implements SolverInterface | |||
$username = $user->lastname . ' ' . $user->name; | |||
} | |||
if ($withType) { | |||
if ($withType && $this->isTypeLegalPerson($user)) { | |||
$username = $username . ' (personne morale)'; | |||
} | |||
return $username; | |||
} | |||
public function getUsernameFromArray(array $modelArray, $withType = false): string | |||
{ | |||
$username = 'Nom indéfini'; | |||
if ($modelArray['type'] == User::TYPE_LEGAL_PERSON | |||
&& isset($modelArray['name_legal_person']) | |||
&& strlen($modelArray['name_legal_person'])) { | |||
$username = $modelArray['name_legal_person']; | |||
} elseif((isset($modelArray['lastname']) && $modelArray['lastname']) | |||
|| (isset($modelArray['name']) && $modelArray['name'])) { | |||
$username = $modelArray['lastname'] . ' ' . $modelArray['name']; | |||
} | |||
if ($withType && $modelArray['type'] == User::TYPE_LEGAL_PERSON) { | |||
$username = $username . ' (personne morale)'; | |||
} | |||
@@ -14,7 +14,7 @@ version( | |||
[ | |||
"[Administration] Utilisateur : correctif affichage nom personne légale", | |||
"[Administration] Distributions > Synchronisation Tiller : activation uniquement le jour des distribution", | |||
"[Administration] Export commandes PDF : correctif problème caractère "<" dans le nom des produits", | |||
"[Administration] Export commandes PDF : correctif problème caractère \"<\" dans le nom des produits", | |||
] | |||
], | |||
[ |
@@ -0,0 +1,25 @@ | |||
<?php | |||
require_once dirname(__FILE__).'/_macros.php'; | |||
version( | |||
'15/01/2024', | |||
[ | |||
[ | |||
"[Administration] Export commandes PDF : cellule du montant en gris quand la commande est payée", | |||
"[Administration] Distribution > Création commande : ajout lien pour créer un utilisateur", | |||
"[Boutique] Commander : affichage du prix au kg pour les produits vendus à la pièce" | |||
], | |||
[ | |||
] | |||
], | |||
[ | |||
[ | |||
], | |||
[ | |||
] | |||
], | |||
$userCurrent | |||
); | |||
?> |
@@ -0,0 +1,29 @@ | |||
<?php | |||
require_once dirname(__FILE__).'/_macros.php'; | |||
version( | |||
'29/01/2024', | |||
[ | |||
[ | |||
"[Boutique] Accueil > texte de présentation : édition texte avancée (Paramètres > Description)", | |||
"[Boutique] Commande : message d'alerte si modification de commande", | |||
"[Administration] Ergonomie formulaires produit, point de vente, abonnement et utilisateur", | |||
"[Administration] Support : icône et message indiquant que le développeur est actuellement disponible" | |||
], | |||
[ | |||
"[Administration] Commande > édition commande : correctif point de vente par défaut", | |||
"[Administration] Utilisateurs : correctif nom d'utilisateur particuliers avec libellé personnes morales défini" | |||
] | |||
], | |||
[ | |||
[ | |||
"[Administration & site] Nombre maximum de producteurs" | |||
], | |||
[ | |||
] | |||
], | |||
$userCurrent | |||
); | |||
?> |
@@ -0,0 +1,22 @@ | |||
<?php | |||
namespace console\commands; | |||
use common\logic\Producer\Producer\Module\ProducerModule; | |||
use yii\console\Controller; | |||
class ProducerDescriptionNl2brController extends Controller | |||
{ | |||
// ./yii producer-description-nl2br/apply | |||
public function actionApply() | |||
{ | |||
$producerModule = ProducerModule::getInstance(); | |||
foreach($producerModule->getRepository()->findProducers() as $producer) { | |||
$producer->description = nl2br($producer->description); | |||
$producer->save(); | |||
} | |||
} | |||
} | |||
?> |
@@ -133,7 +133,10 @@ class SiteController extends FrontendController | |||
*/ | |||
public function actionIndex() | |||
{ | |||
return $this->render('index'); | |||
return $this->render('index', [ | |||
'maximumNumberProducers' => $this->getSettingModule()->getAdminSettingBag()->get('maximumNumberProducers'), | |||
'countProducersActive' => $this->getProducerModule()->getRepository()->countCacheProducersActiveWithTurnover() | |||
]); | |||
} | |||
public function actionService() | |||
@@ -183,7 +186,7 @@ class SiteController extends FrontendController | |||
$userModule = $this->getUserModule(); | |||
$orderModule = $this->getOrderModule(); | |||
$countProducersActive = $producerModule->countProducersActiveWithTurnover(); | |||
$countProducersActive = $producerModule->getRepository()->countProducersActiveWithTurnover(); | |||
$timeSavedByProducersAverage = $producerModule->getTimeSavedByProducersAverage(); | |||
$countProducersWithOptionTimeSaved = $producerModule->countProducersWithTimeSaved(); | |||
$countPointSalesActive = $pointSaleModule->countPointSalesActiveLastThreeMonths(); |
@@ -37,6 +37,7 @@ | |||
*/ | |||
use common\helpers\GlobalParam; | |||
use common\logic\Setting\SettingModule; | |||
use common\logic\User\User\Module\UserModule; | |||
use yii\helpers\Html; | |||
use yii\bootstrap\Nav; | |||
@@ -53,6 +54,8 @@ $producer = null; | |||
if ($isUserCurrentGrantedAsProducer) { | |||
$producer = Producer::searchOne(['id' => \Yii::$app->user->identity->id_producer]); | |||
} | |||
$settingModule = SettingModule::getInstance(); | |||
$adminSettingBag = $settingModule->getAdminSettingBag(); | |||
?> | |||
<?php $this->beginPage() ?> | |||
@@ -173,6 +176,9 @@ if ($isUserCurrentGrantedAsProducer) { | |||
<div class="container"> | |||
<a href="<?php echo $this->getUrlManager()->createUrl('site/service'); ?>">Fonctionnalités, services & tarifs</a> <span class="bull">•</span> | |||
<a href="<?php echo $this->getUrlManager()->createUrl('site/opinion'); ?>">Avis & suggestions</a> <span class="bull">•</span> | |||
<?php if($adminSettingBag->get('forumFlarumUrl')): ?> | |||
<!--<a href="<?php echo $adminSettingBag->get('forumFlarumUrl'); ?>">Forum</a> <span class="bull">•</span>--> | |||
<?php endif; ?> | |||
<a href="<?php echo $this->getUrlManager()->createUrl('site/mentions'); ?>">Mentions légales</a> <span class="bull">•</span> | |||
<a href="<?php echo $this->getUrlManager()->createUrl('site/cgv'); ?>">Conditions générales de service</a> <span class="bull">•</span> | |||
<a href="<?php echo $this->getUrlManager()->createUrl('site/source-code'); ?>">Code source</a> |
@@ -0,0 +1,20 @@ | |||
<?php | |||
$producerModule = $this->getProducerModule(); | |||
$producerSignupRemainingPlaces = $producerModule->getManager()->getProducerSignupRemainingPlaces(); | |||
if (Yii::$app->user->isGuest): ?> | |||
<?php if($producerModule->getManager()->isProducerSignupOpen()): ?> | |||
<a class="btn btn-primary" | |||
href="<?= \Yii::$app->urlManagerFrontend->createUrl(['site/signup']); ?>"> | |||
<span class="glyphicon glyphicon-user"></span> Je crée mon espace producteur | |||
</a><br /> | |||
<strong><?= ($producerSignupRemainingPlaces); ?></strong> | |||
place<?php if($producerSignupRemainingPlaces > 1): ?>s<?php endif; ?> restante<?php if($producerSignupRemainingPlaces > 1): ?>s<?php endif; ?> | |||
<?php else: ?> | |||
<div class="label label-warning label-producer-signup-closed"> | |||
La plateforme n'accueille pas de nouveaux producteurs pour le moment | |||
</div> | |||
<?php endif; ?> | |||
<br /> | |||
<br /> | |||
<?php endif; ?> |
@@ -41,6 +41,8 @@ use common\helpers\Url; | |||
$this->setTitle('Un outil pour organiser des ventes en circuit court'); | |||
$this->setMeta('description', 'Simplifiez la distribution de vos produits en circuit court grâce à des outils web adaptés.'); | |||
$producerModule = $this->getProducerModule(); | |||
?> | |||
<div class="row" id="row-users-producers"> | |||
@@ -58,25 +60,19 @@ $this->setMeta('description', 'Simplifiez la distribution de vos produits en cir | |||
<div class="word-animate"><span class="functionality"></span></div> | |||
</div> | |||
<div class="links"> | |||
<?php if (Yii::$app->user->isGuest): ?> | |||
<a class="btn btn-primary" | |||
href="<?= \Yii::$app->urlManagerFrontend->createUrl(['site/signup']); ?>"> | |||
<span class="glyphicon glyphicon-user"></span> Je crée mon espace | |||
</a> | |||
<?php endif; ?> | |||
<?= $this->render('_button_producer_signup'); ?> | |||
<a class="btn btn-default" | |||
href="<?= \Yii::$app->urlManagerFrontend->createUrl(['site/service']); ?>"> | |||
<span class="glyphicon glyphicon-plus-sign"></span> En savoir plus | |||
</a> | |||
<?php if (Yii::$app->user->isGuest): ?><br /><?php endif; ?> | |||
<a class="btn btn-default" href="<?= \Yii::$app->parameterBag->get('appointmentUrl'); ?>" target="_blank"> | |||
<span class="glyphicon glyphicon-education"></span> Je demande une démo | |||
</a> | |||
<?php if (Yii::$app->user->isGuest): ?> | |||
<a class="btn btn-default" | |||
href="<?= \Yii::$app->urlManagerFrontend->createUrl(['site/producer', 'id' => 32]); ?>"> | |||
<span class="glyphicon glyphicon-check"></span> Je teste le logiciel | |||
</a> | |||
<a class="btn btn-default" | |||
href="<?= \Yii::$app->urlManagerFrontend->createUrl(['site/producer', 'id' => 32]); ?>"> | |||
<span class="glyphicon glyphicon-check"></span> Je teste le logiciel | |||
</a> | |||
<?php endif; ?> | |||
</div> | |||
</div> |
@@ -37,6 +37,8 @@ | |||
use yii\helpers\Html; | |||
$producerModule = $this->getProducerModule(); | |||
$this->setTitle('Fonctionnalités, services & tarifs'); | |||
$this->setIcon('console'); | |||
//$this->setMeta('description', ''); | |||
@@ -156,21 +158,17 @@ $this->setIcon('console'); | |||
</div> | |||
<div class="panel-body"> | |||
<p class="text-center"> | |||
<?= $this->render('_button_producer_signup'); ?> | |||
<?php if (Yii::$app->user->isGuest): ?> | |||
<a class="btn btn-default" | |||
href="<?= $this->getUrlManagerFrontend()->createUrl(['site/signup']); ?>"> | |||
<span class="glyphicon glyphicon-user"></span> Je crée un espace producteur | |||
</a> | |||
<?php endif; ?> | |||
<a class="btn btn-default" | |||
href="<?= $this->getUrlManagerFrontend()->createUrl(['site/producer', 'id' => 32]); ?>"> | |||
<span class="glyphicon glyphicon-check"></span> Je teste le logiciel | |||
</a> | |||
<?php endif; ?> | |||
<a class="btn btn-default" href="<?= \Yii::$app->parameterBag->get('appointmentUrl'); ?>" | |||
target="_blank"> | |||
<span class="glyphicon glyphicon-education"></span> Je demande une démo | |||
</a> | |||
<br><br> | |||
<a class="btn btn-default" | |||
href="<?= $this->getUrlManagerFrontend()->createUrl(['site/about']); ?>"> | |||
<span class="glyphicon glyphicon-info-sign"></span> À propos |
@@ -69,9 +69,11 @@ $this->params['breadcrumbs'][] = $this->title; | |||
<label class="btn btn-default <?php if($model->option_user_producer == 'user' || !$model->option_user_producer): ?>active<?php endif; ?>"> | |||
<input type="radio" name="SignupForm[option_user_producer]" value="user" id="option-user" autocomplete="off" <?php if($model->option_user_producer == 'user' || !$model->option_user_producer): ?>checked<?php endif; ?>> Je suis client | |||
</label> | |||
<label class="btn btn-default <?php if($model->option_user_producer == 'producer'): ?>active<?php endif; ?>"> | |||
<input type="radio" name="SignupForm[option_user_producer]" value="producer" id="option-producer" autocomplete="off" <?php if($model->option_user_producer == 'producer'): ?>checked<?php endif; ?>> Je suis producteur | |||
</label> | |||
<?php if($this->getProducerModule()->getManager()->isProducerSignupOpen()): ?> | |||
<label class="btn btn-default <?php if($model->option_user_producer == 'producer'): ?>active<?php endif; ?>"> | |||
<input type="radio" name="SignupForm[option_user_producer]" value="producer" id="option-producer" autocomplete="off" <?php if($model->option_user_producer == 'producer'): ?>checked<?php endif; ?>> Je suis producteur | |||
</label> | |||
<?php endif; ?> | |||
</div> | |||
<div id="fields-producer"> |
@@ -35,13 +35,12 @@ termes. | |||
*/ | |||
@media screen and (min-width: 768px) { | |||
.equal, .equal > div[class*='col-'] { | |||
display: -webkit-box; | |||
display: -moz-box; | |||
display: -ms-flexbox; | |||
display: -webkit-flex; | |||
display: flex; | |||
flex: 1 1 auto; | |||
.home #row-users-producers { | |||
.producer, .users { | |||
.panel-body { | |||
height: 260px; | |||
} | |||
} | |||
} | |||
} | |||
@@ -150,6 +149,7 @@ termes. | |||
} | |||
.home { | |||
#content #presentation-distrib h3 { | |||
color: $courant; | |||
} |
@@ -572,6 +572,10 @@ section#header-title { | |||
} | |||
} | |||
.label-producer-signup-closed { | |||
font-size: 14px; | |||
} | |||
#row-users-producers { | |||
width: 100%; | |||
text-align: center; | |||
@@ -606,7 +610,6 @@ section#header-title { | |||
right: 6px; | |||
} | |||
} | |||
} | |||
} | |||
@@ -1034,6 +1037,12 @@ section#header-title { | |||
} | |||
} | |||
#content .site-service { | |||
#panel-go-further { | |||
text-align: center; | |||
} | |||
} | |||
#content #mentions { | |||
padding-top: 20px; | |||
@@ -158,6 +158,7 @@ class OrderController extends ProducerBaseController | |||
$orderModule = $this->getOrderModule(); | |||
$producerModule = $this->getProducerModule(); | |||
$userModule = $this->getUserModule(); | |||
$productOrderModule = $this->getProductOrderModule(); | |||
$producer = $this->getProducerCurrent(); | |||
$redirect = null; | |||
@@ -259,7 +260,7 @@ class OrderController extends ProducerBaseController | |||
true | |||
) . ')', | |||
], | |||
'unit_amount' => $productOrder->price * 100 * $productOrder->quantity, | |||
'unit_amount' => intval($productOrderModule->getSolver()->getPriceWithTax($productOrder) * 100 * $productOrder->quantity), | |||
], | |||
'quantity' => 1, | |||
]; | |||
@@ -921,6 +922,7 @@ class OrderController extends ProducerBaseController | |||
[ | |||
'unit_coefficient' => Product::$unitsArray[$product->unit]['coefficient'], | |||
'prices' => $productModule->getPriceArray($product, $user, $pointSale), | |||
'price_unit_ref' => $productModule->getSolver()->getPriceUnitReferenceWithTax($product), | |||
'productDistribution' => $product['productDistribution'], | |||
'productPointSale' => $product['productPointSale'], | |||
] |
@@ -135,6 +135,10 @@ $this->setTitle('Commander'); | |||
<div class="clr"></div> | |||
</div> | |||
<div class="content"> | |||
<div v-if="order" class="alert alert-warning alert-edit-order"> | |||
<div class="glyphicon glyphicon-pencil"></div> | |||
Attention, vous êtes en train de modifier votre commande du <strong>{{ dateFormat }}</strong>. | |||
</div> | |||
<div v-if="errors && errors.length" class="alert alert-danger"> | |||
<ul> | |||
<li v-for="error in errors"> | |||
@@ -356,7 +360,13 @@ $this->setTitle('Commander'); | |||
<div> | |||
{{ formatPrice(getBestProductPrice(product.id, | |||
product.quantity_form)) }}<br/> | |||
<span class="unit">{{ product.wording_unit }}</span> | |||
<span class="price-infos">{{ product.wording_unit }}</span> | |||
<template v-if="product.unit == 'piece' && product.weight"> | |||
<br /> | |||
<span class="price-infos"> | |||
{{ formatPrice(product.price_unit_ref) }} / kg | |||
</span> | |||
</template> | |||
</div> | |||
<div v-if="productHasPriceWithFromQuantity(product)" | |||
class="alert alert-info decreasing-prices"> |
@@ -61,7 +61,7 @@ $this->setPageTitle(Html::encode($producer->type . ' à ' . $producer->city)); | |||
<section id="presentation"> | |||
<?php if (strlen($producer->description)): ?> | |||
<div class="description"> | |||
<?= nl2br(Html::encode($producer->description)); ?> | |||
<?= $producer->description; ?> | |||
</div> | |||
<?php endif; ?> | |||
<div class="clr"></div> |
@@ -600,21 +600,34 @@ termes. | |||
width: 100%; | |||
max-width: 500px; | |||
} | |||
/* line 55, ../sass/site/_index.scss */ | |||
/* line 54, ../sass/site/_index.scss */ | |||
.site-index #presentation .description strong { | |||
font-weight: bold; | |||
} | |||
/* line 58, ../sass/site/_index.scss */ | |||
.site-index #presentation .description em { | |||
font-style: italic; | |||
} | |||
/* line 62, ../sass/site/_index.scss */ | |||
.site-index #presentation .description a { | |||
color: black; | |||
text-decoration: underline; | |||
} | |||
/* line 70, ../sass/site/_index.scss */ | |||
.site-index #points-sale .name { | |||
color: #333; | |||
} | |||
/* line 57, ../sass/site/_index.scss */ | |||
/* line 72, ../sass/site/_index.scss */ | |||
.site-index #points-sale .name .the-name { | |||
font-family: "capsuularegular"; | |||
font-size: 20px; | |||
color: black; | |||
} | |||
/* line 67, ../sass/site/_index.scss */ | |||
/* line 82, ../sass/site/_index.scss */ | |||
.site-index #points-sale .days small { | |||
color: gray; | |||
} | |||
/* line 76, ../sass/site/_index.scss */ | |||
/* line 91, ../sass/site/_index.scss */ | |||
.site-index #products h4 { | |||
font-family: "highvoltageregular"; | |||
font-size: 22px; | |||
@@ -622,20 +635,20 @@ termes. | |||
padding-top: 13px; | |||
text-transform: uppercase !important; | |||
} | |||
/* line 84, ../sass/site/_index.scss */ | |||
/* line 99, ../sass/site/_index.scss */ | |||
.site-index #products td.photo { | |||
width: 100px; | |||
} | |||
/* line 86, ../sass/site/_index.scss */ | |||
/* line 101, ../sass/site/_index.scss */ | |||
.site-index #products td.photo img.photo-product { | |||
width: 120px; | |||
height: auto; | |||
} | |||
/* line 92, ../sass/site/_index.scss */ | |||
/* line 107, ../sass/site/_index.scss */ | |||
.site-index #products .name { | |||
color: #333; | |||
} | |||
/* line 94, ../sass/site/_index.scss */ | |||
/* line 109, ../sass/site/_index.scss */ | |||
.site-index #products .name .the-name { | |||
font-family: "capsuularegular"; | |||
font-size: 20px; | |||
@@ -1291,35 +1304,35 @@ termes. | |||
.order-order #main #app-order-order #distribution-date, .order-order #main #app-order-order #order-distribution-date { | |||
display: none; | |||
} | |||
/* line 21, ../sass/order/_order.scss */ | |||
/* line 27, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order .slide-enter-active { | |||
transition: all .2s ease; | |||
} | |||
/* line 25, ../sass/order/_order.scss */ | |||
/* line 31, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order .slide-leave-active { | |||
transition: all 0s ease; | |||
} | |||
/* line 28, ../sass/order/_order.scss */ | |||
/* line 34, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order .slide-enter, .order-order #main #app-order-order .slide-leave-to { | |||
transform: translateX(10px); | |||
opacity: 0; | |||
} | |||
/* line 33, ../sass/order/_order.scss */ | |||
/* line 39, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps { | |||
margin-bottom: 20px; | |||
} | |||
/* line 35, ../sass/order/_order.scss */ | |||
/* line 41, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul { | |||
height: 70px; | |||
} | |||
/* line 38, ../sass/order/_order.scss */ | |||
/* line 44, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li { | |||
text-align: center; | |||
padding-right: 8px; | |||
padding-left: 8px; | |||
position: relative; | |||
} | |||
/* line 44, ../sass/order/_order.scss */ | |||
/* line 50, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .info-step { | |||
position: absolute; | |||
top: 45px; | |||
@@ -1331,26 +1344,26 @@ termes. | |||
font-size: 17px; | |||
font-weight: bold; | |||
} | |||
/* line 56, ../sass/order/_order.scss */ | |||
/* line 62, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .glyphicon-chevron-right, .order-order #main #app-order-order #steps ul li.active .glyphicon-chevron-right { | |||
float: right; | |||
color: gray; | |||
position: relative; | |||
top: 10px; | |||
} | |||
/* line 64, ../sass/order/_order.scss */ | |||
/* line 70, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li.first { | |||
padding-left: 0px; | |||
} | |||
/* line 68, ../sass/order/_order.scss */ | |||
/* line 74, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li#step-payment { | |||
padding-right: 0px; | |||
} | |||
/* line 72, ../sass/order/_order.scss */ | |||
/* line 78, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li#step-products .btn::after, .order-order #main #app-order-order #steps ul li.first .btn::before { | |||
display: none; | |||
} | |||
/* line 77, ../sass/order/_order.scss */ | |||
/* line 83, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .btn { | |||
color: #333; | |||
text-transform: uppercase; | |||
@@ -1364,105 +1377,105 @@ termes. | |||
border: 0px none; | |||
text-transform: uppercase; | |||
} | |||
/* line 88, ../sass/order/_order.scss */ | |||
/* line 94, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .btn .button-content { | |||
position: relative; | |||
left: 8px; | |||
} | |||
/* line 93, ../sass/order/_order.scss */ | |||
/* line 99, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .btn.btn-primary { | |||
background-color: #F39C12; | |||
} | |||
/* line 97, ../sass/order/_order.scss */ | |||
/* line 103, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .btn::after, .order-order #main #app-order-order #steps ul li .btn::before { | |||
content: ""; | |||
position: absolute; | |||
top: -1px; | |||
} | |||
/* line 103, ../sass/order/_order.scss */ | |||
/* line 109, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .btn::after { | |||
right: -34px; | |||
border: 17px solid transparent; | |||
border-left: 17px solid #e0e0e0; | |||
background-color: transparent; | |||
} | |||
/* line 110, ../sass/order/_order.scss */ | |||
/* line 116, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .btn::before { | |||
left: 0px; | |||
border: 17px solid transparent; | |||
border-left: 17px solid white; | |||
background-color: transparent; | |||
} | |||
/* line 117, ../sass/order/_order.scss */ | |||
/* line 123, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .btn.btn-primary::after { | |||
border-left: 17px solid #F39C12; | |||
} | |||
/* line 131, ../sass/order/_order.scss */ | |||
/* line 137, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #steps ul li .btn-primary { | |||
color: white; | |||
} | |||
/* line 139, ../sass/order/_order.scss */ | |||
/* line 145, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #legend #order-date-color, | |||
.order-order #main #app-order-order #legend #distribution-date-color { | |||
width: 13px; | |||
height: 13px; | |||
display: inline-block; | |||
} | |||
/* line 146, ../sass/order/_order.scss */ | |||
/* line 152, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #legend #order-date-color { | |||
background-color: #F39C12; | |||
} | |||
/* line 149, ../sass/order/_order.scss */ | |||
/* line 155, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #legend #distribution-date-color { | |||
background-color: #5cb85c; | |||
} | |||
/* line 154, ../sass/order/_order.scss */ | |||
/* line 160, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #calendar { | |||
margin-bottom: 15px; | |||
} | |||
/* line 156, ../sass/order/_order.scss */ | |||
/* line 162, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #calendar .c-header .c-title-layout .c-title-popover .c-title-anchor .c-title[data-v-2083cb72] { | |||
font-size: 2rem; | |||
} | |||
/* line 159, ../sass/order/_order.scss */ | |||
/* line 165, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #calendar .c-day-background { | |||
padding: 20px; | |||
} | |||
/* line 164, ../sass/order/_order.scss */ | |||
/* line 170, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #calendar .c-day:hover .c-day-background { | |||
background-color: #F39C12 !important; | |||
color: white !important; | |||
} | |||
/* line 170, ../sass/order/_order.scss */ | |||
/* line 176, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #calendar .c-day-popover-content { | |||
font-size: 1.3rem; | |||
} | |||
/* line 178, ../sass/order/_order.scss */ | |||
/* line 184, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #credit-online-payment .panel .panel-heading .btn-default { | |||
float: right; | |||
position: relative; | |||
top: -5px; | |||
} | |||
/* line 190, ../sass/order/_order.scss */ | |||
/* line 196, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #content-step-date #distributions-list .panel .btn-primary { | |||
float: right; | |||
} | |||
/* line 194, ../sass/order/_order.scss */ | |||
/* line 200, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #content-step-date #distributions-list .panel .date { | |||
font-size: 20px; | |||
} | |||
/* line 198, ../sass/order/_order.scss */ | |||
/* line 204, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #content-step-date #distributions-list .panel .point-sales { | |||
color: gray; | |||
font-size: 14px; | |||
margin-top: 8px; | |||
} | |||
/* line 207, ../sass/order/_order.scss */ | |||
/* line 213, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order .block-actions { | |||
text-align: right; | |||
margin-top: 20px; | |||
} | |||
/* line 214, ../sass/order/_order.scss */ | |||
/* line 220, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#points-sale td.name .the-name { | |||
font-family: "capsuularegular"; | |||
color: black; | |||
@@ -1470,29 +1483,29 @@ termes. | |||
line-height: 25px; | |||
font-weight: bold; | |||
} | |||
/* line 222, ../sass/order/_order.scss */ | |||
/* line 228, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#points-sale td.name .comment, | |||
.order-order #main #app-order-order table#points-sale td.name .minimum-order-amount { | |||
color: gray; | |||
} | |||
/* line 226, ../sass/order/_order.scss */ | |||
/* line 232, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#points-sale td.name .comment a, | |||
.order-order #main #app-order-order table#points-sale td.name .minimum-order-amount a { | |||
color: #F39C12; | |||
} | |||
/* line 232, ../sass/order/_order.scss */ | |||
/* line 238, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#points-sale td.actions { | |||
width: 150px; | |||
} | |||
/* line 234, ../sass/order/_order.scss */ | |||
/* line 240, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#points-sale td.actions button { | |||
width: 100%; | |||
} | |||
/* line 240, ../sass/order/_order.scss */ | |||
/* line 246, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#points-sale tr.selected td { | |||
background-color: white; | |||
} | |||
/* line 248, ../sass/order/_order.scss */ | |||
/* line 254, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products td.category-name { | |||
font-family: "highvoltageregular"; | |||
font-size: 22px; | |||
@@ -1500,12 +1513,12 @@ termes. | |||
text-transform: uppercase; | |||
padding-top: 13px; | |||
} | |||
/* line 255, ../sass/order/_order.scss */ | |||
/* line 261, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products td.category-name .glyphicon-triangle-bottom, | |||
.order-order #main #app-order-order table#products td.category-name .glyphicon-triangle-right { | |||
font-size: 15px; | |||
} | |||
/* line 260, ../sass/order/_order.scss */ | |||
/* line 266, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products td.category-name span.label { | |||
font-family: "Arial"; | |||
font-weight: normal; | |||
@@ -1513,17 +1526,17 @@ termes. | |||
text-transform: none; | |||
margin-left: 15px; | |||
} | |||
/* line 269, ../sass/order/_order.scss */ | |||
/* line 275, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products td.category-name:hover { | |||
cursor: pointer; | |||
background-color: #F39C12; | |||
color: white; | |||
} | |||
/* line 277, ../sass/order/_order.scss */ | |||
/* line 283, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products td.photo img { | |||
width: 100px; | |||
} | |||
/* line 287, ../sass/order/_order.scss */ | |||
/* line 293, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .price-unit .decreasing-prices { | |||
margin-top: 10px; | |||
font-size: 10px; | |||
@@ -1531,34 +1544,35 @@ termes. | |||
padding-bottom: 2px; | |||
margin-bottom: 0px; | |||
} | |||
/* line 295, ../sass/order/_order.scss */ | |||
/* line 301, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .price-unit .decreasing-prices ul li { | |||
margin-bottom: 5px; | |||
} | |||
/* line 297, ../sass/order/_order.scss */ | |||
/* line 303, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .price-unit .decreasing-prices ul li strong { | |||
font-weight: bold; | |||
} | |||
/* line 305, ../sass/order/_order.scss */ | |||
/* line 311, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .price-unit, .order-order #main #app-order-order table#products .price-total { | |||
width: 135px; | |||
text-align: center; | |||
} | |||
/* line 309, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .price-unit .unit, .order-order #main #app-order-order table#products .price-total .unit { | |||
/* line 315, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .price-unit .price-infos, .order-order #main #app-order-order table#products .price-total .price-infos { | |||
color: gray; | |||
font-size: 13px; | |||
line-height: 15px; | |||
} | |||
/* line 314, ../sass/order/_order.scss */ | |||
/* line 321, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .td-quantity { | |||
width: 175px; | |||
} | |||
/* line 316, ../sass/order/_order.scss */ | |||
/* line 323, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .td-quantity input.quantity { | |||
text-align: center; | |||
border-right: 0px none; | |||
} | |||
/* line 320, ../sass/order/_order.scss */ | |||
/* line 327, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products .td-quantity .input-group-addon { | |||
padding: 5px; | |||
padding-left: 0px; | |||
@@ -1566,69 +1580,69 @@ termes. | |||
border-left: 0px none; | |||
border-right: 0px none; | |||
} | |||
/* line 331, ../sass/order/_order.scss */ | |||
/* line 338, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products tr.total .summary h3 { | |||
margin-top: 0px; | |||
font-family: "capsuularegular"; | |||
text-transform: none; | |||
margin-bottom: 5px; | |||
} | |||
/* line 338, ../sass/order/_order.scss */ | |||
/* line 345, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products tr.total .summary ul { | |||
margin-bottom: 15px; | |||
padding-left: 20px; | |||
font-size: 23px; | |||
} | |||
/* line 345, ../sass/order/_order.scss */ | |||
/* line 352, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products tr.total .summary ul li .quantity { | |||
font-size: 18px; | |||
} | |||
/* line 349, ../sass/order/_order.scss */ | |||
/* line 356, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products tr.total .summary ul li .name { | |||
font-family: "capsuularegular"; | |||
font-size: 24px; | |||
} | |||
/* line 353, ../sass/order/_order.scss */ | |||
/* line 360, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products tr.total .summary ul li .other { | |||
font-family: "capsuularegular"; | |||
font-size: 18px; | |||
} | |||
/* line 361, ../sass/order/_order.scss */ | |||
/* line 368, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order table#products tr.total .price-total { | |||
font-size: 23px; | |||
} | |||
/* line 369, ../sass/order/_order.scss */ | |||
/* line 376, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #content-step-payment .delivery { | |||
margin-bottom: 20px; | |||
} | |||
/* line 372, ../sass/order/_order.scss */ | |||
/* line 379, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #content-step-payment .delivery .delivery-home { | |||
margin-bottom: 20px; | |||
} | |||
/* line 381, ../sass/order/_order.scss */ | |||
/* line 388, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #content-step-payment .comment { | |||
margin-bottom: 20px; | |||
} | |||
/* line 386, ../sass/order/_order.scss */ | |||
/* line 393, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #content-step-payment .credit .info { | |||
margin-left: 20px; | |||
color: gray; | |||
} | |||
/* line 393, ../sass/order/_order.scss */ | |||
/* line 400, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #specific-delays { | |||
margin-top: 15px; | |||
} | |||
/* line 401, ../sass/order/_order.scss */ | |||
/* line 408, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #infos { | |||
margin-top: 30px; | |||
} | |||
/* line 403, ../sass/order/_order.scss */ | |||
/* line 410, ../sass/order/_order.scss */ | |||
.order-order #main #app-order-order #infos .panel-body { | |||
padding-top: 0px; | |||
white-space: pre-line; | |||
} | |||
/* line 413, ../sass/order/_order.scss */ | |||
/* line 420, ../sass/order/_order.scss */ | |||
#main #content .panel h3 { | |||
font-family: "highvoltageregular"; | |||
margin: 0px; |
@@ -17,6 +17,12 @@ | |||
#distribution-date, #order-distribution-date { | |||
display: none ; | |||
} | |||
.alert-edit-order { | |||
strong { | |||
//font-weight: bold; | |||
} | |||
} | |||
.slide-enter-active { | |||
transition: all .2s ease; | |||
@@ -306,9 +312,10 @@ | |||
width: 135px ; | |||
text-align: center ; | |||
.unit { | |||
.price-infos { | |||
color: gray ; | |||
font-size: 13px ; | |||
line-height: 15px; | |||
} | |||
} | |||
.td-quantity { |
@@ -48,7 +48,22 @@ termes. | |||
width: 100% ; | |||
max-width: 500px ; | |||
} | |||
} | |||
} | |||
.description { | |||
strong { | |||
font-weight: bold; | |||
} | |||
em { | |||
font-style: italic; | |||
} | |||
a { | |||
color: black; | |||
text-decoration: underline; | |||
} | |||
} | |||
} | |||
#points-sale { |