family invites
This commit is contained in:
@@ -1,36 +1,47 @@
|
||||
<div *ngIf="family_dash_show> 0">
|
||||
<app-fastreward *ngIf="family_action=='FAMILY_ACTION_SEND_REWARD';"></app-fastreward>
|
||||
<app-familiy-nokids *ngIf="family_action=='FAMILY_ACTION_NO_KIDS';"></app-familiy-nokids>
|
||||
<app-familiy-notask *ngIf="family_action=='FAMILY_ACTION_NO_TASKS';"></app-familiy-notask>
|
||||
<!-- <app-familiy-notask ></app-familiy-notask>-->
|
||||
<app-familiy-addfamily *ngIf="family_action=='FAMILY_ACTION_ADD_FAMILY';"></app-familiy-addfamily>
|
||||
<app-familiy-allowancen *ngIf="family_action=='FAMILY_ACTION_SETUP_ALLOWANCE';"></app-familiy-allowancen>
|
||||
<div *ngIf="family_dash_show > 0">
|
||||
<app-fastreward
|
||||
*ngIf="family_action == 'FAMILY_ACTION_SEND_REWARD'"
|
||||
></app-fastreward>
|
||||
<app-familiy-nokids
|
||||
*ngIf="family_action == 'FAMILY_ACTION_NO_KIDS'"
|
||||
></app-familiy-nokids>
|
||||
<app-familiy-notask
|
||||
*ngIf="family_action == 'FAMILY_ACTION_NO_TASKS'"
|
||||
></app-familiy-notask>
|
||||
<!-- <app-familiy-notask ></app-familiy-notask>-->
|
||||
<app-familiy-addfamily
|
||||
*ngIf="family_action == 'FAMILY_ACTION_ADD_FAMILY'"
|
||||
></app-familiy-addfamily>
|
||||
<app-familiy-allowance
|
||||
*ngIf="family_action == 'FAMILY_ACTION_SETUP_ALLOWANCE'"
|
||||
></app-familiy-allowance>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngFor="let item of bannerData; let i = index"
|
||||
class="bg_white {{item.short_style}} {{item.card_type}} "
|
||||
(click)="onDetails(item)"
|
||||
*ngFor="let item of bannerData; let i = index"
|
||||
class="bg_white {{ item.short_style }} {{ item.card_type }} "
|
||||
(click)="onDetails(item)"
|
||||
>
|
||||
<div class="list">
|
||||
<div *ngIf="item.banner_location === 'URL' ">
|
||||
<div *ngIf="item.banner_location === 'URL'">
|
||||
<!-- code to render a large video block-->
|
||||
<div
|
||||
class="bg_image back_image banner_image"
|
||||
[style.backgroundImage]="'url('+item.banner+')'"
|
||||
class="bg_image back_image banner_image"
|
||||
[style.backgroundImage]="'url(' + item.banner + ')'"
|
||||
></div>
|
||||
</div>
|
||||
<div *ngIf="item.banner_location === 'LOCAL' ">
|
||||
<div *ngIf="item.banner_location === 'LOCAL'">
|
||||
<div
|
||||
class="bg_image back_image banner_image"
|
||||
[style.backgroundImage]="'url(assets/images/'+item.banner+')'"
|
||||
class="bg_image back_image banner_image"
|
||||
[style.backgroundImage]="'url(assets/images/' + item.banner + ')'"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div class="detail">
|
||||
<ion-label class="name">{{item.short_title}}</ion-label>
|
||||
<ion-label class="bg_text ovf" style="background-color: white"
|
||||
>{{item.short_description}}</ion-label
|
||||
>
|
||||
<ion-label class="name">{{ item.short_title }}</ion-label>
|
||||
<ion-label class="bg_text ovf" style="background-color: white">{{
|
||||
item.short_description
|
||||
}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <ion-icon slot="end" name="bookmark-outline" class="save" color="primary"></ion-icon>-->
|
||||
|
||||
@@ -1,118 +1,127 @@
|
||||
import {Component, Input, 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";
|
||||
import {BannersDataService} from "../../store/banners-data.service";
|
||||
import { Component, Input, 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";
|
||||
import { BannersDataService } from "../../store/banners-data.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-familiy-dash',
|
||||
templateUrl: './familiy-dash.component.html',
|
||||
styleUrls: ['./familiy-dash.component.scss'],
|
||||
selector: "app-familiy-dash",
|
||||
templateUrl: "./familiy-dash.component.html",
|
||||
styleUrls: ["./familiy-dash.component.scss"],
|
||||
})
|
||||
export class FamiliyDashComponent implements OnInit {
|
||||
@Input('bannerData') bannerData:any;
|
||||
homebannerCount:number=0;
|
||||
family_action:string="";
|
||||
family_dash_show:number =10;
|
||||
@Input("bannerData") bannerData: any;
|
||||
homebannerCount: number = 0;
|
||||
family_action: string = "";
|
||||
family_dash_show: number = 10;
|
||||
|
||||
pageItem:{
|
||||
page_name: number,
|
||||
family_action: string
|
||||
}
|
||||
constructor(private navctr: NavController,
|
||||
private router: Router,
|
||||
public bannersDataService:BannersDataService,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService) {
|
||||
|
||||
addEventListener('app_fastreward_action', () => {
|
||||
this.router.navigate(['family'],{state: {page_name: 0, family_action: 'FAMILY_ACTION_SEND_REWARD'}});
|
||||
pageItem: {
|
||||
page_name: number;
|
||||
family_action: string;
|
||||
};
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
public bannersDataService: BannersDataService,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService
|
||||
) {
|
||||
addEventListener("app_fastreward_action", () => {
|
||||
this.router.navigate(["family"], {
|
||||
state: { page_name: 0, family_action: "FAMILY_ACTION_SEND_REWARD" },
|
||||
});
|
||||
});
|
||||
|
||||
addEventListener('app_familiy_nokids_action', () => {
|
||||
this.router.navigate(['addfamilykid'],{state: {page_name: 0, family_action: 'FAMILY_ACTION_NO_KIDS'}});
|
||||
addEventListener("app_familiy_nokids_action", () => {
|
||||
this.router.navigate(["addfamilykid"], {
|
||||
state: { page_name: 0, family_action: "FAMILY_ACTION_NO_KIDS" },
|
||||
});
|
||||
});
|
||||
|
||||
addEventListener('app_familiy_notask_action', () => {
|
||||
this.router.navigate(['family'],{state: {page_name: 0, family_action: 'FAMILY_ACTION_NO_TASKS'}});
|
||||
addEventListener("app_familiy_notask_action", () => {
|
||||
this.router.navigate(["family"], {
|
||||
state: { page_name: 0, family_action: "FAMILY_ACTION_NO_TASKS" },
|
||||
});
|
||||
});
|
||||
|
||||
addEventListener('app_familiy_addfamily_action', () => {
|
||||
addEventListener("app_familiy_addfamily_action", () => {
|
||||
this.pageItem.family_action = "";
|
||||
this.router.navigate(['family'],{state: {page_name: 0, family_action: ''}});
|
||||
this.router.navigate(["family"], {
|
||||
state: { page_name: 0, family_action: "" },
|
||||
});
|
||||
});
|
||||
|
||||
addEventListener('app_familiy_allowance_action', () => {
|
||||
addEventListener("app_familiy_allowance_action", () => {
|
||||
this.pageItem.family_action = "";
|
||||
this.router.navigate(['family'],{state: {page_name: 0, family_action: ''}});
|
||||
this.router.navigate(["family"], {
|
||||
state: { page_name: 0, family_action: "" },
|
||||
});
|
||||
});
|
||||
//
|
||||
addEventListener('app_familiy_go_wallet', () => {
|
||||
this.router.navigate(['tabs/tab4'],{state: {page_name: 0, family_action: ''}});
|
||||
//
|
||||
addEventListener("app_familiy_go_wallet", () => {
|
||||
this.router.navigate(["tabs/tab4"], {
|
||||
state: { page_name: 0, family_action: "" },
|
||||
});
|
||||
});
|
||||
|
||||
this.bannerData = this.bannersDataService.bannerData;
|
||||
this.homebannerCount = this.bannersDataService.homebannerCount;
|
||||
// let us keep refreshing - internal so serve call
|
||||
var interval = setInterval( ()=> {
|
||||
this.bannerData = this.bannersDataService.bannerData;
|
||||
this.homebannerCount = this.bannersDataService.homebannerCount;
|
||||
console.log("IM THE FAM HOME DASH ****** ");
|
||||
}, 5000);
|
||||
var interval = setInterval(() => {
|
||||
this.bannerData = this.bannersDataService.bannerData;
|
||||
this.homebannerCount = this.bannersDataService.homebannerCount;
|
||||
console.log("IM THE FAM HOME DASH ****** ");
|
||||
}, 5000);
|
||||
|
||||
this.family_action = this.sessionDataProviderService.family_action;
|
||||
this.family_action = this.sessionDataProviderService.family_action;
|
||||
}
|
||||
|
||||
onDetails(item) {
|
||||
// var pageToNavigate = 'detail';
|
||||
var pageToNavigate = '';
|
||||
var pageToNavigate = "";
|
||||
// alert(item.link_path);
|
||||
switch (item.link_path){
|
||||
case 'referral':
|
||||
pageToNavigate = 'invite';
|
||||
switch (item.link_path) {
|
||||
case "referral":
|
||||
pageToNavigate = "invite";
|
||||
break;
|
||||
case 'mytask': // offers waiting to start
|
||||
case "mytask": // offers waiting to start
|
||||
case "my-active-jobs":
|
||||
pageToNavigate = 'joboffers';
|
||||
pageToNavigate = "joboffers";
|
||||
break;
|
||||
|
||||
case 'my-coupon':
|
||||
pageToNavigate = 'mycoupons';
|
||||
case "my-coupon":
|
||||
pageToNavigate = "mycoupons";
|
||||
break;
|
||||
case 'blog-page':
|
||||
case "blog-page":
|
||||
// this.blogDetails(this.getOneBlog(item));
|
||||
// this.getOneBlog(item);
|
||||
// this.getOneBlog(item);
|
||||
break;
|
||||
|
||||
case 'my-review-jobs':
|
||||
pageToNavigate = 'jobmanager';
|
||||
break
|
||||
|
||||
case 'my-pastdue-jobs':
|
||||
pageToNavigate = 'jobmanager';
|
||||
break
|
||||
|
||||
case 'pend-interest':
|
||||
pageToNavigate ='pendinterest';
|
||||
case "my-review-jobs":
|
||||
pageToNavigate = "jobmanager";
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case 'offer-interest':
|
||||
pageToNavigate = 'jobinterest';
|
||||
break
|
||||
|
||||
case 'acc-family':
|
||||
pageToNavigate = 'family';
|
||||
case "my-pastdue-jobs":
|
||||
pageToNavigate = "jobmanager";
|
||||
break;
|
||||
|
||||
case "pend-interest":
|
||||
pageToNavigate = "pendinterest";
|
||||
break;
|
||||
|
||||
case "offer-interest":
|
||||
pageToNavigate = "jobinterest";
|
||||
break;
|
||||
|
||||
case "acc-family":
|
||||
pageToNavigate = "family";
|
||||
break;
|
||||
}
|
||||
if(pageToNavigate !=''){
|
||||
this.router.navigate([pageToNavigate],{state: item});
|
||||
if (pageToNavigate != "") {
|
||||
this.router.navigate([pageToNavigate], { state: item });
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,20 +13,53 @@
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<p></p>
|
||||
<ion-card class="connect-card" *ngIf="show_connect == true;">
|
||||
<ion-card-header>
|
||||
<ion-card-title>Family Connect</ion-card-title>
|
||||
<!-- <ion-card-subtitle>Card Subtitle</ion-card-subtitle>-->
|
||||
</ion-card-header>
|
||||
<div *ngIf="connectStart==0;">
|
||||
<ion-card class="connect-card" *ngIf="show_connect == true;">
|
||||
<ion-card-header>
|
||||
<ion-card-title>Family Connect</ion-card-title>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
Share, play games, or create challenges with rewards
|
||||
<ion-button
|
||||
expand="block"
|
||||
size="small"
|
||||
fill="outline">
|
||||
Start Connect
|
||||
</ion-button>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<ion-card-content>
|
||||
Share, play games, or create challenges with rewards
|
||||
<ion-button
|
||||
(click)="startfamilyConnect()"
|
||||
expand="block"
|
||||
size="small"
|
||||
fill="outline">
|
||||
Start Connect
|
||||
</ion-button>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
<div *ngIf="connectStart== 100" >
|
||||
<div
|
||||
*ngFor="let item of familyData; let i = index"
|
||||
class="bg_white {{ item.short_style }} {{ item.card_type }} "
|
||||
(click)="onDetails(item)"
|
||||
>
|
||||
<div class="list">
|
||||
<div *ngIf="item.banner_location === 'URL'">
|
||||
<!-- code to render a large video block-->
|
||||
<div
|
||||
class="bg_image back_image banner_image"
|
||||
[style.backgroundImage]="'url(' + item.banner + ')'"
|
||||
></div>
|
||||
</div>
|
||||
<div *ngIf="item.banner_location === 'LOCAL'">
|
||||
<div
|
||||
class="bg_image back_image banner_image"
|
||||
[style.backgroundImage]="'url(assets/images/' + item.banner + ')'"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div class="detail">
|
||||
<ion-label class="name">{{ item.firstname }} {{ item.lastname }}</ion-label>
|
||||
<!-- <ion-label class="bg_text ovf" style="background-color: white">-->
|
||||
<!-- {{ item.last_login }}</ion-label>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <ion-icon slot="end" name="bookmark-outline" class="save" color="primary"></ion-icon>-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1,4 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-family-connect',
|
||||
@@ -9,8 +11,48 @@ export class FamilyConnectComponent implements OnInit {
|
||||
show_invite:boolean = false;
|
||||
show_connect: boolean = false;
|
||||
|
||||
constructor() { }
|
||||
connectStart : number = 0;
|
||||
|
||||
ngOnInit() {}
|
||||
constructor(
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService
|
||||
) {
|
||||
this.show_connect= true;
|
||||
this.show_invite = true;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getFamilyList();
|
||||
}
|
||||
|
||||
startfamilyConnect(){
|
||||
// alert("start connect");
|
||||
this.connectStart = 100;
|
||||
}
|
||||
|
||||
reqData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
family_uid: string,
|
||||
sessionid: string
|
||||
};
|
||||
familyResult:any;
|
||||
familyData:[];
|
||||
getFamilyList(){
|
||||
|
||||
this.reqData ={
|
||||
action: 0,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
family_uid: this.sessionDataProviderService.family_uid,
|
||||
sessionid: this.sessionDataProviderService.session
|
||||
};
|
||||
this.wrenchService.connectMembers(this.reqData).subscribe(
|
||||
familyResult => {
|
||||
this.familyResult = familyResult;
|
||||
console.log("familyResult RETURN->", this.familyResult);
|
||||
this.familyData = this.familyResult.result_list;
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,10 +45,9 @@ export class FamilyloginPage implements OnInit {
|
||||
public familyDataService:FamilyDataService,
|
||||
private loadingCtrl: LoadingController,
|
||||
public socketToolsService:SocketToolsService
|
||||
) {
|
||||
|
||||
) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
const checkName = async () => {
|
||||
@@ -57,11 +56,15 @@ export class FamilyloginPage implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
childJoinRoom:string = '';
|
||||
async joinLoginSockets(){
|
||||
this.childJoinRoom = "FAMILY-" + this.sessionDataProviderService.parent_uid;
|
||||
// debugger;
|
||||
this.socketToolsService.stop();
|
||||
setTimeout(()=>{
|
||||
this.socketToolsService.setupSocket("NO-NEED-SEND");
|
||||
this.socketToolsService.joinSocketRoom("full-markets-jobs" );
|
||||
this.socketToolsService.joinSocketRoom(this.childJoinRoom)
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
|
||||
@@ -179,6 +179,10 @@ export class WrenchService {
|
||||
return this.getPostData("assigntask", reqData);
|
||||
}
|
||||
|
||||
connectMembers(reqData){
|
||||
return this.getPostData("connectmembers", reqData);
|
||||
}
|
||||
|
||||
interestStats(reqData){
|
||||
return this.getPostData("intereststats", reqData);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export class SessionDataProviderService {
|
||||
"internal_return": 100
|
||||
*/
|
||||
max_card:number=4;
|
||||
|
||||
parent_uid:string = '';
|
||||
refresh:number=30000;
|
||||
account_country:string="NG";
|
||||
account_type:string="";
|
||||
@@ -217,6 +217,8 @@ export class SessionDataProviderService {
|
||||
this.account_pref = loginResult.account_pref;
|
||||
this.refer_link = loginResult.refer_link;
|
||||
|
||||
this.parent_uid = loginResult.parent_uid != undefined ? loginResult.parent_uid: '';
|
||||
|
||||
|
||||
} catch (error) {
|
||||
console.log("LOGIN STORAGE ERROR->" + error);
|
||||
|
||||
Reference in New Issue
Block a user