From 170a827e9929dceafd5a24ae081a51605ccf63d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Mon, 22 Aug 2016 17:01:26 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20valid=C3=A9=20par=20+=20Fix=20annulatio?= =?UTF-8?q?ns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - La personne validant une commande apparaît dans l'historique K-Psul - 2 fix annulation K-Psul --- kfet/static/kfet/css/history.css | 5 ++++- kfet/templates/kfet/kpsul.html | 12 ++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/kfet/static/kfet/css/history.css b/kfet/static/kfet/css/history.css index a9a6da08..22780c4f 100644 --- a/kfet/static/kfet/css/history.css +++ b/kfet/static/kfet/css/history.css @@ -4,7 +4,6 @@ #history span { display:inline-block; - height:100%; } #history .day { @@ -40,6 +39,10 @@ width:90px; } +#history .opegroup .valid_by { + padding-left:20px +} + #history .ope { position:relative; height:25px; diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html index dcdca3ad..3bc1cb19 100644 --- a/kfet/templates/kfet/kpsul.html +++ b/kfet/templates/kfet/kpsul.html @@ -945,7 +945,7 @@ $(document).ready(function() { // ----- var history_container = $('#history'); - var history_operationgroup_html = '
'; + var history_operationgroup_html = '
'; var history_operation_html = '
'; function getOpeHtml(ope, is_cof=false, trigramme='') { @@ -994,12 +994,16 @@ $(document).ready(function() { } else { var amount = amountToUKF(amount, opegroup['is_cof']); } + var valid_by = ''; + if (opegroup['valid_by__trigramme']) + valid_by = 'Par '+opegroup['valid_by__trigramme']; opegroup_html .attr('data-opegroup', opegroup['id']) .find('.time').text(at_formated).end() .find('.amount').text(amount).end() - .find('.trigramme').text(trigramme).end(); + .find('.trigramme').text(trigramme).end() + .find('.valid_by').text(valid_by).end(); return opegroup_html; } @@ -1152,9 +1156,9 @@ $(document).ready(function() { }); function cancelOpeGroup(opegroup) { - var opegroup_html = history_container.find('[data-opegroup='+opegroup['id']+']'); + var opegroup_html = history_container.find('.opegroup[data-opegroup='+opegroup['id']+']'); if (opegroup_html.find('.trigramme').text() == 'LIQ') { - var amount = (- parseFloat(opegroup['amount']).tofixed(2))+'€'; + var amount = (- parseFloat(opegroup['amount']).toFixed(2))+'€'; } else { var amount = amountToUKF(opegroup['amount'], opegroup['on_acc__is_cof']); }