Updating the permissions. Now with show/hide email access link.
This commit is contained in:
@@ -584,6 +584,9 @@ export function sync_config__event_pres_mgmt(
|
||||
// Show content:
|
||||
// pres_mgmt_cfg_local.show__navigation = pres_mgmt_cfg_remote?.show__navigation ?? false;
|
||||
|
||||
pres_mgmt_cfg_local.show__copy_access_link = pres_mgmt_cfg_remote?.show__copy_access_link ?? false;
|
||||
pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false;
|
||||
|
||||
pres_mgmt_cfg_local.file_purpose_option_kv = pres_mgmt_cfg_remote?.file_purpose_option_kv ?? null;
|
||||
|
||||
// Deal with things that can be overridden:
|
||||
@@ -628,8 +631,8 @@ export function sync_config__event_pres_mgmt(
|
||||
pres_mgmt_cfg_local.hide__session_poc_biography = pres_mgmt_cfg_remote?.hide__session_poc_biography ?? false; // New and in progress
|
||||
pres_mgmt_cfg_local.hide__session_poc_profile_pic = pres_mgmt_cfg_remote?.hide__session_poc_profile_pic ?? false; // New and in progress
|
||||
|
||||
pres_mgmt_cfg_local.show__copy_access_link = pres_mgmt_cfg_remote?.show__copy_access_link ?? false;
|
||||
pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false;
|
||||
// pres_mgmt_cfg_local.show__copy_access_link = pres_mgmt_cfg_remote?.show__copy_access_link ?? false;
|
||||
// pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false;
|
||||
pres_mgmt_cfg_local.show__launcher_link = pres_mgmt_cfg_remote?.show__launcher_link ?? false;
|
||||
pres_mgmt_cfg_local.show__launcher_link_legacy = pres_mgmt_cfg_remote?.show__launcher_link_legacy ?? false;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,9 @@ $: lq__event_location_obj_li = liveQuery(async () => {
|
||||
|
||||
// Functions and Logic
|
||||
onMount(() => {
|
||||
console.log('Events Location [slug]: +page.svelte');
|
||||
if (log_lvl) {
|
||||
console.log('Events [event_id] Locations: +page.svelte');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -202,6 +202,7 @@ if (!$ae_loc.authenticated_access && $events_loc.pres_mgmt.show_content__present
|
||||
{/if}
|
||||
|
||||
{#if $events_loc.pres_mgmt?.require__presenter_agree
|
||||
&& $events_loc?.pres_mgmt?.show__email_access_link
|
||||
&& $lq__event_presenter_obj?.email
|
||||
&& ($ae_loc.public_access || !$events_loc.auth__person?.id)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { db_events } from "$lib/db_events";
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { events_loc, events_sess, events_slct, events_trigger, events_trig_kv } from '$lib/ae_events_stores';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
|
||||
// Exports
|
||||
export let log_lvl: number = 0;
|
||||
@@ -143,7 +143,7 @@ let lq__event_presentation_obj = liveQuery(
|
||||
</a>
|
||||
|
||||
|
||||
{#if event_presenter_obj?.email && ($ae_loc.administrator_access || !$events_loc.auth__person?.id)}
|
||||
{#if ($events_loc?.pres_mgmt?.show__email_access_link && event_presenter_obj?.email && ($ae_loc.administrator_access || !$events_loc.auth__person?.id))}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
|
||||
@@ -11,10 +11,10 @@ import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
|
||||
// Exports
|
||||
export let container_class_li: string|Array<string> = [];
|
||||
export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
export let link_to_type: string;
|
||||
export let link_to_id: string;
|
||||
export let event_presenter_id_random_li: Array<string>;
|
||||
// export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
// export let link_to_type: string;
|
||||
// export let link_to_id: string;
|
||||
// export let event_presenter_id_random_li: Array<string>;
|
||||
export let lq__event_presenter_obj_li: any;
|
||||
export let log_lvl: number = 0;
|
||||
|
||||
@@ -23,9 +23,10 @@ export let log_lvl: number = 0;
|
||||
export let show_presentation_fields: boolean = false;
|
||||
export let show_session_fields: boolean = false;
|
||||
|
||||
// if (log_lvl) {
|
||||
// console.log(`link_to_type: ${link_to_type}; link_to_id: ${link_to_id}`);
|
||||
// }
|
||||
if (log_lvl) {
|
||||
console.log(`container_class_li: ${container_class_li}; show_presentation_fields: ${show_presentation_fields}; show_session_fields: ${show_session_fields}`);
|
||||
// console.log(`link_to_type: ${link_to_type}; link_to_id: ${link_to_id}`);
|
||||
}
|
||||
|
||||
// Variables
|
||||
// let ae_promises: key_val = {};
|
||||
|
||||
@@ -21,7 +21,7 @@ export let events__session_search: boolean = false; // event_id
|
||||
|
||||
<!-- This is for common navigation links. -->
|
||||
<div
|
||||
class="ae_comp__events_menu_nav flex flex-row flex-wrap gap-0.5 items-center justify-around"
|
||||
class="ae_comp__events_menu_nav flex flex-row flex-wrap gap-1.5 items-center justify-around"
|
||||
class:hidden={hide}
|
||||
>
|
||||
<span
|
||||
@@ -63,11 +63,9 @@ export let events__session_search: boolean = false; // event_id
|
||||
class="{ae_snip.classes__events_pres_mgmt_menu__button}"
|
||||
class:hidden={!events__session_search}
|
||||
>
|
||||
<!-- <span class="fas fa-arrow-left m-1"></span> -->
|
||||
<span class="fas fa-search m-1"></span>
|
||||
Back to Session Search
|
||||
Session Search
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="/events_pres_mgmt/session/{events__session_id}"
|
||||
class="{ae_snip.classes__events_pres_mgmt_menu__button}"
|
||||
@@ -77,5 +75,23 @@ export let events__session_search: boolean = false; // event_id
|
||||
<span class="fas fa-chalkboard-teacher m-1"></span>
|
||||
Back to Session
|
||||
</a>
|
||||
<a
|
||||
href="/events/{event_id}/launcher/{events__launcher_id}"
|
||||
class="{ae_snip.classes__events_pres_mgmt_menu__button}"
|
||||
class:hidden={!events__launcher_id}
|
||||
>
|
||||
<span class="fas fa-plane m-1"></span>
|
||||
Launcher
|
||||
</a>
|
||||
<a
|
||||
href="/events/{event_id}/location/{events__location_id}"
|
||||
class="{ae_snip.classes__events_pres_mgmt_menu__button}"
|
||||
class:hidden={!events__location_id}
|
||||
>
|
||||
<!-- <span class="fas fa-map m-1"></span> -->
|
||||
<span class="fas fa-map-marker-alt m-1"></span>
|
||||
Session Location
|
||||
</a>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
@@ -19,10 +19,10 @@ export let allow_moderator: boolean = false;
|
||||
export let show_direct_download: boolean = false;
|
||||
export let show_location_fields: boolean = false;
|
||||
export let show_presentation_fields: boolean = false;
|
||||
export let show_presenter_fields: boolean = false;
|
||||
// export let show_presenter_fields: boolean = false;
|
||||
export let show_session_fields: boolean = false;
|
||||
|
||||
export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
// export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
|
||||
// Variables
|
||||
let ae_promises: key_val = {};
|
||||
@@ -37,8 +37,8 @@ let lq_kv__event_file_obj_li = liveQuery(
|
||||
.bulkGet(event_file_id_random_li)
|
||||
);
|
||||
|
||||
// Define the list of unacceptable characters
|
||||
const unacceptable_chars = /[ <>:"/\\|?*]/g;
|
||||
// Define the list of unacceptable characters if not using the default.
|
||||
// const unacceptable_chars = /[ <>:"/\\|?*]/g;
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -5,24 +5,25 @@
|
||||
// import { liveQuery } from "dexie";
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// Imports - events specific
|
||||
import { events_loc, events_sess, events_slct, events_trigger, events_trig_kv } from '$lib/ae_events_stores';
|
||||
// import { events_loc, events_sess, events_slct, events_trigger, events_trig_kv } from '$lib/ae_events_stores';
|
||||
// import { db_events } from "$lib/db_events";
|
||||
|
||||
// Exports
|
||||
export let container_class_li: string|Array<string> = [];
|
||||
export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher';
|
||||
export let link_to_type: string;
|
||||
export let link_to_id: string;
|
||||
export let event_session_id_random_li: Array<string>;
|
||||
// export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher';
|
||||
// export let link_to_type: string;
|
||||
// export let link_to_id: string;
|
||||
// export let event_session_id_random_li: Array<string>;
|
||||
export let lq__event_session_obj_li: any;
|
||||
export let log_lvl: number = 0;
|
||||
|
||||
export let show_location_fields: boolean = true;
|
||||
|
||||
// Functions and Logic
|
||||
// if (log_lvl) {
|
||||
// console.log(`link_to_type: ${link_to_type}; link_to_id: ${link_to_id}`);
|
||||
// }
|
||||
if (log_lvl) {
|
||||
console.log(`container_class_li: ${container_class_li}; show_location_fields: ${show_location_fields}`);
|
||||
// console.log(`link_to_type: ${link_to_type}; link_to_id: ${link_to_id}`);
|
||||
}
|
||||
|
||||
// let lq_kv__event_session_obj_li = liveQuery(
|
||||
// () => db_events.sessions
|
||||
|
||||
@@ -35,11 +35,14 @@ let ae_triggers: key_val = {};
|
||||
<div
|
||||
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">
|
||||
|
||||
<!-- launcher_id is the event_location_id -->
|
||||
<Comp__events_menu_nav
|
||||
hide={false}
|
||||
event_id={$lq__event_session_obj?.event_id}
|
||||
events__reports={$lq__event_session_obj?.event_id && $ae_loc.trusted_access}
|
||||
events__session_search={$lq__event_session_obj?.event_id}
|
||||
events__launcher_id={$lq__event_session_obj?.event_location_id && $ae_loc.administrator_access}
|
||||
events__location_id={$lq__event_session_obj?.event_location_id && $ae_loc.trusted_access}
|
||||
events__locations={$ae_loc.administrator_access}
|
||||
/>
|
||||
|
||||
|
||||
@@ -720,6 +720,7 @@ $: if ($lq__event_session_obj) {
|
||||
<span class="text-green-500">Signed In</span>
|
||||
{/if}
|
||||
{#if $events_loc.pres_mgmt?.require__session_agree
|
||||
&& $events_loc?.pres_mgmt?.show__email_access_link
|
||||
&& $lq__event_session_obj?.poc_person_primary_email
|
||||
&& ($ae_loc.trusted_access || !$events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user