Commit 5f0b1280416b1bdf80325ed88ae645dc7ce4892c
1 parent
f4bbceae
Reset des données
Showing
1 changed file
with
19 additions
and
1 deletions
Show diff stats
js/init.js
... | ... | @@ -73,6 +73,24 @@ var app = new Vue({ |
73 | 73 | cb(retour, donnees) |
74 | 74 | }) |
75 | 75 | }, |
76 | + resetDonnees: function() { | |
77 | + this.login = '' | |
78 | + this.droit = '' | |
79 | + this.jeton = '' | |
80 | + this.connecte = false | |
81 | + this.date = 1 | |
82 | + this.mdp = '' | |
83 | + this.idCarte = '' | |
84 | + this.solde = '' | |
85 | + this.credit = '' | |
86 | + this.prix = '' | |
87 | + this.moi = {} | |
88 | + this.u_nouveau = {} | |
89 | + this.clients = [] | |
90 | + this.transactions = [] | |
91 | + this.utilisateurs = [] | |
92 | + this.statistiques = {} | |
93 | + }, | |
76 | 94 | actuClients: function() { |
77 | 95 | var that = this |
78 | 96 | this.api("client/liste", {}, function(retour, donnees) { |
... | ... | @@ -285,7 +303,7 @@ var app = new Vue({ |
285 | 303 | this.api("utilisateur/deconnexion", {} , function(retour, donnees) { |
286 | 304 | switch(retour) { |
287 | 305 | case "ok": |
288 | - that.moi = {} | |
306 | + that.resetDonnees() | |
289 | 307 | that.page = 'connexion' |
290 | 308 | break; |
291 | 309 | ... | ... |