From 54160e2e19f141aae79b832c1bac334250eec1fa Mon Sep 17 00:00:00 2001 From: Duidev Software Date: Tue, 6 Jan 2026 09:55:02 +0700 Subject: [PATCH] update --- htdocs/app/Http/Controllers/Controller.php | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/htdocs/app/Http/Controllers/Controller.php b/htdocs/app/Http/Controllers/Controller.php index 21f1d991..22878ac2 100644 --- a/htdocs/app/Http/Controllers/Controller.php +++ b/htdocs/app/Http/Controllers/Controller.php @@ -89,16 +89,26 @@ class Controller extends BaseController return $value <= $angka; } protected function cekInterpretasi($value, $data) { - if ($this->cekBatasAtas($value, $data->batasatas)) { - return "S"; + try { + if ($data->batasatas == $value){ + return "S"; + } else if ($data->batasbawah == $value){ + return "R"; + } else { + if ($this->cekBatasAtas($value, $data->batasatas)) { + return "S"; + } + if ($this->cekMidRange($value, $data->midrange)) { + return "I"; + } + if ($this->cekBatasBawah($value, $data->batasbawah)) { + return "R"; + } + } + } catch (\Exception $e) { + return null; } - if ($this->cekMidRange($value, $data->midrange)) { - return "I"; - } - if ($this->cekBatasBawah($value, $data->batasbawah)) { - return "R"; - } - return null; + } protected function getStyledValue($value, $color, $strong = false) { return $strong ? "$value" : "$value";