Struggling to manage a complex v-if statement within the template as it's becoming overwhelming.
After moving the statement into a computed property, an error occurs during evaluation. Any suggestions?
<div v-for="offer in offers" class="grid-4 item hotel hotel-item" v-if="showOffer">
<!-- OFFER CONTENT HERE -->
</div>
computed: {
showOffer() {
return (offer.island === filters.islandFilter || filters.islandFilter === 'All') &&
(offer.starrating === filters.starRating || filters.starRating === 'All') &&
(offer.board === filters.boardBasis || filters.boardBasis === 'All') &&
(offer.duration === filters.duration || filters.duration === 'All') &&
(offer.price.from < filters.price)
}
}
Attempting to filter and display offers that meet the V-if conditions.