Commit 1b5199e68b9c7500769a1a2e281029a75ca48bea
1 parent
33a27ead
Toast avant de reset les champs
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
js/init.js
... | ... | @@ -301,9 +301,9 @@ var app = new Vue({ |
301 | 301 | this.api("client/ajouter", {idCarte: this.idCarte, solde: this.solde, decouvert: this.decouvert}, function(retour, donnees) { |
302 | 302 | switch(retour) { |
303 | 303 | case "ok": |
304 | + that.transaction(donnees.idTransaction, "Client " + that.idCarte + " crée avec un solde de " + that.solde + " €") | |
304 | 305 | that.idCarte = '' |
305 | 306 | that.solde = '' |
306 | - that.transaction(donnees.idTransaction, "Client " + that.idCarte + " crée avec un solde de " + that.solde + " €") | |
307 | 307 | break; |
308 | 308 | |
309 | 309 | default: |
... | ... | @@ -317,9 +317,9 @@ var app = new Vue({ |
317 | 317 | this.api("client/recharger", {idCarte: this.idCarte, montant: this.credit}, function(retour, donnees) { |
318 | 318 | switch(retour) { |
319 | 319 | case "ok": |
320 | + that.transaction(donnees.idTransaction, "Client " + that.idCarte + " rechargé : " + donnees.soldeAncien + " + " + that.credit + " → " + donnees.soldeNouveau + " €") | |
320 | 321 | that.idCarte = '' |
321 | 322 | that.credit = '' |
322 | - that.transaction(donnees.idTransaction, "Client " + that.idCarte + " rechargé : " + donnees.soldeAncien + " + " + that.credit + " → " + donnees.soldeNouveau + " €") | |
323 | 323 | break; |
324 | 324 | |
325 | 325 | default: |
... | ... | @@ -339,9 +339,9 @@ var app = new Vue({ |
339 | 339 | this.api("client/payer", options, function(retour, donnees) { |
340 | 340 | switch(retour) { |
341 | 341 | case "ok": |
342 | + that.transaction(donnees.idTransaction, "Client " + that.idCarte + " débité : " + donnees.soldeAncien + " - " + donnees.montant + " → " + donnees.soldeNouveau + " €") | |
342 | 343 | that.idCarte = '' |
343 | 344 | that.prix = '' |
344 | - that.transaction(donnees.idTransaction, "Client " + that.idCarte + " débité : " + donnees.soldeAncien + " - " + donnees.montant + " → " + donnees.soldeNouveau + " €") | |
345 | 345 | break; |
346 | 346 | |
347 | 347 | default: |
... | ... | @@ -355,8 +355,8 @@ var app = new Vue({ |
355 | 355 | this.api("client/vidange", {idCarte: this.idCarte}, function(retour, donnees) { |
356 | 356 | switch(retour) { |
357 | 357 | case "ok": |
358 | - that.idCarte = '' | |
359 | 358 | that.transaction(donnees.idTransaction, "Client " + that.idCarte + " vidé : " + donnees.soldeAncien + " → 0 €") |
359 | + that.idCarte = '' | |
360 | 360 | break; |
361 | 361 | |
362 | 362 | default: | ... | ... |