process loan

This commit is contained in:
CHIEFSOFT\ameye
2024-08-04 23:20:44 -04:00
parent f4b4dd28ae
commit aca7f12c57
+17 -3
View File
@@ -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);