Lots of style clean up for buttons in Novi. Various bug fixes. Clean up of initial recovery meeting loading.
This commit is contained in:
@@ -29,9 +29,9 @@ export async function load({ params, parent }) { // route
|
||||
api_cfg: ae_acct.api,
|
||||
for_obj_type: 'account',
|
||||
for_obj_id: account_id,
|
||||
order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'},
|
||||
qry_conference: false,
|
||||
params: {qry__enabled: 'enabled', qry__hidden: 'not_hidden', qry__limit: 25},
|
||||
limit: 25,
|
||||
order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'},
|
||||
try_cache: true,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
|
||||
@@ -114,6 +114,7 @@ $: if ($idaa_trig.event_li) {
|
||||
api_cfg: $ae_api,
|
||||
for_obj_type: 'account',
|
||||
for_obj_id: $idaa_slct.account_id,
|
||||
qry_conference: false,
|
||||
enabled: $idaa_loc.recovery_meetings.qry__enabled,
|
||||
hidden: $idaa_loc.recovery_meetings.qry__hidden,
|
||||
limit: $idaa_loc.recovery_meetings.qry__limit,
|
||||
@@ -142,11 +143,11 @@ $: if ($idaa_trig.event_li_qry) {
|
||||
let max_tries = 5;
|
||||
let try_cache = true;
|
||||
|
||||
let params = {
|
||||
'qry__enabled': $idaa_loc.recovery_meetings.qry__enabled ?? 'enabled',
|
||||
'qry__hidden': $idaa_loc.recovery_meetings.qry__hidden ?? 'not_hidden',
|
||||
'qry__limit': $idaa_loc.recovery_meetings.qry__limit ?? 35,
|
||||
};
|
||||
// let params = {
|
||||
// 'qry__enabled': $idaa_loc.recovery_meetings.qry__enabled ?? 'enabled',
|
||||
// 'qry__hidden': $idaa_loc.recovery_meetings.qry__hidden ?? 'not_hidden',
|
||||
// 'qry__limit': $idaa_loc.recovery_meetings.qry__limit ?? 35,
|
||||
// };
|
||||
|
||||
|
||||
if ($idaa_loc.recovery_meetings.qry__enabled !== 'all' || $idaa_loc.recovery_meetings.qry__hidden !== 'all') {
|
||||
@@ -198,7 +199,7 @@ $: if ($idaa_trig.event_li_qry) {
|
||||
// and_type = null;
|
||||
// }
|
||||
|
||||
console.log(`TEST - and_physical: ${and_physical}; and_virtual: ${and_virtual}; and_type: ${and_type}; qry__fulltext_str: ${$idaa_loc.recovery_meetings.qry__fulltext_str}; params:`, params);
|
||||
console.log(`TEST - and_physical: ${and_physical}; and_virtual: ${and_virtual}; and_type: ${and_type}; qry__fulltext_str: ${$idaa_loc.recovery_meetings.qry__fulltext_str}`);
|
||||
|
||||
$idaa_prom.load__event_obj_qry = events_func.qry_ae_obj_li__event({
|
||||
api_cfg: $ae_api,
|
||||
@@ -210,7 +211,6 @@ $: if ($idaa_trig.event_li_qry) {
|
||||
qry_virtual: and_virtual,
|
||||
qry_type: and_type,
|
||||
qry_str: $idaa_loc.recovery_meetings.qry__fulltext_str,
|
||||
params: params,
|
||||
try_cache: try_cache,
|
||||
log_lvl: log_lvl,
|
||||
})
|
||||
@@ -334,7 +334,7 @@ if (browser) {
|
||||
$idaa_sess.recovery_meetings.show__modal_edit = false;
|
||||
$idaa_sess.recovery_meetings.show__modal_view = true;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
class="novi_btn btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
title={`View meeting: ${$lq__event_obj?.name}`}
|
||||
>
|
||||
<span class="fas fa-times m-1"></span> Cancel Edit
|
||||
@@ -362,7 +362,7 @@ if (browser) {
|
||||
console.log('Close modal');
|
||||
$idaa_sess.recovery_meetings.show__modal_edit = false;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||
class="novi_btn btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||
>
|
||||
<span class="fas fa-times mx-1"></span>
|
||||
Close
|
||||
@@ -398,7 +398,7 @@ if (browser) {
|
||||
$idaa_sess.recovery_meetings.show__modal_view = false;
|
||||
$idaa_sess.recovery_meetings.show__modal_edit = true;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
class="novi_btn btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||
title={`Edit meeting: ${$lq__event_obj?.name}`}
|
||||
>
|
||||
<span class="fas fa-edit m-1"></span> Edit
|
||||
|
||||
@@ -579,7 +579,7 @@ async function handle_delete_event_obj(
|
||||
<button
|
||||
type="submit"
|
||||
disabled={(disable_submit_btn)}
|
||||
class="ae_btn btn_primary btn btn-primary variant-ghost-primary hover:variant-filled-primary transition absolute top-0.5 right-0.5"
|
||||
class="novi_btn btn btn-primary variant-ghost-primary hover:variant-filled-primary transition absolute top-0.5 right-0.5"
|
||||
>
|
||||
{#await prom_api__event_obj}
|
||||
<span class="fas fa-spinner fa-spin m-1"></span> Saving
|
||||
@@ -1000,7 +1000,7 @@ async function handle_delete_event_obj(
|
||||
{#if ( $ae_loc.administrator_access || $lq__event_obj && ($idaa_slct.event_obj?.show_recurring_text || ($lq__event_obj?.recurring_text && !$lq__event_obj?.recurring_text.includes('*gen*'))) )}
|
||||
<button
|
||||
type="button"
|
||||
class="ae_btn ae_smaller btn btn-info btn-sm ae_width_md variant-ghost-warning hover:variant-filled-warning transition"
|
||||
class="novi_btn novi_smaller btn btn-info btn-sm ae_width_md variant-ghost-warning hover:variant-filled-warning transition"
|
||||
style=""
|
||||
on:click={() => {
|
||||
if (confirm('Are you sure you want to remove the text for the additional details?')) {
|
||||
@@ -1018,7 +1018,7 @@ async function handle_delete_event_obj(
|
||||
{:else}
|
||||
<button
|
||||
type="button"
|
||||
class="ae_btn ae_smaller btn btn-info btn-sm ae_width_md variant-ghost-success hover:variant-filled-success transition"
|
||||
class="novi_btn novi_smaller btn btn-info btn-sm ae_width_md variant-ghost-success hover:variant-filled-success transition"
|
||||
style=""
|
||||
on:click|preventDefault={() => {
|
||||
// Remove *gen* prefix from recurring_text
|
||||
@@ -1095,7 +1095,7 @@ async function handle_delete_event_obj(
|
||||
return false;
|
||||
}
|
||||
}}
|
||||
class="ae_btn ae_smaller ae_btn_info"
|
||||
class="novi_btn novi_smaller ae_btn_info"
|
||||
>
|
||||
<span class="fas fa-lock" title="Field is locked"></span> Name and email locked
|
||||
</button>
|
||||
@@ -1105,7 +1105,7 @@ async function handle_delete_event_obj(
|
||||
on:click|preventDefault={() => {
|
||||
$idaa_slct.event_obj.contact_li_json[0].unlock = false;
|
||||
}}
|
||||
class="ae_btn ae_smaller ae_btn_info"
|
||||
class="novi_btn novi_smaller ae_btn_info"
|
||||
>
|
||||
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
||||
Unlocked
|
||||
@@ -1195,7 +1195,7 @@ async function handle_delete_event_obj(
|
||||
on:click={() => {
|
||||
$idaa_loc.recovery_meetings.show__admin_options = !$idaa_loc.recovery_meetings.show__admin_options;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning float-right"
|
||||
class="novi_btn btn btn-sm variant-soft-warning float-right"
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span>
|
||||
{$idaa_loc.recovery_meetings.show__admin_options ? 'Hide' : 'Show'} Admin
|
||||
@@ -1333,7 +1333,7 @@ async function handle_delete_event_obj(
|
||||
<button
|
||||
type="submit"
|
||||
disabled={(disable_submit_btn)}
|
||||
class="ae_btn btn_primary btn btn-primary variant-ghost-primary hover:variant-filled-primary transition"
|
||||
class="novi_btn btn_primary btn btn-primary variant-ghost-primary hover:variant-filled-primary transition"
|
||||
>
|
||||
{#await prom_api__event_obj}
|
||||
<span class="fas fa-spinner fa-spin m-1"></span> Saving
|
||||
@@ -1349,7 +1349,7 @@ async function handle_delete_event_obj(
|
||||
if (!confirm('Are you sure you want to create this event?')) {return false;}
|
||||
// handle_save_event_obj({event_id: $idaa_slct.event_id, method: 'create'});
|
||||
}}
|
||||
class="btn btn-md variant-ghost-primary hover:variant-filled-primary transition"
|
||||
class="novi_btn btn btn-md variant-ghost-primary hover:variant-filled-primary transition"
|
||||
>
|
||||
{#await prom_api__event_obj}
|
||||
<span class="fas fa-spinner fa-spin m-1"></span> Saving
|
||||
@@ -1367,7 +1367,7 @@ async function handle_delete_event_obj(
|
||||
if (!confirm('Are you sure you want to delete this event?')) {return false;}
|
||||
handle_delete_event_obj({event_id: $idaa_slct.event_id, method: 'delete'});
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning"
|
||||
class="novi_btn btn btn-sm variant-soft-warning"
|
||||
title="Delete record permanently"
|
||||
>
|
||||
<span class="fas fa-minus m-1"></span> Delete
|
||||
@@ -1379,7 +1379,7 @@ async function handle_delete_event_obj(
|
||||
if (!confirm('Are you sure you want to disable this event?')) {return false;}
|
||||
handle_delete_event_obj({event_id: $idaa_slct.event_id, method: 'disable'});
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning"
|
||||
class="novi_btn btn btn-sm variant-soft-warning"
|
||||
title="Disable record to delete"
|
||||
>
|
||||
<span class="fas fa-minus m-1"></span> Delete
|
||||
@@ -1391,7 +1391,7 @@ async function handle_delete_event_obj(
|
||||
if (!confirm('Are you sure you want to hide this event?')) {return false;}
|
||||
handle_delete_event_obj({event_id: $idaa_slct.event_id, method: 'hide'});
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning"
|
||||
class="novi_btn btn btn-sm variant-soft-warning"
|
||||
title="Hide record to delete"
|
||||
>
|
||||
<span class="fas fa-comment-slash m-1"></span> Delete
|
||||
|
||||
@@ -448,7 +448,7 @@ if ($idaa_loc.recovery_meetings.qry__fulltext_str && $idaa_loc.recovery_meetings
|
||||
$idaa_loc.recovery_meetings.qry__limit = 200;
|
||||
$idaa_trig.event_li_qry = true;
|
||||
}}
|
||||
class="btn_show_bb_post ae_btn btn btn-info btn-sm variant-ghost-secondary"
|
||||
class="novi_btn btn_show_bb_post ae_btn btn btn-info btn-sm variant-ghost-secondary"
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span> Show Hidden Events
|
||||
</button>
|
||||
@@ -460,7 +460,7 @@ if ($idaa_loc.recovery_meetings.qry__fulltext_str && $idaa_loc.recovery_meetings
|
||||
// $idaa_loc.recovery_meetings.qry__limit = 100;
|
||||
$idaa_trig.event_li_qry = true;
|
||||
}}
|
||||
class="btn_hide_bb_post ae_btn btn btn-info btn-sm variant-ghost-secondary"
|
||||
class="novi_btn btn_hide_bb_post ae_btn btn btn-info btn-sm variant-ghost-secondary"
|
||||
>
|
||||
<span class="fas fa-eye-slash m-1"></span> Hide Hidden Events
|
||||
</button>
|
||||
@@ -475,7 +475,7 @@ if ($idaa_loc.recovery_meetings.qry__fulltext_str && $idaa_loc.recovery_meetings
|
||||
$idaa_loc.recovery_meetings.qry__limit = 500;
|
||||
$idaa_trig.event_li_qry = true;
|
||||
}}
|
||||
class="btn_show_bb_post ae_btn btn btn-warning btn-sm variant-ghost-secondary"
|
||||
class="novi_btn btn_show_bb_post ae_btn btn btn-warning btn-sm variant-ghost-secondary"
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span> Show Disabled Events
|
||||
</button>
|
||||
@@ -486,7 +486,7 @@ if ($idaa_loc.recovery_meetings.qry__fulltext_str && $idaa_loc.recovery_meetings
|
||||
$idaa_loc.recovery_meetings.qry__enabled = 'enabled';
|
||||
$idaa_trig.event_li_qry = true;
|
||||
}}
|
||||
class="btn_hide_bb_post ae_btn btn btn-warning btn-sm variant-ghost-secondary"
|
||||
class="novi_btn btn_hide_bb_post ae_btn btn btn-warning btn-sm variant-ghost-secondary"
|
||||
>
|
||||
<span class="fas fa-eye-slash m-1"></span> Hide Disabled Events
|
||||
</button>
|
||||
@@ -546,7 +546,7 @@ if ($idaa_loc.recovery_meetings.qry__fulltext_str && $idaa_loc.recovery_meetings
|
||||
});
|
||||
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition w-42 mb-1 export_data_btn text-xs"
|
||||
class="novi_btn btn btn-sm variant-ghost-warning hover:variant-filled-warning transition w-42 mb-1 export_data_btn text-xs"
|
||||
title={`Download sponsorship data for ${$ae_loc.account_name}`}
|
||||
>
|
||||
{#await ae_promises.download__events_export}
|
||||
|
||||
Reference in New Issue
Block a user