Not working - Owner config data form in progress

This commit is contained in:
Rene V. Vergara A. 2022-07-18 18:41:31 -05:00
parent b8ebfa07d7
commit 8454d43981
4 changed files with 30 additions and 12 deletions

View file

@ -13,10 +13,11 @@ img.icon{
.noOrderMsg { .noOrderMsg {
font-family: Roboto Mono; font-family: Roboto Mono;
font-size: 14px; font-size: 20px;
font-weight: 700; font-weight: 700;
margin-top: 5px; margin: 10px;
align-items: center; align-items: center;
text-align: center;
} }
.newOrder { .newOrder {
@ -72,3 +73,12 @@ img.icon{
cursor: pointer; cursor: pointer;
margin: auto; margin: auto;
} }
.availableItems{
background: lightblue;
font-family: Roboto Mono;
font-size: 18px;
font-weight: 700;
text-align: left;
margin: 5px;
}

View file

@ -123,11 +123,7 @@
--> -->
</div> </div>
</mat-card> </mat-card>
<div style="font-family: Roboto Mono; <div class="availableItems" >
font-size: 18px;
font-weight: 700;
margin-left: 10px;
margin-top: 5px;" >
Available Items: Available Items:
</div> </div>

View file

@ -16,6 +16,13 @@
<mat-slide-toggle formControlName="useZats" (change)="onChange($event)"> <mat-slide-toggle formControlName="useZats" (change)="onChange($event)">
Display Zcash amount in zatoshis? Display Zcash amount in zatoshis?
</mat-slide-toggle> </mat-slide-toggle>
<mat-slide-toggle formControlName="VkeyOn" (change)="onChangeVKeyOn($event)">
Activate payment confirmation?
</mat-slide-toggle>
<mat-form-field appearance="outline">
<mat-label>Viewing key</mat-label>
<input matInput placeholder="Viewing Key" formControlName="vKey">
</mat-form-field>
</mat-dialog-content> </mat-dialog-content>
<mat-dialog-actions> <mat-dialog-actions>

View file

@ -2,8 +2,8 @@ import { Inject, Component, OnInit, OnDestroy, ViewEncapsulation } from '@angula
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSlideToggleChange } from '@angular/material/slide-toggle'; import { MatSlideToggleChange } from '@angular/material/slide-toggle';
import { UntypedFormBuilder, Validators, UntypedFormGroup, FormControl } from '@angular/forms'; import { UntypedFormBuilder, Validators, UntypedFormGroup, FormControl } from '@angular/forms';
import {User} from '../user.model'; import { User } from '../user.model';
import {Owner} from '../owner.model'; import { Owner } from '../owner.model';
@Component({ @Component({
selector: 'app-settings', selector: 'app-settings',
@ -44,7 +44,8 @@ export class SettingsComponent implements OnInit {
this.settingsForm = fb.group({ this.settingsForm = fb.group({
name: [data.name, Validators.required], name: [data.name, Validators.required],
currency: [data.currency, Validators.required], currency: [data.currency, Validators.required],
useZats: [data.zats, Validators.required] useZats: [data.zats, Validators.required],
VkeyOn: [data.]
}); });
this.owner = data; this.owner = data;
} }
@ -66,4 +67,8 @@ export class SettingsComponent implements OnInit {
onChange(ob: MatSlideToggleChange) { onChange(ob: MatSlideToggleChange) {
this.useZats = ob.checked; this.useZats = ob.checked;
} }
onChangeVKeyOn(ob: MatSlideToggleChange) {
console.log("Viewing key switch is " + ( ob.checked ? "[ON]." : "[OFF].") );
}
} }