Starting real work on the IDAA BB (posts). Can at least view them and their comments now.
This commit is contained in:
@@ -617,7 +617,7 @@ export function db_save_ae_obj_li__post(
|
|||||||
updated_on: obj.updated_on,
|
updated_on: obj.updated_on,
|
||||||
|
|
||||||
// From SQL view
|
// From SQL view
|
||||||
// post_comment_count: obj.post_comment_count,
|
post_comment_count: obj.post_comment_count,
|
||||||
|
|
||||||
// A key value list of the comments
|
// A key value list of the comments
|
||||||
// post_comment_kv: obj.post_comment_kv,
|
// post_comment_kv: obj.post_comment_kv,
|
||||||
|
|||||||
@@ -102,14 +102,14 @@ export class MySubClassedDexie extends Dexie {
|
|||||||
title,
|
title,
|
||||||
full_name, email,
|
full_name, email,
|
||||||
archive, archive_on,
|
archive, archive_on,
|
||||||
enable, hide, priority, sort, group, notes, created_on, updated_on`,
|
enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on], [created_on+updated_on]`,
|
||||||
|
|
||||||
comment: `
|
comment: `
|
||||||
id, post_comment_id,
|
id, post_comment_id,
|
||||||
post_id,
|
post_id,
|
||||||
title,
|
title,
|
||||||
full_name, email,
|
full_name, email,
|
||||||
enable, hide, priority, sort, group, notes, created_on, updated_on`,
|
enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on]`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,60 +24,60 @@ import View_archive_obj from './10_view__archive_obj.svelte';
|
|||||||
// *** Export/Exposed variables and functions for component
|
// *** Export/Exposed variables and functions for component
|
||||||
// export let account_id: string = $page['page_for']['account_id'];
|
// export let account_id: string = $page['page_for']['account_id'];
|
||||||
export let account_id: string = $ae_app.account_id;
|
export let account_id: string = $ae_app.account_id;
|
||||||
export let archive_id: string = $ae_app.archives.archive_id;
|
export let archive_id: string = $idaa_loc.archives.archive_id;
|
||||||
|
|
||||||
export let novi_uuid: string = $ae_app.novi_uuid;
|
export let novi_uuid: string = $idaa_loc.novi_uuid;
|
||||||
export let novi_email: string = $ae_app.novi_email;
|
export let novi_email: string = $idaa_loc.novi_email;
|
||||||
export let novi_full_name: string = $ae_app.novi_full_name;
|
export let novi_full_name: string = $idaa_loc.novi_full_name;
|
||||||
export let novi_admin_li: string = $ae_app.novi_admin_li;
|
export let novi_admin_li: string = $idaa_loc.novi_admin_li;
|
||||||
export let novi_trusted_li: string = $ae_app.novi_trusted_li;
|
export let novi_trusted_li: string = $idaa_loc.novi_trusted_li;
|
||||||
|
|
||||||
// *** Set initial variables
|
// *** Set initial variables
|
||||||
$ae_app.novi_uuid = novi_uuid;
|
$idaa_loc.novi_uuid = novi_uuid;
|
||||||
$ae_app.novi_email = decodeURIComponent(novi_email);
|
$idaa_loc.novi_email = decodeURIComponent(novi_email);
|
||||||
$ae_app.novi_full_name = decodeURIComponent(novi_full_name);
|
$idaa_loc.novi_full_name = decodeURIComponent(novi_full_name);
|
||||||
$ae_app.novi_admin_li = novi_admin_li;
|
$idaa_loc.novi_admin_li = novi_admin_li;
|
||||||
$ae_app.novi_trusted_li = novi_trusted_li;
|
$idaa_loc.novi_trusted_li = novi_trusted_li;
|
||||||
|
|
||||||
$ae_app.current_timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
$ae_app.current_timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||||
if (!$ae_app.lu_timezone_list) {
|
if (!$ae_app.lu_timezone_list) {
|
||||||
$ae_app.lu_timezone_list = [];
|
$ae_app.lu_timezone_list = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$ae_app.archives.show_main__options = true; // Section for: buttons for creating new archives, show/hide archives, and search archives
|
$idaa_loc.archives.show_main__options = true; // Section for: buttons for creating new archives, show/hide archives, and search archives
|
||||||
// $ae_app.archives.show_list__archive_obj_li = true;
|
// $idaa_loc.archives.show_list__archive_obj_li = true;
|
||||||
// $ae_app.archives.show_view__archive_obj = $ae_app.archives.show_view__archive_obj;
|
// $idaa_loc.archives.show_view__archive_obj = $idaa_loc.archives.show_view__archive_obj;
|
||||||
$ae_app.archives.fulltext_search_qry_str = '';
|
$idaa_loc.archives.fulltext_search_qry_str = '';
|
||||||
$ae_app.archives.qry_type = false
|
$idaa_loc.archives.qry_type = false
|
||||||
|
|
||||||
// NOTE: Check if the novi_uuid is in the novi_admin_li list
|
// NOTE: Check if the novi_uuid is in the novi_admin_li list
|
||||||
if ($ae_app.novi_uuid && $ae_app.novi_admin_li) {
|
if ($idaa_loc.novi_uuid && $idaa_loc.novi_admin_li) {
|
||||||
if ($ae_app.novi_admin_li.includes($ae_app.novi_uuid)) {
|
if ($idaa_loc.novi_admin_li.includes($idaa_loc.novi_uuid)) {
|
||||||
$ae_app.access_type = 'administrator';
|
$ae_loc.access_type = 'administrator';
|
||||||
$ae_app.administrator_access = true;
|
$ae_loc.administrator_access = true;
|
||||||
$ae_app.trusted_access = true;
|
$ae_loc.trusted_access = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// NOTE: Check if the novi_uuid is in the novi_trusted_li list
|
// NOTE: Check if the novi_uuid is in the novi_trusted_li list
|
||||||
if ($ae_app.novi_uuid && $ae_app.novi_trusted_li) {
|
if ($idaa_loc.novi_uuid && $idaa_loc.novi_trusted_li) {
|
||||||
if ($ae_app.novi_trusted_li.includes($ae_app.novi_uuid)) {
|
if ($idaa_loc.novi_trusted_li.includes($idaa_loc.novi_uuid)) {
|
||||||
$ae_app.access_type = 'trusted';
|
$ae_loc.access_type = 'trusted';
|
||||||
$ae_app.trusted_access = true;
|
$ae_loc.trusted_access = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ae_app.administrator_access) {
|
if ($ae_loc.administrator_access) {
|
||||||
$ae_app.archives.enabled = 'enabled';
|
$idaa_loc.archives.enabled = 'enabled';
|
||||||
$ae_app.archives.hidden = 'not_hidden';
|
$idaa_loc.archives.hidden = 'not_hidden';
|
||||||
$ae_app.archives.limit = 150;
|
$idaa_loc.archives.limit = 150;
|
||||||
} else if ($ae_app.trusted_access) {
|
} else if ($ae_loc.trusted_access) {
|
||||||
$ae_app.archives.enabled = 'enabled';
|
$idaa_loc.archives.enabled = 'enabled';
|
||||||
$ae_app.archives.hidden = 'not_hidden';
|
$idaa_loc.archives.hidden = 'not_hidden';
|
||||||
$ae_app.archives.limit = 75;
|
$idaa_loc.archives.limit = 75;
|
||||||
} else {
|
} else {
|
||||||
$ae_app.archives.enabled = 'enabled';
|
$idaa_loc.archives.enabled = 'enabled';
|
||||||
$ae_app.archives.hidden = 'not_hidden';
|
$idaa_loc.archives.hidden = 'not_hidden';
|
||||||
$ae_app.archives.limit = 75;
|
$idaa_loc.archives.limit = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
let idaa_archive_obj_li_get_promise;
|
let idaa_archive_obj_li_get_promise;
|
||||||
@@ -93,15 +93,15 @@ if (archive_id) {
|
|||||||
$slct.archive_id = archive_id;
|
$slct.archive_id = archive_id;
|
||||||
$slct_trigger = 'load__archive_obj';
|
$slct_trigger = 'load__archive_obj';
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = true;
|
// $idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = false;
|
$idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
$ae_app.archives.show_view__archive_obj = true;
|
$idaa_loc.archives.show_view__archive_obj = true;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
} else {
|
} else {
|
||||||
// $ae_app.archives.show_main__options = true;
|
// $idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = true;
|
$idaa_loc.archives.show_list__archive_obj_li = true;
|
||||||
$ae_app.archives.show_view__archive_obj = false;
|
$idaa_loc.archives.show_view__archive_obj = false;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$ae_app.client_content) {
|
if (!$ae_app.client_content) {
|
||||||
@@ -161,10 +161,10 @@ $: if ($slct_trigger == 'load__archive_obj' && $slct.archive_id) {
|
|||||||
let message = {'archive_id': $slct.archive_id};
|
let message = {'archive_id': $slct.archive_id};
|
||||||
window.parent.postMessage(message, "*");
|
window.parent.postMessage(message, "*");
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = false;
|
// $idaa_loc.archives.show_main__options = false;
|
||||||
// $ae_app.archives.show_list__archive_obj_li = false;
|
// $idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
// $ae_app.archives.show_view__archive_obj = true;
|
// $idaa_loc.archives.show_view__archive_obj = true;
|
||||||
// $ae_app.archives.show_edit__archive_obj = false;
|
// $idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$: if ($slct_trigger == 'load__archive_obj_li' && $slct.account_id) {
|
$: if ($slct_trigger == 'load__archive_obj_li' && $slct.account_id) {
|
||||||
@@ -176,27 +176,27 @@ $: if ($slct_trigger == 'load__archive_obj_li' && $slct.account_id) {
|
|||||||
|
|
||||||
async function handle_load_archive_obj_li({account_id, try_cache=true}) {
|
async function handle_load_archive_obj_li({account_id, try_cache=true}) {
|
||||||
console.log('*** handle_load_archive_obj_li() ***');
|
console.log('*** handle_load_archive_obj_li() ***');
|
||||||
console.log($ae_app.archives);
|
console.log($idaa_loc.archives);
|
||||||
|
|
||||||
let enabled = $ae_app.archives.enabled;
|
let enabled = $idaa_loc.archives.enabled;
|
||||||
let hidden = $ae_app.archives.hidden;
|
let hidden = $idaa_loc.archives.hidden;
|
||||||
let limit = $ae_app.archives.limit;
|
let limit = $idaa_loc.archives.limit;
|
||||||
let offset = $ae_app.archives.offset;
|
let offset = $idaa_loc.archives.offset;
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
let params_json: key_val = {};
|
let params_json: key_val = {};
|
||||||
if ($ae_app.archives.fulltext_search_qry_str && $ae_app.archives.fulltext_search_qry_str.length > 2) {
|
if ($idaa_loc.archives.fulltext_search_qry_str && $idaa_loc.archives.fulltext_search_qry_str.length > 2) {
|
||||||
params_json['ft_qry'] = {
|
params_json['ft_qry'] = {
|
||||||
'default_qry_str': $ae_app.archives.fulltext_search_qry_str,
|
'default_qry_str': $idaa_loc.archives.fulltext_search_qry_str,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ae_app.archives.qry_audio || $ae_app.archives.qry_video || $ae_app.archives.qry_other) {
|
if ($idaa_loc.archives.qry_audio || $idaa_loc.archives.qry_video || $idaa_loc.archives.qry_other) {
|
||||||
params_json['and_qry'] = {};
|
params_json['and_qry'] = {};
|
||||||
if ($ae_app.archives.qry_audio) params_json['and_qry']['audio'] = true;
|
if ($idaa_loc.archives.qry_audio) params_json['and_qry']['audio'] = true;
|
||||||
if ($ae_app.archives.qry_video) params_json['and_qry']['video'] = true;
|
if ($idaa_loc.archives.qry_video) params_json['and_qry']['video'] = true;
|
||||||
if ($ae_app.archives.qry_other) params_json['and_qry']['other'] = $ae_app.archives.qry_other;
|
if ($idaa_loc.archives.qry_other) params_json['and_qry']['other'] = $idaa_loc.archives.qry_other;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('params_json:', params_json);
|
console.log('params_json:', params_json);
|
||||||
@@ -237,10 +237,10 @@ async function handle_load_archive_obj_li({account_id, try_cache=true}) {
|
|||||||
async function handle_load_archive_obj({archive_id, try_cache=false}) {
|
async function handle_load_archive_obj({archive_id, try_cache=false}) {
|
||||||
console.log('*** handle_load_archive_obj() ***');
|
console.log('*** handle_load_archive_obj() ***');
|
||||||
|
|
||||||
// let enabled = $ae_app.archives.enabled;
|
// let enabled = $idaa_loc.archives.enabled;
|
||||||
// let hidden = $ae_app.archives.hidden;
|
// let hidden = $idaa_loc.archives.hidden;
|
||||||
// let limit = $ae_app.archives.limit;
|
// let limit = $idaa_loc.archives.limit;
|
||||||
// let offset = $ae_app.archives.offset;
|
// let offset = $idaa_loc.archives.offset;
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
@@ -257,7 +257,7 @@ async function handle_load_archive_obj({archive_id, try_cache=false}) {
|
|||||||
if (archive_obj_get_result) {
|
if (archive_obj_get_result) {
|
||||||
$slct.archive_obj = archive_obj_get_result;
|
$slct.archive_obj = archive_obj_get_result;
|
||||||
// console.log($slct.archive_obj.cfg_json.content_group_sort);
|
// console.log($slct.archive_obj.cfg_json.content_group_sort);
|
||||||
$ae_app.archives.content_group_sort = $slct.archive_obj.cfg_json.content_group_sort;
|
$idaa_loc.archives.content_group_sort = $slct.archive_obj.cfg_json.content_group_sort;
|
||||||
console.log(`Archive object:`, $slct.archive_obj);
|
console.log(`Archive object:`, $slct.archive_obj);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -284,10 +284,10 @@ function handle_created_archive_obj(event) {
|
|||||||
// $slct_trigger = 'load__archive_obj';
|
// $slct_trigger = 'load__archive_obj';
|
||||||
$slct_trigger = 'load__archive_obj_li';
|
$slct_trigger = 'load__archive_obj_li';
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = false;
|
// $idaa_loc.archives.show_main__options = false;
|
||||||
$ae_app.archives.show_list__archive_obj_li = false;
|
$idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
$ae_app.archives.show_view__archive_obj = true;
|
$idaa_loc.archives.show_view__archive_obj = true;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_updated_archive_obj(event) {
|
function handle_updated_archive_obj(event) {
|
||||||
@@ -298,10 +298,10 @@ function handle_updated_archive_obj(event) {
|
|||||||
// NOTE: If the next trigger is set too quickly it will cause the one above to be missed.
|
// NOTE: If the next trigger is set too quickly it will cause the one above to be missed.
|
||||||
// $slct_trigger = 'load__archive_obj_li';
|
// $slct_trigger = 'load__archive_obj_li';
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = false;
|
// $idaa_loc.archives.show_main__options = false;
|
||||||
$ae_app.archives.show_list__archive_obj_li = false;
|
$idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
$ae_app.archives.show_view__archive_obj = true;
|
$idaa_loc.archives.show_view__archive_obj = true;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_deleted_archive_obj(event) {
|
function handle_deleted_archive_obj(event) {
|
||||||
@@ -317,10 +317,10 @@ function handle_deleted_archive_obj(event) {
|
|||||||
|
|
||||||
$slct_trigger = 'load__archive_obj_li';
|
$slct_trigger = 'load__archive_obj_li';
|
||||||
|
|
||||||
$ae_app.archives.show_main__options = true;
|
$idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = true;
|
$idaa_loc.archives.show_list__archive_obj_li = true;
|
||||||
$ae_app.archives.show_view__archive_obj = false;
|
$idaa_loc.archives.show_view__archive_obj = false;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -332,23 +332,23 @@ function handle_deleted_archive_obj(event) {
|
|||||||
|
|
||||||
<section class="ae_section ae_meta">
|
<section class="ae_section ae_meta">
|
||||||
<p>
|
<p>
|
||||||
Novi: {$ae_app.novi_full_name}
|
Novi: {$idaa_loc.novi_full_name}
|
||||||
<span class="details">
|
<span class="details">
|
||||||
(
|
(
|
||||||
{$ae_app.novi_email}
|
{$idaa_loc.novi_email}
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<span class="access_type administrator_access">Administrator</span>
|
<span class="access_type administrator_access">Administrator</span>
|
||||||
{:else if $ae_app.trusted_access}
|
{:else if $ae_loc.trusted_access}
|
||||||
<span class="access_type trusted_access">Trusted</span>
|
<span class="access_type trusted_access">Trusted</span>
|
||||||
{/if}
|
{/if}
|
||||||
<span class="novi_uuid">UUID: {$ae_app.novi_uuid}</span>
|
<span class="novi_uuid">UUID: {$idaa_loc.novi_uuid}</span>
|
||||||
)
|
)
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<!-- <p>Page height: {window.innerHeight}</p> -->
|
<!-- <p>Page height: {window.innerHeight}</p> -->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{#if $ae_app.archives.show_main__options}
|
{#if $idaa_loc.archives.show_main__options}
|
||||||
<section class="ae_section ae_options ae_column archive_obj__options">
|
<section class="ae_section ae_options ae_column archive_obj__options">
|
||||||
|
|
||||||
<!-- <div class="note">A comment about the IDAA archives in general can go here.</div> -->
|
<!-- <div class="note">A comment about the IDAA archives in general can go here.</div> -->
|
||||||
@@ -357,12 +357,12 @@ function handle_deleted_archive_obj(event) {
|
|||||||
|
|
||||||
<!-- Show/hide hidden content -->
|
<!-- Show/hide hidden content -->
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
{#if $ae_app.archives.hidden == 'not_hidden'}
|
{#if $idaa_loc.archives.hidden == 'not_hidden'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.archives.hidden = 'all';
|
$idaa_loc.archives.hidden = 'all';
|
||||||
$ae_app.archives.limit = 150;
|
$idaa_loc.archives.limit = 150;
|
||||||
$slct_trigger = 'load__archive_obj_li';
|
$slct_trigger = 'load__archive_obj_li';
|
||||||
}}
|
}}
|
||||||
class="btn_new_bb_post ae_btn btn_xs ae_smallest btn btn-xs btn-info"
|
class="btn_new_bb_post ae_btn btn_xs ae_smallest btn btn-xs btn-info"
|
||||||
@@ -372,7 +372,7 @@ function handle_deleted_archive_obj(event) {
|
|||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.archives.hidden = 'not_hidden';
|
$idaa_loc.archives.hidden = 'not_hidden';
|
||||||
$slct_trigger = 'load__archive_obj_li';
|
$slct_trigger = 'load__archive_obj_li';
|
||||||
}}
|
}}
|
||||||
class="btn_new_bb_post ae_btn btn_xs btn btn-xs btn-info"
|
class="btn_new_bb_post ae_btn btn_xs btn btn-xs btn-info"
|
||||||
@@ -382,12 +382,12 @@ function handle_deleted_archive_obj(event) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- We only want these options to show if a specific archive is showing. -->
|
<!-- We only want these options to show if a specific archive is showing. -->
|
||||||
{#if $ae_app.archives.show_view__archive_obj}
|
{#if $idaa_loc.archives.show_view__archive_obj}
|
||||||
{#if $ae_app.archives.hidden == 'not_hidden'}
|
{#if $idaa_loc.archives.hidden == 'not_hidden'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.archives.hidden = 'all';
|
$idaa_loc.archives.hidden = 'all';
|
||||||
$ae_app.archives.limit = 150;
|
$idaa_loc.archives.limit = 150;
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
}}
|
}}
|
||||||
class="btn_new_bb_post ae_btn btn_xs ae_smallest btn btn-xs btn-info"
|
class="btn_new_bb_post ae_btn btn_xs ae_smallest btn btn-xs btn-info"
|
||||||
@@ -397,7 +397,7 @@ function handle_deleted_archive_obj(event) {
|
|||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.archives.hidden = 'not_hidden';
|
$idaa_loc.archives.hidden = 'not_hidden';
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
}}
|
}}
|
||||||
class="btn_new_bb_post ae_btn btn_xs btn btn-xs btn-info"
|
class="btn_new_bb_post ae_btn btn_xs btn btn-xs btn-info"
|
||||||
@@ -410,13 +410,13 @@ function handle_deleted_archive_obj(event) {
|
|||||||
|
|
||||||
<!-- For administrator access: Show/hide disabled content -->
|
<!-- For administrator access: Show/hide disabled content -->
|
||||||
|
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
{#if $ae_app.archives.enabled == 'enabled'}
|
{#if $idaa_loc.archives.enabled == 'enabled'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.archives.hidden = 'all';
|
$idaa_loc.archives.hidden = 'all';
|
||||||
$ae_app.archives.enabled = 'all';
|
$idaa_loc.archives.enabled = 'all';
|
||||||
$ae_app.archives.limit = 500;
|
$idaa_loc.archives.limit = 500;
|
||||||
$slct_trigger = 'load__archive_obj_li';
|
$slct_trigger = 'load__archive_obj_li';
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
||||||
@@ -426,7 +426,7 @@ function handle_deleted_archive_obj(event) {
|
|||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.archives.enabled = 'enabled';
|
$idaa_loc.archives.enabled = 'enabled';
|
||||||
$slct_trigger = 'load__archive_obj_li';
|
$slct_trigger = 'load__archive_obj_li';
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
||||||
@@ -435,12 +435,12 @@ function handle_deleted_archive_obj(event) {
|
|||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_app.archives.enabled == 'enabled'}
|
{#if $idaa_loc.archives.enabled == 'enabled'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.archives.hidden = 'all';
|
$idaa_loc.archives.hidden = 'all';
|
||||||
$ae_app.archives.enabled = 'all';
|
$idaa_loc.archives.enabled = 'all';
|
||||||
$ae_app.archives.limit = 500;
|
$idaa_loc.archives.limit = 500;
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
||||||
@@ -450,7 +450,7 @@ function handle_deleted_archive_obj(event) {
|
|||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.archives.enabled = 'enabled';
|
$idaa_loc.archives.enabled = 'enabled';
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_xs btn btn-xs btn-warning"
|
class="ae_btn btn_xs btn btn-xs btn-warning"
|
||||||
@@ -470,10 +470,10 @@ function handle_deleted_archive_obj(event) {
|
|||||||
$slct.archive_id = null;
|
$slct.archive_id = null;
|
||||||
$slct.archive_obj = {};
|
$slct.archive_obj = {};
|
||||||
|
|
||||||
$ae_app.archives.show_main__options = true;
|
$idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = true;
|
$idaa_loc.archives.show_list__archive_obj_li = true;
|
||||||
$ae_app.archives.show_view__archive_obj = false;
|
$idaa_loc.archives.show_view__archive_obj = false;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
// $ae_app.iframe_height_modal_body = 0;
|
// $ae_app.iframe_height_modal_body = 0;
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
@@ -488,7 +488,7 @@ function handle_deleted_archive_obj(event) {
|
|||||||
<span class="fas fa-times"></span> View Other Archives
|
<span class="fas fa-times"></span> View Other Archives
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$slct.archive_id = null;
|
$slct.archive_id = null;
|
||||||
@@ -498,10 +498,10 @@ function handle_deleted_archive_obj(event) {
|
|||||||
url.searchParams.delete('archive_id');
|
url.searchParams.delete('archive_id');
|
||||||
history.pushState({}, '', url);
|
history.pushState({}, '', url);
|
||||||
|
|
||||||
$ae_app.archives.show_main__options = true;
|
$idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = false;
|
$idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
$ae_app.archives.show_view__archive_obj = false;
|
$idaa_loc.archives.show_view__archive_obj = false;
|
||||||
$ae_app.archives.show_edit__archive_obj = true;
|
$idaa_loc.archives.show_edit__archive_obj = true;
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn_new_archive ae_btn btn btn-warning"
|
class="ae_btn ae_smallest btn_new_archive ae_btn btn btn-warning"
|
||||||
>
|
>
|
||||||
@@ -514,7 +514,7 @@ function handle_deleted_archive_obj(event) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.archives.show_list__archive_obj_li}
|
{#if $idaa_loc.archives.show_list__archive_obj_li}
|
||||||
<List_archive_obj
|
<List_archive_obj
|
||||||
on:created__archive_obj={handle_created_archive_obj}
|
on:created__archive_obj={handle_created_archive_obj}
|
||||||
on:updated__archive_obj={handle_updated_archive_obj}
|
on:updated__archive_obj={handle_updated_archive_obj}
|
||||||
@@ -523,7 +523,7 @@ function handle_deleted_archive_obj(event) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.archives.show_view__archive_obj && $slct.archive_obj}
|
{#if $idaa_loc.archives.show_view__archive_obj && $slct.archive_obj}
|
||||||
<View_archive_obj />
|
<View_archive_obj />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@@ -531,16 +531,16 @@ function handle_deleted_archive_obj(event) {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.archives.show_edit__archive_obj}
|
{#if $idaa_loc.archives.show_edit__archive_obj}
|
||||||
<Element_modal_v3
|
<Element_modal_v3
|
||||||
show = { true }
|
show = { true }
|
||||||
modal_cover_body = { false }
|
modal_cover_body = { false }
|
||||||
report_client_dimensions = { true }
|
report_client_dimensions = { true }
|
||||||
on:close={ () => {
|
on:close={ () => {
|
||||||
$ae_app.archives.show_main__options = true;
|
$idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = true;
|
$idaa_loc.archives.show_list__archive_obj_li = true;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
$ae_app.archives.show_view__archive_obj = false;
|
$idaa_loc.archives.show_view__archive_obj = false;
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
url.searchParams.delete('archive_id');
|
url.searchParams.delete('archive_id');
|
||||||
@@ -571,7 +571,7 @@ function handle_deleted_archive_obj(event) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
<!-- {#if $ae_app.archives.show_view__archive_obj && $slct.archive_obj}
|
<!-- {#if $idaa_loc.archives.show_view__archive_obj && $slct.archive_obj}
|
||||||
<Element_modal_v3
|
<Element_modal_v3
|
||||||
show = { true }
|
show = { true }
|
||||||
modal_cover_body = { true }
|
modal_cover_body = { true }
|
||||||
@@ -581,10 +581,10 @@ function handle_deleted_archive_obj(event) {
|
|||||||
$slct.archive_id = null;
|
$slct.archive_id = null;
|
||||||
$slct.archive_obj = {};
|
$slct.archive_obj = {};
|
||||||
|
|
||||||
$ae_app.archives.show_main__options = true;
|
$idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = true;
|
$idaa_loc.archives.show_list__archive_obj_li = true;
|
||||||
$ae_app.archives.show_view__archive_obj = false;
|
$idaa_loc.archives.show_view__archive_obj = false;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
$ae_app.iframe_height_modal_body = 0;
|
$ae_app.iframe_height_modal_body = 0;
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ type key_val = {
|
|||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
$ae_app.archives.input_file_list = []
|
$idaa_loc.archives.input_file_list = []
|
||||||
|
|
||||||
let create_archive_content_obj_promise: any;
|
let create_archive_content_obj_promise: any;
|
||||||
let delete_archive_content_obj_promise: any;
|
let delete_archive_content_obj_promise: any;
|
||||||
@@ -315,14 +315,14 @@ function handle_input_file_list_updated(event) {
|
|||||||
|
|
||||||
// This now needs be reviewed and possibly updated with additional information. Check if any files have already been uploaded in the past and ignore.
|
// This now needs be reviewed and possibly updated with additional information. Check if any files have already been uploaded in the past and ignore.
|
||||||
let new_upload_list = event.detail.input_file_list_processed;
|
let new_upload_list = event.detail.input_file_list_processed;
|
||||||
$ae_app.archives.input_file_list = new_upload_list;
|
$idaa_loc.archives.input_file_list = new_upload_list;
|
||||||
// Setting the first file as the default. For now other files are ignored?
|
// Setting the first file as the default. For now other files are ignored?
|
||||||
if (new_upload_list.length) {
|
if (new_upload_list.length) {
|
||||||
$ae_app.archives.input_filename = new_upload_list[0].filename;
|
$idaa_loc.archives.input_filename = new_upload_list[0].filename;
|
||||||
$ae_app.archives.input_file_extension = new_upload_list[0].guessed_extension;
|
$idaa_loc.archives.input_file_extension = new_upload_list[0].guessed_extension;
|
||||||
} else {
|
} else {
|
||||||
$ae_app.archives.input_filename = '';
|
$idaa_loc.archives.input_filename = '';
|
||||||
$ae_app.archives.input_file_extension = '';
|
$idaa_loc.archives.input_file_extension = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// for (let file_upload_item of new_upload_list) {
|
// for (let file_upload_item of new_upload_list) {
|
||||||
@@ -333,7 +333,7 @@ function handle_input_file_list_updated(event) {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
$ae_app.archives.form_file_upload_list = [];
|
$idaa_loc.archives.form_file_upload_list = [];
|
||||||
|
|
||||||
async function handle_delete_archive_content_obj({archive_content_id, hosted_file_id=null, method='delete'}) {
|
async function handle_delete_archive_content_obj({archive_content_id, hosted_file_id=null, method='delete'}) {
|
||||||
console.log('*** handle_delete_archive_content_obj() ***');
|
console.log('*** handle_delete_archive_content_obj() ***');
|
||||||
@@ -536,11 +536,11 @@ function tinymce_remove() {
|
|||||||
on:input_file_list_updated = {handle_input_file_list_updated}
|
on:input_file_list_updated = {handle_input_file_list_updated}
|
||||||
use_selected_file_table={true}
|
use_selected_file_table={true}
|
||||||
/>
|
/>
|
||||||
<!-- bind:input_file_list = {$ae_app.archives.form_file_upload_list} -->
|
<!-- bind:input_file_list = {$idaa_loc.archives.form_file_upload_list} -->
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<label for="file_path">File Path
|
<label for="file_path">File Path
|
||||||
{#if !$ae_app.administrator_access}
|
{#if !$ae_loc.administrator_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock" title="Field is locked"></span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
||||||
@@ -550,16 +550,16 @@ function tinymce_remove() {
|
|||||||
id="file_path"
|
id="file_path"
|
||||||
name="file_path"
|
name="file_path"
|
||||||
value={($slct.archive_content_obj.file_path ? $slct.archive_content_obj.file_path : '')}
|
value={($slct.archive_content_obj.file_path ? $slct.archive_content_obj.file_path : '')}
|
||||||
readonly={!$ae_app.administrator_access}
|
readonly={!$ae_loc.administrator_access}
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="filename">Filename
|
<label for="filename">Filename
|
||||||
<input type="text" id="filename" name="filename" value={($slct.archive_content_obj.filename ? $slct.archive_content_obj.filename : $ae_app.archives.input_filename)}>
|
<input type="text" id="filename" name="filename" value={($slct.archive_content_obj.filename ? $slct.archive_content_obj.filename : $idaa_loc.archives.input_filename)}>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="file_extension">File Extension
|
<label for="file_extension">File Extension
|
||||||
{#if !$ae_app.administrator_access}
|
{#if !$ae_loc.administrator_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock" title="Field is locked"></span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
||||||
@@ -568,8 +568,8 @@ function tinymce_remove() {
|
|||||||
type="text"
|
type="text"
|
||||||
id="file_extension"
|
id="file_extension"
|
||||||
name="file_extension"
|
name="file_extension"
|
||||||
value={($slct.archive_content_obj.file_extension ? $slct.archive_content_obj.file_extension : $ae_app.archives.input_file_extension)}
|
value={($slct.archive_content_obj.file_extension ? $slct.archive_content_obj.file_extension : $idaa_loc.archives.input_file_extension)}
|
||||||
readonly={!$ae_app.administrator_access}
|
readonly={!$ae_loc.administrator_access}
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
@@ -624,7 +624,7 @@ function tinymce_remove() {
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<section class="ae_section archive_content__admin_options"> <!-- BEGIN: section archive_content__admin_options -->
|
<section class="ae_section archive_content__admin_options"> <!-- BEGIN: section archive_content__admin_options -->
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
@@ -657,7 +657,7 @@ function tinymce_remove() {
|
|||||||
|
|
||||||
<label>Group <input type="text" name="group" value={$slct.archive_content_obj.group} max="100" /></label>
|
<label>Group <input type="text" name="group" value={$slct.archive_content_obj.group} max="100" /></label>
|
||||||
|
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<label>Enable
|
<label>Enable
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ if ($slct.archive_id) {
|
|||||||
content: null,
|
content: null,
|
||||||
topic_id: null,
|
topic_id: null,
|
||||||
anonymous: false,
|
anonymous: false,
|
||||||
external_person_id: $ae_app.novi_uuid,
|
external_person_id: $idaa_loc.novi_uuid,
|
||||||
full_name: $ae_app.novi_full_name,
|
full_name: $idaa_loc.novi_full_name,
|
||||||
email: $ae_app.novi_email,
|
email: $idaa_loc.novi_email,
|
||||||
|
|
||||||
sort: null,
|
sort: null,
|
||||||
notes: null,
|
notes: null,
|
||||||
@@ -506,7 +506,7 @@ function tinymce_remove() {
|
|||||||
</fieldset> -->
|
</fieldset> -->
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<section class="ae_section archive__admin_options"> <!-- BEGIN: section archive__admin_options -->
|
<section class="ae_section archive__admin_options"> <!-- BEGIN: section archive__admin_options -->
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
@@ -539,7 +539,7 @@ function tinymce_remove() {
|
|||||||
|
|
||||||
<label>Group <input type="text" name="group" value={$slct.archive_obj.group} max="100" /></label>
|
<label>Group <input type="text" name="group" value={$slct.archive_obj.group} max="100" /></label>
|
||||||
|
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<label>Enable
|
<label>Enable
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ $: if ($slct_trigger == 'load__archive_content_obj_li' && $slct.archive_id) {
|
|||||||
async function handle_load_archive_content_obj_li({archive_id, try_cache=false}) {
|
async function handle_load_archive_content_obj_li({archive_id, try_cache=false}) {
|
||||||
console.log('*** handle_load_archive_content_obj_li() ***');
|
console.log('*** handle_load_archive_content_obj_li() ***');
|
||||||
|
|
||||||
let enabled = $ae_app.archives.enabled;
|
let enabled = $idaa_loc.archives.enabled;
|
||||||
let hidden = $ae_app.archives.hidden;
|
let hidden = $idaa_loc.archives.hidden;
|
||||||
let limit = $ae_app.archives.limit;
|
let limit = $idaa_loc.archives.limit;
|
||||||
let offset = $ae_app.archives.offset;
|
let offset = $idaa_loc.archives.offset;
|
||||||
// $ae_app.archives.content_group_sort = 'DESC'; // 'ASC' or 'DESC'
|
// $idaa_loc.archives.content_group_sort = 'DESC'; // 'ASC' or 'DESC'
|
||||||
let group_sort = $ae_app.archives.content_group_sort; // 'ASC' or 'DESC'
|
let group_sort = $idaa_loc.archives.content_group_sort; // 'ASC' or 'DESC'
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
@@ -139,9 +139,9 @@ function handle_created_archive_content_obj(event) {
|
|||||||
|
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
|
|
||||||
$ae_app.archives.show_list__event_obj_li = true;
|
$idaa_loc.archives.show_list__event_obj_li = true;
|
||||||
$ae_app.archives.show_edit__archive_content_id = false;
|
$idaa_loc.archives.show_edit__archive_content_id = false;
|
||||||
$ae_app.archives.show_view__archive_content_id = false;
|
$idaa_loc.archives.show_view__archive_content_id = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_updated_archive_content_obj(event) {
|
function handle_updated_archive_content_obj(event) {
|
||||||
@@ -150,9 +150,9 @@ function handle_updated_archive_content_obj(event) {
|
|||||||
|
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
|
|
||||||
$ae_app.archives.show_list__event_obj_li = true;
|
$idaa_loc.archives.show_list__event_obj_li = true;
|
||||||
$ae_app.archives.show_edit__archive_content_id = false;
|
$idaa_loc.archives.show_edit__archive_content_id = false;
|
||||||
$ae_app.archives.show_view__archive_content_id = false;
|
$idaa_loc.archives.show_view__archive_content_id = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_deleted_archive_content_obj(event) {
|
function handle_deleted_archive_content_obj(event) {
|
||||||
@@ -161,9 +161,9 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
|
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
|
|
||||||
$ae_app.archives.show_list__event_obj_li = true;
|
$idaa_loc.archives.show_list__event_obj_li = true;
|
||||||
$ae_app.archives.show_edit__archive_content_id = false;
|
$idaa_loc.archives.show_edit__archive_content_id = false;
|
||||||
$ae_app.archives.show_view__archive_content_id = false;
|
$idaa_loc.archives.show_view__archive_content_id = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -178,14 +178,14 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
<button
|
<button
|
||||||
class="ae_btn btn btn-info ae_margin_sm"
|
class="ae_btn btn btn-info ae_margin_sm"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if ($ae_app.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group) {
|
if ($idaa_loc.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group) {
|
||||||
$ae_app.archives.show_list__archive_content_li_group = null;
|
$idaa_loc.archives.show_list__archive_content_li_group = null;
|
||||||
} else {
|
} else {
|
||||||
$ae_app.archives.show_list__archive_content_li_group = idaa_archive_content_obj.group;
|
$idaa_loc.archives.show_list__archive_content_li_group = idaa_archive_content_obj.group;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{#if $ae_app.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group}
|
{#if $idaa_loc.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group}
|
||||||
<span class="fas fa-caret-down" in:fade={{ duration: 250 }}
|
<span class="fas fa-caret-down" in:fade={{ duration: 250 }}
|
||||||
out:fade={{ duration: 0 }}></span>
|
out:fade={{ duration: 0 }}></span>
|
||||||
<!-- <span class="fas fa-minus"></span> -->
|
<!-- <span class="fas fa-minus"></span> -->
|
||||||
@@ -202,8 +202,8 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $ae_app.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group}
|
{#if $idaa_loc.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group}
|
||||||
<!-- class:ae_d_none={$ae_app.archives.show_list__archive_content_li_group != idaa_archive_content_obj.group} -->
|
<!-- class:ae_d_none={$idaa_loc.archives.show_list__archive_content_li_group != idaa_archive_content_obj.group} -->
|
||||||
<div
|
<div
|
||||||
id={`idaa_archive_content_id__${idaa_archive_content_obj.archive_content_id_random}`}
|
id={`idaa_archive_content_id__${idaa_archive_content_obj.archive_content_id_random}`}
|
||||||
class="container archive_content ae_object archive_content_obj"
|
class="container archive_content ae_object archive_content_obj"
|
||||||
@@ -219,18 +219,18 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
|
|
||||||
{#if idaa_archive_content_obj.type}<span class="badge badge-info bg-info"><span class="fas fa-user-md"></span> {idaa_archive_content_obj.type}</span>{/if}
|
{#if idaa_archive_content_obj.type}<span class="badge badge-info bg-info"><span class="fas fa-user-md"></span> {idaa_archive_content_obj.type}</span>{/if}
|
||||||
|
|
||||||
{#if $ae_app.trusted_access && idaa_archive_content_obj.hide}<span class="badge badge-warning"><span class="fas fa-exclamation-triangle"></span> Hidden</span>{/if}
|
{#if $ae_loc.trusted_access && idaa_archive_content_obj.hide}<span class="badge badge-warning"><span class="fas fa-exclamation-triangle"></span> Hidden</span>{/if}
|
||||||
{#if $ae_app.administrator_access && !idaa_archive_content_obj.enable}<span class="badge badge-warning"><span class="fas fa-exclamation-triangle"></span> Not enabled</span>{/if}
|
{#if $ae_loc.administrator_access && !idaa_archive_content_obj.enable}<span class="badge badge-warning"><span class="fas fa-exclamation-triangle"></span> Not enabled</span>{/if}
|
||||||
</h3>
|
</h3>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="ae_options archive_content_obj__options">
|
<section class="ae_options archive_content_obj__options">
|
||||||
{#if idaa_archive_content_obj.archive_content_id_random != $ae_app.archives.show_view__archive_content_media}
|
{#if idaa_archive_content_obj.archive_content_id_random != $idaa_loc.archives.show_view__archive_content_media}
|
||||||
<button
|
<button
|
||||||
on:click={ () => {
|
on:click={ () => {
|
||||||
$slct.archive_content_id = idaa_archive_content_obj.archive_content_id_random;
|
$slct.archive_content_id = idaa_archive_content_obj.archive_content_id_random;
|
||||||
$slct.archive_content_obj = idaa_archive_content_obj;
|
$slct.archive_content_obj = idaa_archive_content_obj;
|
||||||
$ae_app.archives.show_view__archive_content_media = $slct.archive_content_id;
|
$idaa_loc.archives.show_view__archive_content_media = $slct.archive_content_id;
|
||||||
// idaa_archive_content_obj.show_view__archive_content_media = true;
|
// idaa_archive_content_obj.show_view__archive_content_media = true;
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_md btn btn-md btn-primary"
|
class="ae_btn btn_md btn btn-md btn-primary"
|
||||||
@@ -256,7 +256,7 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
$slct.archive_content_id = idaa_archive_content_obj.archive_content_id_random;
|
$slct.archive_content_id = idaa_archive_content_obj.archive_content_id_random;
|
||||||
$slct.archive_content_obj = idaa_archive_content_obj;
|
$slct.archive_content_obj = idaa_archive_content_obj;
|
||||||
|
|
||||||
$ae_app.archives.show_view__archive_content_media = false;
|
$idaa_loc.archives.show_view__archive_content_media = false;
|
||||||
// idaa_archive_content_obj.show_view__archive_content_media = false;
|
// idaa_archive_content_obj.show_view__archive_content_media = false;
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_md btn btn-md btn-secondary"
|
class="ae_btn btn_md btn btn-md btn-secondary"
|
||||||
@@ -273,7 +273,7 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<a href="{$ae_app.app.base_url}{idaa_archive_content_obj.hosted_file_path}" class="ae_btn btn_md btn btn-md btn-secondary" title="Download this file">
|
<a href="{$ae_app.app.base_url}{idaa_archive_content_obj.hosted_file_path}" class="ae_btn btn_md btn btn-md btn-secondary" title="Download this file">
|
||||||
<span class="fas fa-download"></span>
|
<span class="fas fa-download"></span>
|
||||||
Download <!-- This really should check the file type: view, show, play, listen, watch -->
|
Download <!-- This really should check the file type: view, show, play, listen, watch -->
|
||||||
@@ -287,7 +287,7 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$slct.archive_content_id = idaa_archive_content_obj.archive_content_id_random;
|
$slct.archive_content_id = idaa_archive_content_obj.archive_content_id_random;
|
||||||
@@ -298,11 +298,11 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
// url.searchParams.set('archive_content_id', idaa_archive_content_obj.archive_content_id_random);
|
// url.searchParams.set('archive_content_id', idaa_archive_content_obj.archive_content_id_random);
|
||||||
// history.pushState({}, '', url);
|
// history.pushState({}, '', url);
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = true;
|
// $idaa_loc.archives.show_main__options = true;
|
||||||
// $ae_app.archives.show_list__archive_content_li = true;
|
// $idaa_loc.archives.show_list__archive_content_li = true;
|
||||||
// $ae_app.archives.show_view__archive_content_id = false;
|
// $idaa_loc.archives.show_view__archive_content_id = false;
|
||||||
$ae_app.archives.show_view__archive_content_media = false;
|
$idaa_loc.archives.show_view__archive_content_media = false;
|
||||||
$ae_app.archives.show_edit__archive_content_id = true;
|
$idaa_loc.archives.show_edit__archive_content_id = true;
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-warning"
|
class="ae_btn ae_smallest btn btn-warning"
|
||||||
title={`Edit content: ${idaa_archive_content_obj.name}`}
|
title={`Edit content: ${idaa_archive_content_obj.name}`}
|
||||||
@@ -324,7 +324,7 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
|
|
||||||
|
|
||||||
<!-- Doing some checks before the media player/viewer shows. The player should be the only one showing. So there is a sort of global check first. -->
|
<!-- Doing some checks before the media player/viewer shows. The player should be the only one showing. So there is a sort of global check first. -->
|
||||||
{#if idaa_archive_content_obj.archive_content_id_random == $ae_app.archives.show_view__archive_content_media}
|
{#if idaa_archive_content_obj.archive_content_id_random == $idaa_loc.archives.show_view__archive_content_media}
|
||||||
<Player_archive_content_obj archive_content_id={idaa_archive_content_obj.archive_content_id_random} />
|
<Player_archive_content_obj archive_content_id={idaa_archive_content_obj.archive_content_id_random} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@@ -371,7 +371,7 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
|
|
||||||
<section
|
<section
|
||||||
class="ae_section ae_footer ae_meta archive_content__meta"
|
class="ae_section ae_footer ae_meta archive_content__meta"
|
||||||
class:ae_d_none={!$ae_app.administrator_access}
|
class:ae_d_none={!$ae_loc.administrator_access}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="archive_content__archive_content_type"
|
class="archive_content__archive_content_type"
|
||||||
@@ -403,7 +403,7 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.archives.show_edit__archive_content_id}
|
{#if $idaa_loc.archives.show_edit__archive_content_id}
|
||||||
<!-- <section class="ae_edit archive_content_obj archive_content_id idaa_archive_content_id_edit"> -->
|
<!-- <section class="ae_edit archive_content_obj archive_content_id idaa_archive_content_id_edit"> -->
|
||||||
<Element_modal_v3
|
<Element_modal_v3
|
||||||
show = { true }
|
show = { true }
|
||||||
@@ -412,11 +412,11 @@ function handle_deleted_archive_content_obj(event) {
|
|||||||
$slct.archive_content_id = null;
|
$slct.archive_content_id = null;
|
||||||
$slct.archive_content_obj = {};
|
$slct.archive_content_obj = {};
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = true;
|
// $idaa_loc.archives.show_main__options = true;
|
||||||
// $ae_app.archives.show_list__archive_content_li = true;
|
// $idaa_loc.archives.show_list__archive_content_li = true;
|
||||||
$ae_app.archives.show_view__archive_content_media = false;
|
$idaa_loc.archives.show_view__archive_content_media = false;
|
||||||
$ae_app.archives.show_edit__archive_content_id = false;
|
$idaa_loc.archives.show_edit__archive_content_id = false;
|
||||||
// $ae_app.archives.show_view__archive_content_id = false;
|
// $idaa_loc.archives.show_view__archive_content_id = false;
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
url.searchParams.delete('archive_content_id');
|
url.searchParams.delete('archive_content_id');
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ onMount(() => {
|
|||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_app.trusted_access && idaa_archive_obj.hide}<span class="badge badge-warning"><span class="fas fa-exclamation-triangle"></span> Hidden</span>{/if}
|
{#if $ae_loc.trusted_access && idaa_archive_obj.hide}<span class="badge badge-warning"><span class="fas fa-exclamation-triangle"></span> Hidden</span>{/if}
|
||||||
{#if $ae_app.administrator_access && !idaa_archive_obj.enable}<span class="badge badge-warning"><span class="fas fa-exclamation-triangle"></span> Not enabled</span>{/if}
|
{#if $ae_loc.administrator_access && !idaa_archive_obj.enable}<span class="badge badge-warning"><span class="fas fa-exclamation-triangle"></span> Not enabled</span>{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ae_options archive_obj__options">
|
<div class="ae_options archive_obj__options">
|
||||||
@@ -40,13 +40,13 @@ onMount(() => {
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
$slct.archive_id = idaa_archive_obj.archive_id_random;
|
$slct.archive_id = idaa_archive_obj.archive_id_random;
|
||||||
$slct.archive_obj = idaa_archive_obj;
|
$slct.archive_obj = idaa_archive_obj;
|
||||||
$ae_app.archives.content_group_sort = $slct.archive_obj.cfg_json.content_group_sort;
|
$idaa_loc.archives.content_group_sort = $slct.archive_obj.cfg_json.content_group_sort;
|
||||||
$slct_trigger = 'load__archive_obj';
|
$slct_trigger = 'load__archive_obj';
|
||||||
|
|
||||||
$ae_app.archives.show_main__options = true;
|
$idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = false;
|
$idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
$ae_app.archives.show_view__archive_obj = true;
|
$idaa_loc.archives.show_view__archive_obj = true;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
}}
|
}}
|
||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
title={`View: ${idaa_archive_obj.name}`}
|
title={`View: ${idaa_archive_obj.name}`}
|
||||||
@@ -54,17 +54,17 @@ onMount(() => {
|
|||||||
<span class="fas fa-envelope-open"></span> Open
|
<span class="fas fa-envelope-open"></span> Open
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$slct.archive_id = idaa_archive_obj.archive_id_random;
|
$slct.archive_id = idaa_archive_obj.archive_id_random;
|
||||||
$slct.archive_obj = idaa_archive_obj;
|
$slct.archive_obj = idaa_archive_obj;
|
||||||
$slct_trigger = 'load__archive_obj';
|
$slct_trigger = 'load__archive_obj';
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = true;
|
// $idaa_loc.archives.show_main__options = true;
|
||||||
// $ae_app.archives.show_list__archive_obj_li = true;
|
// $idaa_loc.archives.show_list__archive_obj_li = true;
|
||||||
$ae_app.archives.show_view__archive_obj = false;
|
$idaa_loc.archives.show_view__archive_obj = false;
|
||||||
$ae_app.archives.show_edit__archive_obj = true;
|
$idaa_loc.archives.show_edit__archive_obj = true;
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-warning"
|
class="ae_btn ae_smallest btn btn-warning"
|
||||||
title={`Edit archive: ${idaa_archive_obj.name}`}
|
title={`Edit archive: ${idaa_archive_obj.name}`}
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ if ($slct.archive_id) {
|
|||||||
url.searchParams.set('archive_id', $slct.archive_id);
|
url.searchParams.set('archive_id', $slct.archive_id);
|
||||||
history.pushState({}, '', url);
|
history.pushState({}, '', url);
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = true;
|
// $idaa_loc.archives.show_main__options = true;
|
||||||
$ae_app.archives.show_list__archive_obj_li = false;
|
$idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
$ae_app.archives.show_edit__archive_obj = false;
|
$idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
$ae_app.archives.show_view__archive_obj = true;
|
$idaa_loc.archives.show_view__archive_obj = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
@@ -44,10 +44,10 @@ function handle_archive_content_obj_created(event) {
|
|||||||
$slct_trigger = 'load__archive_obj';
|
$slct_trigger = 'load__archive_obj';
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
|
|
||||||
// $ae_app.archives.show_list__archive_obj_li = false;
|
// $idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
// $ae_app.archives.show_edit__archive_obj = false;
|
// $idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
// $ae_app.archives.show_view__archive_obj = true;
|
// $idaa_loc.archives.show_view__archive_obj = true;
|
||||||
$ae_app.archives.show_edit__archive_content_id = false;
|
$idaa_loc.archives.show_edit__archive_content_id = false;
|
||||||
}
|
}
|
||||||
function handle_archive_content_obj_updated(event) {
|
function handle_archive_content_obj_updated(event) {
|
||||||
console.log('*** handle_archive_content_obj_updated() ***');
|
console.log('*** handle_archive_content_obj_updated() ***');
|
||||||
@@ -56,10 +56,10 @@ function handle_archive_content_obj_updated(event) {
|
|||||||
$slct_trigger = 'load__archive_obj';
|
$slct_trigger = 'load__archive_obj';
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
|
|
||||||
// $ae_app.archives.show_list__archive_obj_li = false;
|
// $idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
// $ae_app.archives.show_edit__archive_obj = false;
|
// $idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
// $ae_app.archives.show_view__archive_obj = true;
|
// $idaa_loc.archives.show_view__archive_obj = true;
|
||||||
$ae_app.archives.show_edit__archive_content_id = false;
|
$idaa_loc.archives.show_edit__archive_content_id = false;
|
||||||
}
|
}
|
||||||
function handle_archive_content_obj_deleted(event) {
|
function handle_archive_content_obj_deleted(event) {
|
||||||
console.log('*** handle_archive_content_obj_deleted() ***');
|
console.log('*** handle_archive_content_obj_deleted() ***');
|
||||||
@@ -69,10 +69,10 @@ function handle_archive_content_obj_deleted(event) {
|
|||||||
$slct_trigger = 'load__archive_obj';
|
$slct_trigger = 'load__archive_obj';
|
||||||
$slct_trigger = 'load__archive_content_obj_li';
|
$slct_trigger = 'load__archive_content_obj_li';
|
||||||
|
|
||||||
// $ae_app.archives.show_list__archive_obj_li = false;
|
// $idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
// $ae_app.archives.show_edit__archive_obj = false;
|
// $idaa_loc.archives.show_edit__archive_obj = false;
|
||||||
// $ae_app.archives.show_view__archive_obj = true;
|
// $idaa_loc.archives.show_view__archive_obj = true;
|
||||||
$ae_app.archives.show_edit__archive_content_id = false;
|
$idaa_loc.archives.show_edit__archive_content_id = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ function handle_archive_content_obj_deleted(event) {
|
|||||||
|
|
||||||
<section
|
<section
|
||||||
class="ae_section ae_meta archive__meta"
|
class="ae_section ae_meta archive__meta"
|
||||||
class:ae_d_none={!$ae_app.administrator_access}
|
class:ae_d_none={!$ae_loc.administrator_access}
|
||||||
>
|
>
|
||||||
<div class="ae_group">
|
<div class="ae_group">
|
||||||
<div class="archive__created_on_updated_on">
|
<div class="archive__created_on_updated_on">
|
||||||
@@ -125,14 +125,14 @@ function handle_archive_content_obj_deleted(event) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<div class="ae_options">
|
<div class="ae_options">
|
||||||
{#if $ae_app.trusted_access || $slct.archive_obj.external_person_id === $ae_app.novi_uuid}
|
{#if $ae_loc.trusted_access || $slct.archive_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$slct.archive_content_id = null;
|
$slct.archive_content_id = null;
|
||||||
$slct.archive_content_obj = {};
|
$slct.archive_content_obj = {};
|
||||||
$ae_app.archives.show_edit__archive_content_id = true;
|
$idaa_loc.archives.show_edit__archive_content_id = true;
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-warning"
|
class="ae_btn ae_smallest btn btn-warning"
|
||||||
title={`Add content for: ${$slct.archive_obj.name}`}
|
title={`Add content for: ${$slct.archive_obj.name}`}
|
||||||
@@ -149,10 +149,10 @@ function handle_archive_content_obj_deleted(event) {
|
|||||||
// url.searchParams.set('archive_id', $slct.archive_obj.archive_id_random);
|
// url.searchParams.set('archive_id', $slct.archive_obj.archive_id_random);
|
||||||
// history.pushState({}, '', url);
|
// history.pushState({}, '', url);
|
||||||
|
|
||||||
// $ae_app.archives.show_main__options = false;
|
// $idaa_loc.archives.show_main__options = false;
|
||||||
// $ae_app.archives.show_list__archive_obj_li = false;
|
// $idaa_loc.archives.show_list__archive_obj_li = false;
|
||||||
$ae_app.archives.show_view__archive_obj = false;
|
$idaa_loc.archives.show_view__archive_obj = false;
|
||||||
$ae_app.archives.show_edit__archive_obj = true;
|
$idaa_loc.archives.show_edit__archive_obj = true;
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-xs btn-warning"
|
class="ae_btn ae_smallest btn btn-xs btn-warning"
|
||||||
title={`Edit archive: ${$slct.archive_obj.name}`}
|
title={`Edit archive: ${$slct.archive_obj.name}`}
|
||||||
@@ -190,15 +190,15 @@ function handle_archive_content_obj_deleted(event) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if $ae_app.trusted_access || idaa_archive_content_obj.external_person_id === $ae_app.novi_uuid}
|
{#if $ae_loc.trusted_access || idaa_archive_content_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||||
<div class="ae_options">
|
<div class="ae_options">
|
||||||
<button on:click={() => {
|
<button on:click={() => {
|
||||||
$slct.archive_content_id = idaa_archive_content_obj.archive_content_id_random;
|
$slct.archive_content_id = idaa_archive_content_obj.archive_content_id_random;
|
||||||
$slct.archive_content_obj = idaa_archive_content_obj;
|
$slct.archive_content_obj = idaa_archive_content_obj;
|
||||||
|
|
||||||
// $ae_app.archives.show_archive_content_list = false;
|
// $idaa_loc.archives.show_archive_content_list = false;
|
||||||
$ae_app.archives.show_edit__archive_content_id = true;
|
$idaa_loc.archives.show_edit__archive_content_id = true;
|
||||||
// $ae_app.archives.show_view__archive_obj = false;
|
// $idaa_loc.archives.show_view__archive_obj = false;
|
||||||
}}
|
}}
|
||||||
class="btn btn-default"
|
class="btn btn-default"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
/** @type {import('./$types').PageData} */
|
/** @type {import('./$types').PageData} */
|
||||||
export let data: any;
|
export let data: any;
|
||||||
let log_lvl = 2;
|
let log_lvl = 1;
|
||||||
// console.log(`ae_idaa_bb +page.svelte data:`, data);
|
// console.log(`ae_idaa_bb +page.svelte data:`, data);
|
||||||
|
|
||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
@@ -26,7 +26,13 @@ $: lq__post_obj_li = liveQuery(async () => {
|
|||||||
let results = await db_posts.post
|
let results = await db_posts.post
|
||||||
.where('account_id')
|
.where('account_id')
|
||||||
.equals($slct.account_id)
|
.equals($slct.account_id)
|
||||||
.sortBy('name');
|
// .orderBy('updated_on')
|
||||||
|
// .toArray()
|
||||||
|
.reverse()
|
||||||
|
.sortBy('updated_on');
|
||||||
|
// .sortBy('updated_on, created_on');
|
||||||
|
// .sortBy('[updated_on+created_on]');
|
||||||
|
// .sortBy('[created_on+updated_on]');
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
});
|
});
|
||||||
@@ -38,12 +44,23 @@ $: lq__post_obj = liveQuery(async () => {
|
|||||||
return results;
|
return results;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$: lq__post_comment_obj_li = liveQuery(async () => {
|
||||||
|
let results = await db_posts.comment
|
||||||
|
.where('post_id')
|
||||||
|
.equals($idaa_slct.post_id)
|
||||||
|
.reverse()
|
||||||
|
.sortBy('updated_on');
|
||||||
|
// .sortBy('title');
|
||||||
|
|
||||||
|
return results;
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
class="
|
class="
|
||||||
ae_idaa__recovery_meetings
|
ae_idaa__bb
|
||||||
container h-full mx-auto
|
container h-full mx-auto
|
||||||
flex flex-col gap-1
|
flex flex-col gap-1
|
||||||
py-1 px-2 pb-16
|
py-1 px-2 pb-16
|
||||||
@@ -53,29 +70,59 @@ $: lq__post_obj = liveQuery(async () => {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<!-- <h1>Bulletin Board {$lq__post_obj_li?.length}</h1> -->
|
||||||
|
|
||||||
<h1>Bulletin Board {$lq__post_obj_li?.length}</h1>
|
|
||||||
{#if $lq__post_obj_li && $lq__post_obj_li?.length }
|
{#if $lq__post_obj_li && $lq__post_obj_li?.length }
|
||||||
<Comp__post_obj_li
|
<Comp__post_obj_li
|
||||||
lq__post_obj_li={lq__post_obj_li}
|
lq__post_obj_li={lq__post_obj_li}
|
||||||
/>
|
/>
|
||||||
|
{:else}
|
||||||
|
<p>No posts available to show.</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<!-- Main modal -->
|
<!-- Modal: Post (Bulletin Board) view ID -->
|
||||||
<Modal
|
<Modal
|
||||||
title="{$lq__post_obj?.title} - {$lq__post_obj?.id}"
|
title="{$lq__post_obj?.title} - {$lq__post_obj?.id}"
|
||||||
bind:open={$idaa_slct.post_id}
|
bind:open={$idaa_sess.bb.show__modal_view}
|
||||||
autoclose={false}
|
autoclose={false}
|
||||||
size="xl"
|
outsideclose={true}
|
||||||
|
placement="top-center"
|
||||||
|
size="lg"
|
||||||
class="bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y"
|
class="bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<svelte:fragment slot="header">
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-lg font-semibold">
|
||||||
|
{#if $ae_loc.trusted_access || $lq__post_obj?.external_person_id === $idaa_loc.novi_uuid}
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
// const url = new URL(location);
|
||||||
|
// url.searchParams.set('post_id', $lq__post_obj?.post_id_random);
|
||||||
|
// history.pushState({}, '', url);
|
||||||
|
|
||||||
|
$idaa_sess.bb.show__modal_view = false;
|
||||||
|
$idaa_sess.bb.show__modal_edit = true;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||||
|
title={`Edit meeting: ${$lq__post_obj?.title}`}
|
||||||
|
>
|
||||||
|
<span class="fas fa-edit m-1"></span> Edit
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
{$lq__post_obj?.title}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</svelte:fragment>
|
||||||
|
|
||||||
<Comp__post_obj_id_view
|
<Comp__post_obj_id_view
|
||||||
lq__post_obj={lq__post_obj}
|
lq__post_obj={lq__post_obj}
|
||||||
|
lq__post_comment_obj_li={lq__post_comment_obj_li}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -6,9 +6,8 @@ type key_val = {
|
|||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
// *** Import Aether core variables and functions
|
// *** Import Aether core variables and functions
|
||||||
import { ae, api, Element_modal_v3 } from 'aether_npm_lib';
|
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||||
|
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
||||||
import { slct, slct_trigger, ae_app } from './stores';
|
|
||||||
|
|
||||||
// *** Import Aether core components
|
// *** Import Aether core components
|
||||||
|
|
||||||
@@ -19,53 +18,53 @@ import Edit_post_obj from './10_edit__post_obj.svelte';
|
|||||||
import View_post_obj from './ae_idaa_comp__post_obj_id_view.svelte';
|
import View_post_obj from './ae_idaa_comp__post_obj_id_view.svelte';
|
||||||
|
|
||||||
// *** Export/Exposed variables and functions for component
|
// *** Export/Exposed variables and functions for component
|
||||||
export let account_id: string = $ae_app.account_id;
|
export let account_id: string = $ae_loc.account_id;
|
||||||
export let post_id: string = $ae_app.posts.post_id;
|
export let post_id: string = $idaa_loc.bb.post_id;
|
||||||
|
|
||||||
export let novi_uuid: string = $ae_app.novi_uuid;
|
export let novi_uuid: string = $idaa_loc.novi_uuid;
|
||||||
export let novi_email: string = $ae_app.novi_email;
|
export let novi_email: string = $idaa_loc.novi_email;
|
||||||
export let novi_full_name: string = $ae_app.novi_full_name;
|
export let novi_full_name: string = $idaa_loc.novi_full_name;
|
||||||
export let novi_admin_li: string = $ae_app.novi_admin_li;
|
export let novi_admin_li: string = $idaa_loc.novi_admin_li;
|
||||||
export let novi_trusted_li: string = $ae_app.novi_trusted_li;
|
export let novi_trusted_li: string = $idaa_loc.novi_trusted_li;
|
||||||
|
|
||||||
// *** Set initial variables
|
// *** Set initial variables
|
||||||
$ae_app.novi_uuid = novi_uuid;
|
$idaa_loc.novi_uuid = novi_uuid;
|
||||||
$ae_app.novi_email = decodeURIComponent(novi_email);
|
$idaa_loc.novi_email = decodeURIComponent(novi_email);
|
||||||
$ae_app.novi_full_name = decodeURIComponent(novi_full_name);
|
$idaa_loc.novi_full_name = decodeURIComponent(novi_full_name);
|
||||||
$ae_app.novi_admin_li = novi_admin_li;
|
$idaa_loc.novi_admin_li = novi_admin_li;
|
||||||
$ae_app.novi_trusted_li = novi_trusted_li;
|
$idaa_loc.novi_trusted_li = novi_trusted_li;
|
||||||
|
|
||||||
$ae_app.posts.show_main__options = true;
|
$idaa_loc.bb.show_main__options = true;
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
|
|
||||||
// NOTE: Check if the novi_uuid is in the novi_admin_li list
|
// NOTE: Check if the novi_uuid is in the novi_admin_li list
|
||||||
if ($ae_app.novi_uuid && $ae_app.novi_admin_li) {
|
if ($idaa_loc.novi_uuid && $idaa_loc.novi_admin_li) {
|
||||||
if ($ae_app.novi_admin_li.includes($ae_app.novi_uuid)) {
|
if ($idaa_loc.novi_admin_li.includes($idaa_loc.novi_uuid)) {
|
||||||
$ae_app.access_type = 'administrator';
|
$ae_loc.access_type = 'administrator';
|
||||||
$ae_app.administrator_access = true;
|
$ae_loc.administrator_access = true;
|
||||||
$ae_app.trusted_access = true;
|
$ae_loc.trusted_access = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// NOTE: Check if the novi_uuid is in the novi_trusted_li list
|
// NOTE: Check if the novi_uuid is in the novi_trusted_li list
|
||||||
if ($ae_app.novi_uuid && $ae_app.novi_trusted_li) {
|
if ($idaa_loc.novi_uuid && $idaa_loc.novi_trusted_li) {
|
||||||
if ($ae_app.novi_trusted_li.includes($ae_app.novi_uuid)) {
|
if ($idaa_loc.novi_trusted_li.includes($idaa_loc.novi_uuid)) {
|
||||||
$ae_app.access_type = 'trusted';
|
$ae_loc.access_type = 'trusted';
|
||||||
$ae_app.trusted_access = true;
|
$ae_loc.trusted_access = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ae_app.administrator_access) {
|
if ($ae_loc.administrator_access) {
|
||||||
$ae_app.posts.enabled = 'enabled';
|
$idaa_loc.bb.enabled = 'enabled';
|
||||||
$ae_app.posts.hidden = 'not_hidden';
|
$idaa_loc.bb.hidden = 'not_hidden';
|
||||||
$ae_app.events.limit = 150;
|
$idaa_loc.bb.limit = 150;
|
||||||
} else if ($ae_app.trusted_access) {
|
} else if ($ae_loc.trusted_access) {
|
||||||
$ae_app.posts.enabled = 'enabled';
|
$idaa_loc.bb.enabled = 'enabled';
|
||||||
$ae_app.posts.hidden = 'not_hidden';
|
$idaa_loc.bb.hidden = 'not_hidden';
|
||||||
$ae_app.events.limit = 75;
|
$idaa_loc.bb.limit = 75;
|
||||||
} else {
|
} else {
|
||||||
$ae_app.posts.enabled = 'enabled';
|
$idaa_loc.bb.enabled = 'enabled';
|
||||||
$ae_app.posts.hidden = 'not_hidden';
|
$idaa_loc.bb.hidden = 'not_hidden';
|
||||||
$ae_app.events.limit = 50;
|
$idaa_loc.bb.limit = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
let idaa_post_obj_li_get_promise;
|
let idaa_post_obj_li_get_promise;
|
||||||
@@ -93,10 +92,10 @@ if (post_id) {
|
|||||||
// url.searchParams.set('post_id', $slct.post_id);
|
// url.searchParams.set('post_id', $slct.post_id);
|
||||||
// history.pushState({}, '', url);
|
// history.pushState({}, '', url);
|
||||||
|
|
||||||
$ae_app.events.show_main__options = true;
|
$idaa_loc.bb.show_main__options = true;
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
$ae_app.posts.show_edit__post_id = false;
|
$idaa_loc.bb.show_edit__post_id = false;
|
||||||
$ae_app.posts.show_view__post_id = true;
|
$idaa_loc.bb.show_view__post_id = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$ae_app.client_content) {
|
if (!$ae_app.client_content) {
|
||||||
@@ -149,10 +148,10 @@ $: if ($slct_trigger == 'load__post_obj_li' && $slct.account_id) {
|
|||||||
async function handle_load_idaa_post_obj_li({account_id, try_cache=false}) {
|
async function handle_load_idaa_post_obj_li({account_id, try_cache=false}) {
|
||||||
console.log('*** handle_load_idaa_post_obj_li() ***');
|
console.log('*** handle_load_idaa_post_obj_li() ***');
|
||||||
|
|
||||||
let enabled = $ae_app.posts.enabled;
|
let enabled = $idaa_loc.bb.enabled;
|
||||||
let hidden = $ae_app.posts.hidden;
|
let hidden = $idaa_loc.bb.hidden;
|
||||||
let limit = $ae_app.posts.limit;
|
let limit = $idaa_loc.bb.limit;
|
||||||
let offset = $ae_app.posts.offset;
|
let offset = $idaa_loc.bb.offset;
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
@@ -200,19 +199,19 @@ $: if ($slct_trigger == 'load__post_obj' && $slct.post_id) {
|
|||||||
// let message = {'post_id': $slct.post_id};
|
// let message = {'post_id': $slct.post_id};
|
||||||
// window.parent.postMessage(message, "*");
|
// window.parent.postMessage(message, "*");
|
||||||
|
|
||||||
// $ae_app.posts.show_main__options = false;
|
// $idaa_loc.bb.show_main__options = false;
|
||||||
// $ae_app.posts.show_list__post_li = false;
|
// $idaa_loc.bb.show_list__post_li = false;
|
||||||
// $ae_app.posts.show_view__post_id = true;
|
// $idaa_loc.bb.show_view__post_id = true;
|
||||||
// $ae_app.posts.show_edit__post_id = false;
|
// $idaa_loc.bb.show_edit__post_id = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handle_load_post_id_obj({post_id, try_cache=false}) {
|
async function handle_load_post_id_obj({post_id, try_cache=false}) {
|
||||||
console.log('*** handle_load_post_id_obj() ***');
|
console.log('*** handle_load_post_id_obj() ***');
|
||||||
|
|
||||||
// let enabled = $ae_app.posts.enabled;
|
// let enabled = $idaa_loc.bb.enabled;
|
||||||
// let hidden = $ae_app.posts.hidden;
|
// let hidden = $idaa_loc.bb.hidden;
|
||||||
// let limit = $ae_app.posts.limit;
|
// let limit = $idaa_loc.bb.limit;
|
||||||
// let offset = $ae_app.posts.offset;
|
// let offset = $idaa_loc.bb.offset;
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
@@ -255,10 +254,10 @@ $: if ($slct_trigger == 'load__post_comment_obj_li' && $slct.post_id) {
|
|||||||
async function handle_load_post_comment_obj_li({post_id, try_cache=false}) {
|
async function handle_load_post_comment_obj_li({post_id, try_cache=false}) {
|
||||||
console.log('*** handle_load_post_comment_obj_li() ***');
|
console.log('*** handle_load_post_comment_obj_li() ***');
|
||||||
|
|
||||||
let enabled = $ae_app.posts.enabled;
|
let enabled = $idaa_loc.bb.enabled;
|
||||||
let hidden = $ae_app.posts.hidden;
|
let hidden = $idaa_loc.bb.hidden;
|
||||||
let limit = $ae_app.posts.limit;
|
let limit = $idaa_loc.bb.limit;
|
||||||
let offset = $ae_app.posts.offset;
|
let offset = $idaa_loc.bb.offset;
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
@@ -300,9 +299,9 @@ function handle_post_obj_created(event) {
|
|||||||
|
|
||||||
$slct_trigger = 'load__post_obj_li';
|
$slct_trigger = 'load__post_obj_li';
|
||||||
|
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
$ae_app.posts.show_edit__post_id = false;
|
$idaa_loc.bb.show_edit__post_id = false;
|
||||||
$ae_app.posts.show_view__post_id = false;
|
$idaa_loc.bb.show_view__post_id = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_post_obj_updated(event) {
|
function handle_post_obj_updated(event) {
|
||||||
@@ -314,9 +313,9 @@ function handle_post_obj_updated(event) {
|
|||||||
|
|
||||||
$slct_trigger = 'load__post_obj_li';
|
$slct_trigger = 'load__post_obj_li';
|
||||||
|
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
$ae_app.posts.show_edit__post_id = false;
|
$idaa_loc.bb.show_edit__post_id = false;
|
||||||
$ae_app.posts.show_view__post_id = false;
|
$idaa_loc.bb.show_view__post_id = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_post_obj_deleted(event) {
|
function handle_post_obj_deleted(event) {
|
||||||
@@ -328,9 +327,9 @@ function handle_post_obj_deleted(event) {
|
|||||||
|
|
||||||
$slct_trigger = 'load__post_obj_li';
|
$slct_trigger = 'load__post_obj_li';
|
||||||
|
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
$ae_app.posts.show_edit__post_id = false;
|
$idaa_loc.bb.show_edit__post_id = false;
|
||||||
$ae_app.posts.show_view__post_id = false;
|
$idaa_loc.bb.show_view__post_id = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -342,39 +341,39 @@ function handle_post_obj_deleted(event) {
|
|||||||
|
|
||||||
<section class="ae_section ae_meta">
|
<section class="ae_section ae_meta">
|
||||||
<p>
|
<p>
|
||||||
Novi: {$ae_app.novi_full_name}
|
Novi: {$idaa_loc.novi_full_name}
|
||||||
<span class="details">
|
<span class="details">
|
||||||
(
|
(
|
||||||
{$ae_app.novi_email}
|
{$idaa_loc.novi_email}
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<span class="access_type administrator_access">Administrator</span>
|
<span class="access_type administrator_access">Administrator</span>
|
||||||
{:else if $ae_app.trusted_access}
|
{:else if $ae_loc.trusted_access}
|
||||||
<span class="access_type trusted_access">Trusted</span>
|
<span class="access_type trusted_access">Trusted</span>
|
||||||
{/if}
|
{/if}
|
||||||
<span class="novi_uuid">UUID: {$ae_app.novi_uuid}</span>
|
<span class="novi_uuid">UUID: {$idaa_loc.novi_uuid}</span>
|
||||||
)
|
)
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<!-- <p>Page height: {window.innerHeight}</p> -->
|
<!-- <p>Page height: {window.innerHeight}</p> -->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{#if $ae_app.posts.show_main__options}
|
{#if $idaa_loc.bb.show_main__options}
|
||||||
<section class="ae_section ae_options ae_row post_obj__options">
|
<section class="ae_section ae_options ae_row post_obj__options">
|
||||||
|
|
||||||
{#if $ae_app.trusted_access && $ae_app.posts.hidden == 'not_hidden'}
|
{#if $ae_loc.trusted_access && $idaa_loc.bb.hidden == 'not_hidden'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.posts.hidden = 'all';
|
$idaa_loc.bb.hidden = 'all';
|
||||||
$slct_trigger = 'load__post_obj_li';
|
$slct_trigger = 'load__post_obj_li';
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-info"
|
class="ae_btn ae_smallest btn btn-info"
|
||||||
>
|
>
|
||||||
<span class="fas fa-eye"></span> Show Hidden Posts
|
<span class="fas fa-eye"></span> Show Hidden Posts
|
||||||
</button>
|
</button>
|
||||||
{:else if $ae_app.trusted_access && $ae_app.posts.hidden == 'all'}
|
{:else if $ae_loc.trusted_access && $idaa_loc.bb.hidden == 'all'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.posts.hidden = 'not_hidden';
|
$idaa_loc.bb.hidden = 'not_hidden';
|
||||||
$slct_trigger = 'load__post_obj_li';
|
$slct_trigger = 'load__post_obj_li';
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-info"
|
class="ae_btn ae_smallest btn btn-info"
|
||||||
@@ -383,13 +382,13 @@ function handle_post_obj_deleted(event) {
|
|||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
{#if $ae_app.posts.enabled == 'enabled'}
|
{#if $idaa_loc.bb.enabled == 'enabled'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.posts.hidden = 'all';
|
$idaa_loc.bb.hidden = 'all';
|
||||||
$ae_app.posts.enabled = 'all';
|
$idaa_loc.bb.enabled = 'all';
|
||||||
$ae_app.posts.limit = 500;
|
$idaa_loc.bb.limit = 500;
|
||||||
$slct_trigger = 'load__post_obj_li';
|
$slct_trigger = 'load__post_obj_li';
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
||||||
@@ -399,7 +398,7 @@ function handle_post_obj_deleted(event) {
|
|||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.posts.enabled = 'enabled';
|
$idaa_loc.bb.enabled = 'enabled';
|
||||||
$slct_trigger = 'load__post_obj_li';
|
$slct_trigger = 'load__post_obj_li';
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
class="ae_btn btn_xs ae_smallest btn btn-xs btn-warning"
|
||||||
@@ -419,10 +418,10 @@ function handle_post_obj_deleted(event) {
|
|||||||
url.searchParams.delete('post_id');
|
url.searchParams.delete('post_id');
|
||||||
history.pushState({}, '', url);
|
history.pushState({}, '', url);
|
||||||
|
|
||||||
$ae_app.posts.show_main__options = true;
|
$idaa_loc.bb.show_main__options = true;
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
$ae_app.posts.show_edit__post_id = true;
|
$idaa_loc.bb.show_edit__post_id = true;
|
||||||
$ae_app.posts.show_view__post_id = false;
|
$idaa_loc.bb.show_view__post_id = false;
|
||||||
}}
|
}}
|
||||||
class="btn_new_bb_post btn btn-secondary"
|
class="btn_new_bb_post btn btn-secondary"
|
||||||
>
|
>
|
||||||
@@ -432,7 +431,7 @@ function handle_post_obj_deleted(event) {
|
|||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_app.posts.show_list__post_obj_li}
|
{#if $idaa_loc.bb.show_list__post_obj_li}
|
||||||
<section class="bb_post_list">
|
<section class="bb_post_list">
|
||||||
{#if $slct.post_obj_li}
|
{#if $slct.post_obj_li}
|
||||||
<!-- <ul> -->
|
<!-- <ul> -->
|
||||||
@@ -468,10 +467,10 @@ function handle_post_obj_deleted(event) {
|
|||||||
let message = {'post_id': idaa_post_obj.post_id_random};
|
let message = {'post_id': idaa_post_obj.post_id_random};
|
||||||
window.parent.postMessage(message, "*");
|
window.parent.postMessage(message, "*");
|
||||||
|
|
||||||
$ae_app.posts.show_main__options = true;
|
$idaa_loc.bb.show_main__options = true;
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
// $ae_app.posts.show_edit__post_id = false;
|
// $idaa_loc.bb.show_edit__post_id = false;
|
||||||
$ae_app.posts.show_view__post_id = true;
|
$idaa_loc.bb.show_view__post_id = true;
|
||||||
}}
|
}}
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
title={`View: ${idaa_post_obj.title}`}
|
title={`View: ${idaa_post_obj.title}`}
|
||||||
@@ -485,17 +484,17 @@ function handle_post_obj_deleted(event) {
|
|||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{#if $ae_app.trusted_access || idaa_post_obj.external_person_id === $ae_app.novi_uuid || idaa_post_obj.email === $ae_app.novi_email}
|
{#if $ae_loc.trusted_access || idaa_post_obj.external_person_id === $idaa_loc.novi_uuid || idaa_post_obj.email === $idaa_loc.novi_email}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$slct.post_id = idaa_post_obj.post_id_random;
|
$slct.post_id = idaa_post_obj.post_id_random;
|
||||||
$slct.post_obj = idaa_post_obj;
|
$slct.post_obj = idaa_post_obj;
|
||||||
$slct_trigger = 'load__post_obj';
|
$slct_trigger = 'load__post_obj';
|
||||||
|
|
||||||
$ae_app.posts.show_main__options = true;
|
$idaa_loc.bb.show_main__options = true;
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
$ae_app.posts.show_edit__post_id = true;
|
$idaa_loc.bb.show_edit__post_id = true;
|
||||||
// $ae_app.posts.show_view__post_id = false;
|
// $idaa_loc.bb.show_view__post_id = false;
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-secondary"
|
class="ae_btn ae_smallest btn btn-secondary"
|
||||||
title={`Edit post: ${idaa_post_obj.title}`}
|
title={`Edit post: ${idaa_post_obj.title}`}
|
||||||
@@ -509,7 +508,7 @@ function handle_post_obj_deleted(event) {
|
|||||||
$slct.post_id = idaa_post_obj.post_id_random;
|
$slct.post_id = idaa_post_obj.post_id_random;
|
||||||
$slct.post_obj = idaa_post_obj;
|
$slct.post_obj = idaa_post_obj;
|
||||||
|
|
||||||
$ae_app.posts.show_post_comment_crud = true;
|
$idaa_loc.bb.show_post_comment_crud = true;
|
||||||
}}
|
}}
|
||||||
class="ae_btn btn_md btn_outline_warning"
|
class="ae_btn btn_md btn_outline_warning"
|
||||||
title={`New comment on: ${idaa_post_obj.title}`}
|
title={`New comment on: ${idaa_post_obj.title}`}
|
||||||
@@ -527,7 +526,7 @@ function handle_post_obj_deleted(event) {
|
|||||||
{:else if (idaa_post_obj.full_name)}
|
{:else if (idaa_post_obj.full_name)}
|
||||||
<div class="post__posted_by">
|
<div class="post__posted_by">
|
||||||
Posted by: <span class="fas fa-user"></span> <span class="post__full_name">{idaa_post_obj.full_name}
|
Posted by: <span class="fas fa-user"></span> <span class="post__full_name">{idaa_post_obj.full_name}
|
||||||
{#if $ae_app.trusted_access && idaa_post_obj.email}
|
{#if $ae_loc.trusted_access && idaa_post_obj.email}
|
||||||
(<a href="mailto:{idaa_post_obj.email}?subject=IDAA BB Post">{idaa_post_obj.email}</a>)
|
(<a href="mailto:{idaa_post_obj.email}?subject=IDAA BB Post">{idaa_post_obj.email}</a>)
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -568,16 +567,16 @@ function handle_post_obj_deleted(event) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.posts.show_edit__post_id}
|
{#if $idaa_loc.bb.show_edit__post_id}
|
||||||
<Element_modal_v3
|
<Element_modal_v3
|
||||||
show = { true }
|
show = { true }
|
||||||
modal_cover_body = { false }
|
modal_cover_body = { false }
|
||||||
report_client_dimensions = { true }
|
report_client_dimensions = { true }
|
||||||
on:close={ () => {
|
on:close={ () => {
|
||||||
$ae_app.posts.show_main__options = true;
|
$idaa_loc.bb.show_main__options = true;
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
$ae_app.posts.show_edit__post_id = false;
|
$idaa_loc.bb.show_edit__post_id = false;
|
||||||
// $ae_app.posts.show_view__post_id = false;
|
// $idaa_loc.bb.show_view__post_id = false;
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
url.searchParams.delete('post_id');
|
url.searchParams.delete('post_id');
|
||||||
@@ -604,7 +603,7 @@ function handle_post_obj_deleted(event) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.posts.show_view__post_id && $slct.post_obj}
|
{#if $idaa_loc.bb.show_view__post_id && $slct.post_obj}
|
||||||
<Element_modal_v3
|
<Element_modal_v3
|
||||||
show = { true }
|
show = { true }
|
||||||
modal_cover_body = { false }
|
modal_cover_body = { false }
|
||||||
@@ -614,11 +613,11 @@ function handle_post_obj_deleted(event) {
|
|||||||
$slct.post_comment_obj = {}; // NOTE: Reset in case the post comment was being edited.
|
$slct.post_comment_obj = {}; // NOTE: Reset in case the post comment was being edited.
|
||||||
$slct.post_comment_obj_li = [];
|
$slct.post_comment_obj_li = [];
|
||||||
|
|
||||||
$ae_app.posts.show_main__options = true;
|
$idaa_loc.bb.show_main__options = true;
|
||||||
$ae_app.posts.show_list__post_obj_li = true;
|
$idaa_loc.bb.show_list__post_obj_li = true;
|
||||||
// $ae_app.posts.show_edit__post_id = false;
|
// $idaa_loc.bb.show_edit__post_id = false;
|
||||||
$ae_app.posts.show_view__post_id = false;
|
$idaa_loc.bb.show_view__post_id = false;
|
||||||
$ae_app.posts.show_edit__post_comment = false;
|
$idaa_loc.bb.show_edit__post_comment = false;
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
url.searchParams.delete('post_id');
|
url.searchParams.delete('post_id');
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ if ($slct.post_comment_id) {
|
|||||||
title: null,
|
title: null,
|
||||||
content: null,
|
content: null,
|
||||||
anonymous: false,
|
anonymous: false,
|
||||||
external_person_id: $ae_app.novi_uuid,
|
external_person_id: $idaa_loc.novi_uuid,
|
||||||
full_name: $ae_app.novi_full_name,
|
full_name: $idaa_loc.novi_full_name,
|
||||||
email: $ae_app.novi_email,
|
email: $idaa_loc.novi_email,
|
||||||
|
|
||||||
sort: null,
|
sort: null,
|
||||||
// notes: null,
|
// notes: null,
|
||||||
@@ -302,13 +302,13 @@ async function handle_delete_post_comment_obj({post_comment_id, method='disable'
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<label for="external_person_id"><span class="fas fa-link"></span> Linked with Novi ID
|
<label for="external_person_id"><span class="fas fa-link"></span> Linked with Novi ID
|
||||||
{#if !$ae_app.trusted_access}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock" title="Field is locked"></span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="external_person_id"
|
id="external_person_id"
|
||||||
name="external_person_id"
|
name="external_person_id"
|
||||||
value={($slct.post_comment_obj.external_person_id ? $slct.post_comment_obj.external_person_id : $ae_app.novi_uuid)}
|
value={($slct.post_comment_obj.external_person_id ? $slct.post_comment_obj.external_person_id : $idaa_loc.novi_uuid)}
|
||||||
readonly={true}
|
readonly={true}
|
||||||
class="ae_width_lg"
|
class="ae_width_lg"
|
||||||
>
|
>
|
||||||
@@ -327,7 +327,7 @@ async function handle_delete_post_comment_obj({post_comment_id, method='disable'
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="full_name">Your name
|
<label for="full_name">Your name
|
||||||
{#if !$ae_app.trusted_access}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock" title="Field is locked"></span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
||||||
@@ -336,13 +336,13 @@ async function handle_delete_post_comment_obj({post_comment_id, method='disable'
|
|||||||
type="text"
|
type="text"
|
||||||
id="full_name"
|
id="full_name"
|
||||||
name="full_name"
|
name="full_name"
|
||||||
value={($slct.post_comment_obj.full_name ? $slct.post_comment_obj.full_name : $ae_app.novi_full_name)}
|
value={($slct.post_comment_obj.full_name ? $slct.post_comment_obj.full_name : $idaa_loc.novi_full_name)}
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<label for="email">Your email
|
<label for="email">Your email
|
||||||
{#if !$ae_app.trusted_access}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock" title="Field is locked"></span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
||||||
@@ -350,15 +350,15 @@ async function handle_delete_post_comment_obj({post_comment_id, method='disable'
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="email"
|
name="email"
|
||||||
value={($slct.post_comment_obj.email ? $slct.post_comment_obj.email : $ae_app.novi_email)}
|
value={($slct.post_comment_obj.email ? $slct.post_comment_obj.email : $idaa_loc.novi_email)}
|
||||||
readonly={!$ae_app.trusted_access}
|
readonly={!$ae_loc.trusted_access}
|
||||||
>
|
>
|
||||||
<span class="ae_highlight">Secondary link using the Novi email address</span>
|
<span class="ae_highlight">Secondary link using the Novi email address</span>
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<section class="ae_section post_comment__admin_options"> <!-- BEGIN: section post_comment__admin_options -->
|
<section class="ae_section post_comment__admin_options"> <!-- BEGIN: section post_comment__admin_options -->
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
@@ -389,7 +389,7 @@ async function handle_delete_post_comment_obj({post_comment_id, method='disable'
|
|||||||
|
|
||||||
<!-- <label>Group <input type="text" name="group" value={$slct.post_comment_obj.group} max="100" /></label> -->
|
<!-- <label>Group <input type="text" name="group" value={$slct.post_comment_obj.group} max="100" /></label> -->
|
||||||
|
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<label>Enable
|
<label>Enable
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -400,7 +400,7 @@ async function handle_delete_post_comment_obj({post_comment_id, method='disable'
|
|||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- {#if $ae_app.trusted_access}
|
<!-- {#if $ae_loc.trusted_access}
|
||||||
<label>Internal Staff Notes
|
<label>Internal Staff Notes
|
||||||
<textarea id="notes" name="notes" class="ae_value post__notes tinymce_editor editor_basic_200" rows="2" cols="70" value={$slct.post_comment_obj.notes}></textarea>
|
<textarea id="notes" name="notes" class="ae_value post__notes tinymce_editor editor_basic_200" rows="2" cols="70" value={$slct.post_comment_obj.notes}></textarea>
|
||||||
</label>
|
</label>
|
||||||
@@ -416,7 +416,7 @@ async function handle_delete_post_comment_obj({post_comment_id, method='disable'
|
|||||||
<button type="submit" class="ae_btn btn btn-primary"><span class="fas fa-check"></span> Save Post Comment</button>
|
<button type="submit" class="ae_btn btn btn-primary"><span class="fas fa-check"></span> Save Post Comment</button>
|
||||||
|
|
||||||
{#if $slct.post_comment_id}
|
{#if $slct.post_comment_id}
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (!confirm('Are you sure you want to delete this post comment?')) {return false;}
|
if (!confirm('Are you sure you want to delete this post comment?')) {return false;}
|
||||||
@@ -430,7 +430,7 @@ async function handle_delete_post_comment_obj({post_comment_id, method='disable'
|
|||||||
>
|
>
|
||||||
<span class="fas fa-minus"></span> Delete
|
<span class="fas fa-minus"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{:else if $ae_app.trusted_access}
|
{:else if $ae_loc.trusted_access}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (!confirm('Are you sure you want to disable this post comment?')) {return false;}
|
if (!confirm('Are you sure you want to disable this post comment?')) {return false;}
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ if ($slct.post_id) {
|
|||||||
|
|
||||||
if ($slct.post_obj) {
|
if ($slct.post_obj) {
|
||||||
// if (!$slct.post_obj.external_person_id) {
|
// if (!$slct.post_obj.external_person_id) {
|
||||||
// $slct.post_obj['external_person_id'] = $ae_app.novi_uuid;
|
// $slct.post_obj['external_person_id'] = $idaa_loc.novi_uuid;
|
||||||
// }
|
// }
|
||||||
// if (!$slct.post_obj.full_name) {
|
// if (!$slct.post_obj.full_name) {
|
||||||
// $slct.post_obj['full_name'] = $ae_app.novi_full_name;
|
// $slct.post_obj['full_name'] = $idaa_loc.novi_full_name;
|
||||||
// }
|
// }
|
||||||
// if (!$slct.post_obj.email) {
|
// if (!$slct.post_obj.email) {
|
||||||
// $slct.post_obj['email'] = $ae_app.novi_email;
|
// $slct.post_obj['email'] = $idaa_loc.novi_email;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -39,9 +39,9 @@ if ($slct.post_id) {
|
|||||||
content: '',
|
content: '',
|
||||||
topic_id: null,
|
topic_id: null,
|
||||||
anonymous: false,
|
anonymous: false,
|
||||||
external_person_id: $ae_app.novi_uuid,
|
external_person_id: $idaa_loc.novi_uuid,
|
||||||
full_name: $ae_app.novi_full_name,
|
full_name: $idaa_loc.novi_full_name,
|
||||||
email: $ae_app.novi_email,
|
email: $idaa_loc.novi_email,
|
||||||
|
|
||||||
sort: null,
|
sort: null,
|
||||||
notes: null,
|
notes: null,
|
||||||
@@ -367,7 +367,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
<option value={18}>Contacts/ sponsorship in my area</option>
|
<option value={18}>Contacts/ sponsorship in my area</option>
|
||||||
<option value={19}>Professional positions</option>
|
<option value={19}>Professional positions</option>
|
||||||
<option value={21}
|
<option value={21}
|
||||||
disabled={!$ae_app.trusted_access}
|
disabled={!$ae_loc.trusted_access}
|
||||||
>
|
>
|
||||||
Announcement
|
Announcement
|
||||||
</option>
|
</option>
|
||||||
@@ -402,13 +402,13 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<label for="external_person_id"><span class="fas fa-link"></span> Linked with Novi ID
|
<label for="external_person_id"><span class="fas fa-link"></span> Linked with Novi ID
|
||||||
{#if !$ae_app.trusted_access}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock" title="Field is locked"></span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="external_person_id"
|
id="external_person_id"
|
||||||
name="external_person_id"
|
name="external_person_id"
|
||||||
value={($slct.post_obj.external_person_id ? $slct.post_obj.external_person_id : $ae_app.novi_uuid)}
|
value={($slct.post_obj.external_person_id ? $slct.post_obj.external_person_id : $idaa_loc.novi_uuid)}
|
||||||
readonly={true}
|
readonly={true}
|
||||||
class="ae_width_lg"
|
class="ae_width_lg"
|
||||||
>
|
>
|
||||||
@@ -427,7 +427,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="full_name">Name
|
<label for="full_name">Name
|
||||||
{#if !$ae_app.trusted_access}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock" title="Field is locked"></span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
||||||
@@ -436,14 +436,14 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
type="text"
|
type="text"
|
||||||
id="full_name"
|
id="full_name"
|
||||||
name="full_name"
|
name="full_name"
|
||||||
value={($slct.post_obj.full_name ? $slct.post_obj.full_name : $ae_app.novi_full_name)}
|
value={($slct.post_obj.full_name ? $slct.post_obj.full_name : $idaa_loc.novi_full_name)}
|
||||||
readonly={!$ae_app.trusted_access}
|
readonly={!$ae_loc.trusted_access}
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<label for="email">Email
|
<label for="email">Email
|
||||||
{#if !$ae_app.trusted_access}
|
{#if !$ae_loc.trusted_access}
|
||||||
<span class="fas fa-lock" title="Field is locked"></span>
|
<span class="fas fa-lock" title="Field is locked"></span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
||||||
@@ -451,8 +451,8 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="email"
|
name="email"
|
||||||
value={($slct.post_obj.email ? $slct.post_obj.email : $ae_app.novi_email)}
|
value={($slct.post_obj.email ? $slct.post_obj.email : $idaa_loc.novi_email)}
|
||||||
readonly={!$ae_app.trusted_access}
|
readonly={!$ae_loc.trusted_access}
|
||||||
>
|
>
|
||||||
<span class="ae_highlight">Secondary link using the Novi email address</span>
|
<span class="ae_highlight">Secondary link using the Novi email address</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -485,7 +485,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
</fieldset> -->
|
</fieldset> -->
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<section class="ae_section post__admin_options"> <!-- BEGIN: section post__admin_options -->
|
<section class="ae_section post__admin_options"> <!-- BEGIN: section post__admin_options -->
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
@@ -516,7 +516,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
|
|
||||||
<label>Group <input type="text" name="group" value={$slct.post_obj.group ? $slct.post_obj.group : ''} max="100" /></label>
|
<label>Group <input type="text" name="group" value={$slct.post_obj.group ? $slct.post_obj.group : ''} max="100" /></label>
|
||||||
|
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<label>Enable
|
<label>Enable
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -527,7 +527,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_app.trusted_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<label>Internal Staff Notes
|
<label>Internal Staff Notes
|
||||||
<textarea id="notes" name="notes" class="ae_value post__notes" rows="2" cols="70" value={$slct.post_obj.notes}></textarea>
|
<textarea id="notes" name="notes" class="ae_value post__notes" rows="2" cols="70" value={$slct.post_obj.notes}></textarea>
|
||||||
</label>
|
</label>
|
||||||
@@ -543,7 +543,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
<button type="submit" class="ae_btn btn btn-primary"><span class="fas fa-check"></span> Save Post</button>
|
<button type="submit" class="ae_btn btn btn-primary"><span class="fas fa-check"></span> Save Post</button>
|
||||||
|
|
||||||
{#if $slct.post_id}
|
{#if $slct.post_id}
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (!confirm('Are you sure you want to delete this post?')) {return false;}
|
if (!confirm('Are you sure you want to delete this post?')) {return false;}
|
||||||
@@ -557,7 +557,7 @@ async function handle_delete_post_obj({post_id, method='disable'}) {
|
|||||||
>
|
>
|
||||||
<span class="fas fa-minus"></span> Delete
|
<span class="fas fa-minus"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{:else if $ae_app.trusted_access}
|
{:else if $ae_loc.trusted_access}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (!confirm('Are you sure you want to disable this post?')) {return false;}
|
if (!confirm('Are you sure you want to disable this post?')) {return false;}
|
||||||
|
|||||||
@@ -7,13 +7,16 @@ import { ae_util } from '$lib/ae_utils/ae_utils';
|
|||||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||||
import { idaa_loc, idaa_sess, idaa_slct, idaa_trigger } from '$lib/ae_idaa_stores';
|
import { idaa_loc, idaa_sess, idaa_slct, idaa_trigger } from '$lib/ae_idaa_stores';
|
||||||
|
|
||||||
|
export let lq__post_obj: any;
|
||||||
|
export let lq__post_comment_obj_li: any;
|
||||||
|
|
||||||
// import Edit_post_comment_obj from './10_edit__post_comment_obj.svelte';
|
// import Edit_post_comment_obj from './10_edit__post_comment_obj.svelte';
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
if ($idaa_slct.post_id) {
|
if ($idaa_slct.post_id) {
|
||||||
console.log(`Post ID selected: ${$idaa_slct.post_id}`);
|
console.log(`Post ID selected: ${$idaa_slct.post_id}`);
|
||||||
console.log(`Post Object selected: ${$idaa_slct.post_obj}`)
|
console.log(`Post Object selected: ${$lq__post_obj}`);
|
||||||
|
|
||||||
$idaa_trigger = 'load__post_obj';
|
$idaa_trigger = 'load__post_obj';
|
||||||
}
|
}
|
||||||
@@ -33,10 +36,10 @@ function handle_post_comment_obj_created(event) {
|
|||||||
$idaa_trigger = 'load__post_obj';
|
$idaa_trigger = 'load__post_obj';
|
||||||
$idaa_trigger = 'load__post_comment_obj_li';
|
$idaa_trigger = 'load__post_comment_obj_li';
|
||||||
|
|
||||||
// $idaa_loc.posts.show_post_list = false;
|
// $idaa_sess.bb.show_post_list = false;
|
||||||
// $idaa_loc.posts.show_edit__post_id = false;
|
// $idaa_sess.bb.show_edit__post_id = false;
|
||||||
// $idaa_loc.posts.show_view__post_id = true;
|
// $idaa_sess.bb.show_view__post_id = true;
|
||||||
$idaa_loc.posts.show_edit__post_comment = false;
|
$idaa_sess.bb.show_edit__post_comment = false;
|
||||||
}
|
}
|
||||||
function handle_post_comment_obj_updated(event) {
|
function handle_post_comment_obj_updated(event) {
|
||||||
console.log('*** handle_post_comment_obj_updated() ***');
|
console.log('*** handle_post_comment_obj_updated() ***');
|
||||||
@@ -45,10 +48,10 @@ function handle_post_comment_obj_updated(event) {
|
|||||||
$idaa_trigger = 'load__post_obj';
|
$idaa_trigger = 'load__post_obj';
|
||||||
$idaa_trigger = 'load__post_comment_obj_li';
|
$idaa_trigger = 'load__post_comment_obj_li';
|
||||||
|
|
||||||
// $idaa_loc.posts.show_post_list = false;
|
// $idaa_sess.bb.show_post_list = false;
|
||||||
// $idaa_loc.posts.show_edit__post_id = false;
|
// $idaa_sess.bb.show_edit__post_id = false;
|
||||||
// $idaa_loc.posts.show_view__post_id = true;
|
// $idaa_sess.bb.show_view__post_id = true;
|
||||||
$idaa_loc.posts.show_edit__post_comment = false;
|
$idaa_sess.bb.show_edit__post_comment = false;
|
||||||
}
|
}
|
||||||
function handle_post_comment_obj_deleted(event) {
|
function handle_post_comment_obj_deleted(event) {
|
||||||
console.log('*** handle_post_comment_obj_deleted() ***');
|
console.log('*** handle_post_comment_obj_deleted() ***');
|
||||||
@@ -58,29 +61,33 @@ function handle_post_comment_obj_deleted(event) {
|
|||||||
$idaa_trigger = 'load__post_obj';
|
$idaa_trigger = 'load__post_obj';
|
||||||
$idaa_trigger = 'load__post_comment_obj_li';
|
$idaa_trigger = 'load__post_comment_obj_li';
|
||||||
|
|
||||||
// $idaa_loc.posts.show_post_list = false;
|
// $idaa_sess.bb.show_post_list = false;
|
||||||
// $idaa_loc.posts.show_edit__post_id = false;
|
// $idaa_sess.bb.show_edit__post_id = false;
|
||||||
// $idaa_loc.posts.show_view__post_id = true;
|
// $idaa_sess.bb.show_view__post_id = true;
|
||||||
$idaa_loc.posts.show_edit__post_comment = false;
|
$idaa_sess.bb.show_edit__post_comment = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
bind:clientHeight={$ae_loc.iframe_height_modal_body}
|
bind:clientHeight={$ae_loc.iframe_height_modal_body}
|
||||||
class="svelte_component ae_section ae_view post_obj view__post_obj"
|
class="svelte_component ae_section ae_view post_obj view__post_obj space-y-2"
|
||||||
>
|
>
|
||||||
|
|
||||||
<div class="post__header">
|
<div class="post__header">
|
||||||
<h2 class="post__title">
|
<h2 class="post__title">
|
||||||
{@html $idaa_slct.post_obj.title}
|
<span class="h3">
|
||||||
{#if $idaa_slct.post_obj.topic_id}<span class="badge badge-info bg-info"><span class="fas fa-user-md"></span> {$idaa_slct.post_obj.topic_name}</span>{/if}
|
{@html $lq__post_obj?.title}
|
||||||
|
</span>
|
||||||
|
{#if $lq__post_obj?.topic_id}<span class="badge badge-info bg-info"><span class="fas fa-user-md"></span> {$lq__post_obj?.topic_name}</span>{/if}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post__content">{@html $idaa_slct.post_obj.content}</div>
|
<div class="post__content">
|
||||||
|
<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html $idaa_slct.post_obj.content}</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
<section class="ae_section ae_meta post__meta">
|
<section class="ae_section ae_meta post__meta text-sm text-gray-500 mt-4 flex flex-row gap-2 items-center justify-center">
|
||||||
<div class="ae_group">
|
<div class="ae_group">
|
||||||
{#if ($idaa_slct.post_obj.anonymous)}
|
{#if ($idaa_slct.post_obj.anonymous)}
|
||||||
<div class="post__posted_by">
|
<div class="post__posted_by">
|
||||||
@@ -119,9 +126,11 @@ function handle_post_comment_obj_deleted(event) {
|
|||||||
{/if}
|
{/if}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$idaa_loc.posts.show_edit__post_comment = true;
|
if (confirm('Are you sure you want to add a new comment?')) {
|
||||||
|
$idaa_sess.bb.show_edit__post_comment = true;
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
class="btn btn-primary"
|
class="btn btn-md variant-ghost-secondary hover:variant-filled-secondary transition"
|
||||||
title={`New comment on: ${$idaa_slct.post_obj.title}`}
|
title={`New comment on: ${$idaa_slct.post_obj.title}`}
|
||||||
>
|
>
|
||||||
<span class="fas fa-plus m-1"></span> New Comment
|
<span class="fas fa-plus m-1"></span> New Comment
|
||||||
@@ -137,13 +146,13 @@ function handle_post_comment_obj_deleted(event) {
|
|||||||
// url.searchParams.set('post_id', $idaa_slct.post_obj.post_id_random);
|
// url.searchParams.set('post_id', $idaa_slct.post_obj.post_id_random);
|
||||||
// history.pushState({}, '', url);
|
// history.pushState({}, '', url);
|
||||||
|
|
||||||
// $idaa_loc.posts.show_main__options = false;
|
// $idaa_sess.bb.show_main__options = false;
|
||||||
// $idaa_loc.posts.show_list__post_li = false;
|
// $idaa_sess.bb.show_list__post_li = false;
|
||||||
$idaa_loc.posts.show_view__post_id = false;
|
$idaa_sess.bb.show_view__post_id = false;
|
||||||
$idaa_loc.posts.show_edit__post_id = true;
|
$idaa_sess.bb.show_edit__post_id = true;
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-xs btn-secondary"
|
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||||
title={`Edit post: ${$idaa_slct.post_obj.name}`}
|
title="Edit post for {$idaa_slct.post_obj.full_name} (ID: {$idaa_slct.post_obj.post_id}"
|
||||||
>
|
>
|
||||||
<span class="fas fa-edit m-1"></span> Edit
|
<span class="fas fa-edit m-1"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
@@ -153,7 +162,7 @@ function handle_post_comment_obj_deleted(event) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
{#if $idaa_loc.posts.show_edit__post_comment}
|
{#if $idaa_sess.bb.show_edit__post_comment}
|
||||||
<section class="bb_post_comment_crud">
|
<section class="bb_post_comment_crud">
|
||||||
|
|
||||||
<Element_modal_v3
|
<Element_modal_v3
|
||||||
@@ -163,10 +172,10 @@ function handle_post_comment_obj_deleted(event) {
|
|||||||
$idaa_slct.post_comment_id = null;
|
$idaa_slct.post_comment_id = null;
|
||||||
$idaa_slct.post_comment_obj = {};
|
$idaa_slct.post_comment_obj = {};
|
||||||
|
|
||||||
// $idaa_loc.posts.show_post_list = true;
|
// $idaa_sess.bb.show_post_list = true;
|
||||||
// $idaa_loc.posts.show_edit__post_id = false;
|
// $idaa_sess.bb.show_edit__post_id = false;
|
||||||
// $idaa_loc.posts.show_view__post_id = false;
|
// $idaa_sess.bb.show_view__post_id = false;
|
||||||
$idaa_loc.posts.show_edit__post_comment = false;
|
$idaa_sess.bb.show_edit__post_comment = false;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span slot="header_title">Comment on: {($idaa_slct.post_obj.title ? $idaa_slct.post_obj.title : '')}</span>
|
<span slot="header_title">Comment on: {($idaa_slct.post_obj.title ? $idaa_slct.post_obj.title : '')}</span>
|
||||||
@@ -180,13 +189,15 @@ function handle_post_comment_obj_deleted(event) {
|
|||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $idaa_slct.post_comment_obj_li.length}
|
{#if $lq__post_comment_obj_li?.length}
|
||||||
{#each $idaa_slct.post_comment_obj_li as idaa_post_comment_obj, index}
|
{#each $lq__post_comment_obj_li as idaa_post_comment_obj, index}
|
||||||
<hr />
|
<hr />
|
||||||
<div class="post_comment__content">{@html idaa_post_comment_obj.content}</div>
|
<div class="post_comment__content">
|
||||||
|
<pre class="post_comment__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html idaa_post_comment_obj.content}</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<section class="ae_section ae_meta post_comment__meta">
|
<section class="ae_section ae_meta post_comment__meta text-sm text-gray-500 mt-4 flex flex-row gap-2 items-center justify-center">
|
||||||
<div class="ae_group">
|
<div class="ae_group">
|
||||||
<span class="post_comment__posted_by `comment_by_container">
|
<span class="post_comment__posted_by `comment_by_container">
|
||||||
<span class="comment_by_lable">Comment by:</span>
|
<span class="comment_by_lable">Comment by:</span>
|
||||||
@@ -210,17 +221,18 @@ function handle_post_comment_obj_deleted(event) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access || idaa_post_comment_obj.external_person_id === $ae_app.novi_uuid}
|
{#if $ae_loc.trusted_access || idaa_post_comment_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||||
<div class="ae_options">
|
<div class="ae_options">
|
||||||
<button on:click={() => {
|
<button on:click={() => {
|
||||||
$idaa_slct.post_comment_id = idaa_post_comment_obj.post_comment_id_random;
|
$idaa_slct.post_comment_id = idaa_post_comment_obj.post_comment_id_random;
|
||||||
$idaa_slct.post_comment_obj = idaa_post_comment_obj;
|
$idaa_slct.post_comment_obj = idaa_post_comment_obj;
|
||||||
|
|
||||||
// $idaa_loc.posts.show_post_comment_list = false;
|
// $idaa_sess.bb.show_post_comment_list = false;
|
||||||
$idaa_loc.posts.show_edit__post_comment = true;
|
$idaa_sess.bb.show_edit__post_comment = true;
|
||||||
// $idaa_loc.posts.show_view__post_id = false;
|
// $idaa_sess.bb.show_view__post_id = false;
|
||||||
}}
|
}}
|
||||||
class="ae_btn ae_smallest btn btn-secondary"
|
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||||
|
title="Edit comment by {idaa_post_comment_obj?.full_name} (for post ID {$lq__post_obj?.id})"
|
||||||
>
|
>
|
||||||
<span class="fas fa-edit"></span> Edit Comment
|
<span class="fas fa-edit"></span> Edit Comment
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -10,102 +10,86 @@ import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
|||||||
|
|
||||||
export let lq__post_obj_li: any;
|
export let lq__post_obj_li: any;
|
||||||
|
|
||||||
export let container_class_li = [];
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
console.log('** Component Mounted: ** List - Bulletin Board (Post) Obj');
|
console.log('** Component Mounted: ** List - Bulletin Board (Post) Obj');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<!-- {#if $idaa_loc?.bb?.show_list__post_obj_li} -->
|
|
||||||
<section class="bb_post_list">
|
<section class="bb_post_list">
|
||||||
{#if $lq__post_obj_li}
|
{#if $lq__post_obj_li && $lq__post_obj_li.length}
|
||||||
<!-- <ul> -->
|
|
||||||
{#each $lq__post_obj_li as idaa_post_obj, index}
|
{#each $lq__post_obj_li as idaa_post_obj, index}
|
||||||
<div
|
<div
|
||||||
id={`idaa_bb_post_id__${idaa_post_obj.post_id_random}`}
|
class="container bb_post post_obj border border-1 rounded p-2 mb-2 space-y-2"
|
||||||
class="container bb_post post_obj border border-1 rounded p-2 mb-2"
|
class:dim={idaa_post_obj.hide}
|
||||||
class:post__hide={idaa_post_obj.hide}
|
class:bg-warning-100={!idaa_post_obj?.enable}
|
||||||
class:post__priority={idaa_post_obj.priority}
|
|
||||||
class:post__group={idaa_post_obj.group}
|
|
||||||
>
|
>
|
||||||
<header class="ae_header post__header">
|
|
||||||
<h3 class="post__title">
|
<header class="ae_header">
|
||||||
{@html idaa_post_obj.title}
|
<h3 class="post__title flex flex-row gap-2 items-center">
|
||||||
{#if idaa_post_obj.topic_id}<span class="badge badge-info bg-info"><span class="fas fa-user-md m-1"></span> {idaa_post_obj.topic_name}</span>{/if}
|
<span class="post__title h3">{@html idaa_post_obj.title}</span>
|
||||||
|
{#if idaa_post_obj.topic_name}<span class="badge badge-info variant-glass-secondary"><span class="fas fa-user-md m-1"></span> {idaa_post_obj.topic_name}</span>{/if}
|
||||||
</h3>
|
</h3>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{#if idaa_post_obj.content}<div class="post__content">{@html idaa_post_obj.content}</div>{/if}
|
{#if idaa_post_obj.content}<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html idaa_post_obj.content}</pre>{/if}
|
||||||
|
|
||||||
<div class="ae_options post_obj__options">
|
<div class="ae_options flex flex-row gap-2 items-center justify-center">
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$slct.post_id = idaa_post_obj.post_id_random;
|
$idaa_slct.post_id = idaa_post_obj?.post_id;
|
||||||
$slct.post_obj = idaa_post_obj;
|
$idaa_slct.post_obj = idaa_post_obj;
|
||||||
|
|
||||||
// handle_load_post_comment_obj_li({post_id: $slct.post_id, try_cache: false});
|
// handle_load_post_comment_obj_li({post_id: $idaa_slct.post_id, try_cache: false});
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
url.searchParams.set('post_id', idaa_post_obj.post_id_random);
|
url.searchParams.set('post_id', idaa_post_obj?.post_id);
|
||||||
history.pushState({}, '', url);
|
history.pushState({}, '', url);
|
||||||
|
|
||||||
let message = {'post_id': idaa_post_obj.post_id_random};
|
let message = {'post_id': idaa_post_obj?.post_id};
|
||||||
window.parent.postMessage(message, "*");
|
window.parent.postMessage(message, "*");
|
||||||
|
|
||||||
$idaa_loc.bb.show_main__options = true;
|
// $idaa_sess.bb.show_main__options = true;
|
||||||
$idaa_loc.bb.show_list__post_obj_li = true;
|
// $idaa_sess.bb.show_list__post_obj_li = true;
|
||||||
// $idaa_loc.bb.show_edit__post_id = false;
|
// $idaa_sess.bb.show_edit__post_id = false;
|
||||||
$idaa_loc.bb.show_view__post_id = true;
|
$idaa_sess.bb.show__modal_edit = false;
|
||||||
|
$idaa_sess.bb.show__modal_view = true;
|
||||||
}}
|
}}
|
||||||
class="btn btn-md variant-ghost-primary hover:variant-filled-primary transition"
|
class="btn btn-md variant-ghost-primary hover:variant-filled-primary transition"
|
||||||
title={`View: ${idaa_post_obj.title}`}
|
title={`View: ${idaa_post_obj?.title}`}
|
||||||
>
|
>
|
||||||
<span class="fas fa-envelope-open m-1"></span> Open
|
<span class="fas fa-envelope-open m-1"></span> Open
|
||||||
|
|
||||||
{#if idaa_post_obj.post_comment_count}
|
{#if idaa_post_obj?.post_comment_count}
|
||||||
<span class="ae_badge ae_info post__post_comment_count">
|
<span class="ae_badge ae_info post__post_comment_count">
|
||||||
<span class="fas fa-comment"></span> {(idaa_post_obj.post_comment_count == 1 ? `${idaa_post_obj.post_comment_count} comment` : `${idaa_post_obj.post_comment_count} comments` )}
|
<span class="fas fa-comment"></span> {(idaa_post_obj?.post_comment_count == 1 ? `${idaa_post_obj?.post_comment_count} comment` : `${idaa_post_obj?.post_comment_count} comments` )}
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access || idaa_post_obj.external_person_id === $idaa_loc.novi_uuid || idaa_post_obj.email === $idaa_loc.novi_email}
|
{#if $ae_loc.trusted_access || idaa_post_obj.external_person_id === $idaa_loc.novi_uuid}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$slct.post_id = idaa_post_obj.post_id_random;
|
$idaa_slct.post_id = idaa_post_obj.post_id;
|
||||||
$slct.post_obj = idaa_post_obj;
|
$idaa_slct.post_obj = idaa_post_obj;
|
||||||
$slct_trigger = 'load__post_obj';
|
// $slct_trigger = 'load__post_obj';
|
||||||
|
|
||||||
$idaa_loc.bb.show_main__options = true;
|
// $idaa_sess.bb.show_main__options = true;
|
||||||
$idaa_loc.bb.show_list__post_obj_li = true;
|
// $idaa_sess.bb.show_list__post_obj_li = true;
|
||||||
$idaa_loc.bb.show_edit__post_id = true;
|
// $idaa_sess.bb.show_edit__post_id = true;
|
||||||
// $idaa_loc.bb.show_view__post_id = false;
|
$idaa_sess.bb.show__modal_edit = true;
|
||||||
}}
|
$idaa_sess.bb.show__modal_view = false;
|
||||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
}}
|
||||||
title={`Edit post: ${idaa_post_obj.title}`}
|
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
|
||||||
>
|
title={`Edit post: ${idaa_post_obj.title}`}
|
||||||
<span class="fas fa-edit m-1"></span> Edit Post
|
>
|
||||||
</button>
|
<span class="fas fa-edit m-1"></span> Edit Post
|
||||||
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- <button
|
|
||||||
on:click={() => {
|
|
||||||
$slct.post_id = idaa_post_obj.post_id_random;
|
|
||||||
$slct.post_obj = idaa_post_obj;
|
|
||||||
|
|
||||||
$idaa_loc.bb.show_post_comment_crud = true;
|
|
||||||
}}
|
|
||||||
class="ae_btn btn_md btn_outline_warning"
|
|
||||||
title={`New comment on: ${idaa_post_obj.title}`}
|
|
||||||
>
|
|
||||||
<span class="fas fa-plus"></span> New Comment
|
|
||||||
</button> -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ae_section ae_footer ae_meta post__meta">
|
<div class="ae_section ae_footer ae_meta post__meta text-sm text-gray-500 mt-4 flex flex-row gap-2 items-center justify-center">
|
||||||
{#if (idaa_post_obj.anonymous)}
|
{#if (idaa_post_obj.anonymous)}
|
||||||
<div class="post__posted_by">
|
<div class="post__posted_by">
|
||||||
Posted by: <span class="fas fa-user-secret"></span> <span class="post__full_name">Anonymous</span>
|
Posted by: <span class="fas fa-user-secret"></span> <span class="post__full_name">Anonymous</span>
|
||||||
|
|||||||
@@ -85,8 +85,6 @@ $: lq_new__event_obj_li = liveQuery(async () => {
|
|||||||
|
|
||||||
<!-- <h1>Recovery Meetings {$lq_new__event_obj_li?.length}</h1> -->
|
<!-- <h1>Recovery Meetings {$lq_new__event_obj_li?.length}</h1> -->
|
||||||
|
|
||||||
<!-- Search results: {$lq_bulk__event_obj_li?.length}? -->
|
|
||||||
|
|
||||||
{#if $lq_new__event_obj_li && $lq_new__event_obj_li?.length }
|
{#if $lq_new__event_obj_li && $lq_new__event_obj_li?.length }
|
||||||
<Comp__event_obj_li
|
<Comp__event_obj_li
|
||||||
lq__event_obj_li={lq_new__event_obj_li}
|
lq__event_obj_li={lq_new__event_obj_li}
|
||||||
@@ -113,7 +111,7 @@ $: lq_new__event_obj_li = liveQuery(async () => {
|
|||||||
<svelte:fragment slot="header">
|
<svelte:fragment slot="header">
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-lg font-semibold">
|
<h3 class="text-lg font-semibold">
|
||||||
{#if $ae_loc.trusted_access || $lq__event_obj?.external_person_id === $ae_loc.novi_uuid || $lq__event_obj?.contact_li_json[0]?.email === $ae_loc.novi_email}
|
{#if $ae_loc.trusted_access || $lq__event_obj?.external_person_id === $idaa_loc.novi_uuid || $lq__event_obj?.contact_li_json[0]?.email === $idaa_loc.novi_email}
|
||||||
<!-- <div class="ae_options"> -->
|
<!-- <div class="ae_options"> -->
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@@ -175,7 +173,7 @@ $: lq_new__event_obj_li = liveQuery(async () => {
|
|||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-lg font-semibold">
|
<h3 class="text-lg font-semibold">
|
||||||
{#if $ae_loc.trusted_access || $lq__event_obj?.external_person_id === $ae_loc.novi_uuid || $lq__event_obj?.contact_li_json[0].email === $ae_loc.novi_email}
|
{#if $ae_loc.trusted_access || $lq__event_obj?.external_person_id === $idaa_loc.novi_uuid || $lq__event_obj?.contact_li_json[0].email === $idaa_loc.novi_email}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
// const url = new URL(location);
|
// const url = new URL(location);
|
||||||
|
|||||||
@@ -24,20 +24,20 @@ import View_event_obj from './ae_idaa_comp__event_obj_id_view.svelte';
|
|||||||
// *** Export/Exposed variables and functions for component
|
// *** Export/Exposed variables and functions for component
|
||||||
// export let account_id: string = $page['page_for']['account_id'];
|
// export let account_id: string = $page['page_for']['account_id'];
|
||||||
export let account_id: string = $ae_app.account_id;
|
export let account_id: string = $ae_app.account_id;
|
||||||
export let event_id: string = $ae_app.events.event_id;
|
export let event_id: string = $idaa_loc.recovery_meetings.event_id;
|
||||||
|
|
||||||
export let novi_uuid: string = $ae_app.novi_uuid;
|
export let novi_uuid: string = $idaa_loc.novi_uuid;
|
||||||
export let novi_email: string = $ae_app.novi_email;
|
export let novi_email: string = $idaa_loc.novi_email;
|
||||||
export let novi_full_name: string = $ae_app.novi_full_name;
|
export let novi_full_name: string = $idaa_loc.novi_full_name;
|
||||||
export let novi_admin_li: string = $ae_app.novi_admin_li;
|
export let novi_admin_li: string = $idaa_loc.novi_admin_li;
|
||||||
export let novi_trusted_li: string = $ae_app.novi_trusted_li;
|
export let novi_trusted_li: string = $idaa_loc.novi_trusted_li;
|
||||||
|
|
||||||
// *** Set initial variables
|
// *** Set initial variables
|
||||||
$ae_app.novi_uuid = novi_uuid;
|
$idaa_loc.novi_uuid = novi_uuid;
|
||||||
$ae_app.novi_email = decodeURIComponent(novi_email);
|
$idaa_loc.novi_email = decodeURIComponent(novi_email);
|
||||||
$ae_app.novi_full_name = decodeURIComponent(novi_full_name);
|
$idaa_loc.novi_full_name = decodeURIComponent(novi_full_name);
|
||||||
$ae_app.novi_admin_li = novi_admin_li;
|
$idaa_loc.novi_admin_li = novi_admin_li;
|
||||||
$ae_app.novi_trusted_li = novi_trusted_li;
|
$idaa_loc.novi_trusted_li = novi_trusted_li;
|
||||||
|
|
||||||
$ae_app.current_timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
$ae_app.current_timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||||
if (!$ae_app.lu_country_subdivision_list) {
|
if (!$ae_app.lu_country_subdivision_list) {
|
||||||
@@ -50,41 +50,41 @@ if (!$ae_app.lu_timezone_list) {
|
|||||||
$ae_app.lu_timezone_list = [];
|
$ae_app.lu_timezone_list = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$ae_app.events.show_main__options = true; // Section for: search area, buttons for filtering events, create new event (Meeting).
|
$idaa_loc.recovery_meetings.show_main__options = true; // Section for: search area, buttons for filtering events, create new event (Meeting).
|
||||||
$ae_app.events.show_list__event_obj_li = true;
|
$idaa_loc.recovery_meetings.show_list__event_obj_li = true;
|
||||||
$ae_app.events.fulltext_search_qry_str = '';
|
$idaa_loc.recovery_meetings.fulltext_search_qry_str = '';
|
||||||
$ae_app.events.qry_virtual = false;
|
$idaa_loc.recovery_meetings.qry_virtual = false;
|
||||||
$ae_app.events.qry_physical = false;
|
$idaa_loc.recovery_meetings.qry_physical = false;
|
||||||
$ae_app.events.qry_type = '';
|
$idaa_loc.recovery_meetings.qry_type = '';
|
||||||
|
|
||||||
// NOTE: Check if the novi_uuid is in the novi_admin_li list
|
// NOTE: Check if the novi_uuid is in the novi_admin_li list
|
||||||
if ($ae_app.novi_uuid && $ae_app.novi_admin_li) {
|
if ($idaa_loc.novi_uuid && $idaa_loc.novi_admin_li) {
|
||||||
if ($ae_app.novi_admin_li.includes($ae_app.novi_uuid)) {
|
if ($idaa_loc.novi_admin_li.includes($idaa_loc.novi_uuid)) {
|
||||||
$ae_app.access_type = 'administrator';
|
$ae_loc.access_type = 'administrator';
|
||||||
$ae_app.administrator_access = true;
|
$ae_loc.administrator_access = true;
|
||||||
$ae_app.trusted_access = true;
|
$ae_loc.trusted_access = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// NOTE: Check if the novi_uuid is in the novi_trusted_li list
|
// NOTE: Check if the novi_uuid is in the novi_trusted_li list
|
||||||
if ($ae_app.novi_uuid && $ae_app.novi_trusted_li) {
|
if ($idaa_loc.novi_uuid && $idaa_loc.novi_trusted_li) {
|
||||||
if ($ae_app.novi_trusted_li.includes($ae_app.novi_uuid)) {
|
if ($idaa_loc.novi_trusted_li.includes($idaa_loc.novi_uuid)) {
|
||||||
$ae_app.access_type = 'trusted';
|
$ae_loc.access_type = 'trusted';
|
||||||
$ae_app.trusted_access = true;
|
$ae_loc.trusted_access = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ae_app.administrator_access) {
|
if ($ae_loc.administrator_access) {
|
||||||
$ae_app.events.enabled = 'enabled';
|
$idaa_loc.recovery_meetings.enabled = 'enabled';
|
||||||
$ae_app.events.hidden = 'not_hidden';
|
$idaa_loc.recovery_meetings.hidden = 'not_hidden';
|
||||||
$ae_app.events.limit = 150;
|
$idaa_loc.recovery_meetings.limit = 150;
|
||||||
} else if ($ae_app.trusted_access) {
|
} else if ($ae_loc.trusted_access) {
|
||||||
$ae_app.events.enabled = 'enabled';
|
$idaa_loc.recovery_meetings.enabled = 'enabled';
|
||||||
$ae_app.events.hidden = 'not_hidden';
|
$idaa_loc.recovery_meetings.hidden = 'not_hidden';
|
||||||
$ae_app.events.limit = 75;
|
$idaa_loc.recovery_meetings.limit = 75;
|
||||||
} else {
|
} else {
|
||||||
$ae_app.events.enabled = 'enabled';
|
$idaa_loc.recovery_meetings.enabled = 'enabled';
|
||||||
$ae_app.events.hidden = 'not_hidden';
|
$idaa_loc.recovery_meetings.hidden = 'not_hidden';
|
||||||
$ae_app.events.limit = 25;
|
$idaa_loc.recovery_meetings.limit = 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
let idaa_event_obj_li_get_promise;
|
let idaa_event_obj_li_get_promise;
|
||||||
@@ -114,10 +114,10 @@ if (event_id) {
|
|||||||
// let message = {'event_id': $slct.event_id};
|
// let message = {'event_id': $slct.event_id};
|
||||||
// window.parent.postMessage(message, "*");
|
// window.parent.postMessage(message, "*");
|
||||||
|
|
||||||
$ae_app.events.show_main__options = true;
|
$idaa_loc.recovery_meetings.show_main__options = true;
|
||||||
$ae_app.events.show_list__event_obj_li = true;
|
$idaa_loc.recovery_meetings.show_list__event_obj_li = true;
|
||||||
$ae_app.events.show_view__event_obj = true;
|
$idaa_loc.recovery_meetings.show_view__event_obj = true;
|
||||||
$ae_app.events.show_edit__event_obj = false;
|
$idaa_loc.recovery_meetings.show_edit__event_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$ae_app.client_content) {
|
if (!$ae_app.client_content) {
|
||||||
@@ -164,8 +164,8 @@ $: if ($ae_app.iframe_height && $ae_app.iframe_height_modal_body) {
|
|||||||
|
|
||||||
|
|
||||||
$: if ($slct_trigger == 'load__event_obj_li' && $slct.account_id) {
|
$: if ($slct_trigger == 'load__event_obj_li' && $slct.account_id) {
|
||||||
if ($ae_app.events.qry_status == 'loading') {
|
if ($idaa_loc.recovery_meetings.qry_status == 'loading') {
|
||||||
console.log('*** $ae_app.events.qry_status == loading ***');
|
console.log('*** $idaa_loc.recovery_meetings.qry_status == loading ***');
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log("Delayed for X second.");
|
console.log("Delayed for X second.");
|
||||||
@@ -173,7 +173,7 @@ $: if ($slct_trigger == 'load__event_obj_li' && $slct.account_id) {
|
|||||||
handle_load_idaa_event_obj_li({account_id: $slct.account_id, try_cache: false});
|
handle_load_idaa_event_obj_li({account_id: $slct.account_id, try_cache: false});
|
||||||
}, 250);
|
}, 250);
|
||||||
} else {
|
} else {
|
||||||
console.log('*** $ae_app.events.qry_status != loading ***');
|
console.log('*** $idaa_loc.recovery_meetings.qry_status != loading ***');
|
||||||
$slct_trigger = null;
|
$slct_trigger = null;
|
||||||
handle_load_idaa_event_obj_li({account_id: $slct.account_id, try_cache: false});
|
handle_load_idaa_event_obj_li({account_id: $slct.account_id, try_cache: false});
|
||||||
}
|
}
|
||||||
@@ -181,19 +181,19 @@ $: if ($slct_trigger == 'load__event_obj_li' && $slct.account_id) {
|
|||||||
|
|
||||||
async function handle_load_idaa_event_obj_li({account_id, try_cache=true}) {
|
async function handle_load_idaa_event_obj_li({account_id, try_cache=true}) {
|
||||||
console.log('*** handle_load_idaa_event_obj_li() ***');
|
console.log('*** handle_load_idaa_event_obj_li() ***');
|
||||||
console.log($ae_app.events);
|
console.log($idaa_loc.recovery_meetings);
|
||||||
|
|
||||||
// The fulltext search should be lower case
|
// The fulltext search should be lower case
|
||||||
// let fulltext_search_qry_str = $ae_app.events.fulltext_search_qry_str.toLowerCase();
|
// let fulltext_search_qry_str = $idaa_loc.recovery_meetings.fulltext_search_qry_str.toLowerCase();
|
||||||
let fulltext_search_qry_str = $ae_app.events.fulltext_search_qry_str;
|
let fulltext_search_qry_str = $idaa_loc.recovery_meetings.fulltext_search_qry_str;
|
||||||
let qry_virtual = $ae_app.events.qry_virtual;
|
let qry_virtual = $idaa_loc.recovery_meetings.qry_virtual;
|
||||||
let qry_physical = $ae_app.events.qry_physical;
|
let qry_physical = $idaa_loc.recovery_meetings.qry_physical;
|
||||||
let qry_type = $ae_app.events.qry_type;
|
let qry_type = $idaa_loc.recovery_meetings.qry_type;
|
||||||
|
|
||||||
let enabled = $ae_app.events.enabled;
|
let enabled = $idaa_loc.recovery_meetings.enabled;
|
||||||
let hidden = $ae_app.events.hidden;
|
let hidden = $idaa_loc.recovery_meetings.hidden;
|
||||||
let limit = $ae_app.events.limit;
|
let limit = $idaa_loc.recovery_meetings.limit;
|
||||||
let offset = $ae_app.events.offset;
|
let offset = $idaa_loc.recovery_meetings.offset;
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ async function handle_load_idaa_event_obj_li({account_id, try_cache=true}) {
|
|||||||
// if (JSON.stringify(params_json) == JSON.stringify({})) {
|
// if (JSON.stringify(params_json) == JSON.stringify({})) {
|
||||||
// params_json = null;
|
// params_json = null;
|
||||||
// }
|
// }
|
||||||
$ae_app.events.qry_status = 'loading';
|
$idaa_loc.recovery_meetings.qry_status = 'loading';
|
||||||
idaa_event_obj_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
|
idaa_event_obj_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
|
||||||
api_cfg: $ae_app.ae_api,
|
api_cfg: $ae_app.ae_api,
|
||||||
obj_type: 'event', // Event in this case is a recovery meeting.
|
obj_type: 'event', // Event in this case is a recovery meeting.
|
||||||
@@ -251,7 +251,7 @@ async function handle_load_idaa_event_obj_li({account_id, try_cache=true}) {
|
|||||||
console.log('No results returned or failed.', error);
|
console.log('No results returned or failed.', error);
|
||||||
})
|
})
|
||||||
.finally(function () {
|
.finally(function () {
|
||||||
$ae_app.events.qry_status = 'done';
|
$idaa_loc.recovery_meetings.qry_status = 'done';
|
||||||
});
|
});
|
||||||
|
|
||||||
return idaa_event_obj_li_get_promise;
|
return idaa_event_obj_li_get_promise;
|
||||||
@@ -274,19 +274,19 @@ $: if ($slct_trigger == 'load__event_obj' && $slct.event_id) {
|
|||||||
// let message = {'event_id': $slct.event_id};
|
// let message = {'event_id': $slct.event_id};
|
||||||
// window.parent.postMessage(message, "*");
|
// window.parent.postMessage(message, "*");
|
||||||
|
|
||||||
// $ae_app.events.show_main__options = false;
|
// $idaa_loc.recovery_meetings.show_main__options = false;
|
||||||
// $ae_app.events.show_list__event_obj_li = false;
|
// $idaa_loc.recovery_meetings.show_list__event_obj_li = false;
|
||||||
// $ae_app.events.show_view__event_obj = true;
|
// $idaa_loc.recovery_meetings.show_view__event_obj = true;
|
||||||
// $ae_app.events.show_edit__event_obj = false;
|
// $idaa_loc.recovery_meetings.show_edit__event_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handle_load_event_id_obj({event_id, try_cache=false}) {
|
async function handle_load_event_id_obj({event_id, try_cache=false}) {
|
||||||
console.log('*** handle_load_event_id_obj() ***');
|
console.log('*** handle_load_event_id_obj() ***');
|
||||||
|
|
||||||
// let enabled = $ae_app.events.enabled;
|
// let enabled = $idaa_loc.recovery_meetings.enabled;
|
||||||
// let hidden = $ae_app.events.hidden;
|
// let hidden = $idaa_loc.recovery_meetings.hidden;
|
||||||
// let limit = $ae_app.events.limit;
|
// let limit = $idaa_loc.recovery_meetings.limit;
|
||||||
// let offset = $ae_app.events.offset;
|
// let offset = $idaa_loc.recovery_meetings.offset;
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
@@ -339,10 +339,10 @@ function handle_created_event_obj(event) {
|
|||||||
// $slct_trigger = 'load__event_obj';
|
// $slct_trigger = 'load__event_obj';
|
||||||
$slct_trigger = 'load__event_obj_li';
|
$slct_trigger = 'load__event_obj_li';
|
||||||
|
|
||||||
$ae_app.events.show_main__options = false;
|
$idaa_loc.recovery_meetings.show_main__options = false;
|
||||||
$ae_app.events.show_list__event_obj_li = false;
|
$idaa_loc.recovery_meetings.show_list__event_obj_li = false;
|
||||||
$ae_app.events.show_view__event_obj = true;
|
$idaa_loc.recovery_meetings.show_view__event_obj = true;
|
||||||
$ae_app.events.show_edit__event_obj = false;
|
$idaa_loc.recovery_meetings.show_edit__event_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_updated_event_obj(event) {
|
function handle_updated_event_obj(event) {
|
||||||
@@ -352,10 +352,10 @@ function handle_updated_event_obj(event) {
|
|||||||
// $slct_trigger = 'load__event_obj';
|
// $slct_trigger = 'load__event_obj';
|
||||||
$slct_trigger = 'load__event_obj_li';
|
$slct_trigger = 'load__event_obj_li';
|
||||||
|
|
||||||
$ae_app.events.show_main__options = false;
|
$idaa_loc.recovery_meetings.show_main__options = false;
|
||||||
$ae_app.events.show_list__event_obj_li = false;
|
$idaa_loc.recovery_meetings.show_list__event_obj_li = false;
|
||||||
$ae_app.events.show_view__event_obj = true;
|
$idaa_loc.recovery_meetings.show_view__event_obj = true;
|
||||||
$ae_app.events.show_edit__event_obj = false;
|
$idaa_loc.recovery_meetings.show_edit__event_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_deleted_event_obj(event) {
|
function handle_deleted_event_obj(event) {
|
||||||
@@ -371,10 +371,10 @@ function handle_deleted_event_obj(event) {
|
|||||||
|
|
||||||
$slct_trigger = 'load__event_obj_li';
|
$slct_trigger = 'load__event_obj_li';
|
||||||
|
|
||||||
$ae_app.events.show_main__options = true;
|
$idaa_loc.recovery_meetings.show_main__options = true;
|
||||||
$ae_app.events.show_list__event_obj_li = true;
|
$idaa_loc.recovery_meetings.show_list__event_obj_li = true;
|
||||||
$ae_app.events.show_view__event_obj = false;
|
$idaa_loc.recovery_meetings.show_view__event_obj = false;
|
||||||
$ae_app.events.show_edit__event_obj = false;
|
$idaa_loc.recovery_meetings.show_edit__event_obj = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -420,9 +420,9 @@ function handle_oninput_fulltext_search_qry_str(event) {
|
|||||||
|
|
||||||
// fulltext_search_qry_str = event.target.value;
|
// fulltext_search_qry_str = event.target.value;
|
||||||
|
|
||||||
// if ($ae_app.events.fulltext_search_qry_str.length > 2) {
|
// if ($idaa_loc.recovery_meetings.fulltext_search_qry_str.length > 2) {
|
||||||
// } else {
|
// } else {
|
||||||
// $ae_app.events.fulltext_search_qry_str = '';
|
// $idaa_loc.recovery_meetings.fulltext_search_qry_str = '';
|
||||||
// }
|
// }
|
||||||
$slct_trigger = 'load__event_obj_li';
|
$slct_trigger = 'load__event_obj_li';
|
||||||
}
|
}
|
||||||
@@ -432,7 +432,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
|
|
||||||
let get_item_result = window.localStorage.getItem(code);
|
let get_item_result = window.localStorage.getItem(code);
|
||||||
if (get_item_result) {
|
if (get_item_result) {
|
||||||
$ae_app.events.ds[code] = get_item_result;
|
$idaa_loc.recovery_meetings.ds[code] = get_item_result;
|
||||||
} else {
|
} else {
|
||||||
console.log('Get local storage item miss.');
|
console.log('Get local storage item miss.');
|
||||||
}
|
}
|
||||||
@@ -448,14 +448,14 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
|
|
||||||
if (data_type == 'text') {
|
if (data_type == 'text') {
|
||||||
// console.log(get_data_store_result.text);
|
// console.log(get_data_store_result.text);
|
||||||
$ae_app.events.ds[code] = get_data_store_result.text;
|
$idaa_loc.recovery_meetings.ds[code] = get_data_store_result.text;
|
||||||
} else if (data_type == 'json') {
|
} else if (data_type == 'json') {
|
||||||
// console.log(get_data_store_result.json);
|
// console.log(get_data_store_result.json);
|
||||||
$ae_app.events.ds[code] = get_data_store_result.json;
|
$idaa_loc.recovery_meetings.ds[code] = get_data_store_result.json;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(`Code: ${$ae_app.events.ds[code]}`);
|
// console.log(`Code: ${$idaa_loc.recovery_meetings.ds[code]}`);
|
||||||
// console.log(`Code:`, $ae_app.events.ds[code]);
|
// console.log(`Code:`, $idaa_loc.recovery_meetings.ds[code]);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
@@ -476,16 +476,16 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
|
|
||||||
<section class="ae_section ae_meta">
|
<section class="ae_section ae_meta">
|
||||||
<p>
|
<p>
|
||||||
Novi: {$ae_app.novi_full_name}
|
Novi: {$idaa_loc.novi_full_name}
|
||||||
<span class="details">
|
<span class="details">
|
||||||
(
|
(
|
||||||
{$ae_app.novi_email}
|
{$idaa_loc.novi_email}
|
||||||
{#if $ae_app.administrator_access}
|
{#if $ae_loc.administrator_access}
|
||||||
<span class="access_type administrator_access">Administrator</span>
|
<span class="access_type administrator_access">Administrator</span>
|
||||||
{:else if $ae_app.trusted_access}
|
{:else if $ae_loc.trusted_access}
|
||||||
<span class="access_type trusted_access">Trusted</span>
|
<span class="access_type trusted_access">Trusted</span>
|
||||||
{/if}
|
{/if}
|
||||||
<span class="novi_uuid">UUID: {$ae_app.novi_uuid}</span>
|
<span class="novi_uuid">UUID: {$idaa_loc.novi_uuid}</span>
|
||||||
)
|
)
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -500,12 +500,12 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
<p>If you are interested in Starting a Meeting, IDAA has developed a guide. <a href="https://static.oneskyit.com/c/IDAA/files/IDAA_-_How_to_Start_A_Meeting_Guide.pdf" class="ae_btn btn_md btn_outline_info"><span class="fas fa-file-pdf"></span> Open IDAA's How to Start an IDAA Recovery Meeting PDF</a> for additional information.</p>
|
<p>If you are interested in Starting a Meeting, IDAA has developed a guide. <a href="https://static.oneskyit.com/c/IDAA/files/IDAA_-_How_to_Start_A_Meeting_Guide.pdf" class="ae_btn btn_md btn_outline_info"><span class="fas fa-file-pdf"></span> Open IDAA's How to Start an IDAA Recovery Meeting PDF</a> for additional information.</p>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
{#if $ae_app.events.show_main__options}
|
{#if $idaa_loc.recovery_meetings.show_main__options}
|
||||||
<section class="ae_section ae_options ae_column event_obj__options">
|
<section class="ae_section ae_options ae_column event_obj__options">
|
||||||
|
|
||||||
<div class="filters_and_search">
|
<div class="filters_and_search">
|
||||||
<div class="ae_info recovery_meetings_info note">
|
<div class="ae_info recovery_meetings_info note">
|
||||||
{@html $ae_app.events.ds.recovery_meetings_info}
|
{@html $idaa_loc.recovery_meetings.ds.recovery_meetings_info}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="note">Note: The state/province filter only includes states and provinces that are set for at least one meeting. Many virtual/online meetings do not have a state/province set. Some in-person meetings also do not have a state/province set. Please ask one of the meeting contacts to update this information if it is missing.</div> -->
|
<!-- <div class="note">Note: The state/province filter only includes states and provinces that are set for at least one meeting. Many virtual/online meetings do not have a state/province set. Some in-person meetings also do not have a state/province set. Please ask one of the meeting contacts to update this information if it is missing.</div> -->
|
||||||
|
|
||||||
@@ -516,7 +516,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
placeholder="Search (day of week, location, time, chair, etc.)"
|
placeholder="Search (day of week, location, time, chair, etc.)"
|
||||||
name="fulltext_search_qry_str"
|
name="fulltext_search_qry_str"
|
||||||
on:keyup={handle_oninput_fulltext_search_qry_str}
|
on:keyup={handle_oninput_fulltext_search_qry_str}
|
||||||
bind:value={$ae_app.events.fulltext_search_qry_str}
|
bind:value={$idaa_loc.recovery_meetings.fulltext_search_qry_str}
|
||||||
>
|
>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="ae_group">
|
<div class="ae_group">
|
||||||
@@ -525,7 +525,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
placeholder="Search (day of week, location, chair, etc.)"
|
placeholder="Search (day of week, location, chair, etc.)"
|
||||||
id="meeting_fulltext_search_qry_str"
|
id="meeting_fulltext_search_qry_str"
|
||||||
name="fulltext_search_qry_str"
|
name="fulltext_search_qry_str"
|
||||||
bind:value={$ae_app.events.fulltext_search_qry_str}
|
bind:value={$idaa_loc.recovery_meetings.fulltext_search_qry_str}
|
||||||
style="width: 50%;"
|
style="width: 50%;"
|
||||||
class="bs-input"
|
class="bs-input"
|
||||||
>
|
>
|
||||||
@@ -543,7 +543,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
<input
|
<input
|
||||||
name="qry_virtual"
|
name="qry_virtual"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={$ae_app.events.qry_virtual}
|
bind:checked={$idaa_loc.recovery_meetings.qry_virtual}
|
||||||
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
@@ -551,7 +551,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
<input
|
<input
|
||||||
name="qry_physical"
|
name="qry_physical"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={$ae_app.events.qry_physical}
|
bind:checked={$idaa_loc.recovery_meetings.qry_physical}
|
||||||
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
@@ -566,7 +566,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
name="qry_type"
|
name="qry_type"
|
||||||
type="radio"
|
type="radio"
|
||||||
value=""
|
value=""
|
||||||
bind:group={$ae_app.events.qry_type}
|
bind:group={$idaa_loc.recovery_meetings.qry_type}
|
||||||
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
||||||
title="Show all meeting types"
|
title="Show all meeting types"
|
||||||
>
|
>
|
||||||
@@ -576,7 +576,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
name="qry_type"
|
name="qry_type"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="IDAA"
|
value="IDAA"
|
||||||
bind:group={$ae_app.events.qry_type}
|
bind:group={$idaa_loc.recovery_meetings.qry_type}
|
||||||
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
||||||
title="Open to IDAA members only"
|
title="Open to IDAA members only"
|
||||||
>
|
>
|
||||||
@@ -586,7 +586,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
name="qry_type"
|
name="qry_type"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="Caduceus"
|
value="Caduceus"
|
||||||
bind:group={$ae_app.events.qry_type}
|
bind:group={$idaa_loc.recovery_meetings.qry_type}
|
||||||
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
||||||
title="Open to all healthcare workers including those who do not qualify for IDAA"
|
title="Open to all healthcare workers including those who do not qualify for IDAA"
|
||||||
>
|
>
|
||||||
@@ -596,18 +596,18 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
name="qry_type"
|
name="qry_type"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="Family Recovery"
|
value="Family Recovery"
|
||||||
bind:group={$ae_app.events.qry_type}
|
bind:group={$idaa_loc.recovery_meetings.qry_type}
|
||||||
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
||||||
title="Open to spouses, parents, and children of medical professionals who have substance use disorder."
|
title="Open to spouses, parents, and children of medical professionals who have substance use disorder."
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
<!-- {#if $ae_app.administrator_access}
|
<!-- {#if $ae_loc.administrator_access}
|
||||||
<label>Al-Anon (old)
|
<label>Al-Anon (old)
|
||||||
<input
|
<input
|
||||||
name="qry_type"
|
name="qry_type"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="Al-Anon"
|
value="Al-Anon"
|
||||||
bind:group={$ae_app.events.qry_type}
|
bind:group={$idaa_loc.recovery_meetings.qry_type}
|
||||||
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
@@ -616,7 +616,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
name="qry_type"
|
name="qry_type"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="Other"
|
value="Other"
|
||||||
bind:group={$ae_app.events.qry_type}
|
bind:group={$idaa_loc.recovery_meetings.qry_type}
|
||||||
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
on:change={() => {$slct_trigger = 'load__event_obj_li';}}
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
@@ -634,21 +634,21 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
|
|
||||||
<div class="ae_group ae_row">
|
<div class="ae_group ae_row">
|
||||||
|
|
||||||
{#if $ae_app.trusted_access && $ae_app.events.hidden == 'not_hidden'}
|
{#if $ae_loc.trusted_access && $idaa_loc.recovery_meetings.hidden == 'not_hidden'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.events.hidden = 'all';
|
$idaa_loc.recovery_meetings.hidden = 'all';
|
||||||
$ae_app.events.limit = 150;
|
$idaa_loc.recovery_meetings.limit = 150;
|
||||||
$slct_trigger = 'load__event_obj_li';
|
$slct_trigger = 'load__event_obj_li';
|
||||||
}}
|
}}
|
||||||
class="btn_show_bb_post ae_btn btn btn-info"
|
class="btn_show_bb_post ae_btn btn btn-info"
|
||||||
>
|
>
|
||||||
<span class="fas fa-eye"></span> Show Hidden Events
|
<span class="fas fa-eye"></span> Show Hidden Events
|
||||||
</button>
|
</button>
|
||||||
{:else if $ae_app.trusted_access && $ae_app.events.hidden == 'all'}
|
{:else if $ae_loc.trusted_access && $idaa_loc.recovery_meetings.hidden == 'all'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.events.hidden = 'not_hidden';
|
$idaa_loc.recovery_meetings.hidden = 'not_hidden';
|
||||||
$slct_trigger = 'load__event_obj_li';
|
$slct_trigger = 'load__event_obj_li';
|
||||||
}}
|
}}
|
||||||
class="btn_hide_bb_post ae_btn btn btn-info"
|
class="btn_hide_bb_post ae_btn btn btn-info"
|
||||||
@@ -657,22 +657,22 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $ae_app.administrator_access && $ae_app.events.enabled == 'enabled'}
|
{#if $ae_loc.administrator_access && $idaa_loc.recovery_meetings.enabled == 'enabled'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.events.hidden = 'all';
|
$idaa_loc.recovery_meetings.hidden = 'all';
|
||||||
$ae_app.events.enabled = 'all';
|
$idaa_loc.recovery_meetings.enabled = 'all';
|
||||||
$ae_app.events.limit = 500;
|
$idaa_loc.recovery_meetings.limit = 500;
|
||||||
$slct_trigger = 'load__event_obj_li';
|
$slct_trigger = 'load__event_obj_li';
|
||||||
}}
|
}}
|
||||||
class="btn_show_bb_post ae_btn btn btn-warning"
|
class="btn_show_bb_post ae_btn btn btn-warning"
|
||||||
>
|
>
|
||||||
<span class="fas fa-eye"></span> Show Disabled Events
|
<span class="fas fa-eye"></span> Show Disabled Events
|
||||||
</button>
|
</button>
|
||||||
{:else if $ae_app.administrator_access && $ae_app.events.enabled == 'all'}
|
{:else if $ae_loc.administrator_access && $idaa_loc.recovery_meetings.enabled == 'all'}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$ae_app.events.enabled = 'enabled';
|
$idaa_loc.recovery_meetings.enabled = 'enabled';
|
||||||
$slct_trigger = 'load__event_obj_li';
|
$slct_trigger = 'load__event_obj_li';
|
||||||
}}
|
}}
|
||||||
class="btn_hide_bb_post ae_btn btn btn-warning"
|
class="btn_hide_bb_post ae_btn btn btn-warning"
|
||||||
@@ -690,10 +690,10 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
url.searchParams.delete('event_id');
|
url.searchParams.delete('event_id');
|
||||||
history.pushState({}, '', url);
|
history.pushState({}, '', url);
|
||||||
|
|
||||||
$ae_app.events.show_main__options = false;
|
$idaa_loc.recovery_meetings.show_main__options = false;
|
||||||
$ae_app.events.show_list__event_obj_li = false;
|
$idaa_loc.recovery_meetings.show_list__event_obj_li = false;
|
||||||
$ae_app.events.show_view__event_obj = false;
|
$idaa_loc.recovery_meetings.show_view__event_obj = false;
|
||||||
$ae_app.events.show_edit__event_obj = true;
|
$idaa_loc.recovery_meetings.show_edit__event_obj = true;
|
||||||
}}
|
}}
|
||||||
class="btn_new_recovery_meeting ae_btn btn btn-secondary"
|
class="btn_new_recovery_meeting ae_btn btn btn-secondary"
|
||||||
>
|
>
|
||||||
@@ -707,22 +707,22 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.events.show_list__event_obj_li}
|
{#if $idaa_loc.recovery_meetings.show_list__event_obj_li}
|
||||||
<List_event_obj />
|
<List_event_obj />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.events.show_edit__event_obj}
|
{#if $idaa_loc.recovery_meetings.show_edit__event_obj}
|
||||||
<!-- <section class="ae_edit event_obj event_id idaa_event_id_edit"> -->
|
<!-- <section class="ae_edit event_obj event_id idaa_event_id_edit"> -->
|
||||||
<Element_modal_v3
|
<Element_modal_v3
|
||||||
show = { true }
|
show = { true }
|
||||||
modal_cover_body = { false }
|
modal_cover_body = { false }
|
||||||
report_client_dimensions = { true }
|
report_client_dimensions = { true }
|
||||||
on:close={ () => {
|
on:close={ () => {
|
||||||
$ae_app.events.show_main__options = true;
|
$idaa_loc.recovery_meetings.show_main__options = true;
|
||||||
$ae_app.events.show_list__event_obj_li = true;
|
$idaa_loc.recovery_meetings.show_list__event_obj_li = true;
|
||||||
$ae_app.events.show_edit__event_obj = false;
|
$idaa_loc.recovery_meetings.show_edit__event_obj = false;
|
||||||
$ae_app.events.show_view__event_obj = false;
|
$idaa_loc.recovery_meetings.show_view__event_obj = false;
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
url.searchParams.delete('event_id');
|
url.searchParams.delete('event_id');
|
||||||
@@ -754,7 +754,7 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{#if $ae_app.events.show_view__event_obj && $slct.event_obj}
|
{#if $idaa_loc.recovery_meetings.show_view__event_obj && $slct.event_obj}
|
||||||
<!-- <section class="ae_view event_obj event_id idaa_event_id_view"> -->
|
<!-- <section class="ae_view event_obj event_id idaa_event_id_view"> -->
|
||||||
<Element_modal_v3
|
<Element_modal_v3
|
||||||
show = { true }
|
show = { true }
|
||||||
@@ -764,10 +764,10 @@ async function handle_get_data_store_obj_w_code({code, data_type='text'}) {
|
|||||||
$slct.event_id = null;
|
$slct.event_id = null;
|
||||||
$slct.event_obj = {};
|
$slct.event_obj = {};
|
||||||
|
|
||||||
$ae_app.events.show_main__options = true;
|
$idaa_loc.recovery_meetings.show_main__options = true;
|
||||||
$ae_app.events.show_list__event_obj_li = true;
|
$idaa_loc.recovery_meetings.show_list__event_obj_li = true;
|
||||||
$ae_app.events.show_view__event_obj = false;
|
$idaa_loc.recovery_meetings.show_view__event_obj = false;
|
||||||
$ae_app.events.show_edit__event_obj = false;
|
$idaa_loc.recovery_meetings.show_edit__event_obj = false;
|
||||||
|
|
||||||
const url = new URL(location);
|
const url = new URL(location);
|
||||||
url.searchParams.delete('event_id');
|
url.searchParams.delete('event_id');
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ async function handle_submit_form(event: any) {
|
|||||||
|
|
||||||
event_do['timezone'] = event_meeting_fd.timezone;
|
event_do['timezone'] = event_meeting_fd.timezone;
|
||||||
|
|
||||||
event_do['recurring'] = !!event_meeting_fd.recurring;
|
event_do['recurring'] = true; // Assume always true 2024-10 !!event_meeting_fd.recurring;
|
||||||
event_do['recurring_pattern'] = event_meeting_fd.recurring_pattern;
|
event_do['recurring_pattern'] = event_meeting_fd.recurring_pattern;
|
||||||
|
|
||||||
// NOTE: !! converts to boolean based on truthiness
|
// NOTE: !! converts to boolean based on truthiness
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$
|
|||||||
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
||||||
|
|
||||||
export let lq__event_obj: any;
|
export let lq__event_obj: any;
|
||||||
export let container_class_li = [];
|
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
@@ -40,7 +39,7 @@ onMount(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<section class={`svelte_component ae_section ae_view event_obj view__event_obj ${container_class_li.join(' ')}`}>
|
<section class="svelte_component ae_section ae_view event_obj view__event_obj space-y-2">
|
||||||
|
|
||||||
<div class="p-2 bg-white shadow-md rounded-lg">
|
<div class="p-2 bg-white shadow-md rounded-lg">
|
||||||
<div class="meeting_description description mb-4">
|
<div class="meeting_description description mb-4">
|
||||||
@@ -163,7 +162,7 @@ onMount(() => {
|
|||||||
<div class="p-2 bg-white shadow-md rounded-lg meeting_when">
|
<div class="p-2 bg-white shadow-md rounded-lg meeting_when">
|
||||||
|
|
||||||
<div class="meeting_recurring"
|
<div class="meeting_recurring"
|
||||||
class:ae_d_none={!$lq__event_obj?.recurring}
|
class:hidden={!$lq__event_obj?.recurring}
|
||||||
>
|
>
|
||||||
<div class="meeting_recurring_text">
|
<div class="meeting_recurring_text">
|
||||||
<span class="ae_label">
|
<span class="ae_label">
|
||||||
@@ -348,14 +347,14 @@ onMount(() => {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
.event_obj .ae_meta .ae_group {
|
/* .event_obj .ae_meta .ae_group {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.event_obj .ae_meta .ae_options {
|
/* .event_obj .ae_meta .ae_options {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
} */
|
||||||
|
|
||||||
/* a {
|
/* a {
|
||||||
color: #82B6E1;
|
color: #82B6E1;
|
||||||
|
|||||||
@@ -10,15 +10,13 @@ import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
|||||||
|
|
||||||
export let lq__event_obj_li: any;
|
export let lq__event_obj_li: any;
|
||||||
|
|
||||||
export let container_class_li = [];
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
console.log('** Component Mounted: ** List - Recovery Meeting (Event) Obj');
|
console.log('** Component Mounted: ** List - Recovery Meeting (Event) Obj');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<section class="svelte_component ae_section ae_list event_obj_li list__event_obj recovery_meeting_list {container_class_li.join(' ')}">
|
<section class="svelte_component ae_section ae_list event_obj_li list__event_obj recovery_meeting_list">
|
||||||
<!-- <h1>Recovery Meetings {$lq__event_obj_li?.length}</h1> -->
|
<!-- <h1>Recovery Meetings {$lq__event_obj_li?.length}</h1> -->
|
||||||
|
|
||||||
{#if $lq__event_obj_li && $lq__event_obj_li.length}
|
{#if $lq__event_obj_li && $lq__event_obj_li.length}
|
||||||
@@ -40,18 +38,15 @@ onMount(() => {
|
|||||||
|
|
||||||
{#each $lq__event_obj_li as idaa_event_obj, index}
|
{#each $lq__event_obj_li as idaa_event_obj, index}
|
||||||
<div
|
<div
|
||||||
id={`idaa_recovery_meeting_id__${idaa_event_obj?.event_id_random}`}
|
class="container recovery_meeting event_obj border border-1 rounded p-2 mb-2"
|
||||||
class="container recovery_meeting ae_object event_obj border border-1 rounded p-2 mb-2"
|
|
||||||
class:meeting_physical={idaa_event_obj?.physical}
|
|
||||||
class:meeting_virtual={idaa_event_obj?.virtual}
|
|
||||||
class:dim={idaa_event_obj?.hide}
|
class:dim={idaa_event_obj?.hide}
|
||||||
class:bg-warning-100={!idaa_event_obj?.enable}
|
class:bg-warning-100={!idaa_event_obj?.enable}
|
||||||
>
|
>
|
||||||
|
|
||||||
<header class="ae_header event__header">
|
<header class="ae_header">
|
||||||
<h3
|
<h3
|
||||||
class="flex flex-row gap-2 items-center">
|
class="flex flex-row gap-2 items-center">
|
||||||
<span class="event__name">{idaa_event_obj?.name}</span>
|
<span class="event__name h3">{idaa_event_obj?.name}</span>
|
||||||
<span class="badge badge-info variant-glass-tertiary">
|
<span class="badge badge-info variant-glass-tertiary">
|
||||||
{#if idaa_event_obj?.physical && idaa_event_obj?.virtual}
|
{#if idaa_event_obj?.physical && idaa_event_obj?.virtual}
|
||||||
<span class="fas fa-home m-1"></span> F2F and <span class="fas fa-laptop m-1"></span> Virtual
|
<span class="fas fa-home m-1"></span> F2F and <span class="fas fa-laptop m-1"></span> Virtual
|
||||||
@@ -73,21 +68,21 @@ onMount(() => {
|
|||||||
</h3>
|
</h3>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="ae_options event_obj__options">
|
<div class="ae_options flex flex-row gap-2 items-center justify-center">
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$idaa_slct.event_id = idaa_event_obj?.event_id_random;
|
$idaa_slct.event_id = idaa_event_obj?.event_id;
|
||||||
$idaa_slct.event_obj = idaa_event_obj;
|
$idaa_slct.event_obj = idaa_event_obj;
|
||||||
$slct_trigger = 'load__event_obj';
|
// $slct_trigger = 'load__event_obj';
|
||||||
|
|
||||||
// // handle_load_event_id_obj({event_id: $idaa_slct.event_id, try_cache: false});
|
// // handle_load_event_id_obj({event_id: $idaa_slct.event_id, try_cache: false});
|
||||||
|
|
||||||
// const url = new URL(location);
|
const url = new URL(location);
|
||||||
// url.searchParams.set('event_id', idaa_event_obj?.event_id_random);
|
url.searchParams.set('event_id', idaa_event_obj?.event_id);
|
||||||
// history.pushState({}, '', url);
|
history.pushState({}, '', url);
|
||||||
|
|
||||||
// let message = {'event_id': idaa_event_obj?.event_id_random};
|
let message = {'event_id': idaa_event_obj?.event_id};
|
||||||
// window.parent.postMessage(message, "*");
|
window.parent.postMessage(message, "*");
|
||||||
|
|
||||||
// $idaa_sess.recovery_meetings.show_main__options = true;
|
// $idaa_sess.recovery_meetings.show_main__options = true;
|
||||||
// $idaa_sess.recovery_meetings.show_list__event_obj_li = true;
|
// $idaa_sess.recovery_meetings.show_list__event_obj_li = true;
|
||||||
@@ -103,15 +98,15 @@ onMount(() => {
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- This checks if the currently logged in Novi user has a matching UUID or email address. -->
|
<!-- This checks if the currently logged in Novi user has a matching UUID or email address. -->
|
||||||
{#if $ae_loc.trusted_access || idaa_event_obj?.external_person_id === $ae_loc.novi_uuid || idaa_event_obj?.contact_li_json[0].email === $ae_loc.novi_email}
|
{#if $ae_loc.trusted_access || idaa_event_obj?.external_person_id === $idaa_loc.novi_uuid || idaa_event_obj?.contact_li_json[0].email === $idaa_loc.novi_email}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$idaa_slct.event_id = idaa_event_obj?.event_id_random;
|
$idaa_slct.event_id = idaa_event_obj?.event_id;
|
||||||
$idaa_slct.event_obj = idaa_event_obj;
|
$idaa_slct.event_obj = idaa_event_obj;
|
||||||
$slct_trigger = 'load__event_obj';
|
// $slct_trigger = 'load__event_obj';
|
||||||
|
|
||||||
// const url = new URL(location);
|
// const url = new URL(location);
|
||||||
// url.searchParams.set('event_id', idaa_event_obj?.event_id_random);
|
// url.searchParams.set('event_id', idaa_event_obj?.event_id);
|
||||||
// history.pushState({}, '', url);
|
// history.pushState({}, '', url);
|
||||||
|
|
||||||
// $idaa_sess.recovery_meetings.show_main__options = true;
|
// $idaa_sess.recovery_meetings.show_main__options = true;
|
||||||
@@ -125,16 +120,6 @@ onMount(() => {
|
|||||||
<span class="fas fa-edit m-1"></span>
|
<span class="fas fa-edit m-1"></span>
|
||||||
Edit Meeting
|
Edit Meeting
|
||||||
</button>
|
</button>
|
||||||
<!-- <button
|
|
||||||
on:click={() => {
|
|
||||||
// Copy URL to clipboard
|
|
||||||
// Is there a URL anymore?
|
|
||||||
// const copy_text = document.getElementById(`meeting_edit_url_${idaa_event_obj?.event_id_random}`);
|
|
||||||
}}
|
|
||||||
class="ae_btn btn_sm btn_outline_info meeting_edit_help"
|
|
||||||
>
|
|
||||||
<span class="fas fa-link m-1"></span> URL
|
|
||||||
</button> -->
|
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -322,8 +307,8 @@ onMount(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ae_header h3 {
|
.ae_header h3 {
|
||||||
font-size: 1.2em;
|
/* font-size: 1.2em; */
|
||||||
margin: 0;
|
/* margin: 0; */
|
||||||
/* padding: 0; */
|
/* padding: 0; */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,8 +321,8 @@ onMount(() => {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.event_obj .ae_meta .ae_options {
|
/* .event_obj .ae_meta .ae_options {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
} */
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user