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, isActive: food.isActive || false,
images: food.images || [], images: food.images || [],
isSpecialOffer: food.isSpecialOffer || false, isSpecialOffer: food.isSpecialOffer || false,
dailyStock: food.dailyStock || 0 dailyStock: food.inventory?.totalStock || 0
}) })
setIsActive(food.isActive || false) setIsActive(food.isActive || false)
setIsSpecial(food.isSpecialOffer || false) setIsSpecial(food.isSpecialOffer || false)
+3 -4
View File
@@ -93,23 +93,22 @@ export type FoodDetails = {
deletedAt: string | null; deletedAt: string | null;
restaurant: string; restaurant: string;
category: FoodDetailsCategory; category: FoodDetailsCategory;
inventory: Inventory | null; inventory: Inventory;
title: string; title: string;
desc: string; desc: string;
content: string[]; content: string[];
price: number; price: number;
order: number | null; order: number | null;
prepareTime: number | null; prepareTime: number;
weekDays: number[]; weekDays: number[];
mealTypes: string[]; mealTypes: string[];
isActive: boolean; isActive: boolean;
images: string[]; images: string[];
inPlaceServe: boolean; inPlaceServe: boolean;
pickupServe: boolean; pickupServe: boolean;
score: number | null; score: number;
discount: number; discount: number;
isSpecialOffer: boolean; isSpecialOffer: boolean;
dailyStock?: number;
}; };
export type PaginationMeta = { export type PaginationMeta = {