Fixed error with code to check product
This commit is contained in:
@@ -55,12 +55,12 @@ export class AddProductSupplierForm implements OnInit {
|
||||
addProductToForm(selectedProducts: GetProductDto[]) {
|
||||
this.lines.clear();
|
||||
|
||||
selectedProducts.forEach(p => {
|
||||
selectedProducts.forEach(x => {
|
||||
this.lines.push(
|
||||
new FormGroup({
|
||||
productId: new FormControl(p.id),
|
||||
name: new FormControl(p.name),
|
||||
price: new FormControl(1, [Validators.required,Validators.min(0)])
|
||||
productId: new FormControl(x.id),
|
||||
name: new FormControl(x.name),
|
||||
price: new FormControl(0, [Validators.required,Validators.min(0)])
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user