Perform styling changes to the public booking page
This commit is contained in:
parent
b192b437e0
commit
a02a6118b6
36 changed files with 144 additions and 122 deletions
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -452,4 +452,5 @@ $lang['label'] = 'Label';
|
||||||
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
$lang['webhook_saved'] = 'Webhook saved successfully.';
|
||||||
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
$lang['webhook_deleted'] = 'Webhook deleted successfully.';
|
||||||
$lang['delete_webhook'] = 'Delete Webhook';
|
$lang['delete_webhook'] = 'Delete Webhook';
|
||||||
|
$lang['contact_info'] = 'Contact Info';
|
||||||
// End
|
// End
|
||||||
|
|
|
@ -11,13 +11,19 @@
|
||||||
<div id="wizard-frame-4" class="wizard-frame" style="display:none;">
|
<div id="wizard-frame-4" class="wizard-frame" style="display:none;">
|
||||||
<div class="frame-container">
|
<div class="frame-container">
|
||||||
<h2 class="frame-title"><?= lang('appointment_confirmation') ?></h2>
|
<h2 class="frame-title"><?= lang('appointment_confirmation') ?></h2>
|
||||||
<div class="row frame-content">
|
|
||||||
<div id="appointment-details" class="col-12 col-md-6 text-center text-md-start"></div>
|
<div class="row frame-content m-auto pt-md-4 mb-4">
|
||||||
<div id="customer-details" class="col-12 col-md-6 text-center text-md-end"></div>
|
<div id="appointment-details" class="col-12 col-md-6 text-center text-md-start mb-2 mb-md-0">
|
||||||
|
<!-- JS -->
|
||||||
|
</div>
|
||||||
|
<div id="customer-details" class="col-12 col-md-6 text-center text-md-end">
|
||||||
|
<!-- JS -->
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if (setting('require_captcha')): ?>
|
<?php if (setting('require_captcha')): ?>
|
||||||
<div class="row frame-content">
|
<div class="row frame-content m-auto">
|
||||||
<div class="col-12 col-md-6">
|
<div class="col">
|
||||||
<label class="captcha-title" for="captcha-text">
|
<label class="captcha-title" for="captcha-text">
|
||||||
CAPTCHA
|
CAPTCHA
|
||||||
<button class="btn btn-link text-dark text-decoration-none py-0">
|
<button class="btn btn-link text-dark text-decoration-none py-0">
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<h2 class="frame-title"><?= lang('service_and_provider') ?></h2>
|
<h2 class="frame-title"><?= lang('service_and_provider') ?></h2>
|
||||||
|
|
||||||
<div class="row frame-content">
|
<div class="row frame-content">
|
||||||
<div class="col col-sm-8 offset-sm-2 mt-sm-5">
|
<div class="col col-md-8 offset-md-2 mt-md-5">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="select-service">
|
<label for="select-service">
|
||||||
<strong><?= lang('service') ?></strong>
|
<strong><?= lang('service') ?></strong>
|
||||||
|
|
|
@ -185,7 +185,7 @@ body {
|
||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
width: auto;
|
width: auto;
|
||||||
max-height: 255px;
|
max-height: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#book-appointment-wizard #available-hours div {
|
#book-appointment-wizard #available-hours div {
|
||||||
|
@ -273,6 +273,10 @@ body {
|
||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#book-appointment-wizard #wizard-frame-4 .frame-container .frame-content {
|
||||||
|
max-width: 630px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.wrapper {
|
.wrapper {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
|
@ -586,141 +586,120 @@ App.Pages.Booking = (function () {
|
||||||
* customer settings and input for the appointment booking.
|
* customer settings and input for the appointment booking.
|
||||||
*/
|
*/
|
||||||
function updateConfirmFrame() {
|
function updateConfirmFrame() {
|
||||||
if ($availableHours.find('.selected-hour').text() === '') {
|
const serviceOptionText = $selectService.find('option:selected').text();
|
||||||
return;
|
$('.display-selected-service').text(serviceOptionText).removeClass('invisible');
|
||||||
|
|
||||||
|
const providerOptionText = $selectProvider.find('option:selected').text();
|
||||||
|
$('.display-selected-provider').text(providerOptionText).removeClass('invisible');
|
||||||
|
|
||||||
|
if (!$availableHours.find('.selected-hour').text()) {
|
||||||
|
return; // No time is selected, skip the rest of this function...
|
||||||
}
|
}
|
||||||
|
|
||||||
// Appointment Details
|
// Render the appointment details
|
||||||
let selectedDate = App.Utils.UI.getDateTimePickerValue($selectDate);
|
|
||||||
|
|
||||||
if (selectedDate !== null) {
|
|
||||||
selectedDate = App.Utils.Date.format(selectedDate, vars('date_format'), vars('time_format'));
|
|
||||||
}
|
|
||||||
|
|
||||||
const serviceId = $selectService.val();
|
const serviceId = $selectService.val();
|
||||||
let servicePrice = '';
|
|
||||||
let serviceCurrency = '';
|
|
||||||
|
|
||||||
vars('available_services').forEach((service) => {
|
const service = vars('available_services').find(
|
||||||
if (Number(service.id) === Number(serviceId) && Number(service.price) > 0) {
|
(availableService) => Number(availableService.id) === Number(serviceId),
|
||||||
servicePrice = service.price;
|
);
|
||||||
serviceCurrency = service.currency;
|
|
||||||
return false; // Break loop
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document)
|
if (!service) {
|
||||||
.find('.display-selected-service')
|
return; // Service was not found
|
||||||
.text($selectService.find('option:selected').text())
|
}
|
||||||
.removeClass('invisible');
|
|
||||||
|
|
||||||
$(document)
|
const selectedDateObject = App.Utils.UI.getDateTimePickerValue($selectDate);
|
||||||
.find('.display-selected-provider')
|
const selectedDateMoment = moment(selectedDateObject);
|
||||||
.text($selectProvider.find('option:selected').text())
|
const selectedDate = selectedDateMoment.format('YYYY-MM-DD');
|
||||||
.removeClass('invisible');
|
const selectedTime = $availableHours.find('.selected-hour').text();
|
||||||
|
const selectedDateTime = `${selectedDate} ${selectedTime}`;
|
||||||
|
|
||||||
$('#appointment-details').empty();
|
let formattedSelectedDate;
|
||||||
|
|
||||||
$('<div/>', {
|
if (selectedDateObject) {
|
||||||
'html': [
|
formattedSelectedDate = App.Utils.Date.format(
|
||||||
$('<h4/>', {
|
selectedDateTime,
|
||||||
'text': lang('appointment'),
|
vars('date_format'),
|
||||||
}),
|
vars('time_format'),
|
||||||
$('<p/>', {
|
true,
|
||||||
'html': [
|
);
|
||||||
$('<span/>', {
|
}
|
||||||
'text': lang('service') + ': ' + $selectService.find('option:selected').text(),
|
|
||||||
}),
|
const timezoneOptionText = $selectTimezone.find('option:selected').text();
|
||||||
$('<br/>'),
|
|
||||||
$('<span/>', {
|
$('#appointment-details').html(`
|
||||||
'text': lang('provider') + ': ' + $selectProvider.find('option:selected').text(),
|
<div>
|
||||||
}),
|
<div class="mb-2 fw-bold fs-3">
|
||||||
$('<br/>'),
|
${serviceOptionText}
|
||||||
$('<span/>', {
|
</div>
|
||||||
'text':
|
<div class="mb-2 fw-bold text-muted">
|
||||||
lang('start') +
|
${providerOptionText}
|
||||||
': ' +
|
</div>
|
||||||
selectedDate +
|
<div class="mb-2">
|
||||||
' ' +
|
<i class="fas fa-clock me-2"></i>
|
||||||
$availableHours.find('.selected-hour').text(),
|
${service.duration} ${lang('minutes')}
|
||||||
}),
|
</div>
|
||||||
$('<br/>'),
|
<div class="mb-2">
|
||||||
$('<span/>', {
|
<i class="fas fa-calendar-day me-2"></i>
|
||||||
'text': lang('timezone') + ': ' + $selectTimezone.find('option:selected').text(),
|
${formattedSelectedDate}
|
||||||
}),
|
</div>
|
||||||
$('<br/>'),
|
<div class="mb-2">
|
||||||
$('<span/>', {
|
<i class="fas fa-globe me-2"></i>
|
||||||
'text': lang('price') + ': ' + servicePrice + ' ' + serviceCurrency,
|
${timezoneOptionText}
|
||||||
'prop': {
|
</div>
|
||||||
'hidden': !servicePrice,
|
<div class="mb-2" ${!Number(service.price) ? 'hidden' : ''}>
|
||||||
},
|
<i class="fas fa-cash-register me-2"></i>
|
||||||
}),
|
${Number(service.price).toFixed(2)} ${service.currency}
|
||||||
],
|
</div>
|
||||||
}),
|
</div>
|
||||||
],
|
`);
|
||||||
}).appendTo('#appointment-details');
|
|
||||||
|
// Render the customer information
|
||||||
|
|
||||||
// Customer Details
|
|
||||||
const firstName = App.Utils.String.escapeHtml($firstName.val());
|
const firstName = App.Utils.String.escapeHtml($firstName.val());
|
||||||
const lastName = App.Utils.String.escapeHtml($lastName.val());
|
const lastName = App.Utils.String.escapeHtml($lastName.val());
|
||||||
const fullName = firstName + ' ' + lastName;
|
const fullName = `${firstName} ${lastName}`.trim();
|
||||||
const phoneNumber = App.Utils.String.escapeHtml($phoneNumber.val());
|
|
||||||
const email = App.Utils.String.escapeHtml($email.val());
|
const email = App.Utils.String.escapeHtml($email.val());
|
||||||
|
const phoneNumber = App.Utils.String.escapeHtml($phoneNumber.val());
|
||||||
const address = App.Utils.String.escapeHtml($address.val());
|
const address = App.Utils.String.escapeHtml($address.val());
|
||||||
const city = App.Utils.String.escapeHtml($city.val());
|
const city = App.Utils.String.escapeHtml($city.val());
|
||||||
const zipCode = App.Utils.String.escapeHtml($zipCode.val());
|
const zipCode = App.Utils.String.escapeHtml($zipCode.val());
|
||||||
|
|
||||||
$('#customer-details').empty();
|
const addressParts = [];
|
||||||
|
|
||||||
$('<div/>', {
|
if (city) {
|
||||||
'html': [
|
addressParts.push(city);
|
||||||
$('<h4/>)', {
|
}
|
||||||
'text': lang('customer'),
|
|
||||||
}),
|
if (zipCode) {
|
||||||
$('<p/>', {
|
addressParts.push(zipCode);
|
||||||
'html': [
|
}
|
||||||
fullName
|
|
||||||
? $('<span/>', {
|
$('#customer-details').html(`
|
||||||
'text': lang('customer') + ': ' + fullName,
|
<div>
|
||||||
})
|
<div class="mb-2 fw-bold fs-3">
|
||||||
: null,
|
${lang('contact_info')}
|
||||||
fullName ? $('<br/>') : null,
|
</div>
|
||||||
phoneNumber
|
<div class="mb-2 fw-bold text-muted" ${!fullName ? 'hidden' : ''}>
|
||||||
? $('<span/>', {
|
${fullName}
|
||||||
'text': lang('phone_number') + ': ' + phoneNumber,
|
</div>
|
||||||
})
|
<div class="mb-2" ${!email ? 'hidden' : ''}>
|
||||||
: null,
|
${email}
|
||||||
phoneNumber ? $('<br/>') : null,
|
</div>
|
||||||
email
|
<div class="mb-2" ${!email ? 'hidden' : ''}>
|
||||||
? $('<span/>', {
|
${phoneNumber}
|
||||||
'text': lang('email') + ': ' + email,
|
</div>
|
||||||
})
|
<div class="mb-2" ${!address ? 'hidden' : ''}>
|
||||||
: null,
|
${address}
|
||||||
email ? $('<br/>') : null,
|
</div>
|
||||||
address
|
<div class="mb-2" ${!addressParts.length ? 'hidden' : ''}>
|
||||||
? $('<span/>', {
|
${addressParts.join(', ')}
|
||||||
'text': lang('address') + ': ' + address,
|
</div>
|
||||||
})
|
</div>
|
||||||
: null,
|
`);
|
||||||
address ? $('<br/>') : null,
|
|
||||||
city
|
|
||||||
? $('<span/>', {
|
|
||||||
'text': lang('city') + ': ' + city,
|
|
||||||
})
|
|
||||||
: null,
|
|
||||||
city ? $('<br/>') : null,
|
|
||||||
zipCode
|
|
||||||
? $('<span/>', {
|
|
||||||
'text': lang('zip_code') + ': ' + zipCode,
|
|
||||||
})
|
|
||||||
: null,
|
|
||||||
zipCode ? $('<br/>') : null,
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
}).appendTo('#customer-details');
|
|
||||||
|
|
||||||
// Update appointment form data for submission to server when the user confirms the appointment.
|
// Update appointment form data for submission to server when the user confirms the appointment.
|
||||||
|
|
||||||
const data = {};
|
const data = {};
|
||||||
|
|
||||||
data.customer = {
|
data.customer = {
|
||||||
|
@ -753,6 +732,7 @@ App.Pages.Booking = (function () {
|
||||||
data.appointment.id = vars('appointment_data').id;
|
data.appointment.id = vars('appointment_data').id;
|
||||||
data.customer.id = vars('customer_data').id;
|
data.customer.id = vars('customer_data').id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('input[name="post_data"]').val(JSON.stringify(data));
|
$('input[name="post_data"]').val(JSON.stringify(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue