fix(products): add product_cover_image_id to schema and type definitions
This commit is contained in:
parent
3d437aeb53
commit
de5ab3c476
|
|
@ -28,3 +28,4 @@ export const useUpdatePaymentCard = () => {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,3 +17,4 @@ export interface UpdatePaymentCardResponse {
|
|||
success?: boolean;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,3 +19,4 @@ export const updatePaymentCard = async (
|
|||
return response.data;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,3 +32,4 @@ export const useUpdateIPGStatus = () => {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,3 +27,4 @@ export const IPG_LABELS: Record<IPGType, string> = {
|
|||
zarinpal: "زرینپال",
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,3 +19,4 @@ export const updateIPGStatus = async (
|
|||
return response.data;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -147,3 +147,4 @@ const IPGListPage = () => {
|
|||
|
||||
export default IPGListPage;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ export interface ProductFormData {
|
|||
variants: ProductVariantFormData[];
|
||||
explorer_file_ids?: ProductImage[];
|
||||
is_delete_latest_explorer_files?: boolean;
|
||||
product_cover_image_id?: string;
|
||||
}
|
||||
|
||||
export interface ProductVariantFormData {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ const productSchema = yup.object({
|
|||
variants: yup.array().default([]),
|
||||
explorer_file_ids: yup.array().of(yup.object()).default([]),
|
||||
is_delete_latest_explorer_files: yup.boolean().optional(),
|
||||
product_cover_image_id: yup.string().optional(),
|
||||
});
|
||||
|
||||
const toPublicUrl = (img: any): ProductImage => {
|
||||
|
|
@ -152,7 +153,7 @@ const ProductFormPage = () => {
|
|||
});
|
||||
|
||||
const formValues = watch();
|
||||
const coverId = watch('product_cover_image_id');
|
||||
const coverId = watch('product_cover_image_id') as string | undefined;
|
||||
|
||||
useEffect(() => {
|
||||
if (isEdit && product) {
|
||||
|
|
|
|||
|
|
@ -28,3 +28,4 @@ export const useUpdateWalletStatus = () => {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,3 +24,4 @@ export const WALLET_LABELS: Record<WalletType, string> = {
|
|||
rial: "کیف پول (ریال)",
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,3 +19,4 @@ export const updateWalletStatus = async (
|
|||
return response.data;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -147,3 +147,4 @@ const WalletListPage = () => {
|
|||
|
||||
export default WalletListPage;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue