This should have been saved earlier. Lots of moving code around to and clean up.

This commit is contained in:
Scott Idem
2024-07-01 16:22:10 -04:00
parent 9de9d31101
commit 88b0042919
13 changed files with 733 additions and 179 deletions

View File

@@ -327,3 +327,58 @@ export function handle_db_save_ae_obj_li__event_session(
return true;
}
}
// This is intended for the Point of Contact (POC) for the session.
// Updated 2024-07-01
export async function handle_email_sign_in__event_session (
{
api_cfg,
to_email,
to_name,
base_url,
person_id,
person_passcode,
event_session_id,
session_name,
}: {
api_cfg: any,
to_email: string,
to_name: string,
base_url: string,
person_id: string,
person_passcode: string,
event_session_id: string,
session_name: string,
}
) {
console.log(`*** handle_email_sign_in__event_session() *** to_email=${to_email} to_name=${to_name} person_id=${person_id} person_passcode=${person_passcode} session_id=${event_session_id}`);
let subject = `LCI Congress 2024 - Pres Mgmt Hub Sign In Link for ${session_name} (ID: ${event_session_id})`;
let sign_in_url = encodeURI(`${base_url}/events_pres_mgmt/session/${event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&session_id=${event_session_id}`)
let body_html = `
<div>${to_name},
<p>Your link to sign into the presentation management hub as a session Champion for LCI Congress 2024 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.</p>
</div>
<div>
<strong>26th Annual Lean Construction Congress (2024)</strong>:<br>
<p>
Session Name: ${session_name}<br>
Session ID: ${event_session_id}
</p>
<p>Use this link to view or update your LCI 2024 session information.<br>
Copy and paste link: <a href="${sign_in_url}">${sign_in_url}</a></p>
</div>`;
api.send_email({
api_cfg: api_cfg,
from_email: 'noreply+presmgmt@oneskyit.com',
from_name: 'LCI 2024 Pres Mgmt Hub',
to_email: to_email,
subject: subject,
body_html: body_html,
});
}