handle huge things!

This commit is contained in:
2026-06-03 22:04:45 +03:30
parent 198f0a164b
commit f82a0c3873
29 changed files with 778 additions and 445 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
import type { Product } from '@/models/products'
import { lastPrice } from '@/utils/price'
import { getTradeBuyPrice, lastPrice } from '@/utils/price'
/** قیمت خرید نمایشی محصول (همان مقداری که در لیست و اکشن‌شیت نشان داده می‌شود) */
export function getProductBuyPrice(product: Product): number {
if (product.group_type === 'آبشده') {
return lastPrice.value?.buy ?? 0
return getTradeBuyPrice(lastPrice.value)
}
if (['مس', 'نقره'].includes(product.group_type)) {