fix(SW-1942): fixed find my booking to be case-insensitive on form input
This commit is contained in:
@@ -21,7 +21,7 @@ function accessBooking(
|
||||
) {
|
||||
if (guest.membershipNumber) {
|
||||
if (user) {
|
||||
if (lastName === guest.lastName) {
|
||||
if (lastName.toLowerCase() === guest.lastName?.toLowerCase()) {
|
||||
return ACCESS_GRANTED
|
||||
}
|
||||
} else {
|
||||
@@ -32,7 +32,7 @@ function accessBooking(
|
||||
}
|
||||
}
|
||||
|
||||
if (guest.lastName === lastName) {
|
||||
if (guest.lastName?.toLowerCase() === lastName.toLowerCase()) {
|
||||
if (user) {
|
||||
console.warn(
|
||||
"Access to booking not granted due to logged in user attempting access to anonymous booking"
|
||||
@@ -41,8 +41,9 @@ function accessBooking(
|
||||
} else {
|
||||
const params = new URLSearchParams(cookie)
|
||||
if (
|
||||
params.get("firstName") === guest.firstName &&
|
||||
params.get("email") === guest.email
|
||||
params.get("firstName")?.toLowerCase() ===
|
||||
guest.firstName?.toLowerCase() &&
|
||||
params.get("email")?.toLowerCase() === guest.email?.toLowerCase()
|
||||
) {
|
||||
return ACCESS_GRANTED
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user