redeem page
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ pendingoffers
|
||||
|
||||
ionic generate page addcredit
|
||||
ionic generate page ownersjob
|
||||
|
||||
ionic generate page history
|
||||
|
||||
ionic generate component latest-market
|
||||
ionic generate service tasks-data
|
||||
|
||||
@@ -184,38 +184,44 @@
|
||||
<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>
|
||||
<div class="result-amount">{{amount}}</div>
|
||||
<!-- <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>
|
||||
<div class="result-amount">{{fee_display}}</div>
|
||||
<!-- <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>
|
||||
<div class="result-amount">{{total_display}}</div>
|
||||
<!-- <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 class="intr">Recipient</ion-col>
|
||||
<ion-col>
|
||||
{{recipient_name}}
|
||||
<div class="result-recipient">{{recipient_name}}</div>
|
||||
</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>
|
||||
@@ -250,44 +256,47 @@
|
||||
<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>
|
||||
<div class="result-amount">{{amount}}</div>
|
||||
</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>
|
||||
<div class="result-amount">{{fee_display}}</div>
|
||||
<!-- <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>
|
||||
<div class="result-amount">{{total_display}}</div>
|
||||
<!-- <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 class="intr">Recipient</ion-col>
|
||||
<ion-col>
|
||||
{{recipient_name}}
|
||||
<div class="result-recipient">{{recipient_name}}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="intr">Confirmation</ion-col>
|
||||
<ion-col>
|
||||
{{confirmation}}
|
||||
<div class="result-amount">{{confirmation}}</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-row *ngIf="confirmation !=''; ">
|
||||
<ion-col>
|
||||
Estimated delivery time is 2 to 4 Hours.
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-button expand="block" shape="round" color="secondary" (click)="onBack()">Return</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,25 @@ ion-content {
|
||||
}
|
||||
}
|
||||
|
||||
.result-recipient{
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
background-color: white;
|
||||
color: black;
|
||||
height: 75px;
|
||||
padding: 5px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.result-amount{
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
background-color: white;
|
||||
color: black;
|
||||
height: 35px;
|
||||
padding: 5px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
//.send-grid{
|
||||
// background-color: #eff2f4;
|
||||
// border-radius: 10px;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {AlertController, NavController} from "@ionic/angular";
|
||||
import {AlertController, LoadingController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
@@ -26,6 +26,7 @@ export class RedeemPage implements OnInit {
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private alertController: AlertController,
|
||||
private loadingCtrl: LoadingController,
|
||||
public recipientsService: RecipientsService
|
||||
) {
|
||||
this.walletData = this.router.getCurrentNavigation().extras.state;
|
||||
@@ -235,7 +236,14 @@ this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_
|
||||
|
||||
sendMoneyResult:any;
|
||||
confirmation:string ='';
|
||||
confirmRedeem(){
|
||||
async confirmRedeem(){
|
||||
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Sending...',
|
||||
duration: 8500,
|
||||
});
|
||||
|
||||
|
||||
this.isDisabled = true;
|
||||
this.sendMoneyData = {
|
||||
action:33020,
|
||||
@@ -249,12 +257,24 @@ this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_
|
||||
mode: 100,
|
||||
};
|
||||
|
||||
loading.present();
|
||||
this.wrenchService.sendMoneyAction(this.sendMoneyData).subscribe(
|
||||
sendMoneyResult => {
|
||||
loading.dismiss();
|
||||
this.sendMoneyResult = sendMoneyResult;
|
||||
console.log("sendMoneyResult RETURN->", this.sendMoneyResult);
|
||||
this.confirmation = this.sendMoneyResult.confirmation;
|
||||
this.curr_page ='redeem_result';
|
||||
//
|
||||
// "status_message": "tranfer_amount_limit_error",
|
||||
// "internal_return": -1,
|
||||
//
|
||||
if ( this.sendMoneyResult!.internal_return != null && this.sendMoneyResult.internal_return > 0 ){
|
||||
console.log("sendMoneyResult RETURN->", this.sendMoneyResult);
|
||||
this.confirmation = this.sendMoneyResult.confirmation;
|
||||
}
|
||||
else{
|
||||
this.confirmation = "Unable to Process.";
|
||||
this.showAlert("Error",this.sendMoneyResult.status_message);
|
||||
}
|
||||
this.curr_page ='redeem_result';
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
/*
|
||||
Authors : initappz (Rahul Jograna)
|
||||
Website : https://initappz.com/
|
||||
App Name : E-Learning App Template
|
||||
This App Template Source code is licensed as per the
|
||||
terms found in the Website https://initappz.com/license
|
||||
Copyright and Good Faith Purchasers © 2021-present initappz.
|
||||
*/
|
||||
// Ionic Variables and Theming. For more info, please see:
|
||||
// http://ionicframework.com/docs/theming/
|
||||
|
||||
/** Ionic CSS Variables **/
|
||||
:root {
|
||||
/** primary **/
|
||||
--ion-color-primary: #4687ba;
|
||||
--ion-color-primary: #498ec3; //] #4687ba;
|
||||
--ion-color-primary-rgb: 56, 128, 255;
|
||||
--ion-color-primary-contrast: #ffffff;
|
||||
--ion-color-primary-contrast-rgb: 255, 255, 255;
|
||||
|
||||
Reference in New Issue
Block a user