process loan
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user