add recipient
This commit is contained in:
@@ -60,6 +60,19 @@
|
||||
<ion-col><hr /></ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="intr">City </ion-col>
|
||||
<ion-col>
|
||||
<ion-input (ionChange)="refreshAccNo()" type="text" label="City" placeholder="Enter City" value="{{account_city}}" [(ngModel)]='account_city'></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="intr">State </ion-col>
|
||||
<ion-col>
|
||||
<ion-input (ionChange)="refreshAccNo()" type="text" label="State" placeholder="State" value="{{account_state}}" [(ngModel)]='account_state'></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-button expand="block" shape="round" color="secondary"
|
||||
|
||||
@@ -15,28 +15,48 @@ export class AddbankPage implements OnInit {
|
||||
@ViewChild('sel_bank') sel_bank;
|
||||
@ViewChild('account_no') account_no;
|
||||
@ViewChild('confirm_account_no') confirm_account_no;
|
||||
@ViewChild('account_city') account_city;
|
||||
@ViewChild('account_state') account_state;
|
||||
|
||||
isDisabled:boolean = true;
|
||||
constructor( private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private alertController: AlertController) {
|
||||
private alertController: AlertController)
|
||||
{
|
||||
|
||||
this.isDisabled = true;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getcountryBanksData();
|
||||
this. getaccountTypesData();
|
||||
}
|
||||
this.getcountryBanksData();
|
||||
this. getaccountTypesData();
|
||||
this.isDisabled = true;
|
||||
this.account_state = this.sessionDataProviderService.account_state;
|
||||
this.account_city = this.sessionDataProviderService.city;
|
||||
debugger;
|
||||
}
|
||||
onBack() {
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
refreshAccNo(){
|
||||
console.log("ACCCC -> " , String(this.account_no).length, this.confirm_account_no, this.confirm_account_no );
|
||||
console.log("ACC22 -> " , String(this.account_city).length, String(this.account_city), this.account_state );
|
||||
this.isDisabled = true;
|
||||
if(String(this.account_no).length >6 && this.confirm_account_no === this.account_no){
|
||||
|
||||
if(
|
||||
this.account_no != undefined &&
|
||||
this.account_city != undefined &&
|
||||
this.account_state != undefined &&
|
||||
String(this.account_no).length >6
|
||||
&& this.confirm_account_no === this.account_no
|
||||
&& String(this?.account_state).length > 3
|
||||
&& String(this?.account_city).length > 3
|
||||
&& String(this.sel_bank).length>1
|
||||
&& String(this.acc_type).length>0
|
||||
){
|
||||
//debugger;
|
||||
this.isDisabled = false;
|
||||
}
|
||||
}
|
||||
@@ -94,6 +114,7 @@ export class AddbankPage implements OnInit {
|
||||
city: string,
|
||||
};
|
||||
|
||||
accountAddResult :any;
|
||||
addRecipientAccount(){
|
||||
|
||||
this.reqData = {
|
||||
@@ -114,12 +135,12 @@ export class AddbankPage implements OnInit {
|
||||
|
||||
|
||||
this.wrenchService.addRecipientAccount(this.reqData).subscribe(
|
||||
accountTypesResult => {
|
||||
this.accountTypesResult = accountTypesResult;
|
||||
console.log("accountTypes RETURN->", this.accountTypesResult);
|
||||
this.accountTypesData = this.accountTypesResult.result_list;
|
||||
accountAddResult => {
|
||||
this.accountAddResult = accountAddResult;
|
||||
console.log("accountAddResult RETURN->", this.accountAddResult);
|
||||
//this.accountTypesData = this.accountTypesResult.result_list;
|
||||
// debugger;
|
||||
console.log("accountTypes RETURN DATA->", this.accountTypesData);
|
||||
this.onBack();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user