Format page
This commit is contained in:
@@ -36,12 +36,12 @@
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="lock-closed-outline"></ion-icon>
|
||||
<ion-input type="text" placeholder="firstname" [(ngModel)]='firstname'></ion-input>
|
||||
<ion-input type="text" placeholder="Firstname" [(ngModel)]='ref_firstname'></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="lock-closed-outline"></ion-icon>
|
||||
<ion-input type="text" placeholder="lastname" [(ngModel)]='lastname'></ion-input>
|
||||
<ion-input type="text" placeholder="Lastname" [(ngModel)]='lastname'></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-grid>
|
||||
|
||||
@@ -3,6 +3,7 @@ import {NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import { WrenchService } from 'src/app/services/wrench.service';
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {last} from "rxjs/operators";
|
||||
|
||||
@Component({
|
||||
selector: 'app-invite',
|
||||
@@ -11,7 +12,7 @@ import {SessionDataProviderService} from "../../store/session-data-provider.serv
|
||||
})
|
||||
export class InvitePage implements OnInit {
|
||||
|
||||
@ViewChild('firstname') firstname;
|
||||
@ViewChild('ref_firstname') ref_firstname;
|
||||
@ViewChild('lastname') lastname;
|
||||
@ViewChild('email') email;
|
||||
tabs = 'refer';
|
||||
@@ -23,10 +24,49 @@ export class InvitePage implements OnInit {
|
||||
private wrenchService: WrenchService
|
||||
) {
|
||||
}
|
||||
|
||||
/*
|
||||
'member_id' => int 1
|
||||
'sessionid' => string '936571FD2E081B667930E7FFDF4D819938171883CA0CC951DC6C4FB184280EB3' (length=64)
|
||||
'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36)
|
||||
'action' => int 11032
|
||||
'ref_firstname' => string 'Reffirst10' (length=10)
|
||||
'ref_lastname' => string 'Reflast86' (length=9)
|
||||
'ref_email' => string 'ameye+636@chiefsoft.com' (length=23)
|
||||
*/
|
||||
referSendData: {
|
||||
action:number, member_id: number, uid: string, sessionid: string, ref_firstname:string, ref_lastname:string,ref_email: string
|
||||
};
|
||||
sendReferResult:any;
|
||||
sendRefer(){
|
||||
|
||||
if (this.ref_firstname=="" || this.lastname=="" || !this.validateEmail(this.email) ){
|
||||
return;
|
||||
}
|
||||
this.referSendData =
|
||||
{
|
||||
action:11032,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
ref_firstname:this.ref_firstname,
|
||||
ref_lastname:this.lastname,
|
||||
ref_email:this.email
|
||||
};
|
||||
this.wrenchService.sendRefer(this.referSendData).subscribe(
|
||||
sendReferResult => {
|
||||
this.sendReferResult = sendReferResult;
|
||||
this.getReferData();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
validateEmail(email) {
|
||||
var re = /\S+@\S+\.\S+/;
|
||||
return re.test(email);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getReferData();
|
||||
}
|
||||
@@ -50,9 +90,8 @@ export class InvitePage implements OnInit {
|
||||
this.wrenchService.referHx(this.usrData).subscribe(
|
||||
referTotalData => {
|
||||
this.referTotalData = referTotalData;
|
||||
console.log("REFER RETURN->", this.referTotalData);
|
||||
// console.log("REFER RETURN->", this.referTotalData);
|
||||
this.referData = this.referTotalData.result_list;
|
||||
// debugger;
|
||||
console.log("REFER RETURN DATA->", this.referData);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<ion-icon name="lock-closed-outline"></ion-icon>
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
<div class="flex">
|
||||
<div class="text">
|
||||
<ion-label class="bold_text">{{item.title}}</ion-label>
|
||||
<ion-label class="grey_text">available till : {{item.expire}}</ion-label>
|
||||
<ion-label class="price_line"> {{item.price*0.01}} {{item.currency}} </ion-label>
|
||||
<ion-label class="due_date">Timeline: {{item.timeline_days}} days</ion-label>
|
||||
</div>
|
||||
@@ -41,7 +40,7 @@
|
||||
<div class="flex">
|
||||
<div class="text">
|
||||
<ion-label class="bold_text">{{item.title}}</ion-label>
|
||||
<ion-label class="grey_text">available till : {{item.expire}}</ion-label>
|
||||
<ion-label class="due_date">available till : {{item.expire}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
<ion-card>
|
||||
<img alt="Silhouette of mountains" src="https://ionicframework.com/docs/img/demos/card-media.png" />
|
||||
<ion-card-header>
|
||||
<ion-card-title>Card Title</ion-card-title>
|
||||
<ion-card-subtitle>Card Subtitle</ion-card-subtitle>
|
||||
<ion-card-title>Upload Files</ion-card-title>
|
||||
<ion-card-subtitle>Add files to your resources</ion-card-subtitle>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ion-card *ngFor="let item of walletData; let i = index">
|
||||
<ion-card-header>
|
||||
<ion-card-title>{{item.description}}</ion-card-title>
|
||||
<ion-card-subtitle> Balance {{item.amount*0.01}}</ion-card-subtitle>
|
||||
<ion-card-subtitle> <span class="balance_line">Balance {{item.amount*0.01}} </span></ion-card-subtitle>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
@@ -65,7 +65,8 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<ion-label class="receipt" (click)="onReceipt(item)"><ion-icon name="chevron-forward-outline"></ion-icon></ion-label>
|
||||
<!-- <ion-label class="receipt" (click)="onReceipt(item)"><ion-icon name="chevron-forward-outline"></ion-icon></ion-label>-->
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</div>
|
||||
|
||||
</ion-label>
|
||||
|
||||
@@ -51,6 +51,10 @@ export class WrenchService {
|
||||
return this.getPostData('refferhx', reqData);
|
||||
}
|
||||
|
||||
sendRefer(reqData) {
|
||||
return this.getPostData('sendreferral', reqData);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
signUpCountry(apiData) {
|
||||
|
||||
@@ -97,4 +97,20 @@ ion-modal.custom_modal_bottom {
|
||||
max-width: 550px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.due_date{
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
}
|
||||
.price_line{
|
||||
color: green;
|
||||
font-weight: bolder;
|
||||
font-size: 12px;
|
||||
}
|
||||
.balance_line{
|
||||
color:darkgreen;
|
||||
font-size: 14px;
|
||||
font-weight: bolder;
|
||||
margin-left: 50px;
|
||||
}
|
||||
Reference in New Issue
Block a user