Merge branch 'new-login' into xero
This commit is contained in:
commit
3a8791cb8b
1 changed files with 18 additions and 11 deletions
|
@ -1,10 +1,9 @@
|
|||
import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { UntypedFormBuilder, Validators, UntypedFormGroup, FormControl } from '@angular/forms';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { UntypedFormBuilder, Validators, UntypedFormGroup } from '@angular/forms';
|
||||
import { MatDialog, MatDialogConfig} from '@angular/material/dialog';
|
||||
import { ProgressBarMode } from '@angular/material/progress-bar';
|
||||
import { Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { filter, startWith, map, switchMap } from 'rxjs/operators';
|
||||
import { MatStepper } from '@angular/material/stepper';
|
||||
import { MatSlideToggleChange } from '@angular/material/slide-toggle';
|
||||
import { Country } from '../country.model';
|
||||
|
@ -12,7 +11,6 @@ import { Owner } from '../owner.model';
|
|||
import { User } from '../user.model';
|
||||
import { UserService } from '../user.service';
|
||||
import { FullnodeService } from '../fullnode.service';
|
||||
import { SearchOptionsPipe } from '../searchoptions.pipe';
|
||||
import { ScanComponent } from '../scan/scan.component';
|
||||
import { TermsComponent } from '../terms/terms.component';
|
||||
|
||||
|
@ -26,16 +24,20 @@ export class BusinessComponent implements OnInit {
|
|||
@ViewChild('stepper', { static: false}) stepper: MatStepper|undefined;
|
||||
intervalHolder: any;
|
||||
nodeAddress: string = '';
|
||||
zecPrice: number = 1;
|
||||
tickets = [
|
||||
{
|
||||
value: 0.005,
|
||||
viewValue: '1 day: 0.005 ZEC'
|
||||
value: 1,
|
||||
viewValue: '1 day: USD $1'
|
||||
},{
|
||||
value: 0.025,
|
||||
viewValue: '1 week: 0.025 ZEC'
|
||||
value: 6,
|
||||
viewValue: '1 week: USD $6'
|
||||
},{
|
||||
value: 0.1,
|
||||
viewValue: '1 month: 0.1 ZEC'
|
||||
value: 22,
|
||||
viewValue: '1 month: USD $22'
|
||||
},{
|
||||
value: 30,
|
||||
viewValue: '1 month Pro: USD $30'
|
||||
}
|
||||
];
|
||||
bizForm: UntypedFormGroup;
|
||||
|
@ -73,6 +75,7 @@ export class BusinessComponent implements OnInit {
|
|||
public ownerUpdate: Observable<Owner>;
|
||||
public addrUpdate: Observable<string>;
|
||||
public userUpdate: Observable<User>;
|
||||
public priceUpdate: Observable<number>;
|
||||
sessionId = '';
|
||||
ownerKnown = false;
|
||||
termsChecked = false;
|
||||
|
@ -84,6 +87,10 @@ export class BusinessComponent implements OnInit {
|
|||
private dialog: MatDialog,
|
||||
private router: Router
|
||||
) {
|
||||
this.priceUpdate = fullnodeService.priceUpdate;
|
||||
this.priceUpdate.subscribe(priceInfo => {
|
||||
this.zecPrice = priceInfo;
|
||||
});
|
||||
this.countriesUpdate = userService.countriesUpdate;
|
||||
this.ownerUpdate = userService.ownerUpdate;
|
||||
this.userUpdate = userService.userUpdate;
|
||||
|
@ -187,7 +194,7 @@ export class BusinessComponent implements OnInit {
|
|||
dialogConfig.disableClose = true;
|
||||
dialogConfig.autoFocus = true;
|
||||
dialogConfig.data = {
|
||||
totalZec: this.payForm.get('session')!.value,
|
||||
totalZec: (this.payForm.get('session')!.value)/this.zecPrice,
|
||||
addr: this.nodeAddress,
|
||||
session: this.sessionId,
|
||||
pay: true
|
||||
|
|
Loading…
Reference in a new issue