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,9 +301,9 @@ var app = new Vue({ | ||
301 | this.api("client/ajouter", {idCarte: this.idCarte, solde: this.solde, decouvert: this.decouvert}, function(retour, donnees) { | 301 | this.api("client/ajouter", {idCarte: this.idCarte, solde: this.solde, decouvert: this.decouvert}, function(retour, donnees) { |
302 | switch(retour) { | 302 | switch(retour) { |
303 | case "ok": | 303 | case "ok": |
304 | + that.transaction(donnees.idTransaction, "Client " + that.idCarte + " crée avec un solde de " + that.solde + " €") | ||
304 | that.idCarte = '' | 305 | that.idCarte = '' |
305 | that.solde = '' | 306 | that.solde = '' |
306 | - that.transaction(donnees.idTransaction, "Client " + that.idCarte + " crée avec un solde de " + that.solde + " €") | ||
307 | break; | 307 | break; |
308 | 308 | ||
309 | default: | 309 | default: |
@@ -317,9 +317,9 @@ var app = new Vue({ | @@ -317,9 +317,9 @@ var app = new Vue({ | ||
317 | this.api("client/recharger", {idCarte: this.idCarte, montant: this.credit}, function(retour, donnees) { | 317 | this.api("client/recharger", {idCarte: this.idCarte, montant: this.credit}, function(retour, donnees) { |
318 | switch(retour) { | 318 | switch(retour) { |
319 | case "ok": | 319 | case "ok": |
320 | + that.transaction(donnees.idTransaction, "Client " + that.idCarte + " rechargé : " + donnees.soldeAncien + " + " + that.credit + " → " + donnees.soldeNouveau + " €") | ||
320 | that.idCarte = '' | 321 | that.idCarte = '' |
321 | that.credit = '' | 322 | that.credit = '' |
322 | - that.transaction(donnees.idTransaction, "Client " + that.idCarte + " rechargé : " + donnees.soldeAncien + " + " + that.credit + " → " + donnees.soldeNouveau + " €") | ||
323 | break; | 323 | break; |
324 | 324 | ||
325 | default: | 325 | default: |
@@ -339,9 +339,9 @@ var app = new Vue({ | @@ -339,9 +339,9 @@ var app = new Vue({ | ||
339 | this.api("client/payer", options, function(retour, donnees) { | 339 | this.api("client/payer", options, function(retour, donnees) { |
340 | switch(retour) { | 340 | switch(retour) { |
341 | case "ok": | 341 | case "ok": |
342 | + that.transaction(donnees.idTransaction, "Client " + that.idCarte + " débité : " + donnees.soldeAncien + " - " + donnees.montant + " → " + donnees.soldeNouveau + " €") | ||
342 | that.idCarte = '' | 343 | that.idCarte = '' |
343 | that.prix = '' | 344 | that.prix = '' |
344 | - that.transaction(donnees.idTransaction, "Client " + that.idCarte + " débité : " + donnees.soldeAncien + " - " + donnees.montant + " → " + donnees.soldeNouveau + " €") | ||
345 | break; | 345 | break; |
346 | 346 | ||
347 | default: | 347 | default: |
@@ -355,8 +355,8 @@ var app = new Vue({ | @@ -355,8 +355,8 @@ var app = new Vue({ | ||
355 | this.api("client/vidange", {idCarte: this.idCarte}, function(retour, donnees) { | 355 | this.api("client/vidange", {idCarte: this.idCarte}, function(retour, donnees) { |
356 | switch(retour) { | 356 | switch(retour) { |
357 | case "ok": | 357 | case "ok": |
358 | - that.idCarte = '' | ||
359 | that.transaction(donnees.idTransaction, "Client " + that.idCarte + " vidé : " + donnees.soldeAncien + " → 0 €") | 358 | that.transaction(donnees.idTransaction, "Client " + that.idCarte + " vidé : " + donnees.soldeAncien + " → 0 €") |
359 | + that.idCarte = '' | ||
360 | break; | 360 | break; |
361 | 361 | ||
362 | default: | 362 | default: |