Bill change should be working

Reduce quantity should be working.
This commit is contained in:
2020-10-11 20:53:43 +05:30
parent 73f83f1aa7
commit b7f382cac8
52 changed files with 283 additions and 641 deletions

View File

@ -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);
}
}