Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send email to user #99

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading