Merge branch 'develop' into feature/stimulus
This commit is contained in:
+22
-10
@@ -36,13 +36,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group" v-show="boards.length > 0 && !submitted">
|
<div class="form-group" v-show="boards.length > 0 && !submitted">
|
||||||
<label>Optionale Verpflegungsleistungen</label>
|
<label>Optionale Verpflegungsleistungen</label>
|
||||||
<select class="form-control" v-model="selectedBoard" v-if="selectedPax >= 30">
|
<select class="form-control" v-model="selectedBoard" v-if="totalPax >= 30">
|
||||||
<option :value="null">Keine Auswahl</option>
|
<option :value="null">Keine Auswahl</option>
|
||||||
<option v-for="board of boards" :value="board" :key="board.uid">{{ board.title }}
|
<option v-for="board of boards" :value="board" :key="board.uid">{{ board.title }}
|
||||||
({{ formatCurrency(board.price) }} pro Person und Nacht)
|
({{ formatCurrency(board.price) }} pro Person und Nacht)
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<div v-show="selectedPax < 30">
|
<div v-show="totalPax < 30">
|
||||||
<span class="label label-warning">Erst ab 30 Personen buchbar.</span>
|
<span class="label label-warning">Erst ab 30 Personen buchbar.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -170,7 +170,20 @@ export default {
|
|||||||
optionsJson: {
|
optionsJson: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
}
|
},
|
||||||
|
runningCostsFactor: {
|
||||||
|
type: Number,
|
||||||
|
default: 1.7,
|
||||||
|
},
|
||||||
|
shortTermFactors: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {
|
||||||
|
2: 0.2,
|
||||||
|
3: 0.1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -242,7 +255,7 @@ export default {
|
|||||||
this.selectedRange = range;
|
this.selectedRange = range;
|
||||||
},
|
},
|
||||||
onPaxUpdated() {
|
onPaxUpdated() {
|
||||||
if (this.selectedPax < 30) {
|
if (this.totalPax < 30) {
|
||||||
this.selectedBoard = null;
|
this.selectedBoard = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -373,11 +386,10 @@ export default {
|
|||||||
priceShortTerm() {
|
priceShortTerm() {
|
||||||
let price = 0;
|
let price = 0;
|
||||||
const totalPricePax = (this.pricePax.base + this.pricePax.additional);
|
const totalPricePax = (this.pricePax.base + this.pricePax.additional);
|
||||||
if (2 === this.nightsCount) {
|
for (let [nights, factor] of Object.entries(this.shortTermFactors)) {
|
||||||
price = totalPricePax * 0.2;
|
if (nights === this.nightsCount) {
|
||||||
}
|
price = totalPricePax * factor;
|
||||||
if (3 === this.nightsCount) {
|
}
|
||||||
price = totalPricePax * 0.1;
|
|
||||||
}
|
}
|
||||||
return price;
|
return price;
|
||||||
},
|
},
|
||||||
@@ -385,7 +397,7 @@ export default {
|
|||||||
if (this.selectedBoard) {
|
if (this.selectedBoard) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return this.nightsCount * this.totalPax * 1.7;
|
return this.nightsCount * this.totalPax * this.runningCostsFactor;
|
||||||
},
|
},
|
||||||
priceTotal() {
|
priceTotal() {
|
||||||
return this.pricePax.base + this.pricePax.additional + this.priceOptions
|
return this.pricePax.base + this.pricePax.additional + this.priceOptions
|
||||||
|
|||||||
Reference in New Issue
Block a user