Now with clear search text button.
This commit is contained in:
@@ -74,13 +74,13 @@ onMount(() => {
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
<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}
|
||||
<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}
|
||||
<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}
|
||||
|
||||
<!-- <Element_data_store
|
||||
|
||||
@@ -214,13 +214,26 @@ $: if ($events_trigger == 'load__event_session_obj_li' && $events_slct.event_id)
|
||||
autocomplete="off"
|
||||
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
|
||||
type="search"
|
||||
placeholder="Search for a session"
|
||||
id="session_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={() => {
|
||||
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';
|
||||
@@ -233,7 +246,7 @@ $: if ($events_trigger == 'load__event_session_obj_li' && $events_slct.event_id)
|
||||
|
||||
<button
|
||||
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={() => {
|
||||
|
||||
}}
|
||||
|
||||
@@ -448,83 +448,113 @@ function send_sign_in_poc_email(
|
||||
</span>
|
||||
|
||||
{#if $ae_loc.trusted_access }
|
||||
<Element_ae_crud
|
||||
trigger_patch={ae_triggers.update_person_poc}
|
||||
api_cfg={$ae_api}
|
||||
object_type={'event_session'}
|
||||
object_id={$lq__event_session_obj?.event_session_id_random}
|
||||
field_name={'poc_person_id_random'}
|
||||
field_type={'button'}
|
||||
field_value={ae_tmp.poc_person_id}
|
||||
allow_null={false}
|
||||
hide_edit_btn={true}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
class_li={'m-1'}
|
||||
on:ae_crud_updated={e => {
|
||||
console.log(`ae_crud_updated:`, e.detail);
|
||||
<Element_ae_crud
|
||||
trigger_patch={ae_triggers.update_person_poc}
|
||||
api_cfg={$ae_api}
|
||||
object_type={'event_session'}
|
||||
object_id={$lq__event_session_obj?.event_session_id_random}
|
||||
field_name={'poc_person_id_random'}
|
||||
field_type={'button'}
|
||||
field_value={ae_tmp.poc_person_id}
|
||||
allow_null={false}
|
||||
hide_edit_btn={true}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
class_li={'m-1'}
|
||||
on:ae_crud_updated={e => {
|
||||
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})
|
||||
// .then(function (load_results) {
|
||||
// // Wait and then close
|
||||
// // $events_loc.pres_mgmt.show_content__agree_text = null;
|
||||
// Maybe reload page?
|
||||
// window.location.reload();
|
||||
});
|
||||
}}
|
||||
>
|
||||
{#if ae_tmp?.show__edit_poc_person}
|
||||
|
||||
// // Maybe reload page... to get the outline view to refresh?
|
||||
// window.location.reload();
|
||||
// });
|
||||
}}
|
||||
>
|
||||
{#if ae_tmp?.show__edit_poc_person}
|
||||
<!-- <label class="text-sm">Select the POC for the session: -->
|
||||
POC:
|
||||
{#await $slct.person_obj_li}
|
||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||
{:then person_obj_li}
|
||||
{#if person_obj_li && person_obj_li.length > 0}
|
||||
<select
|
||||
class="select max-w-36 text-sm"
|
||||
{#await $slct.person_obj_li}
|
||||
<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:
|
||||
<select
|
||||
bind:value={ae_tmp.poc_person_id}
|
||||
class="select min-w-fit max-w-md text-sm"
|
||||
>
|
||||
{#each person_obj_li as person_obj}
|
||||
<option
|
||||
value={person_obj.person_id_random}
|
||||
selected={person_obj.person_id_random == $lq__event_session_obj?.poc_person_id_random}
|
||||
>
|
||||
{#each person_obj_li as person_obj}
|
||||
<option
|
||||
value={person_obj.person_id_random}
|
||||
selected={person_obj.person_id_random == $lq__event_session_obj?.poc_person_id_random}
|
||||
>
|
||||
{person_obj.full_name}
|
||||
({person_obj.primary_email})
|
||||
(ID: {person_obj.person_id_random})
|
||||
</option>
|
||||
{/each}
|
||||
</select>
|
||||
{/if}
|
||||
{/await}
|
||||
|
||||
<!-- </label> -->
|
||||
{/if}
|
||||
{person_obj.full_name}
|
||||
({person_obj.primary_email})
|
||||
<!-- (ID: {person_obj.person_id_random}) -->
|
||||
</option>
|
||||
{/each}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
disabled={ae_tmp.poc_person_id == $lq__event_session_obj?.poc_person_id_random}
|
||||
on:click={() => {
|
||||
console.log('Edit the POC person for the session.');
|
||||
console.log('Save the POC person for the session.');
|
||||
|
||||
let params = {
|
||||
qry__limit: 300,
|
||||
}
|
||||
let person_id = ae_tmp.poc_person_id;
|
||||
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_tmp.poc_person_id = $lq__event_session_obj?.poc_person_id_random;ae_tmp.show__edit_poc_person = true;
|
||||
ae_triggers.update_person_poc = true;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||
>
|
||||
<span class="fas fa-edit mx-1"></span>
|
||||
Edit
|
||||
<span class="fas fa-save mx-1"></span>
|
||||
Save
|
||||
</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}
|
||||
|
||||
<span class="float-right">
|
||||
|
||||
Reference in New Issue
Block a user