Replace activity types and activity type categories models (#1556)
This PR adds the first step towards supporting custom activity types and custom activity type categories.
This commit is contained in:
@@ -164,16 +164,17 @@ class ActivitiesController extends Controller
|
||||
* @param Activity $activity
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Contact $contact, Activity $activity)
|
||||
public function destroy(Activity $activity, Contact $contact)
|
||||
{
|
||||
$activity->deleteJournalEntry();
|
||||
|
||||
foreach ($activity->contacts as $contactActivity) {
|
||||
$contactActivity->events()->forObject($activity)->get()->each->delete();
|
||||
$contactActivity->calculateActivitiesStatistics();
|
||||
}
|
||||
|
||||
$activity->delete();
|
||||
|
||||
$contact->events()->forObject($activity)->get()->each->delete();
|
||||
|
||||
$contact->calculateActivitiesStatistics();
|
||||
|
||||
return redirect('/people/'.$contact->hashID())
|
||||
->with('success', trans('people.activities_delete_success'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user