family clean up
This commit is contained in:
@@ -73,6 +73,7 @@ export class FamiliyDashComponent implements OnInit {
|
||||
pageToNavigate = 'invite';
|
||||
break;
|
||||
case 'mytask': // offers waiting to start
|
||||
case "my-active-jobs":
|
||||
pageToNavigate = 'joboffers';
|
||||
break;
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
<div class="lesson">
|
||||
|
||||
<!-- <ion-card>-->
|
||||
<!-- <img alt="Silhouette of mountains" src="https://ionicframework.com/docs/img/demos/card-media.png" />-->
|
||||
<!-- <ion-card-header>-->
|
||||
<!-- <ion-card-title>Card Title</ion-card-title>-->
|
||||
<!-- <ion-card-subtitle>Card Subtitle</ion-card-subtitle>-->
|
||||
<!-- </ion-card-header>-->
|
||||
|
||||
<!-- <ion-card-content>-->
|
||||
<!-- Here's a small text description for the card content. Nothing more, nothing less.-->
|
||||
<!-- </ion-card-content>-->
|
||||
<!-- </ion-card>-->
|
||||
|
||||
<div style="margin-bottom: 20px;">
|
||||
<div class="video" *ngFor="let item of familyBannerData | keyvalue" (click)="famBannerPage(item)">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url('+item.value.banner.image+''"></div>
|
||||
|
||||
<div class="text">
|
||||
<ion-label class="bold_text">{{item.value.banner.text}}</ion-label>
|
||||
<ion-label class="grey_text">{{item.value.banner.description}}</ion-label>
|
||||
<!-- <ion-label *ngIf="item.remind !='' " class="remind_text"> Last Remind : {{ item.remind | date }}</ion-label>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<ion-icon name="chevron-forward-outline"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { FamilyhomeComponent } from './familyhome.component';
|
||||
|
||||
describe('FamilyhomeComponent', () => {
|
||||
let component: FamilyhomeComponent;
|
||||
let fixture: ComponentFixture<FamilyhomeComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ FamilyhomeComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(FamilyhomeComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,67 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
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-familyhome",
|
||||
templateUrl: "./familyhome.component.html",
|
||||
styleUrls: ["./familyhome.component.scss"],
|
||||
})
|
||||
export class FamilyhomeComponent implements OnInit {
|
||||
constructor(
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
public bannersDataService: BannersDataService,
|
||||
private wrenchService: WrenchService
|
||||
) {
|
||||
this.refreshBanners().then(r => {
|
||||
console.log("startd family banners ");
|
||||
});
|
||||
}
|
||||
|
||||
familyBannerCount: number = 0;
|
||||
familyBannerResult: any;
|
||||
familyBannerData: [];
|
||||
ngOnInit() {
|
||||
this.familyBannerData = this.bannersDataService.familyBannerData;
|
||||
this.familyBannerCount = this.bannersDataService.familyBannerCount;
|
||||
}
|
||||
async refreshBanners() {
|
||||
|
||||
setInterval(()=>{
|
||||
this.familyBannerData = this.bannersDataService.familyBannerData;
|
||||
this.familyBannerCount = this.bannersDataService.familyBannerCount;
|
||||
console.log("this.familyBannerData ::: ",this.familyBannerData);
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
famBannerPage(item){
|
||||
console.log(item.value.banner.action);
|
||||
var pageToNavigate = '';
|
||||
// debugger;
|
||||
switch (item.value.banner.action){
|
||||
|
||||
case "mytask":
|
||||
pageToNavigate = 'joboffers';
|
||||
break;
|
||||
case "pastdue":
|
||||
pageToNavigate = 'joboffers';
|
||||
break;
|
||||
case "pending":
|
||||
pageToNavigate = 'joboffers';
|
||||
break;
|
||||
case "familymarket":
|
||||
pageToNavigate='suggest';
|
||||
break;
|
||||
case "suggested":
|
||||
pageToNavigate ='familysuggested';
|
||||
break;
|
||||
}
|
||||
|
||||
if(pageToNavigate !=''){
|
||||
this.router.navigate([pageToNavigate],{state: item.value.banner});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ export class JobownerDashComponent implements OnInit {
|
||||
pageToNavigate = 'invite';
|
||||
break;
|
||||
case 'mytask': // offers waiting to start
|
||||
case "my-active-jobs":
|
||||
pageToNavigate = 'joboffers';
|
||||
break;
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ export class WorkersDashComponent implements OnInit {
|
||||
pageToNavigate = 'invite';
|
||||
break;
|
||||
case 'mytask': // offers waiting to start
|
||||
case "my-active-jobs":
|
||||
pageToNavigate = 'joboffers';
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user