Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/WrenchBoardIonic2023
This commit is contained in:
+3
-1
@@ -68,4 +68,6 @@ $ ionic generate component contact/form
|
||||
$ ionic generate component login-form --change-detection=OnPush
|
||||
$ ionic generate directive ripple --skip-import
|
||||
$ ionic generate service user-wallet
|
||||
ionic generate service loc-trc
|
||||
ionic generate service loc-trc
|
||||
|
||||
ionic generate service recipients
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<ion-content>
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/p4.jpg)'">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/redeem.jpg)'">
|
||||
<div class="ion-padding">
|
||||
<ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-select placeholder="Select Bank" [(ngModel)]='sel_bank' size="block">
|
||||
<!-- <ion-select-option value="" >Select Recipient</ion-select-option>-->
|
||||
<!-- <ion-select-option value="" >Select Recipient</ion-select-option>-->
|
||||
<ion-select-option value="{{item.code}}" *ngFor="let item of countryBanksData">{{item.name}} - ({{item.code}})</ion-select-option>
|
||||
</ion-select>
|
||||
<!-- <ion-label>{{recipient_name}}</ion-label>-->
|
||||
|
||||
@@ -3,6 +3,7 @@ import {AlertController, NavController, ToastController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {RecipientsService} from "../../store/recipients.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-addbank',
|
||||
@@ -24,7 +25,8 @@ export class AddbankPage implements OnInit {
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private alertController: AlertController,
|
||||
private toastController: ToastController
|
||||
private toastController: ToastController,
|
||||
public recipientsService: RecipientsService
|
||||
)
|
||||
{
|
||||
|
||||
@@ -141,6 +143,7 @@ export class AddbankPage implements OnInit {
|
||||
if ( this.accountAddResult.internal_return != undefined && this.accountAddResult.internal_return > 0 ){
|
||||
this.presentToast("Recipient Accound Added",'middle');
|
||||
setTimeout(() => {
|
||||
this.recipientsService.getMyRecipientsData();
|
||||
this.onBack();
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="page_logo">
|
||||
<img alt="WrenchBoard" src="/assets/images/wrenchboard-line.png" />
|
||||
</div>
|
||||
<img alt="WrenchBoard" src="https://www.wrenchboard.com/assets/images/apps/log-out.jpg" />
|
||||
<img alt="WrenchBoard" src="https://www.wrenchboard.com/assets/images/apps/log-out.jpg" />
|
||||
<ion-card-header>
|
||||
<!-- <ion-card-title>Card Title</ion-card-title>-->
|
||||
<ion-card-subtitle>Thanks for visiting
|
||||
|
||||
@@ -6,7 +6,9 @@ ion-content{
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
//.card-top{
|
||||
// box-shadow:0px 0px 100px 100px blue;
|
||||
//}
|
||||
ion-footer {
|
||||
--background: white;
|
||||
|
||||
|
||||
@@ -61,13 +61,19 @@
|
||||
<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-col size="9" >
|
||||
<ion-select (ionChange)="checkSelectVal()" 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-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>
|
||||
|
||||
@@ -3,6 +3,7 @@ import {AlertController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {RecipientsService} from "../../store/recipients.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-redeem',
|
||||
@@ -55,7 +56,8 @@ wallet_uid
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private alertController: AlertController
|
||||
private alertController: AlertController,
|
||||
public recipientsService: RecipientsService
|
||||
) {
|
||||
this.walletData = this.router.getCurrentNavigation().extras.state;
|
||||
if ( this.walletData != undefined ){
|
||||
@@ -69,9 +71,12 @@ wallet_uid
|
||||
}
|
||||
}
|
||||
|
||||
myRecipientsData:any;
|
||||
ngOnInit() {
|
||||
this.getMyRecipientsData();
|
||||
this.myRecipientsData = this.recipientsService.getMyRecipientsData();
|
||||
this.getPaymentHxData();
|
||||
//this.getMyRecipientsData();
|
||||
this.myRecipientsData = this.recipientsService.myRecipientsData;
|
||||
}
|
||||
|
||||
onBack() {
|
||||
@@ -189,6 +194,12 @@ array (size=4)
|
||||
}
|
||||
}
|
||||
|
||||
checkSelectVal(){
|
||||
if (this.recipient == 'ADD_NEW_RECIP'){
|
||||
this.addNewBank();
|
||||
this.recipient='';
|
||||
}
|
||||
}
|
||||
async showAlert(mtitle: string, amessage: string) {
|
||||
const alert = await this.alertController.create({
|
||||
header: 'WrenchBoard',
|
||||
@@ -269,7 +280,7 @@ this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_
|
||||
}
|
||||
|
||||
myRecipientsTotalData:any;
|
||||
myRecipientsData:any;
|
||||
|
||||
getMyRecipientsData(){
|
||||
this.usrData = {action:11175,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RecipientsService } from './recipients.service';
|
||||
|
||||
describe('RecipientsService', () => {
|
||||
let service: RecipientsService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(RecipientsService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {SessionDataProviderService} from "./session-data-provider.service";
|
||||
import {WrenchService} from "../services/wrench.service";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class RecipientsService {
|
||||
|
||||
constructor(
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService) { }
|
||||
|
||||
usrData: {
|
||||
action:number, member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
limit:20, page:1,
|
||||
offset: 0,
|
||||
amount: number
|
||||
};
|
||||
|
||||
myRecipientsTotalData:any;
|
||||
myRecipientsData:any;
|
||||
async getMyRecipientsData(){
|
||||
this.usrData = {action:11175,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
limit:20, page:1,
|
||||
offset: 0, amount: 0}
|
||||
|
||||
this.wrenchService.recipientAccount(this.usrData).subscribe(
|
||||
myRecipientsTotalData => {
|
||||
this.myRecipientsTotalData = myRecipientsTotalData;
|
||||
console.log("myRecipientsTotalData RETURN->", this.myRecipientsTotalData);
|
||||
this.myRecipientsData = this.myRecipientsTotalData.result_list;
|
||||
console.log("myRecipientsData RETURN DATA->", this.myRecipientsData);
|
||||
return this.myRecipientsData;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user