mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
recurring meetup events
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<div class="w-full mb-4 md:w-auto md:mb-0">
|
||||
<x-button :href="route('meetup.event.form', ['country' => $country, 'meetupEvent' => null])">
|
||||
<i class="fa fa-thin fa-plus"></i>
|
||||
{{ __('Register Meetup date') }}
|
||||
</x-button>
|
||||
</div>
|
||||
16
resources/views/columns/meetup_events/manage.blade.php
Normal file
16
resources/views/columns/meetup_events/manage.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="flex flex-col space-y-1">
|
||||
<div>
|
||||
@if(auth()->user()->can('update', $row))
|
||||
<x-button
|
||||
primary
|
||||
xs
|
||||
:href="route('meetup.event.form', ['country' => $row->meetup->city->country, 'meetupEvent' => $row])"
|
||||
>
|
||||
<i class="fa fa-thin fa-edit mr-2"></i>
|
||||
{{ __('Edit') }}
|
||||
</x-button>
|
||||
@else
|
||||
<x-badge>{{ __('no authorization') }}</x-badge>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,5 +5,4 @@
|
||||
{{ $row->name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
|
||||
13
resources/views/components/input/group.blade.php
Normal file
13
resources/views/components/input/group.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
@props([
|
||||
'for',
|
||||
'label',
|
||||
])
|
||||
<div class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-700 sm:pt-5">
|
||||
<label for="{{ $for }}"
|
||||
class="block text-sm font-medium text-gray-100 sm:mt-px sm:pt-2">
|
||||
{{ $label }}
|
||||
</label>
|
||||
<div class="mt-1 sm:mt-0 sm:col-span-2">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</div>
|
||||
105
resources/views/livewire/meetup/form/meetup-event-form.blade.php
Normal file
105
resources/views/livewire/meetup/form/meetup-event-form.blade.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<div class="container p-4 mx-auto bg-21gray my-2">
|
||||
|
||||
<div class="pb-5 flex flex-row justify-between">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-200">{{ __('Meetup Event') }}</h3>
|
||||
<div>
|
||||
<x-button :href="route('meetup.table.meetupEvent', ['country' => $country])">{{ __('Back') }}</x-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="space-y-8 divide-y divide-gray-700 pb-24">
|
||||
<div class="space-y-8 divide-y divide-gray-700 sm:space-y-5">
|
||||
<div class="mt-6 sm:mt-5 space-y-6 sm:space-y-5">
|
||||
|
||||
<x-input.group :for="md5('meetup_id')" :label="__('Meetup')">
|
||||
<x-select
|
||||
autocomplete="off"
|
||||
wire:model.debounce="meetupEvent.meetup_id"
|
||||
:placeholder="__('Meetup')"
|
||||
:async-data="[
|
||||
'api' => route('api.meetup.index'),
|
||||
'method' => 'GET', // default is GET
|
||||
'params' => ['user_id' => auth()->id()], // default is []
|
||||
]"
|
||||
:template="[
|
||||
'name' => 'user-option',
|
||||
'config' => ['src' => 'profile_image']
|
||||
]"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
option-description="city.name"
|
||||
/>
|
||||
</x-input.group>
|
||||
|
||||
<x-input.group :for="md5('meetupEvent.start')" :label="__('Start')">
|
||||
<x-datetime-picker
|
||||
:clearable="false"
|
||||
time-format="24"
|
||||
timezone="UTC"
|
||||
user-timezone="{{ config('app.user-timezone') }}"
|
||||
autocomplete="off"
|
||||
wire:model.debounce="meetupEvent.start"
|
||||
display-format="DD-MM-YYYY HH:mm"
|
||||
:placeholder="__('Start')"/>
|
||||
</x-input.group>
|
||||
|
||||
@if(!$meetupEvent->id)
|
||||
<x-input.group :for="md5('recurring')" :label="__('Recurring appointment')">
|
||||
<x-toggle :label="__('Recurring appointment')" wire:model="recurring"/>
|
||||
<p class="text-xs text-amber-400 py-2">{{ __('The recurring appointments are created in the database as new entries. Please be careful with this function, otherwise you will have to change or delete all the appointments you have created manually if you make an error.') }}</p>
|
||||
</x-input.group>
|
||||
@endif
|
||||
|
||||
@if($recurring)
|
||||
<x-input.group :for="md5('repetitions')" :label="__('Number of repetitions')">
|
||||
<x-input type="number" autocomplete="off" wire:model.debounce="repetitions"
|
||||
:placeholder="__('Number of repetitions')"/>
|
||||
</x-input.group>
|
||||
@endif
|
||||
|
||||
<x-input.group :for="md5('meetupEvent.location')" :label="__('Location')">
|
||||
<x-input autocomplete="off" wire:model.debounce="meetupEvent.location"
|
||||
:placeholder="__('Location')"/>
|
||||
</x-input.group>
|
||||
|
||||
<x-input.group :for="md5('meetupEvent.description')" :label="__('Description')">
|
||||
<x-textarea autocomplete="off" wire:model.debounce="meetupEvent.description"
|
||||
:placeholder="__('Description')"/>
|
||||
</x-input.group>
|
||||
|
||||
<x-input.group :for="md5('meetupEvent.link')" :label="__('Link')">
|
||||
<x-input type="url" autocomplete="off" wire:model.debounce="meetupEvent.link"
|
||||
:placeholder="__('Link')"
|
||||
:hint="__('For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)')"/>
|
||||
</x-input.group>
|
||||
|
||||
<x-input.group :for="md5('grid')" :label="__('Recurring appointments')">
|
||||
@if($meetupEvent->start && $recurring)
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-2">
|
||||
@for($i = 0; $i < $repetitions; $i++)
|
||||
<x-datetime-picker wire:key="event_{{ $i }}"
|
||||
:label="\App\Support\Carbon::parse($series[$i]['start'])->asDayNameAndMonthName()"
|
||||
:clearable="false"
|
||||
time-format="24"
|
||||
timezone="UTC"
|
||||
user-timezone="{{ config('app.user-timezone') }}"
|
||||
autocomplete="off"
|
||||
wire:model.debounce="series.{{ $i }}.start"
|
||||
display-format="DD-MM-YYYY HH:mm"
|
||||
:placeholder="__('Start')"/>
|
||||
@endfor
|
||||
</div>
|
||||
@endif
|
||||
</x-input.group>
|
||||
|
||||
<x-input.group :for="md5('meetupEvent.link')" :label="__('Action')">
|
||||
<x-button primary wire:click="submit">
|
||||
<i class="fa fa-thin fa-save"></i>
|
||||
{{ __('Save') }}
|
||||
</x-button>
|
||||
</x-input.group>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -30,7 +30,7 @@
|
||||
</x-button>
|
||||
</div>
|
||||
<div>
|
||||
<x-button xs amber href="/nova/resources/meetup-events" target="_blank">
|
||||
<x-button xs amber :href="route('meetup.event.form', ['country' => $country ?? 'de'])">
|
||||
<i class="fa fa-thin fa-plus"></i>
|
||||
{{ __('Register Meetup date') }}
|
||||
</x-button>
|
||||
|
||||
Reference in New Issue
Block a user