feat: additional age groups in price calculator
closes #86997e7e9, #869979zhq
This commit is contained in:
+51
-4
@@ -43,9 +43,48 @@
|
||||
v-model.number="childrenCount"
|
||||
@change="onPaxUpdated()"
|
||||
v-show="nightsCount > 0"/>
|
||||
<p class="text-sm italic">
|
||||
Kinder werden nur bei Strom- und Abfallgebühren berücksichtigt
|
||||
<p class="text-sm italic"
|
||||
v-show="nightsCount === 0">
|
||||
Bitte zuerst einen Zeitraum wählen
|
||||
</p>
|
||||
<p class="text-sm italic"
|
||||
v-show="nightsCount > 0">
|
||||
Kinder werden nur bei Strom- und Abfallgebühren berücksichtigt.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-2 font-bold">
|
||||
davon Kinder 3-5 Jahre*
|
||||
</label>
|
||||
<input type="number"
|
||||
class="form-field"
|
||||
min="0"
|
||||
v-model.number="childrenCount3to5"
|
||||
@change="onPaxUpdated()"
|
||||
v-show="nightsCount > 0"/>
|
||||
<p class="text-sm italic"
|
||||
v-show="nightsCount === 0">
|
||||
Bitte zuerst einen Zeitraum wählen
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="adolescentsAge > 0">
|
||||
<label class="mb-2 font-bold">
|
||||
davon Kinder 6-{{ adolescentsAge }} Jahre*
|
||||
</label>
|
||||
<input type="number"
|
||||
class="form-field"
|
||||
min="0"
|
||||
v-model.number="adolescentsCount"
|
||||
@change="onPaxUpdated()"
|
||||
v-show="nightsCount > 0"/>
|
||||
<p class="text-sm italic"
|
||||
v-show="nightsCount === 0">
|
||||
Bitte zuerst einen Zeitraum wählen
|
||||
</p>
|
||||
</div>
|
||||
<div class="sm:col-span-2 text-sm">
|
||||
*Die Kosten für Essen und Kurtaxe werden wir entsprechend der Altersstruktur der Gäste in der Rechnung
|
||||
anpassen.
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-8"
|
||||
@@ -395,6 +434,10 @@ export default {
|
||||
type: String,
|
||||
default: 'zzgl. vor Ort zu entrichtender Ortstaxe',
|
||||
},
|
||||
adolescentsAge: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -410,6 +453,8 @@ export default {
|
||||
selectedRange: [],
|
||||
selectedPax: 30,
|
||||
childrenCount: 0,
|
||||
childrenCount3to5: 0,
|
||||
adolescentsCount: 0,
|
||||
selectedOptions: [],
|
||||
selectedBoard: null,
|
||||
name: '',
|
||||
@@ -533,6 +578,8 @@ export default {
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][nights]': this.nightsCount,
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][pax]': this.selectedPax,
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][children]': this.childrenCount,
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][minors]': this.childrenCount3to5,
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][adolescents]': this.adolescentsCount,
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][paxBase]': this.formatCurrency(this.pricePax.base),
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][paxAdditional]': this.formatCurrency(this.pricePax.additional),
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][undersubscription]': this.formatCurrency(this.pricePax.undersubscription),
|
||||
@@ -616,8 +663,8 @@ export default {
|
||||
base.EUR += config.price.EUR
|
||||
base.CHF += config.price.CHF
|
||||
let included = config.personsIncluded
|
||||
let additionalPax = this.paxCount - included
|
||||
if (this.selectedPax > included) {
|
||||
if (this.paxCount > included) {
|
||||
let additionalPax = this.paxCount - included
|
||||
additional.EUR += additionalPax * config.priceAdditionalPerson.EUR
|
||||
additional.CHF += additionalPax * config.priceAdditionalPerson.CHF
|
||||
}
|
||||
|
||||
@@ -70,6 +70,16 @@
|
||||
<th>Anzahl Kinder 0-3 Jahre</th>
|
||||
<td>{children -> v:or(alternative: '-')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Anzahl Kinder 3-5 Jahre</th>
|
||||
<td>{minors -> v:or(alternative: '-')}</td>
|
||||
</tr>
|
||||
<f:if condition="{adolescentsAge}">
|
||||
<tr>
|
||||
<th>Anzahl Kinder 6-{adolescentsAge} Jahre</th>
|
||||
<td>{adolescents -> v:or(alternative: '-')}</td>
|
||||
</tr>
|
||||
</f:if>
|
||||
<tr>
|
||||
<th>Verpflegung</th>
|
||||
<td>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
main-season-from="{mainSeasonFrom}"
|
||||
main-season-to="{mainSeasonTo}"
|
||||
tax-label="{hotel.groupsPriceTaxLabel -> v:or(alternative: 'zzgl. vor Ort zu entrichtender Ortstaxe')}"
|
||||
adolescents-age="{adolescentsAge}"
|
||||
>
|
||||
</groups-price-calculator>
|
||||
</f:format.raw>
|
||||
|
||||
Reference in New Issue
Block a user