# Conflicts: # common/web/.sass-cache/6c26416e9ff85d1d880c50b5640482ab6b7e4878/screen.scsscdev
.date { | .date { | ||||
text-align: center ; | text-align: center ; | ||||
.block-date { | |||||
width: 50% ; | |||||
margin: 0px auto ; | |||||
padding-top: 0px ; | |||||
} | |||||
.day { | |||||
text-transform: capitalize ; | |||||
line-height: 13px ; | |||||
font-size: 10px ; | |||||
text-transform: uppercase ; | |||||
} | |||||
.num { | |||||
font-size: 23px ; | |||||
line-height: 28px ; | |||||
font-weight: bold ; | |||||
} | |||||
.month { | |||||
text-transform: uppercase ; | |||||
line-height: 13px ; | |||||
font-size: 15px ; | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } |
if (!$this->validate()) { | if (!$this->validate()) { | ||||
return $dataProvider; | return $dataProvider; | ||||
} | } | ||||
if(isset($this->id_user) && is_numeric($this->id_user)) { | |||||
$query->andWhere([ | |||||
'credit_history.id_user' => $this->id_user | |||||
]) ; | |||||
} | |||||
return $dataProvider; | return $dataProvider; | ||||
} | } |
return false ; | return false ; | ||||
} | } | ||||
/** | |||||
* Retourne le nombre de produits commandés | |||||
* | |||||
* @return integer | |||||
*/ | |||||
public function countProducts() | |||||
{ | |||||
$count = 0 ; | |||||
if($this->productOrder && is_array($this->productOrder)) { | |||||
foreach($this->productOrder as $productOrder) { | |||||
$count += $productOrder->quantity ; | |||||
} | |||||
} | |||||
return $count ; | |||||
} | |||||
/** | |||||
* Retourne un bloc html présentant une date. | |||||
* | |||||
* @return string | |||||
*/ | |||||
public function getBlockDate() | |||||
{ | |||||
return '<div class="block-date"> | |||||
<div class="day">'.strftime('%A', strtotime($this->distribution->date)).'</div> | |||||
<div class="num">'.date('d', strtotime($this->distribution->date)).'</div> | |||||
<div class="month">'.strftime('%B', strtotime($this->distribution->date)).'</div> | |||||
</div>' ; | |||||
} | |||||
} | } |
$query = Subscription::find() | $query = Subscription::find() | ||||
->with($optionsSearch['with']) | ->with($optionsSearch['with']) | ||||
->innerJoinWith($optionsSearch['join_with'], true) | |||||
->where(['subscription.id_producer' => Producer::getId()]) | |||||
->joinWith($optionsSearch['join_with'], true) | |||||
->where(['subscription.id_producer' => Producer::getId()]) | |||||
->groupBy('subscription.id') | |||||
; | ; | ||||
$dataProvider = new \yii\data\ActiveDataProvider([ | $dataProvider = new \yii\data\ActiveDataProvider([ |
@charset "UTF-8"; | @charset "UTF-8"; | ||||
/** | /** | ||||
Copyright La boîte à pain (2018) | |||||
Copyright distrib (2018) | |||||
contact@laboiteapain.net | |||||
contact@opendistrib.net | |||||
Ce logiciel est un programme informatique servant à aider les producteurs | Ce logiciel est un programme informatique servant à aider les producteurs | ||||
à distribuer leur production en circuits courts. | à distribuer leur production en circuits courts. |
@charset "UTF-8"; | @charset "UTF-8"; | ||||
/** | /** | ||||
Copyright La boîte à pain (2018) | |||||
Copyright distrib (2018) | |||||
contact@laboiteapain.net | |||||
contact@opendistrib.net | |||||
Ce logiciel est un programme informatique servant à aider les producteurs | Ce logiciel est un programme informatique servant à aider les producteurs | ||||
à distribuer leur production en circuits courts. | à distribuer leur production en circuits courts. |
@charset "UTF-8"; | @charset "UTF-8"; | ||||
/** | /** | ||||
Copyright La boîte à pain (2018) | |||||
Copyright distrib (2018) | |||||
contact@laboiteapain.net | |||||
contact@opendistrib.net | |||||
Ce logiciel est un programme informatique servant à aider les producteurs | Ce logiciel est un programme informatique servant à aider les producteurs | ||||
à distribuer leur production en circuits courts. | à distribuer leur production en circuits courts. | ||||
termes. | termes. | ||||
*/ | */ | ||||
/** | /** | ||||
Copyright La boîte à pain (2018) | |||||
Copyright distrib (2018) | |||||
contact@laboiteapain.net | |||||
contact@opendistrib.net | |||||
Ce logiciel est un programme informatique servant à aider les producteurs | Ce logiciel est un programme informatique servant à aider les producteurs | ||||
à distribuer leur production en circuits courts. | à distribuer leur production en circuits courts. | ||||
font-weight: normal; | font-weight: normal; | ||||
font-style: normal; | font-style: normal; | ||||
} | } | ||||
/* line 2, ../sass/_common.scss */ | |||||
.block-date { | |||||
margin: 0px auto; | |||||
padding-top: 0px; | |||||
text-align: center; | |||||
} | |||||
/* line 7, ../sass/_common.scss */ | |||||
.block-date .day { | |||||
text-transform: capitalize; | |||||
line-height: 15px; | |||||
font-size: 13px; | |||||
text-transform: uppercase; | |||||
} | |||||
/* line 14, ../sass/_common.scss */ | |||||
.block-date .num { | |||||
font-size: 30px; | |||||
line-height: 35px; | |||||
font-weight: bold; | |||||
} | |||||
/* line 20, ../sass/_common.scss */ | |||||
.block-date .month { | |||||
text-transform: uppercase; | |||||
line-height: 15px; | |||||
font-size: 13px; | |||||
color: #e67200; | |||||
} |
.block-date { | |||||
margin: 0px auto ; | |||||
padding-top: 0px ; | |||||
text-align: center ; | |||||
.day { | |||||
text-transform: capitalize ; | |||||
line-height: 15px ; | |||||
font-size: 13px ; | |||||
text-transform: uppercase ; | |||||
} | |||||
.num { | |||||
font-size: 30px ; | |||||
line-height: 35px ; | |||||
font-weight: bold ; | |||||
} | |||||
.month { | |||||
text-transform: uppercase ; | |||||
line-height: 15px ; | |||||
font-size: 13px ; | |||||
color: darken($color1, 5) ; | |||||
} | |||||
} |
termes. | termes. | ||||
*/ | */ | ||||
$color1: #FF7F00 ; | |||||
$dir-fonts: '../fonts/' ; | $dir-fonts: '../fonts/' ; | ||||
@import "_fonts.scss" ; | |||||
@import "_fonts.scss" ; | |||||
@import "_common.scss" ; |
public function actionHistory($returnPayment = '') | public function actionHistory($returnPayment = '') | ||||
{ | { | ||||
$searchModel = new CreditHistorySearch() ; | $searchModel = new CreditHistorySearch() ; | ||||
$searchModel->id_user = User::getCurrentId() ; | |||||
$dataProvider = $searchModel->search(Yii::$app->request->queryParams); | $dataProvider = $searchModel->search(Yii::$app->request->queryParams); | ||||
$userProducer = UserProducer::searchOne([ | $userProducer = UserProducer::searchOne([ |
} | } | ||||
} | } | ||||
return ['status' => 'success'] ; | |||||
return ['status' => 'success', 'idOrder' => $order->id] ; | |||||
} | } | ||||
/** | /** | ||||
return $json ; | return $json ; | ||||
} | } | ||||
public function actionConfirm($idOrder) | |||||
{ | |||||
$order = Order::searchOne(['id' => $idOrder]) ; | |||||
if(!$order || $order->id_user != User::getCurrentId()) { | |||||
throw new \yii\base\UserException('Commande introuvable.') ; | |||||
} | |||||
return $this->render('confirm',[ | |||||
'order' => $order | |||||
]) ; | |||||
} | |||||
} | } | ||||
$credit = ' <span class="label label-'.$labelType.'">'.number_format($userProducer->credit, 2).' €</span>' ; | $credit = ' <span class="label label-'.$labelType.'">'.number_format($userProducer->credit, 2).' €</span>' ; | ||||
} | } | ||||
$countSubcriptions = Subscription::searchCount(['subscription.id_user' => User::getCurrentId()]) ; | |||||
$countSubcriptions = Subscription::find() | |||||
->where([ | |||||
'subscription.id_user' => User::getCurrentId(), | |||||
'subscription.id_producer' => Producer::getId(), | |||||
])->count() ; | |||||
$labelSubscription = $countSubcriptions > 0 ? 'success' : 'default' ; | $labelSubscription = $countSubcriptions > 0 ? 'success' : 'default' ; | ||||
$countOrders = Order::find() | $countOrders = Order::find() | ||||
<div class="container"> | <div class="container"> | ||||
<div class="overflow"></div> | <div class="overflow"></div> | ||||
<div class="content"> | <div class="content"> | ||||
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']) ; ?>">distrib</a> | |||||
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/mentions']) ; ?>">Mentions légales</a> | |||||
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/cgv']) ; ?>">CGS</a> | |||||
<a id="code-source" href="https://framagit.org/guillaume-bourgeois/laboiteapain">Code source <img src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/logo-framagit.png" alt="Hébergé par Framasoft" /> <img src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/logo-gitlab.png" alt="Propulsé par Gitlab" /></a> | |||||
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']) ; ?>">distrib</a> • | |||||
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/mentions']) ; ?>">Mentions légales</a> • | |||||
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/cgv']) ; ?>">CGS</a> • | |||||
<a id="code-source" href="https://framagit.org/guillaume-bourgeois/distrib">Code source <img src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/logo-framagit.png" alt="Hébergé par Framasoft" /> <img src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/logo-gitlab.png" alt="Propulsé par Gitlab" /></a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</footer> | </footer> |
<?php | |||||
/** | |||||
Copyright distrib (2018) | |||||
contact@opendistrib.net | |||||
Ce logiciel est un programme informatique servant à aider les producteurs | |||||
à distribuer leur production en circuits courts. | |||||
Ce logiciel est régi par la licence CeCILL soumise au droit français et | |||||
respectant les principes de diffusion des logiciels libres. Vous pouvez | |||||
utiliser, modifier et/ou redistribuer ce programme sous les conditions | |||||
de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA | |||||
sur le site "http://www.cecill.info". | |||||
En contrepartie de l'accessibilité au code source et des droits de copie, | |||||
de modification et de redistribution accordés par cette licence, il n'est | |||||
offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, | |||||
seule une responsabilité restreinte pèse sur l'auteur du programme, le | |||||
titulaire des droits patrimoniaux et les concédants successifs. | |||||
A cet égard l'attention de l'utilisateur est attirée sur les risques | |||||
associés au chargement, à l'utilisation, à la modification et/ou au | |||||
développement et à la reproduction du logiciel par l'utilisateur étant | |||||
donné sa spécificité de logiciel libre, qui peut le rendre complexe à | |||||
manipuler et qui le réserve donc à des développeurs et des professionnels | |||||
avertis possédant des connaissances informatiques approfondies. Les | |||||
utilisateurs sont donc invités à charger et tester l'adéquation du | |||||
logiciel à leurs besoins dans des conditions permettant d'assurer la | |||||
sécurité de leurs systèmes et ou de leurs données et, plus généralement, | |||||
à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. | |||||
Le fait que vous puissiez accéder à cet en-tête signifie que vous avez | |||||
pris connaissance de la licence CeCILL, et que vous en avez accepté les | |||||
termes. | |||||
*/ | |||||
use common\models\Order ; | |||||
$this->setPageTitle('Confirmation de commande') ; | |||||
?> | |||||
<div id="order-success"> | |||||
<div class="alert alert-success"> | |||||
<span class="glyphicon glyphicon-ok glyphicon-big"></span> | |||||
<div class="content"> | |||||
<h3>Votre commande a bien été prise en compte</h3> | |||||
<a href="<?= Yii::$app->urlManagerProducer->createUrl(['order/history']) ?>" class="btn btn-default"> | |||||
<span class="glyphicon glyphicon-chevron-right"></span> | |||||
Voir toutes mes commandes | |||||
</a> | |||||
</div> | |||||
<div class="clr"></div> | |||||
</div> | |||||
<div class="alert alert-info"> | |||||
<span class="glyphicon glyphicon-list-alt glyphicon-big"></span> | |||||
<div class="content"> | |||||
<h3>Récapitulatif de votre commande</h3> | |||||
<ul> | |||||
<li><span class="glyphicon glyphicon-time"></span><?= date('d/m/Y',strtotime($order->distribution->date)) ?></li> | |||||
<li><span class="glyphicon glyphicon-map-marker"></span><?= Html::encode($order->pointSale->name) ?><?php if(strlen($order->pointSale->name)): ?> <span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?></li> | |||||
<li><span class="glyphicon glyphicon-th-list"></span><?= $order->countProducts(); ?> produit<?php if($order->countProducts() > 1): ?>s<?php endif; ?></li> | |||||
<li><span class="glyphicon glyphicon-chevron-right"></span><?= $order->getAmount(Order::AMOUNT_TOTAL, true); ?></li> | |||||
</ul> | |||||
</div> | |||||
<div class="clr"></div> | |||||
</div> | |||||
</div> |
use common\models\Order ; | use common\models\Order ; | ||||
$this->setTitle('Mes commandes') ; | $this->setTitle('Mes commandes') ; | ||||
$this->addButton(['label' => '<span class="glyphicon glyphicon-plus"></span> Ajouter', 'url' => 'order/order', 'class' => 'btn btn-primary']) ; | |||||
?> | ?> | ||||
[ | [ | ||||
'attribute' => 'distribution.date', | 'attribute' => 'distribution.date', | ||||
'label' => 'Date de livraison', | 'label' => 'Date de livraison', | ||||
'format' => 'raw', | |||||
'value' => function($model) { | 'value' => function($model) { | ||||
return date('d/m/Y', strtotime($model->distribution->date)) ; | |||||
return $model->getBlockDate() ; | |||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
'label' => 'Résumé', | |||||
'label' => 'Point de vente', | |||||
'format' => 'raw', | 'format' => 'raw', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
return $model->getCartSummary(); | |||||
return $model->getPointSaleSummary(); | |||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
'label' => 'Point de vente', | |||||
'label' => 'Résumé', | |||||
'format' => 'raw', | 'format' => 'raw', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
return $model->getPointSaleSummary(); | |||||
return $model->getCartSummary(); | |||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
} | } | ||||
else { | else { | ||||
if($c->getState() == Order::STATE_DELIVERED) { | if($c->getState() == Order::STATE_DELIVERED) { | ||||
$html .= 'Livrée' ; | |||||
$html .= '<span class="label label-success">Livrée</span>' ; | |||||
} | } | ||||
elseif($c->getState() == Order::STATE_PREPARATION) { | elseif($c->getState() == Order::STATE_PREPARATION) { | ||||
$html .= 'En préparation' ; | |||||
$html .= '<span class="label label-warning">En préparation</span>' ; | |||||
} | } | ||||
elseif($c->getState() == Order::STATE_OPEN) { | elseif($c->getState() == Order::STATE_OPEN) { | ||||
$link_subscription = ($c->id_subscription) ? '<li><a href="'.Yii::$app->urlManagerProducer->createUrl(['subscription/form','id'=>$c->id_subscription]).'"><span class="glyphicon glyphicon-repeat"></span> Modifier mon abonnement</a></li>' : '' ; | |||||
$html .= '<div class="btn-group"> | |||||
<a href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$c->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span> Modifier</a> | |||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | |||||
<span class="caret"></span> | |||||
<span class="sr-only">Toggle Dropdown</span> | |||||
</button> | |||||
<ul class="dropdown-menu" role="menu"> | |||||
'.$link_subscription.' | |||||
<li><a href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$c->id]).'"><span class="glyphicon glyphicon-trash"></span> Annuler la commande</a></li> | |||||
</ul> | |||||
</div>' ; | |||||
$html .= '<span class="label label-default">À venir</span>' ; | |||||
} | } | ||||
} | } | ||||
return $html ; | return $html ; | ||||
} | } | ||||
], | ], | ||||
[ | |||||
'label' => 'Actions', | |||||
'format' => 'raw', | |||||
'value' => function($c) { | |||||
$html = '' ; | |||||
if($c->getState() == Order::STATE_OPEN) { | |||||
$html .= '<a href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$c->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span></a> '. | |||||
'<a href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$c->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-trash"></span></a> '. | |||||
(($c->id_subscription) ? '<a href="'.Yii::$app->urlManagerProducer->createUrl(['subscription/form','id'=>$c->id_subscription]).'" class="btn btn-default"><span class="glyphicon glyphicon-repeat"></span></a>' : '') ; | |||||
} | |||||
return $html ; | |||||
} | |||||
] | |||||
] | ] | ||||
]); | ]); | ||||
<?php if(isset($order)): ?> | <?php if(isset($order)): ?> | ||||
<span id="order-distribution-date"><?= $order->distribution->date; ?></span> | <span id="order-distribution-date"><?= $order->distribution->date; ?></span> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<div v-if="orderSuccess" id="order-success"> | |||||
<div class="alert alert-success"> | |||||
<span class="glyphicon glyphicon-ok glyphicon-big"></span> | |||||
<div class="content"> | |||||
<h3>Votre commande a bien été prise en compte</h3> | |||||
<a href="<?= Yii::$app->urlManagerProducer->createUrl(['order/history']) ?>" class="btn btn-default"> | |||||
<span class="glyphicon glyphicon-chevron-right"></span> | |||||
Voir toutes mes commandes | |||||
</a> | |||||
</div> | |||||
<div class="clr"></div> | |||||
</div> | |||||
<div class="alert alert-info"> | |||||
<span class="glyphicon glyphicon-list-alt glyphicon-big"></span> | |||||
<div class="content"> | |||||
<h3>Récapitulatif de votre commande</h3> | |||||
<ul> | |||||
<li><span class="glyphicon glyphicon-time"></span> {{ dateFormat }}</li> | |||||
<li><span class="glyphicon glyphicon-map-marker"></span> {{ pointSaleActive.name }} <span class="locality" v-if="pointSaleActive.locality.length > 0">à {{ pointSaleActive.locality }}</span></li> | |||||
<li><span class="glyphicon glyphicon-th-list"></span> {{ countProductOrdered() }} produits</li> | |||||
<li><span class="glyphicon glyphicon-chevron-right"></span> {{ priceTotal(true) }}</li> | |||||
</ul> | |||||
</div> | |||||
<div class="clr"></div> | |||||
</div> | |||||
<div v-if="loadingInit && distributions.length == 0" class="alert alert-warning"> | |||||
Aucune distribution n'est prévue chez ce producteur. | |||||
</div> | </div> | ||||
<div v-else> | <div v-else> | ||||
<div :class="(producer != null && producer.order_infos.length) ? 'col-md-9' : 'col-md-12'"> | <div :class="(producer != null && producer.order_infos.length) ? 'col-md-9' : 'col-md-12'"> | ||||
<div class="clr"></div> | <div class="clr"></div> | ||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<div v-if="errors.length" class="alert alert-danger"> | |||||
<ul> | |||||
<li v-for="error in errors"> | |||||
{{ error }} | |||||
</li> | |||||
</ul> | |||||
</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'"> | ||||
<div id="legend"> | <div id="legend"> | ||||
<table id="products" class="table table-bordered" > | <table id="products" class="table table-bordered" > | ||||
<thead> | <thead> | ||||
<tr> | <tr> | ||||
<th>Photo</th> | |||||
<th>Nom</th> | <th>Nom</th> | ||||
<th>Prix unitaire</th> | <th>Prix unitaire</th> | ||||
<th>Quantité</th> | <th>Quantité</th> | ||||
</thead> | </thead> | ||||
<tbody> | <tbody> | ||||
<tr v-for="product in products" v-if="product.productDistribution[0].active == 1"> | <tr v-for="product in products" v-if="product.productDistribution[0].active == 1"> | ||||
<td class="photo"> | |||||
<img v-if="product.photo.length" class="photo-product" :src="'<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/uploads/'+product.photo" /> | |||||
</td> | |||||
<td class="name"> | <td class="name"> | ||||
<span class="name">{{ product.name }}</span> | <span class="name">{{ product.name }}</span> | ||||
<span class="other"> | <span class="other"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="block-actions"> | <div class="block-actions"> | ||||
<button class="btn btn-primary" @click="confirmClick">Je confirme ma commande</button> | |||||
<button class="btn btn-primary" disabled="disabled" v-if="disableConfirmButton">Je confirme ma commande</button> | |||||
<button class="btn btn-primary" v-else @click="confirmClick">Je confirme ma commande</button> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</transition> | </transition> |
'dataProvider' => $dataProviderPointsSale, | 'dataProvider' => $dataProviderPointsSale, | ||||
'summary' => '', | 'summary' => '', | ||||
'columns' => [ | 'columns' => [ | ||||
'name', | |||||
'locality', | |||||
[ | |||||
'attribute' => 'name', | |||||
'format' => 'raw', | |||||
'contentOptions' => ['class' => 'name'], | |||||
'value' => function($model) { | |||||
$html = '<span class="the-name">'.Html::encode($model->name).'</span>' ; | |||||
if(strlen($model->locality)) { | |||||
$html .= '<br />à '.Html::encode($model->locality) ; | |||||
} | |||||
return $html ; | |||||
} | |||||
], | |||||
[ | [ | ||||
'label' => 'Jours de livraison', | 'label' => 'Jours de livraison', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
[ | [ | ||||
'attribute' => 'photo', | 'attribute' => 'photo', | ||||
'format' => 'raw', | 'format' => 'raw', | ||||
'headerOptions' => ['class' => 'td-photo'], | |||||
'contentOptions' => ['class' => 'photo'], | |||||
'value' => function($model) { | 'value' => function($model) { | ||||
if(strlen($model->photo)) { | if(strlen($model->photo)) { | ||||
return '<img class="photo-product" src="'.Yii::$app->urlManagerProducer->baseUrl.'/uploads/'.$model->photo.'" />' ; | return '<img class="photo-product" src="'.Yii::$app->urlManagerProducer->baseUrl.'/uploads/'.$model->photo.'" />' ; | ||||
return '' ; | return '' ; | ||||
} | } | ||||
], | ], | ||||
'name', | |||||
'description', | |||||
[ | |||||
'attribute' => 'name', | |||||
'format' => 'raw', | |||||
'contentOptions' => ['class' => 'name'], | |||||
'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', | 'attribute' => 'weight', | ||||
'value' => function($model) { | 'value' => function($model) { | ||||
if(strlen($model->weight)) { | if(strlen($model->weight)) { | ||||
return $model->weight.'g' ; | |||||
return $model->weight.' g' ; | |||||
} | |||||
return '' ; | |||||
} | |||||
], | |||||
[ | |||||
'attribute' => 'price', | |||||
'value' => function($model) { | |||||
if($model->price) { | |||||
return Price::format($model->price) ; | |||||
} | } | ||||
return '' ; | return '' ; | ||||
} | } |
?> | ?> | ||||
<div class="subscription-form" id="app-subscription-form"> | |||||
<div class="subscription-form" id="app-subscription-form" :class="{'loaded': !loading}"> | |||||
<form @submit.prevent="formSubmit()" v-show="loading == false"> | <form @submit.prevent="formSubmit()" v-show="loading == false"> | ||||
use yii\grid\GridView; | use yii\grid\GridView; | ||||
$this->setTitle('Abonnements') ; | $this->setTitle('Abonnements') ; | ||||
$this->addButton(['label' => '+ Ajouter', 'url' => 'subscription/form', 'class' => 'btn btn-primary']) ; | |||||
$this->addButton(['label' => '<span class="glyphicon glyphicon-plus"></span> Ajouter', 'url' => 'subscription/form', 'class' => 'btn btn-primary']) ; | |||||
$columns = [ | $columns = [ | ||||
[ | [ | ||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
'attribute' => 'date_begin', | |||||
'label' => 'Date de début', | |||||
'format' => 'raw', | |||||
'attribute' => 'week_frequency', | |||||
'filter' => [ | |||||
1 => 'Toutes les semaines', | |||||
2 => 'Toutes les 2 semaines', | |||||
3 => 'Toutes les 3 semaines', | |||||
4 => 'Tous les mois'], | |||||
'value' => function($model) { | 'value' => function($model) { | ||||
$html = date('d/m/Y',strtotime($model->date_begin)) ; | |||||
return $html ; | |||||
if($model->week_frequency == 1) { | |||||
return 'Toutes les semaines' ; | |||||
} | |||||
else { | |||||
return 'Toutes les '.$model->week_frequency.' semaines' ; | |||||
} | |||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
} | } | ||||
], | ], | ||||
[ | [ | ||||
'attribute' => 'week_frequency', | |||||
'filter' => [ | |||||
1 => 'Toutes les semaines', | |||||
2 => 'Toutes les 2 semaines', | |||||
3 => 'Toutes les 3 semaines', | |||||
4 => 'Tous les mois'], | |||||
'attribute' => 'date_begin', | |||||
'label' => 'Date de début', | |||||
'format' => 'raw', | |||||
'value' => function($model) { | 'value' => function($model) { | ||||
if($model->week_frequency == 1) { | |||||
return 'Toutes les semaines' ; | |||||
} | |||||
else { | |||||
return 'Toutes les '.$model->week_frequency.' semaines' ; | |||||
} | |||||
$html = date('d/m/Y',strtotime($model->date_begin)) ; | |||||
return $html ; | |||||
} | } | ||||
], | ], | ||||
] ; | ] ; |
color: black; | color: black; | ||||
border-right: solid 1px #e0e0e0; | border-right: solid 1px #e0e0e0; | ||||
font-family: "capsuularegular"; | font-family: "capsuularegular"; | ||||
text-transform: uppercase; | |||||
font-size: 18px; | |||||
} | } | ||||
/* line 267, ../sass/_layout.scss */ | /* line 267, ../sass/_layout.scss */ | ||||
#main nav#main-nav ul li a .glyphicon { | |||||
font-size: 15px; | |||||
margin-right: 3px; | |||||
} | |||||
/* line 272, ../sass/_layout.scss */ | |||||
#main nav#main-nav ul li a span.label { | #main nav#main-nav ul li a span.label { | ||||
padding-bottom: 3px; | padding-bottom: 3px; | ||||
font-family: "Arial"; | font-family: "Arial"; | ||||
} | } | ||||
/* line 274, ../sass/_layout.scss */ | |||||
/* line 279, ../sass/_layout.scss */ | |||||
#main nav#main-nav ul li.active span.label, #main nav#main-nav ul li a:hover span.label { | #main nav#main-nav ul li.active span.label, #main nav#main-nav ul li a:hover span.label { | ||||
background-color: #e67200; | background-color: #e67200; | ||||
color: white; | color: white; | ||||
} | } | ||||
/* line 280, ../sass/_layout.scss */ | |||||
/* line 285, ../sass/_layout.scss */ | |||||
#main nav#main-nav ul li a:hover, #main nav#main-nav ul li.active a { | #main nav#main-nav ul li a:hover, #main nav#main-nav ul li.active a { | ||||
background: #FF7F00; | background: #FF7F00; | ||||
color: white; | color: white; | ||||
-webkit-border-radius: 0px; | -webkit-border-radius: 0px; | ||||
border-radius: 0px; | border-radius: 0px; | ||||
} | } | ||||
/* line 287, ../sass/_layout.scss */ | |||||
/* line 292, ../sass/_layout.scss */ | |||||
#main nav#main-nav ul li#btn-administration { | #main nav#main-nav ul li#btn-administration { | ||||
float: right; | float: right; | ||||
border-left: solid 1px #e0e0e0; | border-left: solid 1px #e0e0e0; | ||||
} | } | ||||
/* line 291, ../sass/_layout.scss */ | |||||
/* line 296, ../sass/_layout.scss */ | |||||
#main nav#main-nav ul li#btn-administration a { | #main nav#main-nav ul li#btn-administration a { | ||||
color: #FF7F00; | color: #FF7F00; | ||||
} | } | ||||
/* line 294, ../sass/_layout.scss */ | |||||
/* line 299, ../sass/_layout.scss */ | |||||
#main nav#main-nav ul li#btn-administration a:hover { | #main nav#main-nav ul li#btn-administration a:hover { | ||||
color: white; | color: white; | ||||
} | } | ||||
/* line 302, ../sass/_layout.scss */ | |||||
/* line 307, ../sass/_layout.scss */ | |||||
#main nav#main-nav #user { | #main nav#main-nav #user { | ||||
color: #FF7F00; | color: #FF7F00; | ||||
float: right; | float: right; | ||||
padding: 10px; | padding: 10px; | ||||
} | } | ||||
/* line 309, ../sass/_layout.scss */ | |||||
/* line 314, ../sass/_layout.scss */ | |||||
#main h2#page-title { | #main h2#page-title { | ||||
padding-left: 15px; | padding-left: 15px; | ||||
padding-right: 15px; | padding-right: 15px; | ||||
top: -10px; | top: -10px; | ||||
text-align: left; | text-align: left; | ||||
} | } | ||||
/* line 322, ../sass/_layout.scss */ | |||||
/* line 327, ../sass/_layout.scss */ | |||||
#main h2#page-title #buttons { | #main h2#page-title #buttons { | ||||
margin-bottom: 15px; | margin-bottom: 15px; | ||||
font-family: "Arial"; | font-family: "Arial"; | ||||
} | } | ||||
/* line 329, ../sass/_layout.scss */ | |||||
/* line 334, ../sass/_layout.scss */ | |||||
#main .container { | #main .container { | ||||
padding: 0px; | padding: 0px; | ||||
background-color: white; | background-color: white; | ||||
border-left: solid 1px #e0e0e0; | border-left: solid 1px #e0e0e0; | ||||
border-right: solid 1px #e0e0e0; | border-right: solid 1px #e0e0e0; | ||||
} | } | ||||
/* line 337, ../sass/_layout.scss */ | |||||
/* line 342, ../sass/_layout.scss */ | |||||
#main #content { | #main #content { | ||||
padding-bottom: 20px; | padding-bottom: 20px; | ||||
padding: 0px 20px 20px 20px; | padding: 0px 20px 20px 20px; | ||||
} | } | ||||
/* line 341, ../sass/_layout.scss */ | |||||
/* line 346, ../sass/_layout.scss */ | |||||
#main #content h1, #main #content h2, #main #content h3, #main #content h4, #main #content h5, #main #content h6 { | #main #content h1, #main #content h2, #main #content h3, #main #content h4, #main #content h5, #main #content h6 { | ||||
font-family: "highvoltageregular"; | font-family: "highvoltageregular"; | ||||
margin-top: 30px; | margin-top: 30px; | ||||
margin-bottom: 20px; | margin-bottom: 20px; | ||||
} | } | ||||
/* line 346, ../sass/_layout.scss */ | |||||
/* line 351, ../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 { | #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; | margin-top: 0px; | ||||
} | } | ||||
/* line 351, ../sass/_layout.scss */ | |||||
/* line 356, ../sass/_layout.scss */ | |||||
#main #content h1 { | #main #content h1 { | ||||
font-size: 30px; | font-size: 30px; | ||||
} | } | ||||
/* line 355, ../sass/_layout.scss */ | |||||
/* line 360, ../sass/_layout.scss */ | |||||
#main #content h2 { | #main #content h2 { | ||||
font-size: 25px; | font-size: 25px; | ||||
} | } | ||||
/* line 360, ../sass/_layout.scss */ | |||||
/* line 365, ../sass/_layout.scss */ | |||||
#main #content h3 { | #main #content h3 { | ||||
font-family: "highvoltageregular"; | font-family: "highvoltageregular"; | ||||
text-transform: uppercase; | text-transform: uppercase; | ||||
margin-bottom: 30px; | margin-bottom: 30px; | ||||
margin-top: 45px; | margin-top: 45px; | ||||
} | } | ||||
/* line 368, ../sass/_layout.scss */ | |||||
/* line 373, ../sass/_layout.scss */ | |||||
#main #content h3 span { | #main #content h3 span { | ||||
padding-top: 14px; | padding-top: 14px; | ||||
color: #323232; | color: #323232; | ||||
} | } | ||||
/* line 374, ../sass/_layout.scss */ | |||||
/* line 379, ../sass/_layout.scss */ | |||||
#main #content h4 { | #main #content h4 { | ||||
font-size: 20px; | font-size: 20px; | ||||
} | } | ||||
/* line 378, ../sass/_layout.scss */ | |||||
/* line 383, ../sass/_layout.scss */ | |||||
#main #content h5 { | #main #content h5 { | ||||
font-size: 18px; | font-size: 18px; | ||||
} | } | ||||
/* line 382, ../sass/_layout.scss */ | |||||
/* line 387, ../sass/_layout.scss */ | |||||
#main #content h6 { | #main #content h6 { | ||||
font-size: 16px; | font-size: 16px; | ||||
} | } | ||||
/* line 388, ../sass/_layout.scss */ | |||||
/* line 393, ../sass/_layout.scss */ | |||||
#main #content form .form-group .hint-block { | #main #content form .form-group .hint-block { | ||||
color: gray; | color: gray; | ||||
} | } | ||||
/* line 396, ../sass/_layout.scss */ | |||||
/* line 401, ../sass/_layout.scss */ | |||||
#footer { | #footer { | ||||
background-color: #F7F7F7; | background-color: #F7F7F7; | ||||
height: 100px; | height: 100px; | ||||
} | } | ||||
/* line 400, ../sass/_layout.scss */ | |||||
/* line 405, ../sass/_layout.scss */ | |||||
#footer .container { | #footer .container { | ||||
padding: 0px; | padding: 0px; | ||||
} | } | ||||
/* line 402, ../sass/_layout.scss */ | |||||
/* line 407, ../sass/_layout.scss */ | |||||
#footer .container .overflow { | #footer .container .overflow { | ||||
height: 30px; | height: 30px; | ||||
background-color: white; | background-color: white; | ||||
border-right: solid 1px #e0e0e0; | border-right: solid 1px #e0e0e0; | ||||
border-bottom: solid 1px #e0e0e0; | border-bottom: solid 1px #e0e0e0; | ||||
} | } | ||||
/* line 410, ../sass/_layout.scss */ | |||||
/* line 415, ../sass/_layout.scss */ | |||||
#footer .container .content { | #footer .container .content { | ||||
padding-top: 20px; | padding-top: 20px; | ||||
color: white; | |||||
color: black; | |||||
} | } | ||||
/* line 414, ../sass/_layout.scss */ | |||||
/* line 419, ../sass/_layout.scss */ | |||||
#footer .container .content a { | #footer .container .content a { | ||||
color: #323232; | |||||
color: black; | |||||
font-family: "capsuularegular"; | |||||
font-size: 18px; | |||||
padding-left: 10px; | |||||
padding-right: 10px; | |||||
} | |||||
/* line 426, ../sass/_layout.scss */ | |||||
#footer .container .content a:hover { | |||||
text-decoration: underline; | text-decoration: underline; | ||||
margin-right: 10px; | |||||
} | } | ||||
/* line 422, ../sass/_layout.scss */ | |||||
/* line 433, ../sass/_layout.scss */ | |||||
#footer .container #code-source img { | #footer .container #code-source img { | ||||
height: 20px; | height: 20px; | ||||
} | } | ||||
width: 100%; | width: 100%; | ||||
max-width: 500px; | max-width: 500px; | ||||
} | } | ||||
/* line 54, ../sass/site/_index.scss */ | |||||
.site-index #products img.photo-product { | |||||
/* line 55, ../sass/site/_index.scss */ | |||||
.site-index #points-sale .name { | |||||
color: #333; | |||||
} | |||||
/* line 57, ../sass/site/_index.scss */ | |||||
.site-index #points-sale .name .the-name { | |||||
font-family: "capsuularegular"; | |||||
font-size: 20px; | |||||
color: black; | |||||
} | |||||
/* line 67, ../sass/site/_index.scss */ | |||||
.site-index #products td.photo { | |||||
width: 100px; | width: 100px; | ||||
} | |||||
/* line 69, ../sass/site/_index.scss */ | |||||
.site-index #products td.photo img.photo-product { | |||||
width: 120px; | |||||
height: auto; | height: auto; | ||||
} | } | ||||
/* line 75, ../sass/site/_index.scss */ | |||||
.site-index #products .name { | |||||
color: #333; | |||||
} | |||||
/* line 77, ../sass/site/_index.scss */ | |||||
.site-index #products .name .the-name { | |||||
font-family: "capsuularegular"; | |||||
font-size: 20px; | |||||
color: black; | |||||
} | |||||
/* line 4, ../sass/site/_credit_history.scss */ | /* line 4, ../sass/site/_credit_history.scss */ | ||||
.site-credit-history #credit-user { | .site-credit-history #credit-user { | ||||
.order-history #tabs-orders-history li.active a { | .order-history #tabs-orders-history li.active a { | ||||
color: #333; | color: #333; | ||||
} | } | ||||
/* line 59, ../sass/order/_history.scss */ | |||||
.order-history table .locality { | |||||
color: gray; | |||||
} | |||||
/* line 3, ../sass/order/_order.scss */ | /* line 3, ../sass/order/_order.scss */ | ||||
.order-order #app-order-order { | .order-order #app-order-order { | ||||
} | } | ||||
/* line 171, ../sass/order/_order.scss */ | /* line 171, ../sass/order/_order.scss */ | ||||
.order-order #app-order-order table#points-sale td.name .the-name { | .order-order #app-order-order table#points-sale td.name .the-name { | ||||
text-transform: uppercase; | |||||
font-family: "capsuularegular"; | font-family: "capsuularegular"; | ||||
color: black; | color: black; | ||||
font-size: 20px; | font-size: 20px; | ||||
line-height: 25px; | line-height: 25px; | ||||
} | } | ||||
/* line 180, ../sass/order/_order.scss */ | |||||
/* line 179, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#points-sale td.actions { | .order-order #app-order-order table#points-sale td.actions { | ||||
width: 150px; | width: 150px; | ||||
} | } | ||||
/* line 182, ../sass/order/_order.scss */ | |||||
/* line 181, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#points-sale td.actions button { | .order-order #app-order-order table#points-sale td.actions button { | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
/* line 188, ../sass/order/_order.scss */ | |||||
/* line 187, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#points-sale tr.selected td { | .order-order #app-order-order table#points-sale tr.selected td { | ||||
background-color: white; | background-color: white; | ||||
} | } | ||||
/* line 196, ../sass/order/_order.scss */ | |||||
/* line 195, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#products td.photo img { | |||||
width: 100px; | |||||
} | |||||
/* line 201, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#products td.name .name { | .order-order #app-order-order table#products td.name .name { | ||||
text-transform: uppercase; | |||||
font-family: "capsuularegular"; | font-family: "capsuularegular"; | ||||
color: black; | color: black; | ||||
font-size: 20px; | font-size: 20px; | ||||
line-height: 25px; | line-height: 25px; | ||||
} | } | ||||
/* line 203, ../sass/order/_order.scss */ | |||||
/* line 207, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#products td.name .other { | .order-order #app-order-order table#products td.name .other { | ||||
font-size: 14px; | font-size: 14px; | ||||
color: #333; | color: #333; | ||||
} | } | ||||
/* line 207, ../sass/order/_order.scss */ | |||||
/* line 211, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#products td.name .recipe { | .order-order #app-order-order table#products td.name .recipe { | ||||
color: gray; | color: gray; | ||||
} | } | ||||
/* line 211, ../sass/order/_order.scss */ | |||||
/* line 215, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#products .price-unit, .order-order #app-order-order table#products .price-total { | .order-order #app-order-order table#products .price-unit, .order-order #app-order-order table#products .price-total { | ||||
width: 100px; | width: 100px; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 215, ../sass/order/_order.scss */ | |||||
/* line 219, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#products .td-quantity { | .order-order #app-order-order table#products .td-quantity { | ||||
width: 150px; | width: 150px; | ||||
} | } | ||||
/* line 217, ../sass/order/_order.scss */ | |||||
/* line 221, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#products .td-quantity input.quantity { | .order-order #app-order-order table#products .td-quantity input.quantity { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 223, ../sass/order/_order.scss */ | |||||
/* line 227, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order table#products tr.total .price-total { | .order-order #app-order-order table#products tr.total .price-total { | ||||
font-size: 23px; | font-size: 23px; | ||||
} | } | ||||
/* line 230, ../sass/order/_order.scss */ | |||||
/* line 234, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #content-step-payment .credit { | .order-order #app-order-order #content-step-payment .credit { | ||||
margin-top: 20px; | margin-top: 20px; | ||||
} | } | ||||
/* line 233, ../sass/order/_order.scss */ | |||||
/* line 237, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #content-step-payment .credit .info { | .order-order #app-order-order #content-step-payment .credit .info { | ||||
margin-left: 20px; | margin-left: 20px; | ||||
color: gray; | color: gray; | ||||
} | } | ||||
/* line 240, ../sass/order/_order.scss */ | |||||
/* line 244, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #infos { | .order-order #app-order-order #infos { | ||||
margin-top: 30px; | margin-top: 30px; | ||||
} | } | ||||
/* line 242, ../sass/order/_order.scss */ | |||||
/* line 246, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #infos .panel-body { | .order-order #app-order-order #infos .panel-body { | ||||
padding-top: 0px; | padding-top: 0px; | ||||
white-space: pre-line; | white-space: pre-line; | ||||
} | } | ||||
/* line 250, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #order-success .alert.alert-success .glyphicon-big { | |||||
/* line 5, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert.alert-success .glyphicon-big { | |||||
background-color: #00A65A; | background-color: #00A65A; | ||||
} | } | ||||
/* line 256, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #order-success .alert.alert-info .glyphicon-big { | |||||
/* line 11, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert.alert-info .glyphicon-big { | |||||
background-color: #0097BC; | background-color: #0097BC; | ||||
padding: 55px 30px; | padding: 55px 30px; | ||||
} | } | ||||
/* line 262, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #order-success .alert { | |||||
/* line 17, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert.alert-info .content .glyphicon { | |||||
margin-right: 5px; | |||||
} | |||||
/* line 23, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert { | |||||
padding: 0px; | padding: 0px; | ||||
} | } | ||||
/* line 264, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #order-success .alert .glyphicon-big { | |||||
/* line 25, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert .glyphicon-big { | |||||
font-size: 90px; | font-size: 90px; | ||||
color: white; | color: white; | ||||
padding: 30px; | padding: 30px; | ||||
float: left; | float: left; | ||||
} | } | ||||
/* line 271, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #order-success .alert div.content { | |||||
/* line 32, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert div.content { | |||||
color: #333; | color: #333; | ||||
padding: 20px; | padding: 20px; | ||||
margin-left: 151px; | margin-left: 151px; | ||||
} | } | ||||
/* line 276, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #order-success .alert div.content h3 { | |||||
/* line 37, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert div.content h3 { | |||||
font-family: "capsuularegular"; | font-family: "capsuularegular"; | ||||
font-size: 30px; | font-size: 30px; | ||||
color: #333; | color: #333; | ||||
line-height: 35px; | line-height: 35px; | ||||
text-transform: none; | text-transform: none; | ||||
} | } | ||||
/* line 289, ../sass/order/_order.scss */ | |||||
.order-order #app-order-order #order-success .alert div.content .locality { | |||||
/* line 50, ../sass/order/_confirm.scss */ | |||||
.order-confirm #main #order-success .alert div.content .locality { | |||||
color: gray; | color: gray; | ||||
} | } | ||||
color: gray; | color: gray; | ||||
} | } | ||||
/* line 7, ../sass/subscription/_form.scss */ | |||||
/* line 4, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form, | |||||
.subscription-update .subscription-form { | |||||
display: none; | |||||
} | |||||
/* line 8, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form.loaded, | |||||
.subscription-update .subscription-form.loaded { | |||||
display: block; | |||||
} | |||||
/* line 13, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .points-sale .locality, | .subscription-create .subscription-form .points-sale .locality, | ||||
.subscription-update .subscription-form .points-sale .locality { | .subscription-update .subscription-form .points-sale .locality { | ||||
color: gray; | color: gray; | ||||
} | } | ||||
/* line 10, ../sass/subscription/_form.scss */ | |||||
/* line 16, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .points-sale label, | .subscription-create .subscription-form .points-sale label, | ||||
.subscription-update .subscription-form .points-sale label { | .subscription-update .subscription-form .points-sale label { | ||||
cursor: pointer; | cursor: pointer; | ||||
} | } | ||||
/* line 16, ../sass/subscription/_form.scss */ | |||||
/* line 22, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .days .form-group, | .subscription-create .subscription-form .days .form-group, | ||||
.subscription-update .subscription-form .days .form-group { | .subscription-update .subscription-form .days .form-group { | ||||
float: left; | float: left; | ||||
margin-right: 15px; | margin-right: 15px; | ||||
} | } | ||||
/* line 26, ../sass/subscription/_form.scss */ | |||||
/* line 31, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .points-sale table tr.selected td, | .subscription-create .subscription-form .points-sale table tr.selected td, | ||||
.subscription-update .subscription-form .points-sale table tr.selected td { | .subscription-update .subscription-form .points-sale table tr.selected td { | ||||
background-color: white; | background-color: white; | ||||
} | } | ||||
/* line 31, ../sass/subscription/_form.scss */ | |||||
/* line 36, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .points-sale table .the-name, | |||||
.subscription-update .subscription-form .points-sale table .the-name { | |||||
font-family: "capsuularegular"; | |||||
font-size: 20px; | |||||
color: black; | |||||
} | |||||
/* line 42, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .points-sale table .block-code, | .subscription-create .subscription-form .points-sale table .block-code, | ||||
.subscription-update .subscription-form .points-sale table .block-code { | .subscription-update .subscription-form .points-sale table .block-code { | ||||
width: 150px; | width: 150px; | ||||
} | } | ||||
/* line 35, ../sass/subscription/_form.scss */ | |||||
/* line 46, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .points-sale table .actions, | .subscription-create .subscription-form .points-sale table .actions, | ||||
.subscription-update .subscription-form .points-sale table .actions { | .subscription-update .subscription-form .points-sale table .actions { | ||||
width: 150px; | width: 150px; | ||||
} | } | ||||
/* line 38, ../sass/subscription/_form.scss */ | |||||
/* line 49, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .points-sale table .actions button, | .subscription-create .subscription-form .points-sale table .actions button, | ||||
.subscription-update .subscription-form .points-sale table .actions button { | .subscription-update .subscription-form .points-sale table .actions button { | ||||
width: 100%; | width: 100%; | ||||
display: block; | display: block; | ||||
} | } | ||||
/* line 47, ../sass/subscription/_form.scss */ | |||||
/* line 58, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products .monday, .subscription-create .subscription-form .products .tuesday, .subscription-create .subscription-form .products .wednesday, .subscription-create .subscription-form .products .thursday, | .subscription-create .subscription-form .products .monday, .subscription-create .subscription-form .products .tuesday, .subscription-create .subscription-form .products .wednesday, .subscription-create .subscription-form .products .thursday, | ||||
.subscription-create .subscription-form .products .friday, .subscription-create .subscription-form .products .saturday, .subscription-create .subscription-form .products .sunday, .subscription-create .subscription-form .products .no-day, | .subscription-create .subscription-form .products .friday, .subscription-create .subscription-form .products .saturday, .subscription-create .subscription-form .products .sunday, .subscription-create .subscription-form .products .no-day, | ||||
.subscription-update .subscription-form .products .monday, | .subscription-update .subscription-form .products .monday, | ||||
.subscription-update .subscription-form .products .no-day { | .subscription-update .subscription-form .products .no-day { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 52, ../sass/subscription/_form.scss */ | |||||
/* line 63, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products .monday-active .monday, | .subscription-create .subscription-form .products .monday-active .monday, | ||||
.subscription-create .subscription-form .products .tuesday-active .tuesday, | .subscription-create .subscription-form .products .tuesday-active .tuesday, | ||||
.subscription-create .subscription-form .products .wednesday-active .wednesday, | .subscription-create .subscription-form .products .wednesday-active .wednesday, | ||||
.subscription-update .subscription-form .products .sunday-active .sunday { | .subscription-update .subscription-form .products .sunday-active .sunday { | ||||
display: block; | display: block; | ||||
} | } | ||||
/* line 62, ../sass/subscription/_form.scss */ | |||||
/* line 73, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products td.quantity, | .subscription-create .subscription-form .products td.quantity, | ||||
.subscription-update .subscription-form .products td.quantity { | .subscription-update .subscription-form .products td.quantity { | ||||
width: 150px; | width: 150px; | ||||
} | } | ||||
/* line 65, ../sass/subscription/_form.scss */ | |||||
/* line 76, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products td.quantity input, | .subscription-create .subscription-form .products td.quantity input, | ||||
.subscription-update .subscription-form .products td.quantity input { | .subscription-update .subscription-form .products td.quantity input { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 68, ../sass/subscription/_form.scss */ | |||||
/* line 79, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products td.quantity input.has-quantity, | .subscription-create .subscription-form .products td.quantity input.has-quantity, | ||||
.subscription-update .subscription-form .products td.quantity input.has-quantity { | .subscription-update .subscription-form .products td.quantity input.has-quantity { | ||||
font-weight: bold; | font-weight: bold; | ||||
} | } | ||||
/* line 74, ../sass/subscription/_form.scss */ | |||||
/* line 85, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products .name, | .subscription-create .subscription-form .products .name, | ||||
.subscription-update .subscription-form .products .name { | .subscription-update .subscription-form .products .name { | ||||
font-family: "comfortaalight"; | |||||
font-weight: bold; | |||||
text-transform: uppercase; | |||||
font-size: 18px; | |||||
font-family: "capsuularegular"; | |||||
font-size: 20px; | |||||
color: black; | |||||
} | } | ||||
/* line 81, ../sass/subscription/_form.scss */ | |||||
/* line 91, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products .description, | .subscription-create .subscription-form .products .description, | ||||
.subscription-update .subscription-form .products .description { | .subscription-update .subscription-form .products .description { | ||||
font-style: italic; | font-style: italic; | ||||
} | } | ||||
/* line 85, ../sass/subscription/_form.scss */ | |||||
/* line 95, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products .recipe, | .subscription-create .subscription-form .products .recipe, | ||||
.subscription-update .subscription-form .products .recipe { | .subscription-update .subscription-form .products .recipe { | ||||
font-size: 12px; | font-size: 12px; | ||||
} | } | ||||
/* line 89, ../sass/subscription/_form.scss */ | |||||
/* line 99, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products .price-unit, .subscription-create .subscription-form .products .price-total, | .subscription-create .subscription-form .products .price-unit, .subscription-create .subscription-form .products .price-total, | ||||
.subscription-update .subscription-form .products .price-unit, | .subscription-update .subscription-form .products .price-unit, | ||||
.subscription-update .subscription-form .products .price-total { | .subscription-update .subscription-form .products .price-total { | ||||
text-align: center; | text-align: center; | ||||
width: 150px; | width: 150px; | ||||
} | } | ||||
/* line 94, ../sass/subscription/_form.scss */ | |||||
/* line 104, ../sass/subscription/_form.scss */ | |||||
.subscription-create .subscription-form .products tr.total .price-total, | .subscription-create .subscription-form .products tr.total .price-total, | ||||
.subscription-update .subscription-form .products tr.total .price-total { | .subscription-update .subscription-form .products tr.total .price-total { | ||||
text-align: center; | text-align: center; |
producer: null, | producer: null, | ||||
date: null, | date: null, | ||||
dateFormat: null, | dateFormat: null, | ||||
distributions: [], | |||||
distribution: null, | distribution: null, | ||||
pointsSale: [], | pointsSale: [], | ||||
pointSaleActive: null, | pointSaleActive: null, | ||||
comment: '', | comment: '', | ||||
creditCheckbox: false, | creditCheckbox: false, | ||||
credit: 0, | credit: 0, | ||||
orderSuccess: false, | |||||
errors: [], | |||||
disableConfirmButton: false, | |||||
calendar: { | calendar: { | ||||
mode: 'single', | mode: 'single', | ||||
attrs: [], | attrs: [], | ||||
this.calendar.availableDates = [] ; | this.calendar.availableDates = [] ; | ||||
var distributions = response.data.distributions ; | var distributions = response.data.distributions ; | ||||
if(distributions.length) { | if(distributions.length) { | ||||
this.distributions = distributions ; | |||||
var arrayDate ; | var arrayDate ; | ||||
for(var i= 0; i < distributions.length; i++) { | for(var i= 0; i < distributions.length; i++) { | ||||
this.calendar.attrs.push({ | this.calendar.attrs.push({ | ||||
}); | }); | ||||
}, | }, | ||||
changeStep: function(step) { | changeStep: function(step) { | ||||
this.errors = [] ; | |||||
var oldStep = this.step ; | var oldStep = this.step ; | ||||
this.step = step ; | |||||
window.scroll(0, $('#page-title').position().top - 25) ; | |||||
if(oldStep == 'date' && step == 'point-sale') { | |||||
this.init() ; | |||||
if(oldStep == 'products' && step == 'payment') { | |||||
this.checkProducts() ; | |||||
} | |||||
if(!this.errors.length) { | |||||
this.step = step ; | |||||
window.scroll(0, $('#page-title').position().top - 25) ; | |||||
if(oldStep == 'date' && step == 'point-sale') { | |||||
this.init() ; | |||||
} | |||||
} | } | ||||
}, | }, | ||||
dayClick: function(day) { | dayClick: function(day) { | ||||
if(this.isAvailableDate(day.date)) { | if(this.isAvailableDate(day.date)) { | ||||
} | } | ||||
}, | }, | ||||
confirmClick: function() { | confirmClick: function() { | ||||
this.disableConfirmButton = true ; | |||||
var productsArray = {} ; | var productsArray = {} ; | ||||
for(var key in this.products) { | for(var key in this.products) { | ||||
if( this.products[key].quantity_form != null && | if( this.products[key].quantity_form != null && | ||||
products: productsArray | products: productsArray | ||||
}).then(response => { | }).then(response => { | ||||
if(response.data.status == 'success') { | if(response.data.status == 'success') { | ||||
this.orderSuccess = true ; | |||||
window.location.href = chat_base_url(true)+'order/confirm?idOrder='+response.data.idOrder ; | |||||
} | } | ||||
}); | }); | ||||
}, | |||||
checkProducts: function() { | |||||
if(!this.oneProductOrdered()) { | |||||
this.errors.push('Veuillez sélectionner au moins un produit.') ; | |||||
} | |||||
} | } | ||||
} | } | ||||
}); | }); |
color: black; | color: black; | ||||
border-right: solid 1px #e0e0e0 ; | border-right: solid 1px #e0e0e0 ; | ||||
font-family: 'capsuularegular' ; | font-family: 'capsuularegular' ; | ||||
text-transform: uppercase ; | |||||
font-size: 18px ; | |||||
.glyphicon { | |||||
font-size: 15px ; | |||||
margin-right: 3px ; | |||||
} | |||||
span.label { | span.label { | ||||
padding-bottom: 3px ; | padding-bottom: 3px ; | ||||
.content { | .content { | ||||
padding-top: 20px ; | padding-top: 20px ; | ||||
color: white ; | |||||
color: black ; | |||||
a { | a { | ||||
color: $courant ; | |||||
text-decoration: underline ; | |||||
margin-right: 10px ; | |||||
color: black ; | |||||
font-family: 'capsuularegular' ; | |||||
font-size: 18px ; | |||||
padding-left: 10px ; | |||||
padding-right: 10px ; | |||||
&:hover { | |||||
text-decoration: underline ; | |||||
} | |||||
} | } | ||||
} | } | ||||
.order-confirm #main { | |||||
#order-success { | |||||
.alert.alert-success { | |||||
.glyphicon-big { | |||||
background-color: #00A65A ; | |||||
} | |||||
} | |||||
.alert.alert-info { | |||||
.glyphicon-big { | |||||
background-color: #0097BC ; | |||||
padding: 55px 30px ; | |||||
} | |||||
.content { | |||||
.glyphicon { | |||||
margin-right: 5px ; | |||||
} | |||||
} | |||||
} | |||||
.alert { | |||||
padding: 0px ; | |||||
.glyphicon-big { | |||||
font-size: 90px ; | |||||
color: white ; | |||||
padding: 30px ; | |||||
float: left ; | |||||
} | |||||
div.content { | |||||
color: #333 ; | |||||
padding: 20px ; | |||||
margin-left: 151px ; | |||||
h3 { | |||||
font-family: 'capsuularegular' ; | |||||
font-size: 30px ; | |||||
color: #333 ; | |||||
margin-bottom: 20px ; | |||||
margin-top: 0px ; | |||||
margin-left: 0px ; | |||||
text-align: left ; | |||||
padding-left: 0px ; | |||||
line-height: 35px ; | |||||
text-transform: none ; | |||||
} | |||||
.locality { | |||||
color: gray ; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
&.active a { | &.active a { | ||||
color: #333 ; | color: #333 ; | ||||
} | } | ||||
} | |||||
} | |||||
} | |||||
table { | |||||
.locality { | |||||
color: gray ; | |||||
} | |||||
} | } | ||||
} | } |
table#points-sale { | table#points-sale { | ||||
td.name { | td.name { | ||||
.the-name { | .the-name { | ||||
text-transform: uppercase ; | |||||
font-family: 'capsuularegular' ; | font-family: 'capsuularegular' ; | ||||
color: black ; | color: black ; | ||||
font-size: 20px ; | font-size: 20px ; | ||||
} | } | ||||
table#products { | table#products { | ||||
td.photo { | |||||
img { | |||||
width: 100px ; | |||||
} | |||||
} | |||||
td.name { | td.name { | ||||
.name { | .name { | ||||
text-transform: uppercase ; | |||||
font-family: 'capsuularegular' ; | font-family: 'capsuularegular' ; | ||||
color: black ; | color: black ; | ||||
font-size: 20px ; | font-size: 20px ; | ||||
white-space: pre-line ; | white-space: pre-line ; | ||||
} | } | ||||
} | } | ||||
#order-success { | |||||
.alert.alert-success { | |||||
.glyphicon-big { | |||||
background-color: #00A65A ; | |||||
} | |||||
} | |||||
.alert.alert-info { | |||||
.glyphicon-big { | |||||
background-color: #0097BC ; | |||||
padding: 55px 30px ; | |||||
} | |||||
} | |||||
.alert { | |||||
padding: 0px ; | |||||
.glyphicon-big { | |||||
font-size: 90px ; | |||||
color: white ; | |||||
padding: 30px ; | |||||
float: left ; | |||||
} | |||||
div.content { | |||||
color: #333 ; | |||||
padding: 20px ; | |||||
margin-left: 151px ; | |||||
h3 { | |||||
font-family: 'capsuularegular' ; | |||||
font-size: 30px ; | |||||
color: #333 ; | |||||
margin-bottom: 20px ; | |||||
margin-top: 0px ; | |||||
margin-left: 0px ; | |||||
text-align: left ; | |||||
padding-left: 0px ; | |||||
line-height: 35px ; | |||||
text-transform: none ; | |||||
} | |||||
.locality { | |||||
color: gray ; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
@import "order/_form.scss"; | @import "order/_form.scss"; | ||||
@import "order/_history.scss"; | @import "order/_history.scss"; | ||||
@import "order/_order.scss"; | @import "order/_order.scss"; | ||||
@import "order/_confirm.scss"; | |||||
@import "credit/_add.scss"; | @import "credit/_add.scss"; | ||||
@import "subscription/_form.scss"; | @import "subscription/_form.scss"; | ||||
@import "_responsive.scss"; | @import "_responsive.scss"; |
} | } | ||||
} | } | ||||
} | } | ||||
#points-sale { | |||||
.name { | |||||
color: #333 ; | |||||
.the-name { | |||||
font-family: 'capsuularegular' ; | |||||
font-size: 20px ; | |||||
color: black ; | |||||
} | |||||
} | |||||
} | |||||
#products { | #products { | ||||
img.photo-product { | |||||
td.photo { | |||||
width: 100px ; | width: 100px ; | ||||
height: auto ; | |||||
img.photo-product { | |||||
width: 120px ; | |||||
height: auto ; | |||||
} | |||||
} | |||||
.name { | |||||
color: #333 ; | |||||
.the-name { | |||||
font-family: 'capsuularegular' ; | |||||
font-size: 20px ; | |||||
color: black ; | |||||
} | |||||
.recipe { | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } |
.subscription-update { | .subscription-update { | ||||
.subscription-form { | .subscription-form { | ||||
display: none ; | |||||
&.loaded { | |||||
display: block ; | |||||
} | |||||
.points-sale { | .points-sale { | ||||
.locality { | .locality { | ||||
color: gray ; | color: gray ; | ||||
.points-sale { | .points-sale { | ||||
table { | table { | ||||
tr.selected { | tr.selected { | ||||
td { | td { | ||||
background-color: $color2 ; | background-color: $color2 ; | ||||
} | } | ||||
} | } | ||||
.the-name { | |||||
font-family: 'capsuularegular' ; | |||||
font-size: 20px ; | |||||
color: black ; | |||||
} | |||||
.block-code { | .block-code { | ||||
width: 150px ; | width: 150px ; | ||||
} | } | ||||
} | } | ||||
.name { | .name { | ||||
font-family: "comfortaalight" ; | |||||
font-weight: bold ; | |||||
text-transform: uppercase ; | |||||
font-size: 18px ; | |||||
font-family: "capsuularegular" ; | |||||
font-size: 20px ; | |||||
color: black ; | |||||
} | } | ||||
.description { | .description { |