fix daily stock

This commit is contained in:
hamid zarghami
2025-12-24 09:59:04 +03:30
parent bf8daf5fa1
commit f0d5082723
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ const UpdateFood: FC = () => {
isActive: food.isActive || false,
images: food.images || [],
isSpecialOffer: food.isSpecialOffer || false,
dailyStock: food.dailyStock || 0
dailyStock: food.inventory?.totalStock || 0
})
setIsActive(food.isActive || false)
setIsSpecial(food.isSpecialOffer || false)
+3 -4
View File
@@ -93,23 +93,22 @@ export type FoodDetails = {
deletedAt: string | null;
restaurant: string;
category: FoodDetailsCategory;
inventory: Inventory | null;
inventory: Inventory;
title: string;
desc: string;
content: string[];
price: number;
order: number | null;
prepareTime: number | null;
prepareTime: number;
weekDays: number[];
mealTypes: string[];
isActive: boolean;
images: string[];
inPlaceServe: boolean;
pickupServe: boolean;
score: number | null;
score: number;
discount: number;
isSpecialOffer: boolean;
dailyStock?: number;
};
export type PaginationMeta = {