[IMP]: added access restriction to precheckin when it has already been completed

This commit is contained in:
braisab
2022-02-07 11:22:46 +01:00
parent 8c7f2d3d58
commit 564649af6f
2 changed files with 8 additions and 10 deletions

View File

@@ -337,10 +337,9 @@ class PortalPrecheckin(CustomerPortal):
"checkin_pos": 0,
}
)
if checkin_partner.state == "draft" or checkin_partner.state == "confirm":
return request.render("pms.portal_my_reservation_precheckin", values)
else:
if checkin_partner.state != "draft":
return request.render("pms.portal_not_checkin", values)
return request.render("pms.portal_my_reservation_precheckin", values)
@http.route(
["/my/precheckin/<int:folio_id>/checkin/<int:checkin_partner_id>"],
@@ -399,8 +398,9 @@ class PortalPrecheckin(CustomerPortal):
values.update(
self._precheckin_get_page_view_values(checkin_partner_id.id, access_token)
)
values.update({"no_breadcrumbs": True})
if checkin_partner_id.state != "draft":
return request.render("pms.portal_not_checkin", values)
return request.render("pms.portal_my_precheckin_detail", values)
@http.route(

View File

@@ -317,7 +317,7 @@
</t>
</div>
<div class="col-4 pt-3">
<div id="pager_count" class="col-4 pt-3">
<center>
Page
<span t-esc="int(checkin_pos) + 1" />
@@ -1079,11 +1079,9 @@
<template id="portal_not_checkin" name="Not Checkin">
<t t-call="portal.portal_layout">
<center>
The quick registration system is not available because the date of your reservation has already passed.<br
/>
If you have any questions, you can contact us by phone: <span><t
t-esc="folio.pms_property_id.phone"
/></span> or by email: <span><t
The quick registration system is not available.<br />
If you have any questions, you can contact us: <br /><br />Phone: <span
><t t-esc="folio.pms_property_id.phone" /></span> <br /> Email: <span><t
t-esc="folio.pms_property_id.email"
/></span>
</center>