mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-13 23:56:47 +00:00
✨ Improve conditional rendering and authentication logic in views
- Updated multiple views to conditionally render actions based on authentication state for a better user experience. - Added login links where actions require authentication.
This commit is contained in:
@@ -86,13 +86,15 @@ class extends Component {
|
||||
</flux:table.cell>
|
||||
<flux:table.cell>
|
||||
<div class="flex gap-2">
|
||||
@auth
|
||||
@if(auth()->check())
|
||||
<flux:button size="xs"
|
||||
:href="route('cities.edit',['city' => $city, 'country' => $country])"
|
||||
icon="pencil">
|
||||
{{ __('Edit') }}
|
||||
</flux:button>
|
||||
@endauth
|
||||
@elseif(!auth()->check())
|
||||
<flux:link :href="route('login')">{{ __('Log in') }}</flux:link>
|
||||
@endif
|
||||
</div>
|
||||
</flux:table.cell>
|
||||
</flux:table.row>
|
||||
|
||||
@@ -3,30 +3,36 @@
|
||||
use Livewire\Volt\Component;
|
||||
|
||||
new class extends Component {
|
||||
public $currentRoute = '';
|
||||
public $country = 'de';
|
||||
public $currentRouteName;
|
||||
public $currentRouteParams;
|
||||
public string $currentCountry = 'de';
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->currentRoute = request()->route()->getName();
|
||||
$this->country = request()->route('country');
|
||||
$this->currentCountry = request()->route('country', 'de');
|
||||
$this->currentRouteName = request()->route()->getName();
|
||||
$this->currentRouteParams = request()->route()->parameters();
|
||||
}
|
||||
|
||||
public function updatedCountry()
|
||||
public function updatedCurrentCountry()
|
||||
{
|
||||
$this->redirectRoute($this->currentRoute, ['country' => $this->country]);
|
||||
$this->currentRouteParams['country'] = $this->currentCountry;
|
||||
$this->redirectRoute($this->currentRouteName, $this->currentRouteParams);
|
||||
}
|
||||
}; ?>
|
||||
|
||||
<div>
|
||||
<flux:select variant="listbox" searchable placeholder="{{ __('Wähle dein Land...') }}" wire:model.live.debounce="country">
|
||||
<flux:select variant="listbox" searchable placeholder="{{ __('Wähle dein Land...') }}"
|
||||
wire:model.live.debounce="currentCountry">
|
||||
<x-slot name="search">
|
||||
<flux:select.search class="px-4" placeholder="{{ __('Suche dein Land...') }}"/>
|
||||
</x-slot>
|
||||
@foreach(\WW\Countries\Models\Country::all() as $country)
|
||||
<flux:select.option value="{{ str($country->iso_code)->lower() }}">
|
||||
<div class="flex items-center space-x-2">
|
||||
<img alt="{{ str($country->iso_code)->lower() }}" src="{{ asset('vendor/blade-flags/country-'.str($country->iso_code)->lower().'.svg') }}" width="24" height="12"/>
|
||||
<img alt="{{ str($country->iso_code)->lower() }}"
|
||||
src="{{ asset('vendor/blade-flags/country-'.str($country->iso_code)->lower().'.svg') }}"
|
||||
width="24" height="12"/>
|
||||
<span>{{ $country->name }}</span>
|
||||
</div>
|
||||
</flux:select.option>
|
||||
|
||||
@@ -115,26 +115,30 @@ class extends Component {
|
||||
|
||||
<flux:table.cell>
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div>
|
||||
<flux:button
|
||||
:disabled="$course->created_by !== auth()->id()"
|
||||
:href="$course->created_by === auth()->id() ? route_with_country('courses.edit', ['course' => $course]) : null"
|
||||
size="xs"
|
||||
variant="filled"
|
||||
icon="pencil">
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
<div>
|
||||
<flux:button
|
||||
:disabled="$course->created_by !== auth()->id()"
|
||||
:href="$course->created_by === auth()->id() ? route_with_country('courses.events.create', ['course' => $course]) : null"
|
||||
size="xs"
|
||||
variant="filled"
|
||||
icon="calendar">
|
||||
{{ __('Neues Event erstellen') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
@if(auth()->check() && $course->created_by === auth()->id())
|
||||
<div>
|
||||
<flux:button
|
||||
:disabled="$course->created_by !== auth()->id()"
|
||||
:href="$course->created_by === auth()->id() ? route_with_country('courses.edit', ['course' => $course]) : null"
|
||||
size="xs"
|
||||
variant="filled"
|
||||
icon="pencil">
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
<div>
|
||||
<flux:button
|
||||
:disabled="$course->created_by !== auth()->id()"
|
||||
:href="$course->created_by === auth()->id() ? route_with_country('courses.events.create', ['course' => $course]) : null"
|
||||
size="xs"
|
||||
variant="filled"
|
||||
icon="calendar">
|
||||
{{ __('Neues Event erstellen') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
@elseif(!auth()->check())
|
||||
<flux:link :href="route('login')">{{ __('Log in') }}</flux:link>
|
||||
@endif
|
||||
</div>
|
||||
</flux:table.cell>
|
||||
</flux:table.row>
|
||||
|
||||
@@ -154,7 +154,7 @@ class extends Component {
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex flex-col sm:flex-row items-start gap-2">
|
||||
<flux:button :href="route_with_country('meetups.edit', ['meetup' => $meetup])"
|
||||
size="xs" variant="ghost" icon="pencil">
|
||||
{{ __('Bearbeiten') }}
|
||||
|
||||
@@ -139,14 +139,18 @@ class extends Component {
|
||||
</flux:table.cell>
|
||||
|
||||
<flux:table.cell>
|
||||
<flux:button
|
||||
:disabled="$lecturer->created_by !== auth()->id()"
|
||||
:href="$lecturer->created_by === auth()->id() ? route_with_country('lecturers.edit', ['lecturer' => $lecturer]) : null"
|
||||
size="xs"
|
||||
variant="filled"
|
||||
icon="pencil">
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
@if(auth()->check() && $lecturer->created_by === auth()->id())
|
||||
<flux:button
|
||||
:disabled="$lecturer->created_by !== auth()->id()"
|
||||
:href="$lecturer->created_by === auth()->id() ? route_with_country('lecturers.edit', ['lecturer' => $lecturer]) : null"
|
||||
size="xs"
|
||||
variant="filled"
|
||||
icon="pencil">
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
@elseif(!auth()->check())
|
||||
<flux:link :href="route('login')">{{ __('Log in') }}</flux:link>
|
||||
@endif
|
||||
</flux:table.cell>
|
||||
</flux:table.row>
|
||||
@endforeach
|
||||
|
||||
@@ -161,21 +161,26 @@ class extends Component {
|
||||
|
||||
<flux:table.cell>
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div>
|
||||
<flux:button
|
||||
:disabled="!$meetup->belongsToMe"
|
||||
:href="$meetup->belongsToMe ? route_with_country('meetups.edit', ['meetup' => $meetup]) : null"
|
||||
size="xs"
|
||||
variant="filled" icon="pencil">
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
<div>
|
||||
<flux:button :href="route_with_country('meetups.events.create', ['meetup' => $meetup])"
|
||||
size="xs" variant="filled" icon="calendar">
|
||||
{{ __('Neues Event erstellen') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
@if(auth()->check() && $meetup->belongsToMe)
|
||||
<div>
|
||||
<flux:button
|
||||
:disabled="!$meetup->belongsToMe"
|
||||
:href="$meetup->belongsToMe ? route_with_country('meetups.edit', ['meetup' => $meetup]) : null"
|
||||
size="xs"
|
||||
variant="filled" icon="pencil">
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
<div>
|
||||
<flux:button
|
||||
:href="route_with_country('meetups.events.create', ['meetup' => $meetup])"
|
||||
size="xs" variant="filled" icon="calendar">
|
||||
{{ __('Neues Event erstellen') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
@elseif(!auth()->check())
|
||||
<flux:link :href="route('login')">{{ __('Log in') }}</flux:link>
|
||||
@endif
|
||||
</div>
|
||||
</flux:table.cell>
|
||||
</flux:table.row>
|
||||
|
||||
@@ -157,164 +157,184 @@ class extends Component {
|
||||
</flux:text>
|
||||
</div>
|
||||
|
||||
<!-- Event Details -->
|
||||
<flux:card class="max-w-3xl">
|
||||
<flux:heading size="xl" class="mb-4">
|
||||
<flux:icon.calendar class="inline w-6 h-6 mr-2"/>
|
||||
{{ $event->start->format('d.m.Y') }}
|
||||
</flux:heading>
|
||||
|
||||
<div class="space-y-4">
|
||||
<!-- Date and Time -->
|
||||
<div class="flex items-center text-zinc-700 dark:text-zinc-300">
|
||||
<flux:icon.clock class="w-5 h-5 mr-3"/>
|
||||
<div>
|
||||
<div class="font-semibold">{{ $event->start->format('H:i') }} Uhr</div>
|
||||
<div
|
||||
class="text-sm text-zinc-600 dark:text-zinc-400">{{ $event->start->isoFormat('dddd, D. MMMM YYYY') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
@if($event->location)
|
||||
<div class="flex items-center text-zinc-700 dark:text-zinc-300">
|
||||
<flux:icon.map-pin class="w-5 h-5 mr-3"/>
|
||||
<div>
|
||||
<div class="font-semibold">{{ __('Ort') }}</div>
|
||||
<div class="text-sm">{{ $event->location }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Description -->
|
||||
@if($event->description)
|
||||
<div class="pt-4 border-t border-zinc-200 dark:border-zinc-700">
|
||||
<flux:heading size="lg" class="mb-2">{{ __('Beschreibung') }}</flux:heading>
|
||||
<flux:text class="whitespace-pre-wrap">{{ $event->description }}</flux:text>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Link -->
|
||||
@if($event->link)
|
||||
<div class="pt-4">
|
||||
<flux:button href="{{ $event->link }}" target="_blank" variant="primary">
|
||||
<flux:icon.arrow-top-right-on-square class="w-5 h-5 mr-2"/>
|
||||
{{ __('Mehr Informationen') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- RSVP Section -->
|
||||
<div class="pt-4 border-t border-zinc-200 dark:border-zinc-700">
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Teilnahme') }}</flux:heading>
|
||||
<div class="flex flex-col md:flex-row gap-8">
|
||||
<div class="md:w-2/3">
|
||||
<!-- Event Details -->
|
||||
<flux:card class="max-w-3xl">
|
||||
<flux:heading size="xl" class="mb-4">
|
||||
<flux:icon.calendar class="inline w-6 h-6 mr-2"/>
|
||||
{{ $event->start->format('d.m.Y') }}
|
||||
</flux:heading>
|
||||
|
||||
<div class="space-y-4">
|
||||
<!-- Date and Time -->
|
||||
<div class="flex items-center text-zinc-700 dark:text-zinc-300">
|
||||
<flux:icon.clock class="w-5 h-5 mr-3"/>
|
||||
<div>
|
||||
<div class="font-semibold">{{ $event->start->format('H:i') }} Uhr</div>
|
||||
<div
|
||||
class="text-sm text-zinc-600 dark:text-zinc-400">{{ $event->start->isoFormat('dddd, D. MMMM YYYY') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(!auth()->check())
|
||||
<flux:callout variant="warning" icon="exclamation-triangle" inline>
|
||||
<flux:callout.heading>{{ __('Du bist nicht eingloggt und musst deshalb den Namen selbst eintippen.') }}</flux:callout.heading>
|
||||
<x-slot name="actions">
|
||||
<flux:button :href="route('login')">{{ __('Log in') }}</flux:button>
|
||||
</x-slot>
|
||||
</flux:callout>
|
||||
<!-- Location -->
|
||||
@if($event->location)
|
||||
<div class="flex items-center text-zinc-700 dark:text-zinc-300">
|
||||
<flux:icon.map-pin class="w-5 h-5 mr-3"/>
|
||||
<div>
|
||||
<div class="font-semibold">{{ __('Ort') }}</div>
|
||||
<div class="text-sm">{{ $event->location }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Name Input -->
|
||||
<flux:field>
|
||||
<flux:label>{{ __('Dein Name') }}</flux:label>
|
||||
<flux:input wire:model="name" type="text" placeholder="{{ __('Name eingeben') }}"/>
|
||||
@error('name')
|
||||
<flux:error>{{ $message }}</flux:error>
|
||||
@enderror
|
||||
</flux:field>
|
||||
<!-- Description -->
|
||||
@if($event->description)
|
||||
<div class="pt-4 border-t border-zinc-200 dark:border-zinc-700">
|
||||
<flux:heading size="lg" class="mb-2">{{ __('Beschreibung') }}</flux:heading>
|
||||
<flux:text class="whitespace-pre-wrap">{{ $event->description }}</flux:text>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<flux:button
|
||||
class="cursor-pointer"
|
||||
icon="check"
|
||||
wire:click="attend"
|
||||
variant="{{ $willShowUp ? 'primary' : 'outline' }}"
|
||||
>
|
||||
{{ __('Ich komme') }}
|
||||
</flux:button>
|
||||
|
||||
<flux:button
|
||||
class="cursor-pointer"
|
||||
icon="question-mark-circle"
|
||||
wire:click="mightAttend"
|
||||
variant="{{ $perhapsShowUp ? 'primary' : 'outline' }}"
|
||||
>
|
||||
{{ __('Vielleicht') }}
|
||||
</flux:button>
|
||||
|
||||
@if($willShowUp || $perhapsShowUp)
|
||||
<flux:button
|
||||
class="cursor-pointer"
|
||||
icon="x-mark"
|
||||
wire:click="cannotCome"
|
||||
variant="ghost"
|
||||
>
|
||||
{{ __('Absagen') }}
|
||||
<!-- Link -->
|
||||
@if($event->link)
|
||||
<div class="pt-4">
|
||||
<flux:button href="{{ $event->link }}" target="_blank" variant="primary">
|
||||
<flux:icon.arrow-top-right-on-square class="w-5 h-5 mr-2"/>
|
||||
{{ __('Mehr Informationen') }}
|
||||
</flux:button>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- RSVP Section -->
|
||||
<div class="pt-4 border-t border-zinc-200 dark:border-zinc-700">
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Teilnahme') }}</flux:heading>
|
||||
|
||||
<div class="space-y-4">
|
||||
|
||||
@if(!auth()->check())
|
||||
<flux:callout variant="warning" icon="exclamation-triangle" inline>
|
||||
<flux:callout.heading>{{ __('Du bist nicht eingloggt und musst deshalb den Namen selbst eintippen.') }}</flux:callout.heading>
|
||||
<x-slot name="actions">
|
||||
<flux:button :href="route('login')">{{ __('Log in') }}</flux:button>
|
||||
</x-slot>
|
||||
</flux:callout>
|
||||
@endif
|
||||
|
||||
<!-- Name Input -->
|
||||
<flux:field>
|
||||
<flux:label>{{ __('Dein Name') }}</flux:label>
|
||||
<flux:input wire:model="name" type="text" placeholder="{{ __('Name eingeben') }}"/>
|
||||
@error('name')
|
||||
<flux:error>{{ $message }}</flux:error>
|
||||
@enderror
|
||||
</flux:field>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<flux:button
|
||||
class="cursor-pointer"
|
||||
icon="check"
|
||||
wire:click="attend"
|
||||
variant="{{ $willShowUp ? 'primary' : 'outline' }}"
|
||||
>
|
||||
{{ __('Ich komme') }}
|
||||
</flux:button>
|
||||
|
||||
<flux:button
|
||||
class="cursor-pointer"
|
||||
icon="question-mark-circle"
|
||||
wire:click="mightAttend"
|
||||
variant="{{ $perhapsShowUp ? 'primary' : 'outline' }}"
|
||||
>
|
||||
{{ __('Vielleicht') }}
|
||||
</flux:button>
|
||||
|
||||
@if($willShowUp || $perhapsShowUp)
|
||||
<flux:button
|
||||
class="cursor-pointer"
|
||||
icon="x-mark"
|
||||
wire:click="cannotCome"
|
||||
variant="ghost"
|
||||
>
|
||||
{{ __('Absagen') }}
|
||||
</flux:button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Attendees -->
|
||||
@if(count($attendees) > 0)
|
||||
<div class="pt-4 border-t border-zinc-200 dark:border-zinc-700">
|
||||
<flux:heading size="lg" class="mb-2">
|
||||
{{ __('Zusagen') }} ({{ count($attendees) }})
|
||||
</flux:heading>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach($attendees as $attendee)
|
||||
@if($attendee['user'])
|
||||
<div
|
||||
class="flex items-center gap-2 px-3 py-1.5 bg-zinc-100 dark:bg-zinc-800 rounded-full">
|
||||
<flux:avatar size="xs" :src="$attendee['user']['profile_photo_url']"/>
|
||||
<span class="text-sm">{{ $attendee['name'] }}</span>
|
||||
</div>
|
||||
@else
|
||||
<flux:badge>{{ $attendee['name'] }}</flux:badge>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Might Attend -->
|
||||
@if(count($mightAttendees) > 0)
|
||||
<div class="pt-4 border-t border-zinc-200 dark:border-zinc-700">
|
||||
<flux:heading size="lg" class="mb-2">
|
||||
{{ __('Vielleicht') }} ({{ count($mightAttendees) }})
|
||||
</flux:heading>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach($mightAttendees as $attendee)
|
||||
@if($attendee['user'])
|
||||
<div
|
||||
class="flex items-center gap-2 px-3 py-1.5 bg-zinc-100 dark:bg-zinc-800 rounded-full">
|
||||
<flux:avatar size="xs" :src="$attendee['user']['profile_photo_url']"/>
|
||||
<span class="text-sm">{{ $attendee['name'] }}</span>
|
||||
</div>
|
||||
@else
|
||||
<flux:badge variant="outline">{{ $attendee['name'] }}</flux:badge>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</flux:card>
|
||||
|
||||
<!-- Back Button -->
|
||||
<div class="mt-6">
|
||||
<flux:button
|
||||
href="{{ route('meetups.landingpage', ['meetup' => $event->meetup->slug, 'country' => $country]) }}"
|
||||
variant="ghost">
|
||||
<flux:icon.arrow-left class="w-5 h-5 mr-2"/>
|
||||
{{ __('Zurück zum Meetup') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="md:w-1/3">
|
||||
<div class="flex flex-col sm:flex-row items-center space-x-0 sm:space-x-4 space-y-4 sm:space-y-0 mb-8">
|
||||
<flux:avatar class="[:where(&)]:size-32 [:where(&)]:text-base" size="xl"
|
||||
src="{{ $event->meetup->getFirstMediaUrl('logo') }}"/>
|
||||
<div class="space-y-2">
|
||||
<flux:heading size="xl" class="mb-4">{{ $event->meetup->name }}</flux:heading>
|
||||
<flux:subheading class="text-gray-600 dark:text-gray-400">
|
||||
{{ $event->meetup->city->name }}, {{ $event->meetup->city->country->name }}
|
||||
</flux:subheading>
|
||||
<flux:button class="cursor-pointer"
|
||||
x-copy-to-clipboard="'{{ route('ics', ['meetup' => $event->meetup]) }}'"
|
||||
icon="calendar-date-range">{{ __('Kalender-Stream-URL kopieren') }}</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Attendees -->
|
||||
@if(count($attendees) > 0)
|
||||
<div class="pt-4 border-t border-zinc-200 dark:border-zinc-700">
|
||||
<flux:heading size="lg" class="mb-2">
|
||||
{{ __('Zusagen') }} ({{ count($attendees) }})
|
||||
</flux:heading>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach($attendees as $attendee)
|
||||
@if($attendee['user'])
|
||||
<div
|
||||
class="flex items-center gap-2 px-3 py-1.5 bg-zinc-100 dark:bg-zinc-800 rounded-full">
|
||||
<flux:avatar size="xs" :src="$attendee['user']['profile_photo_url']"/>
|
||||
<span class="text-sm">{{ $attendee['name'] }}</span>
|
||||
</div>
|
||||
@else
|
||||
<flux:badge>{{ $attendee['name'] }}</flux:badge>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Might Attend -->
|
||||
@if(count($mightAttendees) > 0)
|
||||
<div class="pt-4 border-t border-zinc-200 dark:border-zinc-700">
|
||||
<flux:heading size="lg" class="mb-2">
|
||||
{{ __('Vielleicht') }} ({{ count($mightAttendees) }})
|
||||
</flux:heading>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach($mightAttendees as $attendee)
|
||||
@if($attendee['user'])
|
||||
<div
|
||||
class="flex items-center gap-2 px-3 py-1.5 bg-zinc-100 dark:bg-zinc-800 rounded-full">
|
||||
<flux:avatar size="xs" :src="$attendee['user']['profile_photo_url']"/>
|
||||
<span class="text-sm">{{ $attendee['name'] }}</span>
|
||||
</div>
|
||||
@else
|
||||
<flux:badge variant="outline">{{ $attendee['name'] }}</flux:badge>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</flux:card>
|
||||
|
||||
<!-- Back Button -->
|
||||
<div class="mt-6">
|
||||
<flux:button
|
||||
href="{{ route('meetups.landingpage', ['meetup' => $event->meetup->slug, 'country' => $country]) }}"
|
||||
variant="ghost">
|
||||
<flux:icon.arrow-left class="w-5 h-5 mr-2"/>
|
||||
{{ __('Zurück zum Meetup') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@ class extends Component {
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
<!-- Left Column: Meetup Details -->
|
||||
<div class="space-y-6">
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="flex flex-col sm:flex-row items-center space-x-0 sm:space-x-4 space-y-4 sm:space-y-0">
|
||||
<flux:avatar class="[:where(&)]:size-32 [:where(&)]:text-base" size="xl"
|
||||
src="{{ $meetup->getFirstMediaUrl('logo') }}"/>
|
||||
<div class="space-y-2">
|
||||
@@ -196,10 +196,10 @@ class extends Component {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Events Section -->
|
||||
{{-- Events Section --}}
|
||||
@if($events->isNotEmpty())
|
||||
<div class="mt-16">
|
||||
<div class="flex items-center space-x-4 mb-6">
|
||||
<div class="flex flex-col sm:flex-row items-center sm:space-x-4 space-y-4 sm:space-y-0 mb-6">
|
||||
<flux:heading size="xl">{{ __('Kommende Veranstaltungen') }}</flux:heading>
|
||||
@if(auth()->user() && auth()->user()->meetups()->find($meetup->id)?->exists)
|
||||
<flux:button :href="route_with_country('meetups.events.create', ['meetup' => $meetup])"
|
||||
|
||||
@@ -80,13 +80,15 @@ class extends Component {
|
||||
</flux:table.cell>
|
||||
<flux:table.cell>
|
||||
<div class="flex gap-2">
|
||||
@auth
|
||||
@if(auth()->check())
|
||||
<flux:button size="xs"
|
||||
:href="route('venues.edit', ['venue' => $venue, 'country' => $country])"
|
||||
icon="pencil">
|
||||
{{ __('Edit') }}
|
||||
</flux:button>
|
||||
@endauth
|
||||
@elseif(!auth()->check())
|
||||
<flux:link :href="route('login')">{{ __('Log in') }}</flux:link>
|
||||
@endif
|
||||
</div>
|
||||
</flux:table.cell>
|
||||
</flux:table.row>
|
||||
|
||||
@@ -43,6 +43,11 @@ Volt::route('welcome', 'welcome')->name('welcome');
|
||||
Route::get('stream-calendar', \App\Http\Controllers\DownloadMeetupCalendar::class)
|
||||
->name('ics');
|
||||
|
||||
Route::middleware(['auth'])
|
||||
->get('dashboard', function () {
|
||||
return redirect('/de/dashboard'); // Zu /de weiterleiten
|
||||
});
|
||||
|
||||
Route::middleware([])
|
||||
->prefix('/{country:code}')
|
||||
->group(function () {
|
||||
|
||||
Reference in New Issue
Block a user