Bill change should be working
Reduce quantity should be working.
This commit is contained in:
1 parent
73f83f1aa7
commit
b7f382cac8
52 files changed
+283
-641
No files matched your search
@@ -2,6 +2,8 @@ import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
|
||||
import { MathService } from '../../shared/math.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-quantity',
|
||||
templateUrl: './quantity.component.html',
|
||||
@@ -14,6 +16,7 @@ export class QuantityComponent implements OnInit {
|
||||
public dialogRef: MatDialogRef<QuantityComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: number,
|
||||
private fb: FormBuilder,
|
||||
private math: MathService,
|
||||
) {
|
||||
this.createForm();
|
||||
}
|
||||
@@ -31,7 +34,7 @@ export class QuantityComponent implements OnInit {
|
||||
}
|
||||
|
||||
accept(): void {
|
||||
const { quantity } = this.form.value;
|
||||
const quantity = this.math.parseAmount(this.form.value.quantity);
|
||||
this.dialogRef.close(quantity);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user