add bank pages
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {AlertController, NavController, ToastController} from "@ionic/angular";
|
||||
import {AlertController, NavController, ToastController, LoadingController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
@@ -30,7 +30,8 @@ export class AddbankPage implements OnInit {
|
||||
private wrenchService: WrenchService,
|
||||
private alertController: AlertController,
|
||||
private toastController: ToastController,
|
||||
public recipientsService: RecipientsService
|
||||
public recipientsService: RecipientsService,
|
||||
private loadingCtrl: LoadingController
|
||||
)
|
||||
{
|
||||
this.walletData = this.router.getCurrentNavigation().extras.state;
|
||||
@@ -128,8 +129,13 @@ export class AddbankPage implements OnInit {
|
||||
city: string,
|
||||
};
|
||||
|
||||
accountAddResult :any;
|
||||
addRecipientAccount(){
|
||||
accountAddResult :any;
|
||||
async addRecipientAccount(){
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Adding recipent account',
|
||||
duration: 5000,
|
||||
});
|
||||
|
||||
this.reqData = {
|
||||
action:11176,
|
||||
@@ -145,13 +151,14 @@ export class AddbankPage implements OnInit {
|
||||
state: this.account_state,
|
||||
city: this.account_city,
|
||||
};
|
||||
|
||||
loading.present();
|
||||
this.wrenchService.addRecipientAccount(this.reqData).subscribe(
|
||||
accountAddResult => {
|
||||
this.accountAddResult = accountAddResult;
|
||||
console.log("accountAddResult RETURN->", this.accountAddResult);
|
||||
if ( this.accountAddResult.internal_return != undefined && this.accountAddResult.internal_return > 0 ){
|
||||
this.presentToast("Recipient Accound Added",'middle');
|
||||
loading.dismiss();
|
||||
setTimeout(() => {
|
||||
this.recipientsService.getMyRecipientsData();
|
||||
this.onBack();
|
||||
|
||||
Reference in New Issue
Block a user