employer verify
This commit is contained in:
@@ -26,7 +26,7 @@ $routes->get('/digibko/v1/employers', 'BkoReports::employersList');
|
|||||||
$routes->get('/digibko/v1/employers/signatory', 'BkoReports::signatoryList');
|
$routes->get('/digibko/v1/employers/signatory', 'BkoReports::signatoryList');
|
||||||
$routes->post('/digibko/v1/employers/signatory', 'BkoReports::signatoryAdd');
|
$routes->post('/digibko/v1/employers/signatory', 'BkoReports::signatoryAdd');
|
||||||
|
|
||||||
$routes->post('/digibko/v1/employers/verify', 'BkoReports::signatoryAdd');
|
$routes->post('/digibko/v1/employers/verify', 'Employers::verifyEmployer');
|
||||||
|
|
||||||
$routes->get('/digibko/v1/users', 'BkoReports::listUsers');
|
$routes->get('/digibko/v1/users', 'BkoReports::listUsers');
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ class BkoReports extends BaseController
|
|||||||
'records' => $row
|
'records' => $row
|
||||||
];
|
];
|
||||||
return $this->respond($data, 200);
|
return $this->respond($data, 200);
|
||||||
// return $this->respond([], 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function pendingApplication() :ResponseInterface
|
public function pendingApplication() :ResponseInterface
|
||||||
@@ -47,7 +46,6 @@ class BkoReports extends BaseController
|
|||||||
'records' => $row
|
'records' => $row
|
||||||
];
|
];
|
||||||
return $this->respond($data, 200);
|
return $this->respond($data, 200);
|
||||||
// return $this->respond([], 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function applicationQuery($status): string{
|
private function applicationQuery($status): string{
|
||||||
@@ -77,45 +75,32 @@ class BkoReports extends BaseController
|
|||||||
'records' => $row
|
'records' => $row
|
||||||
];
|
];
|
||||||
return $this->respond($data, 200);
|
return $this->respond($data, 200);
|
||||||
// return $this->respond([], 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function approvedApplication() :ResponseInterface
|
public function approvedApplication() :ResponseInterface
|
||||||
{
|
{
|
||||||
|
$approvedQuery = $this->applicationQuery(5);
|
||||||
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
|
//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,
|
$query = $this->db->query($approvedQuery);
|
||||||
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');
|
$row = $query->getResult('array');
|
||||||
$data = [
|
$data = [
|
||||||
'call_return' => '100',
|
'call_return' => '100',
|
||||||
'records' => $row
|
'records' => $row
|
||||||
];
|
];
|
||||||
return $this->respond($data, 200);
|
return $this->respond($data, 200);
|
||||||
// return $this->respond([], 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rejectedApplication() :ResponseInterface
|
public function rejectedApplication() :ResponseInterface
|
||||||
{
|
{
|
||||||
|
$rejectedQuery = $this->applicationQuery(7);
|
||||||
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
|
//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,
|
$query = $this->db->query($rejectedQuery);
|
||||||
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');
|
$row = $query->getResult('array');
|
||||||
$data = [
|
$data = [
|
||||||
'call_return' => '100',
|
'call_return' => '100',
|
||||||
'records' => $row
|
'records' => $row
|
||||||
];
|
];
|
||||||
return $this->respond($data, 200);
|
return $this->respond($data, 200);
|
||||||
// return $this->respond([], 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function employersList() :ResponseInterface {
|
public function employersList() :ResponseInterface {
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
class Employers
|
||||||
|
{
|
||||||
|
|
||||||
|
public function verifyEmployer(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user