Fixes for layout and recurring pattern.

This commit is contained in:
Scott Idem
2024-11-20 18:36:24 -05:00
parent 1d713db712
commit e4485f2bda
3 changed files with 33 additions and 19 deletions

View File

@@ -573,6 +573,7 @@ export function db_save_ae_obj_li__event(
virtual: obj.virtual,
recurring: obj.recurring,
recurring_pattern: obj.recurring_pattern,
recurring_start_time: obj.recurring_start_time,
recurring_end_time: obj.recurring_end_time,
recurring_text: obj.recurring_text,

View File

@@ -57,6 +57,7 @@ export interface Event {
virtual?: null|boolean;
recurring?: null|boolean;
recurring_pattern?: null|string;
recurring_start_time?: null|string;
recurring_end_time?: null|string;
recurring_text?: null|string;

View File

@@ -619,7 +619,7 @@ async function handle_delete_event_obj(
<div>
<label class="">
Type of Recovery Meeting
<select name="type" class="select w-40" value={$lq__event_obj?.type}>
<select name="type" class="select w-48" value={$lq__event_obj?.type}>
<option value="IDAA">IDAA</option>
<option value="Caduceus">Caduceus</option>
<option value="Family Recovery">Family Recovery</option>
@@ -854,61 +854,73 @@ async function handle_delete_event_obj(
</div>
</fieldset> -->
<!-- class:hidden={!$idaa_slct.event_obj.recurring} -->
<fieldset
id="recurring_details"
class="recurring_details"
class:hidden={!$idaa_slct.event_obj.recurring}
>
<!-- <legend class="legend">Recurring</legend> -->
<label for="recurring_pattern">Recurring Repeats
<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
class="select w-48"
name="recurring_pattern"
id="recurring_pattern"
value={$lq__event_obj?.recurring_pattern}
>
<option value={"weekly"}>Weekly</option>
<option value={"every other week"}>Every Other Week</option>
<option value={"monthly"}>Monthly</option>
<option value={"other"}>Other</option>
</select>
</label>
</fieldset>
<fieldset class="event__days_of_week">
<label>
<fieldset class="event__days_of_week flex flex-col md:flex-row flex-wrap gap-1 items-center justify-center">
<label class="label w-32">
<input type="checkbox" name="weekday_sunday" value="Sunday" bind:checked={($idaa_slct.event_obj.weekday_sunday)} class="checkbox">
Sunday
</label>
<label>
<label class="label w-32">
<input type="checkbox" name="weekday_monday" value="Monday" bind:checked={($idaa_slct.event_obj.weekday_monday)} class="checkbox">
Monday
</label>
<label>
<label class="label w-32">
<input type="checkbox" name="weekday_tuesday" value="Tuesday" bind:checked={($idaa_slct.event_obj.weekday_tuesday)} class="checkbox">
Tuesday
</label>
<label>
<label class="label w-32">
<input type="checkbox" name="weekday_wednesday" value="Wednesday" bind:checked={($idaa_slct.event_obj.weekday_wednesday)} class="checkbox">
Wednesday
</label>
<label>
<label class="label w-32">
<input type="checkbox" name="weekday_thursday" value="Thursday" bind:checked={($idaa_slct.event_obj.weekday_thursday)} class="checkbox">
Thursday
</label>
<label>
<label class="label w-32">
<input type="checkbox" name="weekday_friday" value="Friday" bind:checked={($idaa_slct.event_obj.weekday_friday)} class="checkbox">
Friday
</label>
<label>
<label class="label w-32">
<input type="checkbox" name="weekday_saturday" value="Saturday" bind:checked={($idaa_slct.event_obj.weekday_saturday)} class="checkbox">
Saturday
</label>
</fieldset>
<fieldset class="flex_row flex_gap_md flex_justify_around">
<fieldset class="flex_row flex_gap_md flex_justify_around space-y-1">
<label>Timezone
{#if $ae_loc?.lu_time_zone_list && $ae_loc?.lu_time_zone_list.length > 0}
<select name="timezone" required class="select w-56">
<option value="">-- None --</option>
<select
name="timezone"
required
value={$lq__event_obj?.timezone ?? $ae_loc?.current_timezone}
class="select w-56"
>
<option value=""
class:hidden={!$ae_loc.trusted_access}
>-- None --</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>
<option value="{lu_timezone.name}">{lu_timezone.name}</option>
{/each}
</select>
{:else}