More routes
This commit is contained in:
@@ -15,8 +15,11 @@ $routes->post('/digibko/v1/identity/verify_token', 'DigiFiAuth::verifyPostBkoT
|
||||
|
||||
$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/started', 'BkoReports::startedApplication');
|
||||
$routes->get('/digibko/v1/loan/pending', 'BkoReports::pendingApplication');
|
||||
$routes->get('/digibko/v1/loan/ready', 'BkoReports::readyApplication');
|
||||
$routes->get('/digibko/v1/loan/approved', 'BkoReports::approvedApplication');
|
||||
$routes->get('/digibko/v1/loan/rejected', 'BkoReports::rejectedApplication');
|
||||
|
||||
$routes->get('/digibko/v1/dashboard/bvn/recent', 'DigiFiAuth::startBkoToken');
|
||||
//$routes->get('/digibko/v1/applications/pending', 'BkoReports::pendingApplication');
|
||||
|
||||
@@ -26,7 +26,7 @@ class BkoReports extends BaseController
|
||||
a.state,a.country,a.status,a.added,
|
||||
a.updated
|
||||
FROM applications a
|
||||
LEFT JOIN customers c ON c.uid = a.customer_uid ");
|
||||
LEFT JOIN customers c ON c.uid = a.customer_uid WHERE a.status = 1 ");
|
||||
$row = $query->getResult('array');
|
||||
$data = [
|
||||
'call_return' => '100',
|
||||
@@ -45,7 +45,64 @@ class BkoReports extends BaseController
|
||||
a.state,a.country,a.status,a.added,
|
||||
a.updated
|
||||
FROM applications a
|
||||
LEFT JOIN customers c ON c.uid = a.customer_uid ");
|
||||
LEFT JOIN customers c ON c.uid = a.customer_uid WHERE a.status = 1 ");
|
||||
$row = $query->getResult('array');
|
||||
$data = [
|
||||
'call_return' => '100',
|
||||
'records' => $row
|
||||
];
|
||||
return $this->respond($data, 200);
|
||||
// return $this->respond([], 200);
|
||||
}
|
||||
|
||||
public function readyApplication() :ResponseInterface
|
||||
{
|
||||
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
|
||||
$query = $this->db->query("SELECT c.firstname, c.lastname, a.uid,a.loan_amount,
|
||||
a.payment_month,a.sales_agent,a.gender,
|
||||
a.marital_status,a.email,a.address,
|
||||
a.state,a.country,a.status,a.added,
|
||||
a.updated
|
||||
FROM applications a
|
||||
LEFT JOIN customers c ON c.uid = a.customer_uid WHERE a.status = 2 ");
|
||||
$row = $query->getResult('array');
|
||||
$data = [
|
||||
'call_return' => '100',
|
||||
'records' => $row
|
||||
];
|
||||
return $this->respond($data, 200);
|
||||
// return $this->respond([], 200);
|
||||
}
|
||||
|
||||
public function approvedApplication() :ResponseInterface
|
||||
{
|
||||
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
|
||||
$query = $this->db->query("SELECT c.firstname, c.lastname, a.uid,a.loan_amount,
|
||||
a.payment_month,a.sales_agent,a.gender,
|
||||
a.marital_status,a.email,a.address,
|
||||
a.state,a.country,a.status,a.added,
|
||||
a.updated
|
||||
FROM applications a
|
||||
LEFT JOIN customers c ON c.uid = a.customer_uid WHERE a.status = 5 ");
|
||||
$row = $query->getResult('array');
|
||||
$data = [
|
||||
'call_return' => '100',
|
||||
'records' => $row
|
||||
];
|
||||
return $this->respond($data, 200);
|
||||
// return $this->respond([], 200);
|
||||
}
|
||||
|
||||
public function rejectedApplication() :ResponseInterface
|
||||
{
|
||||
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
|
||||
$query = $this->db->query("SELECT c.firstname, c.lastname, a.uid,a.loan_amount,
|
||||
a.payment_month,a.sales_agent,a.gender,
|
||||
a.marital_status,a.email,a.address,
|
||||
a.state,a.country,a.status,a.added,
|
||||
a.updated
|
||||
FROM applications a
|
||||
LEFT JOIN customers c ON c.uid = a.customer_uid WHERE a.status = 7 ");
|
||||
$row = $query->getResult('array');
|
||||
$data = [
|
||||
'call_return' => '100',
|
||||
@@ -56,4 +113,5 @@ class BkoReports extends BaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user