Now with clear search text button.
This commit is contained in:
@@ -74,13 +74,13 @@ onMount(() => {
|
|||||||
|
|
||||||
{#if $ae_loc.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<h3 class="h4">Administrator Access - Technical Support</h3>
|
<h3 class="h4">Administrator Access - Technical Support</h3>
|
||||||
<p>Your accessing the presentation management system with "administrator" level permissions.</p>
|
<p>You are accessing the presentation management system with "administrator" level permissions.</p>
|
||||||
{:else if $ae_loc.trusted_access}
|
{:else if $ae_loc.trusted_access}
|
||||||
<h3 class="h4">Trusted Access - Staff</h3>
|
<h3 class="h4">Trusted Access - Staff</h3>
|
||||||
<p>Your accessing the presentation management system with "trusted" level permissions.</p>
|
<p>You are accessing the presentation management system with "trusted" level permissions.</p>
|
||||||
{:else if !$ae_loc.trusted_access}
|
{:else if !$ae_loc.trusted_access}
|
||||||
<h3 class="h4">Restricted Access</h3>
|
<h3 class="h4">Restricted Access</h3>
|
||||||
<p>Your accessing to the presentation management system is limited</p>
|
<p>You are accessing to the presentation management system is limited</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- <Element_data_store
|
<!-- <Element_data_store
|
||||||
|
|||||||
@@ -214,13 +214,26 @@ $: if ($events_trigger == 'load__event_session_obj_li' && $events_slct.event_id)
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
class="form flex-grow flex flex-row flex-wrap gap-1 justify-center items-center w-full"
|
class="form flex-grow flex flex-row flex-wrap gap-1 justify-center items-center w-full"
|
||||||
>
|
>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition-all mx-1"
|
||||||
|
on:click={() => {
|
||||||
|
$events_sess.pres_mgmt.fulltext_search_qry_str = '';
|
||||||
|
$events_trigger = 'load__event_session_obj_li';
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<!-- <span class="fas fa-backspace"></span> -->
|
||||||
|
<!-- <span class="fas fa-broom"></span> -->
|
||||||
|
<span class="fas fa-remove-format"></span>
|
||||||
|
<!-- Clear text -->
|
||||||
|
</button>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
placeholder="Search for a session"
|
placeholder="Search for a session"
|
||||||
id="session_fulltext_search_qry_str"
|
id="session_fulltext_search_qry_str"
|
||||||
bind:value={$events_sess.pres_mgmt.fulltext_search_qry_str}
|
bind:value={$events_sess.pres_mgmt.fulltext_search_qry_str}
|
||||||
class="input text-1xl hover:text-2xl font-bold font-mono w-80 transition-all"
|
class="input text-1xl hover:text-2xl font-bold font-mono w-80 transition-all mx-1"
|
||||||
on:keyup={() => {
|
on:keyup={() => {
|
||||||
if ($events_sess.pres_mgmt?.fulltext_search_qry_str && $events_sess.pres_mgmt.fulltext_search_qry_str.length >= 3) {
|
if ($events_sess.pres_mgmt?.fulltext_search_qry_str && $events_sess.pres_mgmt.fulltext_search_qry_str.length >= 3) {
|
||||||
$events_trigger = 'load__event_session_obj_li';
|
$events_trigger = 'load__event_session_obj_li';
|
||||||
@@ -233,7 +246,7 @@ $: if ($events_trigger == 'load__event_session_obj_li' && $events_slct.event_id)
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="btn btn-lg variant-ghost-success hover:variant-filled-success text-2xl font-bold w-48 transition-all"
|
class="btn btn-lg variant-ghost-success hover:variant-filled-success text-2xl font-bold w-48 transition-all mx-1"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -448,83 +448,113 @@ function send_sign_in_poc_email(
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access }
|
{#if $ae_loc.trusted_access }
|
||||||
<Element_ae_crud
|
<Element_ae_crud
|
||||||
trigger_patch={ae_triggers.update_person_poc}
|
trigger_patch={ae_triggers.update_person_poc}
|
||||||
api_cfg={$ae_api}
|
api_cfg={$ae_api}
|
||||||
object_type={'event_session'}
|
object_type={'event_session'}
|
||||||
object_id={$lq__event_session_obj?.event_session_id_random}
|
object_id={$lq__event_session_obj?.event_session_id_random}
|
||||||
field_name={'poc_person_id_random'}
|
field_name={'poc_person_id_random'}
|
||||||
field_type={'button'}
|
field_type={'button'}
|
||||||
field_value={ae_tmp.poc_person_id}
|
field_value={ae_tmp.poc_person_id}
|
||||||
allow_null={false}
|
allow_null={false}
|
||||||
hide_edit_btn={true}
|
hide_edit_btn={true}
|
||||||
outline_element={false}
|
outline_element={false}
|
||||||
show_crud={false}
|
show_crud={false}
|
||||||
display_inline={true}
|
display_inline={true}
|
||||||
class_li={'m-1'}
|
class_li={'m-1'}
|
||||||
on:ae_crud_updated={e => {
|
on:ae_crud_updated={e => {
|
||||||
console.log(`ae_crud_updated:`, e.detail);
|
console.log(`ae_crud_updated:`, e.detail);
|
||||||
|
|
||||||
// Wait 1 second to make sure it saved...?
|
events_func.handle_load_ae_obj_id__event_session({api_cfg: $ae_api, event_session_id: $lq__event_session_obj?.event_session_id_random, log_lvl: 1})
|
||||||
|
.then(function (load_results) {
|
||||||
|
ae_tmp.poc_person_id = null;
|
||||||
|
ae_tmp.show__edit_poc_person = false;
|
||||||
|
|
||||||
// events_func.handle_load_ae_obj_id__event_session({api_cfg: $ae_api, event_session_id: $lq__event_session_obj?.event_session_id_random, log_lvl: 1})
|
// Maybe reload page?
|
||||||
// .then(function (load_results) {
|
// window.location.reload();
|
||||||
// // Wait and then close
|
});
|
||||||
// // $events_loc.pres_mgmt.show_content__agree_text = null;
|
}}
|
||||||
|
>
|
||||||
|
{#if ae_tmp?.show__edit_poc_person}
|
||||||
|
|
||||||
// // Maybe reload page... to get the outline view to refresh?
|
{#await $slct.person_obj_li}
|
||||||
// window.location.reload();
|
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||||
// });
|
{:then person_obj_li}
|
||||||
}}
|
{#if person_obj_li && person_obj_li.length > 0}
|
||||||
>
|
<label class="text-sm">PoC:
|
||||||
{#if ae_tmp?.show__edit_poc_person}
|
<select
|
||||||
<!-- <label class="text-sm">Select the POC for the session: -->
|
bind:value={ae_tmp.poc_person_id}
|
||||||
POC:
|
class="select min-w-fit max-w-md text-sm"
|
||||||
{#await $slct.person_obj_li}
|
>
|
||||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
{#each person_obj_li as person_obj}
|
||||||
{:then person_obj_li}
|
<option
|
||||||
{#if person_obj_li && person_obj_li.length > 0}
|
value={person_obj.person_id_random}
|
||||||
<select
|
selected={person_obj.person_id_random == $lq__event_session_obj?.poc_person_id_random}
|
||||||
class="select max-w-36 text-sm"
|
|
||||||
>
|
>
|
||||||
{#each person_obj_li as person_obj}
|
{person_obj.full_name}
|
||||||
<option
|
({person_obj.primary_email})
|
||||||
value={person_obj.person_id_random}
|
<!-- (ID: {person_obj.person_id_random}) -->
|
||||||
selected={person_obj.person_id_random == $lq__event_session_obj?.poc_person_id_random}
|
</option>
|
||||||
>
|
{/each}
|
||||||
{person_obj.full_name}
|
</select>
|
||||||
({person_obj.primary_email})
|
</label>
|
||||||
(ID: {person_obj.person_id_random})
|
|
||||||
</option>
|
|
||||||
{/each}
|
|
||||||
</select>
|
|
||||||
{/if}
|
|
||||||
{/await}
|
|
||||||
|
|
||||||
<!-- </label> -->
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
disabled={ae_tmp.poc_person_id == $lq__event_session_obj?.poc_person_id_random}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
console.log('Edit the POC person for the session.');
|
console.log('Save the POC person for the session.');
|
||||||
|
|
||||||
let params = {
|
let person_id = ae_tmp.poc_person_id;
|
||||||
qry__limit: 300,
|
console.log('Selected person ID:', person_id);
|
||||||
}
|
|
||||||
|
|
||||||
$slct.person_obj_li = core_func.handle_load_ae_obj_li__person({api_cfg: $ae_api, account_id: $slct.account_id, params: params});
|
ae_triggers.update_person_poc = true;
|
||||||
|
|
||||||
ae_tmp.poc_person_id = $lq__event_session_obj?.poc_person_id_random;ae_tmp.show__edit_poc_person = true;
|
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||||
>
|
>
|
||||||
<span class="fas fa-edit mx-1"></span>
|
<span class="fas fa-save mx-1"></span>
|
||||||
Edit
|
Save
|
||||||
</button>
|
</button>
|
||||||
|
{/if}
|
||||||
|
{/await}
|
||||||
|
|
||||||
</Element_ae_crud>
|
{/if}
|
||||||
|
|
||||||
|
{#if ae_tmp.show__edit_poc_person}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
on:click={() => {
|
||||||
|
console.log('Cancel the POC person for the session.');
|
||||||
|
|
||||||
|
ae_tmp.poc_person_id = null;
|
||||||
|
ae_tmp.show__edit_poc_person = false;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||||
|
>
|
||||||
|
<span class="fas fa-times mx-1"></span>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
{:else}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
on:click={() => {
|
||||||
|
console.log('Edit the POC person for the session.');
|
||||||
|
|
||||||
|
let params = {
|
||||||
|
qry__limit: 300,
|
||||||
|
}
|
||||||
|
|
||||||
|
$slct.person_obj_li = core_func.handle_load_ae_obj_li__person({api_cfg: $ae_api, account_id: $slct.account_id, params: params});
|
||||||
|
|
||||||
|
ae_tmp.poc_person_id = $lq__event_session_obj?.poc_person_id_random;ae_tmp.show__edit_poc_person = true;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||||
|
>
|
||||||
|
<span class="fas fa-edit mx-1"></span>
|
||||||
|
Edit
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
</Element_ae_crud>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
Reference in New Issue
Block a user