This should have been saved earlier. Lots of moving code around to and clean up.
This commit is contained in:
@@ -302,6 +302,11 @@ export function handle_db_save_ae_obj_li__event_presenter(
|
||||
// From SQL view
|
||||
file_count: obj.file_count,
|
||||
|
||||
event_session_code: obj.event_session_code,
|
||||
event_session_name: obj.event_session_name,
|
||||
event_presentation_code: obj.event_presentation_code,
|
||||
event_presentation_name: obj.event_presentation_name,
|
||||
|
||||
person_external_id: obj.person_external_id,
|
||||
person_given_name: obj.person_given_name,
|
||||
person_family_name: obj.person_family_name,
|
||||
@@ -325,3 +330,64 @@ export function handle_db_save_ae_obj_li__event_presenter(
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
export async function handle_email_sign_in__event_presenter (
|
||||
{
|
||||
api_cfg,
|
||||
to_email,
|
||||
to_name,
|
||||
base_url,
|
||||
person_id,
|
||||
person_passcode,
|
||||
event_session_id,
|
||||
event_presentation_id,
|
||||
event_presenter_id,
|
||||
session_name,
|
||||
presentation_name
|
||||
}: {
|
||||
api_cfg: any,
|
||||
to_email: string,
|
||||
to_name: string,
|
||||
base_url: string,
|
||||
person_id: string,
|
||||
person_passcode: string,
|
||||
event_session_id: string,
|
||||
event_presentation_id: string,
|
||||
event_presenter_id: string,
|
||||
session_name: string,
|
||||
presentation_name: string
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_email_sign_in__event_presenter() *** to_email=${to_email} to_name=${to_name} person_id=${person_id} person_passcode=${person_passcode} presentation_id=${event_presentation_id} presenter_id=${event_presenter_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}&presentation_id=${event_presentation_id}&presenter_id=${event_presenter_id}`)
|
||||
|
||||
let body_html = `
|
||||
<div>${to_name},
|
||||
<p>Your link to sign into the presentation management hub 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}<br>
|
||||
Presentation Name: ${presentation_name}<br>
|
||||
Presentation ID: ${event_presentation_id}
|
||||
</p>
|
||||
<p>Use this link to view or update your LCI 2024 presentation 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,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user