fix daily stock
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user