change food item type

This commit is contained in:
hamid zarghami
2026-06-03 14:59:47 +03:30
parent ce1a4ea7a8
commit b9608cd486
8 changed files with 316 additions and 312 deletions
+2 -16
View File
@@ -24,32 +24,18 @@ function FavoritePage() {
// تبدیل FavoriteFood به Food برای استفاده در MenuItem
const food: Food = {
id: favoriteFood.id,
createdAt: favoriteFood.createdAt,
updatedAt: favoriteFood.updatedAt,
deletedAt: favoriteFood.deletedAt,
restaurant: favoriteFood.restaurant as unknown as Food['restaurant'],
category: favoriteFood.category as unknown as Food['category'],
inventory: {} as Food['inventory'],
category: favoriteFood.category,
title: favoriteFood.title,
desc: favoriteFood.desc,
content: favoriteFood.content,
price: favoriteFood.price,
order: favoriteFood.order,
prepareTime: favoriteFood.prepareTime,
weekDays: favoriteFood.weekDays,
mealTypes: favoriteFood.mealTypes,
prepareTime: favoriteFood.prepareTime ?? 0,
isActive: favoriteFood.isActive,
images: favoriteFood.images,
inPlaceServe: favoriteFood.inPlaceServe,
pickupServe: favoriteFood.pickupServe,
score: favoriteFood.score,
discount: favoriteFood.discount,
isSpecialOffer: favoriteFood.isSpecialOffer,
reviews: [],
favorites: [],
isFavorite: true,
name: favoriteFood.title,
description: favoriteFood.desc,
}
return food
})