add creditpage
This commit is contained in:
@@ -117,6 +117,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <ion-list>-->
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label>Amount({{currency_code}})</ion-label>-->
|
||||
@@ -157,183 +158,66 @@
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
<div *ngIf="curr_page =='redeem_confirm'" >
|
||||
<ion-card>
|
||||
<ion-card-header>
|
||||
<ion-card-title>Confirm Wallet Withdraw</ion-card-title>
|
||||
<!-- <ion-card-subtitle>Redeem from {{currency_code}} Wallet</ion-card-subtitle>-->
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
|
||||
<!-- <ion-list>-->
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label>Amount({{currency_code}})</ion-label>-->
|
||||
<!-- <ion-input label="Fee" type="number" placeholder="0" value="{{amount}}" [readonly]="true"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label >Fee</ion-label>-->
|
||||
<!-- <ion-input label="Fee" type="number" placeholder="0" [(ngModel)]='fee' [readonly]="true"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label>Total</ion-label>-->
|
||||
<!-- <ion-input label="Total" type="number" placeholder="0" [(ngModel)]='total' [readonly]="true"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label>To:</ion-label>-->
|
||||
<!-- <ion-label>{{recipient_name}}</ion-label>-->
|
||||
<!-- </ion-item>-->
|
||||
<!-- </ion-list>-->
|
||||
|
||||
<!-- <ion-button expand="block" color="secondary" (click)="confirmRedeem()">Confirm</ion-button>-->
|
||||
|
||||
<ion-grid class="send-grid">
|
||||
<ion-row>
|
||||
<ion-col class="intr">Amount({{currency_code}})</ion-col>
|
||||
<ion-col>
|
||||
<ion-input label="Fee" type="number" placeholder="0" value="{{amount}}" [readonly]="true"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="intr">Fee</ion-col>
|
||||
<ion-col>
|
||||
<ion-input label="Fee" type="number" placeholder="0" [(ngModel)]='fee_display' [readonly]="true"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="intr">Total</ion-col>
|
||||
<ion-col>
|
||||
<ion-input label="Total" type="number" placeholder="0" [(ngModel)]='total_display' [readonly]="true"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>Recipient</ion-col>
|
||||
</ion-row>
|
||||
<!-- <ion-row>-->
|
||||
<!-- <ion-col>-->
|
||||
<!-- <ion-select placeholder="Select Recipient" [(ngModel)]='recipient' size="block">-->
|
||||
<!-- <!– <ion-select-option value="" >Select Recipient</ion-select-option>–>-->
|
||||
<!-- <ion-select-option value="{{item.recipient_uid}}" *ngFor="let item of myRecipientsData">{{item.recipient}}</ion-select-option>-->
|
||||
<!-- </ion-select>-->
|
||||
<!-- <!– <ion-label>{{recipient_name}}</ion-label>–>-->
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
{{recipient_name}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-button expand="block"
|
||||
shape="round"
|
||||
color="secondary"
|
||||
(click)="confirmRedeem()"
|
||||
[disabled]="isDisabled"
|
||||
>Confirm</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
</ion-grid>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="curr_page =='redeem_result'" >
|
||||
<ion-card>
|
||||
<ion-card-header>
|
||||
<ion-card-title>Withdraw Result</ion-card-title>
|
||||
<!-- <ion-card-subtitle>Redeem from {{currency_code}} Wallet</ion-card-subtitle>-->
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
<ion-grid class="send-grid">
|
||||
<ion-row>
|
||||
<ion-col class="intr">Amount({{currency_code}})</ion-col>
|
||||
<ion-col>
|
||||
<ion-input label="Fee" type="number" placeholder="0" value="{{amount}}" [readonly]="true"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="intr">Fee</ion-col>
|
||||
<ion-col>
|
||||
<ion-input label="Fee" type="number" placeholder="0" [(ngModel)]='fee_display' [readonly]="true"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="intr">Total</ion-col>
|
||||
<ion-col>
|
||||
<ion-input label="Total" type="number" placeholder="0" [(ngModel)]='total_display' [readonly]="true"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>Recipient</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
{{recipient_name}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="intr">Confirmation</ion-col>
|
||||
<ion-col>
|
||||
{{confirmation}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
Estimated delivery time is 2 to 4 Hours.
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
</ion-grid>
|
||||
|
||||
|
||||
<!-- <ion-list>-->
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label>Amount({{currency_code}})</ion-label>-->
|
||||
<!-- <ion-input label="Amount" type="number" placeholder="0" value="{{amount| number : '1.2-2'}}" [readonly]="true"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label >Fee</ion-label>-->
|
||||
<!-- <ion-input label="Fee" type="number" placeholder="0" [(ngModel)]='fee' [readonly]="true"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label>Total</ion-label>-->
|
||||
<!-- <ion-input label="Total" type="number" placeholder="0" [(ngModel)]='total' [readonly]="true"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label>Recipient</ion-label>-->
|
||||
<!-- <ion-label>{{recipient_name}}</ion-label>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item>-->
|
||||
<!-- <ion-label>Confirmation</ion-label>-->
|
||||
<!-- <ion-label>{{confirmation}}</ion-label>-->
|
||||
<!-- </ion-item>-->
|
||||
<!-- </ion-list>-->
|
||||
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<div *ngIf="isModalOpenBackdrop==true">
|
||||
<ion-backdrop [visible]="isModalOpenBackdrop"></ion-backdrop>
|
||||
<ion-modal class="common_modal" [isOpen]="isModalOpen">
|
||||
|
||||
<ng-template>
|
||||
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Confirm Payment</ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button (click)="setCloseModal()">Close</ion-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content class="ion-padding">
|
||||
|
||||
<ion-list class="pop_list">
|
||||
<ion-list-header>
|
||||
<ion-label>Credit {{currency_code}} Wallet</ion-label>
|
||||
</ion-list-header>
|
||||
<ion-item>
|
||||
<ion-label>Amount: </ion-label>
|
||||
<div>{{startCreditResult.amount*0.01| number : '1.2-2' }}</div>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Fee: </ion-label>
|
||||
<div>{{startCreditResult.fee*.01 | number : '1.2-2'}}</div>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Total: </ion-label>
|
||||
<div>{{startCreditResult.total*.01| number : '1.2-2' }}</div>
|
||||
</ion-item>
|
||||
|
||||
|
||||
</ion-list>
|
||||
|
||||
<ion-list class="pop_list" lines="none">
|
||||
<ion-item >
|
||||
<ion-label>Ref Number: </ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<div>{{startCreditResult.credit_reference}}</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<ion-button (click)="processPayment(processor)">Complete</ion-button>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
</ng-template>
|
||||
</ion-modal>
|
||||
</div>
|
||||
@@ -1,4 +1,8 @@
|
||||
|
||||
.pop_list{
|
||||
ion-item{
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
ion-content {
|
||||
ion-card{
|
||||
margin: 10px 0px 10px 0px;
|
||||
|
||||
@@ -5,6 +5,7 @@ import {SessionDataProviderService} from "../../store/session-data-provider.serv
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {BlogDataService} from "../../store/blog-data.service";
|
||||
import {UserWalletService} from "../../store/user-wallet.service";
|
||||
import {Unary} from "@angular/compiler";
|
||||
|
||||
@Component({
|
||||
selector: 'app-addcredit',
|
||||
@@ -21,7 +22,8 @@ export class AddcreditPage implements OnInit {
|
||||
isDisabled:boolean=true;
|
||||
curr_page:string= 'redeem_start';
|
||||
processor:number=0;
|
||||
|
||||
isModalOpen:boolean = false;
|
||||
isModalOpenBackdrop:boolean = false;
|
||||
|
||||
constructor(private navctr: NavController,
|
||||
private router: Router,
|
||||
@@ -47,6 +49,7 @@ export class AddcreditPage implements OnInit {
|
||||
this.getUsersCardsList();
|
||||
}
|
||||
onBack() {
|
||||
this.setCloseModal();
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
@@ -80,13 +83,44 @@ export class AddcreditPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
startCreditData:{
|
||||
member_id:number,
|
||||
sessionid:string,
|
||||
uid:string,
|
||||
currency: string,
|
||||
amount:number,
|
||||
card_uid: string,
|
||||
action:number
|
||||
};
|
||||
|
||||
startCreditResult:any;
|
||||
contineAddCredit(processor){
|
||||
|
||||
this.startCreditData = {
|
||||
member_id:this.sessionDataProviderService.member_id,
|
||||
sessionid:this.sessionDataProviderService.session,
|
||||
uid:this.sessionDataProviderService.member_uid,
|
||||
currency: this.currency_code,
|
||||
amount:this.amount*100,
|
||||
card_uid: this.payment_card,
|
||||
action:11053
|
||||
};
|
||||
|
||||
|
||||
|
||||
this.wrenchService.startCredit(this.startCreditData).subscribe(
|
||||
startCreditResult => {
|
||||
console.log("startCreditResult TOTAL RETURN->", this.startCreditResult);
|
||||
if ( startCreditResult!=undefined && startCreditResult.credit_reference!='' ){
|
||||
this.startCreditResult = startCreditResult;
|
||||
this.isModalOpen = true;
|
||||
this.isModalOpenBackdrop= true;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
setCloseModal(){
|
||||
this.isModalOpen = false;
|
||||
setTimeout(()=>{ this.isModalOpenBackdrop= false;},1000);
|
||||
}
|
||||
|
||||
|
||||
amount:number =0;
|
||||
fee:number = 0;
|
||||
@@ -133,5 +167,11 @@ export class AddcreditPage implements OnInit {
|
||||
|
||||
|
||||
// this.total = this.fee + this.amount;
|
||||
}
|
||||
|
||||
processPayment(processor){
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,6 +269,11 @@ export class WrenchService {
|
||||
return this.getPostData("familytransfer", reqData);
|
||||
}
|
||||
|
||||
startCredit(reqData){
|
||||
return this.getPostData("startcredit", reqData);
|
||||
}
|
||||
|
||||
|
||||
familySuggestList(usrData){
|
||||
return this.getPostData("familysuggestlist", usrData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user