mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
recurring fixed
This commit is contained in:
@@ -39,7 +39,7 @@ class MeetupEventForm extends Component
|
|||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
if (! $this->meetupEvent) {
|
if (!$this->meetupEvent) {
|
||||||
$this->meetupEvent = new MeetupEvent(
|
$this->meetupEvent = new MeetupEvent(
|
||||||
[
|
[
|
||||||
'start' => now()
|
'start' => now()
|
||||||
@@ -47,7 +47,7 @@ class MeetupEventForm extends Component
|
|||||||
->addHours(17),
|
->addHours(17),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} elseif (! auth()
|
} elseif (!auth()
|
||||||
->user()
|
->user()
|
||||||
->can('update', $this->meetupEvent)) {
|
->can('update', $this->meetupEvent)) {
|
||||||
abort(403);
|
abort(403);
|
||||||
@@ -114,7 +114,7 @@ class MeetupEventForm extends Component
|
|||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
$this->validate();
|
$this->validate();
|
||||||
if (! $this->meetupEvent->id) {
|
if (!$this->meetupEvent->id) {
|
||||||
$hasAppointmentsOnThisDate = MeetupEvent::query()
|
$hasAppointmentsOnThisDate = MeetupEvent::query()
|
||||||
->where('meetup_id', $this->meetupEvent->meetup_id)
|
->where('meetup_id', $this->meetupEvent->meetup_id)
|
||||||
->where('start', '>', Carbon::parse($this->meetupEvent->start)
|
->where('start', '>', Carbon::parse($this->meetupEvent->start)
|
||||||
@@ -132,7 +132,7 @@ class MeetupEventForm extends Component
|
|||||||
|
|
||||||
$this->meetupEvent->save();
|
$this->meetupEvent->save();
|
||||||
|
|
||||||
if (! $this->meetupEvent->id && $this->recurring) {
|
if ($this->recurring) {
|
||||||
foreach ($this->series as $event) {
|
foreach ($this->series as $event) {
|
||||||
$hasAppointmentsOnThisDate = MeetupEvent::query()
|
$hasAppointmentsOnThisDate = MeetupEvent::query()
|
||||||
->where('meetup_id', $this->meetupEvent->meetup_id)
|
->where('meetup_id', $this->meetupEvent->meetup_id)
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
@if($meetupEvent->start && $recurring)
|
@if($meetupEvent->start && $recurring)
|
||||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-2">
|
<div class="grid grid-cols-1 lg:grid-cols-3 gap-2">
|
||||||
@for($i = 0; $i < $repetitions; $i++)
|
@for($i = 0; $i < $repetitions; $i++)
|
||||||
<x-datetime-picker wire:key="event_{{ $i }}"
|
<x-datetime-picker
|
||||||
:label="\App\Support\Carbon::parse($series[$i]['start'])->asDayNameAndMonthName()"
|
:label="\App\Support\Carbon::parse($series[$i]['start'])->asDayNameAndMonthName()"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
time-format="24"
|
time-format="24"
|
||||||
|
|||||||
Reference in New Issue
Block a user