charge message

This commit is contained in:
CHIEFSOFT\ameye
2024-02-15 06:36:26 -05:00
parent cbd4649c5c
commit 1423c015b2
+19 -5
View File
@@ -3,6 +3,7 @@ import {
AlertController,
LoadingController,
NavController,
ToastController,
} from "@ionic/angular";
import { Router } from "@angular/router";
import { SessionDataProviderService } from "../../store/session-data-provider.service";
@@ -80,7 +81,8 @@ export class AddcreditPage implements OnInit {
private loadingCtrl: LoadingController,
public alertController: AlertController,
private flutterwave: Flutterwave,
public userWalletService: UserWalletService
public userWalletService: UserWalletService,
public toastController: ToastController
) {
this.walletData = this.router.getCurrentNavigation().extras.state;
@@ -205,7 +207,8 @@ export class AddcreditPage implements OnInit {
//debugger;
if (response?.status != undefined && response.status == "successful") {
this.credit_confirmation = "Successful";
this.showCrediAlert("Payment Processing", "Completed");
// this.showCrediAlert("Payment Processing", "Completed");
this.presentToast("Completed", "middle");
//---------------------------------------------------
var completeCredit = {
action: 11061,
@@ -446,8 +449,8 @@ export class AddcreditPage implements OnInit {
) {
this.userWalletService.getWalletData(); // refresh the wallet
this.credit_confirmation = creditResult.confirmation;
this.showCrediAlert("Credit Processing", "Completed");
//this.showCrediAlert("Credit Processing", "Completed");
this.presentToast("Completed", "middle");
setTimeout(() => {
// this.setCloseModal();
}, 5000);
@@ -510,7 +513,8 @@ export class AddcreditPage implements OnInit {
) {
this.userWalletService.getWalletData(); // refresh the wallet
this.credit_confirmation = creditResult.confirmation;
this.showCrediAlert("Credit Processing", "Completed");
// this.showCrediAlert("Credit Processing", "Completed");
this.presentToast("Completed", "middle");
setTimeout(() => {
// this.setCloseModal();
@@ -531,6 +535,16 @@ export class AddcreditPage implements OnInit {
action: number;
};
async presentToast(amessage, position: "top" | "middle" | "bottom") {
const toast = await this.toastController.create({
message: amessage,
duration: 2500,
position: position,
});
await toast.present();
}
async showCrediAlert(mtitle: string, amessage: string) {
const alert = await this.alertController.create({
header: "WrenchBoard",