Kaynağa Gözat

Merge branch 'develop'

master
Guillaume Bourgeois 6 ay önce
ebeveyn
işleme
a231a161bf
52 değiştirilmiş dosya ile 874 ekleme ve 396 silme
  1. +11
    -0
      backend/controllers/BackendController.php
  2. +3
    -3
      backend/controllers/PointSaleController.php
  3. +6
    -4
      backend/controllers/ProductController.php
  4. +2
    -2
      backend/controllers/UserController.php
  5. +11
    -0
      backend/views/_include/form_actions.php
  6. +7
    -0
      backend/views/dashboard/index.php
  7. +1
    -1
      backend/views/distribution/index.php
  8. +6
    -0
      backend/views/layouts/header.php
  9. +4
    -4
      backend/views/point-sale/_form.php
  10. +17
    -6
      backend/views/producer/update.php
  11. +3
    -4
      backend/views/product/_form.php
  12. +4
    -7
      backend/views/user/_form.php
  13. +1
    -1
      backend/views/user/index.php
  14. +223
    -192
      backend/web/css/screen.css
  15. +14
    -0
      backend/web/sass/_adminlte.scss
  16. +17
    -10
      backend/web/sass/_responsive.scss
  17. +9
    -0
      backend/web/sass/dashboard/_index.scss
  18. +10
    -5
      backend/web/sass/distribution/_index.scss
  19. +1
    -1
      common/config/params.php
  20. +37
    -0
      common/versions/24.5.D.php
  21. +26
    -0
      console/migrations/m240513_092509_add_column_producer_option_newsletter_description.php
  22. +26
    -0
      console/migrations/m240513_094340_alter_column_producer_description.php
  23. +26
    -0
      console/migrations/m240514_074953_alter_column_ticket_message_message.php
  24. +30
    -0
      console/migrations/m240514_082906_add_columns_producer_leave_period.php
  25. +27
    -0
      console/migrations/m240514_130206_create_indexes_performance.php
  26. +1
    -0
      domain/Distribution/Distribution/DistributionSolver.php
  27. +12
    -7
      domain/Distribution/Distribution/Export/DistributionReportPdfGenerator.php
  28. +1
    -1
      domain/Order/Order/OrderBuilder.php
  29. +10
    -11
      domain/Order/Order/OrderRepository.php
  30. +11
    -3
      domain/Producer/Producer/Producer.php
  31. +6
    -9
      domain/Producer/Producer/ProducerModule.php
  32. +79
    -0
      domain/Producer/Producer/ProducerSeoGenerator.php
  33. +2
    -3
      frontend/views/site/about.php
  34. +2
    -2
      frontend/views/site/contact.php
  35. +1
    -2
      frontend/views/site/iamproducer.php
  36. +1
    -1
      frontend/views/site/index.php
  37. +1
    -2
      frontend/views/site/login.php
  38. +2
    -3
      frontend/views/site/producer.php
  39. +1
    -2
      frontend/views/site/service.php
  40. +1
    -2
      frontend/views/site/signup.php
  41. +21
    -1
      producer/controllers/OrderController.php
  42. +29
    -1
      producer/views/layouts/main.php
  43. +12
    -2
      producer/views/newsletter/index.php
  44. +2
    -0
      producer/views/order/order.php
  45. +4
    -0
      producer/views/site/contact.php
  46. +1
    -1
      producer/views/site/index.php
  47. +1
    -0
      producer/views/site/points-sale.php
  48. +1
    -0
      producer/views/site/products.php
  49. +113
    -102
      producer/web/css/screen.css
  50. +25
    -0
      producer/web/js/vuejs/order-order.js
  51. +6
    -0
      producer/web/sass/_layout.scss
  52. +6
    -1
      producer/web/sass/order/_order.scss

+ 11
- 0
backend/controllers/BackendController.php Dosyayı Görüntüle

@@ -81,6 +81,17 @@ class BackendController extends CommonController
{
return $this->redirect(['dashboard/index']);
}

public function redirectAfterSave(string $baseRoute, int $id)
{
$postParams = \Yii::$app->request->post();
if(isset($postParams['save-stay'])) {
return $this->redirect([$baseRoute.'/update', 'id' => $id]);
}
else {
return $this->redirect(['index']);
}
}
}

?>

+ 3
- 3
backend/controllers/PointSaleController.php Dosyayı Görüntüle

@@ -102,7 +102,8 @@ class PointSaleController extends BackendController
$this->initPaymentMethodsByCreditFunctioning($pointSale);
$distributionModule->addPointSaleIncomingDistributions($pointSale);

return $this->redirect(['index']);
$this->setFlash('success', 'Point de vente créé.');
return $this->redirectAfterSave('point-sale', $pointSale->id);
} else {
return $this->render('create', array_merge($this->initForm(), [
'model' => $pointSale,
@@ -132,8 +133,7 @@ class PointSaleController extends BackendController
$distributionModule->addPointSaleIncomingDistributions($model);

$this->setFlash('success', 'Point de vente modifié.');

return $this->redirect(['index']);
return $this->redirectAfterSave('point-sale', $model->id);
} else {
return $this->render('update', array_merge($this->initForm($id), [
'model' => $model,

+ 6
- 4
backend/controllers/ProductController.php Dosyayı Görüntüle

@@ -140,7 +140,7 @@ class ProductController extends BackendController

$this->setFlash('success', 'Produit <strong>' . Html::encode($model->name) . '</strong> ajouté');

return $this->redirect(['index']);
return $this->redirectAfterSave('product', $model->id);
}
}

@@ -182,13 +182,15 @@ class ProductController extends BackendController
}

$this->processAvailabilityPointsSale($model);
$productModule->getBuilder()->update($model);

if ($model->apply_distributions) {
$distributionModule->addProductIncomingDistributions($model);
}
$productModule->update($model);

$this->setFlash('success', 'Produit <strong>' . Html::encode($model->name) . '</strong> modifié');
return $this->redirect(['index']);

return $this->redirectAfterSave('product', $model->id);
}
}

@@ -359,7 +361,7 @@ class ProductController extends BackendController
$product->status = (int) $status;
$product->save();

$distributionModule->addProductIncomingDistributions($product);
$distributionModule->getBuilder()->addProductIncomingDistributions($product);

return ['success', 'id' => $id, 'status' => $status];
}

+ 2
- 2
backend/controllers/UserController.php Dosyayı Görüntüle

@@ -135,6 +135,7 @@ class UserController extends BackendController
$this->processLinkPointSale($userExist);
$this->processLinkUserGroup($userExist);
$this->setFlash('success', "L'utilisateur que vous souhaitez créer possède déjà un compte sur la plateforme. Il vient d'être lié à votre établissement.");
return $this->redirectAfterSave('user', $userExist->id);
} else {
if ($model->load(\Yii::$app->request->post()) && $model->validate() && YII_ENV != 'demo') {

@@ -159,14 +160,13 @@ class UserController extends BackendController

$this->setFlash('success', 'Utilisateur créé.');

return $this->refresh();
return $this->redirectAfterSave('user', $userCreate->id);
}
}

return $this->render('create', array_merge($this->initForm($model), [
'model' => $model,
]));

}

public function actionView($id)

+ 11
- 0
backend/views/_include/form_actions.php Dosyayı Görüntüle

@@ -0,0 +1,11 @@
<?php

use yii\helpers\Html;

?>

<div class="form-group form-actions">
<?= Html::a('Retour', ['index'], ['class' => 'btn btn-default']) ?>
<?= Html::submitButton($model->isNewRecord ? 'Créer' : 'Modifier', ['class' => 'btn btn-primary', 'name' => 'save']) ?>
<?= Html::submitButton($model->isNewRecord ? 'Créer et rester' : 'Modifier et rester', ['class' => 'btn btn-primary', 'name' => 'save-stay']) ?>
</div>

+ 7
- 0
backend/views/dashboard/index.php Dosyayı Görüntüle

@@ -261,7 +261,14 @@ $this->setTitle('Tableau de bord');
</div>
</td>
<td>
<?php if($order->user): ?>
<a href="<?= Yii::$app->urlManager->createUrl(['user/view', 'id' => $order->user->id]) ?>" target="_blank">
<?php else: ?>
<span class="user-without-account">
<?php endif; ?>
<?= $orderModule->getOrderUsername($order); ?><br />
<?php if($order->user): ?></a><?php else: ?></span><?php endif; ?>

<?php if(strlen($order->comment)): ?>
<div class="comment"><span class="glyphicon glyphicon-comment"></span> <?= nl2br(Html::encode($order->comment)) ; ?></div>
<?php endif; ?>

+ 1
- 1
backend/views/distribution/index.php Dosyayı Görüntüle

@@ -397,7 +397,7 @@ $this->setPageTitle('Distributions') ;
<a class="btn btn-default btn-sm" :href="baseUrl+'/user/orders?id='+order.id_user" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="Voir les commandes"><span class="glyphicon glyphicon-eye-open"></span></a>
</span>-->
</a>
<span v-else class="no-user">{{ order.username }}</span>
<span v-else class="user-without-account">{{ order.username }}</span>
<span v-if="order.comment && order.comment.length > 0" class="glyphicon glyphicon-comment"></span>
<span v-if="order.delivery_home && order.delivery_address && order.delivery_address.length > 0" class="glyphicon glyphicon-home"></span>
</td>

+ 6
- 0
backend/views/layouts/header.php Dosyayı Görüntüle

@@ -81,7 +81,13 @@ $userCurrent = GlobalParam::getCurrentUser();
</span>
<?php endif; ?>
<div class="title">
<?php if($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?>
<a href="<?= Yii::$app->urlManager->createUrl(['producer-admin/update', 'id' => $producer->id]) ?>">
<?php endif; ?>
<?= Html::encode($producer->name) ?>
<?php if($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?>
</a>
<?php endif; ?>
<?php if ($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?>
<span class="producer-id">#<?= $producer->id ?></span>
<?php endif; ?>

+ 4
- 4
backend/views/point-sale/_form.php Dosyayı Görüntüle

@@ -315,9 +315,9 @@ $featureChecker = FeatureModule::getInstance()->getChecker();
</div>
<div class="clr"></div>

<div class="form-group form-actions">
<?= Html::a('Retour', ['point-sale/index'], ['class' => 'btn btn-default']) ?>
<?= Html::submitButton($model->isNewRecord ? 'Créer' : 'Modifier', ['class' => 'btn btn-primary']) ?>
</div>
<?= $this->render('@backend/views/_include/form_actions.php',[
'model' => $model,
]); ?>
<?php ActiveForm::end(); ?>
</div>

+ 17
- 6
backend/views/producer/update.php Dosyayı Görüntüle

@@ -141,6 +141,23 @@ $this->addBreadcrumb($this->getTitle());
]); ?>
<?= $form->field($model, 'option_point_sale_wording') ?>

<h4>Congés</h4>
<?= $form->field($model, 'option_leave_period_start')->textInput([
'class' => 'datepicker form-control'
]); ?>
<?= $form->field($model, 'option_leave_period_end')->textInput([
'class' => 'datepicker form-control'
]); ?>
<?= $form->field($model, 'option_leave_period_message_display')
->dropDownList(Dropdown::noYesChoices()); ?>
<?= $form->field($model, 'option_leave_period_message_title')->textInput(); ?>
<?= $form->field($model, 'option_leave_period_message')->textarea(); ?>

<h4>Communication</h4>
<?= $form->field($model, 'option_newsletter_description')
->hint('Description affichée sur la page "Infolettre" de la boutique')
->textarea(); ?>

<h4>Groupes utilisateurs</h4>
<?= $form->field($model, 'id_user_group_default')
->dropDownList($userGroupModule->getRepository()->populateUserGroupDropdownList()); ?>
@@ -277,12 +294,6 @@ $this->addBreadcrumb($this->getTitle());
->dropDownList(Dropdown::noYesChoices()); ?>

<h4>Divers</h4>
<?= $form->field($model, 'option_leave_period_start')->textInput([
'class' => 'datepicker form-control'
]); ?>
<?= $form->field($model, 'option_leave_period_end')->textInput([
'class' => 'datepicker form-control'
]); ?>
<?php
$choicesWeeksDistributionsActivatedInAdvanceArray = [null => '--'];
for ($i = 1; $i < 13; $i++) {

+ 3
- 4
backend/views/product/_form.php Dosyayı Görüntüle

@@ -223,10 +223,9 @@ $taxRateModule = $this->getTaxRateModule();

<?= $form->field($model, 'id_producer')->hiddenInput()->label('') ?>

<div class="form-group form-actions">
<?= Html::a('Retour', ['product/index'], ['class' => 'btn btn-default']) ?>
<?= Html::submitButton($model->isNewRecord ? 'Créer' : 'Modifier', ['class' => 'btn btn-primary']) ?>
</div>
<?= $this->render('@backend/views/_include/form_actions.php',[
'model' => $model,
]); ?>

<?php ActiveForm::end(); ?>


+ 4
- 7
backend/views/user/_form.php Dosyayı Görüntüle

@@ -150,12 +150,9 @@ $distributionModule = DistributionModule::getInstance();
<?php /* $form->field($model, 'product_price_percent')
->dropDownList( ProductPrice::percentValues(), [])->hint('Pourcentage appliqué aux prix de chaque produit pour cet utilisateur.');*/ ?>

<div class="form-group form-actions">
<?= Html::a('Retour', ['user/index'], ['class' => 'btn btn-default']) ?>
<?= Html::submitButton($model->isNewRecord ? 'Créer' : 'Modifier', ['class' => 'btn btn-primary']) ?>
</div>


<?= $this->render('@backend/views/_include/form_actions.php',[
'model' => $model,
]); ?>
</div>

<div class="col-md-4">
@@ -213,7 +210,7 @@ $distributionModule = DistributionModule::getInstance();

<?php if (
$distributionModule->getExportManager()->isEnabled(ExportManager::SHOPPING_CART_LABELS_PDF)
|| $producerModule->getSolver()->getConfig('option_export_evoliz')): ?>
|| $producerModule->getSolver()->getConfig('option_export_evoliz')): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">

+ 1
- 1
backend/views/user/index.php Dosyayı Görüntüle

@@ -161,7 +161,7 @@ $this->render('_menu_filter', [
],
[
'attribute' => 'newsletter',
'header' => "Inscrit au bulletin<br/>d'information",
'header' => "Infolettre",
'format' => 'raw',
'headerOptions' => ['class' => 'column-hide-on-mobile'],
'filterOptions' => ['class' => 'column-hide-on-mobile'],

+ 223
- 192
backend/web/css/screen.css
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 14
- 0
backend/web/sass/_adminlte.scss Dosyayı Görüntüle

@@ -6,6 +6,12 @@ body.skin-black {
white-space: pre-wrap;
}

// Utilisateurs
.user-without-account {
color: gray;
font-style: italic;
}

.main-header {
.logo {
background-color: white ;
@@ -80,6 +86,14 @@ body.skin-black {
top: 2px;
text-transform: uppercase;

a {
color: #333;

&:hover {
text-decoration: underline;
}
}

.producer-id {
color: gray;
font-size: 13px;

+ 17
- 10
backend/web/sass/_responsive.scss Dosyayı Görüntüle

@@ -37,22 +37,29 @@ termes.

@media screen and (max-width: 768px) {

.wrapper .main-header {
.wrapper {

.logo {
color: #333 !important;
.main-sidebar {
padding-top: 53px;
}

.navbar {
border-top: solid 1px #e0e0e0;
border-bottom: solid 1px #e0e0e0;

.producer-panel {
.main-header {
.logo {
color: #333 !important;
display: none;
}

a {
padding: 14px 10px;
.navbar {
border-top: solid 1px #e0e0e0;
border-bottom: solid 1px #e0e0e0;

.producer-panel {
display: none;
}

a {
padding: 14px 10px;
}
}
}
}

+ 9
- 0
backend/web/sass/dashboard/_index.scss Dosyayı Görüntüle

@@ -32,4 +32,13 @@
}
}
}

#last-orders {
a {
color: #333;
&:hover {
text-decoration: underline;
}
}
}
}

+ 10
- 5
backend/web/sass/distribution/_index.scss Dosyayı Görüntüle

@@ -81,6 +81,16 @@ termes.
text-transform: uppercase;
font-family: 'capsuularegular';
}

.vc-day.is-not-in-month .vc-day-content {
opacity: 0.6 !important;
pointer-events: auto !important;
}

.vc-day.is-not-in-month .vc-highlights,
.vc-day.is-not-in-month .vc-highlights * {
opacity: 1 !important;
}
}

#products {
@@ -277,11 +287,6 @@ termes.
right: 1px;
}

.no-user {
color: gray;
font-style: italic;
}

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

+ 1
- 1
common/config/params.php Dosyayı Görüntüle

@@ -37,7 +37,7 @@
*/

return [
'version' => '24.5.C',
'version' => '24.5.D',
'maintenanceMode' => false,
'siteName' => 'Souke',
'tinyMcePlugins' => 'preview searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link lists wordcount help',

+ 37
- 0
common/versions/24.5.D.php Dosyayı Görüntüle

@@ -0,0 +1,37 @@
<?php

require_once dirname(__FILE__).'/_macros.php';

version(
'20/05/2024',
[
[
"[Administration] Version mobile : suppression logo Souke",
"[Administration] Tableau de bord > Commandes à venir : ajout liens utilisateurs",
"[Administration] Tickets : possibilité de mettre des émojis dans les messages",
"[Administration] Distributions > calendrier : affichage des jours des mois d'avant et d'après le mois courant",
"[Administration] Export commandes PDF : ajout du nombre de commandes pour chaque point de vente",
"[Administration] Formulaires : boutons 'Sauvegarder et rester'",
"[Boutique] Mise en avant des congés sur la page d'accueil et sur le calendrier des commandes (Paramètres > Général > Congés)",
"[Boutique] Mes commandes : suppression mention 'Non réglé'",
"[Boutique] Accueil > Présentation : ajout d'émojis possible via 'Paramètres > Général > Description'",
"[Boutique] Infolettre : ajout texte d'information configurable dans 'Paramètres > Général > Description infolettre'",
"[Site & boutique] Référencement : mise en place de meta descriptions pour les moteurs de recherche",
],
[
"[Administration] Produits : correctif mise à jour dans les distributions futures (actif/non actif, quantités maximum)",
"[Administration] Commandes : correctif cagnotte débitée lors d'un changement de point de vente où la cagnotte n'est pas activée",
"[Boutique] Commander : optimisation chargements"
]
],
[
[
"[Administration] Header : ajout lien de modification du producteur courant",
],
[
]
],
$userCurrent
);

?>

+ 26
- 0
console/migrations/m240513_092509_add_column_producer_option_newsletter_description.php Dosyayı Görüntüle

@@ -0,0 +1,26 @@
<?php

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

/**
* Class m240513_092509_add_column_producer_option_newsletter_description
*/
class m240513_092509_add_column_producer_option_newsletter_description extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('producer', 'option_newsletter_description', Schema::TYPE_TEXT);
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('producer', 'option_newsletter_description');
}
}

+ 26
- 0
console/migrations/m240513_094340_alter_column_producer_description.php Dosyayı Görüntüle

@@ -0,0 +1,26 @@
<?php

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

/**
* Class m240513_094340_alter_column_producer_description
*/
class m240513_094340_alter_column_producer_description extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->alterColumn('producer', 'description', 'blob');
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->alterColumn('producer', 'description', Schema::TYPE_TEXT);
}
}

+ 26
- 0
console/migrations/m240514_074953_alter_column_ticket_message_message.php Dosyayı Görüntüle

@@ -0,0 +1,26 @@
<?php

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

/**
* Class m240514_074953_alter_column_ticket_message_message
*/
class m240514_074953_alter_column_ticket_message_message extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->alterColumn('ticket_message', 'message', 'blob');
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->alterColumn('ticket_message', 'message', Schema::TYPE_TEXT);
}
}

+ 30
- 0
console/migrations/m240514_082906_add_columns_producer_leave_period.php Dosyayı Görüntüle

@@ -0,0 +1,30 @@
<?php

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

/**
* Class m240514_082906_add_columns_producer_leave_period
*/
class m240514_082906_add_columns_producer_leave_period extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('producer', 'option_leave_period_message_display', Schema::TYPE_BOOLEAN);
$this->addColumn('producer', 'option_leave_period_message_title', Schema::TYPE_STRING);
$this->addColumn('producer', 'option_leave_period_message', Schema::TYPE_TEXT);
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('producer', 'option_leave_period_message_display');
$this->dropColumn('producer', 'option_leave_period_message_title');
$this->dropColumn('producer', 'option_leave_period_message');
}
}

+ 27
- 0
console/migrations/m240514_130206_create_indexes_performance.php Dosyayı Görüntüle

@@ -0,0 +1,27 @@
<?php

use yii\db\Migration;

/**
* Class m240514_130206_create_indexes_performance
*/
class m240514_130206_create_indexes_performance extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createIndex('id_point_sale', 'point_sale_distribution', 'id_point_sale');
$this->createIndex('id_distribution', 'point_sale_distribution', 'id_distribution');
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropIndex('id_point_sale', 'point_sale_distribution');
$this->dropIndex('id_distribution', 'point_sale_distribution');
}
}

+ 1
- 0
domain/Distribution/Distribution/DistributionSolver.php Dosyayı Görüntüle

@@ -3,6 +3,7 @@
namespace domain\Distribution\Distribution;

use domain\PointSale\PointSale\PointSale;
use domain\Producer\Producer\ProducerSolver;
use domain\Product\Product\Product;
use domain\_\AbstractService;
use domain\_\SolverInterface;

+ 12
- 7
domain/Distribution/Distribution/Export/DistributionReportPdfGenerator.php Dosyayı Görüntüle

@@ -126,7 +126,7 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri
',
'methods' => [
'SetHeader' => ['Commandes du ' . date('d/m/Y', strtotime($distribution->date))],
'SetFooter' => ['Généré le {DATE j/m/Y à H:i} / Page {PAGENO}/{nbpg}'],
'SetFooter' => ['Généré le {DATE j/m/Y à H:i} - Page {PAGENO}/{nbpg}'],
]
]);

@@ -145,9 +145,10 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri
$producer = $this->getProducerContext();
$html = '' ;
foreach ($pointsSaleArray as $pointSale) {
if (count($pointSale->orders)) {
$countOrders = count($pointSale->orders);
if ($countOrders) {

$html .= '<h3>'.$pointSale->name.'</h3>' ;
$html .= '<h3>'.$pointSale->name.' ('.$countOrders.')</h3>' ;
$columnDeliveryNote = ($producer->option_export_display_column_delivery_note) ? '<th>BL</th>' : '';
$colCredit = ($pointSale->payment_method_credit) ? '<th>Cagnotte</th>' : '' ;

@@ -339,11 +340,14 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri
. '<tbody>';

$revenues = 0 ;
$countOrdersTotal = 0;
foreach ($pointsSaleArray as $pointSale)
{
if (count($pointSale->orders))
{
$html .= '<tr><td>'.$pointSale->name.'</td><td>' ;
$countOrders = count($pointSale->orders);
if ($countOrders) {
$html .= '<tr><td>'
. $pointSale->name .' ('.$countOrders.')'
.'</td><td>' ;

$cpt = 0 ;
foreach ($productsArray as $product) {
@@ -363,11 +367,12 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri

$html .= '</td><td>'.Price::format($pointSale->revenues_with_tax, 2).'</td></tr>' ;
$revenues += $pointSale->revenues_with_tax ;
$countOrdersTotal += $countOrders;
}
}

// total
$html .= '<tr><td><strong>Total</strong></td><td>' ;
$html .= '<tr><td><strong>Total ('.$countOrdersTotal.')</strong></td><td>' ;

$cpt = 0 ;
foreach ($productsArray as $product) {

+ 1
- 1
domain/Order/Order/OrderBuilder.php Dosyayı Görüntüle

@@ -125,7 +125,7 @@ class OrderBuilder extends AbstractBuilder
$order,
$productSubscription->product,
$productSubscription->quantity,
$this->productSolver->getPrice($productSubscription->product, [
(float) $this->productSolver->getPrice($productSubscription->product, [
'user' => $user,
'point_sale' => $subscription->pointSale,
'quantity' => $productSubscription->quantity

+ 10
- 11
domain/Order/Order/OrderRepository.php Dosyayı Görüntüle

@@ -353,20 +353,19 @@ class OrderRepository extends AbstractRepository

public function isCreditAutoPayment(Order $order, bool $debitCreditOnFunctioningOptional = false)
{
if($order->subscription) {
if($order->subscription->auto_payment == Subscription::AUTO_PAYMENT_YES) {
return true;
}
$pointSale = $order->pointSale;
if($pointSale) {
if($order->subscription && $pointSale->payment_method_credit) {
if($order->subscription->auto_payment == Subscription::AUTO_PAYMENT_YES) {
return true;
}

if($order->subscription->auto_payment == Subscription::AUTO_PAYMENT_NO) {
return false;
if($order->subscription->auto_payment == Subscription::AUTO_PAYMENT_NO) {
return false;
}
}
}

$pointSale = $order->pointSale;
if($pointSale) {
$creditFunctioning = $this->producerRepository->getPointSaleCreditFunctioning($pointSale);

if ($order->id_user && $this->producerSolver->getConfig('credit') && $pointSale->payment_method_credit) {
if($order->mean_payment == MeanPayment::CREDIT || $creditFunctioning == Producer::CREDIT_FUNCTIONING_MANDATORY) {
return true;
@@ -592,7 +591,7 @@ class OrderRepository extends AbstractRepository
$label = 'Gratuit';
}
else {
$label = 'Non réglé';
$label = ($context == 'admin') ? 'Non réglé' : '';
}
}
else {

+ 11
- 3
domain/Producer/Producer/Producer.php Dosyayı Görüntüle

@@ -256,7 +256,10 @@ class Producer extends ActiveRecordCommon
'tiller_refresh_token',
'tiller_redirect_uri',
'tiller_store_id',
'option_main_color'
'option_main_color',
'option_newsletter_description',
'option_leave_period_message_title',
'option_leave_period_message'
],
'string'
],
@@ -299,7 +302,8 @@ class Producer extends ActiveRecordCommon
'option_check_by_default_prevent_user_credit',
'delivery_note_automatic_validation',
'is_new',
'agree_contact_about_software_development'
'agree_contact_about_software_development',
'option_leave_period_message_display'
],
'boolean'
],
@@ -531,7 +535,11 @@ class Producer extends ActiveRecordCommon
'tiller_store_id' => 'Tiller : store ID',
'is_new' => 'Nouveau',
'agree_contact_about_software_development' => "J'accepte d'être contacté dans le cadre de l'amélioration du logiciel",
'option_main_color' => 'Couleur principale'
'option_main_color' => 'Couleur principale',
'option_newsletter_description' => 'Description infolettre',
'option_leave_period_message_display' => 'Afficher le message des congés',
'option_leave_period_message_title' => 'Titre du message des congés',
'option_leave_period_message' => 'Message des congés',
];
}


+ 6
- 9
domain/Producer/Producer/ProducerModule.php Dosyayı Görüntüle

@@ -4,15 +4,6 @@ namespace domain\Producer\Producer;

use domain\_\AbstractModule;

/**
* @mixin ProducerDefinition
* @mixin ProducerSolver
* @mixin ProducerRepository
* @mixin ProducerBuilder
* @mixin ProducerManager
* @mixin ProducerPageSizer
* @mixin DolibarrProducerUtils
*/
class ProducerModule extends AbstractModule
{
public function getServices(): array
@@ -25,6 +16,7 @@ class ProducerModule extends AbstractModule
ProducerManager::class,
ProducerPageSizer::class,
DolibarrProducerUtils::class,
ProducerSeoGenerator::class,
];
}

@@ -67,4 +59,9 @@ class ProducerModule extends AbstractModule
{
return DolibarrProducerUtils::getInstance();
}

public function getSeoGenerator(): ProducerSeoGenerator
{
return ProducerSeoGenerator::getInstance();
}
}

+ 79
- 0
domain/Producer/Producer/ProducerSeoGenerator.php Dosyayı Görüntüle

@@ -0,0 +1,79 @@
<?php

namespace domain\Producer\Producer;

use domain\_\AbstractGenerator;
use domain\PointSale\PointSale\PointSaleRepository;
use domain\Product\Product\ProductRepository;
use yii\helpers\Html;

class ProducerSeoGenerator extends AbstractGenerator
{
protected ProductRepository $productRepository;
protected PointSaleRepository $pointSaleRepository;

public function loadDependencies(): void
{
$this->productRepository = $this->loadService(ProductRepository::class);
$this->pointSaleRepository = $this->loadService(PointSaleRepository::class);
}

public function generateMetaDescriptionHome()
{
$producer = $this->getProducerContext();

if($producer->description) {
$metaDescription = substr(strip_tags($producer->description), 0, 200);
}
else {
$metaDescription = "Bienvenue sur la boutique du producteur ".Html::encode($producer->name);
}

return $metaDescription;
}

public function generateMetaDescriptionProducts()
{
$metaDescription = '';
$productsArray = $this->productRepository->findProducts();

foreach($productsArray as $product) {
$metaDescription .= Html::encode($product->name).', ';
}

if(strlen($metaDescription)) {
$metaDescription = substr($metaDescription, 0, strlen($metaDescription) - 2);
}

return $metaDescription;
}

public function generateMetaDescriptionPointsSale()
{
$metaDescription = '';
$pointsSaleArray = $this->pointSaleRepository->findPointSales();

foreach($pointsSaleArray as $pointSale) {
$metaDescription .= Html::encode($pointSale->name).', ';
}

if(strlen($metaDescription)) {
$metaDescription = substr($metaDescription, 0, strlen($metaDescription) - 2);
}

return $metaDescription;
}

public function generateMetaDescriptionOrder()
{
$producer = $this->getProducerContext();
return "Passez commande chez ".Html::encode($producer->name)." à la date et au lieu de votre choix.";
}

public function generateMetaDescriptionContact()
{
$producer = $this->getProducerContext();
return 'Contactez ce producteur en utilisant le formulaire de contact. '
.Html::encode($producer->name.', '.$producer->address.' '.$producer->postcode.' '.$producer->city);
}
}

+ 2
- 3
frontend/views/site/about.php Dosyayı Görüntüle

@@ -40,9 +40,8 @@ use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;

$this->setTitle('Souke, un outil pour organiser des ventes en circuit court');
$this->setIcon('info-sign');
//$this->setMeta('description', 'À propos') ;
$this->setTitle("Un outil pour organiser des ventes en circuit court");
$this->setMeta('description', "Souke est un logiciel en ligne permettant aux producteurs locaux d’organiser facilement et en toute autonomie la distribution de leur production en circuit court.") ;

?>
<div class="site-about">

+ 2
- 2
frontend/views/site/contact.php Dosyayı Görüntüle

@@ -43,8 +43,8 @@ use yii\captcha\Captcha;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */

$this->setTitle('Contacter le développeur de la plateforme');
$this->setMeta('description', 'Pour toute demande d\'information, nous vous proposons d\'utiliser ce formulaire de contact.') ;
$this->setTitle('Contact');
$this->setMeta('description', "Utilisez ce formulaire de contact pour contacter le développeur du logiciel.") ;

$this->params['breadcrumbs'][] = $this->title;
?>

+ 1
- 2
frontend/views/site/iamproducer.php Dosyayı Görüntüle

@@ -36,9 +36,8 @@
* termes.
*/

//$this->setTitle("M'organiser dans mon activité de producteur");
$this->setTitle("Utiliser Souke comme logiciel de gestion");
//$this->setMeta('description', '');
$this->setMeta('description', "Vous êtes producteur et souhaitez améliorer votre organisation ? Avez Souke, profitez d'un logiciel complet pour gérer la distribution de votre production en circuit court.");

$producerModule = $this->getProducerModule();


+ 1
- 1
frontend/views/site/index.php Dosyayı Görüntüle

@@ -44,7 +44,7 @@ $userProducerModule = UserProducerModule::getInstance();
$userCurrent = GlobalParam::getCurrentUser();

$this->setTitle('Passez commande auprès de producteurs locaux') ;
$this->setMeta('description', 'Passez commande auprès de producteurs locaux') ;
$this->setMeta('description', 'Trouvez des producteurs proches de chez vous et passez commande pour un jour et un lieu donné.') ;

?>


+ 1
- 2
frontend/views/site/login.php Dosyayı Görüntüle

@@ -40,8 +40,7 @@ use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->setTitle('Connexion') ;
$this->setIcon('log-in');
$this->setMeta('description', 'Connectez-vous afin d\'accéder à votre compte.') ;
$this->setMeta('description', 'Connectez-vous pour accéder à votre compte.') ;

$this->params['breadcrumbs'][] = $this->title;
?>

+ 2
- 3
frontend/views/site/producer.php Dosyayı Görüntüle

@@ -42,9 +42,8 @@ use yii\helpers\Html;

$producerModule = ProducerModule::getInstance();

$this->setTitle('Identification nécessaire') ;
$this->setIcon('log-in');
$this->setMeta('description', 'Veuillez vous connecter pour réserver les produits de ce producteur.') ;
$this->setTitle('Connexion nécessaire - '.Html::encode($producer->name)) ;
$this->setMeta('description', 'Connectez-vous pour passer commande auprès du producteur '.Html::encode($producer->name));

?>


+ 1
- 2
frontend/views/site/service.php Dosyayı Görüntüle

@@ -40,8 +40,7 @@ use yii\helpers\Html;
$producerModule = $this->getProducerModule();

$this->setTitle('Fonctionnalités, services & tarifs');
$this->setIcon('console');
//$this->setMeta('description', '');
$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 class="site-service">

+ 1
- 2
frontend/views/site/signup.php Dosyayı Görüntüle

@@ -42,8 +42,7 @@ use yii\helpers\ArrayHelper;
use yii\helpers\Html;

$this->setTitle('Inscription') ;
$this->setIcon('user');
$this->setMeta('description', 'Inscrivez-vous afin de profiter des fonctionnalités de la plateforme.');
$this->setMeta('description', 'Inscrivez-vous en tant que client ou producteur afin de profiter des fonctionnalités du logiciel.');

$this->params['breadcrumbs'][] = $this->title;


+ 21
- 1
producer/controllers/OrderController.php Dosyayı Görüntüle

@@ -626,6 +626,7 @@ class OrderController extends ProducerBaseController
$json['orders'] = $this->ajaxInfosOrders($producer);
$json['user'] = $this->ajaxInfosUser($producer);
$json['points_sale'] = $this->ajaxInfosPointsSale($producer);
$json['leave_period'] = $this->ajaxInfosLeavePeriod($producer);

if ($dateObject && $dateObject->format($format) === $date) {
$distribution = $this-> getDistributionModule()->createDistributionIfNotExist($date);
@@ -645,6 +646,18 @@ class OrderController extends ProducerBaseController
return $json;
}

public function ajaxInfosLeavePeriod(Producer $producer)
{
if($this->getProducerModule()->getSolver()->hasLeavePeriodDefined($producer)) {
return [
'start' => $producer->option_leave_period_start,
'end' => $producer->option_leave_period_end,
];
}

return false;
}

public function ajaxInfosProducer(Producer $producer)
{
return [
@@ -676,7 +689,14 @@ class OrderController extends ProducerBaseController
'params' => [':date' => $dateMini],
'join_with' => ['pointSaleDistribution'],
]);
$distributionsArray = $distributionModule->filterDistributionsByDateDelay($distributionsArray);
$distributionsArray = $distributionModule->getSolver()->filterDistributionsByDateDelay($distributionsArray);

// Filtre par période de congé
foreach ($distributionsArray as $keyDistribution => $distribution) {
if($this->getProducerModule()->getSolver()->isOnLeavePeriod($this->getProducerCurrent(), new DateTime($distribution->date))) {
unset($distributionsArray[$keyDistribution]);
}
}

// Filtre par point de vente
if ($pointSaleCurrent && $producer->option_order_entry_point == Producer::ORDER_ENTRY_POINT_POINT_SALE) {

+ 29
- 1
producer/views/layouts/main.php Dosyayı Görüntüle

@@ -74,7 +74,13 @@ $mainColor = $producer->option_main_color ?: '#ee6f42' ;
<!DOCTYPE html>
<html lang="fr-FR">
<head>
<title><?= Html::encode($producer->name); ?> | <?= $this->getPageTitle(); ?></title>
<title>
<?php if($this->getControllerAction() == 'site/index'): ?>
<?= Html::encode($producer->name); ?> | <?= $this->getPageTitle(); ?>
<?php else: ?>
<?= $this->getPageTitle(); ?> | <?= Html::encode($producer->name); ?>
<?php endif; ?>
</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="base-url" content="<?= \Yii::$app->urlManager->baseUrl; ?>">
@@ -318,6 +324,28 @@ $mainColor = $producer->option_main_color ?: '#ee6f42' ;

<section id="content">

<?php
// Message congés
$leavePeriodMessageDisplay = $producerModule->getSolver()->getConfig('option_leave_period_message_display', $producer);
$leavePeriodMessageTitle = $producerModule->getSolver()->getConfig('option_leave_period_message_title', $producer);
$leavePeriodMessage = $producerModule->getSolver()->getConfig('option_leave_period_message', $producer);
if($leavePeriodMessageDisplay && ($leavePeriodMessageTitle || $leavePeriodMessage)): ?>
<div class="alert alert-warning alert-leave-period">
<?php if($leavePeriodMessageTitle): ?>
<h4 class="alert-heading<?php if(!$leavePeriodMessage): ?> without-message<?php endif; ?>">
<i class="bi bi-calendar-range"></i>
<?= $leavePeriodMessageTitle ?>
</h4>
<?php endif; ?>
<?php if($leavePeriodMessage): ?>
<p>
<?php if(!$leavePeriodMessageTitle): ?><i class="bi bi-calendar-range"></i><?php endif; ?>
<?= nl2br(Html::encode($leavePeriodMessage)) ?>
</p>
<?php endif; ?>
</div>
<?php endif; ?>

<?php if (strlen($this->getTitle())): ?>
<h2 id="page-title">
<?= $this->getTitle(); ?>

+ 12
- 2
producer/views/newsletter/index.php Dosyayı Görüntüle

@@ -40,7 +40,7 @@ use domain\User\User\UserModule;
use yii\helpers\Html;

$userModule = UserModule::getInstance();
$producer = $this->context->getProducerCurrent();
$this->setTitle("Infolettre");

if($userModule->isUserSubscribedNewsletter($user)) {
@@ -65,6 +65,16 @@ else {

?>
<div class="newsletter-index">

<div class="alert alert-dark">
<i class="bi bi-info"></i>
<?php if($producer->option_newsletter_description): ?>
<?= nl2br(Html::encode($producer->option_newsletter_description)); ?>
<?php else: ?>
L'infolettre vous permet de recevoir les emails de prise de commande et les actualités de ce producteur.
<?php endif; ?>
</div>

<?php if($userModule->isUserSubscribedNewsletter($user)): ?>
<div class="alert alert-success">
<i class="bi bi-megaphone"></i>
@@ -76,4 +86,4 @@ else {
Vous n'êtes pas inscrit à l'infolettre <strong><?= Html::encode($producer->name) ?></strong>.
</div>
<?php endif; ?>
</div>
</div>

+ 2
- 0
producer/views/order/order.php Dosyayı Görüntüle

@@ -51,6 +51,7 @@ $producerModule = ProducerModule::getInstance();
$producer = $this->context->getProducerCurrent();

$this->setTitle('Commander');
$this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDescriptionOrder());

?>

@@ -162,6 +163,7 @@ $this->setTitle('Commander');
<div id="legend">
<div><span id="distribution-date-color"></span> Prochains jours de distribution</div>
<div><span id="order-date-color"></span> Vos commandes déjà enregistrées</div>
<div><span id="leave-period-date-color"></span> Congés</div>
</div>
<div id="calendar">
<v-calendar

+ 4
- 0
producer/views/site/contact.php Dosyayı Görüntüle

@@ -36,11 +36,15 @@ pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/

use domain\Producer\Producer\ProducerModule;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;

$producerModule = ProducerModule::getInstance();

$this->setTitle('Contact');
$this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDescriptionContact());

?>
<div class="site-contact">

+ 1
- 1
producer/views/site/index.php Dosyayı Görüntüle

@@ -51,10 +51,10 @@ $productModule = ProductModule::getInstance();
$producerModule = ProducerModule::getInstance();
$distributionModule = DistributionModule::getInstance();
$pointSaleModule = PointSaleModule::getInstance();

$producer = $this->context->getProducerCurrent();

$this->setPageTitle(Html::encode($producer->type . ' à ' . $producer->city));
$this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDescriptionHome());

?>


+ 1
- 0
producer/views/site/points-sale.php Dosyayı Görüntüle

@@ -56,6 +56,7 @@ $producer = $this->context->getProducerCurrent();

$this->setTitle('Points de vente');
$this->setPageTitle('Points de vente');
$this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDescriptionPointsSale());

?>


+ 1
- 0
producer/views/site/products.php Dosyayı Görüntüle

@@ -56,6 +56,7 @@ $producer = $this->context->getProducerCurrent();

$this->setTitle('Produits');
$this->setPageTitle('Produits');
$this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDescriptionProducts());

?>


+ 113
- 102
producer/web/css/screen.css Dosyayı Görüntüle

@@ -180,13 +180,18 @@ ul.pagination li.prev a, ul.pagination li.next a {
display: none;
}

/* line 147, ../sass/_layout.scss */
/* line 148, ../sass/_layout.scss */
#main #content .alert-leave-period h4.alert-heading.without-message {
margin-bottom: 0px;
}

/* line 153, ../sass/_layout.scss */
#header {
text-align: center;
padding: 0px;
position: relative;
}
/* line 153, ../sass/_layout.scss */
/* line 159, ../sass/_layout.scss */
#header #logo {
position: absolute;
top: 90px;
@@ -201,7 +206,7 @@ ul.pagination li.prev a, ul.pagination li.next a {
text-align: center;
overflow: hidden;
}
/* line 165, ../sass/_layout.scss */
/* line 171, ../sass/_layout.scss */
#header #logo img {
position: absolute;
top: 50%;
@@ -210,55 +215,55 @@ ul.pagination li.prev a, ul.pagination li.next a {
max-width: 160px;
max-height: 160px;
}
/* line 175, ../sass/_layout.scss */
/* line 181, ../sass/_layout.scss */
#header.without-logo #title {
padding-left: 30px;
}
/* line 179, ../sass/_layout.scss */
/* line 185, ../sass/_layout.scss */
#header #title {
text-align: left;
padding-left: 246px;
padding-top: 20px;
padding-bottom: 20px;
}
/* line 185, ../sass/_layout.scss */
/* line 191, ../sass/_layout.scss */
#header #title h1 {
font-family: 'worksans_extrabold';
font-size: 2.2rem;
margin-bottom: 2px;
}
/* line 190, ../sass/_layout.scss */
/* line 196, ../sass/_layout.scss */
#header #title h1 a.producer-name {
text-decoration: none;
color: #ee6f42;
}
/* line 195, ../sass/_layout.scss */
/* line 201, ../sass/_layout.scss */
#header #title h1 .bookmark {
color: #b7ab9b;
font-size: 0.7em;
}
/* line 201, ../sass/_layout.scss */
/* line 207, ../sass/_layout.scss */
#header #title h2 {
font-family: 'worksans_regular';
text-transform: uppercase;
font-size: 1.1rem;
}
/* line 206, ../sass/_layout.scss */
/* line 212, ../sass/_layout.scss */
#header #title h2 .location {
text-transform: none;
font-family: 'worksans_bold';
}
/* line 210, ../sass/_layout.scss */
/* line 216, ../sass/_layout.scss */
#header #title h2 .location .bi {
position: relative;
left: 1px;
}
/* line 218, ../sass/_layout.scss */
/* line 224, ../sass/_layout.scss */
#header nav#main-nav {
background-color: #ece4d8;
margin-top: 0px;
}
/* line 224, ../sass/_layout.scss */
/* line 230, ../sass/_layout.scss */
#header nav#main-nav ul li a {
display: inline-block;
padding: 8px 12px;
@@ -269,11 +274,11 @@ ul.pagination li.prev a, ul.pagination li.next a {
-webkit-box-shadow: -20px 0px 20px 0px #ece4d8 inset;
box-shadow: -20px 0px 20px 0px #ece4d8 inset;
}
/* line 232, ../sass/_layout.scss */
/* line 238, ../sass/_layout.scss */
#header nav#main-nav ul li a .bi {
margin-right: 3px;
}
/* line 236, ../sass/_layout.scss */
/* line 242, ../sass/_layout.scss */
#header nav#main-nav ul li a span.label {
display: inline-block;
position: relative;
@@ -291,11 +296,11 @@ ul.pagination li.prev a, ul.pagination li.next a {
text-transform: uppercase;
border: solid 1px transparent;
}
/* line 252, ../sass/_layout.scss */
/* line 258, ../sass/_layout.scss */
#header nav#main-nav ul li a .hide-desktop {
display: none;
}
/* line 257, ../sass/_layout.scss */
/* line 263, ../sass/_layout.scss */
#header nav#main-nav ul li a.active,
#header nav#main-nav ul li a:hover {
color: white;
@@ -303,16 +308,16 @@ ul.pagination li.prev a, ul.pagination li.next a {
-webkit-box-shadow: none;
box-shadow: none;
}
/* line 262, ../sass/_layout.scss */
/* line 268, ../sass/_layout.scss */
#header nav#main-nav ul li a.active span.label-success,
#header nav#main-nav ul li a:hover span.label-success {
border: solid 1px white !important;
}
/* line 268, ../sass/_layout.scss */
/* line 274, ../sass/_layout.scss */
#header nav#main-nav ul.submenu {
background-color: white;
}
/* line 272, ../sass/_layout.scss */
/* line 278, ../sass/_layout.scss */
#header nav#main-nav ul.submenu li a {
background-color: white;
font-size: 0.9em;
@@ -321,34 +326,34 @@ ul.pagination li.prev a, ul.pagination li.next a {
box-shadow: none;
border-bottom: solid 2px #f4efe8;
}
/* line 278, ../sass/_layout.scss */
/* line 284, ../sass/_layout.scss */
#header nav#main-nav ul.submenu li a span.label {
background-color: white;
border: solid 1px #b7ab9b;
color: #b7ab9b;
}
/* line 285, ../sass/_layout.scss */
/* line 291, ../sass/_layout.scss */
#header nav#main-nav ul.submenu li a.active,
#header nav#main-nav ul.submenu li a:hover {
color: black;
background-color: white;
border-bottom: solid 2px #b7ab9b !important;
}
/* line 295, ../sass/_layout.scss */
/* line 301, ../sass/_layout.scss */
#header nav#main-nav #user {
color: #ee6f42;
float: right;
padding: 10px;
}

/* line 303, ../sass/_layout.scss */
/* line 309, ../sass/_layout.scss */
#main {
padding: 0px;
padding-top: 38px;
margin-bottom: 30px;
background-color: white;
}
/* line 309, ../sass/_layout.scss */
/* line 315, ../sass/_layout.scss */
#main #banner {
height: 180px;
overflow: hidden;
@@ -356,7 +361,7 @@ ul.pagination li.prev a, ul.pagination li.next a {
background-size: cover;
background-position: center;
}
/* line 317, ../sass/_layout.scss */
/* line 323, ../sass/_layout.scss */
#main #infos-producer {
display: none;
padding: 5px 10px;
@@ -366,116 +371,116 @@ ul.pagination li.prev a, ul.pagination li.next a {
border-bottom: solid 1px #e0e0e0;
color: gray;
}
/* line 326, ../sass/_layout.scss */
/* line 332, ../sass/_layout.scss */
#main #infos-producer strong {
font-weight: bold;
}
/* line 330, ../sass/_layout.scss */
/* line 336, ../sass/_layout.scss */
#main #infos-producer .favorite {
float: right;
color: gray;
}
/* line 333, ../sass/_layout.scss */
/* line 339, ../sass/_layout.scss */
#main #infos-producer .favorite a {
color: black;
}
/* line 339, ../sass/_layout.scss */
/* line 345, ../sass/_layout.scss */
#main h2#page-title {
margin-top: 0px;
font-family: "worksans_bold";
font-size: 30px;
line-height: 40px;
}
/* line 350, ../sass/_layout.scss */
/* line 356, ../sass/_layout.scss */
#main #content {
padding: 40px;
min-height: 300px;
}
/* line 354, ../sass/_layout.scss */
/* line 360, ../sass/_layout.scss */
#main #content h1, #main #content h2, #main #content h3, #main #content h4, #main #content h5, #main #content h6 {
font-family: "worksans_bold";
margin-bottom: 20px;
color: black;
}
/* line 359, ../sass/_layout.scss */
/* line 365, ../sass/_layout.scss */
#main #content h1.first, #main #content h2.first, #main #content h3.first, #main #content h4.first, #main #content h5.first, #main #content h6.first {
margin-top: 0px;
}
/* line 364, ../sass/_layout.scss */
/* line 370, ../sass/_layout.scss */
#main #content h1 {
font-size: 30px;
}
/* line 368, ../sass/_layout.scss */
/* line 374, ../sass/_layout.scss */
#main #content h2 {
font-size: 25px;
}
/* line 372, ../sass/_layout.scss */
/* line 378, ../sass/_layout.scss */
#main #content h3 {
font-size: 1.4em;
text-align: left;
margin-bottom: 30px;
}
/* line 377, ../sass/_layout.scss */
/* line 383, ../sass/_layout.scss */
#main #content h3 span {
padding-top: 14px;
color: black;
}
/* line 383, ../sass/_layout.scss */
/* line 389, ../sass/_layout.scss */
#main #content h4 {
font-size: 20px;
}
/* line 387, ../sass/_layout.scss */
/* line 393, ../sass/_layout.scss */
#main #content h5 {
font-size: 18px;
}
/* line 391, ../sass/_layout.scss */
/* line 397, ../sass/_layout.scss */
#main #content h6 {
font-size: 16px;
}
/* line 397, ../sass/_layout.scss */
/* line 403, ../sass/_layout.scss */
#main #content form .form-group .hint-block {
color: gray;
}

/* line 405, ../sass/_layout.scss */
/* line 411, ../sass/_layout.scss */
#footer-producer {
margin-bottom: 30px;
text-align: center;
width: 100%;
}
/* line 410, ../sass/_layout.scss */
/* line 416, ../sass/_layout.scss */
#footer-producer a {
color: #ee6f42;
}
/* line 412, ../sass/_layout.scss */
/* line 418, ../sass/_layout.scss */
#footer-producer a:active {
text-decoration: underline;
}

/* line 418, ../sass/_layout.scss */
/* line 424, ../sass/_layout.scss */
#footer {
display: none;
height: 100px;
float: right;
text-align: center;
}
/* line 424, ../sass/_layout.scss */
/* line 430, ../sass/_layout.scss */
#footer .content {
padding-top: 20px;
color: black;
}
/* line 428, ../sass/_layout.scss */
/* line 434, ../sass/_layout.scss */
#footer .content a {
color: black;
font-size: 18px;
padding-left: 10px;
padding-right: 10px;
}
/* line 434, ../sass/_layout.scss */
/* line 440, ../sass/_layout.scss */
#footer .content a:hover {
text-decoration: underline;
}
/* line 441, ../sass/_layout.scss */
/* line 447, ../sass/_layout.scss */
#footer #code-source img {
height: 20px;
}
@@ -1336,127 +1341,133 @@ termes.
}
/* line 136, ../sass/order/_order.scss */
.order-order #main #app-order-order #legend #order-date-color,
.order-order #main #app-order-order #legend #distribution-date-color {
.order-order #main #app-order-order #legend #distribution-date-color,
.order-order #main #app-order-order #legend #leave-period-date-color {
width: 13px;
height: 13px;
display: inline-block;
}
/* line 143, ../sass/order/_order.scss */
/* line 144, ../sass/order/_order.scss */
.order-order #main #app-order-order #legend #order-date-color {
background-color: #198754;
border: solid 2px #198754;
}
/* line 147, ../sass/order/_order.scss */
/* line 148, ../sass/order/_order.scss */
.order-order #main #app-order-order #legend #distribution-date-color {
background-color: white;
border: solid 2px #198754;
}
/* line 153, ../sass/order/_order.scss */
/* line 152, ../sass/order/_order.scss */
.order-order #main #app-order-order #legend #leave-period-date-color {
background-color: #E09F3E;
border: solid 2px #E09F3E;
}
/* line 158, ../sass/order/_order.scss */
.order-order #main #app-order-order #calendar {
margin-bottom: 15px;
}
/* line 155, ../sass/order/_order.scss */
/* line 160, ../sass/order/_order.scss */
.order-order #main #app-order-order #calendar .c-header .c-title-layout .c-title-popover .c-title-anchor .c-title[data-v-2083cb72] {
font-size: 2rem;
}
/* line 158, ../sass/order/_order.scss */
/* line 163, ../sass/order/_order.scss */
.order-order #main #app-order-order #calendar .c-day-background {
padding: 20px;
}
/* line 163, ../sass/order/_order.scss */
/* line 168, ../sass/order/_order.scss */
.order-order #main #app-order-order #calendar .c-day:hover .c-day-background {
background-color: #ee6f42 !important;
color: white !important;
}
/* line 169, ../sass/order/_order.scss */
/* line 174, ../sass/order/_order.scss */
.order-order #main #app-order-order #calendar .c-day-popover-content {
font-size: 1.3rem;
}
/* line 177, ../sass/order/_order.scss */
/* line 182, ../sass/order/_order.scss */
.order-order #main #app-order-order #credit-online-payment .panel .panel-heading .btn-default {
float: right;
position: relative;
top: -5px;
}
/* line 188, ../sass/order/_order.scss */
/* line 193, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-date #distributions-list .card {
margin-bottom: 20px;
}
/* line 191, ../sass/order/_order.scss */
/* line 196, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-date #distributions-list .card .btn-primary {
float: right;
}
/* line 195, ../sass/order/_order.scss */
/* line 200, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-date #distributions-list .card .date {
font-size: 1.2rem;
line-height: 1.4rem;
text-transform: uppercase;
font-family: 'worksans_semibold';
}
/* line 202, ../sass/order/_order.scss */
/* line 207, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-date #distributions-list .card .point-sales {
color: gray;
font-size: 14px;
margin-top: 8px;
}
/* line 211, ../sass/order/_order.scss */
/* line 216, ../sass/order/_order.scss */
.order-order #main #app-order-order .block-actions {
text-align: center;
margin-top: 40px;
}
/* line 218, ../sass/order/_order.scss */
/* line 223, ../sass/order/_order.scss */
.order-order #main #app-order-order table#points-sale td.name .the-name {
color: black;
font-size: 1.2em;
line-height: 1.4em;
font-family: 'worksans_semibold';
}
/* line 225, ../sass/order/_order.scss */
/* line 230, ../sass/order/_order.scss */
.order-order #main #app-order-order table#points-sale td.name .locality {
display: none;
}
/* line 229, ../sass/order/_order.scss */
/* line 234, ../sass/order/_order.scss */
.order-order #main #app-order-order table#points-sale td.name .comment,
.order-order #main #app-order-order table#points-sale td.name .minimum-order-amount {
color: gray;
}
/* line 233, ../sass/order/_order.scss */
/* line 238, ../sass/order/_order.scss */
.order-order #main #app-order-order table#points-sale td.name .comment a,
.order-order #main #app-order-order table#points-sale td.name .minimum-order-amount a {
color: #ee6f42;
}
/* line 239, ../sass/order/_order.scss */
/* line 244, ../sass/order/_order.scss */
.order-order #main #app-order-order table#points-sale td.actions {
width: 150px;
}
/* line 241, ../sass/order/_order.scss */
/* line 246, ../sass/order/_order.scss */
.order-order #main #app-order-order table#points-sale td.actions button {
width: 100%;
}
/* line 253, ../sass/order/_order.scss */
/* line 258, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products {
margin-bottom: 40px;
border-top: solid 1px #b7ab9b;
border-left: solid 1px #b7ab9b;
border-right: solid 1px #b7ab9b;
}
/* line 259, ../sass/order/_order.scss */
/* line 264, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products thead {
display: none;
}
/* line 263, ../sass/order/_order.scss */
/* line 268, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products td {
border-bottom: solid 1px #b7ab9b;
border-left: 0px none;
border-right: 0px none;
}
/* line 271, ../sass/order/_order.scss */
/* line 276, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products tr.category-closed:hover td.category-name,
.order-order #main #app-order-order table#products tr.category-open td.category-name {
padding-left: 30px;
background-color: #f4efe8;
}
/* line 278, ../sass/order/_order.scss */
/* line 283, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products td.category-name {
transition: all 0.1s linear;
background-color: #f4efe8;
@@ -1468,12 +1479,12 @@ termes.
padding-top: 13px;
padding-left: 20px;
}
/* line 289, ../sass/order/_order.scss */
/* line 294, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products td.category-name .bi-caret-down-fill,
.order-order #main #app-order-order table#products td.category-name .bi-caret-right-fill {
font-size: 15px;
}
/* line 294, ../sass/order/_order.scss */
/* line 299, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products td.category-name span.badge {
font-family: "worksans_bold";
text-transform: uppercase;
@@ -1482,21 +1493,21 @@ termes.
position: relative;
top: -3px;
}
/* line 302, ../sass/order/_order.scss */
/* line 307, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products td.category-name span.badge.bg-primary {
float: right;
top: 2px;
}
/* line 308, ../sass/order/_order.scss */
/* line 313, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products td.category-name:hover {
cursor: pointer;
background-color: white;
}
/* line 315, ../sass/order/_order.scss */
/* line 320, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products td.photo img {
width: 75px;
}
/* line 325, ../sass/order/_order.scss */
/* line 330, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .price-unit .decreasing-prices {
margin-top: 10px;
font-size: 10px;
@@ -1504,74 +1515,74 @@ termes.
padding-bottom: 2px;
margin-bottom: 0px;
}
/* line 333, ../sass/order/_order.scss */
/* line 338, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .price-unit .decreasing-prices ul li {
margin-bottom: 5px;
}
/* line 335, ../sass/order/_order.scss */
/* line 340, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .price-unit .decreasing-prices ul li strong {
font-weight: bold;
}
/* line 343, ../sass/order/_order.scss */
/* line 348, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .price-unit, .order-order #main #app-order-order table#products .price-total {
width: 135px;
text-align: center;
}
/* line 347, ../sass/order/_order.scss */
/* line 352, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .price-unit .price-infos, .order-order #main #app-order-order table#products .price-total .price-infos {
color: gray;
font-size: 13px;
line-height: 15px;
}
/* line 354, ../sass/order/_order.scss */
/* line 359, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products tr.product-open td.price-total {
font-size: 1.1rem;
font-family: 'worksans_bold';
padding-top: 19px;
}
/* line 360, ../sass/order/_order.scss */
/* line 365, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .td-quantity {
width: 175px;
}
/* line 363, ../sass/order/_order.scss */
/* line 368, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .td-quantity input.quantity,
.order-order #main #app-order-order table#products .td-quantity .input-group-text {
background-color: white;
}
/* line 368, ../sass/order/_order.scss */
/* line 373, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .td-quantity input.quantity {
text-align: center;
border: 0px none;
}
/* line 372, ../sass/order/_order.scss */
/* line 377, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .td-quantity .input-group-text {
border: 0px none;
padding-right: 10px;
padding-left: 0px;
margin: 0px;
}
/* line 380, ../sass/order/_order.scss */
/* line 385, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .td-quantity .input-group-btn button {
padding: 4px 5px 0px 5px;
}
/* line 382, ../sass/order/_order.scss */
/* line 387, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products .td-quantity .input-group-btn button .bi {
font-size: 1.5em;
font-weight: bold;
margin: 0px;
}
/* line 393, ../sass/order/_order.scss */
/* line 398, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products tr.total .summary {
padding: 25px;
}
/* line 396, ../sass/order/_order.scss */
/* line 401, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products tr.total .summary h3 {
font-family: 'worksans_bold';
margin-top: 0px;
text-transform: uppercase;
margin-bottom: 5px;
}
/* line 403, ../sass/order/_order.scss */
/* line 408, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products tr.total .summary ul {
margin-bottom: 15px;
padding-left: 20px;
@@ -1579,17 +1590,17 @@ termes.
line-height: 1.4rem;
list-style-type: disc;
}
/* line 411, ../sass/order/_order.scss */
/* line 416, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products tr.total .summary ul li .quantity {
font-weight: bold;
}
/* line 418, ../sass/order/_order.scss */
/* line 423, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products tr.total .price-total {
padding-top: 25px;
font-size: 1.5rem;
font-family: 'worksans_bold';
}
/* line 423, ../sass/order/_order.scss */
/* line 428, ../sass/order/_order.scss */
.order-order #main #app-order-order table#products tr.total .price-total span {
display: inline-block;
padding: 7px 15px;
@@ -1599,26 +1610,26 @@ termes.
color: white;
font-size: 1.2rem;
}
/* line 435, ../sass/order/_order.scss */
/* line 440, ../sass/order/_order.scss */
.order-order #main #app-order-order #payment-methods .infos {
margin-top: 10px;
color: gray;
}
/* line 442, ../sass/order/_order.scss */
/* line 447, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-payment .delivery {
margin-bottom: 20px;
}
/* line 446, ../sass/order/_order.scss */
/* line 451, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-payment .comment {
margin-bottom: 20px;
}
/* line 451, ../sass/order/_order.scss */
/* line 456, ../sass/order/_order.scss */
.order-order #main #app-order-order #content-step-payment .credit .info {
margin-left: 20px;
color: gray;
}

/* line 464, ../sass/order/_order.scss */
/* line 469, ../sass/order/_order.scss */
#main #content .panel h3 {
font-family: "worksans_bold";
margin: 0px;

+ 25
- 0
producer/web/js/vuejs/order-order.js Dosyayı Görüntüle

@@ -172,6 +172,31 @@ var app = new Vue({
}
}

if(response.data.leave_period) {
leavePeriodStartDateArray = response.data.leave_period.start.split('-');
leavePeriodEndDateArray = response.data.leave_period.end.split('-');

app.calendar.attrs.push({
highlight: {
style: {
background: '#E09F3E'
},
contentStyle: {
color: 'white'
}
},
dates: {
start: new Date(leavePeriodStartDateArray[0], leavePeriodStartDateArray[1] - 1, leavePeriodStartDateArray[2]),
end: new Date(leavePeriodEndDateArray[0], leavePeriodEndDateArray[1] - 1, leavePeriodEndDateArray[2])
},
popover: {
label: 'En congé',
hideIndicator: true,
isInteractive: true
},
});
}

if (response.data.distribution) {
app.distribution = response.data.distribution;
}

+ 6
- 0
producer/web/sass/_layout.scss Dosyayı Görüntüle

@@ -144,6 +144,12 @@ ul.pagination {
}
}

#main #content .alert-leave-period {
h4.alert-heading.without-message {
margin-bottom: 0px;
}
}

#header {
text-align: center ;
padding: 0px ;

+ 6
- 1
producer/web/sass/order/_order.scss Dosyayı Görüntüle

@@ -134,7 +134,8 @@
#legend {
#order-date-color,
#distribution-date-color {
#distribution-date-color,
#leave-period-date-color {
width: 13px ;
height: 13px ;
display: inline-block ;
@@ -148,6 +149,10 @@
background-color: white;
border: solid 2px #198754;
}
#leave-period-date-color {
background-color: #E09F3E;
border: solid 2px #E09F3E;
}
}
#calendar {

Yükleniyor…
İptal
Kaydet