Skip to content

Commit

Permalink
Merge pull request #99 from ITPNYU/riho/prod_dev
Browse files Browse the repository at this point in the history
Send email to user
  • Loading branch information
rlho authored Mar 1, 2024
2 parents 38b57c5 + d44c4bc commit b72d6f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ const SheetEditor = () => {
}
});
alert('Your request has been sent.');

serverFunctions.sendTextEmail(
email,
'Your Request Sent to Media Commons',
'Your reservation is not yet confirmed. The coordinator will review and finalize your reservation within a few days.'
);
setLoading(false);
setSection('selectRoom');
};
Expand All @@ -301,7 +307,6 @@ const SheetEditor = () => {
const sendApprovalEmail = (recipient, contents) => {
var subject = 'Approval Request';

//serverFunctions.sendTextEmail(recipient, subject, body);
serverFunctions.sendHTMLEmail(
'approval_email',
contents,
Expand Down
5 changes: 5 additions & 0 deletions media_commons_booking_app/src/server/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ export const approveEvent = (rowIndex, id) => {

updateEventPrefix(id, 'APPROVED');
inviteUserToCalendarEvent(id, guestEmail);
sendTextEmail(
guestEmail,
'Media Commons Reservation Approved',
'Your reservation request for Media Commons is approved.'
);
};

const inviteUserToCalendarEvent = (eventId, guestEmail) => {
Expand Down

0 comments on commit b72d6f0

Please sign in to comment.