Merge origin/modular into feature/responsive-layout-refactor.

Keep the responsive layout refactor while bringing in modular updates for support UI, pricing, categories, and config loading.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-14 10:24:43 +03:30
co-authored by Cursor
19 changed files with 523 additions and 97 deletions
+8 -5
View File
@@ -81,14 +81,14 @@
</div>-->
</div>
<div v-else class="font-bold text-xs">
{{ formatCashWalletBalanceText(usePriceWithoutType(walletStore?.walletInfo?.cash ?? 0), props?.ProductItem?.group_type) }}
{{ formatCashWalletBalanceText(usePriceWithoutType(cashWalletBalance), props?.ProductItem?.group_type) }}
</div>
</Transition>
<Transition mode="out-in" name="fade">
<a-form-item v-if="walletStore?.walletInfo" class="!mt-3 ">
<!-- {{ isBuy }}-->
<a-slider v-model:value="form.percentWallet"
:disabled="isBuy? walletStore?.walletInfo?.cash <= 0: false"
:disabled="isBuy? cashWalletBalance <= 0: false"
:max="100"
:min="0"
:step="10"
@@ -133,7 +133,7 @@
({{ productWalletBalance }}{{ weightUnit }}) می باشد.
</div>
<!-- <div>{{form?.goldValue? true: false}}</div>-->
<div v-if="isBuy ? (form?.goldCash > walletStore?.walletInfo?.cash) : false"
<div v-if="isBuy ? (form?.goldCash > cashWalletBalance) : false"
class="text-red-700 text-xs font-bold mt-2">
موجودی کیف پول ناکافی می باشد.
</div>
@@ -297,7 +297,7 @@ import { useFundUserStore } from '@/store/fundStore'
import {useConfigStore} from "@/store/configStore";
import { calcFeeInGrams, loadServiceFeeFromSettings } from '@/utils/serviceFee'
import { formatCashWalletBalanceText, getWeightUnit } from '@/utils/productDealMethod'
import { formatProductWalletBalanceText, getProductInventoryQuantity } from '@/utils/productAssets'
import { formatProductWalletBalanceText, getCashWalletBalance, getProductInventoryQuantity } from '@/utils/productAssets'
import { useWalletAssets } from '@/composables/useWalletAssets'
import { isMeltedTradeGroup } from '@/utils/productCategories'
import { useSettingsStore } from '@/store/settingsStore'
@@ -316,6 +316,9 @@ const { meltedGoldLabel } = storeToRefs(settingsStore)
const weightUnit = computed(() => getWeightUnit())
const fundStore = useFundUserStore()
const { assetsSummary, loadWalletAssets } = useWalletAssets()
const cashWalletBalance = computed(() =>
getCashWalletBalance(walletStore.walletInfo, userStore.userInfo?.wallets)
)
const confirmAction = ref<boolean>(false)
const noCompleteVisible = ref<boolean>(false)
const buyItems = ref<Transaction[]>([])
@@ -576,7 +579,7 @@ function percentChange(val: number) {
const unitGoldCalculator = computed(() => productWalletBalance.value / 100)
const unitCashCalculator = computed(() => {
return (walletStore?.walletInfo?.cash ?? 0) / 100
return cashWalletBalance.value / 100
})
const limitedPrice = computed(() => {