Merge branch 'Aufinal/previous_op' into 'k-fet'

Rappel de l'opération précédente sur K-Psul

Rajoute un champ d'informations sur la précédente opération validée (sur
la machine, pas sur le serveur) : valeur du panier et solde restant dans
le cas d'un utilisateur, et valeur du panier et rendus de monnaie dans
le cas d'une opération en liquide.

Fix #110

See merge request !146
This commit is contained in:
Aurélien Delobelle 2017-01-07 02:33:53 +01:00
commit dd43f9d868
2 changed files with 40 additions and 4 deletions

View file

@ -8,7 +8,7 @@ input[type=number]::-webkit-outer-spin-button {
margin: 0;
}
#account, #checkout, input, #history, #basket, #basket_rel, #articles_data {
#account, #checkout, input, #history, #basket, #basket_rel, #previous_op, #articles_data {
background:#fff;
}
@ -335,12 +335,13 @@ input[type=number]::-webkit-outer-spin-button {
padding:0;
}
#basket, #basket_rel {
#basket, #basket_rel, #previous_op {
height:100%;
}
#basket_rel {
#basket_rel, #previous_op {
border-top:1px solid #C8102E;
padding-left: 3px;
}
#basket {
@ -354,6 +355,11 @@ input[type=number]::-webkit-outer-spin-button {
#basket_rel {
border-top:0;
margin-left:7px;
margin-right:7px;
}
#previous_op {
border-top:0;
margin-left:7px;
}
}
@ -385,6 +391,16 @@ input[type=number]::-webkit-outer-spin-button {
/* History */
#previous_op .trigramme {
width:100%;
background-color:rgba(200,16,46,0.85);
color:#FFF;
font-weight:bold;
padding:3px;
margin-left: -3px;
margin-bottom: 3px;
}
.kpsul_middle_right_col {
overflow:auto;
}

View file

@ -138,10 +138,14 @@
</table>
</div>
</div>
<div class="col-sm-6">
<div class="col-sm-3">
<div id="basket_rel">
</div>
</div>
<div class="col-sm-3">
<div id="previous_op">
</div>
</div>
</div>
</div>
</div>
@ -476,6 +480,7 @@ $(document).ready(function() {
},
})
.done(function(data) {
updatePreviousOp();
coolReset();
lock = 0;
})
@ -1048,6 +1053,20 @@ $(document).ready(function() {
});
}
var previousop_container = $('#previous_op');
function updatePreviousOp() {
var previousop_html = '';
var trigramme = account_data['trigramme'];
previousop_html += '<div class="trigramme">Trigramme : '+trigramme+'</div>';
previousop_html += basketrel_container.html();
previousop_container.html(previousop_html);
}
function resetPreviousOp() {
previousop_container.html('');
}
// -----
// Addcost
// -----
@ -1216,6 +1235,7 @@ $(document).ready(function() {
coolReset(give_tri_focus);
checkoutInput.trigger('change');
resetArticles();
resetPreviousOp();
khistory.reset();
resetSettings();
getArticles();