Просмотр исходного кода

Adaptations backend/point-sale

refactoring
Guillaume Bourgeois 5 лет назад
Родитель
Сommit
6d37d1bab5
21 измененных файлов: 96 добавлений и 61 удалений
  1. +8
    -8
      backend/controllers/OrderController.php
  2. +20
    -20
      backend/controllers/PointSaleController.php
  3. +1
    -1
      backend/controllers/SubscriptionController.php
  4. +1
    -1
      backend/views/order/report.php
  5. +3
    -3
      backend/views/point-sale/_form.php
  6. +1
    -1
      backend/views/point-sale/index.php
  7. +1
    -1
      backend/views/point-sale/update.php
  8. +1
    -1
      backend/views/product/_form.php
  9. +1
    -1
      backend/views/subscription/_form.php
  10. +1
    -1
      backend/views/subscription/index.php
  11. +7
    -7
      backend/web/js/lechatdesnoisettes.js
  12. +1
    -1
      common/models/Distribution.php
  13. +3
    -3
      common/models/PointSale.php
  14. +1
    -1
      common/models/PointSaleDistribution.php
  15. +2
    -2
      common/models/Product.php
  16. +2
    -2
      common/models/Subscription.php
  17. +4
    -4
      common/models/SubscriptionForm.php
  18. +2
    -2
      common/models/User.php
  19. +20
    -0
      console/migrations/m181226_131915_rename_columns_saturday_point_sale.php
  20. +15
    -0
      console/migrations/m181226_133031_rename_saturday_user.php
  21. +1
    -1
      producer/views/order/_form.php

+ 8
- 8
backend/controllers/OrderController.php Просмотреть файл

@@ -487,7 +487,7 @@ class OrderController extends BackendController
$dateWednesday = date('Y-m-d',strtotime('Wednesday',$start)) ;
$dateThursday = date('Y-m-d',strtotime('Thursday',$start)) ;
$dateFriday = date('Y-m-d',strtotime('Friday',$start)) ;
$dateSaterday = date('Y-m-d',strtotime('Saturday',$start)) ;
$dateSaturday = date('Y-m-d',strtotime('Saturday',$start)) ;
$dateSunday = date('Y-m-d',strtotime('Sunday',$start)) ;
$weekDistribution = Distribution::find()
@@ -501,7 +501,7 @@ class OrderController extends BackendController
['date' => $dateWednesday],
['date' => $dateThursday],
['date' => $dateFriday],
['date' => $dateSaterday],
['date' => $dateSaturday],
['date' => $dateSunday],
])
->one();
@@ -575,7 +575,7 @@ class OrderController extends BackendController
$filename = 'export_' . $date . '_global';

$dayWeek = date('w', strtotime($date));
$dayWeekArray = [0 => 'sunday', 1 => 'monday', 2 => 'tuesday', 3 => 'wednesday', 4 => 'thursday', 5 => 'friday', 6 => 'saterday'];
$dayWeekArray = [0 => 'sunday', 1 => 'monday', 2 => 'tuesday', 3 => 'wednesday', 4 => 'thursday', 5 => 'friday', 6 => 'saturday'];
$fieldsHoursPointSale = 'infos_' . $dayWeekArray[$dayWeek];

// par point de vente
@@ -696,7 +696,7 @@ class OrderController extends BackendController
}

$dayWeek = date('w', strtotime($date));
$dayWeekArray = [0 => 'sunday', 1 => 'monday', 2 => 'tuesday', 3 => 'wednesday', 4 => 'thursday', 5 => 'friday', 6 => 'saterday'];
$dayWeekArray = [0 => 'sunday', 1 => 'monday', 2 => 'tuesday', 3 => 'wednesday', 4 => 'thursday', 5 => 'friday', 6 => 'saturday'];
$fieldHoursPointSale = 'infos_' . $dayWeekArray[$dayWeek];


@@ -845,7 +845,7 @@ class OrderController extends BackendController
$dateWednesday = date('Y-m-d',strtotime('Wednesday',$start)) ;
$dateThursday = date('Y-m-d',strtotime('Thursday',$start)) ;
$dateFriday = date('Y-m-d',strtotime('Friday',$start)) ;
$dateSaterday = date('Y-m-d',strtotime('Saturday',$start)) ;
$dateSaturday = date('Y-m-d',strtotime('Saturday',$start)) ;
$dateSunday = date('Y-m-d',strtotime('Sunday',$start)) ;
$pointsSaleArray = PointSale::searchAll() ;
@@ -855,7 +855,7 @@ class OrderController extends BackendController
$activeWednesday = false ;
$activeThursday = false ;
$activeFriday = false ;
$activeSaterday = false ;
$activeSaturday = false ;
$activeSunday = false ;
foreach($pointsSaleArray as $pointSale) {
@@ -864,7 +864,7 @@ class OrderController extends BackendController
if($pointSale->delivery_wednesday) $activeWednesday = true ;
if($pointSale->delivery_thursday) $activeThursday = true ;
if($pointSale->delivery_friday) $activeFriday = true ;
if($pointSale->delivery_saterday) $activeSaterday = true ;
if($pointSale->delivery_saturday) $activeSaturday = true ;
if($pointSale->delivery_sunday) $activeSunday = true ;
}
@@ -873,7 +873,7 @@ class OrderController extends BackendController
if($activeWednesday || !$active) $this->actionChangeState($activeWednesday, $active, false) ;
if($activeThursday || !$active) $this->actionChangeState($activeThursday, $active, false) ;
if($activeFriday || !$active) $this->actionChangeState($activeFriday, $active, false) ;
if($activeSaterday || !$active) $this->actionChangeState($activeSaterday, $active, false) ;
if($activeSaturday || !$active) $this->actionChangeState($activeSaturday, $active, false) ;
if($activeSunday || !$active) $this->actionChangeState($activeSunday, $active, false) ;

$this->redirect(['index', 'date' => $date]);

backend/controllers/PointVenteController.php → backend/controllers/PointSaleController.php Просмотреть файл

@@ -51,7 +51,7 @@ use common\models\UserPointSale;
/**
* PointVenteController implements the CRUD actions for PointVente model.
*/
class PointVenteController extends BackendController
class PointSaleController extends BackendController
{

public function behaviors()
@@ -85,11 +85,11 @@ class PointVenteController extends BackendController
public function actionIndex()
{
$dataProvider = new ActiveDataProvider([
'query' => PointVente::find()->where(['id_etablissement' => Yii::$app->user->identity->id_etablissement])
'query' => PointSale::find()->where(['id_producer' => Producer::getId()])
]);

return $this->render('index', [
'dataProvider' => $dataProvider,
'dataProvider' => $dataProvider,
]);
}

@@ -100,15 +100,15 @@ class PointVenteController extends BackendController
*/
public function actionCreate()
{
$model = new PointVente();
$model = new PointSale();

if ($model->load(Yii::$app->request->post()) && $model->save()) {
$model->gestionPointFabrication();
$model->gestionAccesRestreint();
$model->processPointProduction();
$model->processRestrictedAccess();
return $this->redirect(['index']);
} else {
return $this->render('update', array_merge($this->initForm(), [
'model' => $model,
'model' => $model,
]));
}
}
@@ -121,23 +121,23 @@ class PointVenteController extends BackendController
*/
public function actionUpdate($id)
{
$model = PointVente::find()
->with('pointVenteUser')
$model = PointSale::find()
->with('userPointSale')
->where(['id' => $id])
->one();

foreach ($model->pointVenteUser as $u) {
$model->users[] = $u->id_user;
$model->users_commentaire[$u->id_user] = $u->commentaire;
foreach ($model->userPointSale as $userPointSale) {
$model->users[] = $userPointSale->id_user;
$model->users_comment[$userPointSale->id_user] = $userPointSale->comment;
}

if ($model->load(Yii::$app->request->post()) && $model->save()) {
$model->gestionPointFabrication();
$model->gestionAccesRestreint();
$model->processPointProduction();
$model->processRestrictedAccess();
return $this->redirect(['index']);
} else {
return $this->render('update', array_merge($this->initForm($id), [
'model' => $model,
'model' => $model,
]));
}
}
@@ -151,8 +151,8 @@ class PointVenteController extends BackendController
public function initForm($id = 0)
{
$users = User::findBy()
->orderBy('name ASC')
->all();
->orderBy('name ASC')
->all();
return [
'users' => $users
];
@@ -167,8 +167,8 @@ class PointVenteController extends BackendController
public function actionDelete($id)
{
$this->findModel($id)->delete();
PointVenteUser::deleteAll(['id_point_vente' => $id]);
ProductionPointVente::deleteAll(['id_point_vente' => $id]) ;
UserPointSale::deleteAll(['id_point_sale' => $id]);
PointSaleDistribution::deleteAll(['id_point_sale' => $id]) ;
return $this->redirect(['index']);
}

@@ -181,7 +181,7 @@ class PointVenteController extends BackendController
*/
protected function findModel($id)
{
if (($model = PointVente::findOne($id)) !== null) {
if (($model = PointSale::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');

+ 1
- 1
backend/controllers/SubscriptionController.php Просмотреть файл

@@ -172,7 +172,7 @@ class SubscriptionController extends BackendController
$model->wednesday = $subscription->wednesday;
$model->thursday = $subscription->thursday;
$model->friday = $subscription->friday;
$model->saterday = $subscription->saterday;
$model->saturday = $subscription->saturday;
$model->sunday = $subscription->sunday;
$model->auto_payment = $subscription->auto_payment;
$model->week_frequency = $subscription->week_frequency;

+ 1
- 1
backend/views/order/report.php Просмотреть файл

@@ -39,7 +39,7 @@ termes.
use common\models\Order ;

$dayWeek = date('w', strtotime($date));
$dayWeekArray = [0 => 'sunday', 1 => 'monday', 2 => 'tuesday', 3 => 'wednesday', 4 => 'thursday', 5 => 'friday', 6 => 'saterday'];
$dayWeekArray = [0 => 'sunday', 1 => 'monday', 2 => 'tuesday', 3 => 'wednesday', 4 => 'thursday', 5 => 'friday', 6 => 'saturday'];
$fieldInfosPointSale = 'infos_' . $dayWeekArray[$dayWeek];

$html = '' ;

+ 3
- 3
backend/views/point-sale/_form.php Просмотреть файл

@@ -52,7 +52,7 @@ use common\models\Producer ;

<div class="col-md-8">
<?= $form->field($model, 'nom')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'locality')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'address')->textarea(['rows' => 6]) ?>

@@ -80,7 +80,7 @@ use common\models\Producer ;
<?= $form->field($model, 'delivery_wednesday')->checkbox() ?>
<?= $form->field($model, 'delivery_thursday')->checkbox() ?>
<?= $form->field($model, 'delivery_friday')->checkbox() ?>
<?= $form->field($model, 'delivery_saterday')->checkbox() ?>
<?= $form->field($model, 'delivery_saturday')->checkbox() ?>
<?= $form->field($model, 'delivery_sunday')->checkbox() ?>
</div>
<div class="clr"></div>
@@ -91,7 +91,7 @@ use common\models\Producer ;
<?= $form->field($model, 'infos_wednesday')->textarea(['rows' => 3]) ?>
<?= $form->field($model, 'infos_thursday')->textarea(['rows' => 3]) ?>
<?= $form->field($model, 'infos_friday')->textarea(['rows' => 3]) ?>
<?= $form->field($model, 'infos_saterday')->textarea(['rows' => 3]) ?>
<?= $form->field($model, 'infos_saturday')->textarea(['rows' => 3]) ?>
<?= $form->field($model, 'infos_sunday')->textarea(['rows' => 3]) ?>
</div>
<div class="col-md-4">

+ 1
- 1
backend/views/point-sale/index.php Просмотреть файл

@@ -59,7 +59,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'point_production',
'format' => 'raw',
'value' => function($model) {
if($model->point_fabrication)
if($model->point_production)
{
return '<span class="label label-success">Oui</span>' ;
}

+ 1
- 1
backend/views/point-sale/update.php Просмотреть файл

@@ -43,7 +43,7 @@ use yii\helpers\Html;

$this->title = 'Modifier un point de vente';
$this->params['breadcrumbs'][] = ['label' => 'Points de vente', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => Html::encode($model->nom), 'url' => ['update', 'id' => $model->id]];
$this->params['breadcrumbs'][] = ['label' => Html::encode($model->name), 'url' => ['update', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Modifier';
?>
<div class="point-sale-update">

+ 1
- 1
backend/views/product/_form.php Просмотреть файл

@@ -73,7 +73,7 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'wednesday')->checkbox() ?>
<?= $form->field($model, 'thursday')->checkbox() ?>
<?= $form->field($model, 'friday')->checkbox() ?>
<?= $form->field($model, 'saterday')->checkbox() ?>
<?= $form->field($model, 'saturday')->checkbox() ?>
<?= $form->field($model, 'sunday')->checkbox() ?>
</div>
<div class="clr"></div>

+ 1
- 1
backend/views/subscription/_form.php Просмотреть файл

@@ -72,7 +72,7 @@ use common\models\PointSale ;
<?= $form->field($model, 'wednesday')->checkbox() ?>
<?= $form->field($model, 'thursday')->checkbox() ?>
<?= $form->field($model, 'friday')->checkbox() ?>
<?= $form->field($model, 'saterday')->checkbox() ?>
<?= $form->field($model, 'saturday')->checkbox() ?>
<?= $form->field($model, 'sunday')->checkbox() ?>
</div>
<div class="clr"></div>

+ 1
- 1
backend/views/subscription/index.php Просмотреть файл

@@ -124,7 +124,7 @@ $this->params['breadcrumbs'][] = $this->title;
$html .= 'jeudi, ' ;
if($model->friday)
$html .= 'vendredi, ' ;
if($model->saterday)
if($model->saturday)
$html .= 'samedi, ' ;
if($model->sunday)
$html .= 'dimanche, ' ;

+ 7
- 7
backend/web/js/lechatdesnoisettes.js Просмотреть файл

@@ -160,20 +160,20 @@ function chat_points_vente_jours_livraison_event() {

function chat_points_vente_acces() {
// affichage du bloc acces restreint
$('#pointvente-acces_restreint').change(function() {
$('#pointsale-restricted_access').change(function() {
chat_points_vente_acces_event() ;
}) ;
chat_points_vente_acces_event() ;
// affichage du champs commentaire
$('#pointvente-users input[type=checkbox]').change(function() {
$('#pointsale-users input[type=checkbox]').change(function() {
chat_points_vente_commentaire_event() ;
}) ;
chat_points_vente_commentaire_event() ;
}

function chat_points_vente_commentaire_event() {
$('#pointvente-users input[type=checkbox]').each(function() {
$('#pointsale-users input[type=checkbox]').each(function() {
if($(this).prop('checked')) {
$(this).parent().find('.commentaire').fadeIn() ;
}
@@ -184,16 +184,16 @@ function chat_points_vente_commentaire_event() {
}

function chat_points_vente_acces_event() {
if($('#pointvente-acces_restreint').prop('checked')) {
$('#pointvente-users').fadeIn() ;
if($('#pointsale-restricted_access').prop('checked')) {
$('#pointsale-users').fadeIn() ;
}
else {
$('#pointvente-users').hide() ;
$('#pointsale-users').hide() ;
}
}

function chat_select_etablissement() {
$('select[name="select_etablissement"]').change(function() {
$('select[name="select_producer"]').change(function() {
window.location.href = UrlManager.getBaseUrlAbsolute()+'/site/change-producer?id='+$(this).val() ;
}) ;
}

+ 1
- 1
common/models/Distribution.php Просмотреть файл

@@ -208,7 +208,7 @@ class Distribution extends ActiveRecordCommon
if ($product->active && $dayDistribution == 5 && $product->friday) {
$productDistribution->active = 1;
}
if ($product->active && $dayDistribution == 6 && $product->saterday) {
if ($product->active && $dayDistribution == 6 && $product->saturday) {
$productDistribution->active = 1;
}
if ($product->active && $dayDistribution == 7 && $product->sunday) {

+ 3
- 3
common/models/PointSale.php Просмотреть файл

@@ -80,10 +80,10 @@ class PointSale extends ActiveRecordCommon
[['name', 'code'], 'string', 'max' => 255],
[['address', 'locality', 'infos_monday', 'infos_tuesday',
'infos_wednesday', 'infos_thursday', 'infos_friday',
'infos_saterday', 'infos_sunday'], 'string'],
'infos_saturday', 'infos_sunday'], 'string'],
[['point_production', 'credit', 'delivery_monday', 'delivery_tuesday',
'delivery_wednesday', 'delivery_thursday', 'delivery_friday',
'delivery_saterday', 'delivery_sunday'], 'boolean'],
'delivery_saturday', 'delivery_sunday'], 'boolean'],
['point_production', 'default', 'value' => 0],
['id_producer', 'integer'],
['id_producer', 'required'],
@@ -301,7 +301,7 @@ class PointSale extends ActiveRecordCommon
if($this->delivery_wednesday) $str .= 'mercredi, ' ;
if($this->delivery_thursday) $str .= 'jeudi, ' ;
if($this->delivery_friday) $str .= 'vendredi, ' ;
if($this->delivery_saterday) $str .= 'samedi, ' ;
if($this->delivery_saturday) $str .= 'samedi, ' ;
if($this->delivery_sunday) $str .= 'dimanche, ' ;

if(strlen($str)) {

+ 1
- 1
common/models/PointSaleDistribution.php Просмотреть файл

@@ -154,7 +154,7 @@ class PointSaleDistribution extends ActiveRecordCommon
($day == 3 && $pointSaleDistribution->pointSale->delivery_wednesday) ||
($day == 4 && $pointSaleDistribution->pointSale->delivery_thursday) ||
($day == 5 && $pointSaleDistribution->pointSale->delivery_friday) ||
($day == 6 && $pointSaleDistribution->pointSale->delivery_saterday) ||
($day == 6 && $pointSaleDistribution->pointSale->delivery_saturday) ||
($day == 7 && $pointSaleDistribution->pointSale->delivery_sunday) ||
$pointSaleDistribution->pointSale->point_production
)) {

+ 2
- 2
common/models/Product.php Просмотреть файл

@@ -76,7 +76,7 @@ class Product extends ActiveRecordCommon
return [
[['name', 'id_producer'], 'required'],
[['active', 'order', 'quantity_max', 'id_producer'], 'integer'],
[['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saterday', 'sunday', 'unavailable'], 'boolean'],
[['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'unavailable'], 'boolean'],
[['price', 'weight'], 'number'],
[[ 'photo'], 'file'],
[['name', 'description', 'photo'], 'string', 'max' => 255],
@@ -103,7 +103,7 @@ class Product extends ActiveRecordCommon
'wednesday' => 'Mercredi',
'thursday' => 'Jeudi',
'friday' => 'Vendredi',
'saterday' => 'Samedi',
'saturday' => 'Samedi',
'sunday' => 'Dimanche',
'order' => 'Ordre',
'quantity_max' => 'Quantité max par défaut',

+ 2
- 2
common/models/Subscription.php Просмотреть файл

@@ -84,7 +84,7 @@ class Subscription extends ActiveRecordCommon
return [
[['id_producer', 'id_point_sale'], 'required'],
[['id_user', 'id_producer', 'id_point_sale', 'monday', 'tuesday',
'wednesday', 'thursday', 'friday', 'saterday', 'sunday', 'week_frequency'], 'integer'],
'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'week_frequency'], 'integer'],
[['auto_payment'], 'boolean'],
[['date_begin', 'date_end', 'username'], 'safe'],
];
@@ -107,7 +107,7 @@ class Subscription extends ActiveRecordCommon
'wednesday' => 'Mercredi',
'thursday' => 'Jeudi',
'friday' => 'Vendredi',
'saterday' => 'Samedi',
'saturday' => 'Samedi',
'sunday' => 'Dimanche',
'week_frequency' => 'Périodicité',
'auto_payment' => 'Paiement automatique'

+ 4
- 4
common/models/SubscriptionForm.php Просмотреть файл

@@ -61,7 +61,7 @@ class SubscriptionForm extends Model
public $wednesday;
public $thursday;
public $friday;
public $saterday;
public $saturday;
public $sunday;
public $week_frequency;
public $products;
@@ -75,7 +75,7 @@ class SubscriptionForm extends Model
return [
[['id_producer', 'week_frequency', 'id_point_sale'], 'integer'],
[['date_begin', 'date_end'], 'date', 'format' => 'php:d/m/Y'],
[['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saterday', 'sunday', 'auto_payment'], 'boolean'],
[['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'auto_payment'], 'boolean'],
[['id_point_sale', 'id_producer', 'date_begin'], 'required', 'message' => 'Champs obligatoire'],
[['products', 'id_user', 'username'], 'safe'],
['id_user', function ($attribute, $params) {
@@ -100,7 +100,7 @@ class SubscriptionForm extends Model
'wednesday' => 'Mercredi',
'thursday' => 'Jeudi',
'friday' => 'Vendredi',
'saterday' => 'Samedi',
'saturday' => 'Samedi',
'sunday' => 'Dimanche',
'week_frequency' => 'Périodicité (semaines)',
'username' => 'Nom d\'utilisateur',
@@ -142,7 +142,7 @@ class SubscriptionForm extends Model
$subscription->wednesday = $this->wednesday;
$subscription->thursday = $this->thursday;
$subscription->friday = $this->friday;
$subscription->saterday = $this->saterday;
$subscription->saturday = $this->saturday;
$subscription->sunday = $this->sunday;
$subscription->week_frequency = $this->week_frequency;
$subscription->auto_payment = $this->auto_payment;

+ 2
- 2
common/models/User.php Просмотреть файл

@@ -95,7 +95,7 @@ class User extends ActiveRecordCommon implements IdentityInterface
public function rules()
{
return [
[['no_mail', 'mail_distribution_monday', 'mail_distribution_tuesday', 'mail_distribution_wednesday', 'mail_distribution_thursday', 'mail_distribution_friday', 'mail_distribution_saterday', 'mail_distribution_sunday'], 'boolean'],
[['no_mail', 'mail_distribution_monday', 'mail_distribution_tuesday', 'mail_distribution_wednesday', 'mail_distribution_thursday', 'mail_distribution_friday', 'mail_distribution_saturday', 'mail_distribution_sunday'], 'boolean'],
[['lastname', 'name', 'phone', 'address'], 'string'],
[['lastname', 'name'], 'required', 'message' => 'Ce champs ne peut être vide'],
['email', 'email', 'message' => 'Cette adresse email n\'est pas valide'],
@@ -122,7 +122,7 @@ class User extends ActiveRecordCommon implements IdentityInterface
'mail_distribution_wednesday' => 'Mercredi',
'mail_distribution_thursday' => 'Jeudi',
'mail_distribution_friday' => 'Vendredi',
'mail_distribution_saterday' => 'Samedi',
'mail_distribution_saturday' => 'Samedi',
'mail_distribution_sunday' => 'Dimanche',
'password_old' => 'Ancien mot de passe',
'password_new' => 'Nouveau mot de passe',

+ 20
- 0
console/migrations/m181226_131915_rename_columns_saturday_point_sale.php Просмотреть файл

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

use yii\db\Migration;

class m181226_131915_rename_columns_saturday_point_sale extends Migration {

public function up() {
$this->renameColumn('point_sale', 'delivery_saterday', 'delivery_saturday') ;
$this->renameColumn('point_sale', 'infos_saterday', 'infos_saturday') ;
$this->renameColumn('subscription', 'saterday', 'saturday') ;
$this->renameColumn('product', 'saterday', 'saturday') ;
}

public function down() {
$this->renameColumn('point_sale', 'delivery_saturday', 'delivery_saterday') ;
$this->renameColumn('point_sale', 'infos_saturday', 'infos_saterday') ;
$this->renameColumn('subscription', 'saturday', 'saterday') ;
$this->renameColumn('product', 'saturday', 'saterday') ;
}
}

+ 15
- 0
console/migrations/m181226_133031_rename_saturday_user.php Просмотреть файл

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

use yii\db\Migration;

class m181226_133031_rename_saturday_user extends Migration {

public function up() {
$this->renameColumn('user', 'mail_distribution_saterday', 'mail_distribution_saturday');
}

public function down() {
$this->renameColumn('user', 'mail_distribution_saturday', 'mail_distribution_saterday');
}

}

+ 1
- 1
producer/views/order/_form.php Просмотреть файл

@@ -167,7 +167,7 @@ use yii\widgets\ActiveForm;
'<div class="jour jour-3">' . $pointSale->getStrInfos('wednesday') . '</div>' .
'<div class="jour jour-4">' . $pointSale->getStrInfos('thursday') . '</div>' .
'<div class="jour jour-5">' . $pointSale->getStrInfos('friday') . '</div>' .
'<div class="jour jour-6">' . $pointSale->getStrInfos('saterday') . '</div>' .
'<div class="jour jour-6">' . $pointSale->getStrInfos('saturday') . '</div>' .
'<div class="jour jour-0">' . $pointSale->getStrInfos('sunday') . '</div>' .
'</div>' ;
}

Загрузка…
Отмена
Сохранить