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}, state: {type: String, required: true},
postal: {type: String, required: true}, postal: {type: String, required: true},
phone: {type: String, required: true}, phone: {type: String, required: true},
website: {type: String},
paid: {type: Boolean, required: true, default: false} paid: {type: Boolean, required: true, default: false}
}); });

View file

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

View file

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

View file

@ -30,8 +30,8 @@ export class HeaderComponent implements OnInit, OnDestroy {
state: '', state: '',
postal: '', postal: '',
phone: '', phone: '',
paid: false paid: false,
website: ''
}; };
private session: string | null = ''; private session: string | null = '';
public heightUpdate: Observable<number>; public heightUpdate: Observable<number>;

View file

@ -35,8 +35,8 @@ export class ItemListComponent implements OnInit{
state: '', state: '',
postal: '', postal: '',
phone: '', phone: '',
paid: false paid: false,
website: ''
}; };
public price: number = 1; public price: number = 1;
public ownerUpdate: Observable<Owner>; public ownerUpdate: Observable<Owner>;

View file

@ -53,7 +53,8 @@ export class LoginComponent implements OnInit, AfterViewInit {
state: '', state: '',
postal: '', postal: '',
phone: '', phone: '',
paid: false paid: false,
website: ''
}; };
private FullnodeSub: Subscription = new Subscription(); private FullnodeSub: Subscription = new Subscription();
private UserSub: Subscription = new Subscription(); private UserSub: Subscription = new Subscription();
@ -154,13 +155,17 @@ export class LoginComponent implements OnInit, AfterViewInit {
this.txs = txs; this.txs = txs;
}); });
this.userUpdate.subscribe((user) => { this.userUpdate.subscribe((user) => {
if (user.expiration > today) { if (user.blocktime > 0) {
if(this.myStepper!.selectedIndex === 1){ if(this.myStepper!.selectedIndex === 1){
this.myStepper!.next(); this.myStepper!.next();
} }
//console.log('Log in found in blockchain!'); //console.log('Log in found in blockchain!');
if (user.validated) { if (user.validated) {
if (this.owner.paid) {
this.router.navigate(['/shop']); this.router.navigate(['/shop']);
} else {
this.router.navigate(['/biz']);
}
} }
} }
}); });

View file

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

View file

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

View file

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

View file

@ -43,7 +43,8 @@ export class ViewerComponent implements OnInit {
state: '', state: '',
postal: '', postal: '',
phone: '', phone: '',
paid: false paid: false,
website: ''
}; };
public addrUpdate: Observable<string>; public addrUpdate: Observable<string>;
public ownerUpdate: Observable<Owner>; public ownerUpdate: Observable<Owner>;