|
|
|
|
@@ -1,14 +1,14 @@
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { createEventDispatcher, afterUpdate, onDestroy, onMount } from 'svelte';
|
|
|
|
|
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
|
|
|
|
|
import { fade } from 'svelte/transition';
|
|
|
|
|
|
|
|
|
|
import { ae, api } from 'aether_npm_lib';
|
|
|
|
|
import { slct, slct_trigger, ae_app } from './stores';
|
|
|
|
|
import App from './App.svelte';
|
|
|
|
|
import { ae_util } from '$lib/ae_utils/ae_utils';
|
|
|
|
|
import { api } from '$lib/api';
|
|
|
|
|
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 container_class_li: string[] = [];
|
|
|
|
|
export let lq__event_obj: any;
|
|
|
|
|
// export let container_class_li = [];
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
if ($slct.event_id) {
|
|
|
|
|
if ($idaa_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';
|
|
|
|
|
disable_submit_btn = false;
|
|
|
|
|
} else {
|
|
|
|
|
$slct.event_id = null;
|
|
|
|
|
$slct.event_obj = {
|
|
|
|
|
account_id_random: $ae_app.account_id,
|
|
|
|
|
$idaa_slct.event_id = null;
|
|
|
|
|
$idaa_slct.event_obj = {
|
|
|
|
|
account_id_random: $ae_loc.account_id,
|
|
|
|
|
|
|
|
|
|
name: null,
|
|
|
|
|
description: null,
|
|
|
|
|
@@ -67,8 +67,8 @@ if ($slct.event_id) {
|
|
|
|
|
|
|
|
|
|
contact_li_json: [
|
|
|
|
|
{
|
|
|
|
|
full_name: $ae_app.novi_full_name,
|
|
|
|
|
email: $ae_app.novi_email,
|
|
|
|
|
full_name: $idaa_loc.novi_full_name,
|
|
|
|
|
email: $idaa_loc.novi_email,
|
|
|
|
|
phone_mobile: null,
|
|
|
|
|
phone_home: null,
|
|
|
|
|
phone_office: null,
|
|
|
|
|
@@ -85,20 +85,20 @@ if ($slct.event_id) {
|
|
|
|
|
sort: null,
|
|
|
|
|
notes: null,
|
|
|
|
|
|
|
|
|
|
external_person_id: $ae_app.novi_uuid,
|
|
|
|
|
external_person_full_name: $ae_app.novi_full_name,
|
|
|
|
|
external_person_email: $ae_app.novi_email,
|
|
|
|
|
external_person_id: $idaa_loc.novi_uuid,
|
|
|
|
|
external_person_full_name: $idaa_loc.novi_full_name,
|
|
|
|
|
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) {
|
|
|
|
|
// console.log('Already have time zone list!', $ae_app.lu_time_zone_list);
|
|
|
|
|
if ($ae_loc.lu_time_zone_list && $ae_loc.lu_time_zone_list.length > 0) {
|
|
|
|
|
// console.log('Already have time zone list!', $ae_loc.lu_time_zone_list);
|
|
|
|
|
} else {
|
|
|
|
|
console.log('No time zone list');
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
for_obj_type: 'time_zone',
|
|
|
|
|
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) {
|
|
|
|
|
if (lu_time_zone_li_get_result) {
|
|
|
|
|
$ae_app.lu_time_zone_list = lu_time_zone_li_get_result;
|
|
|
|
|
console.log(`Time zone list:`, $ae_app.lu_time_zone_list);
|
|
|
|
|
console.log($ae_app.lu_time_zone_list[0]);
|
|
|
|
|
console.log($ae_app.lu_time_zone_list[10]);
|
|
|
|
|
$ae_loc.lu_time_zone_list = lu_time_zone_li_get_result;
|
|
|
|
|
console.log(`Time zone list:`, $ae_loc.lu_time_zone_list);
|
|
|
|
|
console.log($ae_loc.lu_time_zone_list[0]);
|
|
|
|
|
console.log($ae_loc.lu_time_zone_list[10]);
|
|
|
|
|
} else {
|
|
|
|
|
console.log(`No time zones returned!`);
|
|
|
|
|
$ae_app.lu_time_zone_list = [];
|
|
|
|
|
$ae_loc.lu_time_zone_list = [];
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.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) {
|
|
|
|
|
// console.log('Already have country list!', $ae_app.lu_country_list);
|
|
|
|
|
if ($ae_loc.lu_country_list && $ae_loc.lu_country_list.length > 0) {
|
|
|
|
|
// console.log('Already have country list!', $ae_loc.lu_country_list);
|
|
|
|
|
} else {
|
|
|
|
|
console.log('No country list');
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
for_obj_type: 'country',
|
|
|
|
|
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) {
|
|
|
|
|
if (lu_country_li_get_result) {
|
|
|
|
|
$ae_app.lu_country_list = lu_country_li_get_result;
|
|
|
|
|
console.log(`Country list:`, $ae_app.lu_country_list);
|
|
|
|
|
console.log($ae_app.lu_country_list[0]);
|
|
|
|
|
console.log($ae_app.lu_country_list[10]);
|
|
|
|
|
$ae_loc.lu_country_list = lu_country_li_get_result;
|
|
|
|
|
console.log(`Country list:`, $ae_loc.lu_country_list);
|
|
|
|
|
console.log($ae_loc.lu_country_list[0]);
|
|
|
|
|
console.log($ae_loc.lu_country_list[10]);
|
|
|
|
|
} else {
|
|
|
|
|
console.log(`No countries returned!`);
|
|
|
|
|
$ae_app.lu_country_list = [];
|
|
|
|
|
$ae_loc.lu_country_list = [];
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.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) {
|
|
|
|
|
// console.log('Already have country subdivision list!', $ae_app.lu_country_subdivision_list);
|
|
|
|
|
if ($ae_loc.lu_country_subdivision_list && $ae_loc.lu_country_subdivision_list.length > 0) {
|
|
|
|
|
// console.log('Already have country subdivision list!', $ae_loc.lu_country_subdivision_list);
|
|
|
|
|
} else {
|
|
|
|
|
console.log('No country subdivision list');
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
for_obj_type: 'country_subdivision',
|
|
|
|
|
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) {
|
|
|
|
|
if (lu_country_subdivision_li_get_result) {
|
|
|
|
|
$ae_app.lu_country_subdivision_list = lu_country_subdivision_li_get_result;
|
|
|
|
|
console.log(`Country subdivision list:`, $ae_app.lu_country_subdivision_list);
|
|
|
|
|
console.log($ae_app.lu_country_subdivision_list[0]);
|
|
|
|
|
console.log($ae_app.lu_country_subdivision_list[10]);
|
|
|
|
|
$ae_loc.lu_country_subdivision_list = lu_country_subdivision_li_get_result;
|
|
|
|
|
console.log(`Country subdivision list:`, $ae_loc.lu_country_subdivision_list);
|
|
|
|
|
console.log($ae_loc.lu_country_subdivision_list[0]);
|
|
|
|
|
console.log($ae_loc.lu_country_subdivision_list[10]);
|
|
|
|
|
} else {
|
|
|
|
|
console.log(`No country subdivisions returned!`);
|
|
|
|
|
$ae_app.lu_country_subdivision_list = [];
|
|
|
|
|
$ae_loc.lu_country_subdivision_list = [];
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|
@@ -211,52 +211,52 @@ function tinymce_init() {
|
|
|
|
|
// ],
|
|
|
|
|
// 'undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent'
|
|
|
|
|
|
|
|
|
|
// NOTE: Basic version of the TinyMCE editor
|
|
|
|
|
tinymce.init({
|
|
|
|
|
selector: '.tinymce_editor.editor_basic',
|
|
|
|
|
// width: 600,
|
|
|
|
|
height: 400,
|
|
|
|
|
plugins: [ 'lists', 'code', 'help' ],
|
|
|
|
|
menubar: false,
|
|
|
|
|
toolbar: 'undo redo | styles | bold italic | alignleft aligncenter | bullist numlist outdent indent | code | help',
|
|
|
|
|
});
|
|
|
|
|
// // NOTE: Basic version of the TinyMCE editor
|
|
|
|
|
// tinymce.init({
|
|
|
|
|
// selector: '.tinymce_editor.editor_basic',
|
|
|
|
|
// // width: 600,
|
|
|
|
|
// height: 400,
|
|
|
|
|
// plugins: [ 'lists', 'code', 'help' ],
|
|
|
|
|
// menubar: false,
|
|
|
|
|
// toolbar: 'undo redo | styles | bold italic | alignleft aligncenter | bullist numlist outdent indent | code | help',
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// NOTE: Minimal version of the TinyMCE editor
|
|
|
|
|
tinymce.init({
|
|
|
|
|
selector: '.tinymce_editor.editor_basic_200',
|
|
|
|
|
// width: 600,
|
|
|
|
|
height: 200,
|
|
|
|
|
plugins: [ 'lists', 'code', 'help' ],
|
|
|
|
|
menubar: false,
|
|
|
|
|
toolbar: 'undo redo | styles | bold italic | alignleft aligncenter | bullist numlist outdent indent | code | help',
|
|
|
|
|
});
|
|
|
|
|
// // NOTE: Minimal version of the TinyMCE editor
|
|
|
|
|
// tinymce.init({
|
|
|
|
|
// selector: '.tinymce_editor.editor_basic_200',
|
|
|
|
|
// // width: 600,
|
|
|
|
|
// height: 200,
|
|
|
|
|
// plugins: [ 'lists', 'code', 'help' ],
|
|
|
|
|
// menubar: false,
|
|
|
|
|
// toolbar: 'undo redo | styles | bold italic | alignleft aligncenter | bullist numlist outdent indent | code | help',
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// NOTE: Less is more version of the TinyMCE editor
|
|
|
|
|
tinymce.init({
|
|
|
|
|
selector: '.tinymce_editor.editor_less_100',
|
|
|
|
|
// width: 600,
|
|
|
|
|
height: 100,
|
|
|
|
|
// plugins: [ 'lists', 'code', 'help' ],
|
|
|
|
|
menubar: false,
|
|
|
|
|
toolbar: false,
|
|
|
|
|
statusbar: false,
|
|
|
|
|
});
|
|
|
|
|
// // NOTE: Less is more version of the TinyMCE editor
|
|
|
|
|
// tinymce.init({
|
|
|
|
|
// selector: '.tinymce_editor.editor_less_100',
|
|
|
|
|
// // width: 600,
|
|
|
|
|
// height: 100,
|
|
|
|
|
// // plugins: [ 'lists', 'code', 'help' ],
|
|
|
|
|
// menubar: false,
|
|
|
|
|
// toolbar: false,
|
|
|
|
|
// statusbar: false,
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function tinymce_remove() {
|
|
|
|
|
tinymce.remove('.tinymce_editor.editor_basic');
|
|
|
|
|
tinymce.remove('.tinymce_editor.editor_basic_200');
|
|
|
|
|
tinymce.remove('.tinymce_editor.editor_less_100');
|
|
|
|
|
// tinymce.remove('.tinymce_editor.editor_basic');
|
|
|
|
|
// tinymce.remove('.tinymce_editor.editor_basic_200');
|
|
|
|
|
// tinymce.remove('.tinymce_editor.editor_less_100');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$: if ($slct.event_obj) {
|
|
|
|
|
// console.log('Selected Event object changed?');
|
|
|
|
|
// console.log($slct.event_obj);
|
|
|
|
|
$: if ($idaa_slct.event_obj) {
|
|
|
|
|
console.log('Selected Event object changed?');
|
|
|
|
|
console.log($idaa_slct.event_obj);
|
|
|
|
|
|
|
|
|
|
if ($slct.event_obj == null) {
|
|
|
|
|
// $slct.event_obj = {code: null, name: null, description: null, start_datetime: null, end_datetime: null, notes: null};
|
|
|
|
|
if ($idaa_slct.event_obj == null) {
|
|
|
|
|
// $idaa_slct.event_obj = {code: null, name: null, description: null, start_datetime: null, end_datetime: null, notes: null};
|
|
|
|
|
} else {
|
|
|
|
|
disable_submit_btn = false;
|
|
|
|
|
}
|
|
|
|
|
@@ -271,12 +271,12 @@ async function handle_submit_form(event){
|
|
|
|
|
let form_data = new FormData(event.target);
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
@@ -299,7 +299,7 @@ async function handle_submit_form(event){
|
|
|
|
|
if (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['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) {
|
|
|
|
|
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);
|
|
|
|
|
address['country'] = country_data[0].english_short_name; // Assume there is only one match
|
|
|
|
|
// 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');
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
@@ -455,10 +455,10 @@ async function handle_submit_form(event){
|
|
|
|
|
|
|
|
|
|
if (!$slct.event_id) {
|
|
|
|
|
create_event_obj_promise = api.create_ae_obj_crud({
|
|
|
|
|
api_cfg: $ae_app.ae_api,
|
|
|
|
|
api_cfg: $ae_api,
|
|
|
|
|
obj_type: 'event',
|
|
|
|
|
fields: event_data,
|
|
|
|
|
key: $ae_app.ae_api.api_crud_super_key,
|
|
|
|
|
key: $ae_api.api_crud_super_key,
|
|
|
|
|
log_lvl: 2
|
|
|
|
|
})
|
|
|
|
|
.then(function (event_obj_create_result) {
|
|
|
|
|
@@ -489,11 +489,11 @@ async function handle_submit_form(event){
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
update_event_obj_promise = api.update_ae_obj_id_crud({
|
|
|
|
|
api_cfg: $ae_app.ae_api,
|
|
|
|
|
api_cfg: $ae_api,
|
|
|
|
|
obj_type: 'event',
|
|
|
|
|
obj_id: $slct.event_id,
|
|
|
|
|
fields: event_data,
|
|
|
|
|
key: $ae_app.ae_api.api_crud_super_key,
|
|
|
|
|
key: $ae_api.api_crud_super_key,
|
|
|
|
|
log_lvl: 1
|
|
|
|
|
})
|
|
|
|
|
.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() ***');
|
|
|
|
|
|
|
|
|
|
delete_event_obj_promise = api.delete_ae_obj_id_crud({
|
|
|
|
|
api_cfg: $ae_app.ae_api,
|
|
|
|
|
api_cfg: $ae_api,
|
|
|
|
|
obj_type: 'event',
|
|
|
|
|
obj_id: event_id,
|
|
|
|
|
method: method,
|
|
|
|
|
// params: params,
|
|
|
|
|
key: $ae_app.ae_api.api_crud_super_key,
|
|
|
|
|
key: $ae_api.api_crud_super_key,
|
|
|
|
|
log_lvl: 0
|
|
|
|
|
})
|
|
|
|
|
.then(function (event_obj_delete_result) {
|
|
|
|
|
@@ -592,9 +592,9 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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}
|
|
|
|
|
bind:clientHeight={$ae_app.iframe_height_modal_body}
|
|
|
|
|
bind:clientHeight={$ae_loc.iframe_height_modal_body}
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<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 -->
|
|
|
|
|
|
|
|
|
|
<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 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>Type of Recovery Meeting
|
|
|
|
|
<!-- <input name="type" value={$slct.event_obj.type} /> -->
|
|
|
|
|
<select name="type">
|
|
|
|
|
<option value="IDAA" selected={($slct.event_obj.type == 'IDAA' ? 'selected' : '')}>IDAA</option>
|
|
|
|
|
<option value="Caduceus" selected={($slct.event_obj.type == 'Caduceus' ? 'selected' : '')}>Caduceus</option>
|
|
|
|
|
<option value="Family Recovery" selected={($slct.event_obj.type == 'Family Recovery' ? 'selected' : '')}>Family Recovery</option>
|
|
|
|
|
<!-- <input name="type" value={$lq__event_obj.type} /> -->
|
|
|
|
|
<select name="type" class="select">
|
|
|
|
|
<option value="IDAA" selected={($lq__event_obj?.type == 'IDAA' ? 'selected' : '')}>IDAA</option>
|
|
|
|
|
<option value="Caduceus" selected={($lq__event_obj?.type == 'Caduceus' ? 'selected' : '')}>Caduceus</option>
|
|
|
|
|
<option value="Family Recovery" selected={($lq__event_obj?.type == 'Family Recovery' ? 'selected' : '')}>Family Recovery</option>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
@@ -655,7 +655,8 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="physical"
|
|
|
|
|
id="physical"
|
|
|
|
|
bind:checked={$slct.event_obj.physical}
|
|
|
|
|
bind:checked={$idaa_slct.event_obj.physical}
|
|
|
|
|
class="checkbox"
|
|
|
|
|
>
|
|
|
|
|
</label>
|
|
|
|
|
<label for="virtual" class="">Virtual/Online
|
|
|
|
|
@@ -663,7 +664,8 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="virtual"
|
|
|
|
|
id="virtual"
|
|
|
|
|
bind:checked={$slct.event_obj.virtual}
|
|
|
|
|
bind:checked={$idaa_slct.event_obj.virtual}
|
|
|
|
|
class="checkbox"
|
|
|
|
|
>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -672,26 +674,26 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
<fieldset
|
|
|
|
|
id="physical_address"
|
|
|
|
|
class="physical_address"
|
|
|
|
|
class:ae_d_none={!$slct.event_obj.physical}>
|
|
|
|
|
class:ae_d_none={!$lq__event_obj?.physical}>
|
|
|
|
|
|
|
|
|
|
<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
|
|
|
|
|
<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 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 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 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>
|
|
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
@@ -701,73 +703,73 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
class="physical_city_state_province_postal_code_country">
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
{#if $ae_app.lu_country_subdivision_list}
|
|
|
|
|
{#if $ae_loc.lu_country_subdivision_list}
|
|
|
|
|
<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>
|
|
|
|
|
{#each $ae_app.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>
|
|
|
|
|
{#each $ae_loc.lu_country_subdivision_list as lu_country_subdivision}
|
|
|
|
|
<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}
|
|
|
|
|
</select>
|
|
|
|
|
</label>
|
|
|
|
|
{:else}
|
|
|
|
|
<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>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
{#if $ae_app.lu_country_list}
|
|
|
|
|
{#if $ae_loc.lu_country_list}
|
|
|
|
|
<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>
|
|
|
|
|
{#each $ae_app.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>
|
|
|
|
|
{#each $ae_loc.lu_country_list as lu_country}
|
|
|
|
|
<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}
|
|
|
|
|
</select>
|
|
|
|
|
</label>
|
|
|
|
|
{:else}
|
|
|
|
|
<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>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
<fieldset
|
|
|
|
|
id="virtual"
|
|
|
|
|
class="virtual"
|
|
|
|
|
class:ae_d_none={!$slct.event_obj.virtual}>
|
|
|
|
|
class:ae_d_none={!$lq__event_obj?.virtual}>
|
|
|
|
|
<legend>Virtual/Online</legend>
|
|
|
|
|
|
|
|
|
|
<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 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 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 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>
|
|
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
</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
|
|
|
|
|
<input
|
|
|
|
|
type="radio"
|
|
|
|
|
class=""
|
|
|
|
|
class="radio"
|
|
|
|
|
id="recurring_no"
|
|
|
|
|
name="recurring"
|
|
|
|
|
value={false}
|
|
|
|
|
bind:group={$slct.event_obj.recurring}
|
|
|
|
|
bind:group={$idaa_slct.event_obj.recurring}
|
|
|
|
|
required
|
|
|
|
|
>
|
|
|
|
|
</label>
|
|
|
|
|
<label for="recurring_yes" class="">Yes, repeats
|
|
|
|
|
<input
|
|
|
|
|
type="radio"
|
|
|
|
|
class=""
|
|
|
|
|
class="radio"
|
|
|
|
|
id="recurring_yes"
|
|
|
|
|
name="recurring"
|
|
|
|
|
value={true}
|
|
|
|
|
bind:group={$slct.event_obj.recurring}
|
|
|
|
|
bind:group={$idaa_slct.event_obj.recurring}
|
|
|
|
|
required
|
|
|
|
|
>
|
|
|
|
|
</label>
|
|
|
|
|
@@ -808,91 +810,91 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
<fieldset
|
|
|
|
|
id="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>
|
|
|
|
|
<label for="recurring_pattern">Repeats
|
|
|
|
|
<select class="" name="recurring_pattern" id="recurring_pattern">
|
|
|
|
|
<option value="weekly" selected={($slct.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="monthly" selected={($slct.event_obj.recurring_pattern == 'monthly' ? 'selected' : '')}>Monthly</option>
|
|
|
|
|
<option value="other" selected={($slct.event_obj.recurring_pattern == 'other' ? 'selected' : '')}>Other</option>
|
|
|
|
|
<select class="select" name="recurring_pattern" id="recurring_pattern">
|
|
|
|
|
<option value="weekly" selected={($lq__event_obj?.recurring_pattern == 'weekly' ? 'selected' : '')}>Weekly</option>
|
|
|
|
|
<option value="every other week" selected={($lq__event_obj?.recurring_pattern == 'every other week' ? 'selected' : '')}>Every Other Week</option>
|
|
|
|
|
<option value="monthly" selected={($lq__event_obj?.recurring_pattern == 'monthly' ? 'selected' : '')}>Monthly</option>
|
|
|
|
|
<option value="other" selected={($lq__event_obj?.recurring_pattern == 'other' ? 'selected' : '')}>Other</option>
|
|
|
|
|
</select>
|
|
|
|
|
</label>
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
<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_tuesday" value={$slct.event_obj.weekday_tuesday} bind:checked={($slct.event_obj.weekday_tuesday)}> 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_thursday" value={$slct.event_obj.weekday_thursday} bind:checked={($slct.event_obj.weekday_thursday)}> 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_saturday" value={$slct.event_obj.weekday_saturday} bind:checked={($slct.event_obj.weekday_saturday)}> Saturday</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={$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={$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={$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={$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={$lq__event_obj?.weekday_saturday} bind:checked={($idaa_slct.event_obj.weekday_saturday)} class="checkbox"> Saturday</label>
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
|
|
<fieldset class="flex_row flex_gap_md flex_justify_around">
|
|
|
|
|
<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>
|
|
|
|
|
{#each $ae_app.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>
|
|
|
|
|
{#each $ae_loc?.lu_time_zone_list as lu_timezone}
|
|
|
|
|
<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}
|
|
|
|
|
</select>
|
|
|
|
|
{: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}
|
|
|
|
|
<!-- client TZ: {$ae_app.current_timezone} -->
|
|
|
|
|
<!-- client TZ: {$ae_loc?.current_timezone} -->
|
|
|
|
|
</label>
|
|
|
|
|
<label>Start Time <input name="recurring_start_time" type="time" value={$slct.event_obj.recurring_start_time} max="8" /></label>
|
|
|
|
|
<label>End Time <input name="recurring_end_time" type="time" value={$slct.event_obj.recurring_end_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={$lq__event_obj?.recurring_end_time} max="8" class="input" /></label>
|
|
|
|
|
</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>
|
|
|
|
|
<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>
|
|
|
|
|
{/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
|
|
|
|
|
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=""
|
|
|
|
|
on:click|preventDefault={() => {
|
|
|
|
|
if (confirm('Are you sure you want to remove the text for the additional details?')) {
|
|
|
|
|
tinyMCE.get('recurring_text').setContent('');
|
|
|
|
|
$slct.event_obj.recurring_text = '';
|
|
|
|
|
$slct.event_obj.show_recurring_text = false;
|
|
|
|
|
// tinyMCE.get('recurring_text').setContent('');
|
|
|
|
|
$idaa_slct.event_obj.recurring_text = '';
|
|
|
|
|
$idaa_slct.event_obj.show_recurring_text = false;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span class="fas fa-minus"></span> Remove Details?
|
|
|
|
|
<span class="fas fa-minus m-1"></span> Remove Details?
|
|
|
|
|
</button>
|
|
|
|
|
{:else}
|
|
|
|
|
<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=""
|
|
|
|
|
on:click|preventDefault={() => {
|
|
|
|
|
// Remove *gen* prefix from recurring_text
|
|
|
|
|
if ($slct.event_obj.recurring_text && $slct.event_obj.recurring_text.includes('*gen*')) {
|
|
|
|
|
$slct.event_obj.recurring_text = $slct.event_obj.recurring_text.replace('*gen* ', '');
|
|
|
|
|
if ($lq__event_obj.recurring_text && $lq__event_obj.recurring_text.includes('*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>
|
|
|
|
|
{/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
|
|
|
|
|
<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>
|
|
|
|
|
{/if} -->
|
|
|
|
|
</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">
|
|
|
|
|
<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
|
|
|
|
|
{#if !$ae_app.trusted_access}
|
|
|
|
|
{#if !$ae_loc.trusted_access}
|
|
|
|
|
<span class="fas fa-lock" title="Field is locked"></span>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
id="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}
|
|
|
|
|
class="ae_width_lg"
|
|
|
|
|
class="ae_width_lg input"
|
|
|
|
|
>
|
|
|
|
|
{: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>
|
|
|
|
|
@@ -921,9 +923,9 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
type="text"
|
|
|
|
|
id="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}
|
|
|
|
|
class="ae_width_lg"
|
|
|
|
|
class="ae_width_lg input"
|
|
|
|
|
>
|
|
|
|
|
{/if}
|
|
|
|
|
</label>
|
|
|
|
|
@@ -935,13 +937,13 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
|
|
|
|
|
<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"
|
|
|
|
|
on:click|preventDefault={() => {
|
|
|
|
|
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 {
|
|
|
|
|
$slct.event_obj.contact_li_json[0].unlock = false;
|
|
|
|
|
$lq__event_obj.contact_li_json[0].unlock = false;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
@@ -951,7 +953,7 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
{:else}
|
|
|
|
|
<button type="button" class="ae_btn ae_smaller ae_btn_info"
|
|
|
|
|
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>
|
|
|
|
|
@@ -960,50 +962,50 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
{:else}
|
|
|
|
|
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
|
|
|
|
{/if}
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
class=""
|
|
|
|
|
class="input"
|
|
|
|
|
id="contact_1_full_name" name="contact_1_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"
|
|
|
|
|
readonly={!($ae_app.trusted_access || $slct.event_obj.contact_li_json[0].unlock)}
|
|
|
|
|
required={!$ae_app.trusted_access}
|
|
|
|
|
readonly={!($ae_loc.trusted_access || $lq__event_obj?.contact_li_json[0].unlock)}
|
|
|
|
|
required={!$ae_loc.trusted_access}
|
|
|
|
|
>
|
|
|
|
|
</label>
|
|
|
|
|
<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>
|
|
|
|
|
{:else}
|
|
|
|
|
<span class="fas fa-unlock" title="Field is unlocked"></span>
|
|
|
|
|
{/if}
|
|
|
|
|
<input
|
|
|
|
|
type="email"
|
|
|
|
|
class=""
|
|
|
|
|
class="input"
|
|
|
|
|
id="contact_1_email"
|
|
|
|
|
name="contact_1_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"
|
|
|
|
|
readonly={!($ae_app.trusted_access || $slct.event_obj.contact_li_json[0].unlock)}
|
|
|
|
|
required={!$ae_app.trusted_access}
|
|
|
|
|
readonly={!($ae_loc.trusted_access || $lq__event_obj?.contact_li_json[0].unlock)}
|
|
|
|
|
required={!$ae_loc.trusted_access}
|
|
|
|
|
>
|
|
|
|
|
</label>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="ae_group">
|
|
|
|
|
<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 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 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>
|
|
|
|
|
</span>
|
|
|
|
|
</fieldset>
|
|
|
|
|
@@ -1012,21 +1014,21 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
<legend>Contact 2</legend>
|
|
|
|
|
<span class="ae_group">
|
|
|
|
|
<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 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>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="ae_group">
|
|
|
|
|
<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 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 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>
|
|
|
|
|
</span>
|
|
|
|
|
</fieldset>
|
|
|
|
|
@@ -1038,7 +1040,16 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
|
|
|
|
|
<h3>
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
<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"
|
|
|
|
|
name="hide"
|
|
|
|
|
id="hide"
|
|
|
|
|
bind:checked={$slct.event_obj.hide}
|
|
|
|
|
bind:checked={$idaa_slct.event_obj.hide}
|
|
|
|
|
class="checkbox"
|
|
|
|
|
>
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
@@ -1056,28 +1068,30 @@ async function handle_delete_event_obj({event_id, method='disable'}) {
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="priority"
|
|
|
|
|
id="priority"
|
|
|
|
|
bind:checked={$slct.event_obj.priority}
|
|
|
|
|
bind:checked={$idaa_slct.event_obj.priority}
|
|
|
|
|
class="checkbox"
|
|
|
|
|
>
|
|
|
|
|
</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
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
name="enable"
|
|
|
|
|
id="enable"
|
|
|
|
|
bind:checked={$slct.event_obj.enable}
|
|
|
|
|
bind:checked={$idaa_slct.event_obj.enable}
|
|
|
|
|
class="checkbox"
|
|
|
|
|
>
|
|
|
|
|
</label>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{#if $ae_app.trusted_access}
|
|
|
|
|
{#if $ae_loc.trusted_access}
|
|
|
|
|
<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>
|
|
|
|
|
{/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 -->
|
|
|
|
|
{#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}
|
|
|
|
|
<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 $slct.event_id}
|
|
|
|
|
{#if $ae_app.administrator_access}
|
|
|
|
|
{#if $ae_loc.administrator_access}
|
|
|
|
|
<button
|
|
|
|
|
on:click={() => {
|
|
|
|
|
if (!confirm('Are you sure you want to delete this event?')) {return false;}
|
|
|
|
|
handle_delete_event_obj({event_id: $slct.event_id, method: 'delete'});
|
|
|
|
|
|
|
|
|
|
$slct.event_id = null;
|
|
|
|
|
$slct.event_obj = {};
|
|
|
|
|
$lq__event_obj = {};
|
|
|
|
|
}}
|
|
|
|
|
class="ae_btn ae_smallest btn btn-danger" type="button"
|
|
|
|
|
title="Delete record permanently"
|
|
|
|
|
>
|
|
|
|
|
<span class="fas fa-minus"></span> Delete
|
|
|
|
|
</button>
|
|
|
|
|
{:else if $ae_app.trusted_access}
|
|
|
|
|
{:else if $ae_loc.trusted_access}
|
|
|
|
|
<button
|
|
|
|
|
on:click={() => {
|
|
|
|
|
if (!confirm('Are you sure you want to disable this event?')) {return false;}
|
|
|
|
|
handle_delete_event_obj({event_id: $slct.event_id, method: 'disable'});
|
|
|
|
|
|
|
|
|
|
$slct.event_id = null;
|
|
|
|
|
$slct.event_obj = {};
|
|
|
|
|
$lq__event_obj = {};
|
|
|
|
|
}}
|
|
|
|
|
class="ae_btn ae_smallest btn btn-danger" type="button"
|
|
|
|
|
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'});
|
|
|
|
|
|
|
|
|
|
$slct.event_id = null;
|
|
|
|
|
$slct.event_obj = {};
|
|
|
|
|
$lq__event_obj = {};
|
|
|
|
|
}}
|
|
|
|
|
class="ae_btn ae_smallest btn btn-danger" type="button"
|
|
|
|
|
title="Hide record to delete"
|