api attachment product list + filter

This commit is contained in:
hamid zarghami
2025-09-04 12:44:40 +03:30
parent 40004b50b3
commit 477b42cd31
14 changed files with 952 additions and 128 deletions
+28 -4
View File
@@ -25,13 +25,37 @@ const ProductCard: FC<Props> = ({ item }) => {
<h4 className='line-clamp-2 text-[#383E43] mt-4 sm:mt-6 text-xs sm:text-sm text-center leading-4 sm:leading-5 h-10 sm:h-12'>
{item.title_fa}
</h4>
{/* <div className='flex flex-wrap justify-end items-center gap-1.5 mt-4'>
<div className='flex justify-end items-center gap-1.5 mt-4'>
<div className='size-2 rounded-full bg-red-500'></div>
<div className='size-2 rounded-full bg-red-500'></div>
<div className='size-2 rounded-full bg-red-500'></div>
{
item.variants.map((variant) => {
if (variant.meterage) {
return <div className='text-[10px] px-4 border border-border rounded-lg whitespace-nowrap' key={variant._id}>{variant?.meterage?.value}</div>
}
})
}
</div>
<div className='flex flex-wrap justify-end items-center gap-1.5 mt-4'>
{
item.variants.map((variant) => {
if (variant.color) {
return <div className='text-[10px] px-4 border border-border rounded-lg whitespace-nowrap' key={variant._id}>
<div className='size-2 rounded-full' style={{ backgroundColor: variant?.color?.value }}></div>
</div>
}
})
}
{
item.variants.map((variant) => {
if (variant.size) {
return <div className='text-[10px] px-4 border border-border rounded-lg whitespace-nowrap' key={variant._id}>{variant?.size?.value}</div>
}
})
}
</div> */}
<div className='mt-4 sm:mt-5 text-xs sm:text-sm'>
{NumberFormat(item.default_variant.price.selling_price)} تومان
</div>