diff --git a/pms/controllers/pms_portal.py b/pms/controllers/pms_portal.py index 584ef42e1..d7a98f963 100644 --- a/pms/controllers/pms_portal.py +++ b/pms/controllers/pms_portal.py @@ -378,7 +378,7 @@ class PortalPrecheckin(CustomerPortal): def portal_precheckin_folio(self, folio_id, **kw): folio = request.env["pms.folio"].sudo().browse(folio_id) values = {} - values.update({"folio": folio}) + values.update({"no_breadcrumbs": True,"folio": folio}) return request.render("pms.portal_my_prechekin_folio", values) @http.route( @@ -393,7 +393,7 @@ class PortalPrecheckin(CustomerPortal): reservation = request.env["pms.reservation"].sudo().browse(reservation_id) values = {} values.update({"folio": folio}) - values.update({"reservation": reservation}) + values.update({"no_breadcrumbs": True,"reservation": reservation}) return request.render("pms.portal_my_prechekin_reservation", values) @http.route( @@ -425,6 +425,7 @@ class PortalPrecheckin(CustomerPortal): ) values.update( { + "no_breadcrumbs": True, "folio": folio, "reservation": reservation, "checkin_partner": checkin_partner, diff --git a/pms/static/src/js/widgets/datepicker/datepicker.css b/pms/static/src/js/widgets/datepicker/datepicker.css index f87f973ca..57d678e28 100644 --- a/pms/static/src/js/widgets/datepicker/datepicker.css +++ b/pms/static/src/js/widgets/datepicker/datepicker.css @@ -1,12 +1,3 @@ -/*! - * Datepicker for Bootstrap - * - * Copyright 2012 Stefan Petre - * Improvements by Andrew Rowls - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - */ .datepicker { padding: 4px; margin-top: 1px; @@ -14,10 +5,6 @@ -moz-border-radius: 4px; border-radius: 4px; direction: ltr; - /*.dow { - border-top: 1px solid #ddd !important; - }*/ - } .datepicker-inline { width: 220px; diff --git a/pms/views/precheckin_portal_templates.xml b/pms/views/precheckin_portal_templates.xml index 01c4643a3..46f96aa35 100644 --- a/pms/views/precheckin_portal_templates.xml +++ b/pms/views/precheckin_portal_templates.xml @@ -217,7 +217,7 @@ Doc. Type + >Doc. Type * Doc. Number + >Doc. Number * - - + Doc. Expedition Date/Doc. Validity Date - Doc. Expedition Date/Doc. Validity Date * + + Doc. Expedition or Validate date is a required field Birth Date + > Birth Date * Birthdate cannot be older than today @@ -296,9 +300,9 @@ Nationality + >Nationality * - + @@ -355,7 +359,7 @@ Residence Address + >Residence Address * - - Zip + - + @@ -398,7 +406,7 @@ - + - - + - + + + { - let country_value = select_residence_country.value - Array.from(document.getElementById('residence-state').options).forEach(element => { - if (element.getAttribute('country_id') == country_value) { - element.style=""; - } else { - element.style="display:none"; + this.filterStates(); + }); + let select_residence_state = document.getElementById('residence-state') + + function filterStates(){ + let country_value = select_residence_country.value + Array.from(document.getElementById('residence-state').options).forEach(element => { + if (element.getAttribute('country_id') == country_value) { + element.style=""; + } else { + element.style="display:none"; + } + }); } - }); - }); var select_doc_type = document.getElementById("doc_type") var document_type_value = document.getElementById("docTypeId").textContent @@ -645,15 +664,9 @@ var checkin_partner_id = document.getElementById("checkin").value var access_token = document.getElementById("input_access_token").value var checkin_pos = document.getElementById("input_checkin_pos").value; - var todo = "anhadir reservation_id en la issiguiente linea"; + window.history.pushState(null, '', '/my/precheckin/'+folio_id+'/checkin/'+checkin_partner_id +'?access_token='+ access_token); - function launchSnackBar(element) { - var x = document.getElementById("snackbar"); - if (checkin_pos == -1){ - x.className = "show"; - setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); - } - } + function showCountries(show){ @@ -664,6 +677,7 @@ } } + function selectNationality(element){ var nationality = element.innerText; document.getElementById("myInput").value = nationality; @@ -721,18 +735,36 @@ if (element.value == country_id) { element.selected = true + element.style.color = "black"; + this.filterStates(); } }); Array.from(document.getElementById('residence-state').options).forEach(element => { if (element.value == state_id) { + element.style.color = "black"; element.selected = true } }); document.getElementById('residence-city').value = city_name; this.showZips(false); } + function changeDatepickerArrow(element){ + var arrowLeftDatepicker = document.getElementsByClassName("icon-arrow-left"); + + for(let item of arrowLeftDatepicker){ + item.classList.remove("icon-arrow-left"); + item.classList.add("fa","fa-arrow-left"); + } + var arrowRightDatepicker = document.getElementsByClassName("icon-arrow-right"); + + for(let item of arrowRightDatepicker){ + item.classList.remove("icon-arrow-right"); + item.classList.add("fa","fa-arrow-right"); + } + + } function removeErrorClass(element){ element.classList.remove("error"); element.nextElementSibling.classList.add("d-none");