Show flights included on hotel cards
This commit is contained in:
@@ -2304,6 +2304,8 @@
|
|||||||
const amenities = normalizeTextList(selectedPoint?.amenities || opt.automationInsights?.amenities);
|
const amenities = normalizeTextList(selectedPoint?.amenities || opt.automationInsights?.amenities);
|
||||||
const inclusions = normalizeTextList(selectedPoint?.inclusions || opt.automationInsights?.inclusions);
|
const inclusions = normalizeTextList(selectedPoint?.inclusions || opt.automationInsights?.inclusions);
|
||||||
const limitations = normalizeTextList(selectedPoint?.limitations || opt.automationInsights?.limitations);
|
const limitations = normalizeTextList(selectedPoint?.limitations || opt.automationInsights?.limitations);
|
||||||
|
const includedComponents = normalizeTextList(selectedPoint?.includedComponents || opt.automationInsights?.includedComponents);
|
||||||
|
const flightsIncluded = includedComponents.some(item => /flight/i.test(item));
|
||||||
const sourceMetaLine = selectedMeta
|
const sourceMetaLine = selectedMeta
|
||||||
? [formatSourcePrice(selectedMeta) || priceLabel, selectedMeta.pointCount ? `${selectedMeta.pointCount} point${selectedMeta.pointCount === 1 ? '' : 's'}` : '']
|
? [formatSourcePrice(selectedMeta) || priceLabel, selectedMeta.pointCount ? `${selectedMeta.pointCount} point${selectedMeta.pointCount === 1 ? '' : 's'}` : '']
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
@@ -2378,6 +2380,15 @@
|
|||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt.categoryId === 'hotel' && flightsIncluded) {
|
||||||
|
sections.push(`
|
||||||
|
<div class="option-detail-section">
|
||||||
|
<div class="option-detail-title">Flights included</div>
|
||||||
|
${renderTextChips(includedComponents)}
|
||||||
|
</div>
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
|
||||||
if (limitations.length) {
|
if (limitations.length) {
|
||||||
sections.push(`
|
sections.push(`
|
||||||
<div class="option-detail-section">
|
<div class="option-detail-section">
|
||||||
|
|||||||
Reference in New Issue
Block a user