The IDAA Recovery Meetings view and edit now display mostly correct. They still need work though.

This commit is contained in:
Scott Idem
2024-10-02 13:13:23 -04:00
parent a189a1c336
commit 581749ff41
9 changed files with 286 additions and 237 deletions

View File

@@ -48,14 +48,11 @@ export let get_object = async function get_object(
console.log('Params:', params); console.log('Params:', params);
if (log_lvl > 1) { if (log_lvl > 1) {
console.log('Data:', data); console.log('Data:', data);
console.log(`Base URL: ${api_cfg['base_url']}`); console.log(`Base URL: ${api_cfg['base_url']}; Timeout: ${timeout}`);
console.log('API Config:', api_cfg); console.log('API Config:', api_cfg);
} }
if (log_lvl > 2) { if (log_lvl > 2) {
console.log(`Return Meta: ${return_meta}`); console.log(`Return Meta: ${return_meta}; Return Blob: ${return_blob}; Filename: ${filename}; Auto Download: ${auto_download}`);
console.log(`Return Blob: ${return_blob}`);
console.log(`Filename: ${filename}`);
console.log(`Auto Download: ${auto_download}`);
} }
} }

View File

@@ -338,13 +338,13 @@ async function handle_download_export__obj_type(
for_obj_type, // Usually for an account, event, event_exhibit, or sponsorship_cfg for_obj_type, // Usually for an account, event, event_exhibit, or sponsorship_cfg
for_obj_id, // The ID of the object for_obj_id, // The ID of the object
exp_alt = null, // Export name (idaa, other, not 'default') exp_alt = null, // Export name (idaa, other, not 'default')
file_type='CSV', // 'CSV' or 'Excel' file_type = 'CSV', // 'CSV' or 'Excel'
return_file=true, return_file = true,
filename='no_filename.csv', filename = 'no_filename.csv',
auto_download=false, auto_download = false,
limit=5000, limit = 5000,
params={}, // key value object is expected params = {}, // key value object is expected
log_lvl=0 log_lvl = 0
}: { }: {
api_cfg: any, api_cfg: any,
get_obj_type: string, get_obj_type: string,
@@ -392,6 +392,7 @@ async function handle_download_export__obj_type(
api_cfg: api_cfg, api_cfg: api_cfg,
endpoint: endpoint, endpoint: endpoint,
params: params, params: params,
timeout: 90000, // Seems to timeout sometimes with the default of 60 seconds
return_blob: return_file, return_blob: return_file,
filename: clean_filename, filename: clean_filename,
auto_download: auto_download, auto_download: auto_download,

View File

@@ -93,6 +93,9 @@ let idaa_session_data_struct: key_val = {
recovery_meetings: { recovery_meetings: {
qry__status: null, qry__status: null,
// qry__fulltext_str: null, // qry__fulltext_str: null,
show__modal_edit: false,
show__modal_view: false,
}, },
}; };

View File

@@ -23,6 +23,7 @@ import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$
import Comp__event_obj_qry from './ae_idaa_comp__event_obj_qry.svelte'; import Comp__event_obj_qry from './ae_idaa_comp__event_obj_qry.svelte';
import Comp__event_obj_li from './ae_idaa_comp__event_obj_li.svelte'; import Comp__event_obj_li from './ae_idaa_comp__event_obj_li.svelte';
import Comp__event_obj_id_edit from './ae_idaa_comp__event_obj_id_edit.svelte';
import Comp__event_obj_id_view from './ae_idaa_comp__event_obj_id_view.svelte'; import Comp__event_obj_id_view from './ae_idaa_comp__event_obj_id_view.svelte';
let event_id_random_li: Array<string>; let event_id_random_li: Array<string>;
@@ -127,10 +128,26 @@ $: lq_new__event_obj_li = liveQuery(async () => {
</section> </section>
<!-- Main modal --> <!-- Main modal -->
<Modal <Modal
title="{$lq__event_obj?.name} - {$lq__event_obj?.id}" title="{$lq__event_obj?.name} - {$lq__event_obj?.id}"
bind:open={$idaa_slct.event_id} bind:open={$idaa_sess.recovery_meetings.show__modal_edit}
autoclose={false}
size="xl"
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"
>
<Comp__event_obj_id_edit
lq__event_obj={lq__event_obj}
/>
</Modal>
<!-- Main modal -->
<Modal
title="{$lq__event_obj?.name} - {$lq__event_obj?.id}"
bind:open={$idaa_sess.recovery_meetings.show__modal_view}
autoclose={false} autoclose={false}
size="xl" size="xl"
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"

View File

@@ -17,7 +17,7 @@ import { slct, slct_trigger, ae_app } from './stores';
// *** Import Aether module variables and functions // *** Import Aether module variables and functions
// *** Import Aether module components // *** Import Aether module components
import Edit_event_obj from './10_edit__event_obj.svelte'; import Edit_event_obj from './ae_idaa_comp__event_obj_id_edit.svelte';
import List_event_obj from './ae_idaa_comp__event_obj_li.svelte'; import List_event_obj from './ae_idaa_comp__event_obj_li.svelte';
import View_event_obj from './ae_idaa_comp__event_obj_id_view.svelte'; import View_event_obj from './ae_idaa_comp__event_obj_id_view.svelte';

View File

@@ -1,14 +1,14 @@
<script lang="ts"> <script lang="ts">
import { createEventDispatcher, afterUpdate, onDestroy, onMount } from 'svelte'; import { createEventDispatcher, onDestroy, onMount } from 'svelte';
import { fade } from 'svelte/transition'; import { fade } from 'svelte/transition';
import { ae, api } from 'aether_npm_lib'; import { ae_util } from '$lib/ae_utils/ae_utils';
import { slct, slct_trigger, ae_app } from './stores'; import { api } from '$lib/api';
import App from './App.svelte'; 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 { update_event_obj } from './stores_meetings_api.js'; export let lq__event_obj: any;
// export let container_class_li = [];
export let container_class_li: string[] = [];
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
@@ -24,16 +24,16 @@ let disable_submit_btn = true;
let event_location_select_option_li = {}; // This is a list (dict) of key value pairs let event_location_select_option_li = {}; // This is a list (dict) of key value pairs
if ($slct.event_id) { if ($idaa_slct.event_id) {
// console.log(`Event ID selected: ${$slct.event_id}`); // console.log(`Event ID selected: ${$slct.event_id}`);
// console.log(`Event Object selected: ${$slct.event_obj}`) // console.log(`Event Object selected: ${$lq__event_obj}`)
$slct_trigger = 'load__event_obj'; $slct_trigger = 'load__event_obj';
disable_submit_btn = false; disable_submit_btn = false;
} else { } else {
$slct.event_id = null; $idaa_slct.event_id = null;
$slct.event_obj = { $idaa_slct.event_obj = {
account_id_random: $ae_app.account_id, account_id_random: $ae_loc.account_id,
name: null, name: null,
description: null, description: null,
@@ -67,8 +67,8 @@ if ($slct.event_id) {
contact_li_json: [ contact_li_json: [
{ {
full_name: $ae_app.novi_full_name, full_name: $idaa_loc.novi_full_name,
email: $ae_app.novi_email, email: $idaa_loc.novi_email,
phone_mobile: null, phone_mobile: null,
phone_home: null, phone_home: null,
phone_office: null, phone_office: null,
@@ -85,20 +85,20 @@ if ($slct.event_id) {
sort: null, sort: null,
notes: null, notes: null,
external_person_id: $ae_app.novi_uuid, external_person_id: $idaa_loc.novi_uuid,
external_person_full_name: $ae_app.novi_full_name, external_person_full_name: $idaa_loc.novi_full_name,
external_person_email: $ae_app.novi_email, external_person_email: $idaa_loc.novi_email,
}; };
console.log(`Event Object started: ${$slct.event_obj}`); console.log(`Event Object started: ${$idaa_slct.event_obj}`);
} }
if ($ae_app.lu_time_zone_list && $ae_app.lu_time_zone_list.length > 0) { if ($ae_loc.lu_time_zone_list && $ae_loc.lu_time_zone_list.length > 0) {
// console.log('Already have time zone list!', $ae_app.lu_time_zone_list); // console.log('Already have time zone list!', $ae_loc.lu_time_zone_list);
} else { } else {
console.log('No time zone list'); console.log('No time zone list');
let lu_time_zone_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({ let lu_time_zone_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
api_cfg: $ae_app.ae_api, api_cfg: $ae_api,
obj_type: 'lu', // "lu" = a lookup table obj_type: 'lu', // "lu" = a lookup table
for_obj_type: 'time_zone', for_obj_type: 'time_zone',
enabled: null, enabled: null,
@@ -109,13 +109,13 @@ if ($ae_app.lu_time_zone_list && $ae_app.lu_time_zone_list.length > 0) {
.then(function (lu_time_zone_li_get_result) { .then(function (lu_time_zone_li_get_result) {
if (lu_time_zone_li_get_result) { if (lu_time_zone_li_get_result) {
$ae_app.lu_time_zone_list = lu_time_zone_li_get_result; $ae_loc.lu_time_zone_list = lu_time_zone_li_get_result;
console.log(`Time zone list:`, $ae_app.lu_time_zone_list); console.log(`Time zone list:`, $ae_loc.lu_time_zone_list);
console.log($ae_app.lu_time_zone_list[0]); console.log($ae_loc.lu_time_zone_list[0]);
console.log($ae_app.lu_time_zone_list[10]); console.log($ae_loc.lu_time_zone_list[10]);
} else { } else {
console.log(`No time zones returned!`); console.log(`No time zones returned!`);
$ae_app.lu_time_zone_list = []; $ae_loc.lu_time_zone_list = [];
} }
}) })
.catch(function (error) { .catch(function (error) {
@@ -123,13 +123,13 @@ if ($ae_app.lu_time_zone_list && $ae_app.lu_time_zone_list.length > 0) {
}); });
} }
if ($ae_app.lu_country_list && $ae_app.lu_country_list.length > 0) { if ($ae_loc.lu_country_list && $ae_loc.lu_country_list.length > 0) {
// console.log('Already have country list!', $ae_app.lu_country_list); // console.log('Already have country list!', $ae_loc.lu_country_list);
} else { } else {
console.log('No country list'); console.log('No country list');
let lu_country_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({ let lu_country_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
api_cfg: $ae_app.ae_api, api_cfg: $ae_api,
obj_type: 'lu', // "lu" = a lookup table obj_type: 'lu', // "lu" = a lookup table
for_obj_type: 'country', for_obj_type: 'country',
enabled: null, enabled: null,
@@ -140,13 +140,13 @@ if ($ae_app.lu_country_list && $ae_app.lu_country_list.length > 0) {
.then(function (lu_country_li_get_result) { .then(function (lu_country_li_get_result) {
if (lu_country_li_get_result) { if (lu_country_li_get_result) {
$ae_app.lu_country_list = lu_country_li_get_result; $ae_loc.lu_country_list = lu_country_li_get_result;
console.log(`Country list:`, $ae_app.lu_country_list); console.log(`Country list:`, $ae_loc.lu_country_list);
console.log($ae_app.lu_country_list[0]); console.log($ae_loc.lu_country_list[0]);
console.log($ae_app.lu_country_list[10]); console.log($ae_loc.lu_country_list[10]);
} else { } else {
console.log(`No countries returned!`); console.log(`No countries returned!`);
$ae_app.lu_country_list = []; $ae_loc.lu_country_list = [];
} }
}) })
.catch(function (error) { .catch(function (error) {
@@ -154,13 +154,13 @@ if ($ae_app.lu_country_list && $ae_app.lu_country_list.length > 0) {
}); });
} }
if ($ae_app.lu_country_subdivision_list && $ae_app.lu_country_subdivision_list.length > 0) { if ($ae_loc.lu_country_subdivision_list && $ae_loc.lu_country_subdivision_list.length > 0) {
// console.log('Already have country subdivision list!', $ae_app.lu_country_subdivision_list); // console.log('Already have country subdivision list!', $ae_loc.lu_country_subdivision_list);
} else { } else {
console.log('No country subdivision list'); console.log('No country subdivision list');
let lu_country_subdivision_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({ let lu_country_subdivision_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
api_cfg: $ae_app.ae_api, api_cfg: $ae_api,
obj_type: 'lu', // "lu" = a lookup table obj_type: 'lu', // "lu" = a lookup table
for_obj_type: 'country_subdivision', for_obj_type: 'country_subdivision',
enabled: null, enabled: null,
@@ -171,13 +171,13 @@ if ($ae_app.lu_country_subdivision_list && $ae_app.lu_country_subdivision_list.l
.then(function (lu_country_subdivision_li_get_result) { .then(function (lu_country_subdivision_li_get_result) {
if (lu_country_subdivision_li_get_result) { if (lu_country_subdivision_li_get_result) {
$ae_app.lu_country_subdivision_list = lu_country_subdivision_li_get_result; $ae_loc.lu_country_subdivision_list = lu_country_subdivision_li_get_result;
console.log(`Country subdivision list:`, $ae_app.lu_country_subdivision_list); console.log(`Country subdivision list:`, $ae_loc.lu_country_subdivision_list);
console.log($ae_app.lu_country_subdivision_list[0]); console.log($ae_loc.lu_country_subdivision_list[0]);
console.log($ae_app.lu_country_subdivision_list[10]); console.log($ae_loc.lu_country_subdivision_list[10]);
} else { } else {
console.log(`No country subdivisions returned!`); console.log(`No country subdivisions returned!`);
$ae_app.lu_country_subdivision_list = []; $ae_loc.lu_country_subdivision_list = [];
} }
}) })
.catch(function (error) { .catch(function (error) {
@@ -211,52 +211,52 @@ function tinymce_init() {
// ], // ],
// 'undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent' // 'undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent'
// NOTE: Basic version of the TinyMCE editor // // NOTE: Basic version of the TinyMCE editor
tinymce.init({ // tinymce.init({
selector: '.tinymce_editor.editor_basic', // selector: '.tinymce_editor.editor_basic',
// width: 600, // // width: 600,
height: 400, // height: 400,
plugins: [ 'lists', 'code', 'help' ], // plugins: [ 'lists', 'code', 'help' ],
menubar: false, // menubar: false,
toolbar: 'undo redo | styles | bold italic | alignleft aligncenter | bullist numlist outdent indent | code | help', // toolbar: 'undo redo | styles | bold italic | alignleft aligncenter | bullist numlist outdent indent | code | help',
}); // });
// NOTE: Minimal version of the TinyMCE editor // // NOTE: Minimal version of the TinyMCE editor
tinymce.init({ // tinymce.init({
selector: '.tinymce_editor.editor_basic_200', // selector: '.tinymce_editor.editor_basic_200',
// width: 600, // // width: 600,
height: 200, // height: 200,
plugins: [ 'lists', 'code', 'help' ], // plugins: [ 'lists', 'code', 'help' ],
menubar: false, // menubar: false,
toolbar: 'undo redo | styles | bold italic | alignleft aligncenter | bullist numlist outdent indent | code | help', // toolbar: 'undo redo | styles | bold italic | alignleft aligncenter | bullist numlist outdent indent | code | help',
}); // });
// NOTE: Less is more version of the TinyMCE editor // // NOTE: Less is more version of the TinyMCE editor
tinymce.init({ // tinymce.init({
selector: '.tinymce_editor.editor_less_100', // selector: '.tinymce_editor.editor_less_100',
// width: 600, // // width: 600,
height: 100, // height: 100,
// plugins: [ 'lists', 'code', 'help' ], // // plugins: [ 'lists', 'code', 'help' ],
menubar: false, // menubar: false,
toolbar: false, // toolbar: false,
statusbar: false, // statusbar: false,
}); // });
} }
function tinymce_remove() { function tinymce_remove() {
tinymce.remove('.tinymce_editor.editor_basic'); // tinymce.remove('.tinymce_editor.editor_basic');
tinymce.remove('.tinymce_editor.editor_basic_200'); // tinymce.remove('.tinymce_editor.editor_basic_200');
tinymce.remove('.tinymce_editor.editor_less_100'); // tinymce.remove('.tinymce_editor.editor_less_100');
} }
$: if ($slct.event_obj) { $: if ($idaa_slct.event_obj) {
// console.log('Selected Event object changed?'); console.log('Selected Event object changed?');
// console.log($slct.event_obj); console.log($idaa_slct.event_obj);
if ($slct.event_obj == null) { if ($idaa_slct.event_obj == null) {
// $slct.event_obj = {code: null, name: null, description: null, start_datetime: null, end_datetime: null, notes: null}; // $idaa_slct.event_obj = {code: null, name: null, description: null, start_datetime: null, end_datetime: null, notes: null};
} else { } else {
disable_submit_btn = false; disable_submit_btn = false;
} }
@@ -271,12 +271,12 @@ async function handle_submit_form(event){
let form_data = new FormData(event.target); let form_data = new FormData(event.target);
console.log(form_data); console.log(form_data);
let event_meeting_data = ae.util.extract_prefixed_form_data({prefix: null, form_data: form_data, trim_values: true, bool_tf_str: true, log_lvl: 0}); let event_meeting_data = ae_util.extract_prefixed_form_data({prefix: null, form_data: form_data, trim_values: true, bool_tf_str: true, log_lvl: 0});
console.log(event_meeting_data); console.log(event_meeting_data);
let event_data: key_val = {}; let event_data: key_val = {};
event_data['account_id_random'] = $ae_app.account_id; event_data['account_id_random'] = $ae_loc.account_id;
event_data['name'] = event_meeting_data.name; event_data['name'] = event_meeting_data.name;
@@ -299,7 +299,7 @@ async function handle_submit_form(event){
if (event_meeting_data.address_country_subdivision_code) { if (event_meeting_data.address_country_subdivision_code) {
address['country_subdivision_code'] = event_meeting_data.address_country_subdivision_code; address['country_subdivision_code'] = event_meeting_data.address_country_subdivision_code;
let country_subdivision_data = ae.util.get_obj_li_with_matching_prop({'obj_li': $ae_app.lu_country_subdivision_list, 'property': 'code', 'value': event_meeting_data.address_country_subdivision_code}); let country_subdivision_data = ae_util.get_obj_li_with_matching_prop({'obj_li': $ae_loc.lu_country_subdivision_list, 'property': 'code', 'value': event_meeting_data.address_country_subdivision_code});
address['state_province'] = country_subdivision_data[0].name; // Assume there is only one match address['state_province'] = country_subdivision_data[0].name; // Assume there is only one match
// address['country_subdivision_name'] = country_subdivision_data[0].name; // address['country_subdivision_name'] = country_subdivision_data[0].name;
} }
@@ -307,7 +307,7 @@ async function handle_submit_form(event){
if (event_meeting_data.address_country_alpha_2_code) { if (event_meeting_data.address_country_alpha_2_code) {
address['country_alpha_2_code'] = event_meeting_data.address_country_alpha_2_code; address['country_alpha_2_code'] = event_meeting_data.address_country_alpha_2_code;
let country_data = ae.util.get_obj_li_with_matching_prop({'obj_li': $ae_app.lu_country_list, 'property': 'alpha_2_code', 'value': event_meeting_data.address_country_alpha_2_code}); let country_data = ae_util.get_obj_li_with_matching_prop({'obj_li': $ae_loc.lu_country_list, 'property': 'alpha_2_code', 'value': event_meeting_data.address_country_alpha_2_code});
console.log(country_data); console.log(country_data);
address['country'] = country_data[0].english_short_name; // Assume there is only one match address['country'] = country_data[0].english_short_name; // Assume there is only one match
// address['country_name'] = country_data[0].english_short_name; // address['country_name'] = country_data[0].english_short_name;
@@ -392,11 +392,11 @@ async function handle_submit_form(event){
let current_date_iso = dayjs().format('YYYY-MM-DD'); let current_date_iso = dayjs().format('YYYY-MM-DD');
// event_data['recurring_text'] = `This meeting occurs every ${days_of_week.join(', ')} at ${ae.util.iso_datetime_formatter(`${current_date_iso} ${event_data['recurring_start_time']}`, 'time_short_no_leading')} to ${ae.util.iso_datetime_formatter(`${current_date_iso} ${event_data['recurring_end_time']}`, 'time_short_no_leading')}.`; // event_data['recurring_text'] = `This meeting occurs every ${days_of_week.join(', ')} at ${ae_util.iso_datetime_formatter(`${current_date_iso} ${event_data['recurring_start_time']}`, 'time_short_no_leading')} to ${ae_util.iso_datetime_formatter(`${current_date_iso} ${event_data['recurring_end_time']}`, 'time_short_no_leading')}.`;
// event_data['recurring_text'] = `This meeting occurs every ${days_of_week.join(', ')} at ${ae.util.iso_datetime_formatter(`${current_date_iso} ${event_data['recurring_start_time']}`, 'time_short_no_leading')}.`; // event_data['recurring_text'] = `This meeting occurs every ${days_of_week.join(', ')} at ${ae_util.iso_datetime_formatter(`${current_date_iso} ${event_data['recurring_start_time']}`, 'time_short_no_leading')}.`;
event_data['recurring_text'] = `*gen* ${days_of_week.join(', ')} at ${ae.util.iso_datetime_formatter(`${current_date_iso} ${event_data['recurring_start_time']}`, 'time_short_no_leading')}`; event_data['recurring_text'] = `*gen* ${days_of_week.join(', ')} at ${ae_util.iso_datetime_formatter(`${current_date_iso} ${event_data['recurring_start_time']}`, 'time_short_no_leading')}`;
} }
event_data['external_person_id'] = event_meeting_data.external_person_id; // NOTE: Defaults to the Novi user that created/owns this event event_data['external_person_id'] = event_meeting_data.external_person_id; // NOTE: Defaults to the Novi user that created/owns this event
@@ -455,10 +455,10 @@ async function handle_submit_form(event){
if (!$slct.event_id) { if (!$slct.event_id) {
create_event_obj_promise = api.create_ae_obj_crud({ create_event_obj_promise = api.create_ae_obj_crud({
api_cfg: $ae_app.ae_api, api_cfg: $ae_api,
obj_type: 'event', obj_type: 'event',
fields: event_data, fields: event_data,
key: $ae_app.ae_api.api_crud_super_key, key: $ae_api.api_crud_super_key,
log_lvl: 2 log_lvl: 2
}) })
.then(function (event_obj_create_result) { .then(function (event_obj_create_result) {
@@ -489,11 +489,11 @@ async function handle_submit_form(event){
} else { } else {
update_event_obj_promise = api.update_ae_obj_id_crud({ update_event_obj_promise = api.update_ae_obj_id_crud({
api_cfg: $ae_app.ae_api, api_cfg: $ae_api,
obj_type: 'event', obj_type: 'event',
obj_id: $slct.event_id, obj_id: $slct.event_id,
fields: event_data, fields: event_data,
key: $ae_app.ae_api.api_crud_super_key, key: $ae_api.api_crud_super_key,
log_lvl: 1 log_lvl: 1
}) })
.then(function (event_obj_update_result) { .then(function (event_obj_update_result) {
@@ -562,12 +562,12 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
console.log('*** handle_delete_event_obj() ***'); console.log('*** handle_delete_event_obj() ***');
delete_event_obj_promise = api.delete_ae_obj_id_crud({ delete_event_obj_promise = api.delete_ae_obj_id_crud({
api_cfg: $ae_app.ae_api, api_cfg: $ae_api,
obj_type: 'event', obj_type: 'event',
obj_id: event_id, obj_id: event_id,
method: method, method: method,
// params: params, // params: params,
key: $ae_app.ae_api.api_crud_super_key, key: $ae_api.api_crud_super_key,
log_lvl: 0 log_lvl: 0
}) })
.then(function (event_obj_delete_result) { .then(function (event_obj_delete_result) {
@@ -592,9 +592,9 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<section <section
class="svelte_component ae_section ae_edit event_obj edit__event_obj {container_class_li.join(' ')}" class="svelte_component ae_section ae_edit event_obj edit__event_obj"
class:ae_create={!$slct.event_id} class:ae_create={!$slct.event_id}
bind:clientHeight={$ae_app.iframe_height_modal_body} bind:clientHeight={$ae_loc.iframe_height_modal_body}
> >
<form on:submit|preventDefault={handle_submit_form} class=""> <form on:submit|preventDefault={handle_submit_form} class="">
@@ -616,19 +616,19 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<section class="ae_section event__general_information"> <!-- BEGIN: section event__general_information --> <section class="ae_section event__general_information"> <!-- BEGIN: section event__general_information -->
<label for="name">Name of Recovery Meeting <label for="name">Name of Recovery Meeting
<input type="text" id="name" name="name" required max="200" value={$slct.event_obj.name} placeholder="Name of Recovery Meeting" autocomplete="off" /> <input type="text" id="name" name="name" required max="200" value={$lq__event_obj?.name} placeholder="Name of Recovery Meeting" autocomplete="off" class="input" />
</label> </label>
<label class="ae_label event__description">Short description <label class="ae_label event__description">Short description
<textarea name="description" id="description" class="ae_value event__description tinymce_editor editor_basic" rows="5" cols="70" bind:value={$slct.event_obj.description} placeholder="A short description or overview of this recovery meeting"></textarea> <!-- <textarea name="description" id="description" class="ae_value event__description tinymce_editor editor_basic" rows="5" cols="70" bind:value={$idaa_slct.event_obj.description} placeholder="A short description or overview of this recovery meeting"></textarea> -->
</label> </label>
<label>Type of Recovery Meeting <label>Type of Recovery Meeting
<!-- <input name="type" value={$slct.event_obj.type} /> --> <!-- <input name="type" value={$lq__event_obj.type} /> -->
<select name="type"> <select name="type" class="select">
<option value="IDAA" selected={($slct.event_obj.type == 'IDAA' ? 'selected' : '')}>IDAA</option> <option value="IDAA" selected={($lq__event_obj?.type == 'IDAA' ? 'selected' : '')}>IDAA</option>
<option value="Caduceus" selected={($slct.event_obj.type == 'Caduceus' ? 'selected' : '')}>Caduceus</option> <option value="Caduceus" selected={($lq__event_obj?.type == 'Caduceus' ? 'selected' : '')}>Caduceus</option>
<option value="Family Recovery" selected={($slct.event_obj.type == 'Family Recovery' ? 'selected' : '')}>Family Recovery</option> <option value="Family Recovery" selected={($lq__event_obj?.type == 'Family Recovery' ? 'selected' : '')}>Family Recovery</option>
</select> </select>
<ul> <ul>
@@ -655,7 +655,8 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
type="checkbox" type="checkbox"
name="physical" name="physical"
id="physical" id="physical"
bind:checked={$slct.event_obj.physical} bind:checked={$idaa_slct.event_obj.physical}
class="checkbox"
> >
</label> </label>
<label for="virtual" class="">Virtual/Online <label for="virtual" class="">Virtual/Online
@@ -663,7 +664,8 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
type="checkbox" type="checkbox"
name="virtual" name="virtual"
id="virtual" id="virtual"
bind:checked={$slct.event_obj.virtual} bind:checked={$idaa_slct.event_obj.virtual}
class="checkbox"
> >
</label> </label>
</div> </div>
@@ -672,26 +674,26 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<fieldset <fieldset
id="physical_address" id="physical_address"
class="physical_address" class="physical_address"
class:ae_d_none={!$slct.event_obj.physical}> class:ae_d_none={!$lq__event_obj?.physical}>
<legend>Address</legend> <legend>Address</legend>
<input id="" name="address_location_id_random" type="hidden" value="{$slct.event_obj.address_location_id_random}"> <input id="" name="address_location_id_random" type="hidden" value="{$lq__event_obj?.address_location_id_random}">
<label for="address_name">Location name <label for="address_name">Location name
<input type="text" class="" id="address_name" name="address_name" placeholder="The name of the place or location" value="{($slct.event_obj.location_address_json && $slct.event_obj.location_address_json.name ? $slct.event_obj.location_address_json.name : $slct.event_obj.address_name)}" autocomplete="off"> <input type="text" class="input" id="address_name" name="address_name" placeholder="The name of the place or location" value="{($lq__event_obj?.location_address_json && $lq__event_obj?.location_address_json.name ? $lq__event_obj?.location_address_json.name : $lq__event_obj?.address_name)}" autocomplete="off">
</label> </label>
<label for="address_line_1">Line 1 <label for="address_line_1">Line 1
<input type="text" class="" id="address_line_1" name="address_line_1" placeholder="Address line 1" value="{($slct.event_obj.location_address_json && $slct.event_obj.location_address_json.line_1 ? $slct.event_obj.location_address_json.line_1 : $slct.event_obj.address_line_1)}" autocomplete="address-line1"> <input type="text" class="input" id="address_line_1" name="address_line_1" placeholder="Address line 1" value="{($lq__event_obj?.location_address_json && $lq__event_obj?.location_address_json.line_1 ? $lq__event_obj?.location_address_json.line_1 : $lq__event_obj?.address_line_1)}" autocomplete="address-line1">
</label> </label>
<label for="address_line_2">Line 2 <label for="address_line_2">Line 2
<input type="text" class="" id="address_line_2" name="address_line_2" placeholder="Address line 2" value="{($slct.event_obj.location_address_json && $slct.event_obj.location_address_json.line_2 ? $slct.event_obj.location_address_json.line_2 : $slct.event_obj.address_line_2)}" autocomplete="address-line2"> <input type="text" class="input" id="address_line_2" name="address_line_2" placeholder="Address line 2" value="{($lq__event_obj?.location_address_json && $lq__event_obj?.location_address_json.line_2 ? $lq__event_obj?.location_address_json.line_2 : $lq__event_obj?.address_line_2)}" autocomplete="address-line2">
</label> </label>
<label for="address_line_3">Line 3 <label for="address_line_3">Line 3
<input type="text" class="" id="address_line_3" name="address_line_3" placeholder="Address line 3" value="{($slct.event_obj.location_address_json && $slct.event_obj.location_address_json.line_3 ? $slct.event_obj.location_address_json.line_3 : $slct.event_obj.address_line_3)}" autocomplete="address-line3"> <input type="text" class="input" id="address_line_3" name="address_line_3" placeholder="Address line 3" value="{($lq__event_obj?.location_address_json && $lq__event_obj?.location_address_json.line_3 ? $lq__event_obj?.location_address_json.line_3 : $lq__event_obj?.address_line_3)}" autocomplete="address-line3">
</label> </label>
</fieldset> </fieldset>
@@ -701,73 +703,73 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
class="physical_city_state_province_postal_code_country"> class="physical_city_state_province_postal_code_country">
<label for="address_city">City <label for="address_city">City
<input type="text" class="" id="address_city" name="address_city" placeholder="Name of the city" value="{($slct.event_obj.location_address_json && $slct.event_obj.location_address_json.city ? $slct.event_obj.location_address_json.city : $slct.event_obj.address_city)}" autocomplete="address-level2"> <input type="text" class="input" id="address_city" name="address_city" placeholder="Name of the city" value="{($lq__event_obj?.location_address_json && $lq__event_obj?.location_address_json.city ? $lq__event_obj?.location_address_json.city : $lq__event_obj?.address_city)}" autocomplete="address-level2">
</label> </label>
{#if $ae_app.lu_country_subdivision_list} {#if $ae_loc.lu_country_subdivision_list}
<label for="address_country_subdivision_code" class="">State or province <label for="address_country_subdivision_code" class="">State or province
<select class="" id="address_country_subdivision_code" name="address_country_subdivision_code" title="Select the state or province for the meeting"> <select class="select" id="address_country_subdivision_code" name="address_country_subdivision_code" title="Select the state or province for the meeting">
<option value="">-- None --</option> <option value="">-- None --</option>
{#each $ae_app.lu_country_subdivision_list as lu_country_subdivision} {#each $ae_loc.lu_country_subdivision_list as lu_country_subdivision}
<option value="{lu_country_subdivision.code}" selected={(($slct.event_obj.location_address_json && lu_country_subdivision.code == $slct.event_obj.location_address_json.country_subdivision_code) || ( lu_country_subdivision.code == $slct.event_obj.address_country_subdivision_code) ? 'selected' : '')}>{lu_country_subdivision.country_alpha_2_code} - {lu_country_subdivision.name}</option> <option value="{lu_country_subdivision.code}" selected={(($lq__event_obj?.location_address_json && lu_country_subdivision.code == $lq__event_obj?.location_address_json.country_subdivision_code) || ( lu_country_subdivision.code == $lq__event_obj?.address_country_subdivision_code) ? 'selected' : '')}>{lu_country_subdivision.country_alpha_2_code} - {lu_country_subdivision.name}</option>
{/each} {/each}
</select> </select>
</label> </label>
{:else} {:else}
<label for="address_country_subdivision_code">State or province code <label for="address_country_subdivision_code">State or province code
<input type="text" class="" id="address_country_subdivision_code" name="address_country_subdivision_code" placeholder="State or province code" value="{($slct.event_obj.location_address_json && $slct.event_obj.location_address_json.country_subdivision_code ? $slct.event_obj.location_address_json.country_subdivision_code : $slct.event_obj.address_country_subdivision_code)}" autocomplete="address-level1"> <input type="text" class="input" id="address_country_subdivision_code" name="address_country_subdivision_code" placeholder="State or province code" value="{($lq__event_obj?.location_address_json && $lq__event_obj?.location_address_json.country_subdivision_code ? $lq__event_obj?.location_address_json.country_subdivision_code : $lq__event_obj?.address_country_subdivision_code)}" autocomplete="address-level1">
</label> </label>
{/if} {/if}
<label for="address_postal_code">Postal code or zip code <label for="address_postal_code">Postal code or zip code
<input type="text" class="" id="address_postal_code" name="address_postal_code" placeholder="Postal code or zip code" value="{($slct.event_obj.location_address_json && $slct.event_obj.location_address_json.postal_code ? $slct.event_obj.location_address_json.postal_code : $slct.event_obj.address_postal_code)}" autocomplete="postal-code"> <input type="text" class="input" id="address_postal_code" name="address_postal_code" placeholder="Postal code or zip code" value="{($lq__event_obj?.location_address_json && $lq__event_obj?.location_address_json.postal_code ? $lq__event_obj?.location_address_json.postal_code : $lq__event_obj?.address_postal_code)}" autocomplete="postal-code">
</label> </label>
{#if $ae_app.lu_country_list} {#if $ae_loc.lu_country_list}
<label for="address_country_alpha_2_code" class="">Country <label for="address_country_alpha_2_code" class="">Country
<select class="" id="address_country_alpha_2_code" name="address_country_alpha_2_code" title="Select the country for the meeting"> <select class="select" id="address_country_alpha_2_code" name="address_country_alpha_2_code" title="Select the country for the meeting">
<option value="">-- None --</option> <option value="">-- None --</option>
{#each $ae_app.lu_country_list as lu_country} {#each $ae_loc.lu_country_list as lu_country}
<option value="{lu_country.alpha_2_code}" selected={(($slct.event_obj.location_address_json && lu_country.alpha_2_code == $slct.event_obj.location_address_json.country_alpha_2_code) || (lu_country.alpha_2_code == $slct.event_obj.address_country_alpha_2_code) ? 'selected' : '')}>{lu_country.english_short_name}</option> <option value="{lu_country.alpha_2_code}" selected={(($lq__event_obj?.location_address_json && lu_country.alpha_2_code == $lq__event_obj?.location_address_json.country_alpha_2_code) || (lu_country.alpha_2_code == $lq__event_obj?.address_country_alpha_2_code) ? 'selected' : '')}>{lu_country.english_short_name}</option>
{/each} {/each}
</select> </select>
</label> </label>
{:else} {:else}
<label for="address_country_alpha_2_code">Country <label for="address_country_alpha_2_code">Country
<input type="text" class="" id="address_country_alpha_2_code" name="address_country_alpha_2_code" placeholder="Country alpha 2 code" value="{($slct.event_obj.location_address_json && $slct.event_obj.location_address_json.country_alpha_2_code ? $slct.event_obj.location_address_json.country_alpha_2_code : $slct.event_obj.address_country_alpha_2_code)}" autocomplete="country"> <input type="text" class="input" id="address_country_alpha_2_code" name="address_country_alpha_2_code" placeholder="Country alpha 2 code" value="{($lq__event_obj?.location_address_json && $lq__event_obj?.location_address_json.country_alpha_2_code ? $lq__event_obj?.location_address_json.country_alpha_2_code : $lq__event_obj?.address_country_alpha_2_code)}" autocomplete="country">
</label> </label>
{/if} {/if}
</fieldset> </fieldset>
<label for="location_text" class="">Additional information the meeting location <label for="location_text" class="">Additional information the meeting location
<textarea class="ae_value event__location_text tinymce_editor editor_less_100" id="location_text" name="location_text" placeholder="Additional information about the meeting location" rows="2" cols="70" bind:value={$slct.event_obj.location_text}></textarea> <textarea class="ae_value event__location_text tinymce_editor editor_less_100 textarea" id="location_text" name="location_text" placeholder="Additional information about the meeting location" rows="2" cols="70" bind:value={$idaa_slct.event_obj.location_text}></textarea>
</label> </label>
<fieldset <fieldset
id="virtual" id="virtual"
class="virtual" class="virtual"
class:ae_d_none={!$slct.event_obj.virtual}> class:ae_d_none={!$lq__event_obj?.virtual}>
<legend>Virtual/Online</legend> <legend>Virtual/Online</legend>
<label for="attend_url">URL to access the virtual meeting <label for="attend_url">URL to access the virtual meeting
<input type="url" class="" id="attend_url" name="attend_url" placeholder="URL to access the virtual meeting" value={$slct.event_obj.attend_url} autocomplete="url"> <input type="url" class="input" id="attend_url" name="attend_url" placeholder="URL to access the virtual meeting" value={$lq__event_obj?.attend_url} autocomplete="url">
</label> </label>
<label for="attend_url_passcode">Passcode to join at URL <label for="attend_url_passcode">Passcode to join at URL
<input type="text" class="" id="attend_url_passcode" name="attend_url_passcode" placeholder="Passcode to join at URL" value={$slct.event_obj.attend_url_passcode} autocomplete="off"> <input type="text" class="input" id="attend_url_passcode" name="attend_url_passcode" placeholder="Passcode to join at URL" value={$lq__event_obj?.attend_url_passcode} autocomplete="off">
</label> </label>
<label for="attend_phone">Phone number for meeting conference call <label for="attend_phone">Phone number for meeting conference call
<input type="tel" class="" id="attend_phone" name="attend_phone" placeholder="Phone number for meeting conference call" value={$slct.event_obj.attend_phone} autocomplete="tel"> <input type="tel" class="input" id="attend_phone" name="attend_phone" placeholder="Phone number for meeting conference call" value={$lq__event_obj?.attend_phone} autocomplete="tel">
</label> </label>
<label for="attend_phone_passcode">Passcode to join conference call <label for="attend_phone_passcode">Passcode to join conference call
<input type="text" class="" id="attend_phone_passcode" name="attend_phone_passcode" placeholder="Passcode to join conference call" value={$slct.event_obj.attend_phone_passcode} autocomplete="off"> <input type="text" class="input" id="attend_phone_passcode" name="attend_phone_passcode" placeholder="Passcode to join conference call" value={$lq__event_obj?.attend_phone_passcode} autocomplete="off">
</label> </label>
</fieldset> </fieldset>
<label for="attend_text" class="">Additional information on how to attend <label for="attend_text" class="">Additional information on how to attend
<textarea class="ae_value event__attend_text tinymce_editor editor_less_100" id="attend_text" name="attend_text" placeholder="Additional information on how to attend or join the meeting" rows="2" cols="70" value={$slct.event_obj.attend_text}></textarea> <textarea class="ae_value event__attend_text tinymce_editor editor_less_100 textarea" id="attend_text" name="attend_text" placeholder="Additional information on how to attend or join the meeting" rows="2" cols="70" value={$lq__event_obj?.attend_text}></textarea>
</label> </label>
</section> <!-- END: section event__how_to_attend --> </section> <!-- END: section event__how_to_attend -->
@@ -783,22 +785,22 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<label for="recurring_no" class="">No, only once <label for="recurring_no" class="">No, only once
<input <input
type="radio" type="radio"
class="" class="radio"
id="recurring_no" id="recurring_no"
name="recurring" name="recurring"
value={false} value={false}
bind:group={$slct.event_obj.recurring} bind:group={$idaa_slct.event_obj.recurring}
required required
> >
</label> </label>
<label for="recurring_yes" class="">Yes, repeats <label for="recurring_yes" class="">Yes, repeats
<input <input
type="radio" type="radio"
class="" class="radio"
id="recurring_yes" id="recurring_yes"
name="recurring" name="recurring"
value={true} value={true}
bind:group={$slct.event_obj.recurring} bind:group={$idaa_slct.event_obj.recurring}
required required
> >
</label> </label>
@@ -808,91 +810,91 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<fieldset <fieldset
id="recurring_details" id="recurring_details"
class="recurring_details" class="recurring_details"
class:ae_d_none={!$slct.event_obj.recurring} class:ae_d_none={!$lq__event_obj?.recurring}
> >
<legend class="">Recurring</legend> <legend class="">Recurring</legend>
<label for="recurring_pattern">Repeats <label for="recurring_pattern">Repeats
<select class="" name="recurring_pattern" id="recurring_pattern"> <select class="select" name="recurring_pattern" id="recurring_pattern">
<option value="weekly" selected={($slct.event_obj.recurring_pattern == 'weekly' ? 'selected' : '')}>Weekly</option> <option value="weekly" selected={($lq__event_obj?.recurring_pattern == 'weekly' ? 'selected' : '')}>Weekly</option>
<option value="every other week" selected={($slct.event_obj.recurring_pattern == 'every other week' ? 'selected' : '')}>Every Other Week</option> <option value="every other week" selected={($lq__event_obj?.recurring_pattern == 'every other week' ? 'selected' : '')}>Every Other Week</option>
<option value="monthly" selected={($slct.event_obj.recurring_pattern == 'monthly' ? 'selected' : '')}>Monthly</option> <option value="monthly" selected={($lq__event_obj?.recurring_pattern == 'monthly' ? 'selected' : '')}>Monthly</option>
<option value="other" selected={($slct.event_obj.recurring_pattern == 'other' ? 'selected' : '')}>Other</option> <option value="other" selected={($lq__event_obj?.recurring_pattern == 'other' ? 'selected' : '')}>Other</option>
</select> </select>
</label> </label>
</fieldset> </fieldset>
<fieldset class="event__days_of_week"> <fieldset class="event__days_of_week">
<label><input type="checkbox" name="weekday_sunday" value={$slct.event_obj.weekday_sunday} bind:checked={($slct.event_obj.weekday_sunday)}> <label><input type="checkbox" name="weekday_sunday" value={$lq__event_obj?.weekday_sunday} bind:checked={($idaa_slct.event_obj.weekday_sunday)} class="checkbox">
Sunday</label> Sunday</label>
<label><input type="checkbox" name="weekday_monday" value={$slct.event_obj.weekday_monday} bind:checked={($slct.event_obj.weekday_monday)}> Monday</label> <label><input type="checkbox" name="weekday_monday" value={$lq__event_obj?.weekday_monday} bind:checked={($idaa_slct.event_obj.weekday_monday)} class="checkbox"> Monday</label>
<label><input type="checkbox" name="weekday_tuesday" value={$slct.event_obj.weekday_tuesday} bind:checked={($slct.event_obj.weekday_tuesday)}> Tuesday</label> <label><input type="checkbox" name="weekday_tuesday" value={$lq__event_obj?.weekday_tuesday} bind:checked={($idaa_slct.event_obj.weekday_tuesday)} class="checkbox"> Tuesday</label>
<label><input type="checkbox" name="weekday_wednesday" value={$slct.event_obj.weekday_wednesday} bind:checked={($slct.event_obj.weekday_wednesday)}> Wednesday</label> <label><input type="checkbox" name="weekday_wednesday" value={$lq__event_obj?.weekday_wednesday} bind:checked={($idaa_slct.event_obj.weekday_wednesday)} class="checkbox"> Wednesday</label>
<label><input type="checkbox" name="weekday_thursday" value={$slct.event_obj.weekday_thursday} bind:checked={($slct.event_obj.weekday_thursday)}> Thursday</label> <label><input type="checkbox" name="weekday_thursday" value={$lq__event_obj?.weekday_thursday} bind:checked={($idaa_slct.event_obj.weekday_thursday)} class="checkbox"> Thursday</label>
<label><input type="checkbox" name="weekday_friday" value={$slct.event_obj.weekday_friday} bind:checked={($slct.event_obj.weekday_friday)}> Friday</label> <label><input type="checkbox" name="weekday_friday" value={$lq__event_obj?.weekday_friday} bind:checked={($idaa_slct.event_obj.weekday_friday)} class="checkbox"> Friday</label>
<label><input type="checkbox" name="weekday_saturday" value={$slct.event_obj.weekday_saturday} bind:checked={($slct.event_obj.weekday_saturday)}> Saturday</label> <label><input type="checkbox" name="weekday_saturday" value={$lq__event_obj?.weekday_saturday} bind:checked={($idaa_slct.event_obj.weekday_saturday)} class="checkbox"> Saturday</label>
</fieldset> </fieldset>
<fieldset class="flex_row flex_gap_md flex_justify_around"> <fieldset class="flex_row flex_gap_md flex_justify_around">
<label>Timezone <label>Timezone
{#if $ae_app.lu_time_zone_list && $ae_app.lu_time_zone_list.length > 0} {#if $ae_loc?.lu_time_zone_list && $ae_loc?.lu_time_zone_list.length > 0}
<select name="timezone" required> <select name="timezone" required>
{#each $ae_app.lu_time_zone_list as lu_timezone} {#each $ae_loc?.lu_time_zone_list as lu_timezone}
<option value="{lu_timezone.name}" selected={((($slct.event_obj.timezone && lu_timezone.name == $slct.event_obj.timezone) || lu_timezone.name == $ae_app.current_timezone) ? 'selected' : '')}>{lu_timezone.name}</option> <option value="{lu_timezone.name}" selected={((($lq__event_obj?.timezone && lu_timezone.name == $lq__event_obj?.timezone) || lu_timezone.name == $ae_loc?.current_timezone) ? 'selected' : '')}>{lu_timezone.name}</option>
{/each} {/each}
</select> </select>
{:else} {:else}
<input type="text" name="timezone" value={($slct.event_obj.timezone ? $slct.event_obj.timezone : $ae_app.current_timezone)} /> <input type="text" name="timezone" value={($lq__event_obj?.timezone ? $lq__event_obj?.timezone : $ae_loc?.current_timezone)} class="input" />
{/if} {/if}
<!-- client TZ: {$ae_app.current_timezone} --> <!-- client TZ: {$ae_loc?.current_timezone} -->
</label> </label>
<label>Start Time <input name="recurring_start_time" type="time" value={$slct.event_obj.recurring_start_time} max="8" /></label> <label>Start Time <input name="recurring_start_time" type="time" value={$lq__event_obj?.recurring_start_time} max="8" class="input" /></label>
<label>End Time <input name="recurring_end_time" type="time" value={$slct.event_obj.recurring_end_time} max="8" /></label> <label>End Time <input name="recurring_end_time" type="time" value={$lq__event_obj?.recurring_end_time} max="8" class="input" /></label>
</fieldset> </fieldset>
{#if ( $ae_app.administrator_access || $slct.event_obj && ($slct.event_obj.show_recurring_text || ($slct.event_obj.recurring_text && !$slct.event_obj.recurring_text.includes('*gen*'))) )} {#if ( $ae_loc.administrator_access || $lq__event_obj && ($lq__event_obj?.show_recurring_text || ($lq__event_obj?.recurring_text && !$lq__event_obj?.recurring_text.includes('*gen*'))) )}
<p>Please only use the text box for additional information if the options above do not cover your needs. This may affect how this meeting shows up in search results.</p> <p>Please only use the text box for additional information if the options above do not cover your needs. This may affect how this meeting shows up in search results.</p>
<label for="recurring_text">Additional information on when and how often <label for="recurring_text">Additional information on when and how often
<textarea class="ae_value event__recurring_text tinymce_editor editor_less_100" id="recurring_text" name="recurring_text" placeholder="Additional information on when and how often" value={$slct.event_obj.recurring_text}></textarea> <textarea class="ae_value event__recurring_text tinymce_editor editor_less_100 textarea" id="recurring_text" name="recurring_text" placeholder="Additional information on when and how often" value={$lq__event_obj?.recurring_text ?? ''}></textarea>
</label> </label>
{/if} {/if}
{#if ( $ae_app.administrator_access || $slct.event_obj && ($slct.event_obj.show_recurring_text || ($slct.event_obj.recurring_text && !$slct.event_obj.recurring_text.includes('*gen*'))) )} {#if ( $ae_loc.administrator_access || $lq__event_obj && ($lq__event_obj?.show_recurring_text || ($lq__event_obj?.recurring_text && !$lq__event_obj?.recurring_text.includes('*gen*'))) )}
<button <button
type="button" type="button"
class="ae_btn ae_smaller btn btn-info btn-sm ae_width_md" class="ae_btn ae_smaller btn btn-info btn-sm ae_width_md variant-ghost-warning hover:variant-filled-warning transition"
style="" style=""
on:click|preventDefault={() => { on:click|preventDefault={() => {
if (confirm('Are you sure you want to remove the text for the additional details?')) { if (confirm('Are you sure you want to remove the text for the additional details?')) {
tinyMCE.get('recurring_text').setContent(''); // tinyMCE.get('recurring_text').setContent('');
$slct.event_obj.recurring_text = ''; $idaa_slct.event_obj.recurring_text = '';
$slct.event_obj.show_recurring_text = false; $idaa_slct.event_obj.show_recurring_text = false;
} else { } else {
return false; return false;
} }
}} }}
> >
<span class="fas fa-minus"></span> Remove Details? <span class="fas fa-minus m-1"></span> Remove Details?
</button> </button>
{:else} {:else}
<button <button
type="button" type="button"
class="ae_btn ae_smaller btn btn-info btn-sm ae_width_md" class="ae_btn ae_smaller btn btn-info btn-sm ae_width_md variant-ghost-success hover:variant-filled-success transition"
style="" style=""
on:click|preventDefault={() => { on:click|preventDefault={() => {
// Remove *gen* prefix from recurring_text // Remove *gen* prefix from recurring_text
if ($slct.event_obj.recurring_text && $slct.event_obj.recurring_text.includes('*gen*')) { if ($lq__event_obj.recurring_text && $lq__event_obj.recurring_text.includes('*gen*')) {
$slct.event_obj.recurring_text = $slct.event_obj.recurring_text.replace('*gen* ', ''); $lq__event_obj.recurring_text = $lq__event_obj.recurring_text.replace('*gen* ', '');
} }
$slct.event_obj.show_recurring_text = true; $lq__event_obj.show_recurring_text = true;
}} }}
> >
<span class="fas fa-plus"></span> Add More Details? <span class="fas fa-plus m-1"></span> Add More Details?
</button> </button>
{/if} {/if}
<!-- {#if ($slct.event_obj && $slct.event_obj.recurring_text && !$slct.event_obj.recurring_text.includes('*gen*') || $ae_app.administrator_access)} <!-- {#if ($lq__event_obj && $lq__event_obj.recurring_text && !$lq__event_obj.recurring_text.includes('*gen*') || $ae_loc.administrator_access)}
<label for="recurring_text">Additional information on when and how often <label for="recurring_text">Additional information on when and how often
<textarea class="ae_value event__recurring_text tinymce_editor editor_less_100" id="recurring_text" name="recurring_text" placeholder="Additional information on when and how often" value={$slct.event_obj.recurring_text}></textarea> <textarea class="ae_value event__recurring_text tinymce_editor editor_less_100" id="recurring_text" name="recurring_text" placeholder="Additional information on when and how often" value={$lq__event_obj.recurring_text}></textarea>
</label> </label>
{/if} --> {/if} -->
</section> <!-- END: section event__timing --> </section> <!-- END: section event__timing -->
@@ -902,17 +904,17 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<section class="ae_section event__contacts"> <section class="ae_section event__contacts">
<h3>Contacts</h3> <h3>Contacts</h3>
<!-- {#if $ae_app.trusted_access} --> <!-- {#if $ae_loc.trusted_access} -->
<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.event_obj.external_person_id ? $slct.event_obj.external_person_id : $ae_app.novi_uuid)} value={($lq__event_obj?.external_person_id ? $lq__event_obj?.external_person_id : $idaa_loc.novi_uuid)}
readonly={true} readonly={true}
class="ae_width_lg" class="ae_width_lg input"
> >
{:else} {:else}
<div class="ae_highlight">Primary link using the Novi API UUID. This must be empty, a staff person, or an active member of IDAA and should be the primary contact for this meeting.</div> <div class="ae_highlight">Primary link using the Novi API UUID. This must be empty, a staff person, or an active member of IDAA and should be the primary contact for this meeting.</div>
@@ -921,9 +923,9 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
type="text" type="text"
id="external_person_id" id="external_person_id"
name="external_person_id" name="external_person_id"
value={($slct.event_obj.external_person_id ? $slct.event_obj.external_person_id : '')} value={($lq__event_obj?.external_person_id ? $lq__event_obj?.external_person_id : '')}
readonly={false} readonly={false}
class="ae_width_lg" class="ae_width_lg input"
> >
{/if} {/if}
</label> </label>
@@ -935,13 +937,13 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<span class="ae_group"> <span class="ae_group">
{#if !($ae_app.trusted_access || $slct.event_obj.contact_li_json[0].unlock)} {#if !($ae_loc.trusted_access || $lq__event_obj?.contact_li_json[0].unlock)}
<button type="button" class="ae_btn ae_smaller ae_btn_info" <button type="button" class="ae_btn ae_smaller ae_btn_info"
on:click|preventDefault={() => { on:click|preventDefault={() => {
if (confirm('Are you sure you want to lock these fields? The primary contact name and email address are required.')) { if (confirm('Are you sure you want to lock these fields? The primary contact name and email address are required.')) {
$slct.event_obj.contact_li_json[0].unlock = true; $lq__event_obj.contact_li_json[0].unlock = true;
} else { } else {
$slct.event_obj.contact_li_json[0].unlock = false; $lq__event_obj.contact_li_json[0].unlock = false;
return false; return false;
} }
}} }}
@@ -951,7 +953,7 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
{:else} {:else}
<button type="button" class="ae_btn ae_smaller ae_btn_info" <button type="button" class="ae_btn ae_smaller ae_btn_info"
on:click|preventDefault={() => { on:click|preventDefault={() => {
$slct.event_obj.contact_li_json[0].unlock = false; $lq__event_obj.contact_li_json[0].unlock = false;
}} }}
> >
<span class="fas fa-unlock" title="Field is unlocked"></span> <span class="fas fa-unlock" title="Field is unlocked"></span>
@@ -960,50 +962,50 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
{/if} {/if}
<label for="contact_1_full_name">Full name <label for="contact_1_full_name">Full name
{#if !($ae_app.trusted_access || $slct.event_obj.contact_li_json[0].unlock)} {#if !($ae_loc.trusted_access || $lq__event_obj?.contact_li_json[0].unlock)}
<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>
{/if} {/if}
<input <input
type="text" type="text"
class="" class="input"
id="contact_1_full_name" name="contact_1_full_name" id="contact_1_full_name" name="contact_1_full_name"
placeholder="Full name" placeholder="Full name"
value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[0] && $slct.event_obj.contact_li_json[0].full_name ? $slct.event_obj.contact_li_json[0].full_name : '')} value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[0] && $lq__event_obj?.contact_li_json[0].full_name ? $lq__event_obj?.contact_li_json[0].full_name : '')}
autocomplete="name" autocomplete="name"
readonly={!($ae_app.trusted_access || $slct.event_obj.contact_li_json[0].unlock)} readonly={!($ae_loc.trusted_access || $lq__event_obj?.contact_li_json[0].unlock)}
required={!$ae_app.trusted_access} required={!$ae_loc.trusted_access}
> >
</label> </label>
<label for="contact_1_email">Email <label for="contact_1_email">Email
{#if !($ae_app.trusted_access || $slct.event_obj.contact_li_json[0].unlock)} {#if !($ae_loc.trusted_access || $lq__event_obj?.contact_li_json[0].unlock)}
<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>
{/if} {/if}
<input <input
type="email" type="email"
class="" class="input"
id="contact_1_email" id="contact_1_email"
name="contact_1_email" name="contact_1_email"
placeholder="Email" placeholder="Email"
value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[0] && $slct.event_obj.contact_li_json[0].email ? $slct.event_obj.contact_li_json[0].email : '')} value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[0] && $lq__event_obj?.contact_li_json[0].email ? $lq__event_obj?.contact_li_json[0].email : '')}
autocomplete="email" autocomplete="email"
readonly={!($ae_app.trusted_access || $slct.event_obj.contact_li_json[0].unlock)} readonly={!($ae_loc.trusted_access || $lq__event_obj?.contact_li_json[0].unlock)}
required={!$ae_app.trusted_access} required={!$ae_loc.trusted_access}
> >
</label> </label>
</span> </span>
<span class="ae_group"> <span class="ae_group">
<label for="contact_1_phone_mobile">Mobile phone <label for="contact_1_phone_mobile">Mobile phone
<input type="tel" class="" id="contact_1_phone_mobile" name="contact_1_phone_mobile" placeholder="Mobile phone" value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[0] && $slct.event_obj.contact_li_json[0].phone_mobile ? $slct.event_obj.contact_li_json[0].phone_mobile : '')} autocomplete="tel"> <input type="tel" class="input" id="contact_1_phone_mobile" name="contact_1_phone_mobile" placeholder="Mobile phone" value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[0] && $lq__event_obj?.contact_li_json[0].phone_mobile ? $lq__event_obj?.contact_li_json[0].phone_mobile : '')} autocomplete="tel">
</label> </label>
<label for="contact_1_phone_home">Home phone <label for="contact_1_phone_home">Home phone
<input type="tel" class="" id="contact_1_phone_home" name="contact_1_phone_home" placeholder="Home phone" value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[0] && $slct.event_obj.contact_li_json[0].phone_home ? $slct.event_obj.contact_li_json[0].phone_home : '')} autocomplete="tel"> <input type="tel" class="input" id="contact_1_phone_home" name="contact_1_phone_home" placeholder="Home phone" value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[0] && $lq__event_obj?.contact_li_json[0].phone_home ? $lq__event_obj?.contact_li_json[0].phone_home : '')} autocomplete="tel">
</label> </label>
<label for="contact_1_phone_office">Office phone <label for="contact_1_phone_office">Office phone
<input type="tel" class="" id="contact_1_phone_office" name="contact_1_phone_office" placeholder="Office phone" value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[0] && $slct.event_obj.contact_li_json[0].phone_office ? $slct.event_obj.contact_li_json[0].phone_office : '')} autocomplete="tel"> <input type="tel" class="input" id="contact_1_phone_office" name="contact_1_phone_office" placeholder="Office phone" value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[0] && $lq__event_obj?.contact_li_json[0].phone_office ? $lq__event_obj?.contact_li_json[0].phone_office : '')} autocomplete="tel">
</label> </label>
</span> </span>
</fieldset> </fieldset>
@@ -1012,21 +1014,21 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<legend>Contact 2</legend> <legend>Contact 2</legend>
<span class="ae_group"> <span class="ae_group">
<label for="contact_2_full_name">Full name <label for="contact_2_full_name">Full name
<input type="text" class="" id="contact_2_full_name" name="contact_2_full_name" placeholder="Full name" value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[1] && $slct.event_obj.contact_li_json[1].full_name ? $slct.event_obj.contact_li_json[1].full_name : '')} autocomplete="name"> <input type="text" class="input" id="contact_2_full_name" name="contact_2_full_name" placeholder="Full name" value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[1] && $lq__event_obj?.contact_li_json[1].full_name ? $lq__event_obj?.contact_li_json[1].full_name : '')} autocomplete="name">
</label> </label>
<label for="contact_2_email">Email <label for="contact_2_email">Email
<input type="email" class="" id="contact_2_email" name="contact_2_email" placeholder="Email" value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[1] && $slct.event_obj.contact_li_json[1].email ? $slct.event_obj.contact_li_json[1].email : '')} autocomplete="email"> <input type="email" class="input" id="contact_2_email" name="contact_2_email" placeholder="Email" value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[1] && $lq__event_obj?.contact_li_json[1].email ? $lq__event_obj?.contact_li_json[1].email : '')} autocomplete="email">
</label> </label>
</span> </span>
<span class="ae_group"> <span class="ae_group">
<label for="contact_2_phone_mobile">Mobile phone <label for="contact_2_phone_mobile">Mobile phone
<input type="tel" class="" id="contact_2_phone_mobile" name="contact_2_phone_mobile" placeholder="Mobile phone" value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[1] && $slct.event_obj.contact_li_json[1].phone_mobile ? $slct.event_obj.contact_li_json[1].phone_mobile : '')} autocomplete="tel"> <input type="tel" class="input" id="contact_2_phone_mobile" name="contact_2_phone_mobile" placeholder="Mobile phone" value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[1] && $lq__event_obj?.contact_li_json[1].phone_mobile ? $lq__event_obj?.contact_li_json[1].phone_mobile : '')} autocomplete="tel">
</label> </label>
<label for="contact_2_phone_home">Home phone <label for="contact_2_phone_home">Home phone
<input type="tel" class="" id="contact_2_phone_home" name="contact_2_phone_home" placeholder="Home phone" value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[1] && $slct.event_obj.contact_li_json[1].phone_home ? $slct.event_obj.contact_li_json[1].phone_home : '')} autocomplete="tel"> <input type="tel" class="input" id="contact_2_phone_home" name="contact_2_phone_home" placeholder="Home phone" value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[1] && $lq__event_obj?.contact_li_json[1].phone_home ? $lq__event_obj?.contact_li_json[1].phone_home : '')} autocomplete="tel">
</label> </label>
<label for="contact_2_phone_office">Office phone <label for="contact_2_phone_office">Office phone
<input type="tel" class="" id="contact_2_phone_office" name="contact_2_phone_office" placeholder="Office phone" value={($slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json[1] && $slct.event_obj.contact_li_json[1].phone_office ? $slct.event_obj.contact_li_json[1].phone_office : '')} autocomplete="tel"> <input type="tel" class="input" id="contact_2_phone_office" name="contact_2_phone_office" placeholder="Office phone" value={($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[1] && $lq__event_obj?.contact_li_json[1].phone_office ? $lq__event_obj?.contact_li_json[1].phone_office : '')} autocomplete="tel">
</label> </label>
</span> </span>
</fieldset> </fieldset>
@@ -1038,7 +1040,16 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<h3> <h3>
Admin Options Admin Options
<button type="button" class="ae_btn ae_d_none_toggle ae_float_right ae_smallest btn btn-xs btn-info" on:click={() => {document.querySelector('.ae_d_none_content').classList.toggle('ae_fade_out'); document.querySelector('.ae_d_none_content').classList.toggle('ae_fade_in');}}><span class="fas fa-eye"></span> Show/Hide Admin</button> <button
type="button"
class="ae_btn ae_d_none_toggle ae_float_right ae_smallest btn btn-xs btn-info btn-sm variant-ghost-warning hover:variant-filled-warning transition"
on:click={() => {
document.querySelector('.ae_d_none_content').classList.toggle('ae_fade_out'); document.querySelector('.ae_d_none_content').classList.toggle('ae_fade_in');
}}
>
<span class="fas fa-eye"></span>
Show/Hide Admin
</button>
</h3> </h3>
<span class="ae_d_none_content ae_fade_out"> <span class="ae_d_none_content ae_fade_out">
@@ -1047,7 +1058,8 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
type="checkbox" type="checkbox"
name="hide" name="hide"
id="hide" id="hide"
bind:checked={$slct.event_obj.hide} bind:checked={$idaa_slct.event_obj.hide}
class="checkbox"
> >
</label> </label>
@@ -1056,28 +1068,30 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
type="checkbox" type="checkbox"
name="priority" name="priority"
id="priority" id="priority"
bind:checked={$slct.event_obj.priority} bind:checked={$idaa_slct.event_obj.priority}
class="checkbox"
> >
</label> </label>
<label>Sort <input type="number" name="sort" value={$slct.event_obj.sort} /></label> <label>Sort <input type="number" name="sort" value={$lq__event_obj?.sort} class="input" /></label>
<label>Group <input type="text" name="group" value={$slct.event_obj.group ? $slct.event_obj.group : ''} max="100" /></label> <label>Group <input type="text" name="group" value={$lq__event_obj?.group ? $lq__event_obj?.group : ''} max="100" class="input" /></label>
{#if $ae_app.administrator_access} {#if $ae_loc.administrator_access}
<label>Enable <label>Enable
<input <input
type="checkbox" type="checkbox"
name="enable" name="enable"
id="enable" id="enable"
bind:checked={$slct.event_obj.enable} bind:checked={$idaa_slct.event_obj.enable}
class="checkbox"
> >
</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 event__notes tinymce_editor editor_basic_200" rows="2" cols="70" value={$slct.event_obj.notes}></textarea> <textarea id="notes" name="notes" class="ae_value event__notes tinymce_editor editor_basic_200 textarea" rows="2" cols="70" value={$lq__event_obj?.notes}></textarea>
</label> </label>
{/if} {/if}
@@ -1088,34 +1102,50 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
<section class="ae_section ae_options ae_row ae_actions event__options event__actions"> <!-- BEGIN: section event__options --> <section class="ae_section ae_options ae_row ae_actions event__options event__actions"> <!-- BEGIN: section event__options -->
{#if $slct.event_id} {#if $slct.event_id}
<button type="submit" class="ae_btn btn_primary btn btn-primary" disabled={(disable_submit_btn)}><span class="fas fa-check"></span> Save</button> <button
type="submit"
disabled={(disable_submit_btn)}
class="ae_btn btn_primary btn btn-primary variant-ghost-primary hover:variant-filled-primary transition"
>
<span class="fas fa-check"></span> Save
</button>
{:else} {:else}
<button type="submit" class="ae_btn btn_primary btn btn-primary" disabled={(disable_submit_btn)} onclick="return confirm('Are you sure you want to create this event?');"><span class="fas fa-plus"></span> Save New Event</button> <button
type="submit"
disabled={(disable_submit_btn)}
on:click={() => {
if (!confirm('Are you sure you want to create this event?')) {return false;}
// handle_save_event_obj({event_id: $slct.event_id, method: 'create'});
}}
class="ae_btn btn_primary btn btn-primary variant-ghost-primary hover:variant-filled-primary transition"
>
<span class="fas fa-plus m-1"></span> Save New Event
</button>
{/if} {/if}
{#if $slct.event_id} {#if $slct.event_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 event?')) {return false;} if (!confirm('Are you sure you want to delete this event?')) {return false;}
handle_delete_event_obj({event_id: $slct.event_id, method: 'delete'}); handle_delete_event_obj({event_id: $slct.event_id, method: 'delete'});
$slct.event_id = null; $slct.event_id = null;
$slct.event_obj = {}; $lq__event_obj = {};
}} }}
class="ae_btn ae_smallest btn btn-danger" type="button" class="ae_btn ae_smallest btn btn-danger" type="button"
title="Delete record permanently" title="Delete record permanently"
> >
<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 event?')) {return false;} if (!confirm('Are you sure you want to disable this event?')) {return false;}
handle_delete_event_obj({event_id: $slct.event_id, method: 'disable'}); handle_delete_event_obj({event_id: $slct.event_id, method: 'disable'});
$slct.event_id = null; $slct.event_id = null;
$slct.event_obj = {}; $lq__event_obj = {};
}} }}
class="ae_btn ae_smallest btn btn-danger" type="button" class="ae_btn ae_smallest btn btn-danger" type="button"
title="Disable record to delete" title="Disable record to delete"
@@ -1129,7 +1159,7 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
handle_delete_event_obj({event_id: $slct.event_id, method: 'hide'}); handle_delete_event_obj({event_id: $slct.event_id, method: 'hide'});
$slct.event_id = null; $slct.event_id = null;
$slct.event_obj = {}; $lq__event_obj = {};
}} }}
class="ae_btn ae_smallest btn btn-danger" type="button" class="ae_btn ae_smallest btn btn-danger" type="button"
title="Hide record to delete" title="Hide record to delete"

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { createEventDispatcher, onMount } from 'svelte'; import { createEventDispatcher, onMount } from 'svelte';
import { fade } from 'svelte/transition'; // import { fade } from 'svelte/transition';
import { ae_util } from '$lib/ae_utils/ae_utils'; 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';

View File

@@ -88,10 +88,10 @@ onMount(() => {
// let message = {'event_id': idaa_event_obj?.event_id_random}; // let message = {'event_id': idaa_event_obj?.event_id_random};
// window.parent.postMessage(message, "*"); // window.parent.postMessage(message, "*");
$idaa_loc.recovery_meetings.show_main__options = true; // $idaa_sess.recovery_meetings.show_main__options = true;
$idaa_loc.recovery_meetings.show_list__event_obj_li = true; // $idaa_sess.recovery_meetings.show_list__event_obj_li = true;
$idaa_loc.recovery_meetings.show_view__event_obj = true; $idaa_sess.recovery_meetings.show__modal_view = true;
$idaa_loc.recovery_meetings.show_edit__event_obj = false; $idaa_sess.recovery_meetings.show__modal_edit = false;
}} }}
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={`Open to see details: ${idaa_event_obj?.name}`} title={`Open to see details: ${idaa_event_obj?.name}`}
@@ -113,10 +113,10 @@ onMount(() => {
// url.searchParams.set('event_id', idaa_event_obj?.event_id_random); // url.searchParams.set('event_id', idaa_event_obj?.event_id_random);
// history.pushState({}, '', url); // history.pushState({}, '', url);
// $idaa_loc.recovery_meetings.show_main__options = true; // $idaa_sess.recovery_meetings.show_main__options = true;
// $idaa_loc.recovery_meetings.show_list__event_obj_li = true; // $idaa_sess.recovery_meetings.show_list__event_obj_li = true;
$idaa_loc.recovery_meetings.show_view__event_obj = false; $idaa_sess.recovery_meetings.show__modal_view = false;
$idaa_loc.recovery_meetings.show_edit__event_obj = true; $idaa_sess.recovery_meetings.show__modal_edit = true;
}} }}
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition" class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
title={`Edit meeting: ${idaa_event_obj?.name}`} title={`Edit meeting: ${idaa_event_obj?.name}`}

View File

@@ -462,7 +462,7 @@ async function handle_qry__event(
if (!confirm('Download exported data Excel file?')) { if (!confirm('Download exported data Excel file?')) {
return false; return false;
} }
ae_promises.download__events_speakers_export = core_func.handle_download_export__obj_type({ ae_promises.download__events_export = core_func.handle_download_export__obj_type({
api_cfg: $ae_api, api_cfg: $ae_api,
get_obj_type: 'event', get_obj_type: 'event',
for_obj_type: 'account', for_obj_type: 'account',
@@ -479,15 +479,16 @@ async function handle_qry__event(
class="btn btn-sm variant-ghost-warning w-42 mb-1 export_data_btn text-xs" class="btn btn-sm variant-ghost-warning w-42 mb-1 export_data_btn text-xs"
title={`Download sponsorship data for ${$ae_loc.account_name}`} title={`Download sponsorship data for ${$ae_loc.account_name}`}
> >
{#await ae_promises.download__sponsorship_export} {#await ae_promises.download__events_export}
<span class="fas fa-spinner fa-spin"></span> <span class="fas fa-spinner fa-spin m-1"></span>
<!-- <span class="loading-text"> <!-- <span class="loading-text">
Downloading... Downloading...
</span> --> </span> -->
{:then} {:then}
<!-- Done? --> <!-- Done? -->
<span class="fas fa-download m-1"></span>
{/await} {/await}
<span class="fas fa-download mx-1"></span> Export All Data Export All Data
</button> </button>
{/if} {/if}