Browse Source

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

prodstable
Guillaume Bourgeois 1 year ago
parent
commit
06529bc381
5 changed files with 42 additions and 3 deletions
  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 View File

Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK => 'Jours de la semaine', Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK => 'Jours de la semaine',
Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS => 'Distributions à venir', Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS => 'Distributions à venir',
]); ?> ]); ?>
<?= $form->field($model, 'option_point_sale_wording') ?>
</div> </div>
</div> </div>



+ 13
- 1
common/models/Producer.php View File

'option_online_payment_type', 'option_online_payment_type',
'option_tax_calculation_method', 'option_tax_calculation_method',
'latest_version_opendistrib', 'latest_version_opendistrib',
'option_csv_separator'
'option_csv_separator',
'option_point_sale_wording'
], ],
'string' 'string'
], ],
'document_delivery_note_first_reference', 'document_delivery_note_first_reference',
'option_billing_type', 'option_billing_type',
'option_billing_frequency', 'option_billing_frequency',
'option_point_sale_wording'
], ],
'string', 'string',
'max' => 255 'max' => 255
'option_billing_reduction_percentage' => 'Réduction : pourcentage', 'option_billing_reduction_percentage' => 'Réduction : pourcentage',
'option_billing_permanent_transfer' => 'Virement permanent', 'option_billing_permanent_transfer' => 'Virement permanent',
'option_billing_permanent_transfer_amount' => 'Virement permanent : montant', 'option_billing_permanent_transfer_amount' => 'Virement permanent : montant',
'option_point_sale_wording' => 'Libellé points de vente'
]; ];
} }




return $onlinePaymentMinimumAmount; 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 View File

<?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 View File

<script type="text/x-template" id="template-step-point-sale"> <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' : '')"> <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')"> <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> </button>
<div class="info-step" v-if="pointSaleActive"> <div class="info-step" v-if="pointSaleActive">
{{ pointSaleActive.name }} {{ pointSaleActive.name }}

+ 1
- 1
producer/views/site/index.php View File





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

Loading…
Cancel
Save