Browse Source

Passage du code d'accès aux boulangeries en optionnel

Les boulangeries ont désormais le choix entre avoir un code d'accès ou non.
Toutes les boulangeries sont donc dans la liste publique mais celles qui l'ont
décidé demandent un code d'accès à leurs clients.
prodstable
keun 8 years ago
parent
commit
3f7209f0bc
10 changed files with 286 additions and 140 deletions
  1. +2
    -1
      backend/views/etablissement/update.php
  2. +5
    -3
      common/models/Etablissement.php
  3. +48
    -27
      frontend/models/AddEtablissementForm.php
  4. +33
    -2
      frontend/models/SignupForm.php
  5. +18
    -2
      frontend/views/commande/index.php
  6. +8
    -0
      frontend/views/site/signup.php
  7. BIN
      frontend/web/.sass-cache/e1a48ee3204d3a535cdbe440c2995954a615ac19/_systeme_commandes.scssc
  8. +118
    -94
      frontend/web/css/screen.css
  9. +26
    -2
      frontend/web/js/boulange.js
  10. +28
    -9
      frontend/web/sass/_systeme_commandes.scss

+ 2
- 1
backend/views/etablissement/update.php View File

@@ -16,7 +16,8 @@ $this->params['breadcrumbs'][] = 'Paramètres';
<div class="">
<?= $form->field($model, 'code_postal') ?>
<?= $form->field($model, 'ville') ?>
<?= $form->field($model, 'code')->hint("Ce code est à communiquer à vos client pour qu'ils puissent ajouter votre boulangerie à leur tableau de bord.<br />"
<?= $form->field($model, 'code')->hint("Saisissez ce champs si vous souhaitez protéger l'accès à votre boutique par un code, sinon laissez-le vide.<br />"
. "Ce code est à communiquer à vos client pour qu'ils puissent ajouter votre boulangerie à leur tableau de bord.<br />"
. "<a href=\"".Yii::$app->urlManager->createUrl(['communiquer/index'])."\">Cliquez ici</a> pour télécharger un mode d'emploi comprenant ce code à distribuer à vos clients.") ?>
<?= $form->field($model, 'heure_limite_commande')
->dropDownList([

+ 5
- 3
common/models/Etablissement.php View File

@@ -39,7 +39,7 @@ class Etablissement extends \yii\db\ActiveRecord
public function rules()
{
return [
[['nom', 'siret','code', 'heure_limite_commande'], 'required'],
[['nom', 'siret', 'heure_limite_commande'], 'required'],
['heure_limite_commande','integer'],
['heure_limite_commande','in', 'range' => [18, 19, 20, 21, 22, 23, 24]],
['code', function($attribute, $params)
@@ -97,8 +97,10 @@ class Etablissement extends \yii\db\ActiveRecord
$options_etablissements_dispos['d'. substr($e->code_postal, 0, 2)] = ['disabled' => true] ;
}

$data_etablissements_dispos[$e->id] = Html::encode($e->nom).' - '.Html::encode($e->code_postal).' '.Html::encode($e->ville) ;

$data_etablissements_dispos[$e->id] = '<span class="glyphicon glyphicon-lock"></span> '.Html::encode($e->nom).' - '.Html::encode($e->code_postal).' '.Html::encode($e->ville).' <span class="glyphicon glyphicon-lock"></span>' ;
if(strlen($e->code))
$options_etablissements_dispos[$e->id] = ['class' => 'lock'] ;
}
}

+ 48
- 27
frontend/models/AddEtablissementForm.php View File

@@ -22,7 +22,44 @@ class AddEtablissementForm extends Model
public function rules()
{
return [
['code', 'required', 'message' => 'Champs obligatoire'],
['id_etablissement','integer'],
['id_etablissement', 'required'],
['id_etablissement', function($attribute, $params) {
$etablissement = Etablissement::findOne($this->id_etablissement) ;
if(!$etablissement)
{
$this->addError($attribute, 'Cette boulangerie n\'existe pas.') ;
}
$user_etablissement_exist = UserEtablissement::find()
->where(['id_user'=>Yii::$app->user->identity->id, 'id_etablissement' =>$this->id_etablissement])
->one() ;
if($user_etablissement_exist)
{
$this->addError($attribute, 'Cette boulangerie est déjà sur votre tableau de bord.') ;
}
}],
['code', 'required', 'message' => 'Champs obligatoire', 'when' => function($model) {
$etablissement = Etablissement::findOne($this->id_etablissement) ;
if($etablissement)
{
return strlen($etablissement->code) ;
}
else {
return false ;
}
}],
['code', function($attribute, $params) {
$code = $this->$attribute ;
$etablissement = Etablissement::findOne($this->id_etablissement) ;
if($etablissement && strtolower(trim($code)) != strtolower(trim($etablissement->code)))
{
$this->addError($attribute, 'Code incorrect');
}
}],
];
}

@@ -32,7 +69,8 @@ class AddEtablissementForm extends Model
public function attributeLabels()
{
return [
'code' => 'Code',
'id_etablissement' => 'Établissement',
'code' => 'Code',
];
}

@@ -43,31 +81,14 @@ class AddEtablissementForm extends Model
* @return boolean whether the email was sent
*/
public function add()
{
$etablissement = Etablissement::findOne(['code' => $this->code]) ;
if($etablissement)
{
$user_etablissement_exist = UserEtablissement::find()
->where(['id_user'=>Yii::$app->user->identity->id, 'id_etablissement' =>$etablissement->id])
->one() ;
if(!$user_etablissement_exist)
{
$user_etablissement = new UserEtablissement() ;
$user_etablissement->id_user = Yii::$app->user->identity->id ;
$user_etablissement->id_etablissement = $etablissement->id ;
$user_etablissement->save() ;
Yii::$app->session->setFlash('success', 'La boulangerie <strong>'.Html::encode($etablissement->nom).'</strong> a bien été ajoutée à votre tableau de bord.') ;
}
else {
Yii::$app->session->setFlash('error', 'Cette boulangerie est déjà sur votre tableau de bord.') ;
}
}
else {
Yii::$app->session->setFlash('error', 'Aucun établissement ne possède ce code d\'accès.') ;
}
{
$etablissement = Etablissement::findOne($this->id_etablissement) ;
$user_etablissement = new UserEtablissement() ;
$user_etablissement->id_user = Yii::$app->user->identity->id ;
$user_etablissement->id_etablissement = $this->id_etablissement ;
$user_etablissement->save() ;

Yii::$app->session->setFlash('success', 'La boulangerie <strong>'.Html::encode($etablissement->nom).'</strong> a bien été ajoutée à votre tableau de bord.') ;
}
}

+ 33
- 2
frontend/models/SignupForm.php View File

@@ -48,8 +48,6 @@ class SignupForm extends Model
['password', 'string', 'min' => 6, 'tooShort' => 'Votre mot de passe doit contenir au moins 6 caractères'],
['is_boulanger', 'boolean'],
['id_etablissement', 'integer'],
['code', 'string'],
['cgv', 'boolean'],
['cgv', function($attribute, $params) {
$cgv = $this->$attribute ;
@@ -122,6 +120,39 @@ class SignupForm extends Model
}],
['id_etablissement','integer'],
['id_etablissement', function($attribute, $params) {
if($this->id_etablissement)
{
$etablissement = Etablissement::findOne($this->id_etablissement) ;
if(!$etablissement)
{
$this->addError($attribute, 'Cette boulangerie n\'existe pas.') ;
}
}
}],
['code', 'required', 'message' => 'Champs obligatoire', 'when' => function($model) {
$etablissement = Etablissement::findOne($this->id_etablissement) ;
if($etablissement)
{
return strlen($etablissement->code) ;
}
else {
return false ;
}
}],
['code', function($attribute, $params) {
$code = $this->$attribute ;
$etablissement = Etablissement::findOne($this->id_etablissement) ;
if($etablissement && strtolower(trim($code)) != strtolower(trim($etablissement->code)))
{
$this->addError($attribute, 'Code incorrect');
}
}],
];
}


+ 18
- 2
frontend/views/commande/index.php View File

@@ -41,8 +41,24 @@ $this->title = 'Commande' ;
</div>
<div class="panel-body">
<?php $form = ActiveForm::begin(['id' => 'form-add-boulanger','enableClientValidation'=> false]); ?>
<?php //$form->field($model_form_etablissement, 'id_etablissement')->label('')->dropDownList($data_etablissements_dispos, ['prompt' => '--','encode' => false,'options' => $options_etablissements_dispos]) ?>
<?= $form->field($model_form_etablissement, 'code')->label('Code')->hint('Renseignez-vous auprès de votre boulangerie pour qu\'elle vous fournisse un code d\'accès') ; ?>
<?= $form->field($model_form_etablissement, 'id_etablissement')
->label('')
->dropDownList($data_etablissements_dispos,
['prompt' => '--',
'encode' => false,
'options' => $options_etablissements_dispos
]) ; ?>
<div id="bloc-code-acces">
<?= $form->field($model_form_etablissement, 'code',[
'inputTemplate' => '<div class="input-group"><span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>{input}</div>',
])
->label('Code')
->hint('Renseignez-vous auprès de votre boulangerie pour qu\'elle vous fournisse le code d\'accès') ; ?>
</div>
<?= Html::submitButton('<span class="glyphicon glyphicon-plus"></span> Valider', ['class' => 'btn btn-default', 'name' => 'add-etablissement-button']) ?>
<?php ActiveForm::end(); ?>
</div>

+ 8
- 0
frontend/views/site/signup.php View File

@@ -40,6 +40,14 @@ $this->params['breadcrumbs'][] = $this->title;
</div>
<div id="champs-client">
<?= $form->field($model, 'id_etablissement')->dropDownList($data_etablissements_dispos, ['prompt' => '--','encode' => false,'options' => $options_etablissements_dispos]) ?>
<div id="bloc-code-acces">
<?= $form->field($model, 'code',[
'inputTemplate' => '<div class="input-group"><span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>{input}</div>',

])
->label('Code')
->hint('Renseignez-vous auprès de votre boulangerie pour qu\'elle vous fournisse le code d\'accès') ; ?>
</div>
</div>
<div class="form-group" id="boutons-inscrire">

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


+ 118
- 94
frontend/web/css/screen.css View File

@@ -547,21 +547,50 @@ h2 {
text-transform: uppercase;
}

/* line 33, ../sass/_systeme_commandes.scss */
/* line 28, ../sass/_systeme_commandes.scss */
#addetablissementform-id_etablissement option:disabled,
#signupform-id_etablissement option:disabled {
font-weight: bold;
color: black;
}
/* line 32, ../sass/_systeme_commandes.scss */
#addetablissementform-id_etablissement .lock,
#signupform-id_etablissement .lock {
position: relative;
}
/* line 36, ../sass/_systeme_commandes.scss */
#addetablissementform-id_etablissement .lock:before,
#signupform-id_etablissement .lock:before {
font-family: "Glyphicons Halflings";
content: "\e033";
font-style: normal;
font-weight: 400;
line-height: 1;
position: relative;
top: 1px;
right: 0px;
}

/* line 48, ../sass/_systeme_commandes.scss */
#bloc-code-acces {
display: none;
}

/* line 59, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie {
padding-left: 0px;
padding-right: 30px;
}
/* line 37, ../sass/_systeme_commandes.scss */
/* line 63, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel {
margin-bottom: 13px;
}
/* line 41, ../sass/_systeme_commandes.scss */
/* line 67, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie.selected .panel {
border-bottom: solid 3px #BB8757;
margin-bottom: 11px;
}
/* line 46, ../sass/_systeme_commandes.scss */
/* line 72, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-heading {
height: 150px;
overflow: hidden;
@@ -569,14 +598,14 @@ h2 {
background: none;
background-color: #F8F1DD;
}
/* line 53, ../sass/_systeme_commandes.scss */
/* line 79, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-heading .img-back {
width: 100%;
height: auto;
position: relative;
top: -50%;
}
/* line 62, ../sass/_systeme_commandes.scss */
/* line 88, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body {
position: relative;
width: 100%;
@@ -584,16 +613,16 @@ h2 {
max-height: 120px;
text-align: center;
}
/* line 69, ../sass/_systeme_commandes.scss */
/* line 95, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body h3 {
margin-bottom: 4px;
}
/* line 73, ../sass/_systeme_commandes.scss */
/* line 99, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .localite {
color: gray;
margin-bottom: 10px;
}
/* line 78, ../sass/_systeme_commandes.scss */
/* line 104, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .glyphicon-check {
color: #BB8757;
font-size: 40px;
@@ -601,13 +630,13 @@ h2 {
top: 34px;
left: 32px;
}
/* line 86, ../sass/_systeme_commandes.scss */
/* line 112, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .remove {
position: absolute;
top: 10px;
right: 10px;
}
/* line 92, ../sass/_systeme_commandes.scss */
/* line 118, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .logo {
display: none;
width: 150px;
@@ -618,7 +647,7 @@ h2 {
background-color: white;
padding: 10px 20px;
}
/* line 103, ../sass/_systeme_commandes.scss */
/* line 129, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .heure-limite-commande {
position: absolute;
bottom: 0px;
@@ -628,16 +657,16 @@ h2 {
border-left: solid 1px #ddd;
font-size: 12px;
}
/* line 111, ../sass/_systeme_commandes.scss */
/* line 137, ../sass/_systeme_commandes.scss */
.liste-etablissements .boulangerie .panel-body .heure-limite-commande .limite {
font-weight: bold;
}

/* line 119, ../sass/_systeme_commandes.scss */
/* line 145, ../sass/_systeme_commandes.scss */
#index-commande {
position: relative;
}
/* line 122, ../sass/_systeme_commandes.scss */
/* line 148, ../sass/_systeme_commandes.scss */
#index-commande #logout {
position: absolute;
/*top: 45px ;
@@ -646,122 +675,117 @@ h2 {
right: 0;
z-index: 10;
}
/* line 131, ../sass/_systeme_commandes.scss */
/* line 157, ../sass/_systeme_commandes.scss */
#index-commande .accueil {
text-align: center;
padding-bottom: 20px;
}
/* line 136, ../sass/_systeme_commandes.scss */
/* line 162, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement {
padding-left: 0px;
padding-right: 30px;
}
/* line 140, ../sass/_systeme_commandes.scss */
/* line 166, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .help-block {
padding-bottom: 0px;
}
/* line 144, ../sass/_systeme_commandes.scss */
/* line 170, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .field-addetablissementform-id_etablissement {
width: 80%;
width: 70%;
float: left;
}
/* line 149, ../sass/_systeme_commandes.scss */
/* line 175, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .field-addetablissementform-code {
width: 70%;
float: left;
}
/* line 154, ../sass/_systeme_commandes.scss */
/* line 180, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .btn {
float: right;
position: relative;
top: 20px;
}
/* line 160, ../sass/_systeme_commandes.scss */
/* line 186, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .panel-heading {
background: none;
background-color: white;
cursor: pointer;
}
/* line 166, ../sass/_systeme_commandes.scss */
/* line 192, ../sass/_systeme_commandes.scss */
#index-commande #bloc-add-etablissement .panel-body {
display: none;
}
/* line 172, ../sass/_systeme_commandes.scss */
#index-commande #addetablissementform-id_etablissement option:disabled {
font-weight: bold;
color: black;
}
/* line 179, ../sass/_systeme_commandes.scss */
/* line 198, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .statut, #index-commande #historique-commandes .montant {
width: 175px;
}
/* line 182, ../sass/_systeme_commandes.scss */
/* line 201, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .montant {
width: 100px;
}
/* line 189, ../sass/_systeme_commandes.scss */
/* line 208, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes .localite {
font-size: 11px;
lin-height: 11px;
}
/* line 194, ../sass/_systeme_commandes.scss */
/* line 213, ../sass/_systeme_commandes.scss */
#index-commande #historique-commandes a {
text-decoration: none;
}

/* line 201, ../sass/_systeme_commandes.scss */
/* line 220, ../sass/_systeme_commandes.scss */
.commande-form {
min-height: 600px;
padding-bottom: 60px;
}
/* line 206, ../sass/_systeme_commandes.scss */
/* line 225, ../sass/_systeme_commandes.scss */
.commande-form h2 {
font-family: "myriadpro-regular";
}
/* line 210, ../sass/_systeme_commandes.scss */
/* line 229, ../sass/_systeme_commandes.scss */
.commande-form #infos-importantes.alert-warning {
float: right;
}
/* line 216, ../sass/_systeme_commandes.scss */
/* line 235, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker {
float: left;
margin-right: 20px;
font-size: 20px;
}
/* line 222, ../sass/_systeme_commandes.scss */
/* line 241, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker-header {
background-color: #BB8757;
}
/* line 226, ../sass/_systeme_commandes.scss */
/* line 245, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker-title {
color: white;
}
/* line 232, ../sass/_systeme_commandes.scss */
/* line 251, ../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 238, ../sass/_systeme_commandes.scss */
/* line 257, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-helper-clearfix:after {
clear: none;
}
/* line 243, ../sass/_systeme_commandes.scss */
/* line 262, ../sass/_systeme_commandes.scss */
.commande-form #datepicker-production .ui-datepicker-calendar a {
text-decoration: none;
background-color: #F8F1DD;
}
/* line 246, ../sass/_systeme_commandes.scss */
/* line 265, ../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 255, ../sass/_systeme_commandes.scss */
/* line 274, ../sass/_systeme_commandes.scss */
.commande-form .date-commande {
margin-bottom: 53px;
}
/* line 257, ../sass/_systeme_commandes.scss */
/* line 276, ../sass/_systeme_commandes.scss */
.commande-form .date-commande span {
background-color: #BB8757;
color: white;
@@ -772,47 +796,47 @@ h2 {
font-family: "myriadpro-regular";
font-size: 20px;
}
/* line 267, ../sass/_systeme_commandes.scss */
/* line 286, ../sass/_systeme_commandes.scss */
.commande-form #has-commande-en-cours {
margin-top: 15px;
}
/* line 270, ../sass/_systeme_commandes.scss */
/* line 289, ../sass/_systeme_commandes.scss */
.commande-form #has-commande-en-cours a {
color: #a94442;
text-decoration: none;
font-weight: bold;
}
/* line 277, ../sass/_systeme_commandes.scss */
/* line 296, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production {
display: none;
}
/* line 281, ../sass/_systeme_commandes.scss */
/* line 300, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_point_vente {
margin-top: 30px;
}
/* line 285, ../sass/_systeme_commandes.scss */
/* line 304, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production {
margin-bottom: 0px;
}
/* line 287, ../sass/_systeme_commandes.scss */
/* line 306, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production label {
margin-bottom: 0px;
}
/* line 291, ../sass/_systeme_commandes.scss */
/* line 310, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_production .help-block {
margin-bottom: 0px;
}
/* line 296, ../sass/_systeme_commandes.scss */
/* line 315, ../sass/_systeme_commandes.scss */
.commande-form .field-commande-id_point_vente {
display: none;
}
/* line 300, ../sass/_systeme_commandes.scss */
/* line 319, ../sass/_systeme_commandes.scss */
.commande-form .blocs {
list-style-type: none;
margin: 0px;
padding: 0px;
}
/* line 305, ../sass/_systeme_commandes.scss */
/* line 324, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc {
text-decoration: none;
width: 268px;
@@ -827,107 +851,107 @@ h2 {
background-color: white;
border: 1px solid #d8d8d8;
}
/* line 320, ../sass/_systeme_commandes.scss */
/* line 339, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .nom {
font-family: "comfortaalight";
font-size: 20px;
}
/* line 326, ../sass/_systeme_commandes.scss */
/* line 345, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .adresse {
color: gray;
font-size: 13px;
line-height: 16px;
}
/* line 332, ../sass/_systeme_commandes.scss */
/* line 351, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .horaires {
margin-top: 7px;
}
/* line 334, ../sass/_systeme_commandes.scss */
/* line 353, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc .horaires .jour {
font-weight: bold;
display: none;
}
/* line 341, ../sass/_systeme_commandes.scss */
/* line 360, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.selected {
border-left: solid 5px #BB8757;
}
/* line 344, ../sass/_systeme_commandes.scss */
/* line 363, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.selected .contenu {
position: relative;
left: -4px;
}
/* line 350, ../sass/_systeme_commandes.scss */
/* line 369, ../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 355, ../sass/_systeme_commandes.scss */
/* line 374, ../sass/_systeme_commandes.scss */
.commande-form .blocs .bloc.disabled {
display: none;
}
/* line 362, ../sass/_systeme_commandes.scss */
/* line 381, ../sass/_systeme_commandes.scss */
.commande-form #produits {
margin-top: 15px;
}
/* line 365, ../sass/_systeme_commandes.scss */
/* line 384, ../sass/_systeme_commandes.scss */
.commande-form #produits #label-produits {
display: block;
margin-bottom: 5px;
}
/* line 370, ../sass/_systeme_commandes.scss */
/* line 389, ../sass/_systeme_commandes.scss */
.commande-form #produits .table {
margin-top: 7px;
}
/* line 373, ../sass/_systeme_commandes.scss */
/* line 392, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .illu {
float: left;
height: auto;
width: 70px;
margin-right: 15px;
}
/* line 380, ../sass/_systeme_commandes.scss */
/* line 399, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .photo {
padding: 0px;
width: 120px;
}
/* line 385, ../sass/_systeme_commandes.scss */
/* line 404, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .th-photo, .commande-form #produits .table .td-photo {
width: 120px;
}
/* line 389, ../sass/_systeme_commandes.scss */
/* line 408, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .nom {
font-family: "comfortaalight";
font-weight: bold;
text-transform: uppercase;
font-size: 18px;
}
/* line 396, ../sass/_systeme_commandes.scss */
/* line 415, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .description {
font-style: italic;
}
/* line 400, ../sass/_systeme_commandes.scss */
/* line 419, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .recette {
font-size: 12px;
}
/* line 404, ../sass/_systeme_commandes.scss */
/* line 423, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .input-group {
width: 133px;
}
/* line 406, ../sass/_systeme_commandes.scss */
/* line 425, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .input-group .quantity {
text-align: center;
}
/* line 411, ../sass/_systeme_commandes.scss */
/* line 430, ../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 416, ../sass/_systeme_commandes.scss */
/* line 435, ../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 420, ../sass/_systeme_commandes.scss */
/* line 439, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .epuise {
display: none;
text-transform: uppercase;
@@ -936,32 +960,32 @@ h2 {
font-size: 16px;
text-align: center;
}
/* line 429, ../sass/_systeme_commandes.scss */
/* line 448, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .quantite-restante {
font-size: 12px;
margin-top: 8px;
}
/* line 433, ../sass/_systeme_commandes.scss */
/* line 452, ../sass/_systeme_commandes.scss */
.commande-form #produits .table .quantite-restante .nb {
font-weight: bold;
}
/* line 438, ../sass/_systeme_commandes.scss */
/* line 457, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.produit, .commande-form #produits .table th.produit {
width: 70%;
}
/* line 442, ../sass/_systeme_commandes.scss */
/* line 461, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.prix-unit, .commande-form #produits .table th.prix-unit {
width: 10%;
}
/* line 446, ../sass/_systeme_commandes.scss */
/* line 465, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.colonne-quantite, .commande-form #produits .table th.colonne-quantite {
width: 10%;
}
/* line 450, ../sass/_systeme_commandes.scss */
/* line 469, ../sass/_systeme_commandes.scss */
.commande-form #produits .table td.total, .commande-form #produits .table th.total {
width: 10%;
}
/* line 456, ../sass/_systeme_commandes.scss */
/* line 475, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed {
display: none;
position: fixed;
@@ -981,7 +1005,7 @@ h2 {
background-color: #F8F1DD;
text-align: center;
}
/* line 473, ../sass/_systeme_commandes.scss */
/* line 492, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed.not-fixed {
position: relative;
-moz-box-shadow: none;
@@ -993,7 +1017,7 @@ h2 {
border: solid 1px #e0e0e0;
padding-right: 20px;
}
/* line 481, ../sass/_systeme_commandes.scss */
/* line 500, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed #total-commande-bottom {
background-color: white;
-moz-border-radius: 20px;
@@ -1002,37 +1026,37 @@ h2 {
padding: 5px 25px;
border: solid 1px #e0e0e0;
}
/* line 488, ../sass/_systeme_commandes.scss */
/* line 507, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .valider-commande, .commande-form #bar-fixed .btn-commentaire {
float: left;
}
/* line 492, ../sass/_systeme_commandes.scss */
/* line 511, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .btn-commentaire {
margin-right: 10px;
}
/* line 496, ../sass/_systeme_commandes.scss */
/* line 515, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .btn-retour, .commande-form #bar-fixed .annuler-commande {
float: left;
margin-right: 5px;
}
/* line 501, ../sass/_systeme_commandes.scss */
/* line 520, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .annuler-commande {
color: #b92c28;
background-color: white;
}
/* line 506, ../sass/_systeme_commandes.scss */
/* line 525, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed #total-commande-bottom {
display: none;
font-weight: bold;
font-family: "comfortaalight";
font-size: 24px;
}
/* line 513, ../sass/_systeme_commandes.scss */
/* line 532, ../sass/_systeme_commandes.scss */
.commande-form #bar-fixed .field-commande-commentaire {
display: none;
}

/* line 521, ../sass/_systeme_commandes.scss */
/* line 540, ../sass/_systeme_commandes.scss */
.ui-datepicker .ui-widget-header {
background: none;
background-color: gray;
@@ -1040,7 +1064,7 @@ h2 {
color: black;
font-weight: normal;
}
/* line 529, ../sass/_systeme_commandes.scss */
/* line 548, ../sass/_systeme_commandes.scss */
.ui-datepicker .ui-datepicker-current-day a,
.ui-datepicker a.ui-state-hover {
background: none;

+ 26
- 2
frontend/web/js/boulange.js View File

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

function boulange_scroll(id) {
@@ -17,7 +18,7 @@ function boulange_scroll(id) {
1000);
}

function boulange_index_commandes()
function boulange_add_boulangerie()
{
$('#bloc-add-etablissement .panel-heading').click(function() {
var panel_body = $(this).parent().find('.panel-body') ;
@@ -26,6 +27,29 @@ function boulange_index_commandes()
else
panel_body.hide() ;
}) ;
$('#addetablissementform-id_etablissement,#signupform-id_etablissement').change(function() {
if($(this).find('option:selected').hasClass('lock')) {
$('#bloc-code-acces').fadeIn() ;
}
else {
$('#bloc-code-acces').hide() ;
}
}) ;
if($('#addetablissementform-id_etablissement option:selected,#signupform-id_etablissement option:selected').hasClass('lock')) {
$('#bloc-code-acces').show() ;
}
else {
$('#bloc-code-acces').hide() ;
}
if($('#bloc-add-etablissement').size()) {
if($('#bloc-add-etablissement .has-error').size()) {
$('#bloc-add-etablissement .panel-body').show() ;
}
}
}

function boulange_signup()

+ 28
- 9
frontend/web/sass/_systeme_commandes.scss View File

@@ -23,6 +23,32 @@ h2 {
text-transform: uppercase ;
}

#addetablissementform-id_etablissement,
#signupform-id_etablissement {
option:disabled {
font-weight: bold ;
color: black ;
}
.lock {
position: relative ;
}
.lock:before {
font-family: "Glyphicons Halflings" ;
content: "\e033";
font-style: normal;
font-weight: 400;
line-height: 1;
position: relative;
top: 1px;
right: 0px ;
}
}

#bloc-code-acces {
display: none ;
}


.liste-etablissements {
@@ -142,7 +168,7 @@ h2 {
}
.field-addetablissementform-id_etablissement {
width: 80% ;
width: 70% ;
float: left ;
}
@@ -167,14 +193,7 @@ h2 {
display: none ;
}
}
#addetablissementform-id_etablissement {
option:disabled {
font-weight: bold ;
color: black ;
}
}

#historique-commandes {
.statut, .montant {
width: 175px ;

Loading…
Cancel
Save