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