Skip to content

Commit

Permalink
Update Calendar.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Feb 22, 2024
1 parent 4edad9e commit 624e144
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Services/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Eluceo\iCal\Domain\ValueObject\MultiDay;
use Eluceo\iCal\Domain\ValueObject\SingleDay;
use Eluceo\iCal\Domain\ValueObject\TimeSpan;
use Eluceo\iCal\Domain\ValueObject\Uri;
use Eluceo\iCal\Presentation\Factory\CalendarFactory;
use Illuminate\Support\Carbon;
use TypiCMS\Modules\Events\Models\Event;
Expand Down Expand Up @@ -46,8 +47,9 @@ public function add(Event $model)
$iEvent = new IEvent();
$iEvent->setOccurrence($occurrence)
->setSummary($model->title)
->setDescription(url($model->uri()))
->setLocation(new Location($model->address, $model->venue));
->setDescription($model->summary ?? '')
->setUrl(new Uri(url($model->present()->website)))
->setLocation(new Location($model->venue ?? ' ' . $model->address ?? ''));
// add it to the calendar
$this->iCalendar->addEvent($iEvent);
// $this->iCalendar->addTimeZone(TimeZone::createFromPhpDateTimeZone(new PhpDateTimeZone(config('app.timezone'))));
Expand Down

0 comments on commit 624e144

Please sign in to comment.