|
@ -18,23 +18,26 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
export default { |
|
|
export default { |
|
|
propS: ["seats", "classType", "personCount", ], |
|
|
|
|
|
|
|
|
propS: ["seats", "classType", "personCount", "Value" ], |
|
|
data: function() { |
|
|
data: function() { |
|
|
return { |
|
|
return { |
|
|
chosenSeats: [], |
|
|
|
|
|
|
|
|
chosenSeats: this.Value, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
addSeatClick: function(seat) { |
|
|
addSeatClick: function(seat) { |
|
|
if (this.chosenSeats.length < this.personCount) { |
|
|
if (this.chosenSeats.length < this.personCount) { |
|
|
this.chosenSeats.push(seat); |
|
|
this.chosenSeats.push(seat); |
|
|
|
|
|
this.$emit("input", this.chosenSeats); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
alert("Všichni cestující již sedí!"); |
|
|
alert("Všichni cestující již sedí!"); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
watch: function(Value){ |
|
|
|
|
|
this.chosenSeats = Value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|