Unify offers UI to OfferResultCard and require price
All checks were successful
Build Docker Image / build (push) Successful in 5m59s

This commit is contained in:
Ruslan Bakiev
2026-02-05 19:12:39 +07:00
parent beb02bd3fc
commit 0f0b1db394
6 changed files with 58 additions and 144 deletions

View File

@@ -14,14 +14,14 @@
<span class="loading loading-spinner loading-md text-white" />
</div>
<div v-else-if="offers.length === 0" class="text-center py-8 text-white/60">
<div v-else-if="offersWithPrice.length === 0" class="text-center py-8 text-white/60">
<Icon name="lucide:search-x" size="32" class="mb-2" />
<p>{{ $t('catalog.empty.noOffers') }}</p>
</div>
<div v-else class="flex flex-col gap-2">
<div
v-for="offer in offers"
v-for="offer in offersWithPrice"
:key="offer.uuid"
class="cursor-pointer"
@click="emit('select-offer', offer)"
@@ -54,12 +54,16 @@ interface Offer {
locationCountryCode?: string | null
}
defineProps<{
const emit = defineEmits<{
'select-offer': [offer: Offer]
}>()
const props = defineProps<{
loading: boolean
offers: Offer[]
}>()
const emit = defineEmits<{
'select-offer': [offer: Offer]
}>()
const offersWithPrice = computed(() =>
(props.offers || []).filter(o => o?.pricePerUnit != null)
)
</script>