Fix order list redirection

This commit is contained in:
Rene Vergara 2022-07-26 11:26:42 -05:00
parent 946828563c
commit 1e14ab0c5a
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2
3 changed files with 4 additions and 7 deletions

View file

@ -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);
//}
} }

View file

@ -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']);
} }
}); });

View file

@ -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']);