diff --git a/src/app/pages/invite/invite.page.html b/src/app/pages/invite/invite.page.html index e1047d0..aa2949a 100644 --- a/src/app/pages/invite/invite.page.html +++ b/src/app/pages/invite/invite.page.html @@ -36,12 +36,12 @@ - + - + diff --git a/src/app/pages/invite/invite.page.ts b/src/app/pages/invite/invite.page.ts index 89a9f46..a3b345a 100644 --- a/src/app/pages/invite/invite.page.ts +++ b/src/app/pages/invite/invite.page.ts @@ -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); } ); diff --git a/src/app/pages/joblist/joblist.page.html b/src/app/pages/joblist/joblist.page.html index 34014ed..8e05cc2 100644 --- a/src/app/pages/joblist/joblist.page.html +++ b/src/app/pages/joblist/joblist.page.html @@ -60,7 +60,7 @@
- +
diff --git a/src/app/pages/my-course/my-course.page.html b/src/app/pages/my-course/my-course.page.html index 51cc062..c0e3690 100644 --- a/src/app/pages/my-course/my-course.page.html +++ b/src/app/pages/my-course/my-course.page.html @@ -26,7 +26,6 @@
{{item.title}} - available till : {{item.expire}} {{item.price*0.01}} {{item.currency}} Timeline: {{item.timeline_days}} days
@@ -41,7 +40,7 @@
{{item.title}} - available till : {{item.expire}} + available till : {{item.expire}}
diff --git a/src/app/pages/myfiles/myfiles.page.html b/src/app/pages/myfiles/myfiles.page.html index fd8ce05..4ab6dfc 100644 --- a/src/app/pages/myfiles/myfiles.page.html +++ b/src/app/pages/myfiles/myfiles.page.html @@ -70,8 +70,8 @@ Silhouette of mountains - Card Title - Card Subtitle + Upload Files + Add files to your resources diff --git a/src/app/pages/transaction/transaction.page.html b/src/app/pages/transaction/transaction.page.html index d2a65b9..eda5791 100644 --- a/src/app/pages/transaction/transaction.page.html +++ b/src/app/pages/transaction/transaction.page.html @@ -9,7 +9,7 @@ {{item.description}} - Balance {{item.amount*0.01}} + Balance {{item.amount*0.01}} @@ -65,7 +65,8 @@ - + + diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index a3435dd..8863617 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -51,6 +51,10 @@ export class WrenchService { return this.getPostData('refferhx', reqData); } + sendRefer(reqData) { + return this.getPostData('sendreferral', reqData); + } + // signUpCountry(apiData) { diff --git a/src/global.scss b/src/global.scss index df42ab7..990a1ee 100644 --- a/src/global.scss +++ b/src/global.scss @@ -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; } \ No newline at end of file