add credit
This commit is contained in:
@@ -13,11 +13,11 @@
|
||||
<ion-title>Add Credit</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>{{currency_description}} Wallet</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<!--<ion-header>-->
|
||||
<!-- <ion-toolbar>-->
|
||||
<!-- <ion-title>{{currency_description}} Wallet</ion-title>-->
|
||||
<!-- </ion-toolbar>-->
|
||||
<!--</ion-header>-->
|
||||
<ion-content>
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/redeem.jpg)'">
|
||||
<div class="ion-padding">
|
||||
@@ -27,23 +27,10 @@
|
||||
|
||||
<div class="ion-padding">
|
||||
<div class="boxed_contents">
|
||||
<ion-label class="color_text">Balance: {{curr_balance| number : '1.2-2'}} {{currency_description}}</ion-label>
|
||||
<ion-label class="color_text">Current Balance: {{curr_balance| number : '1.2-2'}} {{currency_description}}</ion-label>
|
||||
<div class="items">
|
||||
|
||||
</div>
|
||||
<ion-segment class="common_segment" [(ngModel)]="tabs">
|
||||
<ion-segment-button value="bank_redeem">
|
||||
<ion-label>To Bank</ion-label>
|
||||
</ion-segment-button>
|
||||
<!-- <ion-segment-button value="lesson">-->
|
||||
<!-- <ion-label>My Banks</ion-label>-->
|
||||
<!-- </ion-segment-button>-->
|
||||
<ion-segment-button value="reports">
|
||||
<ion-label>Reports</ion-label>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
|
||||
<div *ngIf="tabs =='bank_redeem'" class="about">
|
||||
<div class="about">
|
||||
<div *ngIf="curr_page =='redeem_start'" >
|
||||
<ion-card>
|
||||
<ion-card-header>
|
||||
@@ -53,56 +40,84 @@
|
||||
|
||||
<ion-card-content>
|
||||
|
||||
<ion-grid class="send-grid">
|
||||
<ion-row>
|
||||
<ion-col class="intr">Amount({{currency_code}})</ion-col>
|
||||
<ion-col>
|
||||
<ion-input (ionChange)="refreshFee()" type="number" label="Amount(ggg)" placeholder="Enter Amount" [(ngModel)]='amount'></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>Payment</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-select (ionChange)="checkSelectVal()" placeholder="Select Payment Card" [(ngModel)]='recipient' size="block">
|
||||
<!-- <ion-select-option value="" >Select Recipient</ion-select-option>-->
|
||||
<ion-select-option value="{{item.card_uid}}" *ngFor="let item of usersCardsData">{{item.description}} **** **** **** {{item.digits}}</ion-select-option>
|
||||
<!-- <ion-select-option value="ADD_NEW_RECIP" >Add Recipient</ion-select-option>-->
|
||||
</ion-select>
|
||||
<!-- <ion-label>{{recipient_name}}</ion-label>-->
|
||||
</ion-col>
|
||||
<!-- <ion-col size="3" style="text-align: right;">-->
|
||||
<!-- <ion-button style="padding: 0px; font-size: 90%; font-weight: bolder;" (click)="addNewBank()">-->
|
||||
<!-- <ion-icon slot="icon-only" name="add"></ion-icon>-->
|
||||
<!-- </ion-button>-->
|
||||
<!-- </ion-col>-->
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
{{recipient_name}}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<div *ngIf="processor == 3030">
|
||||
<ion-grid class="send-grid">
|
||||
<ion-row>
|
||||
<ion-col class="intr">Amount({{currency_code}}) :</ion-col>
|
||||
<ion-col>
|
||||
<ion-input (ionChange)="refreshFee()" type="number" label="Amount(ggg)" placeholder="Enter Amount" [(ngModel)]='amount'></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>
|
||||
<ion-button expand="block" shape="round" [disabled]="isDisabled" color="secondary" (click)="contineRedeem()">Continue</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
</ion-grid>
|
||||
</div>
|
||||
|
||||
<div *ngIf="processor == 5000">
|
||||
<ion-grid class="send-grid">
|
||||
<ion-row>
|
||||
<ion-col class="intr">Amount({{currency_code}})</ion-col>
|
||||
<ion-col>
|
||||
<ion-input (ionChange)="refreshFee()" type="number" label="Amount(ggg)" placeholder="Enter Amount" [(ngModel)]='amount'></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>Payment</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-select (ionChange)="checkSelectVal()" placeholder="Select Payment Card" [(ngModel)]='recipient' size="block">
|
||||
<!-- <ion-select-option value="" >Select Recipient</ion-select-option>-->
|
||||
<ion-select-option value="{{item.card_uid}}" *ngFor="let item of usersCardsData">{{item.description}} **** **** **** {{item.digits}}</ion-select-option>
|
||||
<!-- <ion-select-option value="ADD_NEW_RECIP" >Add 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)="contineRedeem()">Continue</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
</ion-grid>
|
||||
</div>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-button expand="block" shape="round" color="secondary" (click)="contineRedeem()">Continue</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
</ion-grid>
|
||||
|
||||
|
||||
<!-- <ion-list>-->
|
||||
@@ -321,60 +336,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="tabs =='reports'" class="lesson">
|
||||
|
||||
<div class="video" *ngFor="let item of paymentData">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/money-cycle.svg)'"></div>
|
||||
|
||||
<div class="text">
|
||||
<!-- <ion-label class="bold_text">Why Using Figma ?</ion-label>-->
|
||||
<!-- <ion-label class="grey_text">10 mins</ion-label>-->
|
||||
|
||||
<div class="bold_text" [innerHTML]="item.recipient"></div>
|
||||
<ion-label class="grey_text">{{item.confirmation}}- {{item.amount}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="total">-->
|
||||
<!-- <div class="star-rate">-->
|
||||
<!-- <ion-icon name="star-half-outline" color="warning"></ion-icon>-->
|
||||
<!-- <ion-label class="bold">4.8 (5456 Reviews)</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ion-label class="color">See all</ion-label>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
<!--<ion-content>-->
|
||||
<!--<div>-->
|
||||
<!-- <div class="bg_image back_image" [style.backgroundImage]="'url(assets/images/card.png)'"></div>-->
|
||||
|
||||
<!-- <ion-item lines="none">-->
|
||||
<!-- <ion-input type="text" placeholder="Card Holder"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item lines="none">-->
|
||||
<!-- <ion-input type="number" placeholder="Card Number"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item lines="none">-->
|
||||
<!-- <ion-input type="number" placeholder="Expiry Date"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
|
||||
<!-- <ion-item lines="none">-->
|
||||
<!-- <ion-input type="number" placeholder="CVV"></ion-input>-->
|
||||
<!-- </ion-item>-->
|
||||
<!--</div>-->
|
||||
|
||||
|
||||
|
||||
<!--</ion-content>-->
|
||||
|
||||
@@ -68,8 +68,8 @@ ion-content {
|
||||
|
||||
.color_text {
|
||||
margin-top: 10px;
|
||||
font-size: 22px;
|
||||
font-family: 'semi-bold';
|
||||
font-size: 18px;
|
||||
font-family: 'bold';
|
||||
color: var(--ion-color-primary);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,10 @@ export class AddcreditPage implements OnInit {
|
||||
currency_description : string='';
|
||||
currency_code:string='';
|
||||
wallet_uid:string='';
|
||||
isDisabled:boolean=false;
|
||||
isDisabled:boolean=true;
|
||||
curr_page:string= 'redeem_start';
|
||||
processor:number=0;
|
||||
|
||||
|
||||
constructor(private navctr: NavController,
|
||||
private router: Router,
|
||||
@@ -33,6 +35,7 @@ export class AddcreditPage implements OnInit {
|
||||
this.currency_code = this.walletData.code;
|
||||
this.currency_description = this.walletData.description;
|
||||
this.wallet_uid= this.walletData.wallet_uid;
|
||||
this.processor = this.walletData.processor;
|
||||
}
|
||||
else{
|
||||
this.onBack();
|
||||
@@ -75,4 +78,49 @@ export class AddcreditPage implements OnInit {
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
amount:number =0;
|
||||
fee:number = 0;
|
||||
fee_display: string;
|
||||
total:number = 0;
|
||||
total_display: string;
|
||||
recipient:string ='';
|
||||
recipient_name:string ='';
|
||||
|
||||
feeReturn: any;
|
||||
refreshFee(){
|
||||
this.isDisabled = true;
|
||||
this.total = this.fee = 0;
|
||||
console.log("Refresh Fee******************");
|
||||
// this.usrData = {action:33025,
|
||||
// member_id: this.sessionDataProviderService.member_id,
|
||||
// uid: this.sessionDataProviderService.member_uid,
|
||||
// sessionid: this.sessionDataProviderService.session ,
|
||||
// limit:20, page:1,offset: 0, amount: this.amount*100}
|
||||
// if (this.amount <= 0 ) return;
|
||||
|
||||
|
||||
// this.wrenchService.sendMoneyFee(this.usrData).subscribe(
|
||||
// feeReturn => {
|
||||
// this.feeReturn = feeReturn;
|
||||
// if ( this.feeReturn != null && this.feeReturn.processing_fee >= 0 ){
|
||||
this.fee = 0; // this.feeReturn.processing_fee*0.01;
|
||||
var num = new Number(this.fee);
|
||||
this.fee_display = num.toFixed(2);
|
||||
// parseFloat("123.456").toFixed(2);
|
||||
this.total = this.fee+this.amount; // this.feeReturn.total_amount*0.01;
|
||||
var numt = new Number(this.total);
|
||||
this.total_display= numt.toFixed(2);
|
||||
if (this.total > 100){
|
||||
this.isDisabled=false;
|
||||
}
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
|
||||
|
||||
// this.total = this.fee + this.amount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
<div> Comming Soon </div>
|
||||
|
||||
</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user