diff --git a/backend/models/owner.js b/backend/models/owner.js index b718a7e..eba6d48 100644 --- a/backend/models/owner.js +++ b/backend/models/owner.js @@ -14,6 +14,7 @@ const ownerSchema = mongoose.Schema({ state: {type: String, required: true}, postal: {type: String, required: true}, phone: {type: String, required: true}, + website: {type: String}, paid: {type: Boolean, required: true, default: false} }); diff --git a/src/app/fullnode.service.ts b/src/app/fullnode.service.ts index 4f7d444..46845ab 100644 --- a/src/app/fullnode.service.ts +++ b/src/app/fullnode.service.ts @@ -37,8 +37,8 @@ export class FullnodeService{ state: '', postal: '', phone: '', - paid: false - + paid: false, + website: '' }; constructor(private http: HttpClient, public userService: UserService){ diff --git a/src/app/header/header.component.css b/src/app/header/header.component.css index 78200ee..c659da2 100644 --- a/src/app/header/header.component.css +++ b/src/app/header/header.component.css @@ -1,5 +1,5 @@ .text { - font-family: 'Saira Semi Condensed', sans-serif; + font-family: 'Spartan', sans-serif; } a{ diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts index 9ea7929..4c97c55 100644 --- a/src/app/header/header.component.ts +++ b/src/app/header/header.component.ts @@ -30,8 +30,8 @@ export class HeaderComponent implements OnInit, OnDestroy { state: '', postal: '', phone: '', - paid: false - + paid: false, + website: '' }; private session: string | null = ''; public heightUpdate: Observable; diff --git a/src/app/items/item-list/item-list.component.ts b/src/app/items/item-list/item-list.component.ts index 55126ad..3122973 100644 --- a/src/app/items/item-list/item-list.component.ts +++ b/src/app/items/item-list/item-list.component.ts @@ -35,8 +35,8 @@ export class ItemListComponent implements OnInit{ state: '', postal: '', phone: '', - paid: false - + paid: false, + website: '' }; public price: number = 1; public ownerUpdate: Observable; diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index d8b0217..c9b1c1b 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -53,7 +53,8 @@ export class LoginComponent implements OnInit, AfterViewInit { state: '', postal: '', phone: '', - paid: false + paid: false, + website: '' }; private FullnodeSub: Subscription = new Subscription(); private UserSub: Subscription = new Subscription(); @@ -154,13 +155,17 @@ export class LoginComponent implements OnInit, AfterViewInit { this.txs = txs; }); this.userUpdate.subscribe((user) => { - if (user.expiration > today) { + if (user.blocktime > 0) { if(this.myStepper!.selectedIndex === 1){ this.myStepper!.next(); } //console.log('Log in found in blockchain!'); if (user.validated) { - this.router.navigate(['/shop']); + if (this.owner.paid) { + this.router.navigate(['/shop']); + } else { + this.router.navigate(['/biz']); + } } } }); diff --git a/src/app/order/order.service.ts b/src/app/order/order.service.ts index 25b0fd6..c069d03 100644 --- a/src/app/order/order.service.ts +++ b/src/app/order/order.service.ts @@ -37,7 +37,8 @@ export class OrderService { state: '', postal: '', phone: '', - paid: false + paid: false, + website: '' }, order: { address: '', diff --git a/src/app/owner.model.ts b/src/app/owner.model.ts index 2ecca3b..8563828 100644 --- a/src/app/owner.model.ts +++ b/src/app/owner.model.ts @@ -14,4 +14,5 @@ export interface Owner { postal: string; phone: string; paid: boolean; + website: string; } diff --git a/src/app/user.service.ts b/src/app/user.service.ts index 1ffb051..8813145 100644 --- a/src/app/user.service.ts +++ b/src/app/user.service.ts @@ -32,8 +32,8 @@ export class UserService{ state: '', postal: '', phone: '', - paid: false - + paid: false, + website: '' }, txs : [] }; diff --git a/src/app/viewer/viewer.component.ts b/src/app/viewer/viewer.component.ts index 0066b45..8336d56 100644 --- a/src/app/viewer/viewer.component.ts +++ b/src/app/viewer/viewer.component.ts @@ -43,7 +43,8 @@ export class ViewerComponent implements OnInit { state: '', postal: '', phone: '', - paid: false + paid: false, + website: '' }; public addrUpdate: Observable; public ownerUpdate: Observable;