Skip to content

Commit

Permalink
fix: update journal date on activity update (#3087)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasRos authored and asbiin committed Oct 23, 2019
1 parent a7fd339 commit 11ba80d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Http/Controllers/ActivitiesController.php
Expand Up @@ -158,6 +158,11 @@ public function update(ActivitiesRequest $request, Activity $activity, Contact $
$newContact->activities()->attach($activity, ['account_id' => $account->id]);
}

// Update the journal entry (in case date has changed)
$activity->journalEntry->update([
'date' => $activity->date_it_happened,
]);

return redirect()->route('people.show', $contact)
->with('success', trans('people.activities_update_success'));
}
Expand Down

0 comments on commit 11ba80d

Please sign in to comment.