WIP Implement price calculation and frontend
This commit is contained in:
+27
-1
@@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
Foo!
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
import $ from 'jquery';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -17,11 +18,36 @@
|
||||
data () {
|
||||
return {
|
||||
processing: false,
|
||||
price: {},
|
||||
configs: [],
|
||||
boards: [],
|
||||
options: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
load () {
|
||||
this.processing = true;
|
||||
axios({
|
||||
url: this.endpoint,
|
||||
method: 'POST',
|
||||
data: $.param({
|
||||
'tx_epproducts_ajax[pax]': 60,
|
||||
'tx_epproducts_ajax[dateFrom]': '2020-04-28',
|
||||
'tx_epproducts_ajax[dateTo]': '2020-04-31'
|
||||
})
|
||||
}).then(response => {
|
||||
this.configs = response.data.configs;
|
||||
this.boards = response.data.boards;
|
||||
this.options = response.data.options;
|
||||
this.price = response.data.price;
|
||||
}).catch(error => {
|
||||
}).finally(() => {
|
||||
this.processing = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.load();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+1
-2
@@ -11,7 +11,6 @@
|
||||
import DaterangeSelect from './DaterangeSelect.vue'
|
||||
import AjaxContent from './AjaxContent.vue'
|
||||
import Calendar from './Calendar.vue'
|
||||
import GroupsPriceCalculator from './GroupsPriceCalculator.vue';
|
||||
import FacebookPixel from './FacebookPixel.vue'
|
||||
import WatchlistToggle from './WatchlistToggle.vue'
|
||||
import OsmMap from './OsmMap.vue'
|
||||
@@ -29,7 +28,7 @@
|
||||
DaterangeSelect,
|
||||
AjaxContent,
|
||||
Calendar,
|
||||
GroupsPriceCalculator,
|
||||
GroupsPriceCalculator: () => import('./GroupsPriceCalculator.vue'),
|
||||
FacebookPixel,
|
||||
WatchlistToggle,
|
||||
OsmMap,
|
||||
|
||||
@@ -87,6 +87,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden-xs">
|
||||
<f:comment>
|
||||
<f:if condition="{product.calendarHotel}">
|
||||
<groups-price-calculator
|
||||
endpoint="{ep:uri.ajax(action: 'index', controller: 'AjaxGroupsPrice', extensionName: 'epproducts', pageUid: settings.defaultAjaxUid, arguments: '{hotel: hotel}')}"
|
||||
></groups-price-calculator>
|
||||
</f:if>
|
||||
</f:comment>
|
||||
<f:render section="Calendar" arguments="{_all}"/>
|
||||
<f:render partial="Facts" arguments="{facts: product.facts}"/>
|
||||
<f:if condition="{product.video}">
|
||||
@@ -248,9 +255,6 @@
|
||||
|
||||
<f:section name="Calendar">
|
||||
<f:if condition="{product.calendarHotel}">
|
||||
<groups-price-calculator
|
||||
endpoint="{ep:uri.ajax(action: 'prices', controller: 'AjaxGroupsPrice', extensionName: 'epproducts', pageUid: settings.defaultAjaxUid, arguments: '{hotel: hotel}')}"
|
||||
></groups-price-calculator>
|
||||
<div class="ep-sidebar ep-facts">
|
||||
<p><strong>Belegungskalender</strong></p>
|
||||
<calendar
|
||||
|
||||
Reference in New Issue
Block a user