Add website field to owner

This commit is contained in:
Rene Vergara 2022-01-18 16:40:20 -06:00
parent 57d06873f5
commit 36242cffb9
10 changed files with 23 additions and 14 deletions

View File

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

View File

@ -37,8 +37,8 @@ export class FullnodeService{
state: '',
postal: '',
phone: '',
paid: false
paid: false,
website: ''
};
constructor(private http: HttpClient, public userService: UserService){

View File

@ -1,5 +1,5 @@
.text {
font-family: 'Saira Semi Condensed', sans-serif;
font-family: 'Spartan', sans-serif;
}
a{

View File

@ -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>;

View File

@ -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>;

View File

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

View File

@ -37,7 +37,8 @@ export class OrderService {
state: '',
postal: '',
phone: '',
paid: false
paid: false,
website: ''
},
order: {
address: '',

View File

@ -14,4 +14,5 @@ export interface Owner {
postal: string;
phone: string;
paid: boolean;
website: string;
}

View File

@ -32,8 +32,8 @@ export class UserService{
state: '',
postal: '',
phone: '',
paid: false
paid: false,
website: ''
},
txs : []
};

View File

@ -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>;