More changes

This commit is contained in:
Scott Idem
2024-03-08 11:43:32 -05:00
parent 2ada1419d8
commit 409872ed4d
2 changed files with 26 additions and 18 deletions

View File

@@ -863,8 +863,8 @@ async function handle_update__event_presenter({
api.send_email({
api_cfg: $ae_api,
from_email: 'scott.idem+from@oneskyit.com',
from_name: 'Scott Idem',
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,

View File

@@ -56,6 +56,7 @@ if ($slct.sponsorship_id) {
description: null,
poc_person_id: null,
poc_json: {},
logo_li_json: null,
media_li_json: null,
@@ -488,6 +489,7 @@ async function handle_submit_form(event) {
if ($store_current_tab == 'start' && $slct.sponsorship_id) {
$store_current_tab = 'marketing';
send_init_confirm_email();
// If level is 2 or above then they can go to the exhibits tab.
} else if ($store_current_tab == 'marketing' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num >= 2) {
@@ -724,6 +726,22 @@ async function handle_update__sponsorship({
return ae_promises.update__sponsorship_obj;
}
function send_init_confirm_email() {
let subject = `CHOW 2024 Sponsor Hub Link for ${$slct.sponsorship_obj.name} (ID: ${$slct.sponsorship_id})`;
let body_html = `<p>Thank you for your submission to the Sponsorships 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.sponsorship_obj.name} (Sponsor ID: ${$slct.sponsorship_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.sponsorships.link}">${$ae_loc.mod.sponsorships.link}</a></p>`
api.send_email({
api_cfg: $ae_api,
from_email: 'noreply+chow@oneskyit.com',
from_name: 'CHOW 2024 Sponsor Hub',
to_email: $slct.sponsorship_obj.poc_json.email,
subject: subject,
body_html: body_html,
});
}
</script>
<!-- @component This is the Sponsorships modal edit form. -->
@@ -1331,31 +1349,21 @@ async function handle_update__sponsorship({
{/if}
</fieldset>
<button
<!-- <button
type="submit"
class="btn variant-glass-primary m-2"
class:hidden={$slct.sponsorship_obj.poc_json && !$slct.sponsorship_obj.poc_json.email}
disabled={($ae_sess.mod.sponsorships.disable_submit__sponsorship_obj)}
on:click={() => {
console.log('*** Start save and email button clicked ***');
if (!confirm(`This will save your sponsorship information so far and a confirmation email will be sent to ${$slct.sponsorship_obj.poc_json.email}.`)) {return false;}
let subject = `CHOW 2024 Sponsor Hub Link for ${$slct.sponsorship_obj.name} (ID: ${$slct.sponsorship_id})`;
let body_html = `<p>Thank you for your submission to the Sponsorships 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.sponsorship_obj.name} (Sponsor ID: ${$slct.sponsorship_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.sponsorships.link}">${$ae_loc.mod.sponsorships.link}</a></p>`
api.send_email({
api_cfg: $ae_api,
from_email: 'noreply+chow@oneskyit.com',
from_name: 'CHOW 2024 Sponsorships Hub',
to_email: $slct.sponsorship_obj.poc_json.email,
subject: subject,
body_html: body_html,
});
send_init_confirm_email();
}}
>
<span class="fas fa-envelope mx-1"></span>
Save and email
</button>
</button> -->
<button
type="submit"
@@ -2302,8 +2310,8 @@ async function handle_update__sponsorship({
await api.send_email({
api_cfg: $ae_api,
from_email: 'scott.idem+from@oneskyit.com',
from_name: 'Scott Idem',
from_email: 'noreply+chow@oneskyit.com',
from_name: 'CHOW 2024 Sponsor Hub',
to_email: $slct.sponsorship_obj.poc_json.email,
subject: subject,
body_html: body_html,