From 15e18b79017c6b736fd6954545d8239bb8c0426b Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Fri, 11 Aug 2023 11:43:08 +0700 Subject: [PATCH] Fix report activity after update --- app/Http/Controllers/ActivityController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index 57d665f..5158b05 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -327,8 +327,10 @@ class ActivityController extends Controller if ($entity['entity'] == "task") { $activityToUpdate = $activity->firstWhere('id', $entity['data']['id']); $entity['data']['name'] = $entity['data']['text']; + $entity['data']['persentase_progress'] = $entity['data']['progress'] * 100; if(!$activityToUpdate->update($entity['data'])) return response()->json(['status' => 'failed', 'message' => 'Failed to update activity !', 'code' => 500], 500); + $updatedJobsDone = $activityToUpdate->jobs_done; } else if ($entity['entity'] == "link"){ $linkToUpdate = $link->firstWhere('id', $entity['data']['id']); if(!$linkToUpdate->update($entity['data']))