diff --git a/README.md b/README.md index 0330a256..5d1c7d8f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# OSIT IDAA Novi App (Svelte) -This was created for IDAA to use within the Novi CMS static pages. It can run as a standalone HTML page or within an iframe. +# OSIT AE - Sponsorships App (Svelte) +This was created for One Sky IT's Aether system. diff --git a/index.html b/index.html index db3c75fe..057094f9 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - + Æ AE App - Sponsorships - Vite + Svelte + TS diff --git a/package-lock.json b/package-lock.json index 745ac290..cf1ee556 100644 --- a/package-lock.json +++ b/package-lock.json @@ -725,7 +725,7 @@ }, "node_modules/aether_npm_lib": { "version": "1.5.0", - "resolved": "git+ssh://git@bitbucket.org/oneskyit/one-sky-it-npm-library.git#6f614a5c39385ce73fcbc6fcfb534bf3b00c398b", + "resolved": "git+ssh://git@bitbucket.org/oneskyit/one-sky-it-npm-library.git#c4fa1d707ad713d1f408554c26687b6c3183efe0", "dependencies": { "axios": "^1.1.3", "html5-qrcode": "^2.1.6", diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/0_events__main.svelte b/src/0_events__main.svelte deleted file mode 100644 index 3b34f0f7..00000000 --- a/src/0_events__main.svelte +++ /dev/null @@ -1,841 +0,0 @@ - - - - - -
- - -
-

- Novi: {$ae_app.novi_full_name} - - ( - {$ae_app.novi_email} - {#if $ae_app.administrator_access} - Administrator - {:else if $ae_app.trusted_access} - Trusted - {/if} - UUID: {$ae_app.novi_uuid} - ) - -

- -
- - - -{#if $ae_app.events.show_main__options} -
- - - -
-{/if} - - -{#if $ae_app.events.show_list__event_obj_li} - -{/if} - - -{#if $ae_app.events.show_edit__event_obj} - - { - $ae_app.events.show_main__options = true; - $ae_app.events.show_list__event_obj_li = true; - $ae_app.events.show_edit__event_obj = false; - $ae_app.events.show_view__event_obj = false; - - const url = new URL(location); - url.searchParams.delete('event_id'); - history.pushState({}, '', url); - - let message = {'event_id': null}; - window.parent.postMessage(message, "*"); - }} - on:report__modal_dimensions={ (event) => { - console.log('*** on:report__modal_dimensions ***'); - console.log(event.detail); - - $ae_app.modal_dimensions = event.detail.modal_dimensions; - }} - > - {@html ($slct.event_obj.name ? $slct.event_obj.name : 'New Recovery Meeting')} - - - - - - - - -{/if} - - -{#if $ae_app.events.show_view__event_obj && $slct.event_obj} - - { - $slct.event_id = null; - $slct.event_obj = {}; - - $ae_app.events.show_main__options = true; - $ae_app.events.show_list__event_obj_li = true; - $ae_app.events.show_view__event_obj = false; - $ae_app.events.show_edit__event_obj = false; - - const url = new URL(location); - url.searchParams.delete('event_id'); - history.pushState({}, '', url); - - let message = {'event_id': null}; - window.parent.postMessage(message, "*"); - }} - on:report__modal_dimensions={ (event) => { - console.log('*** on:report__modal_dimensions ***'); - console.log(event.detail); - - $ae_app.modal_dimensions = event.detail.modal_dimensions; - }} - > - {@html $slct.event_obj.name} - - - - - - - - -{/if} - -
- - - diff --git a/src/0_sponsorships__main.svelte b/src/0_sponsorships__main.svelte new file mode 100644 index 00000000..767cecc2 --- /dev/null +++ b/src/0_sponsorships__main.svelte @@ -0,0 +1,840 @@ + + + + + +
+
+

Sponsorships for One Sky IT Demo

+
+ +
+

+ ae: {$ae_app.ae_full_name} + + ( + {$ae_app.ae_email} + {#if $ae_app.administrator_access} + Administrator + {:else if $ae_app.trusted_access} + Trusted + {/if} + user: {$ae_app.ae_user} + ) + +

+
+ +
+
+ {@html $ae_app.sponsorships.ds.sponsorships_info} +
+
+ +{#if $ae_app.sponsorships.show_main__options} +
+
+ {@html $ae_app.sponsorships.ds.sponsorships_options} +
+ + + +
+{/if} + + +{#if $slct.sponsorship_obj_li && $ae_app.sponsorships.show_list__sponsorship_obj_li} + +{/if} + + +{#if $ae_app.sponsorships.show_edit__sponsorship_obj} + + { + $ae_app.sponsorships.show_main__options = true; + $ae_app.sponsorships.show_list__sponsorship_obj_li = true; + $ae_app.sponsorships.show_edit__sponsorship_obj = false; + $ae_app.sponsorships.show_view__sponsorship_obj = false; + + const url = new URL(location); + url.searchParams.delete('sponsorship_id'); + history.pushState({}, '', url); + + let message = {'sponsorship_id': null}; + window.parent.postMessage(message, "*"); + }} + on:report__modal_dimensions={ (event) => { + console.log('*** on:report__modal_dimensions ***'); + console.log(event.detail); + + $ae_app.modal_dimensions = event.detail.modal_dimensions; + }} + > + {@html ($slct.sponsorship_obj.name ? $slct.sponsorship_obj.name : 'New Sponsorship')} + + + + + + + + +{/if} + + +{#if $ae_app.sponsorships.show_view__sponsorship_obj && $slct.sponsorship_obj} + + { + $slct.sponsorship_id = null; + $slct.sponsorship_obj = {}; + + $ae_app.sponsorships.show_main__options = true; + $ae_app.sponsorships.show_list__sponsorship_obj_li = true; + $ae_app.sponsorships.show_view__sponsorship_obj = false; + $ae_app.sponsorships.show_edit__sponsorship_obj = false; + + const url = new URL(location); + url.searchParams.delete('sponsorship_id'); + history.pushState({}, '', url); + + let message = {'sponsorship_id': null}; + window.parent.postMessage(message, "*"); + }} + on:report__modal_dimensions={ (event) => { + console.log('*** on:report__modal_dimensions ***'); + console.log(event.detail); + + $ae_app.modal_dimensions = event.detail.modal_dimensions; + }} + > + {@html $slct.sponsorship_obj.name} + + + + + + + + +{/if} + +
+ + + diff --git a/src/10_list__event_obj.svelte b/src/10_list__event_obj.svelte deleted file mode 100644 index 49463379..00000000 --- a/src/10_list__event_obj.svelte +++ /dev/null @@ -1,353 +0,0 @@ - - - -
-{#if $slct.event_obj_li} - -{#each $slct.event_obj_li as idaa_event_obj, index} -
- -
-

- {idaa_event_obj.name} - {#if idaa_event_obj.physical && idaa_event_obj.virtual} F2F and Virtual{:else if idaa_event_obj.physical} F2F{:else if idaa_event_obj.virtual} Virtual{/if} - {#if idaa_event_obj.type} {idaa_event_obj.type}{/if} - - {#if $ae_app.trusted_access && idaa_event_obj.hide} Hidden{/if} - {#if $ae_app.administrator_access && !idaa_event_obj.enable} Not enabled{/if} -

-
- -
- - - - {#if $ae_app.trusted_access || idaa_event_obj.external_person_id === $ae_app.novi_uuid || idaa_event_obj.contact_1_email === $ae_app.novi_email} - - - {/if} -
- - -
- - -
- Type of Recovery Meeting: - {idaa_event_obj.type} -
- -
- - - When: - - - {#if idaa_event_obj.weekday_sunday || idaa_event_obj.weekday_monday || idaa_event_obj.weekday_tuesday || idaa_event_obj.weekday_wednesday || idaa_event_obj.weekday_thursday || idaa_event_obj.weekday_friday || idaa_event_obj.weekday_saturday} - - - {#if idaa_event_obj.weekday_sunday}Sunday{/if} - {#if idaa_event_obj.weekday_monday}Monday{/if} - {#if idaa_event_obj.weekday_tuesday}Tuesday{/if} - {#if idaa_event_obj.weekday_wednesday}Wednesday{/if} - {#if idaa_event_obj.weekday_thursday}Thursday{/if} - {#if idaa_event_obj.weekday_friday}Friday{/if} - {#if idaa_event_obj.weekday_saturday}Saturday{/if} - - {/if} - - {#if idaa_event_obj.recurring_start_time} - - {ae.util.iso_datetime_formatter(`2023-01-01 ${idaa_event_obj.recurring_start_time}`, 'time_short')} - {/if} - {#if idaa_event_obj.timezone} - - ({idaa_event_obj.timezone}) - {:else} -
Required: No timezone was given!
- {/if} -
- -
- - {#if idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && idaa_event_obj.contact_li_json[0].full_name} -
- - Contact: - - {idaa_event_obj.contact_li_json[0].full_name} - {#if idaa_event_obj.contact_li_json[0].email} - | {idaa_event_obj.contact_li_json[0].email} - {/if} - {#if idaa_event_obj.contact_li_json[0].phone_mobile} - | Mobile: - {idaa_event_obj.contact_li_json[0].phone_mobile} - {/if} - {#if idaa_event_obj.contact_li_json[0].phone_home} - | Home: - {idaa_event_obj.contact_li_json[0].phone_home} - {/if} - {#if idaa_event_obj.contact_li_json[0].phone_office} - | Office: - {idaa_event_obj.contact_li_json[0].phone_office} - {/if} - {#if idaa_event_obj.contact_li_json[0].other_text}| {idaa_event_obj.contact_li_json[0].other_text}{/if} -
- {:else if idaa_event_obj.contact_1_id_random} -
- - Contact: - - {idaa_event_obj.contact_1_full_name} - {#if idaa_event_obj.contact_1_email} - | {idaa_event_obj.contact_1_email} - {/if} - {#if idaa_event_obj.contact_1_phone_mobile} - | Mobile: - {idaa_event_obj.contact_1_phone_mobile} - {/if} - {#if idaa_event_obj.contact_1_phone_home} - | Home: - {idaa_event_obj.contact_1_phone_home} - {/if} - {#if idaa_event_obj.contact_1_phone_office} - | Office: - {idaa_event_obj.contact_1_phone_office} - {/if} - {#if idaa_event_obj.contact_1_other_text}| {idaa_event_obj.contact_1_other_text}{/if} -
- {/if} - - {#if idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && idaa_event_obj.contact_li_json[1].full_name} -
- - Contact: - - {idaa_event_obj.contact_li_json[1].full_name} - {#if idaa_event_obj.contact_li_json[1].email} - | {idaa_event_obj.contact_li_json[1].email} - {/if} - {#if idaa_event_obj.contact_li_json[1].phone_mobile} - | Mobile: - {idaa_event_obj.contact_li_json[1].phone_mobile} - {/if} - {#if idaa_event_obj.contact_li_json[1].phone_home} - | Home: - {idaa_event_obj.contact_li_json[1].phone_home} - {/if} - {#if idaa_event_obj.contact_li_json[1].phone_office} - | Office: - {idaa_event_obj.contact_li_json[1].phone_office} - {/if} - {#if idaa_event_obj.contact_2_other_text}| {idaa_event_obj.contact_2_other_text}{/if} -
- {:else if idaa_event_obj.contact_2_id_random} -
- - Contact: - - {idaa_event_obj.contact_2_name} - {#if idaa_event_obj.contact_2_email} - | {idaa_event_obj.contact_2_email} - {/if} - {#if idaa_event_obj.contact_2_phone_mobile} - | Mobile: - {idaa_event_obj.contact_2_phone_mobile} - {/if} - {#if idaa_event_obj.contact_2_phone_home} - | Home: - {idaa_event_obj.contact_2_phone_home} - {/if} - {#if idaa_event_obj.contact_2_phone_office} - | Office: - {idaa_event_obj.contact_2_phone_office} - {/if} - {#if idaa_event_obj.contact_2_other_text}| {idaa_event_obj.contact_2_other_text}{/if} -
- {/if} - {#if $ae_app.trusted_access} - {#if (idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && !idaa_event_obj.contact_li_json[0].full_name) && !idaa_event_obj.contact_1_id_random && !idaa_event_obj.contact_2_id_random} -
Required: No contact information was given!
- {/if} - {#if !idaa_event_obj.external_person_id} -
New: This has not been linked to a Novi record!
- {/if} - {/if} -
- -
- - - {#if $ae_app.administrator_access} - - {/if} -
-{/each} - -{:else} -
No recovery meetings avalible to show at this time
-{/if} -
- - - diff --git a/src/10_list__sponsorship_obj.svelte b/src/10_list__sponsorship_obj.svelte new file mode 100644 index 00000000..21594bcd --- /dev/null +++ b/src/10_list__sponsorship_obj.svelte @@ -0,0 +1,163 @@ + + + +
+{#if $slct.sponsorship_obj_li} + + + + + + + + + + + + + + +{#each $slct.sponsorship_obj_li as ae_sponsorship_obj, index} + + + + + + + + + + + + + + + + + + +{/each} + +
OptionsName LevelPaidGuests + + POC + CreatedUpdated
+ + + {#if $ae_app.administrator_access} + + {/if} + {ae_sponsorship_obj.name} + + {#if ae_sponsorship_obj.level_num}{ae_sponsorship_obj.level_num}{/if} + {#if ae_sponsorship_obj.level_str}{ae_sponsorship_obj.level_str}{/if} + + {#if ae_sponsorship_obj.paid} + + + {:else} + + + {/if} + {#if ae_sponsorship_obj.amount} + ${ae_sponsorship_obj.amount} + {/if} + + {#if ae_sponsorship_obj.guest_li_json} + {ae_sponsorship_obj.guest_li_json.length} + {:else} + + -- None -- + {/if} + + {#if ae_sponsorship_obj.poc_json} + + {ae_sponsorship_obj.poc_json.given_name} {ae_sponsorship_obj.poc_json.family_name} + + {ae_sponsorship_obj.poc_json.email} + {/if} + {ae.util.iso_datetime_formatter(ae_sponsorship_obj.created_on, 'datetime_short')}{ae.util.iso_datetime_formatter(ae_sponsorship_obj.updated_on, 'datetime_short')}
+{:else} +
No sponsorships avalible to show at this time
+{/if} +
+ + + diff --git a/src/10_view__event_obj.svelte b/src/10_view__event_obj.svelte deleted file mode 100644 index 6eed2d2e..00000000 --- a/src/10_view__event_obj.svelte +++ /dev/null @@ -1,446 +0,0 @@ - - - -
- - - -
-
-
Description:
-
{@html $slct.event_obj.description}
-
- -
- Type of Recovery Meeting: - {$slct.event_obj.type} -
- -
- -
-
- Address: -
- {#if $slct.event_obj.location_address_json} - - {#if $slct.event_obj.physical} - {#if $slct.event_obj.location_address_json.name}{$slct.event_obj.location_address_json.name}
{/if} - {#if $slct.event_obj.location_address_json.line_1}{$slct.event_obj.location_address_json.line_1}
{/if} - {#if $slct.event_obj.location_address_json.line_2}{$slct.event_obj.location_address_json.line_2}
{/if} - {#if $slct.event_obj.location_address_json.line_3}{$slct.event_obj.location_address_json.line_3}
{/if} - {/if} - {#if $slct.event_obj.location_address_json.city}{$slct.event_obj.location_address_json.city}, {/if} - {#if $slct.event_obj.location_address_json.state_province}{$slct.event_obj.location_address_json.state_province}{/if} - {#if $slct.event_obj.physical} - {#if $slct.event_obj.location_address_json.postal_code}{$slct.event_obj.location_address_json.postal_code}{/if} - {/if} - {#if $slct.event_obj.location_address_json.country} -
- {$slct.event_obj.location_address_json.country} - {/if} - - {:else} - - {#if $slct.event_obj.physical} - {#if $slct.event_obj.address_name}{$slct.event_obj.address_name}
{/if} - {#if $slct.event_obj.address_line_1}{$slct.event_obj.address_line_1}
{/if} - {#if $slct.event_obj.address_line_2}{$slct.event_obj.address_line_2}
{/if} - {#if $slct.event_obj.address_line_3}{$slct.event_obj.address_line_3}
{/if} - {/if} - {#if $slct.event_obj.address_city}{$slct.event_obj.address_city}, {/if} - {#if $slct.event_obj.address_country_subdivision_name}{$slct.event_obj.address_country_subdivision_name}{/if} - {#if $slct.event_obj.physical} - {#if $slct.event_obj.address_postal_code}{$slct.event_obj.address_postal_code}{/if} - {/if} - {#if $slct.event_obj.address_country_name} -
- {$slct.event_obj.address_country_name} - {/if} - - {/if} -
- {#if $slct.event_obj.physical} -
- Additional information: {@html $slct.event_obj.location_text} -
- {/if} -
-
- -
-
- - - URL: - - - {$slct.event_obj.attend_url} - - - - Passcode: - - - {$slct.event_obj.attend_url_passcode} - -
-
- - - Phone: - - - {$slct.event_obj.attend_phone} - - - - Passcode: - - - {$slct.event_obj.attend_phone_passcode} - -
-
- Additional information: {@html $slct.event_obj.attend_text} -
-
- -
- -
- -
-
- - - Frequency: - - {#if $slct.event_obj.recurring_pattern == 'weekly'}Weekly - {:else if $slct.event_obj.recurring_pattern == 'monthly'}Monthly - {:else if $slct.event_obj.recurring_pattern == 'every other week'}Every Other Week - {:else if $slct.event_obj.recurring_pattern == 'other'}Other - {/if} - {#if $slct.event_obj.recurring_text && $slct.event_obj.recurring_text.length > 0} - {#if $slct.event_obj.recurring_text.includes('*gen*') && $ae_app.administrator_access} - {@html $slct.event_obj.recurring_text} - {:else if (!$slct.event_obj.recurring_text.includes('*gen*'))} - {@html $slct.event_obj.recurring_text} - {/if} - - {/if} -
-
- - - Days of week: - - {#if $slct.event_obj.weekday_sunday}Sunday{/if} - {#if $slct.event_obj.weekday_monday}Monday{/if} - {#if $slct.event_obj.weekday_tuesday}Tuesday{/if} - {#if $slct.event_obj.weekday_wednesday}Wednesday{/if} - {#if $slct.event_obj.weekday_thursday}Thursday{/if} - {#if $slct.event_obj.weekday_friday}Friday{/if} - {#if $slct.event_obj.weekday_saturday}Saturday{/if} -
-
- {#if $slct.event_obj.recurring_start_time} - - - Start time: - - {ae.util.iso_datetime_formatter(`2024-01-01 ${$slct.event_obj.recurring_start_time}`, 'time_short')} - - - - - End time: - {ae.util.iso_datetime_formatter(`2024-01-01 ${$slct.event_obj.recurring_end_time}`, 'time_short')} - - - - - - - Timezone: - {$slct.event_obj.timezone} - - - {#if $slct.event_obj.timezone} - - ( - Your TZ: - - {dayjs.tz(`${$ae_app.current_date_str} ${$slct.event_obj.recurring_start_time}`, $slct.event_obj.timezone).tz($ae_app.current_timezone).format('hh:mm A')} {$ae_app.current_timezone} - - ) - - {/if} - {:else} - No times set - {/if} - - - - -
-
- -
- - -
- - {#if $slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json.length && $slct.event_obj.contact_li_json[0].full_name} -
- - Contact: - - {$slct.event_obj.contact_li_json[0].full_name} - {#if $slct.event_obj.contact_li_json[0].email} - | {$slct.event_obj.contact_li_json[0].email} - {/if} - {#if $slct.event_obj.contact_li_json[0].phone_mobile} - | Mobile: - {$slct.event_obj.contact_li_json[0].phone_mobile} - {/if} - {#if $slct.event_obj.contact_li_json[0].phone_home} - | Home: - {$slct.event_obj.contact_li_json[0].phone_home} - {/if} - {#if $slct.event_obj.contact_li_json[0].phone_office} - | Office: - {$slct.event_obj.contact_li_json[0].phone_office} - {/if} - {#if $slct.event_obj.contact_li_json[0].other_text}| {$slct.event_obj.contact_li_json[0].other_text}{/if} -
- {:else if $slct.event_obj.contact_1_id_random} -
- - Contact: - - {$slct.event_obj.contact_1_name} - {#if $slct.event_obj.contact_1_email} - | {$slct.event_obj.contact_1_email} - {/if} - {#if $slct.event_obj.contact_1_phone_mobile} - | Mobile: - {$slct.event_obj.contact_1_phone_mobile} - {/if} - {#if $slct.event_obj.contact_1_phone_home} - | Home: - {$slct.event_obj.contact_1_phone_home} - {/if} - {#if $slct.event_obj.contact_1_phone_office} - | Office: - {$slct.event_obj.contact_1_phone_office} - {/if} - {#if $slct.event_obj.contact_1_other_text}| {$slct.event_obj.contact_1_other_text}{/if} -
- {/if} - - {#if $slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json.length && $slct.event_obj.contact_li_json[1].full_name} -
- - Contact: - - {$slct.event_obj.contact_li_json[1].full_name} - {#if $slct.event_obj.contact_li_json[1].email} - | {$slct.event_obj.contact_li_json[1].email} - {/if} - {#if $slct.event_obj.contact_li_json[1].phone_mobile} - | Mobile: - {$slct.event_obj.contact_li_json[1].phone_mobile} - {/if} - {#if $slct.event_obj.contact_li_json[1].phone_home} - | Home: - {$slct.event_obj.contact_li_json[1].phone_home} - {/if} - {#if $slct.event_obj.contact_li_json[1].phone_office} - | Office: - {$slct.event_obj.contact_li_json[1].phone_office} - {/if} - {#if $slct.event_obj.contact_li_json[1].other_text}| {$slct.event_obj.contact_li_json[1].other_text}{/if} -
- {:else if $slct.event_obj.contact_2_id_random} -
- - Contact: - - {$slct.event_obj.contact_2_name} - {#if $slct.event_obj.contact_2_email} - | {$slct.event_obj.contact_2_email} - {/if} - {#if $slct.event_obj.contact_2_phone_mobile} - | Mobile: - {$slct.event_obj.contact_2_phone_mobile} - {/if} - {#if $slct.event_obj.contact_2_phone_home} - | Home: - {$slct.event_obj.contact_2_phone_home} - {/if} - {#if $slct.event_obj.contact_2_phone_office} - | Office: - {$slct.event_obj.contact_2_phone_office} - {/if} - {#if $slct.event_obj.contact_2_other_text}| {$slct.event_obj.contact_2_other_text}{/if} -
- {/if} - - {#if !$slct.event_obj.contact_1_id_random && !$slct.event_obj.contact_2_id_random} -
No contact information was given!
- {/if} - -
- -
-
- - ID: - {$slct.event_obj.event_id_random} - - - Created on: {ae.util.iso_datetime_formatter($slct.event_obj.created_on, 'datetime_short')} - - - Updated on: {ae.util.iso_datetime_formatter($slct.event_obj.updated_on, 'datetime_short')} - -
- - {#if $ae_app.trusted_access || $slct.event_obj.external_person_id === $ae_app.novi_uuid || $slct.event_obj.contact_1_email === $ae_app.novi_email} -
- -
- {/if} -
- -
- -
- - - diff --git a/src/10_view__sponsorship_obj.svelte b/src/10_view__sponsorship_obj.svelte new file mode 100644 index 00000000..e062c3f2 --- /dev/null +++ b/src/10_view__sponsorship_obj.svelte @@ -0,0 +1,192 @@ + + + +
+ +
+

{@html $slct.sponsorship_obj.name}

+
+ +
+
+
Description:
+
{@html $slct.sponsorship_obj.description ? $slct.sponsorship_obj.description : '-- No Description Given --'}
+
+ +
+ Level of Sponsorship: + {$slct.sponsorship_obj.level_num} — {$slct.sponsorship_obj.level_str} +
+ +
+ Paid: + $ + + {$slct.sponsorship_obj.paid ? 'Yes, marked as paid' : 'Not yet marked as paid'} + +
+ + + +
+

Guest List

+ + {#if $slct.sponsorship_obj.guest_li_json && $slct.sponsorship_obj.guest_li_json.length && $slct.sponsorship_obj.guest_li_json[0].full_name} + + {:else} +
No guest list found!
+ {/if} + +
+ +
+
+ + ID: + {$slct.sponsorship_obj.sponsorship_id_random} + + + Created on: {ae.util.iso_datetime_formatter($slct.sponsorship_obj.created_on, 'datetime_short')} + + + Updated on: {ae.util.iso_datetime_formatter($slct.sponsorship_obj.updated_on, 'datetime_short')} + +
+ + {#if $ae_app.trusted_access || $slct.sponsorship_obj.external_person_id === $ae_app.novi_uuid || $slct.sponsorship_obj.contact_1_email === $ae_app.novi_email} +
+ +
+ {/if} +
+ +
+ +
+ + + diff --git a/src/app.css b/src/app.css index 4697b165..071d43d1 100644 --- a/src/app.css +++ b/src/app.css @@ -15,22 +15,63 @@ } body { - /* margin: 0; */ - /* display: flex; - place-items: center; */ - /* min-width: 320px; */ + /* Use boarder-box to make things easier with borders and scrolling in general. */ + box-sizing: border-box; - min-height: 100vh; - /* min-height: fit-content; */ - /* height: 100%; */ + /* outline: dashed thick blue; */ + /* border: solid thick blue; */ - min-width: 100vw; - /* width: 100%; */ + margin: 1em; + padding: 0em; - /* contain: layout; */ - /* contain: size; */ + /* Account for the margin */ + height: calc(100vh - 1em - 1em); + + /* max-width: 1280px; */ + + /* background-color: hsla(240, 50%, 20%); */ + background-color: hsla(207, 43%, 18%); + + /* Display as flex does not seem to work well here. */ } +body>.svelte_target { + + box-sizing: border-box; + /* box-sizing: content-box; */ + /* outline: solid thin hsla(0, 50%, 50%, .50); */ + border: solid medium hsla(0, 0%, 50%, .40); + /* border-color: hsla(207, 43%, 18%); */ + + /* background-color: white; */ + /* background-color: hsla(240, 100%, 95%, .97); */ + background-color: hsla(0, 0%, 100%, .90); + + + overflow: scroll; + + height: 100%; + /* max-height: calc(100% - 1em); */ + + /* width: 100%; */ + /* max-width: calc(100% - 1em); */ + max-width: 1280px; + + /* margin: 1em; */ + /* Use auto margin to center this element within the body */ + margin: auto; + padding: .5em; + + +} + +/* Use this to fix the scrolling. This is mostly useful for wide tables. */ +/* This must be applied to the parent of the table. */ +body>.svelte_target .svelte_component { + overflow: scroll; +} + + address { margin-bottom: .25em; padding-left: .5em; @@ -45,6 +86,39 @@ pre { border: none; } +table.ae_table { + /* border-collapse: collapse; */ + border-spacing: 0px; + border: solid thin hsla(0, 0%, 0%, .30); + + width: 100%; + max-width: 100%; + + /* margin: 1em; */ + /* padding: 1em; */ + /* overflow: scroll; */ + +} +.ae_table tr { + border: solid thin hsla(0, 0%, 0%, .20); +} +.ae_table th { + border: solid thin hsla(0, 0%, 0%, .10); + border-bottom: solid thin hsla(0, 0%, 0%, .20); + + padding: .5em; + + /* text-align: center; */ +} +.ae_table td { + border: solid thin hsla(0, 0%, 0%, .10); + + padding: .5em; + + text-align: center; +} + + textarea { /* width: calc(fit-content - 1em); */ width: 100%; @@ -256,6 +330,14 @@ button:focus-visible { /* justify-content: space-evenly; */ } +.ae_flex { + display: flex; + + /* flex-direction: row; */ + /* align-items: center; */ + /* justify-content: space-between; */ +} + .ae_column { display: flex; flex-direction: column; @@ -277,6 +359,17 @@ button:focus-visible { justify-content: space-around; } +.ae_text_align_left { + text-align: left; +} +.ae_text_align_center { + text-align: center; +} +.ae_text_align_right { + text-align: right; +} + + .ae_width_25 { width: 25%; /* max-width: 25%; */ @@ -377,6 +470,7 @@ button:focus-visible { border: solid medium hsla(0,100%,50%,.1); } +/* This covers the entire viewable area. Essentially a new "body" */ /* element_ae_modal ae_modal_showing_container ae_modal modal_cover_body */ .ae_modal { position: fixed; @@ -388,9 +482,11 @@ button:focus-visible { height: 100%; /* max-height: 100vh; */ - min-width: 100vw; - width: 100%; + min-width: 100%; + /* width: 100%; */ + width: 100vw; max-width: 100vw; + /* max-width: 1280px; */ /* background-color: hsla(180,75%,90%,.75); */ background-color: hsla(180,0%,90%,.75); @@ -409,7 +505,7 @@ button:focus-visible { /* Margin should stay 0 and padding can be used to create space within the modal for the actual content. */ margin: 0; - padding: 1em; + padding: 0em; /* pointer-events: auto; */ } diff --git a/src/main.ts b/src/main.ts index 7f213200..d3609907 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,9 +1,7 @@ import { ae } from 'aether_npm_lib'; import './app.css'; -import App from './App.svelte'; -import Archives from './0_archives__main.svelte'; -import Events from './0_events__main.svelte'; -import Posts from './0_posts__main.svelte'; +// import App from './App.svelte'; +import Sponsorships from './0_sponsorships__main.svelte'; let url_params = ae.util.get_url_params(); // console.log(url_params); @@ -15,50 +13,18 @@ if (document.getElementById('app')) { }); } -if (document.querySelector('.svelte_target.idaa_archives_main')) { - const archives_main_app = new Archives({ - target: document.querySelector('.svelte_target.idaa_archives_main'), - props: { - 'archive_id': url_params.archive_id, - 'novi_uuid': (url_params.uuid ? url_params.uuid : false), - 'novi_email': decodeURIComponent(url_params.email), // decodeURIComponent() is needed because the email is passed in as a url param. Should this be takenc are of by the ae.util.get_url_params() function? - 'novi_full_name': decodeURIComponent(url_params.full_name), - 'novi_admin_li': ['2b078deb-b4e7-4203-99da-9f7cd62159a5'], - 'novi_trusted_li': ['c9ea07b5-06b0-4a43-a2d0-8d06558c8a82', '58db22ee-4b0a-49a7-9f34-53d2ba85a84b'], - 'results_limit_administrator': 75, - 'results_limit_trusted': 50, - 'results_limit_authenticated': 25, - } - }); -} -if (document.querySelector('.svelte_target.idaa_events_main')) { - const events_main_app = new Events({ - target: document.querySelector('.svelte_target.idaa_events_main'), +if (document.querySelector('.svelte_target.ae_sponsorships_main')) { + const sponsorships_main_app = new Sponsorships({ + target: document.querySelector('.svelte_target.ae_sponsorships_main'), props: { - 'event_id': url_params.event_id, - 'novi_uuid': (url_params.uuid ? url_params.uuid : false), - 'novi_email': decodeURIComponent(url_params.email), // decodeURIComponent() is needed because the email is passed in as a url param. Should this be takenc are of by the ae.util.get_url_params() function? - 'novi_full_name': decodeURIComponent(url_params.full_name), - 'novi_admin_li': ['2b078deb-b4e7-4203-99da-9f7cd62159a5'], - 'novi_trusted_li': ['c9ea07b5-06b0-4a43-a2d0-8d06558c8a82', '58db22ee-4b0a-49a7-9f34-53d2ba85a84b'], - 'results_limit_administrator': 75, - 'results_limit_trusted': 50, - 'results_limit_authenticated': 25, - } - }); -} - -if (document.querySelector('.svelte_target.idaa_posts_main')) { - const posts_main_app = new Posts({ - target: document.querySelector('.svelte_target.idaa_posts_main'), - props: { - 'post_id': url_params.post_id, - 'novi_uuid': (url_params.uuid ? url_params.uuid : false), - 'novi_email': url_params.email, - 'novi_full_name': url_params.full_name, - 'novi_admin_li': ['2b078deb-b4e7-4203-99da-9f7cd62159a5'], - 'novi_trusted_li': ['c9ea07b5-06b0-4a43-a2d0-8d06558c8a82', '58db22ee-4b0a-49a7-9f34-53d2ba85a84b'], + // NOTE: decodeURIComponent() is needed because the value is passed in as a url param. Should this be taken care of by the ae.util.get_url_params() function? + 'sponsorship_id': url_params.sponsorship_id, + 'user': decodeURIComponent(url_params.email), + 'key': (url_params.key ? url_params.key : false), + // 'results_limit_administrator': 75, + // 'results_limit_trusted': 50, + // 'results_limit_authenticated': 25, } }); } diff --git a/src/stores.ts b/src/stores.ts index d85c514c..258db398 100644 --- a/src/stores.ts +++ b/src/stores.ts @@ -8,7 +8,7 @@ let fake_app_base_url_backup = 'https://bak-app.oneskyit.com'; let fake_api_base_url = 'https://dev-api.oneskyit.com'; let fake_api_base_url_backup = 'https://bak-api.oneskyit.com'; let fake_api_secret_key = 'dFP6J9DVj9hUgIMn-fNIqg'; -let fake_ae_account_id = 'Q8lR8Ai8hx2FjbQ3C_EH1Q'; // IDAA Q8lR8Ai8hx2FjbQ3C_EH1Q (13) +let fake_ae_account_id = '_XY7DXtc9MY'; // OSIT Demo _XY7DXtc9MY (1) let fake_ae_api_jwt_key="EHmSXZFKfMEW65E8kxCKmQ" // 22 characters; super secret Aether JWT signing key let fake_api_temporary_token = ''; @@ -81,7 +81,7 @@ export const ae_cfg = readable(ae_cfg_data); /* *** BEGIN *** Initialize slct variable */ // Updated 2023-11-01 export let slct_trigger: any = writable(null); -let slct_obj_template: key_val = { 'event_id': null, 'event_obj': {}, 'post_id': null, 'post_obj': {}, 'post_obj_li': [], 'post_comment_id': null, 'post_comment_obj': {}, 'post_comment_obj_li': [] }; +let slct_obj_template: key_val = { 'sponsorship_id': null, 'sponsorship_obj': {}, 'post_id': null, 'post_obj': {}, 'post_obj_li': [], 'post_comment_id': null, 'post_comment_obj': {}, 'post_comment_obj_li': [] }; export let slct = writable(slct_obj_template); let novi_api_cfg_data: key_val = {}; @@ -106,45 +106,15 @@ let ae_app_struct: key_val = { // YYYY-MM-DD string of the current date 'current_date_str': new Date().toISOString().slice(0, 10), - 'novi_uuid': null, - 'novi_email': null, - 'novi_full_name': null, - 'novi_admin_li': [], + 'ae_user': null, + 'ae_key': null, + 'ae_full_name': null, + 'ae_admin_li': [], - // Module - Archives (IDAA Archives) - 'archives':{ - // 'show_start_new_view_help': true, // getting ready to start new submission - // 'show_active_submission_view_help': true, // started in progress submission - // 'show_grant_list': false, - - 'show_archive_new_form': false, - 'show_archive_content_new_form': false, - 'show_archive_content_view': false, - 'show_archive_content_crud': false, - 'show_archive_content_crud_new': false, - 'show_list__archive_content_li_group': null, - - // all, disabled, enabled - 'enabled': 'enabled', // all or nothing... easier for now - - // all, hidden, not_hidden - 'hidden': 'not_hidden', // all or nothing... easier for now - - 'limit': 250, // all or nothing... easier for now - 'offset': 0, // all or nothing... easier for now - 'archive_group_sort': 'ASC', // ASC or DESC - 'content_group_sort': 'ASC', // ASC or DESC - - 'archive_id': null, - 'archive_content_id': null, - - 'ds':{}, - }, - - // Module - Events (IDAA Recovery Meetings) - 'events':{ - 'show_event_id_view': false, - 'show_event_id_edit': false, + // Module - OSIT Aether - Sponsorships () + 'sponsorships':{ + 'show_sponsorship_id_view': false, + 'show_sponsorship_id_edit': false, 'filter_meeting_type': 'all', // all, idaa, al-anon 'filter_meeting_group': 'all', // all, in-person, virtual @@ -159,31 +129,12 @@ let ae_app_struct: key_val = { 'limit': 250, // all or nothing... easier for now 'offset': 0, // all or nothing... easier for now - 'event_id': null, + 'group_sort': 'ASC', // ASC or DESC - 'ds':{}, - }, + 'sponsorship_id': null, + 'sponsorship_cfg_id': null, - // Module - Posts (IDAA Support BB) - 'posts':{ - 'show_post_new_form': false, - 'show_post_comment_new_form': false, - 'show_view__post_id': false, - 'show_post_comment_crud': false, - - 'show_post_comment_list': true, - - // all, disabled, enabled - 'enabled': 'enabled', // all or nothing... easier for now - - // all, hidden, not_hidden - 'hidden': 'not_hidden', // all or nothing... easier for now - - 'limit': 250, // all or nothing... easier for now - 'offset': 0, // all or nothing... easier for now - - 'post_id': null, - 'post_comment_id': null, + 'qry_status': null, 'ds':{}, },