fix(price-trigger): SMS-only alerts in ghatreh user app

Match khaneghi_user price trigger SMS-only behavior and UI copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-19 19:02:46 +03:30
co-authored by Cursor
parent 47ac13b114
commit 66807fca8d
3 changed files with 5 additions and 26 deletions
@@ -11,10 +11,6 @@
<span class="dptr-card__label">جهت قیمت:</span>
<span class="dptr-card__value">{{ returnPriceCondition(item.price_condition) }}</span>
</div>
<div class="dptr-card__row">
<span class="dptr-card__label">نوع هشدار:</span>
<span class="dptr-card__value">{{ returnAction(item.action) }}</span>
</div>
</div>
<div class="dptr-card__actions">
@@ -82,7 +78,6 @@
<div class="flex flex-col gap-2 mt-2">
<BasicInfoItem is-line title="محصول" :value="productTitle" />
<BasicInfoItem is-line title="جهت قیمت" :value="returnPriceCondition(item.price_condition)" />
<BasicInfoItem is-line title="نوع هشدار" :value="returnAction(item.action)" />
</div>
<a-divider class="!my-3" />
<div class="flex justify-between mt-1">
@@ -143,10 +138,10 @@ onMounted(() => {
isActive.value = props.item.is_active
})
function changeActive(val: boolean) {
async function changeActive(val: boolean) {
try {
loading.value = true
updatePriceTrigger(props?.item.id, { is_active: val })
await updatePriceTrigger(props?.item.id, { is_active: val })
} catch (e) {
console.log(e)
isActive.value = !isActive.value
@@ -178,15 +173,4 @@ async function deleteItem() {
deleteLoading.value = false
}
}
function returnAction(val: string) {
switch (val) {
case 'sms':
return 'پیامک'
case 'email':
return 'ایمیل'
case 'notify':
return 'نوتیفیکیشن'
}
}
</script>