2026-06-14 10:08:46 +03:30
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { computed, inject } from 'vue'
|
|
|
|
|
|
import { useUserStore } from '@/store/userStore'
|
|
|
|
|
|
import { usePriceWithoutType } from '@/utils/usePrice'
|
2026-06-23 16:02:41 +03:30
|
|
|
|
import { isBoursecuProject } from '@/utils/config'
|
2026-06-14 10:08:46 +03:30
|
|
|
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
|
|
|
|
|
import { HOME_PAGE_CONTEXT_KEY } from '../../composables/useHomePage'
|
|
|
|
|
|
|
|
|
|
|
|
const ctx = inject(HOME_PAGE_CONTEXT_KEY)!
|
|
|
|
|
|
const userStore = useUserStore()
|
2026-06-23 16:02:41 +03:30
|
|
|
|
const isBoursecu = isBoursecuProject()
|
2026-06-14 10:08:46 +03:30
|
|
|
|
|
|
|
|
|
|
const showLimitedPrice = computed(
|
|
|
|
|
|
() =>
|
|
|
|
|
|
ctx.limitedPrice.value !== undefined &&
|
|
|
|
|
|
userStore.userInfo?.trade_active !== 1,
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const limitedPriceText = computed(() =>
|
|
|
|
|
|
usePriceWithoutType(Number(ctx.limitedPrice.value?.value ?? 0)),
|
|
|
|
|
|
)
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<div v-if="showLimitedPrice || ctx.showClosedMessage.value" class="dhome-alerts">
|
|
|
|
|
|
<div v-if="showLimitedPrice" class="dhome-alert dhome-alert--warning">
|
|
|
|
|
|
<BasicIcon icon="vuesax-linear:info-circle" size="14" />
|
|
|
|
|
|
<span>
|
|
|
|
|
|
حداقل مبلغ اولیه برای ثبت سفارش {{ limitedPriceText }} ریال میباشد.
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div
|
2026-06-23 16:02:41 +03:30
|
|
|
|
v-if="!isBoursecu && ctx.showClosedMessage.value"
|
2026-06-14 10:08:46 +03:30
|
|
|
|
class="dhome-alert dhome-alert--info"
|
|
|
|
|
|
v-html="ctx.closedMessage.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|