Commande : sélection date via une listerefactoring
use yii\helpers\Html; | use yii\helpers\Html; | ||||
use yii\widgets\ActiveForm; | use yii\widgets\ActiveForm; | ||||
use common\helpers\Url ; | use common\helpers\Url ; | ||||
use common\models\Producer ; | |||||
\backend\assets\VuejsProducerUpdateAsset::register($this); | \backend\assets\VuejsProducerUpdateAsset::register($this); | ||||
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />'; | echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />'; | ||||
} | } | ||||
?> | ?> | ||||
<?= $form->field($model, 'behavior_home_point_sale_day_list') | |||||
->dropDownList([ | |||||
Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK => 'Jours de la semaine', | |||||
Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS => 'Distributions à venir', | |||||
]); ?> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
Producer::BEHAVIOR_DELETE_ORDER_DELETE => 'Suppression de la commande', | Producer::BEHAVIOR_DELETE_ORDER_DELETE => 'Suppression de la commande', | ||||
Producer::BEHAVIOR_DELETE_ORDER_STATUS => 'Passage de la commande en statut "supprimé"', | Producer::BEHAVIOR_DELETE_ORDER_STATUS => 'Passage de la commande en statut "supprimé"', | ||||
], []) ; ?> | ], []) ; ?> | ||||
<?= $form->field($model, 'behavior_order_select_distribution') | |||||
->dropDownList([ | |||||
Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_CALENDAR => 'Calendrier', | |||||
Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST => 'Liste', | |||||
]); ?> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
const BEHAVIOR_DELETE_ORDER_DELETE = 'delete'; | const BEHAVIOR_DELETE_ORDER_DELETE = 'delete'; | ||||
const BEHAVIOR_DELETE_ORDER_STATUS = 'status'; | const BEHAVIOR_DELETE_ORDER_STATUS = 'status'; | ||||
const BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK = 'days-of-week' ; | |||||
const BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS = 'incoming-distributions' ; | |||||
const BEHAVIOR_ORDER_SELECT_DISTRIBUTION_CALENDAR = 'calendar' ; | |||||
const BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST = 'list' ; | |||||
var $secret_key_payplug; | var $secret_key_payplug; | ||||
/** | /** | ||||
} | } | ||||
}], | }], | ||||
[['description', 'mentions', 'gcs', 'order_infos', 'slug', 'secret_key_payplug', 'background_color_logo', 'option_behavior_cancel_order', 'tiller_provider_token', 'tiller_restaurant_token', 'status', | [['description', 'mentions', 'gcs', 'order_infos', 'slug', 'secret_key_payplug', 'background_color_logo', 'option_behavior_cancel_order', 'tiller_provider_token', 'tiller_restaurant_token', 'status', | ||||
'document_infos_bottom', 'document_infos_quotation', 'document_infos_invoice', 'document_infos_delivery_note', 'address'], 'string'], | |||||
'document_infos_bottom', 'document_infos_quotation', 'document_infos_invoice', 'document_infos_delivery_note', 'address', 'behavior_home_point_sale_day_list', 'behavior_order_select_distribution'], 'string'], | |||||
[['negative_balance', 'credit', 'active', 'online_payment', 'user_manage_subscription', 'option_allow_user_gift', 'use_credit_checked_default', 'tiller', 'document_display_orders_invoice', 'document_display_orders_delivery_note', 'document_display_prices_delivery_note'], 'boolean'], | [['negative_balance', 'credit', 'active', 'online_payment', 'user_manage_subscription', 'option_allow_user_gift', 'use_credit_checked_default', 'tiller', 'document_display_orders_invoice', 'document_display_orders_delivery_note', 'document_display_prices_delivery_note'], 'boolean'], | ||||
[['name', 'siret', 'logo', 'photo', 'postcode', 'city', 'code', 'type', 'credit_functioning', 'option_behavior_cancel_order', 'document_quotation_prefix', 'document_quotation_first_reference', 'document_invoice_prefix', 'document_invoice_first_reference', 'document_delivery_note_prefix', 'document_delivery_note_first_reference'], 'string', 'max' => 255], | [['name', 'siret', 'logo', 'photo', 'postcode', 'city', 'code', 'type', 'credit_functioning', 'option_behavior_cancel_order', 'document_quotation_prefix', 'document_quotation_first_reference', 'document_invoice_prefix', 'document_invoice_first_reference', 'document_delivery_note_prefix', 'document_delivery_note_first_reference'], 'string', 'max' => 255], | ||||
[['free_price', 'credit_limit_reminder', 'credit_limit'], 'double'], | [['free_price', 'credit_limit_reminder', 'credit_limit'], 'double'], | ||||
'document_display_orders_invoice' => 'Afficher le détail des commandes dans les factures', | 'document_display_orders_invoice' => 'Afficher le détail des commandes dans les factures', | ||||
'document_display_orders_delivery_note' => 'Afficher le détail des commandes dans les bons de livraison', | 'document_display_orders_delivery_note' => 'Afficher le détail des commandes dans les bons de livraison', | ||||
'document_display_prices_delivery_note' => 'Afficher le chiffrage dans les bons de livraison', | 'document_display_prices_delivery_note' => 'Afficher le chiffrage dans les bons de livraison', | ||||
'behavior_home_point_sale_day_list' => 'Accueil : affichage des jours de distribution', | |||||
'behavior_order_select_distribution' => 'Sélection de la date de distribution', | |||||
]; | ]; | ||||
} | } | ||||
<?php | |||||
use yii\db\Migration; | |||||
use yii\db\Schema; | |||||
use common\models\Producer ; | |||||
class m200601_073309_add_producer_options extends Migration | |||||
{ | |||||
public function safeUp() | |||||
{ | |||||
$this->addColumn('producer', 'behavior_home_point_sale_day_list', Schema::TYPE_STRING.' DEFAULT \''.Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK.'\''); | |||||
$this->addColumn('producer', 'behavior_order_select_distribution', Schema::TYPE_STRING.' DEFAULT \''.Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_CALENDAR.'\''); | |||||
} | |||||
public function safeDown() | |||||
{ | |||||
$this->dropColumn('producer', 'behavior_home_point_sale_day_list'); | |||||
$this->dropColumn('producer', 'behavior_order_select_distribution'); | |||||
return false; | |||||
} | |||||
} |
]); | ]); | ||||
// produits | // produits | ||||
$queryProducts = Product::find() | |||||
->andWhere([ | |||||
'id_producer' => $this->getProducer()->id, | |||||
'active' => true | |||||
]) | |||||
->orderBy('order ASC') ; | |||||
$dataProviderProducts = new ActiveDataProvider([ | $dataProviderProducts = new ActiveDataProvider([ | ||||
'query' => Product::find() | |||||
->andWhere([ | |||||
'id_producer' => $this->getProducer()->id, | |||||
'active' => true | |||||
]) | |||||
->orderBy('order ASC'), | |||||
'query' => $queryProducts, | |||||
'pagination' => [ | 'pagination' => [ | ||||
'pageSize' => 50, | 'pageSize' => 50, | ||||
], | ], | ||||
'sort' => false, | 'sort' => false, | ||||
]); | ]); | ||||
$products = $queryProducts->all() ; | |||||
$hasProductPhoto = false ; | |||||
$hasProductWeight = false ; | |||||
foreach($products as $product) { | |||||
if(strlen($product->photo) > 0) { | |||||
$hasProductPhoto = true ; | |||||
} | |||||
if($product->weight && $product->weight > 0) { | |||||
$hasProductWeight = true ; | |||||
} | |||||
} | |||||
return $this->render('index', [ | return $this->render('index', [ | ||||
'dataProviderPointsSale' => $dataProviderPointsSale, | 'dataProviderPointsSale' => $dataProviderPointsSale, | ||||
'dataProviderProducts' => $dataProviderProducts | |||||
'dataProviderProducts' => $dataProviderProducts, | |||||
'hasProductPhoto' => $hasProductPhoto, | |||||
'hasProductWeight' => $hasProductWeight | |||||
]); | ]); | ||||
} | } | ||||
termes. | termes. | ||||
*/ | */ | ||||
use common\helpers\GlobalParam ; | |||||
use common\models\Producer ; | |||||
use common\models\Distribution ; | |||||
\producer\assets\VuejsOrderOrderAsset::register($this); | \producer\assets\VuejsOrderOrderAsset::register($this); | ||||
$this->setTitle('Commander') ; | $this->setTitle('Commander') ; | ||||
$producer = GlobalParam::getCurrentProducer() ; | |||||
?> | ?> | ||||
<div id="app-order-order" :class="{'loaded': !loadingInit}"> | <div id="app-order-order" :class="{'loaded': !loadingInit}"> | ||||
</div> | </div> | ||||
<transition name="slide"> | <transition name="slide"> | ||||
<div id="content-step-date" v-if="step == 'date'"> | <div id="content-step-date" v-if="step == 'date'"> | ||||
<?php if($producer->behavior_order_select_distribution == Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST ): ?> | |||||
<div style="display:none ;"> | |||||
<?php endif; ?> | |||||
<div id="legend"> | <div id="legend"> | ||||
<div><span id="distribution-date-color"></span> Prochains jours de distribution</div> | <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="order-date-color"></span> Vos commandes déjà enregistrées</div> | ||||
:attributes="calendar.attrs" | :attributes="calendar.attrs" | ||||
:available-dates="calendar.availableDates" | :available-dates="calendar.availableDates" | ||||
@dayclick='dayClick'> | @dayclick='dayClick'> | ||||
></v-calendar> | |||||
></v-calendar> | |||||
</div> | </div> | ||||
<?php if($producer->behavior_order_select_distribution == Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST ): ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
<?php if($producer->behavior_order_select_distribution == Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST ): ?> | |||||
<div id="distributions-list"> | |||||
<?php $incomingDistributions = Distribution::getIncomingDistributions(); ?> | |||||
<?php foreach($incomingDistributions as $distribution): ?> | |||||
<div class="panel panel-default"> | |||||
<div class="panel-body"> | |||||
<?= ucfirst(strftime('%A %d %B', strtotime($distribution->date))); ?> | |||||
<a href="javascript:void(0);" class="btn btn-primary" @click="dayClickList" data-distribution-date="<?= $distribution->date.' 00:00' ?>">Sélectionner cette distribution</a> | |||||
</div> | |||||
</div> | |||||
<?php endforeach; ?> | |||||
</div> | |||||
<?php endif; ?> | |||||
</div> | </div> | ||||
</transition> | </transition> | ||||
<transition name="slide"> | <transition name="slide"> |
termes. | termes. | ||||
*/ | */ | ||||
use common\helpers\GlobalParam ; | |||||
use common\models\Distribution; | |||||
use common\models\PointSaleDistribution; | |||||
use common\models\Producer ; | |||||
$producer = $this->context->getProducer() ; | $producer = $this->context->getProducer() ; | ||||
$this->setTitle('Accueil'); | $this->setTitle('Accueil'); | ||||
$this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ; | $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ; | ||||
], | ], | ||||
[ | [ | ||||
'label' => 'Jours de livraison', | 'label' => 'Jours de livraison', | ||||
'format' => 'raw', | |||||
'value' => function($model) { | 'value' => function($model) { | ||||
return $model->getStrDeliveryDays() ; | |||||
$producer = GlobalParam::getCurrentProducer() ; | |||||
if($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK) { | |||||
return $model->getStrDeliveryDays() ; | |||||
} | |||||
elseif($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS) { | |||||
$html = '' ; | |||||
$incomingDistributions = Distribution::getIncomingDistributions(); | |||||
$cpt = 0 ; | |||||
foreach($incomingDistributions as $distribution) { | |||||
$countPointSaleDistribution = PointSaleDistribution::searchCount([ | |||||
'id_distribution' => $distribution->id, | |||||
'id_point_sale' => $model->id | |||||
]); | |||||
if($countPointSaleDistribution) { | |||||
$html .= strftime('%A %d %B', strtotime($distribution->date)).'<br />'; | |||||
} | |||||
$cpt ++ ; | |||||
if($cpt >= 5) { | |||||
break ; | |||||
} | |||||
} | |||||
return $html ; | |||||
} | |||||
} | } | ||||
] | ] | ||||
], | ], | ||||
<section id="products"> | <section id="products"> | ||||
<h3><span>Produits</span></h3> | <h3><span>Produits</span></h3> | ||||
<?= GridView::widget([ | |||||
'dataProvider' => $dataProviderProducts, | |||||
'summary' => '', | |||||
'columns' => [ | |||||
[ | |||||
'attribute' => 'photo', | |||||
'format' => 'raw', | |||||
'contentOptions' => ['class' => 'photo'], | |||||
'value' => function($model) { | |||||
if(strlen($model->photo)) { | |||||
return '<img class="photo-product" src="'.Yii::$app->urlManagerProducer->baseUrl.'/uploads/'.$model->photo.'" />' ; | |||||
} | |||||
return '' ; | |||||
} | |||||
], | |||||
[ | |||||
<?php | |||||
$columnsProducts = [] ; | |||||
if($hasProductPhoto) { | |||||
$columnsProducts [] = [ | |||||
'attribute' => 'photo', | |||||
'format' => 'raw', | |||||
'contentOptions' => ['class' => 'photo'], | |||||
'value' => function($model) { | |||||
if(strlen($model->photo)) { | |||||
return '<img class="photo-product" src="'.Yii::$app->urlManagerProducer->baseUrl.'/uploads/'.$model->photo.'" />' ; | |||||
} | |||||
return '' ; | |||||
} | |||||
] ; | |||||
} | |||||
$columnsProducts[] = [ | |||||
'attribute' => 'name', | 'attribute' => 'name', | ||||
'format' => 'raw', | 'format' => 'raw', | ||||
'contentOptions' => ['class' => 'name'], | 'contentOptions' => ['class' => 'name'], | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
$html = '<span class="the-name">'.Html::encode($model->name).'</span>' ; | |||||
if(strlen($model->description)) { | |||||
$html .= ' / '.Html::encode($model->description) ; | |||||
} | |||||
if(strlen($model->recipe)) { | |||||
$html .= '<br />'.Html::encode($model->recipe) ; | |||||
} | |||||
return $html ; | |||||
} | |||||
], | |||||
[ | |||||
'attribute' => 'weight', | |||||
'value' => function($model) { | |||||
if($model->unit == 'piece' && strlen($model->weight)) { | |||||
return $model->weight.' g' ; | |||||
} | |||||
return '' ; | |||||
$html = '<span class="the-name">'.Html::encode($model->name).'</span>' ; | |||||
if(strlen($model->description)) { | |||||
$html .= ' / '.Html::encode($model->description) ; | |||||
} | |||||
if(strlen($model->recipe)) { | |||||
$html .= '<br />'.Html::encode($model->recipe) ; | |||||
} | |||||
return $html ; | |||||
} | } | ||||
], | |||||
[ | |||||
] ; | |||||
if($hasProductWeight) { | |||||
$columnsProducts[] = [ | |||||
'attribute' => 'weight', | |||||
'value' => function($model) { | |||||
if($model->unit == 'piece' && strlen($model->weight)) { | |||||
return $model->weight.' g' ; | |||||
} | |||||
return '' ; | |||||
} | |||||
] ; | |||||
} | |||||
$columnsProducts[] = [ | |||||
'attribute' => 'price', | 'attribute' => 'price', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
if($model->price) { | |||||
return Price::format($model->getPriceWithTax()).' ('.Product::strUnit($model->unit, 'wording_unit', true).')' ; | |||||
} | |||||
return '' ; | |||||
if($model->price) { | |||||
return Price::format($model->getPriceWithTax()).' ('.Product::strUnit($model->unit, 'wording_unit', true).')' ; | |||||
} | |||||
return '' ; | |||||
} | } | ||||
], | |||||
], | |||||
] ; | |||||
?> | |||||
<?= GridView::widget([ | |||||
'dataProvider' => $dataProviderProducts, | |||||
'summary' => '', | |||||
'columns' => $columnsProducts | |||||
]); ?> | ]); ?> | ||||
</section> | </section> |
.order-order #main #app-order-order #calendar .c-day-popover-content { | .order-order #main #app-order-order #calendar .c-day-popover-content { | ||||
font-size: 1.3rem; | font-size: 1.3rem; | ||||
} | } | ||||
/* line 172, ../sass/order/_order.scss */ | |||||
/* line 175, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order #content-step-date #distributions-list .panel .btn-primary { | |||||
float: right; | |||||
} | |||||
/* line 182, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order .block-actions { | .order-order #main #app-order-order .block-actions { | ||||
text-align: right; | text-align: right; | ||||
margin-top: 20px; | margin-top: 20px; | ||||
} | } | ||||
/* line 179, ../sass/order/_order.scss */ | |||||
/* line 189, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#points-sale td.name .the-name { | .order-order #main #app-order-order table#points-sale td.name .the-name { | ||||
font-family: "capsuularegular"; | font-family: "capsuularegular"; | ||||
color: black; | color: black; | ||||
font-size: 20px; | font-size: 20px; | ||||
line-height: 25px; | line-height: 25px; | ||||
} | } | ||||
/* line 187, ../sass/order/_order.scss */ | |||||
/* line 197, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#points-sale td.actions { | .order-order #main #app-order-order table#points-sale td.actions { | ||||
width: 150px; | width: 150px; | ||||
} | } | ||||
/* line 189, ../sass/order/_order.scss */ | |||||
/* line 199, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#points-sale td.actions button { | .order-order #main #app-order-order table#points-sale td.actions button { | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
/* line 195, ../sass/order/_order.scss */ | |||||
/* line 205, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#points-sale tr.selected td { | .order-order #main #app-order-order table#points-sale tr.selected td { | ||||
background-color: white; | background-color: white; | ||||
} | } | ||||
/* line 203, ../sass/order/_order.scss */ | |||||
/* line 213, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products td.photo img { | .order-order #main #app-order-order table#products td.photo img { | ||||
width: 100px; | width: 100px; | ||||
} | } | ||||
/* line 209, ../sass/order/_order.scss */ | |||||
/* line 219, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products td.name .name { | .order-order #main #app-order-order table#products td.name .name { | ||||
font-family: "capsuularegular"; | font-family: "capsuularegular"; | ||||
color: black; | color: black; | ||||
font-size: 20px; | font-size: 20px; | ||||
line-height: 25px; | line-height: 25px; | ||||
} | } | ||||
/* line 215, ../sass/order/_order.scss */ | |||||
/* line 225, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products td.name .other { | .order-order #main #app-order-order table#products td.name .other { | ||||
font-size: 14px; | font-size: 14px; | ||||
color: #333; | color: #333; | ||||
} | } | ||||
/* line 219, ../sass/order/_order.scss */ | |||||
/* line 229, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products td.name .recipe { | .order-order #main #app-order-order table#products td.name .recipe { | ||||
color: gray; | color: gray; | ||||
} | } | ||||
/* line 223, ../sass/order/_order.scss */ | |||||
/* line 233, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products .price-unit, .order-order #main #app-order-order table#products .price-total { | .order-order #main #app-order-order table#products .price-unit, .order-order #main #app-order-order table#products .price-total { | ||||
width: 100px; | width: 100px; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 227, ../sass/order/_order.scss */ | |||||
/* line 237, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products .price-unit .unit, .order-order #main #app-order-order table#products .price-total .unit { | .order-order #main #app-order-order table#products .price-unit .unit, .order-order #main #app-order-order table#products .price-total .unit { | ||||
color: gray; | color: gray; | ||||
font-size: 13px; | font-size: 13px; | ||||
} | } | ||||
/* line 232, ../sass/order/_order.scss */ | |||||
/* line 242, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products .td-quantity { | .order-order #main #app-order-order table#products .td-quantity { | ||||
width: 175px; | width: 175px; | ||||
} | } | ||||
/* line 234, ../sass/order/_order.scss */ | |||||
/* line 244, ../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.quantity { | ||||
text-align: center; | text-align: center; | ||||
border-right: 0px none; | border-right: 0px none; | ||||
} | } | ||||
/* line 238, ../sass/order/_order.scss */ | |||||
/* line 248, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products .td-quantity .input-group-addon { | .order-order #main #app-order-order table#products .td-quantity .input-group-addon { | ||||
padding: 5px; | padding: 5px; | ||||
padding-left: 0px; | padding-left: 0px; | ||||
border-left: 0px none; | border-left: 0px none; | ||||
border-right: 0px none; | border-right: 0px none; | ||||
} | } | ||||
/* line 248, ../sass/order/_order.scss */ | |||||
/* line 258, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order table#products tr.total .price-total { | .order-order #main #app-order-order table#products tr.total .price-total { | ||||
font-size: 23px; | font-size: 23px; | ||||
} | } | ||||
/* line 256, ../sass/order/_order.scss */ | |||||
/* line 266, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order #content-step-payment .credit .info { | .order-order #main #app-order-order #content-step-payment .credit .info { | ||||
margin-left: 20px; | margin-left: 20px; | ||||
color: gray; | color: gray; | ||||
} | } | ||||
/* line 262, ../sass/order/_order.scss */ | |||||
/* line 272, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order #content-step-payment .comment { | .order-order #main #app-order-order #content-step-payment .comment { | ||||
margin-bottom: 20px; | margin-bottom: 20px; | ||||
} | } | ||||
/* line 273, ../sass/order/_order.scss */ | |||||
/* line 283, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order #infos { | .order-order #main #app-order-order #infos { | ||||
margin-top: 30px; | margin-top: 30px; | ||||
} | } | ||||
/* line 275, ../sass/order/_order.scss */ | |||||
/* line 285, ../sass/order/_order.scss */ | |||||
.order-order #main #app-order-order #infos .panel-body { | .order-order #main #app-order-order #infos .panel-body { | ||||
padding-top: 0px; | padding-top: 0px; | ||||
white-space: pre-line; | white-space: pre-line; |
this.init() ; | this.init() ; | ||||
} | } | ||||
} | } | ||||
}, | |||||
dayClickList: function(event) { | |||||
var dateStr = event.currentTarget.getAttribute('data-distribution-date') ; | |||||
var dateObject = new Date(dateStr) ; | |||||
if(this.isAvailableDate(dateObject)) { | |||||
this.dayClickEvent(dateObject) ; | |||||
} | |||||
}, | }, | ||||
dayClick: function(day) { | dayClick: function(day) { | ||||
if(this.isAvailableDate(day.date)) { | if(this.isAvailableDate(day.date)) { | ||||
this.date = day.date ; | |||||
this.dateFormat = ('0' + this.date.getDate()).slice(-2)+ '/' | |||||
+ ('0' + (this.date.getMonth() +1)).slice(-2) + '/' | |||||
+ this.date.getFullYear() ; | |||||
this.changeStep('point-sale') ; | |||||
this.dayClickEvent(day.date) ; | |||||
} | } | ||||
}, | }, | ||||
dayClickEvent: function(date) { | |||||
this.date = date ; | |||||
this.dateFormat = ('0' + this.date.getDate()).slice(-2)+ '/' | |||||
+ ('0' + (this.date.getMonth() +1)).slice(-2) + '/' | |||||
+ this.date.getFullYear() ; | |||||
this.changeStep('point-sale') ; | |||||
}, | |||||
isAvailableDate: function(date) { | isAvailableDate: function(date) { | ||||
for(var key in this.calendar.availableDates) { | for(var key in this.calendar.availableDates) { | ||||
if(date.getTime() == this.calendar.availableDates[key].start.getTime()) { | if(date.getTime() == this.calendar.availableDates[key].start.getTime()) { |
font-size: 1.3rem ; | font-size: 1.3rem ; | ||||
} | } | ||||
} | } | ||||
#content-step-date { | |||||
#distributions-list { | |||||
.panel { | |||||
.btn-primary { | |||||
float: right ; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
.block-actions { | .block-actions { | ||||
text-align: right ; | text-align: right ; |