diff --git a/src/pages/buy/buy.html b/src/pages/buy/buy.html index 5cd9a3e..ab46543 100644 --- a/src/pages/buy/buy.html +++ b/src/pages/buy/buy.html @@ -7,12 +7,43 @@ - buy + Échange de monnaie + + + + Montant + + + + + N° de carte + + + + + Titulaire de la carte + + + + + Date d'expiration + + + + + Cryptogramme + + + + + + + diff --git a/src/pages/buy/buy.ts b/src/pages/buy/buy.ts index aa84818..58b2b96 100644 --- a/src/pages/buy/buy.ts +++ b/src/pages/buy/buy.ts @@ -1,5 +1,6 @@ import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams } from 'ionic-angular'; +import { AlertController } from 'ionic-angular'; /** * Generated class for the BuyPage page. @@ -15,11 +16,26 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular'; }) export class BuyPage { - constructor(public navCtrl: NavController, public navParams: NavParams) { + constructor(public navCtrl: NavController, public navParams: NavParams, public alertCtrl: AlertController) { } ionViewDidLoad() { console.log('ionViewDidLoad BuyPage'); } + sendTransaction($amount) { + //TODO : Contacter l'API et proposer la transaction. L'API répondra true ou False + if (true === true) { + this.navCtrl.popToRoot(); + } + else { + const alert = this.alertCtrl.create({ + title: 'Erreur', + subTitle: 'La transaction a échoué. Vérifiez les données saisies et réessayez.', + buttons: ['OK'] + }); + alert.present(); + } + } + } diff --git a/src/pages/home/home.html b/src/pages/home/home.html index 9f9f2a8..977b105 100644 --- a/src/pages/home/home.html +++ b/src/pages/home/home.html @@ -7,17 +7,31 @@ - home + Mon compte + + + +

Bonjour, François Pignon

+ + + Solde actuel + + +

567,38

+

Gonettes

+
+
+ - - - - + + + +
diff --git a/src/pages/send/send.html b/src/pages/send/send.html index ab51b22..fbf9023 100644 --- a/src/pages/send/send.html +++ b/src/pages/send/send.html @@ -7,7 +7,7 @@ - send + Effectuer un virement