wreitting end point

This commit is contained in:
CHIEFSOFT\ameye
2024-07-11 09:43:38 -04:00
parent 0ec27155a0
commit 4e3a78cab9
2 changed files with 14 additions and 1 deletions
+1
View File
@@ -18,6 +18,7 @@ $routes->get('/digibko/v1/dash', 'BkoDash::bkoDashHome');
$routes->get('/digibko/v1/loan/started', 'BkoReports::startedApplication');
$routes->get('/digibko/v1/loan/pending', 'BkoReports::pendingApplication');
$routes->get('/digibko/v1/loan/ready', 'BkoReports::readyApplication');
$routes->get('/digibko/v1/loan/verified', 'BkoReports::writingApplication');
$routes->get('/digibko/v1/loan/approved', 'BkoReports::approvedApplication');
$routes->get('/digibko/v1/loan/rejected', 'BkoReports::rejectedApplication');
+13 -1
View File
@@ -68,7 +68,6 @@ class BkoReports extends BaseController
public function readyApplication() :ResponseInterface
{
$readyQuery = $this->applicationQuery(2);
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
$query = $this->db->query("$readyQuery");
$row = $query->getResult('array');
$data = [
@@ -78,6 +77,19 @@ class BkoReports extends BaseController
return $this->respond($data, 200);
}
public function writingApplication() :ResponseInterface
{
$readyQuery = $this->applicationQuery(4);
$query = $this->db->query("$readyQuery");
$row = $query->getResult('array');
$data = [
'call_return' => '100',
'records' => $row
];
return $this->respond($data, 200);
}
public function approvedApplication() :ResponseInterface
{
$approvedQuery = $this->applicationQuery(5);