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();
|
||||
|
||||
@@ -33,7 +33,10 @@ export class MyCoursePage implements OnInit {
|
||||
this.router.navigate(['marketdetail'],{state: item});
|
||||
}
|
||||
|
||||
|
||||
ionViewDidEnter(){
|
||||
console.log('Home page did enter - > ionViewDidEnter ');
|
||||
this.getJobsData();
|
||||
}
|
||||
|
||||
usrData: {
|
||||
action:11200, member_id: number, uid: string, sessionid: string, limit:20, page:1
|
||||
|
||||
@@ -11,38 +11,7 @@ import {RecipientsService} from "../../store/recipients.service";
|
||||
styleUrls: ['./redeem.page.scss'],
|
||||
})
|
||||
export class RedeemPage implements OnInit {
|
||||
/*
|
||||
action_type
|
||||
:
|
||||
"AC_AD_WR_FUND"
|
||||
amount
|
||||
:
|
||||
"93178934"
|
||||
code
|
||||
:
|
||||
"NAIRA"
|
||||
country
|
||||
:
|
||||
"NG"
|
||||
currency
|
||||
:
|
||||
""
|
||||
description
|
||||
:
|
||||
"Naira"
|
||||
escrow
|
||||
:
|
||||
0
|
||||
symbol
|
||||
:
|
||||
"#"
|
||||
transfer_limit
|
||||
:
|
||||
"500000"
|
||||
wallet_uid
|
||||
:
|
||||
"cc0f8743-3f18-4214-ba4b-781e5dda9cb8"
|
||||
*/
|
||||
|
||||
walletData:any;
|
||||
tabs = 'bank_redeem';
|
||||
curr_balance:number =0;
|
||||
@@ -73,12 +42,25 @@ wallet_uid
|
||||
|
||||
myRecipientsData:any;
|
||||
ngOnInit() {
|
||||
//this.recipientsService.getMyRecipientsData();
|
||||
this.myRecipientsData = this.recipientsService.getMyRecipientsData();
|
||||
this.getPaymentHxData();
|
||||
//this.getMyRecipientsData();
|
||||
this.myRecipientsData = this.recipientsService.myRecipientsData;
|
||||
}
|
||||
|
||||
ionViewDidEnter(){
|
||||
console.log('Home page did enter - > ionViewDidEnter ');
|
||||
//this.recipientsService.getMyRecipientsData();
|
||||
this.getMyRecipientsData();
|
||||
}
|
||||
|
||||
ionViewWillEnter(){
|
||||
console.log('Home page did enter - > ionViewWillEnter');
|
||||
//this.recipientsService.getMyRecipientsData();
|
||||
this.myRecipientsData = this.recipientsService.myRecipientsData;
|
||||
}
|
||||
|
||||
onBack() {
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user