Quellcode durchsuchen

Intégrer le système multi-boulangerie à la page de commande

prodstable
keun vor 8 Jahren
Ursprung
Commit
c1f4c65839
6 geänderte Dateien mit 144 neuen und 71 gelöschten Zeilen
  1. +1
    -1
      frontend/views/commande/_form.php
  2. +18
    -9
      frontend/views/commande/index.php
  3. BIN
      frontend/web/.sass-cache/e1a48ee3204d3a535cdbe440c2995954a615ac19/_systeme_commandes.scssc
  4. +85
    -59
      frontend/web/css/screen.css
  5. +12
    -1
      frontend/web/js/boulange.js
  6. +28
    -1
      frontend/web/sass/_systeme_commandes.scss

+ 1
- 1
frontend/views/commande/_form.php Datei anzeigen

@@ -59,7 +59,7 @@ use yii\widgets\ActiveForm;
<div class="clr"></div>
<div id="commandes-en-cours" style="display:none;">
<?php foreach ($commandes_en_cours as $c): ?>
<?php echo '<div class="commande" data-idproduction="' . $c->id_production . '" data-id="' . $c->id . '" data-href="' . Yii::$app->urlManager->createUrl(['commande/update', 'id' => $c->id]) . '"></div>'; ?>
<?php echo '<div class="commande" data-idproduction="' . $c->id_production . '" data-id="' . $c->id . '" data-href="' . Yii::$app->urlManager->createUrl(['commande/update', 'id' => $c->id, 'id_etablissement' => $c->production->id_etablissement]) . '"></div>'; ?>
<?php endforeach; ?>
</div>
<div id="has-commande-en-cours" style="display:none;" class="alert alert-danger">Vous avez déjà une commande en cours pour cette date. <a href="#">Cliquez ici</a> pour la modifier.</div>

+ 18
- 9
frontend/views/commande/index.php Datei anzeigen

@@ -15,10 +15,10 @@ $this->title = 'Commande' ;
<h2>Boulangeries</h2>

<div id="liste-boulangeries">
<div id="bloc-liste-boulangeries" class="col-md-6">
<!--<div id="bloc-liste-boulangeries" class="col-md-6">-->
<?php if(count($etablissements)): ?>
<?php foreach($etablissements as $e): ?>
<div class="">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
@@ -37,17 +37,26 @@ $this->title = 'Commande' ;
</div>
<?php endforeach; ?>
<?php else: ?>
<div class="alert alert-info">Aucune boulangerie.<br />
Utilisez le formulaire pour ajouter une boulangerie proche de chez vous.</div>
<div class="alert alert-info">Aucune boulangerie</div>
<?php endif; ?>
</div>
<div class="col-md-6" id="bloc-add-etablissement">
<?php $form = ActiveForm::begin(['id' => 'form-add-boulanger','enableClientValidation'=> false]); ?>
<?= $form->field($model_form_etablissement, 'id_etablissement')->dropDownList($data_etablissements_dispos, ['prompt' => '--','encode' => false,'options' => $options_etablissements_dispos]) ?>
<?= Html::submitButton('<span class="glyphicon glyphicon-plus"></span> Ajouter', ['class' => 'btn btn-default', 'name' => 'add-etablissement-button']) ?>
<?php ActiveForm::end(); ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><span class="glyphicon glyphicon-plus"></span> Ajouter une boulangerie</h3>
</div>
<div class="panel-body">
<?php $form = ActiveForm::begin(['id' => 'form-add-boulanger','enableClientValidation'=> false]); ?>
<?= $form->field($model_form_etablissement, 'id_etablissement')->label('')->dropDownList($data_etablissements_dispos, ['prompt' => '--','encode' => false,'options' => $options_etablissements_dispos]) ?>
<?= Html::submitButton('<span class="glyphicon glyphicon-plus"></span> Ajouter', ['class' => 'btn btn-default', 'name' => 'add-etablissement-button']) ?>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>
</div>
<!--</div>-->
<div class="clr"></div>

<!--<div class="accueil">

BIN
frontend/web/.sass-cache/e1a48ee3204d3a535cdbe440c2995954a615ac19/_systeme_commandes.scssc Datei anzeigen


+ 85
- 59
frontend/web/css/screen.css Datei anzeigen

@@ -481,99 +481,125 @@ h2 {
/* line 53, ../sass/_systeme_commandes.scss */
#index-commande #liste-boulangeries .logo {
width: 30%;
max-width: 200px;
max-height: 60px;
float: right;
padding-left: 20px;
}
/* line 63, ../sass/_systeme_commandes.scss */
/* line 64, ../sass/_systeme_commandes.scss */
#index-commande #liste-boulangeries h3 .localite {
color: gray;
}
/* line 72, ../sass/_systeme_commandes.scss */
/* line 70, ../sass/_systeme_commandes.scss */
#index-commande #liste-boulangeries .panel-body {
height: 108px;
max-height: 108px;
}
/* line 78, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .help-block {
padding-bottom: 0px;
}
/* line 78, ../sass/_systeme_commandes.scss */
/* line 82, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .field-addetablissementform-id_etablissement {
width: 80%;
float: left;
}
/* line 87, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .btn {
float: right;
position: relative;
top: 20px;
}
/* line 93, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .panel-heading {
background: none;
background-color: white;
cursor: pointer;
}
/* line 99, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .panel-body {
display: none;
}
/* line 105, ../sass/_systeme_commandes.scss */
#index-commande #addetablissementform-id_etablissement option:disabled {
font-weight: bold;
color: black;
}
/* line 85, ../sass/_systeme_commandes.scss */
/* line 112, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .statut, #index-commande #historique-commandes .montant {
width: 175px;
}
/* line 88, ../sass/_systeme_commandes.scss */
/* line 115, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .montant {
width: 100px;
}
/* line 95, ../sass/_systeme_commandes.scss */
/* line 122, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .localite {
font-size: 11px;
lin-height: 11px;
}
/* line 100, ../sass/_systeme_commandes.scss */
/* line 127, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes a {
text-decoration: none;
}

/* line 107, ../sass/_systeme_commandes.scss */
/* line 134, ../sass/_systeme_commandes.scss */
.commande-form {
min-height: 600px;
}
/* line 111, ../sass/_systeme_commandes.scss */
/* line 138, ../sass/_systeme_commandes.scss */
.commande-form h2 {
font-family: "myriadpro-regular";
}
/* line 115, ../sass/_systeme_commandes.scss */
/* line 142, ../sass/_systeme_commandes.scss */
.commande-form #infos-importantes.alert-warning {
float: right;
}
/* line 121, ../sass/_systeme_commandes.scss */
/* line 148, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker {
float: left;
margin-right: 20px;
}
/* line 126, ../sass/_systeme_commandes.scss */
/* line 153, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-helper-clearfix:after {
clear: none;
}
/* line 130, ../sass/_systeme_commandes.scss */
/* line 157, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .alert-info {
float: left;
}
/* line 135, ../sass/_systeme_commandes.scss */
/* line 162, ../sass/_systeme_commandes.scss */
.commande-form #has-commande-en-cours {
margin-top: 15px;
}
/* line 138, ../sass/_systeme_commandes.scss */
/* line 165, ../sass/_systeme_commandes.scss */
.commande-form #has-commande-en-cours a {
color: #a94442;
text-decoration: none;
font-weight: bold;
}
/* line 145, ../sass/_systeme_commandes.scss */
/* line 172, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_point_vente {
margin-top: 30px;
}
/* line 149, ../sass/_systeme_commandes.scss */
/* line 176, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production {
margin-bottom: 0px;
}
/* line 151, ../sass/_systeme_commandes.scss */
/* line 178, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production label {
margin-bottom: 0px;
}
/* line 155, ../sass/_systeme_commandes.scss */
/* line 182, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production .help-block {
margin-bottom: 0px;
}
/* line 160, ../sass/_systeme_commandes.scss */
/* line 187, ../sass/_systeme_commandes.scss */
.commande-form .blocs {
list-style-type: none;
margin: 0px;
padding: 0px;
}
/* line 165, ../sass/_systeme_commandes.scss */
/* line 192, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc {
text-decoration: none;
width: 268px;
@@ -587,107 +613,107 @@ h2 {
background-color: #f9f9f9;
border: 1px solid #d8d8d8;
}
/* line 179, ../sass/_systeme_commandes.scss */
/* line 206, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .nom {
font-family: "comfortaalight";
font-size: 20px;
}
/* line 185, ../sass/_systeme_commandes.scss */
/* line 212, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .adresse {
color: gray;
font-size: 13px;
line-height: 16px;
}
/* line 191, ../sass/_systeme_commandes.scss */
/* line 218, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .horaires {
margin-top: 7px;
}
/* line 193, ../sass/_systeme_commandes.scss */
/* line 220, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .horaires .jour {
font-weight: bold;
display: none;
}
/* line 199, ../sass/_systeme_commandes.scss */
/* line 226, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.selected {
border-left: solid 5px black;
-moz-box-shadow: 0px 0px 5px #d8d8d8;
-webkit-box-shadow: 0px 0px 5px #d8d8d8;
box-shadow: 0px 0px 5px #d8d8d8;
}
/* line 203, ../sass/_systeme_commandes.scss */
/* line 230, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.selected .contenu {
position: relative;
left: -4px;
}
/* line 209, ../sass/_systeme_commandes.scss */
/* line 236, ../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 214, ../sass/_systeme_commandes.scss */
/* line 241, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.disabled {
display: none;
}
/* line 221, ../sass/_systeme_commandes.scss */
/* line 248, ../sass/_systeme_commandes.scss */
.commande-form #produits {
margin-top: 15px;
}
/* line 224, ../sass/_systeme_commandes.scss */
/* line 251, ../sass/_systeme_commandes.scss */
.commande-form #produits #label-produits {
display: block;
margin-bottom: 5px;
}
/* line 229, ../sass/_systeme_commandes.scss */
/* line 256, ../sass/_systeme_commandes.scss */
.commande-form #produits .table {
margin-top: 7px;
}
/* line 232, ../sass/_systeme_commandes.scss */
/* line 259, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .illu {
float: left;
height: auto;
width: 70px;
margin-right: 15px;
}
/* line 239, ../sass/_systeme_commandes.scss */
/* line 266, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .photo {
float: right;
margin-left: 10px;
width: 200px;
}
/* line 245, ../sass/_systeme_commandes.scss */
/* line 272, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .nom {
font-family: "comfortaalight";
font-weight: bold;
text-transform: uppercase;
font-size: 18px;
}
/* line 252, ../sass/_systeme_commandes.scss */
/* line 279, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .description {
font-style: italic;
}
/* line 256, ../sass/_systeme_commandes.scss */
/* line 283, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .recette {
font-size: 12px;
}
/* line 260, ../sass/_systeme_commandes.scss */
/* line 287, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .input-group {
width: 133px;
}
/* line 262, ../sass/_systeme_commandes.scss */
/* line 289, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .input-group .quantity {
text-align: center;
}
/* line 267, ../sass/_systeme_commandes.scss */
/* line 294, ../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 272, ../sass/_systeme_commandes.scss */
/* line 299, ../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 276, ../sass/_systeme_commandes.scss */
/* line 303, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .epuise {
display: none;
text-transform: uppercase;
@@ -696,32 +722,32 @@ h2 {
font-size: 16px;
text-align: center;
}
/* line 285, ../sass/_systeme_commandes.scss */
/* line 312, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .quantite-restante {
font-size: 12px;
margin-top: 8px;
}
/* line 289, ../sass/_systeme_commandes.scss */
/* line 316, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .quantite-restante .nb {
font-weight: bold;
}
/* line 294, ../sass/_systeme_commandes.scss */
/* line 321, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.produit, .commande-form #produits .table th.produit {
width: 70%;
}
/* line 298, ../sass/_systeme_commandes.scss */
/* line 325, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.prix-unit, .commande-form #produits .table th.prix-unit {
width: 10%;
}
/* line 302, ../sass/_systeme_commandes.scss */
/* line 329, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.colonne-quantite, .commande-form #produits .table th.colonne-quantite {
width: 10%;
}
/* line 306, ../sass/_systeme_commandes.scss */
/* line 333, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.total, .commande-form #produits .table th.total {
width: 10%;
}
/* line 312, ../sass/_systeme_commandes.scss */
/* line 339, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed {
position: fixed;
bottom: 0px;
@@ -738,7 +764,7 @@ h2 {
background-color: #F9F9F9;
text-align: center;
}
/* line 326, ../sass/_systeme_commandes.scss */
/* line 353, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed #total-commande-bottom {
background-color: white;
-moz-border-radius: 20px;
@@ -747,37 +773,37 @@ h2 {
padding: 5px 25px;
border: solid 1px #e0e0e0;
}
/* line 333, ../sass/_systeme_commandes.scss */
/* line 360, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .valider-commande, .commande-form #bar-fixed .btn-commentaire {
float: right;
}
/* line 337, ../sass/_systeme_commandes.scss */
/* line 364, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .btn-commentaire {
margin-right: 10px;
}
/* line 341, ../sass/_systeme_commandes.scss */
/* line 368, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .btn-retour, .commande-form #bar-fixed .annuler-commande {
float: left;
margin-right: 5px;
}
/* line 346, ../sass/_systeme_commandes.scss */
/* line 373, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .annuler-commande {
color: #b92c28;
background-color: white;
}
/* line 351, ../sass/_systeme_commandes.scss */
/* line 378, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed #total-commande-bottom {
display: none;
font-weight: bold;
font-family: "comfortaalight";
font-size: 24px;
}
/* line 358, ../sass/_systeme_commandes.scss */
/* line 385, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .field-commande-commentaire {
display: none;
}

/* line 366, ../sass/_systeme_commandes.scss */
/* line 393, ../sass/_systeme_commandes.scss */
.ui-datepicker .ui-widget-header {
background: none;
background-color: gray;
@@ -785,7 +811,7 @@ h2 {
color: black;
font-weight: normal;
}
/* line 374, ../sass/_systeme_commandes.scss */
/* line 401, ../sass/_systeme_commandes.scss */
.ui-datepicker .ui-datepicker-current-day a,
.ui-datepicker a.ui-state-hover {
background: none;

+ 12
- 1
frontend/web/js/boulange.js Datei anzeigen

@@ -7,9 +7,20 @@
$(document).ready(function()
{
boulange_signup() ;
boulange_index_commandes() ;
});

function boulange_index_commandes()
{
$('#bloc-add-etablissement .panel-heading').click(function() {
var panel_body = $(this).parent().find('.panel-body') ;
if(panel_body.css('display') == 'none')
panel_body.fadeIn() ;
else
panel_body.hide() ;
}) ;
}

function boulange_signup()
{
if($('#form-signup').size())

+ 28
- 1
frontend/web/sass/_systeme_commandes.scss Datei anzeigen

@@ -52,7 +52,8 @@ h2 {
.logo {
width: 30% ;
max-width: 200px ;
//max-width: 200px ;
max-height: 60px ;
float: right ;
padding-left: 20px ;
//border-right: solid 1px #e0e0e0 ;
@@ -65,6 +66,11 @@ h2 {
color: gray ;
}
}
.panel-body {
height: 108px ;
max-height: 108px;
}
}
#bloc-add-etablissement {
@@ -72,6 +78,27 @@ h2 {
.help-block {
padding-bottom: 0px ;
}
.field-addetablissementform-id_etablissement {
width: 80% ;
float: left ;
}
.btn {
float: right ;
position: relative ;
top: 20px ;
}
.panel-heading {
background: none ;
background-color: white ;
cursor: pointer ;
}
.panel-body {
display: none ;
}
}
#addetablissementform-id_etablissement {

Laden…
Abbrechen
Speichern