feat(event): implement automatic tenant date text synchronization on save and delete; update related tests
This commit is contained in:
@@ -13,8 +13,6 @@ class EventService
|
||||
'facebook_url' => 'facebook',
|
||||
];
|
||||
|
||||
public function __construct(protected EventDateTextFormatter $eventDateTextFormatter) {}
|
||||
|
||||
public function forTenant(Tenant $tenant): Tenant
|
||||
{
|
||||
return $tenant->load(['eventDates', 'socialMedia']);
|
||||
@@ -28,9 +26,6 @@ class EventService
|
||||
$tenant->update([
|
||||
'event_title' => $data['title'],
|
||||
'event_location' => $data['location'],
|
||||
'event_date_text' => $this->eventDateTextFormatter->format(
|
||||
array_column($data['dates'], 'date')
|
||||
),
|
||||
]);
|
||||
|
||||
$this->syncDates($tenant, $data['dates']);
|
||||
|
||||
Reference in New Issue
Block a user