forked from alaguraj/odoo-testing-addons
implement table reservation form template and update docker-compose configuration
This commit is contained in:
parent
c256d16032
commit
dae5dc5220
@ -81,10 +81,7 @@
|
||||
Select a date and guest count to see available slots
|
||||
</div>
|
||||
</div>
|
||||
<div id="selection_info" class="mt-2 small text-muted text-center" style="display: none;">
|
||||
<i class="fa fa-info-circle me-1"/>
|
||||
<span id="assigned_table_text"></span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="start_time" id="selected_start_time" required="1"/>
|
||||
</div>
|
||||
</div>
|
||||
@ -155,10 +152,7 @@
|
||||
this.style.color = "#171422";
|
||||
hiddenInput.value = slot.full_dt;
|
||||
|
||||
const infoDiv = document.getElementById('selection_info');
|
||||
const infoText = document.getElementById('assigned_table_text');
|
||||
infoDiv.style.display = 'block';
|
||||
infoText.innerHTML = "Assignment: <strong>" + slot.tables + "</strong>";
|
||||
|
||||
};
|
||||
container.appendChild(btn);
|
||||
});
|
||||
@ -193,34 +187,36 @@
|
||||
</div>
|
||||
<h1 class="display-3 fw-bold mb-3">Thank You!</h1>
|
||||
<p class="lead text-muted mb-5">Your reservation request <strong><t t-esc="reservation.name"/></strong> has been received. We will contact you shortly to confirm.</p>
|
||||
<div class="card border-0 shadow-sm p-4 mb-5" style="border-radius: 15px; background: #f8f9fa;">
|
||||
<div class="row text-start g-3">
|
||||
<div class="col-6"><strong>Floor:</strong> <t t-esc="reservation.floor_id.name"/></div>
|
||||
<div class="col-6"><strong>Table(s):</strong>
|
||||
<t t-if="reservation.table_ids">
|
||||
<t t-esc="', '.join(reservation.table_ids.mapped('name'))"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="reservation.table_id.name"/>
|
||||
</t>
|
||||
<div class="card border-0 shadow-lg p-4 mb-5 mx-auto" style="border-radius: 20px; background: white; max-width: 500px; border: 1px solid rgba(254, 205, 79, 0.3) !important;">
|
||||
<div class="d-flex justify-content-around align-items-center text-center">
|
||||
<div>
|
||||
<div class="mb-2">
|
||||
<i class="fa fa-users" style="font-size: 2rem; color: #fecd4f;"></i>
|
||||
</div>
|
||||
<h5 class="fw-bold mb-0 text-dark">Guests</h5>
|
||||
<p class="text-muted mb-0 fs-5"><t t-esc="reservation.num_people"/></p>
|
||||
</div>
|
||||
<div style="border-right: 2px dashed rgba(254, 205, 79, 0.4); height: 80px;"></div>
|
||||
<div>
|
||||
<div class="mb-2">
|
||||
<i class="fa fa-clock-o" style="font-size: 2rem; color: #fecd4f;"></i>
|
||||
</div>
|
||||
<h5 class="fw-bold mb-0 text-dark">Date & Time</h5>
|
||||
<p class="text-muted mb-0"><t t-esc="reservation.start_time.strftime('%b %d, %Y')"/><br/><strong class="text-dark"><t t-esc="reservation.start_time.strftime('%I:%M %p')"/></strong></p>
|
||||
</div>
|
||||
<div class="col-6"><strong>Guests:</strong> <t t-esc="reservation.num_people"/></div>
|
||||
<div class="col-12"><strong>Time:</strong> <t t-esc="reservation.start_time.strftime('%B %d, %Y at %I:%M %p')"/></div>
|
||||
</div>
|
||||
</div>
|
||||
<a t-att-href="reservation.whatsapp_url" id="whatsapp_auto_link" class="btn btn-lg text-white mb-3" target="_blank" style="background: #25D366; border-radius: 12px; padding-left: 40px; padding-right: 40px; font-weight: 600;">
|
||||
<i class="fa fa-whatsapp me-2"/>SEND WHATSAPP CONFIRMATION
|
||||
</a>
|
||||
<br/>
|
||||
<a href="/" class="btn btn-lg text-dark" style="background: #fecd4f; border-radius: 12px; padding-left: 40px; padding-right: 40px; font-weight: 600;">BACK TO HOME</a>
|
||||
<a t-att-href="reservation.whatsapp_url" id="whatsapp_auto_link" class="d-none" target="_blank"></a>
|
||||
|
||||
<a href="/" class="btn btn-lg text-dark mt-3" style="background: #fecd4f; border-radius: 12px; padding-left: 40px; padding-right: 40px; font-weight: 600;">BACK TO HOME</a>
|
||||
|
||||
<script type="text/javascript">
|
||||
setTimeout(function() {
|
||||
var waLink = document.getElementById('whatsapp_auto_link');
|
||||
if (waLink) {
|
||||
if (waLink && waLink.href) {
|
||||
waLink.click();
|
||||
}
|
||||
}, 2000);
|
||||
}, 500);
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user