fix: properly communicate inquiry type in email and feedback
This commit is contained in:
@@ -68,12 +68,21 @@ class AjaxGroupsPriceController extends ActionController
|
|||||||
*/
|
*/
|
||||||
public function processFormAction(Hotel $hotel, GroupsPriceInquiry $groupsPriceInquiry)
|
public function processFormAction(Hotel $hotel, GroupsPriceInquiry $groupsPriceInquiry)
|
||||||
{
|
{
|
||||||
|
$mode = $groupsPriceInquiry->getMode();
|
||||||
|
|
||||||
|
if (false === in_array($mode, [GroupsPriceInquiry::MODE_BOOKING, GroupsPriceInquiry::MODE_INQUIRY])) {
|
||||||
|
$mode = GroupsPriceInquiry::MODE_BOOKING;
|
||||||
|
}
|
||||||
|
|
||||||
|
$subject = GroupsPriceInquiry::MODE_BOOKING ?
|
||||||
|
'Gruppenhaus Preisberechnung/Buchung' : 'Gruppenhaus Preisberechnung/Anfrage';
|
||||||
|
|
||||||
$emailOptions = [
|
$emailOptions = [
|
||||||
'toEmail' => $this->settings['groupsPriceToEmail'],
|
'toEmail' => $this->settings['groupsPriceToEmail'],
|
||||||
'toName' => $this->settings['groupsPriceToName'],
|
'toName' => $this->settings['groupsPriceToName'],
|
||||||
'fromEmail' => $this->settings['groupsPriceToEmail'],
|
'fromEmail' => $this->settings['groupsPriceToEmail'],
|
||||||
'fromName' => $this->settings['groupsPriceToName'],
|
'fromName' => $this->settings['groupsPriceToName'],
|
||||||
'subject' => 'Gruppenhaus Preisberechnung/Anfrage',
|
'subject' => $subject,
|
||||||
'templateName' => 'GroupsPrice',
|
'templateName' => 'GroupsPrice',
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -84,12 +93,6 @@ class AjaxGroupsPriceController extends ActionController
|
|||||||
$selectedOptions = [];
|
$selectedOptions = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$mode = $groupsPriceInquiry->getMode();
|
|
||||||
|
|
||||||
if (false === in_array($mode, [GroupsPriceInquiry::MODE_BOOKING, GroupsPriceInquiry::MODE_INQUIRY])) {
|
|
||||||
$mode = GroupsPriceInquiry::MODE_BOOKING;
|
|
||||||
}
|
|
||||||
|
|
||||||
$variables = [
|
$variables = [
|
||||||
'mode' => $mode,
|
'mode' => $mode,
|
||||||
'hotel' => $hotel,
|
'hotel' => $hotel,
|
||||||
|
|||||||
+4
-2
@@ -242,7 +242,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-8 text-xl text-center font-bold" v-show="submitted">
|
<div class="py-8 text-xl text-center font-bold" v-show="submitted">
|
||||||
Vielen Dank für Ihre Anfrage. Wir werden diese schnellstmöglich bearbeiten.
|
Vielen Dank für Deine {{ mode === 'booking' ? 'Buchung' : 'Anfrage' }}. Wir werden diese schnellstmöglich bearbeiten.
|
||||||
</div>
|
</div>
|
||||||
<div class="fixed top-0 left-0 inset-0 bg-white/85 flex items-center justify-center" v-show="processing">
|
<div class="fixed top-0 left-0 inset-0 bg-white/85 flex items-center justify-center" v-show="processing">
|
||||||
<img :src="loaderUri" alt="Loading...">
|
<img :src="loaderUri" alt="Loading...">
|
||||||
@@ -317,7 +317,8 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
email: null,
|
email: null,
|
||||||
phone: null,
|
phone: null,
|
||||||
remarks: null
|
remarks: null,
|
||||||
|
mode: 'inquiry',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -371,6 +372,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitForm(mode) {
|
submitForm(mode) {
|
||||||
|
this.mode = mode
|
||||||
let formData = new URLSearchParams({
|
let formData = new URLSearchParams({
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][mode]': mode,
|
'tx_epproducts_ajax[groupsPriceInquiry][mode]': mode,
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][name]': this.name ? this.name : '',
|
'tx_epproducts_ajax[groupsPriceInquiry][name]': this.name ? this.name : '',
|
||||||
|
|||||||
@@ -5,7 +5,14 @@
|
|||||||
<f:layout name="SystemEmail"/>
|
<f:layout name="SystemEmail"/>
|
||||||
|
|
||||||
<f:section name="Main">
|
<f:section name="Main">
|
||||||
<h1>Anfrage Gruppenhaus vom <f:format.date date="now" format="d.m.y" /></h1>
|
<f:if condition="{mode} == 'booking'">
|
||||||
|
<f:then>
|
||||||
|
<h1>Buchung Gruppenhaus vom <f:format.date date="now" format="d.m.y" /></h1>
|
||||||
|
</f:then>
|
||||||
|
<f:else>
|
||||||
|
<h1>Anfrage Gruppenhaus vom <f:format.date date="now" format="d.m.y" /></h1>
|
||||||
|
</f:else>
|
||||||
|
</f:if>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
|
|||||||
Reference in New Issue
Block a user