Commit 5464dee3faac4acb9176ef3988b2ead5aad82c63
1 parent
85c9fec8
Affichage propres transactions
Showing
2 changed files
with
9 additions
and
2 deletions
Show diff stats
api/commun.php
... | ... | @@ -16,7 +16,7 @@ define("TRANSACTION_RECHARGEMENT", 2); |
16 | 16 | define("TRANSACTION_PAIEMENT", 3); |
17 | 17 | define("TRANSACTION_VIDANGE", 4); |
18 | 18 | |
19 | -define("TRANSACTION_DUREE", 60); | |
19 | +define("TRANSACTION_DUREE", 120); | |
20 | 20 | |
21 | 21 | // Fonctions utiles |
22 | 22 | function retour($status, $donnees = array()) { // Renvoie les données passées | ... | ... |
js/init.js
... | ... | @@ -89,7 +89,14 @@ var app = new Vue({ |
89 | 89 | }, |
90 | 90 | actuTransactions: function() { |
91 | 91 | var that = this |
92 | - this.api("transactions", {}, function(retour, donnees) { | |
92 | + if (this.moi.droit >= 3) { | |
93 | + appel = "transaction" | |
94 | + donnees = {} | |
95 | + } else { | |
96 | + appel = "utilisateur/fiche" | |
97 | + donnees = {login: this.moi.login} | |
98 | + } | |
99 | + this.api(appel, donnees, function(retour, donnees) { | |
93 | 100 | switch(retour) { |
94 | 101 | case "ok": |
95 | 102 | that.transactions = donnees.transactions | ... | ... |