From 376417165d68867cac301518fb245541ab171ba7 Mon Sep 17 00:00:00 2001 From: onsaliyo Date: Wed, 26 May 2021 16:35:53 +0200 Subject: [PATCH] reserva, activa el codigo y devuelve el descuento (error: cualquier codigo da descuento) --- src/app/reservamodal/reservamodal.page.html | 3 +++ src/app/reservamodal/reservamodal.page.ts | 2 ++ src/app/view-evento-cliente/view-evento-cliente.page.ts | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/reservamodal/reservamodal.page.html b/src/app/reservamodal/reservamodal.page.html index ebf8401..fa483d7 100644 --- a/src/app/reservamodal/reservamodal.page.html +++ b/src/app/reservamodal/reservamodal.page.html @@ -5,5 +5,8 @@ + ¡Reserva realizada! + Tu código de reserva: {{codigoReserva}} +Descuento del {{descuento}} % diff --git a/src/app/reservamodal/reservamodal.page.ts b/src/app/reservamodal/reservamodal.page.ts index 3569021..892dd1d 100644 --- a/src/app/reservamodal/reservamodal.page.ts +++ b/src/app/reservamodal/reservamodal.page.ts @@ -9,10 +9,12 @@ import { NavParams } from '@ionic/angular'; export class ReservamodalPage implements OnInit { codigoReserva: string; + descuento: number; constructor(private navParams: NavParams) { } ngOnInit() { this.codigoReserva = this.navParams.get('codigo'); + this.descuento = this.navParams.get('descuento'); } } diff --git a/src/app/view-evento-cliente/view-evento-cliente.page.ts b/src/app/view-evento-cliente/view-evento-cliente.page.ts index 38fa5bc..ad9f31e 100644 --- a/src/app/view-evento-cliente/view-evento-cliente.page.ts +++ b/src/app/view-evento-cliente/view-evento-cliente.page.ts @@ -64,7 +64,8 @@ export class ViewEventoClientePage implements OnInit { this.modalController.create({ component: ReservamodalPage, componentProps : { - codigo: this.reserva.codigoUnico + codigo: this.reserva.codigoUnico, + descuento: this.reserva.descuentoPorciento } }).then(modal => modal.present());