Pārlūkot izejas kodu

Possibilité de configurer le libellé "Points de vente" de la page d'accueil de l'espace producteurs #923

feature/souke
Guillaume Bourgeois pirms 1 gada
vecāks
revīzija
06529bc381
5 mainītis faili ar 42 papildinājumiem un 3 dzēšanām
  1. +1
    -0
      backend/views/producer/update.php
  2. +13
    -1
      common/models/Producer.php
  3. +26
    -0
      console/migrations/m230320_080836_producer_add_option_point_sale_wording.php
  4. +1
    -1
      producer/views/order/order.php
  5. +1
    -1
      producer/views/site/index.php

+ 1
- 0
backend/views/producer/update.php Parādīt failu

@@ -123,6 +123,7 @@ $this->addBreadcrumb($this->getTitle());
Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK => 'Jours de la semaine',
Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS => 'Distributions à venir',
]); ?>
<?= $form->field($model, 'option_point_sale_wording') ?>
</div>
</div>


+ 13
- 1
common/models/Producer.php Parādīt failu

@@ -233,7 +233,8 @@ class Producer extends ActiveRecordCommon
'option_online_payment_type',
'option_tax_calculation_method',
'latest_version_opendistrib',
'option_csv_separator'
'option_csv_separator',
'option_point_sale_wording'
],
'string'
],
@@ -288,6 +289,7 @@ class Producer extends ActiveRecordCommon
'document_delivery_note_first_reference',
'option_billing_type',
'option_billing_frequency',
'option_point_sale_wording'
],
'string',
'max' => 255
@@ -410,6 +412,7 @@ class Producer extends ActiveRecordCommon
'option_billing_reduction_percentage' => 'Réduction : pourcentage',
'option_billing_permanent_transfer' => 'Virement permanent',
'option_billing_permanent_transfer_amount' => 'Virement permanent : montant',
'option_point_sale_wording' => 'Libellé points de vente'
];
}

@@ -1002,5 +1005,14 @@ class Producer extends ActiveRecordCommon

return $onlinePaymentMinimumAmount;
}

public function getPointSaleWording()
{
if($this->option_point_sale_wording && strlen($this->option_point_sale_wording)) {
return Html::encode($this->option_point_sale_wording);
}

return 'Points de vente';
}
}

+ 26
- 0
console/migrations/m230320_080836_producer_add_option_point_sale_wording.php Parādīt failu

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

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

/**
* Class m230320_080836_producer_add_option_point_sale_wording
*/
class m230320_080836_producer_add_option_point_sale_wording extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('producer', 'option_point_sale_wording', Schema::TYPE_STRING .' DEFAULT NULL');
}

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

+ 1
- 1
producer/views/order/order.php Parādīt failu

@@ -570,7 +570,7 @@ $producer = $this->context->getProducer();
<script type="text/x-template" id="template-step-point-sale">
<li id="step-point-sale" :class="'col-md-3'+((step == 'point-sale') ? ' active ' : '')+(first ? ' first' : '')">
<button @click="changeStep('point-sale')" :class="'btn '+ (step == 'point-sale' ? 'btn-primary' : 'btn-default')" :disabled="producer && (producer.option_order_entry_point == 'date' && step == 'date')">
<span class="button-content"><span class="glyphicon glyphicon-map-marker"></span> Points de vente</span>
<span class="button-content"><span class="glyphicon glyphicon-map-marker"></span> <?= $producer->getPointSaleWording(); ?></span>
</button>
<div class="info-step" v-if="pointSaleActive">
{{ pointSaleActive.name }}

+ 1
- 1
producer/views/site/index.php Parādīt failu

@@ -57,7 +57,7 @@ $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ;


<section id="points-sale">
<h3><span>Points de vente</span></h3>
<h3><span><?= $producer->getPointSaleWording(); ?></span></h3>
<?= GridView::widget([
'dataProvider' => $dataProviderPointsSale,
'summary' => '',

Notiek ielāde…
Atcelt
Saglabāt