chore: remove events table (#1829)
This commit is contained in:
@@ -72,7 +72,6 @@ class ActivitiesController extends Controller
|
||||
// New attendees
|
||||
foreach ($specifiedContactsObj as $newContact) {
|
||||
$newContact->activities()->attach($activity, ['account_id' => $request->user()->account_id]);
|
||||
$newContact->logEvent('activity', $activity->id, 'create');
|
||||
$newContact->calculateActivitiesStatistics();
|
||||
}
|
||||
|
||||
@@ -140,11 +139,6 @@ class ActivitiesController extends Controller
|
||||
// Has an existing attendee been removed?
|
||||
if (! array_key_exists($existingContact->id, $specifiedContactsObj)) {
|
||||
$existingContact->activities()->detach($activity);
|
||||
$existingContact->logEvent('activity', $activity->id, 'delete');
|
||||
} else {
|
||||
// Otherwise we're updating an activity that someone's
|
||||
// already a part of
|
||||
$existingContact->logEvent('activity', $activity->id, 'update');
|
||||
}
|
||||
|
||||
// Remove this ID from our list of contacts as we don't
|
||||
@@ -157,7 +151,6 @@ class ActivitiesController extends Controller
|
||||
// New attendees
|
||||
foreach ($specifiedContactsObj as $newContact) {
|
||||
$newContact->activities()->save($activity);
|
||||
$newContact->logEvent('activity', $activity->id, 'create');
|
||||
}
|
||||
|
||||
return redirect()->route('people.show', $contact)
|
||||
@@ -176,7 +169,6 @@ class ActivitiesController extends Controller
|
||||
$activity->deleteJournalEntry();
|
||||
|
||||
foreach ($activity->contacts as $contactActivity) {
|
||||
$contactActivity->events()->forObject($activity)->get()->each->delete();
|
||||
$contactActivity->calculateActivitiesStatistics();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user