fix some bugs
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
<div v-if="item.order" :class="variant === 'desktop' ? 'dtxn-detail__row' : 'flex justify-between mb-3'">
|
||||
<div :class="variant === 'desktop' ? 'dtxn-detail__label' : 'text-primary'">
|
||||
{{ getTransactionTradePriceLabel(item.wallet?.product) }} حین معامله:
|
||||
{{ getTransactionTradePriceLabel(tradeProduct) }} حین معامله:
|
||||
</div>
|
||||
<div :class="['flex text-xs items-center number-ltr', variant === 'desktop' ? 'dtxn-detail__value' : '']">
|
||||
<div class="text-base ml-1">{{ usePriceWithoutType(item.order?.price ?? 0) }}</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<div :class="variant === 'desktop' ? 'dtxn-detail__row' : 'flex justify-between mb-3'">
|
||||
<div :class="variant === 'desktop' ? 'dtxn-detail__label' : 'text-primary'">
|
||||
مقدار {{ item.wallet?.product ? item.wallet.product.title : getMeltedGoldTradeLabel() }} مبادله شده:
|
||||
مقدار {{ tradeProductLabel }} مبادله شده:
|
||||
</div>
|
||||
<div
|
||||
:class="[
|
||||
@@ -38,10 +38,10 @@
|
||||
{{ item.unit }}
|
||||
</div>
|
||||
<div
|
||||
v-if="shouldShowTransactionTotalWeightLine(item.wallet?.product)"
|
||||
v-if="shouldShowTransactionTotalWeightLine(tradeProduct)"
|
||||
class="text-gray-500"
|
||||
>
|
||||
{{ getProductTotalWeightLabel(Math.abs(item.gold ?? 0), item.wallet?.product) }}
|
||||
{{ getProductTotalWeightLabel(Math.abs(item.gold ?? 0), tradeProduct) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -107,6 +107,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { formatGoldAmount, usePriceWithoutType } from '@/utils/usePrice'
|
||||
import type { Transaction } from '@/models/transaction'
|
||||
import {
|
||||
@@ -118,15 +119,21 @@ import {
|
||||
getProductUnitWeightLabel,
|
||||
getTransactionTradePriceLabel,
|
||||
getWeightUnit,
|
||||
resolveTransactionTradeProduct,
|
||||
shouldShowTransactionTotalWeightLine,
|
||||
} from '@/utils/productDealMethod'
|
||||
import { toJalaliNotime, toTime } from '@/utils/useDateTime'
|
||||
|
||||
withDefaults(
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
item: Transaction
|
||||
variant?: 'mobile' | 'desktop'
|
||||
}>(),
|
||||
{ variant: 'mobile' },
|
||||
)
|
||||
|
||||
const tradeProduct = computed(() => resolveTransactionTradeProduct(props.item))
|
||||
const tradeProductLabel = computed(
|
||||
() => (tradeProduct.value?.title ?? '').trim() || getMeltedGoldTradeLabel(),
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import pkg from '../../../../../package.json'
|
||||
import { getDisplayAppVersion } from '@/config/config-cache'
|
||||
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import { useConfigStore } from '@/store/configStore'
|
||||
import {
|
||||
@@ -54,7 +55,7 @@ const config = useConfigStore()
|
||||
const isBoursecu = isBoursecuProject()
|
||||
const isSoroushgold = isSoroushgoldProject()
|
||||
const hasCustomLayout = hasCustomLoginLogoLayout() || isSoroushgold
|
||||
const version = pkg.version
|
||||
const version = getDisplayAppVersion(pkg.version)
|
||||
|
||||
const logo = computed(() => getProjectDesktopLoginBrandLogo(config.config?.avatar))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user