Add website field to owner
This commit is contained in:
parent
57d06873f5
commit
36242cffb9
10 changed files with 23 additions and 14 deletions
|
@ -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}
|
||||
});
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ export class FullnodeService{
|
|||
state: '',
|
||||
postal: '',
|
||||
phone: '',
|
||||
paid: false
|
||||
|
||||
paid: false,
|
||||
website: ''
|
||||
};
|
||||
|
||||
constructor(private http: HttpClient, public userService: UserService){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.text {
|
||||
font-family: 'Saira Semi Condensed', sans-serif;
|
||||
font-family: 'Spartan', sans-serif;
|
||||
}
|
||||
|
||||
a{
|
||||
|
|
|
@ -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<number>;
|
||||
|
|
|
@ -35,8 +35,8 @@ export class ItemListComponent implements OnInit{
|
|||
state: '',
|
||||
postal: '',
|
||||
phone: '',
|
||||
paid: false
|
||||
|
||||
paid: false,
|
||||
website: ''
|
||||
};
|
||||
public price: number = 1;
|
||||
public ownerUpdate: Observable<Owner>;
|
||||
|
|
|
@ -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) {
|
||||
if (this.owner.paid) {
|
||||
this.router.navigate(['/shop']);
|
||||
} else {
|
||||
this.router.navigate(['/biz']);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -37,7 +37,8 @@ export class OrderService {
|
|||
state: '',
|
||||
postal: '',
|
||||
phone: '',
|
||||
paid: false
|
||||
paid: false,
|
||||
website: ''
|
||||
},
|
||||
order: {
|
||||
address: '',
|
||||
|
|
|
@ -14,4 +14,5 @@ export interface Owner {
|
|||
postal: string;
|
||||
phone: string;
|
||||
paid: boolean;
|
||||
website: string;
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ export class UserService{
|
|||
state: '',
|
||||
postal: '',
|
||||
phone: '',
|
||||
paid: false
|
||||
|
||||
paid: false,
|
||||
website: ''
|
||||
},
|
||||
txs : []
|
||||
};
|
||||
|
|
|
@ -43,7 +43,8 @@ export class ViewerComponent implements OnInit {
|
|||
state: '',
|
||||
postal: '',
|
||||
phone: '',
|
||||
paid: false
|
||||
paid: false,
|
||||
website: ''
|
||||
};
|
||||
public addrUpdate: Observable<string>;
|
||||
public ownerUpdate: Observable<Owner>;
|
||||
|
|
Loading…
Reference in a new issue