credit alert
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {LoadingController, NavController} from "@ionic/angular";
|
||||
import {AlertController, LoadingController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
@@ -32,6 +32,7 @@ export class AddcreditPage implements OnInit {
|
||||
private wrenchService: WrenchService,
|
||||
public blogDataService: BlogDataService,
|
||||
private loadingCtrl: LoadingController,
|
||||
public alertController: AlertController,
|
||||
public userWalletService: UserWalletService) {
|
||||
this.walletData = this.router.getCurrentNavigation().extras.state;
|
||||
if ( this.walletData != undefined ){
|
||||
@@ -216,16 +217,7 @@ export class AddcreditPage implements OnInit {
|
||||
if ( creditResult!=undefined && creditResult.internal_return > 0 && creditResult.confirmation !=''){
|
||||
this.userWalletService.getWalletData(); // refresh the wallet
|
||||
this.credit_confirmation = creditResult.confirmation;
|
||||
alert("Completed");
|
||||
this.onBack();
|
||||
// setTimeout(()=>{
|
||||
// this.onBack();
|
||||
// },2500);
|
||||
// this.startCreditResult = startCreditResult;
|
||||
//
|
||||
//
|
||||
// this.isModalOpen = true;
|
||||
// this.isModalOpenBackdrop= true;
|
||||
this.showCrediAlert("Credit Processing","Completed");
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -250,4 +242,20 @@ export class AddcreditPage implements OnInit {
|
||||
action:number
|
||||
};
|
||||
|
||||
async showCrediAlert(mtitle: string, amessage: string) {
|
||||
|
||||
const alert = await this.alertController.create({
|
||||
header: 'WrenchBoard',
|
||||
subHeader: mtitle,
|
||||
message: amessage,
|
||||
buttons: [{
|
||||
text: 'OK',
|
||||
role: 'confirm',
|
||||
handler: () => {
|
||||
this.onBack();
|
||||
},
|
||||
}],
|
||||
});
|
||||
await alert.present();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user