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