[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(