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)
|
||||
{
|
||||
$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 = [
|
||||
'toEmail' => $this->settings['groupsPriceToEmail'],
|
||||
'toName' => $this->settings['groupsPriceToName'],
|
||||
'fromEmail' => $this->settings['groupsPriceToEmail'],
|
||||
'fromName' => $this->settings['groupsPriceToName'],
|
||||
'subject' => 'Gruppenhaus Preisberechnung/Anfrage',
|
||||
'subject' => $subject,
|
||||
'templateName' => 'GroupsPrice',
|
||||
];
|
||||
|
||||
@@ -84,12 +93,6 @@ class AjaxGroupsPriceController extends ActionController
|
||||
$selectedOptions = [];
|
||||
}
|
||||
|
||||
$mode = $groupsPriceInquiry->getMode();
|
||||
|
||||
if (false === in_array($mode, [GroupsPriceInquiry::MODE_BOOKING, GroupsPriceInquiry::MODE_INQUIRY])) {
|
||||
$mode = GroupsPriceInquiry::MODE_BOOKING;
|
||||
}
|
||||
|
||||
$variables = [
|
||||
'mode' => $mode,
|
||||
'hotel' => $hotel,
|
||||
|
||||
+4
-2
@@ -242,7 +242,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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 class="fixed top-0 left-0 inset-0 bg-white/85 flex items-center justify-center" v-show="processing">
|
||||
<img :src="loaderUri" alt="Loading...">
|
||||
@@ -317,7 +317,8 @@ export default {
|
||||
name: null,
|
||||
email: null,
|
||||
phone: null,
|
||||
remarks: null
|
||||
remarks: null,
|
||||
mode: 'inquiry',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -371,6 +372,7 @@ export default {
|
||||
}
|
||||
},
|
||||
submitForm(mode) {
|
||||
this.mode = mode
|
||||
let formData = new URLSearchParams({
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][mode]': mode,
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][name]': this.name ? this.name : '',
|
||||
|
||||
@@ -5,7 +5,14 @@
|
||||
<f:layout name="SystemEmail"/>
|
||||
|
||||
<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>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
Reference in New Issue
Block a user