fix: consistent Lucide icons and auth checks on all Agreed buttons
session_view.svelte: replaced raw Unicode ✓/✗ in hardcoded color spans with Check/X Lucide components (class="mr-1") matching the app icon pattern. ae_comp__event_presenter_obj_li.svelte: same icon cleanup (removed bg-red-500, px-1, text-green-500 etc). Also brought disabled conditions in line with presenter_page_menu.svelte — now checks auth__kv.presenter by both event_presenter_id and email, plus person_id match, so multi-session and email-identity presenters can interact with their Agreed buttons from the list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -249,55 +249,44 @@ let ae_tmp: key_val = $state({});
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!$ae_loc.trusted_access &&
|
disabled={!$ae_loc.trusted_access &&
|
||||||
!events_auth_loc.current.auth__kv.presenter[
|
!events_auth_loc.current.auth__kv.presenter[event_presenter_obj.event_presenter_id] &&
|
||||||
event_presenter_obj.event_presenter_id
|
!events_auth_loc.current.auth__kv.presenter[event_presenter_obj.email ?? ''] &&
|
||||||
]}
|
!(events_auth_loc.current.auth__person.id && events_auth_loc.current.auth__person.id === event_presenter_obj.person_id)}
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
console.log('View terms and conditions');
|
console.log('View terms and conditions');
|
||||||
$events_slct.event_presentation_id =
|
$events_slct.event_presentation_id =
|
||||||
event_presenter_obj.event_presentation_id;
|
event_presenter_obj.event_presentation_id;
|
||||||
// $events_slct.event_presentation_obj = $lq__event_presentation_obj;
|
|
||||||
|
|
||||||
$events_slct.event_presenter_id =
|
$events_slct.event_presenter_id =
|
||||||
event_presenter_obj.event_presenter_id;
|
event_presenter_obj.event_presenter_id;
|
||||||
// $events_slct.event_presenter_obj = event_presenter_obj;
|
|
||||||
|
|
||||||
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
||||||
event_presenter_obj.event_presenter_id;
|
event_presenter_obj.event_presenter_id;
|
||||||
}}
|
}}
|
||||||
class="btn preset-tonal-success hover:preset-filled-success-500 my-0.5"
|
class="btn preset-tonal-success hover:preset-filled-success-500 my-0.5"
|
||||||
class:btn-sm={display_mode != 'default'}
|
class:btn-sm={display_mode != 'default'}
|
||||||
title="Agreed to terms and conditions">
|
title="Agreed to terms and conditions">
|
||||||
<Check size="1em" class="px-1 text-green-500" />
|
<Check size="1em" class="mr-1" />
|
||||||
Agreed
|
Agreed
|
||||||
</button>
|
</button>
|
||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!$ae_loc.trusted_access &&
|
disabled={!$ae_loc.trusted_access &&
|
||||||
!events_auth_loc.current.auth__kv.presenter[
|
!events_auth_loc.current.auth__kv.presenter[event_presenter_obj.event_presenter_id] &&
|
||||||
event_presenter_obj.event_presenter_id
|
!events_auth_loc.current.auth__kv.presenter[event_presenter_obj.email ?? ''] &&
|
||||||
]}
|
!(events_auth_loc.current.auth__person.id && events_auth_loc.current.auth__person.id === event_presenter_obj.person_id)}
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
console.log('View terms and conditions');
|
console.log('View terms and conditions');
|
||||||
|
|
||||||
$events_slct.event_presentation_id =
|
$events_slct.event_presentation_id =
|
||||||
event_presenter_obj.event_presentation_id;
|
event_presenter_obj.event_presentation_id;
|
||||||
// $events_slct.event_presentation_obj = $lq__event_presentation_obj;
|
|
||||||
|
|
||||||
$events_slct.event_presenter_id =
|
$events_slct.event_presenter_id =
|
||||||
event_presenter_obj.event_presenter_id;
|
event_presenter_obj.event_presenter_id;
|
||||||
// $events_slct.event_presenter_obj = event_presenter_obj;
|
|
||||||
|
|
||||||
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
||||||
event_presenter_obj.event_presenter_id;
|
event_presenter_obj.event_presenter_id;
|
||||||
}}
|
}}
|
||||||
class="btn preset-tonal-warning border-warning-500 hover:preset-filled-warning-500 my-0.5 border"
|
class="btn preset-tonal-warning border-warning-500 hover:preset-filled-warning-500 my-0.5 border"
|
||||||
class:btn-sm={display_mode != 'default'}
|
class:btn-sm={display_mode != 'default'}
|
||||||
title="View terms and conditions">
|
title="View terms and conditions">
|
||||||
<X
|
<X size="1em" class="mr-1" />
|
||||||
size="1em"
|
|
||||||
class="mx-1 bg-red-500 px-1 text-white" />
|
|
||||||
Not yet agreed
|
Not yet agreed
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import { db_events } from '$lib/ae_events/db_events';
|
|||||||
import Comp_event_session_poc_profile from './ae_comp__event_session_poc_profile.svelte';
|
import Comp_event_session_poc_profile from './ae_comp__event_session_poc_profile.svelte';
|
||||||
import Comp_event_session_poc_form_agree from './ae_comp__event_session_poc_form_agree.svelte';
|
import Comp_event_session_poc_form_agree from './ae_comp__event_session_poc_form_agree.svelte';
|
||||||
import {
|
import {
|
||||||
|
Check,
|
||||||
ChevronDown,
|
ChevronDown,
|
||||||
ChevronUp,
|
ChevronUp,
|
||||||
Clock,
|
Clock,
|
||||||
@@ -45,7 +46,8 @@ import {
|
|||||||
MapPin,
|
MapPin,
|
||||||
Pencil,
|
Pencil,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
Unlink
|
Unlink,
|
||||||
|
X
|
||||||
} from '@lucide/svelte';
|
} from '@lucide/svelte';
|
||||||
|
|
||||||
if (!$events_sess.pres_mgmt) {
|
if (!$events_sess.pres_mgmt) {
|
||||||
@@ -512,9 +514,9 @@ async function send_poc_email_link() {
|
|||||||
onclick={() =>
|
onclick={() =>
|
||||||
($events_sess.pres_mgmt.show_modal__session_poc_agree = true)}>
|
($events_sess.pres_mgmt.show_modal__session_poc_agree = true)}>
|
||||||
{#if $lq__event_session_obj?.poc_agree}
|
{#if $lq__event_session_obj?.poc_agree}
|
||||||
<span class="mr-1 text-green-500">✓</span> Agreed
|
<Check size="1em" class="mr-1" /> Agreed
|
||||||
{:else}
|
{:else}
|
||||||
<span class="mr-1 text-red-500">✗</span> Not yet agreed
|
<X size="1em" class="mr-1" /> Not yet agreed
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user