Fix: Modifier Categories was not showing the names of Menu Categories in Modifier Category Detail Component. This was because the Menu Category Link had only the id field.
Took this time to improve the Modifier route.
This commit is contained in:
@@ -53,7 +53,7 @@ export class ModifierDetailComponent implements OnInit, AfterViewInit {
|
||||
showInBill: this.item.showInBill,
|
||||
price: this.item.price || '',
|
||||
isActive: this.item.isActive,
|
||||
modifierCategory: this.item.modifierCategory.id ? this.item.modifierCategory.id : '',
|
||||
modifierCategory: this.item.modifierCategory ? (this.item.modifierCategory.id as string) : '',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export class ModifierDetailComponent implements OnInit, AfterViewInit {
|
||||
this.item.showInBill = formModel.showInBill;
|
||||
this.item.price = +formModel.price;
|
||||
this.item.isActive = formModel.isActive;
|
||||
this.item.modifierCategory.id = formModel.modifierCategory;
|
||||
this.item.modifierCategory = new ModifierCategory({ id: formModel.modifierCategory });
|
||||
return this.item;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user