added new special code discount input

This commit is contained in:
Mamalizz-dev
2025-11-15 12:51:30 +03:30
parent 6838ccc3b9
commit 2f9e24844a
2 changed files with 74 additions and 71 deletions
+17 -17
View File
@@ -139,16 +139,21 @@ watch(
<span class="font-semibold typo-sub-h-xs lg:typo-sub-h-sm text-slate-600">
{{ data.product.category }}
</span>
<div
v-if="data.discount > 0"
class="text-white bg-blue-500 px-3 lg:px-4 py-1.5 lg:py-2 text-[10px] lg:text-xs rounded-full flex items-center gap-1"
>
<Icon
name="bi:percent"
class="size-4"
/>
{{ data.discount }}
تخفیف
<div class="w-max flex-center gap-2">
<div
v-if="data.discount > 0"
class="text-white bg-blue-500 px-3 lg:px-4 py-1.5 lg:py-2 text-[10px] lg:text-xs rounded-full flex items-center gap-1"
>
{{ data.discount_amount }}
تخفیف
</div>
<div
v-if="!!data.special_discount_amount"
class="text-white bg-green-600 px-3 lg:px-4 py-1.5 lg:py-2 text-[10px] lg:text-xs rounded-full flex items-center gap-1"
>
{{ data.special_discount_amount }}
تخفیف ویژه
</div>
</div>
</div>
@@ -239,12 +244,7 @@ watch(
>
{{ data.price }}
</span>
<span
v-if="data.special_discount_amount"
class="typo-p-xs text-green-600 font-medium"
>
تخفیف ویژه: {{ data.special_discount_amount }}
</span>
<span class="typo-p-xl relative flex-center w-fit font-medium">
{{ data.final_price }}
</span>
@@ -310,7 +310,7 @@ watch(
{{ data.price }}
</span>
<span
v-if="data.special_discount_amount && data.special_discount_amount !== '0 تومان'"
v-if="!!data.special_discount_amount"
class="text-[10px] text-green-600 font-medium"
>
تخفیف ویژه: {{ data.special_discount_amount }}