Browse Source

Améliorer le formulaire de commande avant la mise en ligne du site

Correction d'un bug : les prix restaient lorsque l'on changeait de jours de commande.
Correction d'un problème d'affichage des boulangeries.
Mise en place d'un scroll pour améliorer le processus de commande.
Mise en page différente de la barre fixe (boutons à gauche) pour que le système de chat n'empiète pas sur le reste.
master
keun 8 years ago
parent
commit
c7571a9323
7 changed files with 162 additions and 116 deletions
  1. +8
    -8
      frontend/views/commande/_form.php
  2. +12
    -12
      frontend/views/commande/index.php
  3. BIN
      frontend/web/.sass-cache/e1a48ee3204d3a535cdbe440c2995954a615ac19/_systeme_commandes.scssc
  4. +91
    -85
      frontend/web/css/screen.css
  5. +7
    -0
      frontend/web/js/boulange.js
  6. +34
    -7
      frontend/web/js/lechatdesnoisettes.js
  7. +10
    -4
      frontend/web/sass/_systeme_commandes.scss

+ 8
- 8
frontend/views/commande/_form.php View File

@@ -9,7 +9,7 @@ use yii\widgets\ActiveForm;
?>
<div class="commande-form">

<h2>Je choisis ma boulangerie</h2>
<h2 id="step-choix-etablissement">Je choisis ma boulangerie</h2>
<?php if(count($etablissements)): ?>
<?=
@@ -32,7 +32,7 @@ use yii\widgets\ActiveForm;
<?php if($id_etablissement): ?>
<h2>Date de commande</h2>
<h2 id="step-choix-date">Date de commande</h2>

<?= $form->field($model, 'id_production')->label('')->hiddenInput(); ?>

@@ -68,7 +68,7 @@ use yii\widgets\ActiveForm;
<div class="clr"></div>

<div id="depots">
<h2>Je choisis un dépôt</h2>
<h2 id="step-choix-depot">Je choisis un dépôt</h2>
<?=
$form->field($model, 'id_point_vente')
->label('')
@@ -105,7 +105,7 @@ use yii\widgets\ActiveForm;
<div id="produits">
<h2>Mes produits</h2>
<h2 id="step-choix-produits">Mes produits</h2>

<?php // confiance ?>
<input type="hidden" id="confiance" value="<?php echo (int) Yii::$app->user->identity->confiance; ?>" />
@@ -182,15 +182,15 @@ use yii\widgets\ActiveForm;

<div id="bar-fixed">
<div class="container">
<a href="<?php echo Yii::$app->urlManager->createUrl('commande/index') ?>" class="btn btn-default btn-retour">Retour</a>
<?php if (isset($model->id)): ?>
<a href="<?php echo Yii::$app->urlManager->createUrl(['commande/annuler', 'id' => $model->id]); ?>" class="btn btn-danger annuler-commande">Annuler ma commande</a>
<?php endif; ?>

<?= Html::submitButton('Valider ma commande', ['class' => 'btn btn-primary valider-commande']) ?>
<span id="total-commande-bottom"><span></span> €</span>
<?= Html::submitButton('<span class="glyphicon glyphicon-comment"></span>', ['class' => 'btn btn-default btn-commentaire', 'data-placement' => 'top', 'data-toggle' => 'tooltip', 'data-original-title' => 'Ajouter un commentaire']) ?>

<span id="total-commande-bottom"><span></span> €</span>
<?= Html::submitButton('Valider ma commande', ['class' => 'btn btn-primary valider-commande']) ?>
<div class="clr"></div>
<?= $form->field($model, 'commentaire')->textarea(['rows' => 3, 'placeholder' => 'Un commentaire ?'])->label(''); ?>

+ 12
- 12
frontend/views/commande/index.php View File

@@ -14,6 +14,17 @@ $this->title = 'Commande' ;

<h2>Boulangeries</h2>

<?php if($commande_ok): ?>
<div class="alert alert-success">
<div class="icon"></div>
Votre commande a bien été prise en compte.
</div>
<?php endif; ?>

<?php if($annule_ok): ?>
<div class="alert alert-success"><div class="icon"></div>Votre commande a bien été annulée.</div>
<?php endif; ?>

<div id="liste-boulangeries">
<?=
@@ -43,18 +54,7 @@ $this->title = 'Commande' ;
<?php if(count($commandes)): ?>
<p>Retrouvez ici vos dernières commandes.</p>
<?php if($commande_ok): ?>
<div class="alert alert-success">
<div class="icon"></div>
Votre commande a bien été prise en compte.
</div>
<?php endif; ?>
<?php if($annule_ok): ?>
<div class="alert alert-success"><div class="icon"></div>Votre commande a bien été annulée.</div>
<?php endif; ?>

<table id="historique-commandes" class="table table-striped table-bordered">
<thead>
<tr>

BIN
frontend/web/.sass-cache/e1a48ee3204d3a535cdbe440c2995954a615ac19/_systeme_commandes.scssc View File


+ 91
- 85
frontend/web/css/screen.css View File

@@ -498,25 +498,30 @@ h2 {
padding-right: 30px;
}
/* line 37, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel {
margin-bottom: 13px;
}
/* line 41, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie.selected .panel {
border-bottom: solid 3px #BB8757;
margin-bottom: 11px;
}
/* line 41, ../sass/_systeme_commandes.scss */
/* line 46, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-heading {
height: 200px;
height: 150px;
overflow: hidden;
padding: 0px;
background: none;
background-color: #F8F1DD;
}
/* line 48, ../sass/_systeme_commandes.scss */
/* line 53, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-heading .img-back {
width: 100%;
height: auto;
position: relative;
top: -50%;
}
/* line 57, ../sass/_systeme_commandes.scss */
/* line 62, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body {
position: relative;
width: 100%;
@@ -524,16 +529,16 @@ h2 {
max-height: 120px;
text-align: center;
}
/* line 64, ../sass/_systeme_commandes.scss */
/* line 69, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body h3 {
margin-bottom: 4px;
}
/* line 68, ../sass/_systeme_commandes.scss */
/* line 73, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .localite {
color: gray;
margin-bottom: 10px;
}
/* line 73, ../sass/_systeme_commandes.scss */
/* line 78, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .glyphicon-check {
color: #BB8757;
font-size: 40px;
@@ -541,13 +546,13 @@ h2 {
top: 34px;
left: 32px;
}
/* line 81, ../sass/_systeme_commandes.scss */
/* line 86, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .remove {
position: absolute;
top: 10px;
right: 10px;
}
/* line 87, ../sass/_systeme_commandes.scss */
/* line 92, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .logo {
display: none;
width: 150px;
@@ -559,11 +564,11 @@ h2 {
padding: 10px 20px;
}

/* line 101, ../sass/_systeme_commandes.scss */
/* line 106, ../sass/_systeme_commandes.scss */
#index-commande {
position: relative;
}
/* line 104, ../sass/_systeme_commandes.scss */
/* line 109, ../sass/_systeme_commandes.scss */
#index-commande #logout {
position: absolute;
/*top: 45px ;
@@ -572,117 +577,117 @@ h2 {
right: 0;
z-index: 10;
}
/* line 113, ../sass/_systeme_commandes.scss */
/* line 118, ../sass/_systeme_commandes.scss */
#index-commande .accueil {
text-align: center;
padding-bottom: 20px;
}
/* line 118, ../sass/_systeme_commandes.scss */
/* line 123, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement {
padding-left: 0px;
padding-right: 30px;
}
/* line 122, ../sass/_systeme_commandes.scss */
/* line 127, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .help-block {
padding-bottom: 0px;
}
/* line 126, ../sass/_systeme_commandes.scss */
/* line 131, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .field-addetablissementform-id_etablissement {
width: 80%;
float: left;
}
/* line 131, ../sass/_systeme_commandes.scss */
/* line 136, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .btn {
float: right;
position: relative;
top: 20px;
}
/* line 137, ../sass/_systeme_commandes.scss */
/* line 142, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .panel-heading {
background: none;
background-color: white;
cursor: pointer;
}
/* line 143, ../sass/_systeme_commandes.scss */
/* line 148, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .panel-body {
display: none;
}
/* line 149, ../sass/_systeme_commandes.scss */
/* line 154, ../sass/_systeme_commandes.scss */
#index-commande #addetablissementform-id_etablissement option:disabled {
font-weight: bold;
color: black;
}
/* line 156, ../sass/_systeme_commandes.scss */
/* line 161, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .statut, #index-commande #historique-commandes .montant {
width: 175px;
}
/* line 159, ../sass/_systeme_commandes.scss */
/* line 164, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .montant {
width: 100px;
}
/* line 166, ../sass/_systeme_commandes.scss */
/* line 171, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .localite {
font-size: 11px;
lin-height: 11px;
}
/* line 171, ../sass/_systeme_commandes.scss */
/* line 176, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes a {
text-decoration: none;
}

/* line 178, ../sass/_systeme_commandes.scss */
/* line 183, ../sass/_systeme_commandes.scss */
.commande-form {
min-height: 600px;
padding-bottom: 60px;
}
/* line 183, ../sass/_systeme_commandes.scss */
/* line 188, ../sass/_systeme_commandes.scss */
.commande-form h2 {
font-family: "myriadpro-regular";
}
/* line 187, ../sass/_systeme_commandes.scss */
/* line 192, ../sass/_systeme_commandes.scss */
.commande-form #infos-importantes.alert-warning {
float: right;
}
/* line 193, ../sass/_systeme_commandes.scss */
/* line 198, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker {
float: left;
margin-right: 20px;
font-size: 20px;
}
/* line 199, ../sass/_systeme_commandes.scss */
/* line 204, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker-header {
background-color: #BB8757;
}
/* line 203, ../sass/_systeme_commandes.scss */
/* line 208, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker-title {
color: white;
}
/* line 209, ../sass/_systeme_commandes.scss */
/* line 214, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker-prev:hover,
.commande-form #datepicker-production .ui-datepicker-next:hover {
border: 0px none;
background: none;
}
/* line 215, ../sass/_systeme_commandes.scss */
/* line 220, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-helper-clearfix:after {
clear: none;
}
/* line 220, ../sass/_systeme_commandes.scss */
/* line 225, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker-calendar a {
text-decoration: none;
background-color: #F8F1DD;
}
/* line 223, ../sass/_systeme_commandes.scss */
/* line 228, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker-calendar a.ui-state-hover, .commande-form #datepicker-production .ui-datepicker-calendar a.ui-state-active {
background-color: #BB8757;
color: white;
border-color: #cdc3b7;
}
/* line 232, ../sass/_systeme_commandes.scss */
/* line 237, ../sass/_systeme_commandes.scss */
.commande-form .date-commande {
margin-bottom: 53px;
}
/* line 234, ../sass/_systeme_commandes.scss */
/* line 239, ../sass/_systeme_commandes.scss */
.commande-form .date-commande span {
background-color: #BB8757;
color: white;
@@ -693,47 +698,47 @@ h2 {
font-family: "myriadpro-regular";
font-size: 20px;
}
/* line 244, ../sass/_systeme_commandes.scss */
/* line 249, ../sass/_systeme_commandes.scss */
.commande-form #has-commande-en-cours {
margin-top: 15px;
}
/* line 247, ../sass/_systeme_commandes.scss */
/* line 252, ../sass/_systeme_commandes.scss */
.commande-form #has-commande-en-cours a {
color: #a94442;
text-decoration: none;
font-weight: bold;
}
/* line 254, ../sass/_systeme_commandes.scss */
/* line 259, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production {
display: none;
}
/* line 258, ../sass/_systeme_commandes.scss */
/* line 263, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_point_vente {
margin-top: 30px;
}
/* line 262, ../sass/_systeme_commandes.scss */
/* line 267, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production {
margin-bottom: 0px;
}
/* line 264, ../sass/_systeme_commandes.scss */
/* line 269, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production label {
margin-bottom: 0px;
}
/* line 268, ../sass/_systeme_commandes.scss */
/* line 273, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production .help-block {
margin-bottom: 0px;
}
/* line 273, ../sass/_systeme_commandes.scss */
/* line 278, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_point_vente {
display: none;
}
/* line 277, ../sass/_systeme_commandes.scss */
/* line 282, ../sass/_systeme_commandes.scss */
.commande-form .blocs {
list-style-type: none;
margin: 0px;
padding: 0px;
}
/* line 282, ../sass/_systeme_commandes.scss */
/* line 287, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc {
text-decoration: none;
width: 268px;
@@ -748,107 +753,107 @@ h2 {
background-color: white;
border: 1px solid #d8d8d8;
}
/* line 297, ../sass/_systeme_commandes.scss */
/* line 302, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .nom {
font-family: "comfortaalight";
font-size: 20px;
}
/* line 303, ../sass/_systeme_commandes.scss */
/* line 308, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .adresse {
color: gray;
font-size: 13px;
line-height: 16px;
}
/* line 309, ../sass/_systeme_commandes.scss */
/* line 314, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .horaires {
margin-top: 7px;
}
/* line 311, ../sass/_systeme_commandes.scss */
/* line 316, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .horaires .jour {
font-weight: bold;
display: none;
}
/* line 317, ../sass/_systeme_commandes.scss */
/* line 323, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.selected {
border-left: solid 5px #BB8757;
}
/* line 321, ../sass/_systeme_commandes.scss */
/* line 326, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.selected .contenu {
position: relative;
left: -4px;
}
/* line 327, ../sass/_systeme_commandes.scss */
/* line 332, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc:hover {
-moz-box-shadow: 0px 0px 5px #d8d8d8;
-webkit-box-shadow: 0px 0px 5px #d8d8d8;
box-shadow: 0px 0px 5px #d8d8d8;
}
/* line 332, ../sass/_systeme_commandes.scss */
/* line 337, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.disabled {
display: none;
}
/* line 339, ../sass/_systeme_commandes.scss */
/* line 344, ../sass/_systeme_commandes.scss */
.commande-form #produits {
margin-top: 15px;
}
/* line 342, ../sass/_systeme_commandes.scss */
/* line 347, ../sass/_systeme_commandes.scss */
.commande-form #produits #label-produits {
display: block;
margin-bottom: 5px;
}
/* line 347, ../sass/_systeme_commandes.scss */
/* line 352, ../sass/_systeme_commandes.scss */
.commande-form #produits .table {
margin-top: 7px;
}
/* line 350, ../sass/_systeme_commandes.scss */
/* line 355, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .illu {
float: left;
height: auto;
width: 70px;
margin-right: 15px;
}
/* line 357, ../sass/_systeme_commandes.scss */
/* line 362, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .photo {
padding: 0px;
width: 120px;
}
/* line 362, ../sass/_systeme_commandes.scss */
/* line 367, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .th-photo, .commande-form #produits .table .td-photo {
width: 120px;
}
/* line 366, ../sass/_systeme_commandes.scss */
/* line 371, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .nom {
font-family: "comfortaalight";
font-weight: bold;
text-transform: uppercase;
font-size: 18px;
}
/* line 373, ../sass/_systeme_commandes.scss */
/* line 378, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .description {
font-style: italic;
}
/* line 377, ../sass/_systeme_commandes.scss */
/* line 382, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .recette {
font-size: 12px;
}
/* line 381, ../sass/_systeme_commandes.scss */
/* line 386, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .input-group {
width: 133px;
}
/* line 383, ../sass/_systeme_commandes.scss */
/* line 388, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .input-group .quantity {
text-align: center;
}
/* line 388, ../sass/_systeme_commandes.scss */
/* line 393, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .colonne-quantite, .commande-form #produits .table .prix-unit, .commande-form #produits .table .total {
width: 150px;
text-align: center;
}
/* line 393, ../sass/_systeme_commandes.scss */
/* line 398, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td#total-commande, .commande-form #produits .table td#total-commande-vrac, .commande-form #produits .table td.total {
text-align: center;
}
/* line 397, ../sass/_systeme_commandes.scss */
/* line 402, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .epuise {
display: none;
text-transform: uppercase;
@@ -857,33 +862,34 @@ h2 {
font-size: 16px;
text-align: center;
}
/* line 406, ../sass/_systeme_commandes.scss */
/* line 411, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .quantite-restante {
font-size: 12px;
margin-top: 8px;
}
/* line 410, ../sass/_systeme_commandes.scss */
/* line 415, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .quantite-restante .nb {
font-weight: bold;
}
/* line 415, ../sass/_systeme_commandes.scss */
/* line 420, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.produit, .commande-form #produits .table th.produit {
width: 70%;
}
/* line 419, ../sass/_systeme_commandes.scss */
/* line 424, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.prix-unit, .commande-form #produits .table th.prix-unit {
width: 10%;
}
/* line 423, ../sass/_systeme_commandes.scss */
/* line 428, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.colonne-quantite, .commande-form #produits .table th.colonne-quantite {
width: 10%;
}
/* line 427, ../sass/_systeme_commandes.scss */
/* line 432, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.total, .commande-form #produits .table th.total {
width: 10%;
}
/* line 433, ../sass/_systeme_commandes.scss */
/* line 438, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed {
display: none;
position: fixed;
bottom: 0px;
z-index: 100;
@@ -901,7 +907,7 @@ h2 {
background-color: #F8F1DD;
text-align: center;
}
/* line 449, ../sass/_systeme_commandes.scss */
/* line 455, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed.not-fixed {
position: relative;
-moz-box-shadow: none;
@@ -913,7 +919,7 @@ h2 {
border: solid 1px #e0e0e0;
padding-right: 20px;
}
/* line 457, ../sass/_systeme_commandes.scss */
/* line 463, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed #total-commande-bottom {
background-color: white;
-moz-border-radius: 20px;
@@ -922,37 +928,37 @@ h2 {
padding: 5px 25px;
border: solid 1px #e0e0e0;
}
/* line 464, ../sass/_systeme_commandes.scss */
/* line 470, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .valider-commande, .commande-form #bar-fixed .btn-commentaire {
float: right;
float: left;
}
/* line 468, ../sass/_systeme_commandes.scss */
/* line 474, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .btn-commentaire {
margin-right: 10px;
}
/* line 472, ../sass/_systeme_commandes.scss */
/* line 478, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .btn-retour, .commande-form #bar-fixed .annuler-commande {
float: left;
margin-right: 5px;
}
/* line 477, ../sass/_systeme_commandes.scss */
/* line 483, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .annuler-commande {
color: #b92c28;
background-color: white;
}
/* line 482, ../sass/_systeme_commandes.scss */
/* line 488, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed #total-commande-bottom {
display: none;
font-weight: bold;
font-family: "comfortaalight";
font-size: 24px;
}
/* line 489, ../sass/_systeme_commandes.scss */
/* line 495, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .field-commande-commentaire {
display: none;
}

/* line 497, ../sass/_systeme_commandes.scss */
/* line 503, ../sass/_systeme_commandes.scss */
.ui-datepicker .ui-widget-header {
background: none;
background-color: gray;
@@ -960,7 +966,7 @@ h2 {
color: black;
font-weight: normal;
}
/* line 505, ../sass/_systeme_commandes.scss */
/* line 511, ../sass/_systeme_commandes.scss */
.ui-datepicker .ui-datepicker-current-day a,
.ui-datepicker a.ui-state-hover {
background: none;

+ 7
- 0
frontend/web/js/boulange.js View File

@@ -8,8 +8,15 @@ $(document).ready(function()
{
boulange_signup() ;
boulange_index_commandes() ;
});

function boulange_scroll(id) {
$('html,body').animate({
scrollTop: $("#"+id).offset().top},
1000);
}

function boulange_index_commandes()
{
$('#bloc-add-etablissement .panel-heading').click(function() {

+ 34
- 7
frontend/web/js/lechatdesnoisettes.js View File

@@ -64,7 +64,7 @@ function chat_profil_user() {
}
}

function chat_event_click_point_vente(id) {
function chat_event_click_point_vente(id, force) {
$('#commande-id_point_vente').val(id) ;
$('#points-vente .point-vente').removeClass('selected') ;
@@ -92,7 +92,11 @@ function chat_event_click_point_vente(id) {
$('#vrac .indisponible').show() ;
}
$('#produits, .valider-commande, .btn-commentaire').fadeIn() ;
$('#produits, .valider-commande, .btn-commentaire, #bar-fixed').fadeIn() ;
// scroll
if(!force)
boulange_scroll('step-choix-produits') ;
}

function chat_init_horaire_point_vente(date) {
@@ -124,16 +128,26 @@ function chat_init_horaire_point_vente(date) {
function chat_systeme_commande() {
if($('.commande-form').size()) {
// scroll initial
if($('.boulangerie.selected').size())
{
boulange_scroll('step-choix-date') ;
}
else {
boulange_scroll('step-choix-etablissement') ;
}
// affichage des différentes parties du formulaire
if(!$('#commande-id_production').val()) {
$('#depots, #points-vente, #produits, .valider-commande, #info-horaire-retrait-commande, .btn-commentaire').hide() ;
$('#depots, #points-vente, #produits, .valider-commande, #info-horaire-retrait-commande, .btn-commentaire, #bar-fixed').hide() ;
}
else if(!$('#commande-id_point_vente').val()) {
$('#produits, .valider-commande, .btn-commentaire').hide() ;
$('#produits, .valider-commande, .btn-commentaire, #bar-fixed').hide() ;
}
if($('#commande-id_point_vente').val())
chat_event_click_point_vente($('#commande-id_point_vente').val()) ;
chat_event_click_point_vente($('#commande-id_point_vente').val(), true) ;
$('#points-vente .point-vente').click(function() {
var id = parseInt($(this).find('.id').html()) ;
@@ -164,7 +178,10 @@ function chat_systeme_commande() {
//return [ dates_production.indexOf(string) != -1 ] ;
},
onSelect: function(selectedDate) {
// on remet tout les prix à zéro
chat_systeme_commande_reset_table_prix() ;
$('#has-commande-en-cours').hide() ;
var tab_date = selectedDate.split('/') ;
@@ -196,7 +213,7 @@ function chat_systeme_commande() {
chat_systeme_commande_produits_dispos(tab_date[2]+'-'+tab_date[1]+'-'+tab_date[0], date) ;
$('#produits, .valider-commande, .btn-commentaire').hide() ;
$('#produits, .valider-commande, .btn-commentaire, #bar-fixed').hide() ;
// déselection points de vente
$('#points-vente .point-vente').removeClass('selected') ;
@@ -204,6 +221,9 @@ function chat_systeme_commande() {
// affichage points de vente
$('#depots, #points-vente, #info-horaire-retrait-commande').fadeIn() ;
// scroll
boulange_scroll('step-choix-depot') ;
}
}
@@ -379,6 +399,13 @@ function chat_systeme_commande_produits_dispos(str_date, date) {
}, 'json') ;
}

function chat_systeme_commande_reset_table_prix() {
$('#table-produits tr .colonne-quantite .quantity').each(function() {
$(this).val(0) ;
}) ;
chat_systeme_commande_maj_table_prix() ;
}

function chat_systeme_commande_maj_table_prix() {
// produits pain

+ 10
- 4
frontend/web/sass/_systeme_commandes.scss View File

@@ -33,14 +33,19 @@ h2 {
.boulangerie {
padding-left: 0px ;
padding-right: 30px ;

.panel {
margin-bottom: 13px ;
}
&.selected .panel {
border-bottom: solid 3px $color1 ;
margin-bottom: 11px ;
}
.panel-heading {

height: 200px ;
height: 150px ;
overflow: hidden ;
padding: 0px ;
background: none ;
@@ -314,10 +319,10 @@ h2 {
}
}
&.selected {
border-left: solid 5px $color1 ;
//@include box-shadow(0px 0px 5px #d8d8d8) ;
.contenu {
position: relative ;
left: -4px ;
@@ -431,6 +436,7 @@ h2 {
}

#bar-fixed {
display: none ;
position: fixed ;
bottom: 0px ;
//left: 0px ;
@@ -462,7 +468,7 @@ h2 {
}
.valider-commande, .btn-commentaire {
float: right ;
float: left ;
}
.btn-commentaire {

Loading…
Cancel
Save