Minor improvements and fixes for Journals searching and styles.
This commit is contained in:
727
package-lock.json
generated
727
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "osit-aether-app-svelte",
|
"name": "osit-aether-app-svelte",
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"description": "One Sky IT's Aether App created with Svelte, SvelteKit, Tailwind CSS, Lucide, Font Awesome, and Skeleton UI. -Scott Idem",
|
"description": "One Sky IT's Aether App created with Svelte, SvelteKit, Tailwind CSS, Lucide, Font Awesome, and Skeleton UI. -Scott Idem",
|
||||||
"homepage": "https://oneskyit.com/",
|
"homepage": "https://oneskyit.com/",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -181,9 +181,11 @@ let lq__journal_obj = $derived(liveQuery(async () => {
|
|||||||
<a href="/journals"
|
<a href="/journals"
|
||||||
class="
|
class="
|
||||||
btn btn-sm
|
btn btn-sm
|
||||||
variant-outline-tertiary
|
preset-tonal-tertiary
|
||||||
hover:preset-filled-tertiary-500
|
preset-outlined-tertiary-600-400
|
||||||
transition
|
hover:preset-outlined-tertiary-700-300
|
||||||
|
hover:preset-filled-tertiary-100-900
|
||||||
|
transition-all
|
||||||
"
|
"
|
||||||
title="View all journals for this account: {$ae_loc.account_name}"
|
title="View all journals for this account: {$ae_loc.account_name}"
|
||||||
>
|
>
|
||||||
@@ -201,9 +203,10 @@ let lq__journal_obj = $derived(liveQuery(async () => {
|
|||||||
href="/journals/{$journals_slct?.journal_id}"
|
href="/journals/{$journals_slct?.journal_id}"
|
||||||
class="
|
class="
|
||||||
btn btn-sm
|
btn btn-sm
|
||||||
preset-tonal-tertiary border border-tertiary-500
|
preset-tonal-tertiary
|
||||||
hover:preset-filled-tertiary-500
|
preset-outlined-tertiary-600-400
|
||||||
transition
|
hover:preset-filled-tertiary-100-900
|
||||||
|
transition-all
|
||||||
"
|
"
|
||||||
title="View all journal entries for this journal: {$lq__journal_obj?.name}"
|
title="View all journal entries for this journal: {$lq__journal_obj?.name}"
|
||||||
>
|
>
|
||||||
@@ -247,10 +250,14 @@ let lq__journal_obj = $derived(liveQuery(async () => {
|
|||||||
Edit Journal
|
Edit Journal
|
||||||
</span>
|
</span>
|
||||||
</button> -->
|
</button> -->
|
||||||
|
<Journal_entry_obj_qry
|
||||||
|
log_lvl={log_lvl}
|
||||||
|
lq__journal_obj={lq__journal_obj}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- Add default journal entry -->
|
<!-- Add default journal entry -->
|
||||||
<span class="flex flex-row flex-wrap items-center justify-center gap-1">
|
<span class="flex flex-row flex-wrap items-center justify-center gap-2">
|
||||||
<!-- <span class="text-sm text-gray-500 hidden md:inline">
|
<!-- <span class="text-sm text-gray-500 hidden md:inline">
|
||||||
New entry:
|
New entry:
|
||||||
</span> -->
|
</span> -->
|
||||||
@@ -294,9 +301,10 @@ let lq__journal_obj = $derived(liveQuery(async () => {
|
|||||||
}}
|
}}
|
||||||
class="
|
class="
|
||||||
btn btn-sm
|
btn btn-sm
|
||||||
preset-tonal-secondary border border-secondary-500
|
preset-tonal-tertiary
|
||||||
hover:preset-filled-secondary-500
|
preset-outlined-tertiary-600-400
|
||||||
transition
|
hover:preset-filled-tertiary-100-900
|
||||||
|
transition-all
|
||||||
"
|
"
|
||||||
title="Create a new journal entry for this journal: {$lq__journal_obj?.name}"
|
title="Create a new journal entry for this journal: {$lq__journal_obj?.name}"
|
||||||
>
|
>
|
||||||
@@ -307,10 +315,7 @@ let lq__journal_obj = $derived(liveQuery(async () => {
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Journal_entry_obj_qry
|
|
||||||
log_lvl={log_lvl}
|
|
||||||
lq__journal_obj={lq__journal_obj}
|
|
||||||
/>
|
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ if ($journals_trig.journal_entry_qry) {
|
|||||||
|
|
||||||
|
|
||||||
<!-- Search input form -->
|
<!-- Search input form -->
|
||||||
<span class="flex flex-row items-center gap-2">
|
<span class="flex flex-row flex-wrap items-center justify-center gap-1">
|
||||||
<span class="text-sm text-gray-500 hidden lg:inline">
|
<span class="text-sm text-gray-500 hidden lg:inline">
|
||||||
Search:
|
Search:
|
||||||
</span>
|
</span>
|
||||||
@@ -101,70 +101,41 @@ if ($journals_trig.journal_entry_qry) {
|
|||||||
bind:value={$journals_loc.qry__search_text}
|
bind:value={$journals_loc.qry__search_text}
|
||||||
onkeyup={(event) => {
|
onkeyup={(event) => {
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
log_lvl = 1;
|
|
||||||
|
|
||||||
$journals_trig.journal_entry_qry = true;
|
|
||||||
|
|
||||||
// $journals_loc.qry__search_text = event.target.value;
|
// $journals_loc.qry__search_text = event.target.value;
|
||||||
// $journals_trig.journal_entry_li = true;
|
$journals_trig.journal_entry_qry = true;
|
||||||
// console.log('Search query:', $journals_loc.qry__search_text);
|
|
||||||
|
|
||||||
// $journals_prom.load__journal_entry_obj_qry = await journals_func.qry__journal_entry({
|
|
||||||
// api_cfg: $ae_api,
|
|
||||||
// journal_id: $lq__journal_obj?.journal_id ?? '',
|
|
||||||
// qry_str: $journals_loc.qry__search_text,
|
|
||||||
|
|
||||||
// // qry_created_on: null,
|
|
||||||
// // qry_alert: null,
|
|
||||||
// // qry_priority: null,
|
|
||||||
// // qry_type: and_type,
|
|
||||||
|
|
||||||
// // enabled: $journals_loc.recovery_meetings.qry__enabled,
|
|
||||||
// // hidden: $journals_loc.recovery_meetings.qry__hidden,
|
|
||||||
// // order_by_li: $journals_loc.recovery_meetings.qry__order_by_li,
|
|
||||||
// // limit: $journals_loc.recovery_meetings.qry__limit,
|
|
||||||
// // try_cache: try_cache,
|
|
||||||
// log_lvl: log_lvl,
|
|
||||||
// });
|
|
||||||
// if ($journals_prom.load__journal_entry_obj_qry.length) {
|
|
||||||
// $journals_sess.entry_li = $journals_prom.load__journal_entry_obj_qry;
|
|
||||||
|
|
||||||
// $journals_sess = {
|
|
||||||
// ...$journals_sess }; // ensure session is updated
|
|
||||||
|
|
||||||
// // $journals_trig.journal_entry_li = true; // trigger the entry list to refresh
|
|
||||||
// // $journals_trig.journal_entry_li = $journals_prom.load__journal_entry_obj_qry;
|
|
||||||
// } else {
|
|
||||||
// console.log('Clear the search results: no entries found for that query.');
|
|
||||||
// // $journals_sess.entry_li = [''];
|
|
||||||
// $journals_sess.entry_li = null;
|
|
||||||
// // $journals_trig.journal_entry_li = true;
|
|
||||||
// // alert('No journal entries found for that search query.');
|
|
||||||
// // $journals_sess = $journals_sess;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
title="Search Journal Entries"
|
title={`Search for Entries in "${$lq__journal_obj?.name}. Press Enter to search.`}
|
||||||
class="input input-sm input-bordered w-44 text-sm md:w-52"
|
autocomplete="off"
|
||||||
|
class="
|
||||||
|
input input-sm input-bordered
|
||||||
|
w-44 md:w-52
|
||||||
|
text-sm
|
||||||
|
"
|
||||||
class:bg-red-200={$journals_sess.entry_li == null}
|
class:bg-red-200={$journals_sess.entry_li == null}
|
||||||
class:dark:bg-red-800={$journals_sess.entry_li == null}
|
class:dark:bg-red-800={$journals_sess.entry_li == null}
|
||||||
/>
|
/>
|
||||||
<!-- Clear search text button -->
|
<!-- Clear search text button -->
|
||||||
<button
|
<button
|
||||||
disabled={true}
|
|
||||||
type="button"
|
type="button"
|
||||||
class:hidden={!$journals_loc.qry__search_text}
|
class:hidden={!$journals_loc.qry__search_text}
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
// $journals_loc.qry__search_text = '';
|
console.log(`TESTING - 1 - Cleared search query: ${$journals_loc.qry__search_text}`);
|
||||||
// $journals_trig.journal_entry_li = true;
|
$journals_loc.qry__search_text = '';
|
||||||
// console.log('Cleared search query:', $journals_loc.qry__search_text);
|
console.log(`TESTING - 2 - Cleared search query: ${$journals_loc.qry__search_text}`);
|
||||||
|
$journals_trig.journal_entry_qry = true;
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm p-1.5 text-sm text-gray-500 preset-tonal-tertiary border border-tertiary-500 hover:preset-filled-tertiary-500 transition"
|
class="
|
||||||
title="Clear search text"
|
btn btn-sm
|
||||||
|
preset-tonal-tertiary
|
||||||
|
preset-outlined-tertiary-100-900
|
||||||
|
hover:preset-filled-tertiary-100-900
|
||||||
|
transition-all
|
||||||
|
"
|
||||||
|
title="Clear search query text"
|
||||||
>
|
>
|
||||||
<!-- <X /> -->
|
<RemoveFormatting size="1.25em" class="text-neutral-800/60 dark:text-neutral-50/60" />
|
||||||
<RemoveFormatting strokeWidth="1" color="gray" size="1.25em" />
|
<span class="hidden md:inline">
|
||||||
<span class="hidden md:inline text-gray-500">
|
|
||||||
Clear
|
Clear
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -177,12 +148,13 @@ if ($journals_trig.journal_entry_qry) {
|
|||||||
Category:
|
Category:
|
||||||
</span>
|
</span>
|
||||||
<select
|
<select
|
||||||
class="btn btn-secondary btn-sm
|
class="
|
||||||
preset-tonal-primary
|
btn btn-sm
|
||||||
hover:preset-filled-primary-500
|
preset-tonal-tertiary
|
||||||
transition
|
preset-outlined-tertiary-100-900
|
||||||
text-xs
|
hover:preset-filled-tertiary-100-900
|
||||||
"
|
transition-all
|
||||||
|
"
|
||||||
bind:value={$journals_loc.qry__category_code}
|
bind:value={$journals_loc.qry__category_code}
|
||||||
onchange={(event) => {
|
onchange={(event) => {
|
||||||
// WARNING: This will cause pages to reset if the journal entry list is being filtered by category. This is a bug that should be fixed.
|
// WARNING: This will cause pages to reset if the journal entry list is being filtered by category. This is a bug that should be fixed.
|
||||||
|
|||||||
Reference in New Issue
Block a user