family types
This commit is contained in:
@@ -22,6 +22,8 @@ ionic generate page jobactive
|
||||
ionic generate component taskactivities
|
||||
ionic generate component suggestedlist
|
||||
|
||||
ionic generate page addjob
|
||||
|
||||
|
||||
ionic generate component historyCompletedJobs
|
||||
|
||||
|
||||
@@ -274,6 +274,11 @@ const routes: Routes = [
|
||||
path: 'addjob',
|
||||
loadChildren: () => import('./pages/addjob/addjob.module').then(m => m.AddjobPageModule)
|
||||
},
|
||||
{
|
||||
path: 'addfamilykid',
|
||||
loadChildren: () => import('./pages/addfamilykid/addfamilykid.module').then(m => m.AddfamilykidPageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,36 @@
|
||||
<div *ngIf="family_dash_show> 0">
|
||||
<app-fastreward></app-fastreward>
|
||||
<app-familiy-nokids></app-familiy-nokids>
|
||||
<app-familiy-notask></app-familiy-notask>
|
||||
<app-familiy-addfamily></app-familiy-addfamily>
|
||||
<app-familiy-allowance></app-familiy-allowance>
|
||||
<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-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>
|
||||
<div
|
||||
*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' ">
|
||||
<!-- 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.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>-->
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
.bg_white {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
background-color: white;
|
||||
padding: 5px;
|
||||
box-shadow: 0px 0px 20px 1px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 10px;
|
||||
margin-bottom: 20px;
|
||||
&.OFFERS{
|
||||
background-color: #186875;
|
||||
.name{
|
||||
color: white;
|
||||
}
|
||||
.bg_text{
|
||||
--background-color: white;
|
||||
}
|
||||
}
|
||||
&.INTEREST{
|
||||
background-color: #6b6b08;
|
||||
.name{
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
&.PASTDUEJOB{
|
||||
background-color: #e0b4b4;
|
||||
}
|
||||
&.REVIEWJOB{
|
||||
background-color: #dbefda;
|
||||
}
|
||||
&.bg_alice{
|
||||
background-color: aliceblue;
|
||||
padding: 1px;
|
||||
ion-row{
|
||||
padding:1px;
|
||||
}
|
||||
.detail{
|
||||
font-size: 14px;
|
||||
font-weight: bolder;
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.back_image {
|
||||
height: 95px;
|
||||
width: 95px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.banner_image{
|
||||
min-width: 90px;
|
||||
}
|
||||
.detail {
|
||||
width: 100%;
|
||||
margin-left: 10px;
|
||||
|
||||
.bg_text {
|
||||
color: var(--ion-color-primary);
|
||||
background-color: rgba(246, 246, 248, 0.9);
|
||||
font-size: 12px;
|
||||
padding: 2px 5px;
|
||||
border-radius: 5px;
|
||||
//width: 80px;
|
||||
text-align: center;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
.ovf{
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
font-family: 'bold';
|
||||
margin-top: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.price {
|
||||
margin-top: 3px;
|
||||
color: var(--ion-color-primary);
|
||||
font-family: 'semi-bold';
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 3px;
|
||||
|
||||
ion-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.small {
|
||||
margin-left: 8px;
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.blog_list {
|
||||
//background-color: lightgrey !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.back_image {
|
||||
height: 95px;
|
||||
width: 95px !important;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.banner_image{
|
||||
min-width: 90px;
|
||||
//float: right;
|
||||
//display: flex;
|
||||
//justify-content: flex-end
|
||||
}
|
||||
.detail {
|
||||
margin-left: 10px;
|
||||
|
||||
.bg_text {
|
||||
color: var(--ion-color-primary);
|
||||
background-color: #dfe1f3;
|
||||
font-size: 12px;
|
||||
padding: 2px 5px;
|
||||
border-radius: 5px;
|
||||
//width: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-family: 'bold';
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.price {
|
||||
margin-top: 3px;
|
||||
color: var(--ion-color-primary);
|
||||
font-family: 'semi-bold';
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 3px;
|
||||
|
||||
ion-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.small {
|
||||
margin-left: 8px;
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
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',
|
||||
@@ -10,13 +11,17 @@ import {WrenchService} from "../../services/wrench.service";
|
||||
styleUrls: ['./familiy-dash.component.scss'],
|
||||
})
|
||||
export class FamiliyDashComponent implements OnInit {
|
||||
family_dash_show:number = 0;
|
||||
@Input('bannerData') bannerData:any;
|
||||
homebannerCount:number=0;
|
||||
family_action:string="";
|
||||
family_dash_show:number =10;
|
||||
|
||||
pageItem:{
|
||||
page_name: number
|
||||
}
|
||||
constructor(private navctr: NavController,
|
||||
private router: Router,
|
||||
public bannersDataService:BannersDataService,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService) {
|
||||
|
||||
@@ -25,7 +30,7 @@ export class FamiliyDashComponent implements OnInit {
|
||||
});
|
||||
|
||||
addEventListener('app_familiy_nokids_action', () => {
|
||||
this.router.navigate(['family'],{state: this.pageItem});
|
||||
this.router.navigate(['addfamilykid'],{state: this.pageItem});
|
||||
});
|
||||
|
||||
addEventListener('app_familiy_notask_action', () => {
|
||||
@@ -40,6 +45,61 @@ export class FamiliyDashComponent implements OnInit {
|
||||
this.router.navigate(['family'],{state: this.pageItem});
|
||||
});
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
onDetails(item) {
|
||||
// var pageToNavigate = 'detail';
|
||||
var pageToNavigate = '';
|
||||
// alert(item.link_path);
|
||||
switch (item.link_path){
|
||||
case 'referral':
|
||||
pageToNavigate = 'invite';
|
||||
break;
|
||||
case 'mytask': // offers waiting to start
|
||||
pageToNavigate = 'joboffers';
|
||||
break;
|
||||
|
||||
case 'my-coupon':
|
||||
pageToNavigate = 'mycoupons';
|
||||
break;
|
||||
case 'blog-page':
|
||||
// this.blogDetails(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';
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case 'offer-interest':
|
||||
pageToNavigate = 'jobinterest';
|
||||
break
|
||||
|
||||
case 'acc-family':
|
||||
pageToNavigate = 'family';
|
||||
break;
|
||||
|
||||
}
|
||||
if(pageToNavigate !=''){
|
||||
this.router.navigate([pageToNavigate],{state: item});
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
@@ -1,19 +1,36 @@
|
||||
<!--<ion-card (click)="cardAction()">-->
|
||||
<!-- <ion-card-header>-->
|
||||
<!-- <ion-card-title><span-->
|
||||
<!-- style="margin-left: 100px;-->
|
||||
<!-- font-weight: bolder;-->
|
||||
<!-- color: white;">Add Kids</span>-->
|
||||
<!-- </ion-card-title>-->
|
||||
<!-- <ion-card-subtitle><hr class="kid-line" /></ion-card-subtitle>-->
|
||||
<!-- </ion-card-header>-->
|
||||
<!-- <ion-card-content class="f-item">-->
|
||||
<!-- <ion-item lines="none"-->
|
||||
<!-- style="background-color: lightyellow;-->
|
||||
<!-- border-radius: 10px;-->
|
||||
<!-- margin-left: 150px; font-weight: bold;">-->
|
||||
<!-- .-->
|
||||
<!-- <ion-icon name="arrow-forward-circle-outline" slot="end"></ion-icon>-->
|
||||
<!-- </ion-item>-->
|
||||
<!-- </ion-card-content>-->
|
||||
<!--</ion-card>-->
|
||||
|
||||
<ion-card (click)="cardAction()">
|
||||
<img alt="Silhouette of mountains" src="https://www.wrenchboard.com/assets/images/apps/family-no-kid.jpg" />
|
||||
<ion-card-header>
|
||||
<ion-card-title><span
|
||||
style="margin-left: 100px;
|
||||
font-weight: bolder;
|
||||
color: white;">Add Kids</span>
|
||||
</ion-card-title>
|
||||
<ion-card-subtitle><hr class="kid-line" /></ion-card-subtitle>
|
||||
<ion-card-title>Add Kids</ion-card-title>
|
||||
<!-- <ion-card-subtitle>Card Subtitle</ion-card-subtitle>-->
|
||||
</ion-card-header>
|
||||
<ion-card-content class="f-item">
|
||||
<ion-item lines="none"
|
||||
style="background-color: lightyellow;
|
||||
border-radius: 10px;
|
||||
margin-left: 150px; font-weight: bold;">
|
||||
.
|
||||
<ion-icon name="arrow-forward-circle-outline" slot="end"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
<ion-card-content>
|
||||
Add kids, invite relatives or groups, and plan and send rewards in one place.
|
||||
<div
|
||||
style="font-weight: bold; background-color: #186875; color:white; text-align: right;">
|
||||
<ion-icon name="arrow-forward-circle-outline" size="medium" slot="end"></ion-icon>
|
||||
|
||||
</div>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
@@ -1,6 +1,15 @@
|
||||
ion-card{
|
||||
ion-card {
|
||||
margin: 20px 0px 0px 0px;
|
||||
background-color: #186875;
|
||||
color: white;
|
||||
ion-card-title{
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
ion-card_2{
|
||||
margin:20px 0px 0px 0px;
|
||||
height: 130px;
|
||||
height: 230px;
|
||||
padding: 0px;
|
||||
background-image: url("https://www.wrenchboard.com/assets/images/apps/dash-family-card-nokid.png");
|
||||
background-size: cover;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AddfamilykidPage } from './addfamilykid.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: AddfamilykidPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AddfamilykidPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { AddfamilykidPageRoutingModule } from './addfamilykid-routing.module';
|
||||
|
||||
import { AddfamilykidPage } from './addfamilykid.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
AddfamilykidPageRoutingModule
|
||||
],
|
||||
declarations: [AddfamilykidPage]
|
||||
})
|
||||
export class AddfamilykidPageModule {}
|
||||
@@ -0,0 +1,144 @@
|
||||
<ion-header mode="ios" class="ion-no-border">
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start" (click)="onBack()">
|
||||
<ion-button>
|
||||
<ion-icon name="arrow-back-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
<ion-title>Add Kid</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div>
|
||||
<div
|
||||
style="
|
||||
background-color: aliceblue;
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
margin-top: 10px;
|
||||
"
|
||||
>
|
||||
<ion-item lines="none">
|
||||
<ion-input
|
||||
type="text"
|
||||
maxlength="15"
|
||||
placeholder="Firstname"
|
||||
style="
|
||||
background-color: aliceblue;
|
||||
border-radius: 10px;
|
||||
padding-left: 1px;
|
||||
"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]="firstname"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input
|
||||
type="text"
|
||||
maxlength="15"
|
||||
placeholder="lastname"
|
||||
style="
|
||||
background-color: aliceblue;
|
||||
border-radius: 10px;
|
||||
padding-left: 1px;
|
||||
"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]="lastname"
|
||||
></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-label>Birthday(Year/Month)</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-grid>
|
||||
<ion-row style="margin: 0px; padding: 0px">
|
||||
<ion-col style="margin: 0px; padding: 4px">
|
||||
<div style="width: 100%; background-color: #8b198e">
|
||||
<div style="width: 30%; float: left">Year</div>
|
||||
|
||||
<div style="width: 70%; float: right">
|
||||
<ion-select
|
||||
aria-label="Year"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]="year"
|
||||
style="
|
||||
background-color: aliceblue;
|
||||
border-radius: 10px;
|
||||
font-size: 12px;
|
||||
width: 100%;
|
||||
"
|
||||
>
|
||||
<ion-select-option
|
||||
*ngFor="let item1 of regYear"
|
||||
value="{{item1}}"
|
||||
>{{item1}}</ion-select-option
|
||||
>
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row style="margin: 0px; padding: 0px">
|
||||
<ion-col style="margin: 0px; padding: 4px">
|
||||
<div style="width: 100%; background-color: #8b198e">
|
||||
<div style="width: 30%; float: left">Month</div>
|
||||
|
||||
<div style="width: 70%; float: right">
|
||||
<ion-select
|
||||
aria-label="Month"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]="month"
|
||||
expand="block"
|
||||
style="
|
||||
background-color: aliceblue;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
"
|
||||
>
|
||||
<ion-select-option
|
||||
*ngFor="let item of regMonth;"
|
||||
value="{{item[0]}}"
|
||||
>{{item[1]}}</ion-select-option
|
||||
>
|
||||
</ion-select>
|
||||
</div>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-item>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col style="text-align: left">
|
||||
<!-- <ion-button-->
|
||||
<!-- (click)="setCloseModal()"-->
|
||||
<!-- size="small"-->
|
||||
<!-- shape="round"-->
|
||||
<!-- color="danger"-->
|
||||
<!-- >-->
|
||||
<!-- Close-->
|
||||
<!-- </ion-button>-->
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div style="text-align: right">
|
||||
{{addFamilyResult}}
|
||||
<ion-button
|
||||
shape="round"
|
||||
[disabled]="isDisabled"
|
||||
size="small"
|
||||
(click)="addFamilyMember()"
|
||||
>Add</ion-button
|
||||
>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { AddfamilykidPage } from './addfamilykid.page';
|
||||
|
||||
describe('AddfamilykidPage', () => {
|
||||
let component: AddfamilykidPage;
|
||||
let fixture: ComponentFixture<AddfamilykidPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AddfamilykidPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AddfamilykidPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,111 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {LoadingController, NavController} from "@ionic/angular";
|
||||
|
||||
@Component({
|
||||
selector: 'app-addfamilykid',
|
||||
templateUrl: './addfamilykid.page.html',
|
||||
styleUrls: ['./addfamilykid.page.scss'],
|
||||
})
|
||||
export class AddfamilykidPage implements OnInit {
|
||||
|
||||
@ViewChild('firstname') firstname;
|
||||
@ViewChild('lastname') lastname;
|
||||
@ViewChild('month') month;
|
||||
@ViewChild('year') year;
|
||||
addFamilyResult:string='';
|
||||
|
||||
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private loadingCtrl: LoadingController
|
||||
) { }
|
||||
|
||||
regMonth:any;
|
||||
regYear:any;
|
||||
ngOnInit() {
|
||||
this.regMonth=this.sessionDataProviderService.getMonths();
|
||||
this.regYear = this.sessionDataProviderService.getChildAddYears();
|
||||
//debugger;
|
||||
}
|
||||
|
||||
onBack() {
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
|
||||
isDisabled:boolean= true;
|
||||
verifyEntry(){
|
||||
this.isDisabled= true;
|
||||
if ( this.firstname.length> 1 && this.lastname.length> 1 && this.month> 0 && this.year> 0 ){
|
||||
this.isDisabled= false;
|
||||
}
|
||||
}
|
||||
/*
|
||||
'member_id' => int 1
|
||||
'sessionid' => string '9C780E24425EBE70E1AE3D385193E6FF0DF839A5CA62CD6A6DCE9A5065530968' (length=64)
|
||||
'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36)
|
||||
'firstname' => string 'First406' (length=8)
|
||||
'lastname' => string 'Last151' (length=7)
|
||||
'year' => int 2002
|
||||
'month' => int 8
|
||||
'action' => int 22015
|
||||
*/
|
||||
reqData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
firstname:string,
|
||||
lastname: string,
|
||||
month: number,
|
||||
year: number
|
||||
};
|
||||
|
||||
createFamilyResult:any;
|
||||
|
||||
async addFamilyMember(){
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Creating Family Member...',
|
||||
duration: 5000,
|
||||
});
|
||||
|
||||
this.reqData={
|
||||
action:22015,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
firstname: this.firstname,
|
||||
lastname: this.lastname,
|
||||
month: this.month,
|
||||
year: this.year
|
||||
}
|
||||
loading.present();
|
||||
|
||||
this.wrenchService.familyAdd(this.reqData).subscribe(
|
||||
createFamilyResult => {
|
||||
loading.dismiss();
|
||||
this.createFamilyResult = createFamilyResult;
|
||||
console.log("this.wrenchService.createFamilyResult RETURN DATA->", this.createFamilyResult);
|
||||
if (this.createFamilyResult.internal_return> 0){
|
||||
this.firstname='';
|
||||
this.lastname='';
|
||||
|
||||
this.createFamilyResult = "Family Added";
|
||||
setTimeout(()=>{
|
||||
this.createFamilyResult="";
|
||||
this.onBack();
|
||||
},3000);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -75,9 +75,7 @@
|
||||
</div>
|
||||
<ng-template #elseFulltag>
|
||||
<div *ngIf="home_dash_type=='DEFAULT_HOME_DASH'; ">
|
||||
<app-familiy-dash></app-familiy-dash>
|
||||
<app-latest-market></app-latest-market>
|
||||
<!-- <app-tracking></app-tracking>-->
|
||||
<ion-card class="map-sec" *ngIf="enableTracking > 0">
|
||||
<app-tracking></app-tracking>
|
||||
<ion-card-content>
|
||||
@@ -90,52 +88,51 @@
|
||||
</ion-list>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<div
|
||||
*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' ">
|
||||
<!-- 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.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>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="home_dash_type=='FAMILY_PARENT_DASH'; ">
|
||||
<app-familiy-dash [bannerData]="bannerData"></app-familiy-dash>
|
||||
<!-- <app-tracking></app-tracking>-->
|
||||
</div>
|
||||
|
||||
<div *ngIf="homebannerCount <3;">
|
||||
<!-- <div class="offer">-->
|
||||
<!-- <div class="bg_image back_image" [style.backgroundImage]="'url('+offerBanner+')'"></div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<div
|
||||
*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' ">
|
||||
<!-- 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.short_title}}</ion-label>
|
||||
<ion-label class="bg_text ovf" style="background-color: white;"
|
||||
>{{item.short_description}}</ion-label
|
||||
>
|
||||
|
||||
<!-- <ion-label class="price">$48.00 </ion-label>-->
|
||||
|
||||
<!-- <div class="row">-->
|
||||
<!-- <!– <ion-icon name="star-half-outline" color="warning"></ion-icon>–>-->
|
||||
<!-- <!– <ion-label class="small">4.9</ion-label>–>-->
|
||||
<!-- <!– <ion-label class="small">|</ion-label>–>-->
|
||||
<!-- <!– <ion-label class="small">8266 Students</ion-label>–>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <ion-icon slot="end" name="bookmark-outline" class="save" color="primary"></ion-icon>-->
|
||||
</div>
|
||||
<div class="flex">
|
||||
<ion-label class="bold_text">Recent Blog</ion-label>
|
||||
<ion-label class="color_text" (click)="allBlog()">See all</ion-label>
|
||||
|
||||
@@ -59,7 +59,8 @@ export class HomePage implements OnInit {
|
||||
addEventListener('dash_tool_mywallet', () => {
|
||||
this.myWallet();
|
||||
});
|
||||
|
||||
this.home_dash_type = this.sessionDataProviderService.home_dash_type;
|
||||
//this.home_dash_type = 'FAMILY_PARENT_DASH';
|
||||
}
|
||||
|
||||
allInitFunctions(){
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import {HttpClient, HttpHeaders} from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
//import 'rxjs/add/operator/map';
|
||||
@@ -21,6 +21,12 @@ export class WrenchService {
|
||||
this.url = 'https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1';
|
||||
}
|
||||
getPostData(reqPath:string, reqData): Observable<any> {
|
||||
let headers = new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
/* 'Authorization': this.basic */});
|
||||
let options = { headers: headers };
|
||||
|
||||
headers.append('Content-Type','application/json');
|
||||
|
||||
if (reqPath != 'userlogin' && reqPath != 'createuser'
|
||||
&& reqPath !='stepresetpass' && reqPath !='startresetpasword' && reqPath!='qrlogin' && reqPath!= 'signupcountry'){
|
||||
@@ -31,7 +37,7 @@ export class WrenchService {
|
||||
}
|
||||
}
|
||||
const apiReturn = this.http.post(
|
||||
`${environment.baseUrl}/${reqPath}`,reqData
|
||||
`${environment.baseUrl}/${reqPath}`,reqData, { headers: headers}
|
||||
);
|
||||
/*
|
||||
We have to check if this sessio
|
||||
|
||||
@@ -82,6 +82,9 @@ export class SessionDataProviderService {
|
||||
family_uid:string='';
|
||||
family_types:any=[];
|
||||
history_types:any=[];
|
||||
home_dash_type:string="DEFAULT_HOME_DASH";
|
||||
family_action:string="";
|
||||
|
||||
|
||||
session_contructed:boolean = false;
|
||||
|
||||
@@ -162,6 +165,9 @@ export class SessionDataProviderService {
|
||||
this.family_types= loginResult.family_types;
|
||||
this.history_types =loginResult.history_types;
|
||||
|
||||
this.home_dash_type =loginResult.home_dash_type;
|
||||
this.family_action =loginResult.family_action;
|
||||
|
||||
//this.pushNotificationProvider.tagUser(this.session);
|
||||
|
||||
this.session_contructed = true;
|
||||
|
||||
Reference in New Issue
Block a user