Fix order list redirection
This commit is contained in:
parent
946828563c
commit
1e14ab0c5a
3 changed files with 4 additions and 7 deletions
|
@ -8,10 +8,6 @@ import { Component } from '@angular/core';
|
||||||
})
|
})
|
||||||
|
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
//StoredPosts: Post[] = [];
|
title = 'ZGo';
|
||||||
title = 'sell4zec';
|
|
||||||
|
|
||||||
//onPostAdded(post: Post){
|
|
||||||
//this.StoredPosts.push(post);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,6 +206,7 @@ export class BusinessComponent implements OnInit {
|
||||||
this.userService.findUser();
|
this.userService.findUser();
|
||||||
this.ownerUpdate.subscribe((owner) => {
|
this.ownerUpdate.subscribe((owner) => {
|
||||||
if(owner.paid) {
|
if(owner.paid) {
|
||||||
|
clearInterval(this.intervalHolder);
|
||||||
this.router.navigate(['/shop']);
|
this.router.navigate(['/shop']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,7 +18,7 @@ import {User} from '../user.model';
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ViewerComponent implements OnInit {
|
export class ViewerComponent implements OnInit {
|
||||||
intervalHolder: any;
|
//intervalHolder: any;
|
||||||
public message: string = "Welcome to the inside!";
|
public message: string = "Welcome to the inside!";
|
||||||
public user: User = {
|
public user: User = {
|
||||||
address: '',
|
address: '',
|
||||||
|
@ -131,7 +131,7 @@ export class ViewerComponent implements OnInit {
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
this.userUpdate.subscribe((user) => {
|
this.userUpdate.subscribe((user) => {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
console.log('Viewer loginCheck', this.user);
|
//console.log('Viewer loginCheck', this.user);
|
||||||
if (!this.owner.paid || !this.user.validated) {
|
if (!this.owner.paid || !this.user.validated) {
|
||||||
console.log('Log in expired!');
|
console.log('Log in expired!');
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login']);
|
||||||
|
|
Loading…
Reference in a new issue