Add data handling for transactions and stocks
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
[(ngModel)]="data.price"
|
||||
required
|
||||
#price="ngModel"
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group footer-buttons">
|
||||
|
||||
@@ -24,14 +24,14 @@ export class UserDialogComponent implements OnInit {
|
||||
ngOnInit(): void {}
|
||||
|
||||
onSubmit() {
|
||||
console.log(this.data);
|
||||
//TODO check tat price is decimal
|
||||
console.log(
|
||||
this.dataService
|
||||
.createTransaction(
|
||||
this.data.symbol,
|
||||
this.data.time,
|
||||
this.data.count,
|
||||
this.data.price
|
||||
+this.data.count,
|
||||
+this.data.price.toFixed(2)
|
||||
)
|
||||
.subscribe((data) => {
|
||||
console.log(data);
|
||||
|
||||
Reference in New Issue
Block a user