Documentation for what reason?

This commit is contained in:
Scott Idem
2024-03-08 13:08:54 -05:00
parent 409872ed4d
commit d9ee195590
3 changed files with 63 additions and 63 deletions

View File

@@ -64,6 +64,8 @@ let placeholder_li: key_val = {
if ($slct.event_presenter_id) {
console.log(`Presenter ID selected: ${$slct.event_presenter_id}`);
console.log(`Presenter object selected:`, $slct.event_presenter_obj);
$slct_trigger = 'load__event_presenter_obj';
} else {
$store_current_tab = 'start';
@@ -257,12 +259,17 @@ async function handle_submit_form(event) {
if ($slct.event_presenter_id) {
if ($store_current_tab == 'start' && $slct.event_presenter_id) {
$store_current_tab = 'biograhpy';
send_init_confirm_email();
} else if ($store_current_tab == 'biograhpy' && $slct.event_presenter_id) {
$store_current_tab = 'files';
} else if ($store_current_tab == 'files' && $slct.event_presenter_id) {
$store_current_tab = 'summary';
}
} else {
console.log('No obj ID found!');
}
}
async function handle_submit_form_files(event) {
@@ -412,6 +419,36 @@ async function handle_update__event_presenter({
return ae_promises.update__event_presenter_obj;
}
function send_init_confirm_email() {
let subject = `CHOW 2024 Speaker Hub Link for ${$slct.event_presenter_obj.full_name} (ID: ${$slct.event_presenter_id})`;
let body_html = `<p>Thank you for your submission to the Speaker Hub. You are an integral part of Capitol Hill Ocean Week and we appreciate your participation. If you need to make any changes or updates to your submission, you may access it via the below hyperlink:</p><p>Name: ${$slct.event_presenter_obj.full_name} (Speaker ID: ${$slct.event_presenter_id})</p><p>Use this link to view or update your CHOW 2024 speaker information.<p>Copy and paste link: <a href="${$ae_loc.mod.events.presenter_link}">${$ae_loc.mod.events.presenter_link}</a></p>`
api.send_email({
api_cfg: $ae_api,
from_email: 'noreply+chow@oneskyit.com',
from_name: 'CHOW 2024 Speaker Hub',
to_email: $slct.event_presenter_obj.email,
subject: subject,
body_html: body_html,
});
}
function send_summary_email() {
let subject = `CHOW 2024 Speaker Hub Link for ${$slct.event_presenter_obj.full_name} (ID: ${$slct.event_presenter_id})`;
let body_html = `<p>Thank you for your submission to the Speaker Hub. You are an integral part of Capitol Hill Ocean Week and we appreciate your participation. If you need to make any changes or updates to your submission, you may access it via the link below.</p><p>Name: ${$slct.event_presenter_obj.full_name} (ID: ${$slct.event_presenter_id})</p><p>Professional title: ${$slct.event_presenter_obj.professional_title}</p><p>Affiliations: ${$slct.event_presenter_obj.affiliations}</p><p>Email: ${$slct.event_presenter_obj.email}</p><div>Biography:<pre class="biography pre_wrap">${$slct.event_presenter_obj.biography}</pre></div> <div>Headshot:<div style="max-width: 20em">${placeholder_li.image_headshot}</div></div> <p>Use this link to view or update your CHOW 2024 speaker information.<p>Copy and paste link: <a href="${$ae_loc.mod.events.presenter_link}">${$ae_loc.mod.events.presenter_link}</a></p>`
api.send_email({
api_cfg: $ae_api,
from_email: 'noreply+chow@oneskyit.com',
from_name: 'CHOW 2024 Speaker Hub',
to_email: $slct.event_presenter_obj.email,
subject: subject,
body_html: body_html,
});
}
</script>
<!-- @component This is the Event Presenters modal edit form. -->
@@ -465,18 +502,6 @@ async function handle_update__event_presenter({
on:click={() => {
if (!confirm(`Are you sure you want to send this email to ${$slct.event_presenter_obj.email}?`)) {return false;}
let subject = `CHOW 2024 Speaker Link for ${$slct.event_presenter_obj.full_name} (ID: ${$slct.event_presenter_id})`;
let body_html = `<p>Name: ${$slct.event_presenter_obj.full_name} (speaker ID: ${$slct.event_presenter_id})</p><p>Use this link to view or update your CHOW 2024 speaker information.<p>Copy and paste link: <a href="${$ae_loc.mod.events.presenter_link}">${$ae_loc.mod.events.presenter_link}</a></p>`
api.send_email({
api_cfg: $ae_api,
from_email: 'scott.idem+from@oneskyit.com',
from_name: 'Scott Idem',
to_email: $slct.event_presenter_obj.email,
subject: subject,
body_html: body_html,
});
}}
>
<span class="fas fa-paper-plane mx-1"></span>
@@ -694,7 +719,7 @@ async function handle_update__event_presenter({
</label> -->
</fieldset>
<button
<!-- <button
type="submit"
class="btn variant-glass-primary m-2"
disabled={(!$slct.event_presenter_obj.email || $ae_sess.mod.events.disable_submit__event_presenter_obj)}
@@ -702,28 +727,16 @@ async function handle_update__event_presenter({
console.log('*** Start save and email button clicked ***');
if (!confirm(`This will save your speaker information so far and a confirmation email will be sent to ${$slct.event_presenter_obj.email}.`)) {return false;}
let subject = `CHOW 2024 Speaker Hub Link for ${$slct.event_presenter_obj.full_name} (ID: ${$slct.event_presenter_id})`;
let body_html = `<p>Thank you for your submission to the Speaker Hub. You are an integral part of Capitol Hill Ocean Week and we appreciate your participation. If you need to make any changes or updates to your submission, you may access it via the below hyperlink:</p><p>Name: ${$slct.event_presenter_obj.full_name} (Speaker ID: ${$slct.event_presenter_id})</p><p>Use this link to view or update your CHOW 2024 speaker information.<p>Copy and paste link: <a href="${$ae_loc.mod.events.presenter_link}">${$ae_loc.mod.events.presenter_link}</a></p>`
api.send_email({
api_cfg: $ae_api,
from_email: 'noreply+chow@oneskyit.com',
from_name: 'CHOW 2024 Speaker Hub',
to_email: $slct.event_presenter_obj.email,
subject: subject,
body_html: body_html,
});
}}
>
<span class="fas fa-envelope mx-1"></span>
Save and email
</button>
</button> -->
<button
type="submit"
class="btn variant-glass-primary m-2"
disabled={(!$slct.event_presenter_id || $ae_loc.mod.events.disable_submit__event_presenter_obj)}
disabled={($ae_loc.mod.events.disable_submit__event_presenter_obj)}
on:click={() => {
console.log('*** Save start button clicked ***');
}}
@@ -856,20 +869,7 @@ async function handle_update__event_presenter({
on:click={() => {
if (!confirm(`Are you sure you want to send this email to ${$slct.event_presenter_obj.email}?`)) {return false;}
let subject = `CHOW 2024 Speaker Hub Link for ${$slct.event_presenter_obj.full_name} (ID: ${$slct.event_presenter_id})`;
// let body_html = `<p>Name: ${$slct.event_presenter_obj.full_name} (speaker ID: ${$slct.event_presenter_id})</p><p>Use this link to view or update your CHOW 2024 speaker information.<p>Copy and paste link: <a href="${$ae_loc.mod.events.presenter_link}">${$ae_loc.mod.events.presenter_link}</a></p>`
let body_html = `<p>Thank you for your submission to the Speaker Hub. You are an integral part of Capitol Hill Ocean Week and we appreciate your participation. If you need to make any changes or updates to your submission, you may access it via the link below.</p><p>Name: ${$slct.event_presenter_obj.full_name} (ID: ${$slct.event_presenter_id})</p><p>Professional title: ${$slct.event_presenter_obj.professional_title}</p><p>Affiliations: ${$slct.event_presenter_obj.affiliations}</p><p>Email: ${$slct.event_presenter_obj.email}</p><div>Biography:<pre class="biography pre_wrap">${$slct.event_presenter_obj.biography}</pre></div> <div>Headshot:<div style="max-width: 20em">${placeholder_li.image_headshot}</div></div> <p>Use this link to view or update your CHOW 2024 speaker information.<p>Copy and paste link: <a href="${$ae_loc.mod.events.presenter_link}">${$ae_loc.mod.events.presenter_link}</a></p>`
api.send_email({
api_cfg: $ae_api,
from_email: 'noreply+chow@oneskyit.com',
from_name: 'CHOW 2024 Speaker Hub',
to_email: $slct.event_presenter_obj.email,
subject: subject,
body_html: body_html,
});
send_summary_email();
}}
>
<span class="fas fa-paper-plane mx-1"></span>