QR generator
This commit is contained in:
@@ -19,3 +19,4 @@ ionic generate page jobactive
|
||||
|
||||
ionic generate component taskactivities
|
||||
|
||||
npm install angularx-qrcode@14.0.0 --save
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"@capacitor/preferences": "^5.0.6",
|
||||
"@capacitor/status-bar": "^5.0.0",
|
||||
"@ionic/angular": "^6.1.9",
|
||||
"angularx-qrcode": "^14.0.0",
|
||||
"onesignal-cordova-plugin": "^5.0.0-beta-02",
|
||||
"rxjs": "~6.6.0",
|
||||
"tslib": "^2.2.0",
|
||||
|
||||
@@ -7,13 +7,14 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { FamilymemberPageRoutingModule } from './familymember-routing.module';
|
||||
|
||||
import { FamilymemberPage } from './familymember.page';
|
||||
|
||||
import { QRCodeModule } from 'angularx-qrcode';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
FamilymemberPageRoutingModule
|
||||
FamilymemberPageRoutingModule,
|
||||
QRCodeModule
|
||||
],
|
||||
declarations: [FamilymemberPage]
|
||||
})
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<ion-segment-button value="lesson">
|
||||
<ion-label>Account</ion-label>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="review">
|
||||
<ion-segment-button value="profile">
|
||||
<ion-label>Profile</ion-label>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
@@ -98,7 +98,27 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="tabs =='review'" class="review_tab">
|
||||
<div *ngIf="tabs =='profile'" class="review_tab">
|
||||
|
||||
<div class="bg_white">
|
||||
<div class="flex">
|
||||
<ion-label class="grey_text">Username</ion-label>
|
||||
<ion-label class="dark_text">{{member_username}}</ion-label>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<ion-label class="grey_text">PIN</ion-label>
|
||||
<ion-label class="dark_text">{{member_pin}}</ion-label>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<qrcode
|
||||
[qrdata]="member_qr_string"
|
||||
[width]="256"
|
||||
[errorCorrectionLevel]="'M'">
|
||||
</qrcode>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-familymember',
|
||||
@@ -11,20 +13,29 @@ export class FamilymemberPage implements OnInit {
|
||||
|
||||
familyMemberData: any;
|
||||
tabs = 'about';
|
||||
member_firstname:string='';
|
||||
member_lastname:string='';
|
||||
member_firstname:string='';
|
||||
member_lastname:string='';
|
||||
|
||||
member_username:string='';
|
||||
member_pin:string='';
|
||||
family_uid:string='';
|
||||
|
||||
member_qr_string ='0000000';
|
||||
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
) {
|
||||
this.familyMemberData = this.router.getCurrentNavigation().extras.state;
|
||||
//debugger;
|
||||
this.member_firstname= this.familyMemberData.firstname;
|
||||
this.member_lastname = this.familyMemberData.lastname;
|
||||
|
||||
this.family_uid = this.familyMemberData.family_uid;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getThisFamilyAccount();
|
||||
}
|
||||
|
||||
onBack() {
|
||||
@@ -39,5 +50,34 @@ member_lastname:string='';
|
||||
this.router.navigate(['enroll']);
|
||||
}
|
||||
|
||||
postData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
family_uid:string
|
||||
};
|
||||
|
||||
familyMemberResult:any;
|
||||
familySuggestData:any;
|
||||
getThisFamilyAccount(){
|
||||
this.postData = {
|
||||
action:22025,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
family_uid: this.family_uid
|
||||
};
|
||||
this.wrenchService.familyManage(this.postData).subscribe(
|
||||
familyMemberResult => {
|
||||
this.familyMemberResult = familyMemberResult;
|
||||
console.log("familyMemberResult RETURN->", this.familyMemberResult);
|
||||
this.member_username = this.familyMemberResult.username;
|
||||
this.member_pin = this.familyMemberResult.pin;
|
||||
this.member_qr_string = this.sessionDataProviderService.member_uid+"@"+this.member_username+"@"+this.member_pin; //member_uid@family_username@family_pin
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
ion-header {
|
||||
ion-toolbar {
|
||||
--background: var(--ion-color-primary);
|
||||
|
||||
@@ -242,18 +242,18 @@
|
||||
|
||||
<div class="video" *ngFor="let item of paymentData">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/line.png)'"></div>
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/money-cycle.svg)'"></div>
|
||||
|
||||
<div class="text">
|
||||
<!-- <ion-label class="bold_text">Why Using Figma ?</ion-label>-->
|
||||
<!-- <ion-label class="grey_text">10 mins</ion-label>-->
|
||||
|
||||
<div [innerHTML]="item.recipient"></div>
|
||||
<div class="bold_text" [innerHTML]="item.recipient"></div>
|
||||
<ion-label class="grey_text">{{item.confirmation}}- {{item.amount}}</ion-label>
|
||||
</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>
|
||||
|
||||
@@ -270,10 +270,10 @@
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<div class="button" (click)="onBack()">
|
||||
<ion-label class="text">Return</ion-label>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
<!--<ion-footer>-->
|
||||
<!-- <ion-toolbar>-->
|
||||
<!-- <div class="button" (click)="onBack()">-->
|
||||
<!-- <ion-label class="text">Return</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </ion-toolbar>-->
|
||||
<!--</ion-footer>-->
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
<div class="detail">
|
||||
<!-- <div dangerouslySetInnerHTML={{__html: item.recipient}}></div>-->
|
||||
<!-- <ion-label class="name">{{item.recipient}}</ion-label>-->
|
||||
<div [innerHTML]="item.recipient"></div>
|
||||
<ion-label class="paid">{{item.confirmation}}- {{item.amount*0.01}}</ion-label>
|
||||
<div class="bold_text" [innerHTML]="item.recipient"></div>
|
||||
<ion-label class="grey_text">{{item.confirmation}}- {{item.amount}}</ion-label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,3 +56,20 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
|
||||
<!--<div class="left">-->
|
||||
<!-- <div class="bg_image men_image" [style.backgroundImage]="'url(assets/images/money-cycle.svg)'"></div>-->
|
||||
|
||||
<!-- <div class="text">-->
|
||||
<!-- <!– <ion-label class="bold_text">Why Using Figma ?</ion-label>–>-->
|
||||
<!-- <!– <ion-label class="grey_text">10 mins</ion-label>–>-->
|
||||
|
||||
<!-- <div class="bold_text" [innerHTML]="item.recipient"></div>-->
|
||||
<!-- <ion-label class="grey_text">{{item.confirmation}}- {{item.amount}}</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="right">-->
|
||||
<!-- <ion-icon name="chevron-forward-outline" color="medium"></ion-icon>-->
|
||||
<!--</div>-->
|
||||
@@ -205,6 +205,10 @@ export class WrenchService {
|
||||
};
|
||||
return this.getPostData("/activetaskstatus", postData);
|
||||
}
|
||||
|
||||
familyManage(postData){
|
||||
return this.getPostData("/familymanage", postData);
|
||||
}
|
||||
/*
|
||||
|
||||
|
||||
|
||||
@@ -201,4 +201,29 @@ ion-modal.custom_modal_bottom {
|
||||
color: grey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bg_white {
|
||||
margin-top: 20px;
|
||||
background-color: white;
|
||||
padding: 20px 15px 15px 15px;
|
||||
box-shadow: 0px 0px 20px 1px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 10px;
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 5px;
|
||||
|
||||
.grey_text {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dark_text {
|
||||
font-family: 'semi-bold';
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user