From f6832cbf334336b9a1bf763fd89abd4654afb7a1 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 24 Jun 2023 11:13:50 -0400 Subject: [PATCH] wallet page --- .../pages/transaction/transaction.module.ts | 8 --- .../pages/transaction/transaction.page.html | 21 ++++++-- src/app/pages/transaction/transaction.page.ts | 53 ++++++++++++------- src/app/services/wrench.service.ts | 5 ++ 4 files changed, 55 insertions(+), 32 deletions(-) diff --git a/src/app/pages/transaction/transaction.module.ts b/src/app/pages/transaction/transaction.module.ts index 97832d8..602188d 100644 --- a/src/app/pages/transaction/transaction.module.ts +++ b/src/app/pages/transaction/transaction.module.ts @@ -1,11 +1,3 @@ -/* - 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. -*/ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; diff --git a/src/app/pages/transaction/transaction.page.html b/src/app/pages/transaction/transaction.page.html index 9abaf0a..9eaba47 100644 --- a/src/app/pages/transaction/transaction.page.html +++ b/src/app/pages/transaction/transaction.page.html @@ -6,15 +6,26 @@ -
+
-
Naira
- Balance 123.345.90.00 +
{{item.description}}
+ Balance {{item.amount*0.01}}
- + + + + + Credit + + + + + WithDraw + + +
@@ -33,7 +44,7 @@ 3D Design Illustration - +
diff --git a/src/app/pages/transaction/transaction.page.ts b/src/app/pages/transaction/transaction.page.ts index 0203fc8..d4957a4 100644 --- a/src/app/pages/transaction/transaction.page.ts +++ b/src/app/pages/transaction/transaction.page.ts @@ -1,30 +1,45 @@ -/* - 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. -*/ import { Router } from '@angular/router'; import { Component, OnInit } from '@angular/core'; +import { WrenchService } from 'src/app/services/wrench.service'; +import {SessionDataProviderService} from "../../store/session-data-provider.service"; @Component({ - selector: 'app-transaction', - templateUrl: './transaction.page.html', - styleUrls: ['./transaction.page.scss'], + selector: 'app-transaction', + templateUrl: './transaction.page.html', + styleUrls: ['./transaction.page.scss'], }) export class TransactionPage implements OnInit { - constructor( - private router: Router - ) { } + constructor( + private router: Router, + public sessionDataProviderService: SessionDataProviderService, + private wrenchService: WrenchService + ) { } - ngOnInit() { - } + ngOnInit() { + this.getWalletData(); + } - onReceipt() { - this.router.navigate(['receipt']); - } + onReceipt() { + this.router.navigate(['receipt']); + } + walletResult:any; + walletData: []; + usrData: { + action:11200, member_id: number, uid: string, sessionid: string + }; + getWalletData(){ + this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_id, uid: this.sessionDataProviderService.member_uid, sessionid: this.sessionDataProviderService.session } + this.wrenchService.getUserWallets(this.usrData).subscribe( + walletResult => { + this.walletResult = walletResult; + console.log("BANNERS RETURN->", this.walletResult); + this.walletData = this.walletResult.result_list; + // debugger; + console.log("BANNERS RETURN DATA->", this.walletData); + // this.blogDataService.setBlogData(this.blogResult.blog_data); + } + ); + } } diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index 1f30c28..978348f 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -37,6 +37,11 @@ export class WrenchService { getHomeBanners(usrData){ return this.getPostData('homebanners',usrData); } + + getUserWallets(usrData) { + return this.getPostData("getwallets", usrData); + } + /*