Browse Source

Merge branch 'develop'

master
Guillaume Bourgeois 5 months ago
parent
commit
c00968aa73
11 changed files with 352 additions and 216 deletions
  1. +17
    -5
      backend/controllers/SharedPointSaleController.php
  2. +123
    -90
      backend/views/shared-point-sale/index.php
  3. +97
    -93
      backend/web/css/screen.css
  4. +5
    -0
      backend/web/sass/_adminlte.scss
  5. +2
    -2
      domain/Order/Order/OrderManager.php
  6. +39
    -2
      domain/PointSale/SharedPointSale/SharedPointSale.php
  7. +30
    -2
      domain/PointSale/SharedPointSale/SharedPointSaleRepository.php
  8. +9
    -2
      domain/PointSale/SharedPointSale/SharedPointSaleRepositoryQuery.php
  9. +20
    -16
      frontend/views/site/service.php
  10. +7
    -3
      producer/controllers/OrderController.php
  11. +3
    -1
      producer/views/order/order.php

+ 17
- 5
backend/controllers/SharedPointSaleController.php View File

{ {
$sharedPointSaleModule = $this->getSharedPointSaleModule(); $sharedPointSaleModule = $this->getSharedPointSaleModule();
$sharedPointSaleModel = $sharedPointSaleModule->getBuilder()->instanciateSharedPointSale(null, null, $this->getUserCurrent()); $sharedPointSaleModel = $sharedPointSaleModule->getBuilder()->instanciateSharedPointSale(null, null, $this->getUserCurrent());
$sharedPointSaleModel->scenario = SharedPointSale::SCENARIO_CREATE;
if($sharedPointSaleModel->load(\Yii::$app->request->post()) && $sharedPointSaleModel->validate()) { if($sharedPointSaleModel->load(\Yii::$app->request->post()) && $sharedPointSaleModel->validate()) {
$sharedPointSaleModule->getManager()->createSharedPointSale( $sharedPointSaleModule->getManager()->createSharedPointSale(
$sharedPointSaleModel->getPointSale(), $sharedPointSaleModel->getPointSale(),
{ {
$sharedPointSale = $this->findSharedPointSale($id); $sharedPointSale = $this->findSharedPointSale($id);
$sharedPointSale->scenario = SharedPointSale::SCENARIO_CONFIRM; $sharedPointSale->scenario = SharedPointSale::SCENARIO_CONFIRM;
$sharedPointSale->producerCurrent = $this->getProducerCurrent();

if($sharedPointSale->load(\Yii::$app->request->post()) && $sharedPointSale->validate()) { if($sharedPointSale->load(\Yii::$app->request->post()) && $sharedPointSale->validate()) {
$pointSaleWithSharing = $sharedPointSale->getPointSaleWithSharing(); $pointSaleWithSharing = $sharedPointSale->getPointSaleWithSharing();
if($this->getSharedPointSaleModule()->getManager()->confirmSharedPointSale($sharedPointSale, $pointSaleWithSharing, $this->getUserCurrent())) { if($this->getSharedPointSaleModule()->getManager()->confirmSharedPointSale($sharedPointSale, $pointSaleWithSharing, $this->getUserCurrent())) {
} }
} }
else { 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']); return $this->redirect(['index']);
public function actionDecline(int $id) public function actionDecline(int $id)
{ {
$sharedPointSale = $this->findSharedPointSale($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 { 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']); return $this->redirect(['index']);

+ 123
- 90
backend/views/shared-point-sale/index.php View File

* termes. * termes.
*/ */


use common\helpers\GlobalParam;
use domain\PointSale\UserPointSale\UserPointSale; use domain\PointSale\UserPointSale\UserPointSale;
use domain\Producer\Producer\Producer; use domain\Producer\Producer\Producer;
use yii\grid\GridView; use yii\grid\GridView;
<div class="shared-point-sale-index"> <div class="shared-point-sale-index">
<div class="row"> <div class="row">
<div class="col-md-8"> <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> </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> </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> <thead>
<tr> <tr>
<td>Point de vente</td> <td>Point de vente</td>
<td>Partagé avec</td> <td>Partagé avec</td>
<td></td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach($pointsSaleArray as $pointSale): ?> <?php foreach($pointsSaleArray as $pointSale): ?>
<?php <?php
$pointsSaleSharedWithPointSaleArray = $sharedPointSaleModule->getResolver()->getPointsSaleSharedWithPointSale($pointSale); $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->getProducer()->getName()); ?>
- <?= Html::encode($pointSaleSharedWithPointSale->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> </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 endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
</div>
<?php else: ?>
<p><em>Aucun résultat</em></p>
<?php endif; ?>
</div> </div>
<?php endif; ?>
</div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="callout callout-info"> <div class="callout callout-info">
Cette fonctionnalité vous permet de partager des points de vente avec d'autres producteurs inscrits sur Souke 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 /> 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 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> </div>
</div> </div>

+ 97
- 93
backend/web/css/screen.css View File

color: gray; color: gray;
font-style: italic; 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 { body.skin-black .main-header .logo {
background-color: white; background-color: white;
font-family: 'highvoltageregular'; font-family: 'highvoltageregular';
font-size: 23px; font-size: 23px;
position: relative; 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 { body.skin-black .main-header .logo:hover, body.skin-black .main-header .logo:focus {
background-color: white; background-color: white;
text-decoration: none; text-decoration: none;
} }
/* line 60, ../sass/_adminlte.scss */
/* line 65, ../sass/_adminlte.scss */
body.skin-black .main-header .logo img { body.skin-black .main-header .logo img {
position: relative; position: relative;
max-width: 300px; max-width: 300px;
max-height: 300px; max-height: 300px;
height: auto; height: auto;
} }
/* line 68, ../sass/_adminlte.scss */
/* line 73, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-lg img { body.skin-black .main-header .logo .logo-lg img {
width: 90px; width: 90px;
top: -2px; top: -2px;
} }
/* line 74, ../sass/_adminlte.scss */
/* line 79, ../sass/_adminlte.scss */
body.skin-black .main-header .logo .logo-mini img { body.skin-black .main-header .logo .logo-mini img {
width: 50px; width: 50px;
} }
/* line 79, ../sass/_adminlte.scss */
/* line 84, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar { body.skin-black .main-header .navbar {
display: block; display: block;
background-color: white; background-color: white;
padding: 0px; padding: 0px;
} }
/* line 84, ../sass/_adminlte.scss */
/* line 89, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel { body.skin-black .main-header .navbar .producer-panel {
position: relative; position: relative;
float: left; float: left;
padding-left: 50px; padding-left: 50px;
margin-left: 7px; margin-left: 7px;
} }
/* line 91, ../sass/_adminlte.scss */
/* line 96, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel.without-logo { body.skin-black .main-header .navbar .producer-panel.without-logo {
padding-left: 10px; padding-left: 10px;
} }
/* line 95, ../sass/_adminlte.scss */
/* line 100, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo { body.skin-black .main-header .navbar .producer-panel .logo {
position: absolute; position: absolute;
top: 5px; top: 5px;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
} }
/* line 107, ../sass/_adminlte.scss */
/* line 112, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .logo .img-logo { body.skin-black .main-header .navbar .producer-panel .logo .img-logo {
position: absolute; position: absolute;
top: 50%; top: 50%;
max-width: 35px; max-width: 35px;
max-height: 35px; max-height: 35px;
} }
/* line 117, ../sass/_adminlte.scss */
/* line 122, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title { body.skin-black .main-header .navbar .producer-panel .title {
position: relative; position: relative;
top: 2px; top: 2px;
text-transform: uppercase; text-transform: uppercase;
} }
/* line 122, ../sass/_adminlte.scss */
/* line 127, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title a { body.skin-black .main-header .navbar .producer-panel .title a {
color: #333; color: #333;
} }
/* line 125, ../sass/_adminlte.scss */
/* line 130, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title a:hover { body.skin-black .main-header .navbar .producer-panel .title a:hover {
text-decoration: underline; text-decoration: underline;
} }
/* line 130, ../sass/_adminlte.scss */
/* line 135, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .producer-panel .title .producer-id { body.skin-black .main-header .navbar .producer-panel .title .producer-id {
color: gray; color: gray;
font-size: 13px; font-size: 13px;
} }
/* line 137, ../sass/_adminlte.scss */
/* line 142, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .sidebar-toggle { body.skin-black .main-header .navbar .sidebar-toggle {
color: #333; color: #333;
} }
/* line 141, ../sass/_adminlte.scss */
/* line 146, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support { body.skin-black .main-header .navbar .link-support {
float: left; float: left;
padding: 15px 15px; padding: 15px 15px;
border-right: solid 1px #e0e0e0; border-right: solid 1px #e0e0e0;
color: #333; color: #333;
} }
/* line 147, ../sass/_adminlte.scss */
/* line 152, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .link-support:hover { body.skin-black .main-header .navbar .link-support:hover {
text-decoration: none; text-decoration: none;
color: #F39C12; color: #F39C12;
} }
/* line 153, ../sass/_adminlte.scss */
/* line 158, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .navbar-custom-menu .nav { body.skin-black .main-header .navbar .navbar-custom-menu .nav {
display: block; 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-custom-menu .navbar-nav > li > a,
body.skin-black .main-header .navbar .navbar-right > li > a { body.skin-black .main-header .navbar .navbar-right > li > a {
border-left: solid 1px #e0e0e0; border-left: solid 1px #e0e0e0;
color: #333; 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 > 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 .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 { body.skin-black .main-header .navbar .nav > .active > a {
color: #F39C12; color: #F39C12;
} }
/* line 169, ../sass/_adminlte.scss */
/* line 174, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .dropdown-menu { body.skin-black .main-header .navbar .dropdown-menu {
-moz-box-shadow: 0px 0px 4px gray; -moz-box-shadow: 0px 0px 4px gray;
-webkit-box-shadow: 0px 0px 4px gray; -webkit-box-shadow: 0px 0px 4px gray;
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 { body.skin-black .main-header .logo, body.skin-black .main-header .navbar .sidebar-toggle {
border-right: solid 1px #e0e0e0; border-right: solid 1px #e0e0e0;
} }
/* line 178, ../sass/_adminlte.scss */
/* line 183, ../sass/_adminlte.scss */
body.skin-black .main-header .link-control-sidebar { body.skin-black .main-header .link-control-sidebar {
display: none; display: none;
} }
/* line 183, ../sass/_adminlte.scss */
/* line 188, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu { body.skin-black .main-header .notifications-menu ul.menu {
max-height: 300px; max-height: 300px;
} }
/* line 186, ../sass/_adminlte.scss */
/* line 191, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a { body.skin-black .main-header .notifications-menu ul.menu li a {
padding-top: 4px; padding-top: 4px;
padding-bottom: 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 { body.skin-black .main-header .notifications-menu ul.menu li a h5 {
margin-bottom: 2px; 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 { body.skin-black .main-header .notifications-menu ul.menu li a h5 small {
float: right; float: right;
} }
/* line 198, ../sass/_adminlte.scss */
/* line 203, ../sass/_adminlte.scss */
body.skin-black .main-header .notifications-menu ul.menu li a p { body.skin-black .main-header .notifications-menu ul.menu li a p {
margin-left: 10px; 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 { body.skin-black .main-header .navbar .nav li.producer-menu .dropdown-menu {
width: 400px; width: 400px;
} }
/* line 213, ../sass/_adminlte.scss */
/* line 218, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .search-producer { body.skin-black .main-header .navbar .nav li.producer-menu .search-producer {
margin: 10px; margin: 10px;
width: 94%; 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 { body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results {
display: none; 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 { body.skin-black .main-header .navbar .nav li.producer-menu .li-alert-no-results .alert {
margin-bottom: 0px; margin-bottom: 0px;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
padding: 15px 15px 10px 15px; 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 { body.skin-black .main-header .navbar .nav li.producer-menu .label {
position: relative; position: relative;
top: -2px; top: -2px;
left: 0px; 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 { body.skin-black .main-header .navbar .nav li.producer-menu #link-display-producers-offline {
color: #F39C12; color: #F39C12;
} }
/* line 239, ../sass/_adminlte.scss */
/* line 244, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .offline { body.skin-black .main-header .navbar .nav li.producer-menu .offline {
display: none; display: none;
} }
/* line 243, ../sass/_adminlte.scss */
/* line 248, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu a { body.skin-black .main-header .navbar .nav li.producer-menu a {
color: #333; color: #333;
} }
/* line 247, ../sass/_adminlte.scss */
/* line 252, ../sass/_adminlte.scss */
body.skin-black .main-header .navbar .nav li.producer-menu .producer-id { body.skin-black .main-header .navbar .nav li.producer-menu .producer-id {
position: relative; position: relative;
top: 4px; top: 4px;
font-size: 12px; font-size: 12px;
float: right; float: right;
} }
/* line 258, ../sass/_adminlte.scss */
/* line 263, ../sass/_adminlte.scss */
body.skin-black .sidebar .sidebar-menu > li.header { body.skin-black .sidebar .sidebar-menu > li.header {
color: #899397; color: #899397;
} }
/* line 262, ../sass/_adminlte.scss */
/* line 267, ../sass/_adminlte.scss */
body.skin-black .sidebar .label { body.skin-black .sidebar .label {
padding-top: 5px; padding-top: 5px;
position: relative; position: relative;
top: -3px; top: -3px;
} }
/* line 269, ../sass/_adminlte.scss */
/* line 274, ../sass/_adminlte.scss */
body.skin-black .sidebar-menu > li.active > a { body.skin-black .sidebar-menu > li.active > a {
border-color: #F39C12; border-color: #F39C12;
} }
/* line 274, ../sass/_adminlte.scss */
/* line 279, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel { body.skin-black section.sidebar .user-panel {
text-align: center; text-align: center;
} }
/* line 277, ../sass/_adminlte.scss */
/* line 282, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .image { body.skin-black section.sidebar .user-panel .image {
margin-bottom: 3px; margin-bottom: 3px;
} }
/* line 281, ../sass/_adminlte.scss */
/* line 286, ../sass/_adminlte.scss */
body.skin-black section.sidebar .user-panel .title { body.skin-black section.sidebar .user-panel .title {
font-weight: bold; font-weight: bold;
color: white; color: white;
} }
/* line 288, ../sass/_adminlte.scss */
/* line 293, ../sass/_adminlte.scss */
body.skin-black .content-wrapper { body.skin-black .content-wrapper {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
/* line 291, ../sass/_adminlte.scss */
/* line 296, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header { body.skin-black .content-wrapper .content-header {
background-color: #F5F5F5; background-color: #F5F5F5;
padding-bottom: 15px; padding-bottom: 15px;
border-bottom: solid 1px #e0e0e0; border-bottom: solid 1px #e0e0e0;
border-top: 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 { body.skin-black .content-wrapper .content-header .btn {
padding: 3px 6px; padding: 3px 6px;
font-size: 10px; font-size: 10px;
font-family: Arial; font-family: Arial;
text-transform: uppercase; text-transform: uppercase;
} }
/* line 304, ../sass/_adminlte.scss */
/* line 309, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .content-header h1 { body.skin-black .content-wrapper .content-header h1 {
font-family: 'myriadpro-light'; font-family: 'myriadpro-light';
font-size: 20px; font-size: 20px;
} }
/* line 310, ../sass/_adminlte.scss */
/* line 315, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-left { body.skin-black .content-wrapper .col-no-padding-left {
padding-left: 0px; padding-left: 0px;
} }
/* line 314, ../sass/_adminlte.scss */
/* line 319, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .col-no-padding-right { body.skin-black .content-wrapper .col-no-padding-right {
padding-right: 0px; padding-right: 0px;
} }
/* line 318, ../sass/_adminlte.scss */
/* line 323, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a { body.skin-black .content-wrapper a {
color: #e08e0b; color: #e08e0b;
} }
/* line 321, ../sass/_adminlte.scss */
/* line 326, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a.disable { body.skin-black .content-wrapper a.disable {
pointer-events: none; pointer-events: none;
cursor: default; cursor: default;
} }
/* line 327, ../sass/_adminlte.scss */
/* line 332, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .label { body.skin-black .content-wrapper .label {
padding-top: 4px; padding-top: 4px;
padding-bottom: 1px; padding-bottom: 1px;
} }
/* line 332, ../sass/_adminlte.scss */
/* line 337, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn { body.skin-black .content-wrapper .btn {
color: white; color: white;
} }
/* line 336, ../sass/_adminlte.scss */
/* line 341, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default { body.skin-black .content-wrapper .btn-default {
color: #333; color: #333;
background-color: white; background-color: white;
} }
/* line 341, ../sass/_adminlte.scss */
/* line 346, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary { body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12; background-color: #F39C12;
color: white; color: white;
border-color: #F39C12; border-color: #F39C12;
} }
/* line 348, ../sass/_adminlte.scss */
/* line 353, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge { body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px; margin-left: 4px;
background-color: #e0e0e0; background-color: #e0e0e0;
color: #444; color: #444;
} }
/* line 355, ../sass/_adminlte.scss */
/* line 360, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content { body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd; border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd; border-bottom: solid 1px #ddd;
padding: 30px 15px 15px 15px; padding: 30px 15px 15px 15px;
background-color: white; background-color: white;
} }
/* line 363, ../sass/_adminlte.scss */
/* line 368, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert { body.skin-black .content-wrapper .alert {
position: relative; position: relative;
} }
/* line 366, ../sass/_adminlte.scss */
/* line 371, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a { body.skin-black .content-wrapper .alert a {
color: white; color: white;
} }
/* line 369, ../sass/_adminlte.scss */
/* line 374, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn { body.skin-black .content-wrapper .alert a.btn {
color: #333; color: #333;
text-decoration: none; text-decoration: none;
} }
/* line 374, ../sass/_adminlte.scss */
/* line 379, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close { body.skin-black .content-wrapper .alert .close {
font-size: 30px; font-size: 30px;
position: absolute; position: absolute;
color: white; color: white;
opacity: 0.6; opacity: 0.6;
} }
/* line 383, ../sass/_adminlte.scss */
/* line 388, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover { body.skin-black .content-wrapper .alert .close:hover {
opacity: 1; opacity: 1;
} }
/* line 388, ../sass/_adminlte.scss */
/* line 393, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert.alert-dark { body.skin-black .content-wrapper .alert.alert-dark {
background-color: #ece4d8; background-color: #ece4d8;
color: black; color: black;
} }
/* line 395, ../sass/_adminlte.scss */
/* line 400, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box h3 { body.skin-black .content-wrapper .small-box h3 {
font-size: 28px; font-size: 28px;
font-family: 'Source Sans Pro',sans-serif; 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 { body.skin-black .content-wrapper .small-box .icon {
top: -2px; top: -2px;
} }
/* line 404, ../sass/_adminlte.scss */
/* line 409, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .small-box-footer { body.skin-black .content-wrapper .small-box .small-box-footer {
color: white; color: white;
padding-top: 6px; padding-top: 6px;
padding-bottom: 2px; padding-bottom: 2px;
} }
/* line 413, ../sass/_adminlte.scss */
/* line 418, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa { body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px; margin-right: 7px;
} }
/* line 416, ../sass/_adminlte.scss */
/* line 421, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a { body.skin-black .content-wrapper .callout a {
color: white; color: white;
} }
/* line 419, ../sass/_adminlte.scss */
/* line 424, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn { body.skin-black .content-wrapper .callout .btn {
color: #333; color: #333;
text-decoration: none; text-decoration: none;
} }
/* line 426, ../sass/_adminlte.scss */
/* line 431, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th { body.skin-black .content-wrapper .table th {
font-size: 13px; 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 { body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions {
width: 172px; width: 172px;
text-align: right; 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 { body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small {
font-size: 12px; 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 { 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; 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 { 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; 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 { 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; background-color: #F39C12;
border: solid 1px #F39C12; border: solid 1px #F39C12;
color: white; 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 { body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #F39C12; 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 { body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #c87f0a; color: #c87f0a;
} }
/* line 465, ../sass/_adminlte.scss */
/* line 470, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu { body.skin-black .content-wrapper .submenu {
margin-bottom: 25px; margin-bottom: 25px;
} }
/* line 469, ../sass/_adminlte.scss */
/* line 474, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions { body.skin-black .content-wrapper .form-actions {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
z-index: 10; z-index: 10;
border-top: solid 1px #e0e0e0; 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 { body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px; margin-left: 10px;
} }
/* line 487, ../sass/_adminlte.scss */
/* line 492, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons { body.skin-black .content-wrapper .form-buttons {
margin-top: 25px; margin-top: 25px;
text-align: right; text-align: right;
} }
/* line 494, ../sass/_adminlte.scss */
/* line 499, ../sass/_adminlte.scss */
body.skin-black .main-footer a { body.skin-black .main-footer a {
color: #F39C12; color: #F39C12;
} }
/* line 499, ../sass/_adminlte.scss */
/* line 504, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize { body.skin-black .gridview-pagesize {
float: right; float: right;
margin-bottom: 8px; margin-bottom: 8px;
} }
/* line 504, ../sass/_adminlte.scss */
/* line 509, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar { body.skin-black #yii-debug-toolbar {
bottom: 64px; bottom: 64px;
} }


/* line 509, ../sass/_adminlte.scss */
/* line 514, ../sass/_adminlte.scss */
body.login-page { body.login-page {
background: none; background: none;
background-color: white; background-color: white;
} }
/* line 513, ../sass/_adminlte.scss */
/* line 518, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo { body.login-page .login-box .login-logo {
text-align: center; text-align: center;
font-family: 'worksans_bold'; font-family: 'worksans_bold';
} }
/* line 517, ../sass/_adminlte.scss */
/* line 522, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img { body.login-page .login-box .login-logo img {
width: 150px; 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,
body.login-page .login-box .login-box-body input#loginform-email, 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 input#loginform-password,
body.login-page .login-box .login-box-body .btn-primary { body.login-page .login-box .login-box-body .btn-primary {
font-size: 14px; font-size: 14px;
} }
/* line 530, ../sass/_adminlte.scss */
/* line 535, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary { body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12; background-color: #F39C12;
border-color: #F39C12; border-color: #F39C12;
padding: 5px 10px; padding: 5px 10px;
margin-bottom: 15px; margin-bottom: 15px;
} }
/* line 536, ../sass/_adminlte.scss */
/* line 541, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active { body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a; background-color: #f4a62a;
border-color: #F39C12; border-color: #F39C12;
} }
/* line 542, ../sass/_adminlte.scss */
/* line 547, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a { body.login-page .login-box .login-box-body a {
color: #F39C12; color: #F39C12;
} }
/* line 544, ../sass/_adminlte.scss */
/* line 549, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover { body.login-page .login-box .login-box-body a:hover {
color: #f4a62a; color: #f4a62a;
} }
/* line 549, ../sass/_adminlte.scss */
/* line 554, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .checkbox label input { body.login-page .login-box .login-box-body .checkbox label input {
position: relative; position: relative;
top: 0px; top: 0px;

+ 5
- 0
backend/web/sass/_adminlte.scss View File

} }


.main-header { .main-header {

.dropdown-toggle::after {
display: none;
}

.logo { .logo {
background-color: white ; background-color: white ;
font-family: 'highvoltageregular'; font-family: 'highvoltageregular';

+ 2
- 2
domain/Order/Order/OrderManager.php View File

|| $force) { || $force) {


$this->changeOrderStatus($order, OrderStatus::ALIAS_DELETED, $user); $this->changeOrderStatus($order, OrderStatus::ALIAS_DELETED, $user);
$return = true;
} }
// cancel // cancel
elseif ($this->producerSolver->getConfig('option_behavior_cancel_order') == Producer::BEHAVIOR_DELETE_ORDER_STATUS) { elseif ($this->producerSolver->getConfig('option_behavior_cancel_order') == Producer::BEHAVIOR_DELETE_ORDER_STATUS) {
$this->changeOrderStatus($order, OrderStatus::ALIAS_CANCELED, $user); $this->changeOrderStatus($order, OrderStatus::ALIAS_CANCELED, $user);
$this->orderBuilder->update($order);
$return = true;
} }


if($return) { if($return) {

+ 39
- 2
domain/PointSale/SharedPointSale/SharedPointSale.php View File



class SharedPointSale extends ActiveRecordCommon class SharedPointSale extends ActiveRecordCommon
{ {
/* Yii */
public ?Producer $producerCurrent;


public const SCENARIO_CREATE = 'create';
public const SCENARIO_CONFIRM = 'confirm'; public const SCENARIO_CONFIRM = 'confirm';


public static function tableName() public static function tableName()
[['id_point_sale', 'id_producer_with_sharing', 'id_point_sale_with_sharing', 'status', [['id_point_sale', 'id_producer_with_sharing', 'id_point_sale_with_sharing', 'status',
'created_by', 'confirmed_by', 'declined_by'], 'integer'], 'created_by', 'confirmed_by', 'declined_by'], 'integer'],
[['created_at', 'confirmed_at', 'declined_at'], 'safe'], [['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', 'exist', 'targetClass' => PointSale::class, 'targetAttribute' => 'id'],
['id_point_sale_with_sharing', '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'], ['id_producer_with_sharing', 'exist', 'targetClass' => Producer::class, 'targetAttribute' => 'id'],
[['created_by', 'confirmed_by', 'declined_by'], 'exist', 'targetClass' => User::class, 'targetAttribute' => 'id'], [['created_by', 'confirmed_by', 'declined_by'], 'exist', 'targetClass' => User::class, 'targetAttribute' => 'id'],
]; ];
]; ];
} }


/* 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 public function getId(): ?int
{ {

+ 30
- 2
domain/PointSale/SharedPointSale/SharedPointSaleRepository.php View File



use domain\_\AbstractRepository; use domain\_\AbstractRepository;
use domain\PointSale\PointSale\PointSale; use domain\PointSale\PointSale\PointSale;
use domain\Producer\Producer\Producer;


class SharedPointSaleRepository extends AbstractRepository class SharedPointSaleRepository extends AbstractRepository
{ {
->find(); ->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() return $this->createQuery()
->filterByPointSale($pointSale) ->filterByPointSale($pointSale)
->filterByProducer($producer)
->filterIsConfirmed() ->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();
} }
} }

+ 9
- 2
domain/PointSale/SharedPointSale/SharedPointSaleRepositoryQuery.php View File

return $this; 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') $this->andWhere('id_point_sale = :id_point_sale OR id_point_sale_with_sharing = :id_point_sale')
->addParams(['id_point_sale' => $pointSale->id]); ->addParams(['id_point_sale' => $pointSale->id]);
return $this; 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() public function filterIsRequest()
{ {
$this->filterIsPointSaleWithSharingIsNull() $this->filterIsPointSaleWithSharingIsNull()
public function filterIsConfirmed() public function filterIsConfirmed()
{ {
$this->filterIsStatusOnline(); $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; return $this;
} }



+ 20
- 16
frontend/views/site/service.php View File

use yii\helpers\Html; use yii\helpers\Html;


$producerModule = $this->getProducerModule(); $producerModule = $this->getProducerModule();
$featureModule = $this->getFeatureModule();
$featureChecker = $this->getFeatureModule()->getChecker();


$this->setTitle('Fonctionnalités, services & tarifs'); $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."); $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.");
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="row"> <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>
<div class="row"> <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>
<div class="row"> <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>
<div class="row"> <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>
<div class="row"> <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>
<div class="row"> <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>
<div class="row"> <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> </div>
</div> </div>
<h3>Support</h3> <h3>Support</h3>
<p>Je suis disponible pour répondre rapidement à toutes vos questions par email <p>Je suis disponible pour répondre rapidement à toutes vos questions par email
ou par téléphone. 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 <br />J'assure également le support pour vos clients s'ils
rencontrent un problème dans l'utilisation du logiciel. rencontrent un problème dans l'utilisation du logiciel.
<?php endif; ?> <?php endif; ?>

+ 7
- 3
producer/controllers/OrderController.php View File

]; ];
} }


public function actionOrder(int $id = 0, $date = '')
public function actionOrder(int $id = 0, string $date = '', int $idPointSale = null)
{ {
$orderModule = $this->getOrderModule(); $orderModule = $this->getOrderModule();
$distributionModule = $this-> getDistributionModule(); $distributionModule = $this-> getDistributionModule();
); );
} }


$order = $orderModule->findOneOrderById($id);
if ($order && $orderModule->isOrderStateOpen($order)) {
$order = $orderModule->getRepository()->findOneOrderById($id);
if ($order && $orderModule->getRepository()->isOrderStateOpen($order)) {
$params['order'] = $order; $params['order'] = $order;
} }


$params['date'] = $date; $params['date'] = $date;
} }


if($idPointSale) {
$params['idPointSale'] = $idPointSale;
}

return $this->render('order', $params); return $this->render('order', $params);
} }



+ 3
- 1
producer/views/order/order.php View File

var appInitValues = { 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])]) ?>', 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 ?>', 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> </script>



Loading…
Cancel
Save