Show greater price alerts above the product name and smaller ones below.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,11 +3,15 @@
|
||||
<p class="dptr-card__price">{{ usePrice(item.target_price) }}</p>
|
||||
|
||||
<div class="dptr-card__meta">
|
||||
<div v-if="isGreater" class="dptr-card__row">
|
||||
<span class="dptr-card__label">جهت قیمت:</span>
|
||||
<span class="dptr-card__value">بزرگتر</span>
|
||||
</div>
|
||||
<div class="dptr-card__row">
|
||||
<span class="dptr-card__label">محصول:</span>
|
||||
<span class="dptr-card__value">{{ productTitle }}</span>
|
||||
</div>
|
||||
<div class="dptr-card__row">
|
||||
<div v-if="!isGreater" class="dptr-card__row">
|
||||
<span class="dptr-card__label">جهت قیمت:</span>
|
||||
<span class="dptr-card__value">{{ returnPriceCondition(item.price_condition) }}</span>
|
||||
</div>
|
||||
@@ -76,8 +80,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 mt-2">
|
||||
<BasicInfoItem v-if="isGreater" is-line title="جهت قیمت" value="بزرگتر" />
|
||||
<BasicInfoItem is-line title="محصول" :value="productTitle" />
|
||||
<BasicInfoItem is-line title="جهت قیمت" :value="returnPriceCondition(item.price_condition)" />
|
||||
<BasicInfoItem
|
||||
v-if="!isGreater"
|
||||
is-line
|
||||
title="جهت قیمت"
|
||||
:value="returnPriceCondition(item.price_condition)"
|
||||
/>
|
||||
</div>
|
||||
<a-divider class="!my-3" />
|
||||
<div class="flex justify-between mt-1">
|
||||
@@ -133,6 +143,7 @@ const props = withDefaults(
|
||||
const emits = defineEmits(['edit', 'refresh'])
|
||||
|
||||
const productTitle = computed(() => props.item.product?.title || 'طلا')
|
||||
const isGreater = computed(() => props.item.price_condition === '>')
|
||||
|
||||
onMounted(() => {
|
||||
isActive.value = props.item.is_active
|
||||
|
||||
Reference in New Issue
Block a user