Parcourir la source

Merge branch 'dev'

prodstable
Guillaume il y a 2 ans
Parent
révision
fecaace9a3
6 fichiers modifiés avec 115 ajouts et 35 suppressions
  1. +1
    -1
      common/models/Document.php
  2. +8
    -0
      producer/views/order/confirm.php
  3. +8
    -7
      producer/views/order/order.php
  4. +41
    -20
      producer/web/css/screen.css
  5. +35
    -5
      producer/web/js/vuejs/order-order.js
  6. +22
    -2
      producer/web/sass/_responsive.scss

+ 1
- 1
common/models/Document.php Voir le fichier

@@ -99,7 +99,7 @@ class Document extends ActiveRecordCommon
return $this->hasMany(Order::className(), [$fieldIdDocument => 'id'])
->with($defaultOptionsSearch['with'])
->joinWith($defaultOptionsSearch['join_with'])
->orderBy('user.lastname ASC, user.name ASC, comment_point_sale ASC');
->orderBy('distribution.date ASC');
}



+ 8
- 0
producer/views/order/confirm.php Voir le fichier

@@ -91,6 +91,14 @@ $producer = GlobalParam::getCurrentProducer() ;
<br />&nbsp; &nbsp; &nbsp;<span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?>
<?php endif; ?>
</li>
<?php
$strInfos = $order->pointSale->getStrInfos(strtolower(date('l',strtotime($order->distribution->date))));
?>
<?php if(strlen($strInfos) > 0): ?>
<li><span class="glyphicon glyphicon-info-sign"></span>
<span class="infos"><?= $strInfos ?></span>
</li>
<?php endif; ?>
</ul>
</div>
<div class="col-md-6">

+ 8
- 7
producer/views/order/order.php Voir le fichier

@@ -147,8 +147,9 @@ $producer = GlobalParam::getCurrentProducer() ;
is-expanded
v-model="date"
mode="single"
locale="fr-FR"
:locale="{ id: 'fr_FR', firstDayOfWeek: 1, masks: { weekdays: 'WW' } }"
locale="fr"
:locale="{ id: 'fr', firstDayOfWeek: 1, masks: { weekdays: 'WW' } }"
:first-day-of-week="1"
:formats="calendar.formats"
:theme-styles="calendar.themeStyles"
:attributes="calendar.attrs"
@@ -266,11 +267,11 @@ $producer = GlobalParam::getCurrentProducer() ;
<table id="products" class="table table-bordered" >
<thead>
<tr>
<th>Photo</th>
<th>Nom</th>
<th>Prix unitaire</th>
<th>Quantité</th>
<th>Total</th>
<th class="photo">Photo</th>
<th class="name">Nom</th>
<th class="price">Prix unitaire</th>
<th class="quantity">Quantité</th>
<th class="total">Total</th>
</tr>
</thead>
<tbody>

+ 41
- 20
producer/web/css/screen.css Voir le fichier

@@ -2010,7 +2010,7 @@ termes.
padding: 3px;
}
/* line 121, ../sass/_responsive.scss */
#main #products .td-photo, #main #products .th-photo {
#main #products td.photo, #main #products th.photo {
display: none;
}
/* line 125, ../sass/_responsive.scss */
@@ -2021,11 +2021,32 @@ termes.
#main #products .product .nom {
font-size: 15px;
}
/* line 134, ../sass/_responsive.scss */
#main #bar-fixed {
/* line 133, ../sass/_responsive.scss */
#main #products .td-quantity .input-group {
position: relative;
}
/* line 136, ../sass/_responsive.scss */
#main #products .td-quantity .input-group .input-group-btn {
display: block;
width: 100%;
}
/* line 140, ../sass/_responsive.scss */
#main #products .td-quantity .input-group .form-control.quantity {
text-align: left !important;
}
/* line 143, ../sass/_responsive.scss */
#main #products .td-quantity .input-group .input-group-addon {
position: absolute;
top: 37px;
right: 15px;
z-index: 10;
border: 0px none;
}
/* line 154, ../sass/_responsive.scss */
#main #bar-fixed {
position: relative;
}
/* line 156, ../sass/_responsive.scss */
#main #bar-fixed .btn-comment {
float: none;
display: block;
@@ -2034,80 +2055,80 @@ termes.
margin-top: 15px;
}

/* line 146, ../sass/_responsive.scss */
/* line 166, ../sass/_responsive.scss */
.order-create #main #content .order-form #products .table .input-group,
.order-update #main #content .order-form #products .table .input-group {
width: 60px;
}
/* line 150, ../sass/_responsive.scss */
/* line 170, ../sass/_responsive.scss */
.order-create #main #content .order-form #products .table .input-group .form-control,
.order-update #main #content .order-form #products .table .input-group .form-control {
width: 20px;
padding: 3px;
}

/* line 156, ../sass/_responsive.scss */
/* line 176, ../sass/_responsive.scss */
.order-create #main #content .order-form #bar-fixed #checkbox-credit,
.order-update #main #content .order-form #bar-fixed #checkbox-credit {
width: 100%;
margin: 0px;
padding: 5px 0px;
}
/* line 162, ../sass/_responsive.scss */
/* line 182, ../sass/_responsive.scss */
.order-create #main #content .order-form #bar-fixed #checkbox-credit .the-credit,
.order-update #main #content .order-form #bar-fixed #checkbox-credit .the-credit {
word-break: break-all;
}

/* line 167, ../sass/_responsive.scss */
/* line 187, ../sass/_responsive.scss */
.order-create #main #content .order-form #bar-fixed #block-confirm-order button,
.order-update #main #content .order-form #bar-fixed #block-confirm-order button {
width: 100%;
}

/* line 175, ../sass/_responsive.scss */
/* line 195, ../sass/_responsive.scss */
.order-order #app-order-order h3 {
line-height: 28px;
}
/* line 181, ../sass/_responsive.scss */
/* line 201, ../sass/_responsive.scss */
.order-order #app-order-order #distributions-list .panel .btn-primary {
display: block;
float: none !important;
margin-bottom: 10px;
}
/* line 190, ../sass/_responsive.scss */
/* line 210, ../sass/_responsive.scss */
.order-order #app-order-order #steps ul {
height: auto !important;
}
/* line 192, ../sass/_responsive.scss */
/* line 212, ../sass/_responsive.scss */
.order-order #app-order-order #steps ul li {
padding-left: 0px !important;
padding-right: 0px !important;
}
/* line 196, ../sass/_responsive.scss */
/* line 216, ../sass/_responsive.scss */
.order-order #app-order-order #steps ul li .info-step {
display: none;
}
/* line 200, ../sass/_responsive.scss */
/* line 220, ../sass/_responsive.scss */
.order-order #app-order-order #steps ul li .btn::after,
.order-order #app-order-order #steps ul li .btn::before {
display: none;
}
/* line 211, ../sass/_responsive.scss */
/* line 231, ../sass/_responsive.scss */
.order-order #app-order-order table#products td.name .recipe {
display: none;
}
/* line 217, ../sass/_responsive.scss */
/* line 237, ../sass/_responsive.scss */
.order-order #app-order-order table#products td.td-quantity .input-group-btn {
width: 100%;
display: block;
}
/* line 221, ../sass/_responsive.scss */
/* line 241, ../sass/_responsive.scss */
.order-order #app-order-order table#products td.td-quantity .input-group-btn button {
width: 100%;
display: block;
}
/* line 231, ../sass/_responsive.scss */
/* line 251, ../sass/_responsive.scss */
.order-order #app-order-order #order-success .alert .glyphicon-big {
font-size: 90px;
color: white;
@@ -2117,13 +2138,13 @@ termes.
text-align: center;
margin-bottom: 20px;
}
/* line 240, ../sass/_responsive.scss */
/* line 260, ../sass/_responsive.scss */
.order-order #app-order-order #order-success .alert div.content {
margin-left: 0px;
text-align: center;
}

/* line 251, ../sass/_responsive.scss */
/* line 271, ../sass/_responsive.scss */
#footer .content {
text-align: center;
}

+ 35
- 5
producer/web/js/vuejs/order-order.js Voir le fichier

@@ -54,8 +54,8 @@ var app = new Vue({
},
dayContent: function (object) {
var style = {
fontSize: '1.5rem',
padding: '20px',
fontSize: '1.4rem',
padding: app.isMobile() ? '18px' : '20px',
};
return style;
},
@@ -67,6 +67,10 @@ var app = new Vue({
}, window.appInitValues);
},
mounted: function() {

let fr = new Intl.Locale("fr-FR");
console.log(fr);

var dateDefined = $('#order-distribution-date').size() || $('#distribution-date').size() ;

if(dateDefined) {
@@ -276,16 +280,42 @@ var app = new Vue({
}

app.loading = false ;
});

setTimeout(function() {
app.responsive();
}, 500);

});
},

isChangeState: function(entryPoint, oldStep, newStep) {
isMobile: function() {
var width_window = parseInt($(window).width());
return width_window <= 768;
},

responsive: function() {
var app = this;
app.responsiveApply();
$(window).resize(function() {
app.responsiveApply();
});
},

responsiveApply: function() {
var $td_summary = $('#products tr.total td.summary');
if(this.isMobile()) {
$td_summary.attr('colspan', 3);
}
else {
$td_summary.attr('colspan', 4);
}
},

isChangeState: function(entryPoint, oldStep, newStep) {
return this.producer
&& entryPoint == this.producer.option_order_entry_point
&& oldStep == this.oldStep
&& newStep == this.step ;

},

nextStep: function() {

+ 22
- 2
producer/web/sass/_responsive.scss Voir le fichier

@@ -118,7 +118,7 @@ termes.
padding: 3px ;
}
.td-photo, .th-photo {
td.photo, th.photo {
display: none ;
}
@@ -127,7 +127,27 @@ termes.
.nom {
font-size: 15px ;
}
}

.td-quantity {
.input-group {
position: relative;

.input-group-btn {
display: block;
width: 100%;
}
.form-control.quantity {
text-align: left !important;
}
.input-group-addon {
position: absolute;
top: 37px;
right: 15px;
z-index: 10;
border: 0px none;
}
}
}
}

Chargement…
Annuler
Enregistrer