From c5fda7e5e3611eca6f6c8b415166ff86b1916f17 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Mon, 10 Jul 2023 11:36:00 +0700 Subject: [PATCH] Fix project count --- app/Http/Controllers/DashboardBoDController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/DashboardBoDController.php b/app/Http/Controllers/DashboardBoDController.php index 9c48541..56ba219 100644 --- a/app/Http/Controllers/DashboardBoDController.php +++ b/app/Http/Controllers/DashboardBoDController.php @@ -140,10 +140,10 @@ class DashboardBoDController extends Controller try { if($selisihProgress > 0 && $selisihProgress <= 5) $return['warning'] += 1; - elseif($selisihProgress > 5 && $selisihProgress <= 100) - $return['behind-schedule'] += 1; elseif($selisihProgress == 0) $return['on-schedule'] += 1; + else + $return['behind-schedule'] += 1; } catch (\Error $e) { return response()->json(['msg' => $e->getMessage(), 'data' => $project], 200); }