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:
2020-11-25 12:38:22 +05:30
parent d9e0397b21
commit e16e1822b8
9 changed files with 57 additions and 45 deletions
@@ -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;
}
}