Cleaned up the Badges main search area and the top in general.
This commit is contained in:
@@ -428,8 +428,10 @@ async function handle_search_refresh(params: any) {
|
|||||||
<Comp_badge_search event_id={$events_slct?.event_id ?? ''} log_lvl={1}
|
<Comp_badge_search event_id={$events_slct?.event_id ?? ''} log_lvl={1}
|
||||||
></Comp_badge_search>
|
></Comp_badge_search>
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access && $ae_loc.edit_mode && (badges_loc.current.enable_add_badge_btn ?? true)}
|
{#if $ae_loc.trusted_access && $ae_loc.edit_mode}
|
||||||
<div class="flex justify-end px-4">
|
<div class="flex flex-row items-center justify-center">
|
||||||
|
{#if badges_loc.current.enable_add_badge_btn ?? true}
|
||||||
|
<!-- <div class="flex justify-end px-4"> -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-sm preset-tonal-primary border-primary-500 border"
|
class="btn btn-sm preset-tonal-primary border-primary-500 border"
|
||||||
@@ -440,11 +442,11 @@ async function handle_search_refresh(params: any) {
|
|||||||
<UserPlus size="1em" />
|
<UserPlus size="1em" />
|
||||||
Create Badge
|
Create Badge
|
||||||
</button>
|
</button>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access && (badges_loc.current.enable_upload_badge_li_btn ?? true)}
|
{#if badges_loc.current.enable_upload_badge_li_btn ?? true}
|
||||||
<div class="flex justify-end px-4 mt-2">
|
<!-- <div class="flex justify-end px-4 mt-2"> -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-sm ml-2"
|
class="btn btn-sm ml-2"
|
||||||
@@ -454,6 +456,8 @@ async function handle_search_refresh(params: any) {
|
|||||||
}}>
|
}}>
|
||||||
<Upload size="1em" /> Upload Badge List
|
<Upload size="1em" /> Upload Badge List
|
||||||
</button>
|
</button>
|
||||||
|
<!-- </div> -->
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
@@ -161,6 +161,20 @@ function handle_qr_scan_result(event: {
|
|||||||
|
|
||||||
<div class="flex grow flex-row flex-wrap items-center justify-center gap-2">
|
<div class="flex grow flex-row flex-wrap items-center justify-center gap-2">
|
||||||
|
|
||||||
|
{#if (badges_loc.current.enable_search_qr && $ae_loc.edit_mode)}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_sess.badges.show_form__search = false;
|
||||||
|
$events_sess.badges.show_form__scan = true;
|
||||||
|
$events_sess.badges.qr_scan_start = true;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm preset-tonal-primary border-primary-500 border">
|
||||||
|
<QrCode size="1em" class="mr-1" />
|
||||||
|
QR Scan
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<!-- An extra "start" button that will just set the focus to the input form field -->
|
<!-- An extra "start" button that will just set the focus to the input form field -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -250,6 +264,18 @@ function handle_qr_scan_result(event: {
|
|||||||
<RemoveFormatting size="1.25em" />
|
<RemoveFormatting size="1.25em" />
|
||||||
<span class="hidden md:inline"> Clear </span>
|
<span class="hidden md:inline"> Clear </span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
{#if $ae_loc.edit_mode}
|
||||||
|
<label
|
||||||
|
class="bg-surface-200-800 rounded-token flex cursor-pointer items-center gap-1 px-2 py-1 text-xs font-semibold">
|
||||||
|
<span> Remote First </span>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
bind:checked={badges_loc.current.qry__remote_first}
|
||||||
|
onchange={handle_search_trigger}
|
||||||
|
class="checkbox checkbox-sm" />
|
||||||
|
</label>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{:else if $events_sess.badges.show_form__scan}
|
{:else if $events_sess.badges.show_form__scan}
|
||||||
@@ -259,48 +285,20 @@ function handle_qr_scan_result(event: {
|
|||||||
bind:start_qr_scanner={$events_sess.badges.qr_scan_start}
|
bind:start_qr_scanner={$events_sess.badges.qr_scan_start}
|
||||||
on_qr_scan_result={handle_qr_scan_result} />
|
on_qr_scan_result={handle_qr_scan_result} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{#if ($ae_loc.edit_mode)}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_sess.badges.show_form__search = true;
|
||||||
|
$events_sess.badges.show_form__scan = false;
|
||||||
|
$events_sess.badges.qr_scan_start = false;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm preset-tonal-primary border-primary-500 border">
|
||||||
|
<Search size="1em" class="mr-1" />
|
||||||
|
Search
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div
|
|
||||||
class="flex flex-row flex-wrap items-center justify-center gap-2 opacity-70 transition-all hover:opacity-100">
|
|
||||||
{#if $events_sess.badges.show_form__search}
|
|
||||||
{#if badges_loc.current.enable_search_qr ?? true}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_sess.badges.show_form__search = false;
|
|
||||||
$events_sess.badges.show_form__scan = true;
|
|
||||||
$events_sess.badges.qr_scan_start = true;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm preset-tonal-primary border-primary-500 border">
|
|
||||||
<QrCode size="1em" class="mr-1" />
|
|
||||||
QR Scan
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
{:else}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_sess.badges.show_form__search = true;
|
|
||||||
$events_sess.badges.show_form__scan = false;
|
|
||||||
$events_sess.badges.qr_scan_start = false;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm preset-tonal-primary border-primary-500 border">
|
|
||||||
<Search size="1em" class="mr-1" />
|
|
||||||
Search
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if $ae_loc.edit_mode}
|
|
||||||
<label
|
|
||||||
class="bg-surface-200-800 rounded-token flex cursor-pointer items-center gap-1 px-2 py-1 text-xs font-semibold">
|
|
||||||
<span> Remote First </span>
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
bind:checked={badges_loc.current.qry__remote_first}
|
|
||||||
onchange={handle_search_trigger}
|
|
||||||
class="checkbox checkbox-sm" />
|
|
||||||
</label>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user