From 5a4237ec81f3f92f4115ea6ee36120e540127f46 Mon Sep 17 00:00:00 2001 From: Matt Marcha Date: Fri, 19 Oct 2018 17:00:53 +0200 Subject: [PATCH] Remplissage des pages --- src/pages/buy/buy.html | 33 ++++++++++++++++++++++++++++++++- src/pages/buy/buy.ts | 18 +++++++++++++++++- src/pages/home/home.html | 15 +++++++++++++-- 3 files changed, 62 insertions(+), 4 deletions(-) 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..fe6213d 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) { + 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 3734968..866c668 100644 --- a/src/pages/home/home.html +++ b/src/pages/home/home.html @@ -7,15 +7,26 @@ - home + Mon compte - + +

Bonjour, François Pignon

+ + + Solde actuel + + +

567,38

+

Gonettes

+
+
+