diff --git a/src/components/_admin/subCategories/categoryList.jsx b/src/components/_admin/subCategories/categoryList.jsx index eca1758..9e5e86f 100644 --- a/src/components/_admin/subCategories/categoryList.jsx +++ b/src/components/_admin/subCategories/categoryList.jsx @@ -15,7 +15,6 @@ import SubCategory from 'src/components/table/rows/subCategory'; const TABLE_HEAD = [ { id: 'name', label: 'Category', alignRight: false, sort: true }, - { id: 'description', label: 'Description', alignRight: false }, { id: 'status', label: 'Status', alignRight: false }, { id: 'createdAt', label: 'Date', alignRight: false, sort: true }, { id: '', label: 'Actions', alignRight: true } diff --git a/src/components/forms/product.jsx b/src/components/forms/product.jsx index c1fafbb..2216855 100644 --- a/src/components/forms/product.jsx +++ b/src/components/forms/product.jsx @@ -79,6 +79,11 @@ export default function ProductForm({ } } ); + + useEffect(() => { + console.log('currentProduct', currentProduct) + }, [currentProduct]) + const NewProductSchema = Yup.object().shape({ name: Yup.string().required('Product name is required'), code: Yup.string().required('Product code is required'), @@ -117,9 +122,9 @@ export default function ProductForm({ brand: currentProduct?.brand || brands[0]?._id || 'brand', tags: currentProduct?.tags || [], gender: currentProduct?.gender || '', - category: currentProduct?.category || (categories.length && categories[0]?._id) || '', + category: currentProduct?.category || '', shop: isVendor ? null : currentProduct?.shop || (shops?.length && shops[0]?._id) || '', - subCategory: currentProduct?.subCategory || (categories.length && categories[0].subCategories[0]?._id) || '', + subCategory: currentProduct?.subCategory || '', status: currentProduct?.status || STATUS_OPTIONS[0], blob: currentProduct?.blob || [], isFeatured: currentProduct?.isFeatured || true, @@ -208,10 +213,6 @@ export default function ProductForm({ formik.handleChange(event); // handle the change in formik }; - useEffect(() => { - console.log('this Value', values) - }, [values]) - return ( diff --git a/src/components/forms/subCategory.jsx b/src/components/forms/subCategory.jsx index 9eab0e8..c7f614b 100644 --- a/src/components/forms/subCategory.jsx +++ b/src/components/forms/subCategory.jsx @@ -109,7 +109,7 @@ export default function SubCategoryForm({ file: currentCategory?.cover || '', slug: currentCategory?.slug || '', status: currentCategory?.status || STATUS_OPTIONS[0], - parentCategory: currentCategory?.parentCategory || (categories && categories[0]?._id) || '' + parentCategory: currentCategory?.parentCategory || '' }, enableReinitialize: true, validationSchema: NewCategorySchema, diff --git a/src/components/table/rows/subCategory.jsx b/src/components/table/rows/subCategory.jsx index 6272057..4726797 100644 --- a/src/components/table/rows/subCategory.jsx +++ b/src/components/table/rows/subCategory.jsx @@ -46,6 +46,7 @@ const ThumbImgStyle = styled(Box)(({ theme }) => ({ export default function Category({ isLoading, row, handleClickOpen }) { const router = useRouter(); const theme = useTheme(); + return ( @@ -64,7 +65,6 @@ export default function Category({ isLoading, row, handleClickOpen }) { fill alt={row?.name} src={row?.cover?.url} - blurDataURL={row?.cover.blurDataURL} objectFit="cover" /> @@ -75,7 +75,7 @@ export default function Category({ isLoading, row, handleClickOpen }) { - {isLoading ? : row.description.slice(0, 50)} + {/* {row.parentCategory} */} {isLoading ? ( diff --git a/src/components/upload/UploadMultiFile.jsx b/src/components/upload/UploadMultiFile.jsx index 2e1fafb..92791af 100644 --- a/src/components/upload/UploadMultiFile.jsx +++ b/src/components/upload/UploadMultiFile.jsx @@ -105,13 +105,13 @@ export default function UploadMultiFile({ onAnnotationsChange, ...props }) { // 바운딩 박스 ctx.strokeStyle = 'red'; - ctx.lineWidth = 2; - ctx.strokeRect(x, y, width, height); + ctx.lineWidth = 1; + ctx.strokeRect(x - 50, y - 80, width, height); // 라벨 ctx.fillStyle = 'red'; ctx.font = '16px Arial'; - ctx.fillText(`${label} (${(confidence * 100).toFixed(2)}%)`, x, y > 10 ? y - 5 : 10); + ctx.fillText(`${label} (${(confidence * 100).toFixed(2)}%)`, x - 50, y - 80 > 10 ? y - 5 : 10); }); } } catch (error) {