Making things look nicer and more complete.

This commit is contained in:
Scott Idem
2024-03-12 14:29:16 -04:00
parent a5431070d3
commit 7d1a4b735b
2 changed files with 111 additions and 13 deletions

View File

@@ -483,7 +483,25 @@ 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>`;
let body_html = `
<div>${$slct.event_presenter_obj.full_name},
<p>Thank you for your submission to the Capitol Hill Ocean Week 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>
</div>
<div>
Name: ${$slct.event_presenter_obj.full_name}<br>
Professional title: ${$slct.event_presenter_obj.professional_title}<br>
Affiliations: ${$slct.event_presenter_obj.affiliations}<br>
Email: ${$slct.event_presenter_obj.email}
</div>
<br>
<div>
CHOW 2024 Speaker ID: ${$slct.event_presenter_id}<br>
<p>Use this link to view or update your CHOW 2024 speaker information.<br>
Copy and paste link: <a href="${$ae_loc.mod.events.presenter_link}">${$ae_loc.mod.events.presenter_link}</a></p>
</div>`;
api.send_email({
api_cfg: $ae_api,
@@ -498,7 +516,32 @@ function send_init_confirm_email() {
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>`;
let body_html = `
<div>${$slct.event_presenter_obj.full_name},
<p>Thank you for your submission to the Capitol Hill Ocean Week 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>
</div>
<div>
Name: ${$slct.event_presenter_obj.full_name}<br>
Professional title: ${$slct.event_presenter_obj.professional_title}<br>
Affiliations: ${$slct.event_presenter_obj.affiliations}<br>
Email: ${$slct.event_presenter_obj.email}
</div>
<div>Biography:<pre class="text-wrap">${$slct.event_presenter_obj.biography}</pre>
</div>
<div>
Headshot:<div style="max-width: 20em">${placeholder_li.image_headshot}</div>
</div>
<br>
<div>
CHOW 2024 Speaker ID: ${$slct.event_presenter_id}<br>
<p>Use this link to view or update your CHOW 2024 speaker information.<br>
Copy and paste link: <a href="${$ae_loc.mod.events.presenter_link}">${$ae_loc.mod.events.presenter_link}</a></p>
</div>`;
api.send_email({
api_cfg: $ae_api,
@@ -1079,7 +1122,7 @@ async function handle_delete_event_presenter_obj({event_presenter_id, hosted_fil
$slct.event_presenter_id = null;
$slct.event_presenter_obj = {};
}}
class="btn variant-glass-warning mx-1 text-xs" type="button"
class="btn btn-sm variant-glass-warning mx-1" type="button"
title="Delete record permanently"
>
<span class="fas fa-minus mx-1"></span> Delete
@@ -1093,7 +1136,7 @@ async function handle_delete_event_presenter_obj({event_presenter_id, hosted_fil
$slct.event_presenter_id = null;
$slct.event_presenter_obj = {};
}}
class="btn variant-glass-warning mx-1 text-xs" type="button"
class="btn btn-sm variant-glass-warning mx-1" type="button"
title="Disable record to delete"
>
<span class="fas fa-minus mx-1"></span> Delete
@@ -1107,7 +1150,7 @@ async function handle_delete_event_presenter_obj({event_presenter_id, hosted_fil
$slct.event_presenter_id = null;
$slct.event_presenter_obj = {};
}}
class="btn variant-glass-warning mx-1 text-xs" type="button"
class="btn btn-sm variant-glass-warning mx-1" type="button"
title="Hide record to delete"
>
<span class="fas fa-comment-slash mx-1"></span> Delete
@@ -1116,7 +1159,7 @@ async function handle_delete_event_presenter_obj({event_presenter_id, hosted_fil
{/if}
<button
class="btn variant-soft-secondary"
class="btn btn-sm variant-soft-secondary mx-1"
use:clipboard={$ae_loc.mod.events.presenter_link}
title={`Copy link to this speaker submission (ID: ${$slct.event_presenter_id})`}
>

View File

@@ -91,6 +91,8 @@ if ($slct.sponsorship_id) {
// promo_video: null,
},
website_url: 'https://',
social_li_json: null,
guest_li_json: null,
@@ -827,7 +829,25 @@ 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 Sponsorship 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>`;
let body_html = `
<div>${$slct.sponsorship_obj.poc_json.full_name},
<p>Thank you for your submission to the Capitol Hill Ocean Week Sponsor 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 via the link below.</p>
</div>
<div>
Sponsorship Level: ${$slct.sponsorship_obj.level_str}<br>
Organization/Individual Name: ${$slct.sponsorship_obj.name}<br>
Mailing Address: ${$slct.sponsorship_obj.address_li_json.mailing.line_1}, ${$slct.sponsorship_obj.address_li_json.mailing.city}, ${$slct.sponsorship_obj.address_li_json.mailing.state_province} ${$slct.sponsorship_obj.address_li_json.mailing.postal_code}<br>
Point of Contact: ${$slct.sponsorship_obj.poc_json.full_name} (${$slct.sponsorship_obj.poc_json.email})
</div>
<br>
<div>
CHOW 2024 Sponsor ID: ${$slct.sponsorship_id}<br>
<p>Use this link to view or update your CHOW 2024 sponsorship information and Ocean Awards Gala guest list.<br>
Copy and paste link: <a href="${$ae_loc.mod.sponsorships.link}">${$ae_loc.mod.sponsorships.link}</a></p>
</div>`;
api.send_email({
api_cfg: $ae_api,
@@ -840,8 +860,41 @@ function send_init_confirm_email() {
}
function send_confirm_email() {
let guest_li_html = null;
if ($slct.sponsorship_obj.guest_li_json) {
guest_li_html = '<ul>';
let guest_li = $slct.sponsorship_obj.guest_li_json;
for (let i = 0; i < guest_li.length; i++) {
let guest_str = `<li>${guest_li[i].given_name} ${guest_li[i].family_name} ${guest_li[i].title}</li>`;
guest_li_html += guest_str;
}
guest_li_html += '</ul>';
}
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>Level: ${$slct.sponsorship_obj.level_str}</p><p>Name: ${$slct.sponsorship_obj.name} (Sponsor ID: ${$slct.sponsorship_id})</p><p>POC: ${$slct.sponsorship_obj.poc_json.full_name} (${$slct.sponsorship_obj.poc_json.email})</p><p>Use this link to view or update your CHOW 2024 sponsorship information.<p>Copy and paste link: <a href="${$ae_loc.mod.sponsorships.link}">${$ae_loc.mod.sponsorships.link}</a></p>`;
let body_html = `
<p>Thank you for your submission to the Capitol Hill Ocean Week Sponsor 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 via the link below.</p>
<div>
Sponsorship Level: ${$slct.sponsorship_obj.level_str}<br>
Organization/Individual Name: ${$slct.sponsorship_obj.name}<br>
Mailing Address: ${$slct.sponsorship_obj.address_li_json.mailing.line_1}, ${$slct.sponsorship_obj.address_li_json.mailing.city}, ${$slct.sponsorship_obj.address_li_json.mailing.state_province} ${$slct.sponsorship_obj.address_li_json.mailing.postal_code}<br>
Point of Contact: ${$slct.sponsorship_obj.poc_json.full_name} (${$slct.sponsorship_obj.poc_json.email})
</div>
${guest_li_html ? `<div><strong>Guests:</strong></br>${guest_li_html}</div>` : '<div>Guests: -- No Guests Added --</div>'}
<br>
<div>
CHOW 2024 Sponsor ID: ${$slct.sponsorship_id}<br>
<p>Use this link to view or update your CHOW 2024 sponsorship information and Ocean Awards Gala guest list.<br>
Copy and paste link: <a href="${$ae_loc.mod.sponsorships.link}">${$ae_loc.mod.sponsorships.link}</a></p>
</div>
`;
api.send_email({
api_cfg: $ae_api,
@@ -1019,7 +1072,7 @@ async function handle_delete_sponsorship_obj({sponsorship_id, hosted_file_id=nul
regionTab={!$slct.sponsorship_id || $slct.sponsorship_obj.level_num < 1 ? 'text-slate-400' : ''}
>
<svelte:fragment slot="lead">
{#if $slct.sponsorship_obj.website_url && $slct.sponsorship_obj.website_url.length > 10}
{#if $slct.sponsorship_obj.website_url && $slct.sponsorship_obj.website_url.length > 10 && $slct.sponsorship_obj.website_url.startsWith('http')}
<span class="fas fa-check text-green-500"></span>
{/if}
<span class="fas fa-bullhorn"></span>
@@ -1594,8 +1647,10 @@ async function handle_delete_sponsorship_obj({sponsorship_id, hosted_file_id=nul
<label for="website_url" class="label">
<!-- Website URL -->
<input type="url" id="website_url" name="website_url" class="input text-xs w-96 variant-glass-warning" placeholder="Website URL" bind:value={$slct.sponsorship_obj.website_url} autocomplete="url" required />
<input type="url" id="website_url" name="website_url" class="input text-xs w-96 variant-glass-warning" placeholder="Website URL (https://example.org)" bind:value={$slct.sponsorship_obj.website_url} autocomplete="url" required />
</label>
<p class="text-xs italic variant-glass-tertiary max-w-96">The URLs should begin with "https://" or "http://"</p>
</fieldset>
<!-- Ask for common social media URLs. (Twitter, Facebook, Instagram, etc) -->
@@ -2479,7 +2534,7 @@ async function handle_delete_sponsorship_obj({sponsorship_id, hosted_file_id=nul
// $slct.sponsorship_id = null;
// $slct.sponsorship_obj = {};
}}
class="btn variant-glass-warning mx-1"
class="btn btn-sm variant-glass-warning mx-1"
class:hidden={!$ae_loc.administrator_access}
title="CURRENTLY DISABLED: Delete record permanently"
>
@@ -2487,7 +2542,7 @@ async function handle_delete_sponsorship_obj({sponsorship_id, hosted_file_id=nul
</button>
<button
class="btn variant-soft-secondary"
class="btn btn-sm variant-soft-secondary mx-1"
use:clipboard={$ae_loc.mod.sponsorships.link}
title={`Copy link to this sponsorship submission (ID: ${$slct.sponsorship_id})`}
>
@@ -2496,7 +2551,7 @@ async function handle_delete_sponsorship_obj({sponsorship_id, hosted_file_id=nul
</button>
<button
class="btn variant-soft-secondary mx-1"
class="btn btn-sm variant-soft-secondary mx-1"
disabled={($slct.sponsorship_obj.poc_json && !$slct.sponsorship_obj.poc_json.email)}
title="Send confirmation email to POC"
on:click={async () => {