Skip to content

Commit

Permalink
BRS-624 change email wording DAY to ALL DAY (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronpettit authored May 26, 2022
1 parent ac4755b commit 5d3e765
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lambda/readPass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ exports.handler = async (event, context) => {
const dateOptions = { day: 'numeric', month: 'long', year: 'numeric' };
let formattedDate = new Date(passData.data[0].date).toLocaleDateString('en-US', dateOptions);
if (passData.data[0].type) {
formattedDate += ' (' + passData.data[0].type + ')'
let formattedType = passData.data[0].type === 'DAY' ? 'ALL DAY' : passData.data[0].type;
formattedDate += ' (' + formattedType + ')'
}

let personalisation = {
Expand Down
8 changes: 6 additions & 2 deletions lambda/writePass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ exports.handler = async (event, context) => {
'&email=' +
email +
'&park=' +
parkName;
parkName +
'&date=' +
dateselector +
'&type=' +
type;

const encodedCancellationLink = encodeURI(cancellationLink);

Expand All @@ -196,7 +200,7 @@ exports.handler = async (event, context) => {
firstName: firstName,
lastName: lastName,
date: formattedDate,
type: type,
type: type === 'DAY' ? 'ALL DAY' : type,
facilityName: facilityName,
numberOfGuests: numberOfGuests.toString(),
registrationNumber: registrationNumber.toString(),
Expand Down

0 comments on commit 5d3e765

Please sign in to comment.