From 5464dee3faac4acb9176ef3988b2ead5aad82c63 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Sat, 7 May 2016 08:12:19 +0200 Subject: [PATCH] Affichage propres transactions --- api/commun.php | 2 +- js/init.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/api/commun.php b/api/commun.php index f7e6cc0..1b36927 100644 --- a/api/commun.php +++ b/api/commun.php @@ -16,7 +16,7 @@ define("TRANSACTION_RECHARGEMENT", 2); define("TRANSACTION_PAIEMENT", 3); define("TRANSACTION_VIDANGE", 4); -define("TRANSACTION_DUREE", 60); +define("TRANSACTION_DUREE", 120); // Fonctions utiles function retour($status, $donnees = array()) { // Renvoie les données passées diff --git a/js/init.js b/js/init.js index 49906b5..5e0960b 100644 --- a/js/init.js +++ b/js/init.js @@ -89,7 +89,14 @@ var app = new Vue({ }, actuTransactions: function() { var that = this - this.api("transactions", {}, function(retour, donnees) { + if (this.moi.droit >= 3) { + appel = "transaction" + donnees = {} + } else { + appel = "utilisateur/fiche" + donnees = {login: this.moi.login} + } + this.api(appel, donnees, function(retour, donnees) { switch(retour) { case "ok": that.transactions = donnees.transactions -- libgit2 0.21.2