@@ -85,7 +85,7 @@ class SharedPointSaleController extends BackendController | |||
{ | |||
$sharedPointSaleModule = $this->getSharedPointSaleModule(); | |||
$sharedPointSaleModel = $sharedPointSaleModule->getBuilder()->instanciateSharedPointSale(null, null, $this->getUserCurrent()); | |||
$sharedPointSaleModel->scenario = SharedPointSale::SCENARIO_CREATE; | |||
if($sharedPointSaleModel->load(\Yii::$app->request->post()) && $sharedPointSaleModel->validate()) { | |||
$sharedPointSaleModule->getManager()->createSharedPointSale( | |||
$sharedPointSaleModel->getPointSale(), | |||
@@ -105,6 +105,8 @@ class SharedPointSaleController extends BackendController | |||
{ | |||
$sharedPointSale = $this->findSharedPointSale($id); | |||
$sharedPointSale->scenario = SharedPointSale::SCENARIO_CONFIRM; | |||
$sharedPointSale->producerCurrent = $this->getProducerCurrent(); | |||
if($sharedPointSale->load(\Yii::$app->request->post()) && $sharedPointSale->validate()) { | |||
$pointSaleWithSharing = $sharedPointSale->getPointSaleWithSharing(); | |||
if($this->getSharedPointSaleModule()->getManager()->confirmSharedPointSale($sharedPointSale, $pointSaleWithSharing, $this->getUserCurrent())) { | |||
@@ -115,7 +117,11 @@ class SharedPointSaleController extends BackendController | |||
} | |||
} | |||
else { | |||
$this->addFlash('error', "Veuillez sélectionner un point de vente pour confirmer le partage"); | |||
foreach($sharedPointSale->getErrors() as $errorArray) { | |||
foreach($errorArray as $errorMessage) { | |||
$this->addFlash('error', $errorMessage); | |||
} | |||
} | |||
} | |||
return $this->redirect(['index']); | |||
@@ -124,11 +130,17 @@ class SharedPointSaleController extends BackendController | |||
public function actionDecline(int $id) | |||
{ | |||
$sharedPointSale = $this->findSharedPointSale($id); | |||
if($this->getSharedPointSaleModule()->getManager()->declineSharedPointSale($sharedPointSale, $this->getUserCurrent())) { | |||
$this->addFlash('success', "La demande de partage de point de vente a bien été annulée."); | |||
if(!in_array($this->getProducerCurrent()->id, [$sharedPointSale->getProducerWithSharing()->id, $sharedPointSale->getPointSale()->id_producer])) { | |||
$this->addFlash('error', "Vous ne pouvez pas refuser cette demande de partage."); | |||
} | |||
else { | |||
$this->addFlash('error', "Une erreur est survenue lors de l'annulation de la demande de partage."); | |||
if($this->getSharedPointSaleModule()->getManager()->declineSharedPointSale($sharedPointSale, $this->getUserCurrent())) { | |||
$this->addFlash('success', "La demande de partage de point de vente a bien été annulée."); | |||
} | |||
else { | |||
$this->addFlash('error', "Une erreur est survenue lors de l'annulation de la demande de partage."); | |||
} | |||
} | |||
return $this->redirect(['index']); |
@@ -36,6 +36,7 @@ | |||
* termes. | |||
*/ | |||
use common\helpers\GlobalParam; | |||
use domain\PointSale\UserPointSale\UserPointSale; | |||
use domain\Producer\Producer\Producer; | |||
use yii\grid\GridView; | |||
@@ -61,118 +62,150 @@ $this->addButton( | |||
<div class="shared-point-sale-index"> | |||
<div class="row"> | |||
<div class="col-md-8"> | |||
<?php if(count($sharedPointsSaleRequestOfMe)): ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Mes demandes de partages en attente | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<table class="table table-striped table-bordered"> | |||
<tbody> | |||
<?php foreach($sharedPointsSaleRequestOfMe as $sharedPointSale): ?> | |||
<tr> | |||
<td> | |||
Vous souhaitez partager votre point de vente <strong><?= Html::encode($sharedPointSale->getPointSale()->getName()); ?></strong> | |||
avec le producteur <strong><?= Html::encode($sharedPointSale->getProducerWithSharing()->getName()); ?></strong> | |||
</td> | |||
<td> | |||
<a href="<?= Yii::$app->urlManager->createUrl(['shared-point-sale/decline', 'id' => $sharedPointSale->getId()]) ?>" class="btn btn-default">Annuler</a> | |||
</td> | |||
</tr> | |||
<?php endforeach; ?> | |||
</tbody> | |||
</table> | |||
</div> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Mes demandes de partages en attente | |||
</h3> | |||
</div> | |||
<?php endif; ?> | |||
<div class="panel-body"> | |||
<?php if(count($sharedPointsSaleRequestOfMe)): ?> | |||
<table class="table table-striped table-bordered"> | |||
<tbody> | |||
<?php foreach($sharedPointsSaleRequestOfMe as $sharedPointSale): ?> | |||
<tr> | |||
<td> | |||
Vous souhaitez partager votre point de vente <strong><?= Html::encode($sharedPointSale->getPointSale()->getName()); ?></strong> | |||
avec le producteur <strong><?= Html::encode($sharedPointSale->getProducerWithSharing()->getName()); ?></strong>. | |||
<br /><small>Demande de partage effectuée le <?= $sharedPointSale->getCreatedAt()->format('d/m/Y à H:i') ?></small> | |||
</td> | |||
<td> | |||
<a href="<?= Yii::$app->urlManager->createUrl(['shared-point-sale/decline', 'id' => $sharedPointSale->getId()]) ?>" class="btn btn-default">Annuler</a> | |||
</td> | |||
</tr> | |||
<?php endforeach; ?> | |||
</tbody> | |||
</table> | |||
<?php else: ?> | |||
<p><em>Aucun résultat</em></p> | |||
<?php endif; ?> | |||
</div> | |||
</div> | |||
<?php if(count($sharedPointsSaleRequestOthers)): ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Demandes de partage des autres producteurs | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<table class="table table-striped table-bordered"> | |||
<tbody> | |||
<?php foreach($sharedPointsSaleRequestOthers as $sharedPointSale): ?> | |||
<tr> | |||
<td>Le producteur <strong><?= Html::encode($sharedPointSale->getPointSale()->getProducer()->getName()); ?></strong> | |||
souhaite partager son point de vente <strong><?= Html::encode($sharedPointSale->getPointSale()->getName()); ?></strong> | |||
avec vous. | |||
</td> | |||
<td> | |||
<?php $form = ActiveForm::begin([ | |||
'enableClientValidation' => false, | |||
'action' => Yii::$app->urlManager->createUrl(['shared-point-sale/confirm', 'id' => $sharedPointSale->getId()]) | |||
]); ?> | |||
<?= $form->field($sharedPointSale, 'id_point_sale_with_sharing') | |||
->dropDownList($pointSaleModule->getRepository()->populatePointSaleDropdownList()) | |||
->label('Votre point de vente correspondant') | |||
->hint('Absent de la liste ? <a href="'.Yii::$app->urlManager->createUrl(['point-sale/create']).'">Créer le point de vente</a>'); ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Demandes de partage des autres producteurs | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?php if(count($sharedPointsSaleRequestOthers)): ?> | |||
<table class="table table-striped table-bordered"> | |||
<tbody> | |||
<?php foreach($sharedPointsSaleRequestOthers as $sharedPointSale): ?> | |||
<tr> | |||
<td>Le producteur <strong><?= Html::encode($sharedPointSale->getPointSale()->getProducer()->getName()); ?></strong> | |||
souhaite partager son point de vente <strong><?= Html::encode($sharedPointSale->getPointSale()->getName()); ?></strong> | |||
avec vous. | |||
<br /><br /><small>Demande de partage effectuée le <?= $sharedPointSale->getCreatedAt()->format('d/m/Y à H:i') ?></small> | |||
</td> | |||
<td> | |||
<?php $form = ActiveForm::begin([ | |||
'enableClientValidation' => false, | |||
'action' => Yii::$app->urlManager->createUrl(['shared-point-sale/confirm', 'id' => $sharedPointSale->getId()]) | |||
]); ?> | |||
<?= $form->field($sharedPointSale, 'id_point_sale_with_sharing') | |||
->dropDownList($pointSaleModule->getRepository()->populatePointSaleDropdownList()) | |||
->label('Votre point de vente correspondant') | |||
->hint('Absent de la liste ? <a href="'.Yii::$app->urlManager->createUrl(['point-sale/create']).'">Créer le point de vente</a>'); ?> | |||
<?= Html::submitButton('Confirmer', ['class' => 'btn btn-success', 'name' => 'save']) ?> | |||
<?php ActiveForm::end(); ?> | |||
</td> | |||
<td> | |||
<br /> | |||
<a href="<?= Yii::$app->urlManager->createUrl(['shared-point-sale/decline', 'id' => $sharedPointSale->getId()]) ?>" class="btn btn-danger"> | |||
Refuser | |||
</a> | |||
</td> | |||
</tr> | |||
<?php endforeach; ?> | |||
</tbody> | |||
</table> | |||
</div> | |||
<?= Html::submitButton('Confirmer', ['class' => 'btn btn-success', 'name' => 'save']) ?> | |||
<?php ActiveForm::end(); ?> | |||
</td> | |||
<td> | |||
<br /> | |||
<a href="<?= Yii::$app->urlManager->createUrl(['shared-point-sale/decline', 'id' => $sharedPointSale->getId()]) ?>" class="btn btn-danger"> | |||
Refuser | |||
</a> | |||
</td> | |||
</tr> | |||
<?php endforeach; ?> | |||
</tbody> | |||
</table> | |||
<?php else: ?> | |||
<p><em>Aucun résultat</em></p> | |||
<?php endif; ?> | |||
</div> | |||
<?php endif; ?> | |||
</div> | |||
<?php if($sharedPointSaleModule->getResolver()->countPointsSaleShared()): ?> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Partages confirmés | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<table class="table table-striped table-bordered"> | |||
<div class="panel panel-default"> | |||
<div class="panel-heading"> | |||
<h3 class="panel-title"> | |||
Partages confirmés | |||
</h3> | |||
</div> | |||
<div class="panel-body"> | |||
<?php if($sharedPointSaleModule->getResolver()->countPointsSaleShared()): ?> | |||
<table id="table-shared-point-sale-confirmed" class="table table-striped table-bordered"> | |||
<thead> | |||
<tr> | |||
<td>Point de vente</td> | |||
<td>Partagé avec</td> | |||
<td></td> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<?php foreach($pointsSaleArray as $pointSale): ?> | |||
<?php | |||
$pointsSaleSharedWithPointSaleArray = $sharedPointSaleModule->getResolver()->getPointsSaleSharedWithPointSale($pointSale); | |||
if(count($pointsSaleSharedWithPointSaleArray)): | |||
?> | |||
<tr> | |||
<td><?= Html::encode($pointSale->getName()); ?></td> | |||
<td> | |||
<?php foreach($pointsSaleSharedWithPointSaleArray as $pointSaleSharedWithPointSale): ?> | |||
<div> | |||
$countPointsSaleSharedWithPointSale = count($pointsSaleSharedWithPointSaleArray); | |||
if($countPointsSaleSharedWithPointSale):?> | |||
<?php foreach($pointsSaleSharedWithPointSaleArray as $key => $pointSaleSharedWithPointSale): ?> | |||
<?php $sharedPointSale = $sharedPointSaleModule->getRepository()->findOneSharedPointsSaleConfirmed( | |||
$pointSaleSharedWithPointSale, | |||
GlobalParam::getCurrentProducer() | |||
); ?> | |||
<tr> | |||
<?php if($key === array_key_first($pointsSaleSharedWithPointSaleArray)): ?> | |||
<td rowspan="<?= $countPointsSaleSharedWithPointSale ?>"> | |||
<?= Html::encode($pointSale->getName()); ?><br /> | |||
<span class="badge"> | |||
<?= $countPointsSaleSharedWithPointSale ?> | |||
</span> | |||
</td> | |||
<?php endif; ?> | |||
<td> | |||
<div class="shared-point-sale-confirmed"> | |||
<?= Html::encode($pointSaleSharedWithPointSale->getProducer()->getName()); ?> | |||
- <?= Html::encode($pointSaleSharedWithPointSale->getName()); ?> | |||
<!--<a href="<?= Yii::$app->urlManager->createUrl(['shared-point-sale/decline']) ?>" class="btn btn-xs btn-default"> | |||
<span class="glyphicon glyphicon-remove"></span> | |||
</a>--> | |||
<br /><small> | |||
<?php if($sharedPointSale):?> | |||
Depuis le <?= $sharedPointSale->getConfirmedAt()->format('d/m/Y') ?> | |||
<?php else: ?> | |||
Partage hérité | |||
<?php endif; ?> | |||
</small> | |||
</div> | |||
<?php endforeach; ?> | |||
</td> | |||
</tr> | |||
</td> | |||
<td> | |||
<?php if($sharedPointSale):?> | |||
<a href="<?= Yii::$app->urlManager->createUrl(['shared-point-sale/decline', 'id' => $sharedPointSale->id]) ?>" class="btn btn-xs btn-default" title="Annuler"> | |||
<span class="glyphicon glyphicon-remove"></span> | |||
</a> | |||
<?php endif; ?> | |||
</td> | |||
</tr> | |||
<?php endforeach; ?> | |||
<?php endif; ?> | |||
<?php endforeach; ?> | |||
</tbody> | |||
</table> | |||
</div> | |||
<?php else: ?> | |||
<p><em>Aucun résultat</em></p> | |||
<?php endif; ?> | |||
</div> | |||
<?php endif; ?> | |||
</div> | |||
</div> | |||
<div class="col-md-4"> | |||
<div class="callout callout-info"> | |||
@@ -180,7 +213,7 @@ $this->addButton( | |||
Cette fonctionnalité vous permet de partager des points de vente avec d'autres producteurs inscrits sur Souke | |||
et avec qui vous avez des distributions en commun.<br /> | |||
Quand vous partagez un point de vente avec un autre producteur, un lien vers votre boutique est | |||
proposé aux clients de ce producteur quand ils passent commande sur le point de vente en partage. | |||
proposé aux clients de ce producteur quand ils passent commande sur le point de vente partagé. | |||
</div> | |||
</div> | |||
</div> |
@@ -1580,41 +1580,45 @@ body.skin-black .user-without-account { | |||
color: gray; | |||
font-style: italic; | |||
} | |||
/* line 49, ../sass/_adminlte.scss */ | |||
/* line 50, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .dropdown-toggle::after { | |||
display: none; | |||
} | |||
/* line 54, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .logo { | |||
background-color: white; | |||
font-family: 'highvoltageregular'; | |||
font-size: 23px; | |||
position: relative; | |||
} | |||
/* line 55, ../sass/_adminlte.scss */ | |||
/* line 60, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .logo:hover, body.skin-black .main-header .logo:focus { | |||
background-color: white; | |||
text-decoration: none; | |||
} | |||
/* line 60, ../sass/_adminlte.scss */ | |||
/* line 65, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .logo img { | |||
position: relative; | |||
max-width: 300px; | |||
max-height: 300px; | |||
height: auto; | |||
} | |||
/* line 68, ../sass/_adminlte.scss */ | |||
/* line 73, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .logo .logo-lg img { | |||
width: 90px; | |||
top: -2px; | |||
} | |||
/* line 74, ../sass/_adminlte.scss */ | |||
/* line 79, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .logo .logo-mini img { | |||
width: 50px; | |||
} | |||
/* line 79, ../sass/_adminlte.scss */ | |||
/* line 84, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar { | |||
display: block; | |||
background-color: white; | |||
padding: 0px; | |||
} | |||
/* line 84, ../sass/_adminlte.scss */ | |||
/* line 89, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .producer-panel { | |||
position: relative; | |||
float: left; | |||
@@ -1622,11 +1626,11 @@ body.skin-black .main-header .navbar .producer-panel { | |||
padding-left: 50px; | |||
margin-left: 7px; | |||
} | |||
/* line 91, ../sass/_adminlte.scss */ | |||
/* line 96, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .producer-panel.without-logo { | |||
padding-left: 10px; | |||
} | |||
/* line 95, ../sass/_adminlte.scss */ | |||
/* line 100, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .producer-panel .logo { | |||
position: absolute; | |||
top: 5px; | |||
@@ -1641,7 +1645,7 @@ body.skin-black .main-header .navbar .producer-panel .logo { | |||
text-align: center; | |||
overflow: hidden; | |||
} | |||
/* line 107, ../sass/_adminlte.scss */ | |||
/* line 112, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .producer-panel .logo .img-logo { | |||
position: absolute; | |||
top: 50%; | |||
@@ -1650,131 +1654,131 @@ body.skin-black .main-header .navbar .producer-panel .logo .img-logo { | |||
max-width: 35px; | |||
max-height: 35px; | |||
} | |||
/* line 117, ../sass/_adminlte.scss */ | |||
/* line 122, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .producer-panel .title { | |||
position: relative; | |||
top: 2px; | |||
text-transform: uppercase; | |||
} | |||
/* line 122, ../sass/_adminlte.scss */ | |||
/* line 127, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .producer-panel .title a { | |||
color: #333; | |||
} | |||
/* line 125, ../sass/_adminlte.scss */ | |||
/* line 130, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .producer-panel .title a:hover { | |||
text-decoration: underline; | |||
} | |||
/* line 130, ../sass/_adminlte.scss */ | |||
/* line 135, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .producer-panel .title .producer-id { | |||
color: gray; | |||
font-size: 13px; | |||
} | |||
/* line 137, ../sass/_adminlte.scss */ | |||
/* line 142, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .sidebar-toggle { | |||
color: #333; | |||
} | |||
/* line 141, ../sass/_adminlte.scss */ | |||
/* line 146, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .link-support { | |||
float: left; | |||
padding: 15px 15px; | |||
border-right: solid 1px #e0e0e0; | |||
color: #333; | |||
} | |||
/* line 147, ../sass/_adminlte.scss */ | |||
/* line 152, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .link-support:hover { | |||
text-decoration: none; | |||
color: #F39C12; | |||
} | |||
/* line 153, ../sass/_adminlte.scss */ | |||
/* line 158, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .navbar-custom-menu .nav { | |||
display: block; | |||
} | |||
/* line 157, ../sass/_adminlte.scss */ | |||
/* line 162, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a, | |||
body.skin-black .main-header .navbar .navbar-right > li > a { | |||
border-left: solid 1px #e0e0e0; | |||
color: #333; | |||
} | |||
/* line 163, ../sass/_adminlte.scss */ | |||
/* line 168, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav > li > a:hover, body.skin-black .main-header .navbar .nav > li > a:active, body.skin-black .main-header .navbar .nav > li > a:focus, | |||
body.skin-black .main-header .navbar .nav .open > a, body.skin-black .main-header .navbar .nav .open > a:hover, body.skin-black .main-header .navbar .nav .open > a:focus, | |||
body.skin-black .main-header .navbar .nav > .active > a { | |||
color: #F39C12; | |||
} | |||
/* line 169, ../sass/_adminlte.scss */ | |||
/* line 174, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .dropdown-menu { | |||
-moz-box-shadow: 0px 0px 4px gray; | |||
-webkit-box-shadow: 0px 0px 4px gray; | |||
box-shadow: 0px 0px 4px gray; | |||
} | |||
/* line 174, ../sass/_adminlte.scss */ | |||
/* line 179, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle { | |||
border-right: solid 1px #e0e0e0; | |||
} | |||
/* line 178, ../sass/_adminlte.scss */ | |||
/* line 183, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .link-control-sidebar { | |||
display: none; | |||
} | |||
/* line 183, ../sass/_adminlte.scss */ | |||
/* line 188, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .notifications-menu ul.menu { | |||
max-height: 300px; | |||
} | |||
/* line 186, ../sass/_adminlte.scss */ | |||
/* line 191, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .notifications-menu ul.menu li a { | |||
padding-top: 4px; | |||
padding-bottom: 4px; | |||
} | |||
/* line 190, ../sass/_adminlte.scss */ | |||
/* line 195, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .notifications-menu ul.menu li a h5 { | |||
margin-bottom: 2px; | |||
} | |||
/* line 193, ../sass/_adminlte.scss */ | |||
/* line 198, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .notifications-menu ul.menu li a h5 small { | |||
float: right; | |||
} | |||
/* line 198, ../sass/_adminlte.scss */ | |||
/* line 203, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .notifications-menu ul.menu li a p { | |||
margin-left: 10px; | |||
} | |||
/* line 209, ../sass/_adminlte.scss */ | |||
/* line 214, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu { | |||
width: 400px; | |||
} | |||
/* line 213, ../sass/_adminlte.scss */ | |||
/* line 218, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu .search-producer { | |||
margin: 10px; | |||
width: 94%; | |||
} | |||
/* line 218, ../sass/_adminlte.scss */ | |||
/* line 223, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results { | |||
display: none; | |||
} | |||
/* line 221, ../sass/_adminlte.scss */ | |||
/* line 226, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert { | |||
margin-bottom: 0px; | |||
margin-left: 10px; | |||
margin-right: 10px; | |||
padding: 15px 15px 10px 15px; | |||
} | |||
/* line 229, ../sass/_adminlte.scss */ | |||
/* line 234, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu .label { | |||
position: relative; | |||
top: -2px; | |||
left: 0px; | |||
} | |||
/* line 235, ../sass/_adminlte.scss */ | |||
/* line 240, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline { | |||
color: #F39C12; | |||
} | |||
/* line 239, ../sass/_adminlte.scss */ | |||
/* line 244, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu .offline { | |||
display: none; | |||
} | |||
/* line 243, ../sass/_adminlte.scss */ | |||
/* line 248, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu a { | |||
color: #333; | |||
} | |||
/* line 247, ../sass/_adminlte.scss */ | |||
/* line 252, ../sass/_adminlte.scss */ | |||
body.skin-black .main-header .navbar .nav li.producer-menu .producer-id { | |||
position: relative; | |||
top: 4px; | |||
@@ -1782,100 +1786,100 @@ body.skin-black .main-header .navbar .nav li.producer-menu .producer-id { | |||
font-size: 12px; | |||
float: right; | |||
} | |||
/* line 258, ../sass/_adminlte.scss */ | |||
/* line 263, ../sass/_adminlte.scss */ | |||
body.skin-black .sidebar .sidebar-menu > li.header { | |||
color: #899397; | |||
} | |||
/* line 262, ../sass/_adminlte.scss */ | |||
/* line 267, ../sass/_adminlte.scss */ | |||
body.skin-black .sidebar .label { | |||
padding-top: 5px; | |||
position: relative; | |||
top: -3px; | |||
} | |||
/* line 269, ../sass/_adminlte.scss */ | |||
/* line 274, ../sass/_adminlte.scss */ | |||
body.skin-black .sidebar-menu > li.active > a { | |||
border-color: #F39C12; | |||
} | |||
/* line 274, ../sass/_adminlte.scss */ | |||
/* line 279, ../sass/_adminlte.scss */ | |||
body.skin-black section.sidebar .user-panel { | |||
text-align: center; | |||
} | |||
/* line 277, ../sass/_adminlte.scss */ | |||
/* line 282, ../sass/_adminlte.scss */ | |||
body.skin-black section.sidebar .user-panel .image { | |||
margin-bottom: 3px; | |||
} | |||
/* line 281, ../sass/_adminlte.scss */ | |||
/* line 286, ../sass/_adminlte.scss */ | |||
body.skin-black section.sidebar .user-panel .title { | |||
font-weight: bold; | |||
color: white; | |||
} | |||
/* line 288, ../sass/_adminlte.scss */ | |||
/* line 293, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper { | |||
background-color: #f5f5f5; | |||
} | |||
/* line 291, ../sass/_adminlte.scss */ | |||
/* line 296, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .content-header { | |||
background-color: #F5F5F5; | |||
padding-bottom: 15px; | |||
border-bottom: solid 1px #e0e0e0; | |||
border-top: solid 1px #e0e0e0; | |||
} | |||
/* line 297, ../sass/_adminlte.scss */ | |||
/* line 302, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .content-header .btn { | |||
padding: 3px 6px; | |||
font-size: 10px; | |||
font-family: Arial; | |||
text-transform: uppercase; | |||
} | |||
/* line 304, ../sass/_adminlte.scss */ | |||
/* line 309, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .content-header h1 { | |||
font-family: 'myriadpro-light'; | |||
font-size: 20px; | |||
} | |||
/* line 310, ../sass/_adminlte.scss */ | |||
/* line 315, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .col-no-padding-left { | |||
padding-left: 0px; | |||
} | |||
/* line 314, ../sass/_adminlte.scss */ | |||
/* line 319, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .col-no-padding-right { | |||
padding-right: 0px; | |||
} | |||
/* line 318, ../sass/_adminlte.scss */ | |||
/* line 323, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper a { | |||
color: #e08e0b; | |||
} | |||
/* line 321, ../sass/_adminlte.scss */ | |||
/* line 326, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper a.disable { | |||
pointer-events: none; | |||
cursor: default; | |||
} | |||
/* line 327, ../sass/_adminlte.scss */ | |||
/* line 332, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .label { | |||
padding-top: 4px; | |||
padding-bottom: 1px; | |||
} | |||
/* line 332, ../sass/_adminlte.scss */ | |||
/* line 337, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .btn { | |||
color: white; | |||
} | |||
/* line 336, ../sass/_adminlte.scss */ | |||
/* line 341, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .btn-default { | |||
color: #333; | |||
background-color: white; | |||
} | |||
/* line 341, ../sass/_adminlte.scss */ | |||
/* line 346, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .btn-primary { | |||
background-color: #F39C12; | |||
color: white; | |||
border-color: #F39C12; | |||
} | |||
/* line 348, ../sass/_adminlte.scss */ | |||
/* line 353, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .nav.nav-tabs .badge { | |||
margin-left: 4px; | |||
background-color: #e0e0e0; | |||
color: #444; | |||
} | |||
/* line 355, ../sass/_adminlte.scss */ | |||
/* line 360, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .tab-content { | |||
border-left: solid 1px #ddd; | |||
border-bottom: solid 1px #ddd; | |||
@@ -1883,20 +1887,20 @@ body.skin-black .content-wrapper .tab-content { | |||
padding: 30px 15px 15px 15px; | |||
background-color: white; | |||
} | |||
/* line 363, ../sass/_adminlte.scss */ | |||
/* line 368, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .alert { | |||
position: relative; | |||
} | |||
/* line 366, ../sass/_adminlte.scss */ | |||
/* line 371, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .alert a { | |||
color: white; | |||
} | |||
/* line 369, ../sass/_adminlte.scss */ | |||
/* line 374, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .alert a.btn { | |||
color: #333; | |||
text-decoration: none; | |||
} | |||
/* line 374, ../sass/_adminlte.scss */ | |||
/* line 379, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .alert .close { | |||
font-size: 30px; | |||
position: absolute; | |||
@@ -1906,83 +1910,83 @@ body.skin-black .content-wrapper .alert .close { | |||
color: white; | |||
opacity: 0.6; | |||
} | |||
/* line 383, ../sass/_adminlte.scss */ | |||
/* line 388, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .alert .close:hover { | |||
opacity: 1; | |||
} | |||
/* line 388, ../sass/_adminlte.scss */ | |||
/* line 393, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .alert.alert-dark { | |||
background-color: #ece4d8; | |||
color: black; | |||
} | |||
/* line 395, ../sass/_adminlte.scss */ | |||
/* line 400, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .small-box h3 { | |||
font-size: 28px; | |||
font-family: 'Source Sans Pro',sans-serif; | |||
} | |||
/* line 400, ../sass/_adminlte.scss */ | |||
/* line 405, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .small-box .icon { | |||
top: -2px; | |||
} | |||
/* line 404, ../sass/_adminlte.scss */ | |||
/* line 409, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .small-box .small-box-footer { | |||
color: white; | |||
padding-top: 6px; | |||
padding-bottom: 2px; | |||
} | |||
/* line 413, ../sass/_adminlte.scss */ | |||
/* line 418, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .callout h4 .fa { | |||
margin-right: 7px; | |||
} | |||
/* line 416, ../sass/_adminlte.scss */ | |||
/* line 421, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .callout a { | |||
color: white; | |||
} | |||
/* line 419, ../sass/_adminlte.scss */ | |||
/* line 424, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .callout .btn { | |||
color: #333; | |||
text-decoration: none; | |||
} | |||
/* line 426, ../sass/_adminlte.scss */ | |||
/* line 431, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .table th { | |||
font-size: 13px; | |||
} | |||
/* line 429, ../sass/_adminlte.scss */ | |||
/* line 434, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions { | |||
width: 172px; | |||
text-align: right; | |||
} | |||
/* line 433, ../sass/_adminlte.scss */ | |||
/* line 438, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small { | |||
font-size: 12px; | |||
} | |||
/* line 437, ../sass/_adminlte.scss */ | |||
/* line 442, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > th, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td, body.skin-black .content-wrapper .table.table-bordered > tbody > tr > td, body.skin-black .content-wrapper .table.table-bordered > tfoot > tr > td { | |||
border: 1px solid #ddd; | |||
} | |||
/* line 446, ../sass/_adminlte.scss */ | |||
/* line 451, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .table.table-bordered > thead > tr > th, body.skin-black .content-wrapper .table.table-bordered > thead > tr > td { | |||
border-bottom-width: 2px; | |||
} | |||
/* line 452, ../sass/_adminlte.scss */ | |||
/* line 457, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus { | |||
background-color: #F39C12; | |||
border: solid 1px #F39C12; | |||
color: white; | |||
} | |||
/* line 458, ../sass/_adminlte.scss */ | |||
/* line 463, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span { | |||
color: #F39C12; | |||
} | |||
/* line 460, ../sass/_adminlte.scss */ | |||
/* line 465, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover { | |||
color: #c87f0a; | |||
} | |||
/* line 465, ../sass/_adminlte.scss */ | |||
/* line 470, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .submenu { | |||
margin-bottom: 25px; | |||
} | |||
/* line 469, ../sass/_adminlte.scss */ | |||
/* line 474, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .form-actions { | |||
position: fixed; | |||
bottom: 0; | |||
@@ -1996,71 +2000,71 @@ body.skin-black .content-wrapper .form-actions { | |||
z-index: 10; | |||
border-top: solid 1px #e0e0e0; | |||
} | |||
/* line 482, ../sass/_adminlte.scss */ | |||
/* line 487, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button { | |||
margin-left: 10px; | |||
} | |||
/* line 487, ../sass/_adminlte.scss */ | |||
/* line 492, ../sass/_adminlte.scss */ | |||
body.skin-black .content-wrapper .form-buttons { | |||
margin-top: 25px; | |||
text-align: right; | |||
} | |||
/* line 494, ../sass/_adminlte.scss */ | |||
/* line 499, ../sass/_adminlte.scss */ | |||
body.skin-black .main-footer a { | |||
color: #F39C12; | |||
} | |||
/* line 499, ../sass/_adminlte.scss */ | |||
/* line 504, ../sass/_adminlte.scss */ | |||
body.skin-black .gridview-pagesize { | |||
float: right; | |||
margin-bottom: 8px; | |||
} | |||
/* line 504, ../sass/_adminlte.scss */ | |||
/* line 509, ../sass/_adminlte.scss */ | |||
body.skin-black #yii-debug-toolbar { | |||
bottom: 64px; | |||
} | |||
/* line 509, ../sass/_adminlte.scss */ | |||
/* line 514, ../sass/_adminlte.scss */ | |||
body.login-page { | |||
background: none; | |||
background-color: white; | |||
} | |||
/* line 513, ../sass/_adminlte.scss */ | |||
/* line 518, ../sass/_adminlte.scss */ | |||
body.login-page .login-box .login-logo { | |||
text-align: center; | |||
font-family: 'worksans_bold'; | |||
} | |||
/* line 517, ../sass/_adminlte.scss */ | |||
/* line 522, ../sass/_adminlte.scss */ | |||
body.login-page .login-box .login-logo img { | |||
width: 150px; | |||
} | |||
/* line 523, ../sass/_adminlte.scss */ | |||
/* line 528, ../sass/_adminlte.scss */ | |||
body.login-page .login-box .login-box-body, | |||
body.login-page .login-box .login-box-body input#loginform-email, | |||
body.login-page .login-box .login-box-body input#loginform-password, | |||
body.login-page .login-box .login-box-body .btn-primary { | |||
font-size: 14px; | |||
} | |||
/* line 530, ../sass/_adminlte.scss */ | |||
/* line 535, ../sass/_adminlte.scss */ | |||
body.login-page .login-box .login-box-body .btn-primary { | |||
background-color: #F39C12; | |||
border-color: #F39C12; | |||
padding: 5px 10px; | |||
margin-bottom: 15px; | |||
} | |||
/* line 536, ../sass/_adminlte.scss */ | |||
/* line 541, ../sass/_adminlte.scss */ | |||
body.login-page .login-box .login-box-body .btn-primary:active { | |||
background-color: #f4a62a; | |||
border-color: #F39C12; | |||
} | |||
/* line 542, ../sass/_adminlte.scss */ | |||
/* line 547, ../sass/_adminlte.scss */ | |||
body.login-page .login-box .login-box-body a { | |||
color: #F39C12; | |||
} | |||
/* line 544, ../sass/_adminlte.scss */ | |||
/* line 549, ../sass/_adminlte.scss */ | |||
body.login-page .login-box .login-box-body a:hover { | |||
color: #f4a62a; | |||
} | |||
/* line 549, ../sass/_adminlte.scss */ | |||
/* line 554, ../sass/_adminlte.scss */ | |||
body.login-page .login-box .login-box-body .checkbox label input { | |||
position: relative; | |||
top: 0px; |
@@ -46,6 +46,11 @@ body.skin-black { | |||
} | |||
.main-header { | |||
.dropdown-toggle::after { | |||
display: none; | |||
} | |||
.logo { | |||
background-color: white ; | |||
font-family: 'highvoltageregular'; |
@@ -76,12 +76,12 @@ class OrderManager extends AbstractService implements ManagerInterface | |||
|| $force) { | |||
$this->changeOrderStatus($order, OrderStatus::ALIAS_DELETED, $user); | |||
$return = true; | |||
} | |||
// cancel | |||
elseif ($this->producerSolver->getConfig('option_behavior_cancel_order') == Producer::BEHAVIOR_DELETE_ORDER_STATUS) { | |||
$this->changeOrderStatus($order, OrderStatus::ALIAS_CANCELED, $user); | |||
$this->orderBuilder->update($order); | |||
$return = true; | |||
} | |||
if($return) { |
@@ -9,8 +9,9 @@ use domain\User\User\User; | |||
class SharedPointSale extends ActiveRecordCommon | |||
{ | |||
/* Yii */ | |||
public ?Producer $producerCurrent; | |||
public const SCENARIO_CREATE = 'create'; | |||
public const SCENARIO_CONFIRM = 'confirm'; | |||
public static function tableName() | |||
@@ -26,8 +27,10 @@ class SharedPointSale extends ActiveRecordCommon | |||
[['id_point_sale', 'id_producer_with_sharing', 'id_point_sale_with_sharing', 'status', | |||
'created_by', 'confirmed_by', 'declined_by'], 'integer'], | |||
[['created_at', 'confirmed_at', 'declined_at'], 'safe'], | |||
['id_point_sale', 'verifySharedPointSale', 'on' => [self::SCENARIO_CREATE, self::SCENARIO_CONFIRM]], | |||
['id_point_sale', 'exist', 'targetClass' => PointSale::class, 'targetAttribute' => 'id'], | |||
['id_point_sale_with_sharing', 'exist', 'targetClass' => PointSale::class, 'targetAttribute' => 'id'], | |||
['id_point_sale_with_sharing', 'verifyConfirm'], | |||
['id_producer_with_sharing', 'exist', 'targetClass' => Producer::class, 'targetAttribute' => 'id'], | |||
[['created_by', 'confirmed_by', 'declined_by'], 'exist', 'targetClass' => User::class, 'targetAttribute' => 'id'], | |||
]; | |||
@@ -42,7 +45,41 @@ class SharedPointSale extends ActiveRecordCommon | |||
]; | |||
} | |||
/* Get / Set */ | |||
public function verifySharedPointSale($attribute, $params) | |||
{ | |||
$sharedPointSaleRepository = SharedPointSaleRepository::getInstance(); | |||
if($this->scenario == self::SCENARIO_CREATE || $this->scenario == self::SCENARIO_CONFIRM) { | |||
$sharedPointSaleConfirmed = $sharedPointSaleRepository->findSharedPointsSaleConfirmedByPointSale( | |||
$this->getPointSale(), | |||
$this->getProducerWithSharing() | |||
); | |||
if($sharedPointSaleConfirmed && count($sharedPointSaleConfirmed)) { | |||
$this->addError($attribute, "Ce point de vente est déjà partagé avec ce producteur."); | |||
} | |||
} | |||
if($this->scenario == self::SCENARIO_CREATE) { | |||
$sharedPointSaleRequest = $sharedPointSaleRepository->findSharedPointSaleRequestByPointSale( | |||
$this->getPointSale(), | |||
$this->getProducerWithSharing() | |||
); | |||
if($sharedPointSaleRequest && count($sharedPointSaleRequest)) { | |||
$this->addError($attribute, "Ce point de vente a déjà une demande de partage en attente avec ce producteur."); | |||
} | |||
} | |||
} | |||
public function verifyConfirm($attribute, $params) | |||
{ | |||
if($this->scenario == self::SCENARIO_CONFIRM) { | |||
if($this->producerCurrent->id != $this->getProducerWithSharing()->id) { | |||
$this->addError($attribute, "Vous ne pouvez pas confirmer cette demande de partage."); | |||
} | |||
} | |||
} | |||
/* Getters / Setters */ | |||
public function getId(): ?int | |||
{ |
@@ -4,6 +4,7 @@ namespace domain\PointSale\SharedPointSale; | |||
use domain\_\AbstractRepository; | |||
use domain\PointSale\PointSale\PointSale; | |||
use domain\Producer\Producer\Producer; | |||
class SharedPointSaleRepository extends AbstractRepository | |||
{ | |||
@@ -47,11 +48,38 @@ class SharedPointSaleRepository extends AbstractRepository | |||
->find(); | |||
} | |||
public function findSharedPointsSaleConfirmedByPointSale(PointSale $pointSale) | |||
public function findSharedPointsSaleConfirmedByPointSale(PointSale $pointSale, Producer $producerWithSharing = null) | |||
{ | |||
$query = $this->createQuery() | |||
->filterByPointSale($pointSale) | |||
->filterIsConfirmed(); | |||
if($producerWithSharing) { | |||
$query->filterByProducerWithSharing($producerWithSharing); | |||
} | |||
return $query->find(); | |||
} | |||
public function findOneSharedPointsSaleConfirmed(PointSale $pointSale, Producer $producer) | |||
{ | |||
return $this->createQuery() | |||
->filterByPointSale($pointSale) | |||
->filterByProducer($producer) | |||
->filterIsConfirmed() | |||
->find(); | |||
->findOne(); | |||
} | |||
public function findSharedPointSaleRequestByPointSale(PointSale $pointSale, Producer $producerWithSharing = null) | |||
{ | |||
$query = $this->createQuery() | |||
->filterByPointSale($pointSale) | |||
->filterIsRequest(); | |||
if($producerWithSharing) { | |||
$query->filterByProducerWithSharing($producerWithSharing); | |||
} | |||
return $query->find(); | |||
} | |||
} |
@@ -34,13 +34,20 @@ class SharedPointSaleRepositoryQuery extends AbstractRepositoryQuery | |||
return $this; | |||
} | |||
public function filterByPointSale(PointSale $pointSale) | |||
public function filterByPointSale(PointSale $pointSale): self | |||
{ | |||
$this->andWhere('id_point_sale = :id_point_sale OR id_point_sale_with_sharing = :id_point_sale') | |||
->addParams(['id_point_sale' => $pointSale->id]); | |||
return $this; | |||
} | |||
public function filterByProducer(Producer $producer): self | |||
{ | |||
$this->andWhere('point_sale.id_producer = :id_producer OR id_producer_with_sharing = :id_producer') | |||
->addParams(['id_producer' => $producer->id]); | |||
return $this; | |||
} | |||
public function filterIsRequest() | |||
{ | |||
$this->filterIsPointSaleWithSharingIsNull() | |||
@@ -51,7 +58,7 @@ class SharedPointSaleRepositoryQuery extends AbstractRepositoryQuery | |||
public function filterIsConfirmed() | |||
{ | |||
$this->filterIsStatusOnline(); | |||
$this->andWhere('id_point_sale_with_sharing IS NOT NULL AND confirmed_at IS NOT NULL'); | |||
$this->andWhere('id_point_sale_with_sharing IS NOT NULL AND confirmed_at IS NOT NULL AND declined_at IS NULL'); | |||
return $this; | |||
} | |||
@@ -39,7 +39,7 @@ use domain\Feature\Feature\Feature; | |||
use yii\helpers\Html; | |||
$producerModule = $this->getProducerModule(); | |||
$featureModule = $this->getFeatureModule(); | |||
$featureChecker = $this->getFeatureModule()->getChecker(); | |||
$this->setTitle('Fonctionnalités, services & tarifs'); | |||
$this->setMeta('description', "Découvrez les fonctionnalités du logiciel, les services proposés et les tarifs pour l’hébergement de votre circuit court sur Souke."); | |||
@@ -56,32 +56,36 @@ $this->setMeta('description', "Découvrez les fonctionnalités du logiciel, les | |||
</div> | |||
<div class="panel-body"> | |||
<div class="row"> | |||
<?= block_feature('shop', "Une boutique dédiée accessible à vos clients pour leur présenter votre activité et gérer vos prises de commandes."); ?> | |||
<?= block_feature("gear", "Une administration complète et intuitive pour gérer votre activité de producteur."); ?> | |||
<?= block_feature('shop', "Une boutique dédiée accessible à vos clients pour leur présenter votre activité et gérer vos prises de commandes"); ?> | |||
<?= block_feature("gear", "Une administration complète et intuitive pour gérer votre activité de producteur"); ?> | |||
</div> | |||
<div class="row"> | |||
<?= block_feature("calendar3", "Planification des jours de distributions."); ?> | |||
<?= block_feature("download", "Récapitulatif des commandes par jour de distribution (PDF et CSV), génération d'étiquettes (PDF)."); ?> | |||
<?= block_feature("calendar3", "Planification des jours de distributions"); ?> | |||
<?= block_feature("download", "Récapitulatif des commandes par jour de distribution (PDF et CSV), génération d'étiquettes (PDF)"); ?> | |||
</div> | |||
<div class="row"> | |||
<?= block_feature("basket", "Gestion des produits, catégories et prix spécifiques."); ?> | |||
<?= block_feature("geo-alt", "Gestion des points de vente."); ?> | |||
<?= block_feature("basket", "Gestion des produits, catégories et prix spécifiques"); ?> | |||
<?php $featureSharedPointSaleDescription = ''; | |||
if($featureChecker->isEnabled(Feature::ALIAS_SHARED_POINT_SALE)): | |||
$featureSharedPointSaleDescription .= "<br />Partage de points de vente entre plusieurs producteurs pour des distributions communes"; | |||
endif; ?> | |||
<?= block_feature("geo-alt", "Gestion des points de vente ".$featureSharedPointSaleDescription); ?> | |||
</div> | |||
<div class="row"> | |||
<?= block_feature("arrow-repeat", "Gestion des abonnements pour les commandes récurrentes."); ?> | |||
<?= block_feature("people", "Gestion des clients."); ?> | |||
<?= block_feature("arrow-repeat", "Gestion des abonnements pour les commandes récurrentes"); ?> | |||
<?= block_feature("people", "Gestion des clients"); ?> | |||
</div> | |||
<div class="row"> | |||
<?= block_feature("piggy-bank", "Système de cagnotte permettant la comptabilisation des paiements."); ?> | |||
<?= block_feature("credit-card", "Paiement en ligne possible via la plateforme <strong>Stripe</strong> pour que les clients puissent alimenter leur cagnotte de manière autonome."); ?> | |||
<?= block_feature("piggy-bank", "Système de cagnotte permettant la comptabilisation des paiements"); ?> | |||
<?= block_feature("credit-card", "Paiement en ligne possible via la plateforme <strong>Stripe</strong> pour que les clients puissent alimenter leur cagnotte de manière autonome"); ?> | |||
</div> | |||
<div class="row"> | |||
<?= block_feature("megaphone", "Communication facilitée avec les clients via l'envoi d'emails en masse."); ?> | |||
<?= block_feature("file-earmark-text", "Génération de bons de livraison, factures & devis."); ?> | |||
<?= block_feature("megaphone", "Communication facilitée avec les clients via l'envoi d'emails en masse"); ?> | |||
<?= block_feature("file-earmark-text", "Génération de bons de livraison, factures & devis"); ?> | |||
</div> | |||
<div class="row"> | |||
<?= block_feature("graph-up", "Statistiques et rapports de vente."); ?> | |||
<?= block_feature("cloud-arrow-up", "Exports vers les logiciels <strong>Evoliz</strong> (comptabilité) et <strong>Tiller</strong> (caisse)."); ?> | |||
<?= block_feature("graph-up", "Statistiques et rapports de vente"); ?> | |||
<?= block_feature("cloud-arrow-up", "Exports vers les logiciels <strong>Evoliz</strong> (comptabilité) et <strong>Tiller</strong> (caisse)"); ?> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -125,7 +129,7 @@ $this->setMeta('description', "Découvrez les fonctionnalités du logiciel, les | |||
<h3>Support</h3> | |||
<p>Je suis disponible pour répondre rapidement à toutes vos questions par email | |||
ou par téléphone. | |||
<?php if($featureModule->getChecker()->isEnabled(Feature::ALIAS_SHOP_SUPPORT)): ?> | |||
<?php if($featureChecker->isEnabled(Feature::ALIAS_SHOP_SUPPORT)): ?> | |||
<br />J'assure également le support pour vos clients s'ils | |||
rencontrent un problème dans l'utilisation du logiciel. | |||
<?php endif; ?> |
@@ -82,7 +82,7 @@ class OrderController extends ProducerBaseController | |||
]; | |||
} | |||
public function actionOrder(int $id = 0, $date = '') | |||
public function actionOrder(int $id = 0, string $date = '', int $idPointSale = null) | |||
{ | |||
$orderModule = $this->getOrderModule(); | |||
$distributionModule = $this-> getDistributionModule(); | |||
@@ -96,8 +96,8 @@ class OrderController extends ProducerBaseController | |||
); | |||
} | |||
$order = $orderModule->findOneOrderById($id); | |||
if ($order && $orderModule->isOrderStateOpen($order)) { | |||
$order = $orderModule->getRepository()->findOneOrderById($id); | |||
if ($order && $orderModule->getRepository()->isOrderStateOpen($order)) { | |||
$params['order'] = $order; | |||
} | |||
@@ -105,6 +105,10 @@ class OrderController extends ProducerBaseController | |||
$params['date'] = $date; | |||
} | |||
if($idPointSale) { | |||
$params['idPointSale'] = $idPointSale; | |||
} | |||
return $this->render('order', $params); | |||
} | |||
@@ -59,7 +59,9 @@ $this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDe | |||
var appInitValues = { | |||
urlLogin: '<?= \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/producer', 'id' => $this->context->getProducerCurrent()->id, 'return_url' => \Yii::$app->urlManagerProducer->createAbsoluteUrl(['order/order', 'slug_producer' => $this->context->getProducerCurrent()->slug])]) ?>', | |||
producerOptionOrderEntryPoint: '<?= $producer->option_order_entry_point ?>', | |||
<?php if (isset($order)): ?>pointSaleActiveId: <?= $order->id_point_sale ?><?php endif; ?> | |||
<?php if (isset($order)): ?>pointSaleActiveId: <?= $order->id_point_sale ?> | |||
<?php elseif(isset($idPointSale)): ?>pointSaleActiveId: <?= $idPointSale ?> | |||
<?php endif; ?> | |||
}; | |||
</script> | |||