Browse Source

Merge branch 'dev'

prodstable
Guillaume 2 years ago
parent
commit
fecaace9a3
6 changed files with 115 additions and 35 deletions
  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 View File

return $this->hasMany(Order::className(), [$fieldIdDocument => 'id']) return $this->hasMany(Order::className(), [$fieldIdDocument => 'id'])
->with($defaultOptionsSearch['with']) ->with($defaultOptionsSearch['with'])
->joinWith($defaultOptionsSearch['join_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 View File

<br />&nbsp; &nbsp; &nbsp;<span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?> <br />&nbsp; &nbsp; &nbsp;<span class="locality">à <?= Html::encode($order->pointSale->locality) ?></span><?php endif; ?>
<?php endif; ?> <?php endif; ?>
</li> </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> </ul>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">

+ 8
- 7
producer/views/order/order.php View File

is-expanded is-expanded
v-model="date" v-model="date"
mode="single" 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" :formats="calendar.formats"
:theme-styles="calendar.themeStyles" :theme-styles="calendar.themeStyles"
:attributes="calendar.attrs" :attributes="calendar.attrs"
<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>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> </tr>
</thead> </thead>
<tbody> <tbody>

+ 41
- 20
producer/web/css/screen.css View File

padding: 3px; padding: 3px;
} }
/* line 121, ../sass/_responsive.scss */ /* line 121, ../sass/_responsive.scss */
#main #products .td-photo, #main #products .th-photo {
#main #products td.photo, #main #products th.photo {
display: none; display: none;
} }
/* line 125, ../sass/_responsive.scss */ /* line 125, ../sass/_responsive.scss */
#main #products .product .nom { #main #products .product .nom {
font-size: 15px; font-size: 15px;
} }
/* line 134, ../sass/_responsive.scss */
#main #bar-fixed {
/* line 133, ../sass/_responsive.scss */
#main #products .td-quantity .input-group {
position: relative; position: relative;
} }
/* line 136, ../sass/_responsive.scss */ /* 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 { #main #bar-fixed .btn-comment {
float: none; float: none;
display: block; display: block;
margin-top: 15px; margin-top: 15px;
} }


/* line 146, ../sass/_responsive.scss */
/* line 166, ../sass/_responsive.scss */
.order-create #main #content .order-form #products .table .input-group, .order-create #main #content .order-form #products .table .input-group,
.order-update #main #content .order-form #products .table .input-group { .order-update #main #content .order-form #products .table .input-group {
width: 60px; 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-create #main #content .order-form #products .table .input-group .form-control,
.order-update #main #content .order-form #products .table .input-group .form-control { .order-update #main #content .order-form #products .table .input-group .form-control {
width: 20px; width: 20px;
padding: 3px; padding: 3px;
} }


/* line 156, ../sass/_responsive.scss */
/* line 176, ../sass/_responsive.scss */
.order-create #main #content .order-form #bar-fixed #checkbox-credit, .order-create #main #content .order-form #bar-fixed #checkbox-credit,
.order-update #main #content .order-form #bar-fixed #checkbox-credit { .order-update #main #content .order-form #bar-fixed #checkbox-credit {
width: 100%; width: 100%;
margin: 0px; margin: 0px;
padding: 5px 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-create #main #content .order-form #bar-fixed #checkbox-credit .the-credit,
.order-update #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; 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-create #main #content .order-form #bar-fixed #block-confirm-order button,
.order-update #main #content .order-form #bar-fixed #block-confirm-order button { .order-update #main #content .order-form #bar-fixed #block-confirm-order button {
width: 100%; width: 100%;
} }


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


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

+ 35
- 5
producer/web/js/vuejs/order-order.js View File

}, },
dayContent: function (object) { dayContent: function (object) {
var style = { var style = {
fontSize: '1.5rem',
padding: '20px',
fontSize: '1.4rem',
padding: app.isMobile() ? '18px' : '20px',
}; };
return style; return style;
}, },
}, window.appInitValues); }, window.appInitValues);
}, },
mounted: function() { mounted: function() {

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

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


if(dateDefined) { if(dateDefined) {
} }


app.loading = false ; 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 return this.producer
&& entryPoint == this.producer.option_order_entry_point && entryPoint == this.producer.option_order_entry_point
&& oldStep == this.oldStep && oldStep == this.oldStep
&& newStep == this.step ; && newStep == this.step ;

}, },


nextStep: function() { nextStep: function() {

+ 22
- 2
producer/web/sass/_responsive.scss View File

padding: 3px ; padding: 3px ;
} }
.td-photo, .th-photo {
td.photo, th.photo {
display: none ; display: none ;
} }
.nom { .nom {
font-size: 15px ; 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;
}
}
} }
} }

Loading…
Cancel
Save