recurring meetup events

This commit is contained in:
HolgerHatGarKeineNode
2023-02-07 15:18:47 +01:00
parent 5b475cc660
commit a93598ef2e
23 changed files with 502 additions and 36 deletions

View File

@@ -711,5 +711,12 @@
"Unfortunately I cannot come": "Leider kann ich doch nicht kommen",
"Link to participate": "Link zur Teilnahme",
"Copied!": "Kopiert!",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "Zum Beispiel ein Link zu einer Location auf Google Maps oder ein Link zu einer Website. (nicht dein Telegram-Gruppen-Link)"
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "Zum Beispiel ein Link zu einer Location auf Google Maps oder ein Link zu einer Website. (nicht dein Telegram-Gruppen-Link)",
"There is already an event on this date. Please choose another date or delete the existing events.": "Es gibt bereits einen Termin an diesem Datum. Bitte wähle ein anderes Datum oder lösche die bestehenden Termine.",
"Event saved successfully.": "Termin erfolgreich gespeichert.",
"no authorization": "keine Berechtigung",
"Recurring appointment": "Wiederkehrender Termin",
"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.": "Die Termine werden in der Datenbank als neue Einträge angelegt. Bitte sei vorsichtig mit dieser Funktion, sonst musst du alle Termine, ändern oder löschen, wenn du einen Fehler machst.",
"Number of repetitions": "Anzahl der Wiederholungen",
"Recurring appointments": "Wiederkehrende Termine"
}

View File

@@ -706,5 +706,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -706,5 +706,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -707,5 +707,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -707,5 +707,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -707,5 +707,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -707,5 +707,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -707,5 +707,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -707,5 +707,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -681,5 +681,12 @@
"Unfortunately I cannot come": "",
"Link to participate": "",
"Copied!": "",
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": ""
"For example, a link to a location on Google Maps or a link to a website. (not your Telegram group link)": "",
"There is already an event on this date. Please choose another date or delete the existing events.": "",
"Event saved successfully.": "",
"no authorization": "",
"Recurring appointment": "",
"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.": "",
"Number of repetitions": "",
"Recurring appointments": ""
}

View File

@@ -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>

View 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>

View File

@@ -5,5 +5,4 @@
{{ $row->name }}
</div>
</div>
</a>

View 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>

View 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>

View File

@@ -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>