Browse Source

[backend] Création de commande : affichage du crédit de l'utilisateur sélectionné

dev
Guillaume Bourgeois 5 years ago
parent
commit
ae87278b88
4 changed files with 32 additions and 17 deletions
  1. +6
    -1
      backend/views/distribution/index.php
  2. +18
    -14
      backend/web/css/screen.css
  3. +3
    -1
      backend/web/js/vuejs/distribution-index.js
  4. +5
    -1
      backend/web/sass/distribution/_index.scss

+ 6
- 1
backend/views/distribution/index.php View File

:points-sale="pointsSale" :points-sale="pointsSale"
:users="users" :users="users"
:products="products" :products="products"
:producer="producer"
@close="showModalFormOrderCreate = false" @close="showModalFormOrderCreate = false"
@ordercreatedupdated="orderCreatedUpdated" @ordercreatedupdated="orderCreatedUpdated"
></order-form> ></order-form>
:users="users" :users="users"
:products="products" :products="products"
:order="ordersUpdate[key]" :order="ordersUpdate[key]"
:producer="producer"
@close="showModalFormOrderUpdate = false" @close="showModalFormOrderUpdate = false"
@ordercreatedupdated="orderCreatedUpdated" @ordercreatedupdated="orderCreatedUpdated"
></order-form> ></order-form>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label" for="select-id-user">Utilisateur</label>
<a v-if="producer.credit && order.id_user > 0" class="btn btn-xs btn-primary btn-credit" :href="baseUrl+'/user/credit?id='+user.id_user" v-for="user in users" v-if="user.id_user == order.id_user">{{ user.credit }} €</a>
<label class="control-label" for="select-id-user">
Utilisateur
</label>
<select class="form-control" v-model="order.id_user"> <select class="form-control" v-model="order.id_user">
<option value="0">--</option> <option value="0">--</option>
<option v-for="user in users" :value="user.id_user">{{ user.lastname +' '+ user.name }}</option> <option v-for="user in users" :value="user.id_user">{{ user.lastname +' '+ user.name }}</option>

+ 18
- 14
backend/web/css/screen.css View File

.distribution-index #orders table tr.view .comment { .distribution-index #orders table tr.view .comment {
margin-top: 20px; margin-top: 20px;
} }
/* line 257, ../sass/distribution/_index.scss */
/* line 255, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .btn-credit {
float: right;
}
/* line 261, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products .product-ordered td { .distribution-index .modal-form-order table.table-products .product-ordered td {
background-color: #e9e9e9; background-color: #e9e9e9;
} }
/* line 261, ../sass/distribution/_index.scss */
/* line 265, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products .product-ordered input { .distribution-index .modal-form-order table.table-products .product-ordered input {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
/* line 267, ../sass/distribution/_index.scss */
/* line 271, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity { .distribution-index .modal-form-order table.table-products td.quantity {
width: 165px; width: 165px;
} }
/* line 270, ../sass/distribution/_index.scss */
/* line 274, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity input { .distribution-index .modal-form-order table.table-products td.quantity input {
text-align: center; text-align: center;
color: black; color: black;
} }
/* line 274, ../sass/distribution/_index.scss */
/* line 278, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity .form-control { .distribution-index .modal-form-order table.table-products td.quantity .form-control {
border-right: 0px none; border-right: 0px none;
padding-right: 4px; padding-right: 4px;
} }
/* line 278, ../sass/distribution/_index.scss */
/* line 282, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity .input-group-addon { .distribution-index .modal-form-order table.table-products td.quantity .input-group-addon {
padding: 5px; padding: 5px;
padding-left: 0px; padding-left: 0px;
border-left: 0px none; border-left: 0px none;
border-right: 0px none; border-right: 0px none;
} }
/* line 286, ../sass/distribution/_index.scss */
/* line 290, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining { .distribution-index .modal-form-order table.table-products td.quantity-remaining {
text-align: right; text-align: right;
} }
/* line 289, ../sass/distribution/_index.scss */
/* line 293, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.quantity-remaining, .distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite { .distribution-index .modal-form-order table.table-products td.quantity-remaining.quantity-remaining, .distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite {
color: #00A65A; color: #00A65A;
} }
/* line 293, ../sass/distribution/_index.scss */
/* line 297, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.negative { .distribution-index .modal-form-order table.table-products td.quantity-remaining.negative {
color: #DD4B39; color: #DD4B39;
} }
/* line 297, ../sass/distribution/_index.scss */
/* line 301, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite, .distribution-index .modal-form-order table.table-products td.quantity-remaining.empty { .distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite, .distribution-index .modal-form-order table.table-products td.quantity-remaining.empty {
font-size: 18px; font-size: 18px;
} }
/* line 304, ../sass/distribution/_index.scss */
/* line 308, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .actions-form button { .distribution-index .modal-form-order .actions-form button {
margin-left: 15px; margin-left: 15px;
} }
/* line 312, ../sass/distribution/_index.scss */
/* line 316, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-icon { .distribution-index .modal-payment .info-box .info-box-icon {
width: 50px; width: 50px;
} }
/* line 314, ../sass/distribution/_index.scss */
/* line 318, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-icon i { .distribution-index .modal-payment .info-box .info-box-icon i {
font-size: 30px; font-size: 30px;
} }
/* line 318, ../sass/distribution/_index.scss */
/* line 322, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-content { .distribution-index .modal-payment .info-box .info-box-content {
margin-left: 50px; margin-left: 50px;
} }

+ 3
- 1
backend/web/js/vuejs/distribution-index.js View File

}) })


Vue.component('order-form',{ Vue.component('order-form',{
props: ['date', 'pointsSale', 'users', 'products', 'order'],
props: ['date', 'pointsSale', 'users', 'products', 'order', 'producer'],
data: function() { data: function() {
return { return {
errors: [], errors: [],
idUser: 0, idUser: 0,
username : '', username : '',
comment: '', comment: '',
producer: null,
baseUrl: $('meta[name=baseurl]').attr('content'),
} ; } ;
}, },
template: '#order-form-template', template: '#order-form-template',

+ 5
- 1
backend/web/sass/distribution/_index.scss View File

} }
.modal-form-order { .modal-form-order {
.btn-credit {
float: right ;
}
table.table-products { table.table-products {
.product-ordered { .product-ordered {
td { td {
background-color: #e9e9e9 ; background-color: #e9e9e9 ;

Loading…
Cancel
Save