Refactor event scheduling to separate date and time inputs

- Split `from` and `to` fields in courses into `fromDate`, `fromTime`, `toDate`, and `toTime` for improved flexibility.
- Refactored meetups to use `startDate` and `startTime` instead of `start`.
- Enhanced validation to handle new date and time fields.
- Applied user-specific timezone conversions for event dates and times.
- Updated views to utilize new date and time pickers for consistent scheduling.
This commit is contained in:
HolgerHatGarKeineNode
2025-11-23 19:36:34 +01:00
parent ca9cd9b875
commit c48455a6be
3 changed files with 145 additions and 43 deletions

View File

@@ -100,8 +100,15 @@ class extends Component {
public function with(): array
{
return [
'cities' => City::query()->orderBy('name')->get(),
'countries' => Country::query()->orderBy('countries.name')->get(),
'cities' => City::query()
->with([
'country',
])
->orderBy('name')
->get(),
'countries' => Country::query()
->orderBy('countries.name')
->get(),
];
}
}; ?>
@@ -120,20 +127,20 @@ class extends Component {
<flux:file-upload wire:model="logo">
<!-- Custom logo uploader -->
<div class="
relative flex items-center justify-center size-20 rounded-full transition-colors cursor-pointer
relative flex items-center justify-center size-20 rounded transition-colors cursor-pointer
border border-zinc-200 dark:border-white/10 hover:border-zinc-300 dark:hover:border-white/10
bg-zinc-100 hover:bg-zinc-200 dark:bg-white/10 hover:dark:bg-white/15 in-data-dragging:dark:bg-white/15
">
@if($logo)
<img src="{{ $logo?->temporaryUrl() }}" alt="Logo"
class="size-full object-cover rounded-full"/>
class="size-full object-cover rounded"/>
@else
<!-- Show the default icon if no file is uploaded -->
<flux:icon name="user-group" variant="solid" class="text-zinc-500 dark:text-zinc-400"/>
@endif
<!-- Corner upload icon -->
<div class="absolute bottom-0 right-0 bg-white dark:bg-zinc-800 rounded-full">
<div class="absolute bottom-0 right-0 bg-white dark:bg-zinc-800 rounded">
<flux:icon name="arrow-up-circle" variant="solid" class="text-zinc-500 dark:text-zinc-400"/>
</div>
</div>