diff --git a/app/Services/Account/Activity/Activity/UpdateActivity.php b/app/Services/Account/Activity/Activity/UpdateActivity.php index cda6b838f17..0ddc065d00f 100644 --- a/app/Services/Account/Activity/Activity/UpdateActivity.php +++ b/app/Services/Account/Activity/Activity/UpdateActivity.php @@ -88,7 +88,7 @@ public function execute(array $data): Activity 'contacts' => $data['contacts'], ]); - return $activity; + return $activity->refresh(); } /** diff --git a/resources/js/components/people/activity/ActivityList.vue b/resources/js/components/people/activity/ActivityList.vue index 64b11595a05..7377433a62e 100644 --- a/resources/js/components/people/activity/ActivityList.vue +++ b/resources/js/components/people/activity/ActivityList.vue @@ -122,7 +122,7 @@ :name="name" :activity="activity" :contact-id="contactId" - @update="updateList($event)" + @update="$set(activity, 'edit', false); updateList($event)" @cancel="$set(activity, 'edit', false); displayLogActivity = false" /> @@ -205,9 +205,9 @@ export default { }); }, - updateList: function (activity) { + updateList(activity) { this.displayLogActivity = false; - this.getActivities(); + Vue.set(this.activities, this.activities.indexOf(this.activities.find(item => item.id === activity.id)), activity); }, showDestroyActivity(activity) { diff --git a/resources/js/components/people/activity/ActivityTypeList.vue b/resources/js/components/people/activity/ActivityTypeList.vue index 0e0b8f90804..85e8ab021db 100644 --- a/resources/js/components/people/activity/ActivityTypeList.vue +++ b/resources/js/components/people/activity/ActivityTypeList.vue @@ -1,6 +1,7 @@