Moved all the schemas into their own logical files.
This commit is contained in:
@ -67,7 +67,7 @@ export class ProductDetailComponent implements OnInit, AfterViewInit {
|
||||
isPurchased: this.item.isPurchased,
|
||||
isSold: this.item.isSold,
|
||||
isActive: this.item.isActive,
|
||||
productGroup: this.item.productGroup.id ? this.item.productGroup.id : '',
|
||||
productGroup: this.item.productGroup ? this.item.productGroup.id : '',
|
||||
});
|
||||
}
|
||||
|
||||
@ -126,6 +126,9 @@ export class ProductDetailComponent implements OnInit, AfterViewInit {
|
||||
this.item.isPurchased = formModel.isPurchased;
|
||||
this.item.isSold = formModel.isSold;
|
||||
this.item.isActive = formModel.isActive;
|
||||
if (this.item.productGroup === undefined) {
|
||||
this.item.productGroup = new ProductGroup();
|
||||
}
|
||||
this.item.productGroup.id = formModel.productGroup;
|
||||
return this.item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user