Fixed error with code to check product

This commit is contained in:
2026-05-26 18:57:41 +01:00
parent 961551e926
commit 14d3d25217
5 changed files with 34 additions and 38 deletions
@@ -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)])
})
);
});