diff --git a/app/Controllers/Users.php b/app/Controllers/Users.php index 1211e54..3cc062c 100644 --- a/app/Controllers/Users.php +++ b/app/Controllers/Users.php @@ -17,6 +17,20 @@ class Users extends BaseController } public function userDash(){ + $statusDetail[2] =[ + "text" => "Pending", + "button" => false + ]; + $statusDetail[4] =[ + "text" => "Add Card", + "button" => true + ]; + + $statusDetail[7] =[ + "text" => "Canceled", + "button" => false + ]; + $in = $this->request->getGet(); $data = []; if ($in['uid'] !=''){ @@ -27,17 +41,17 @@ class Users extends BaseController $loanResult = $this->userLoan($in['uid']); $processLoan = []; foreach ($loanResult as $value) { - $value["status_text"] = "Ameye"; + $value["status_text"] = $statusDetail[ $value["status"] ]; $processLoan[] = $value; } $data = [ 'call_return' => '100', 'customer' => $row, - 'loans' => $loanResult, - 'lln' => $processLoan + 'loans' => $processLoan, ]; return $this->respond($data, 200); + //'loans' => $loanResult, } else{ return $this->respond(['error'=>'empty uid'], 400);