GWM
This commit is contained in:
parent
490028ef80
commit
12aa68ebb4
@ -124,6 +124,7 @@ class DashboardController extends ResourceController
|
|||||||
->select("
|
->select("
|
||||||
ps.name AS staff_name,
|
ps.name AS staff_name,
|
||||||
ps.id AS staff_id,
|
ps.id AS staff_id,
|
||||||
|
ph.name AS handler_name,
|
||||||
COUNT(pe.id) AS total_assigned,
|
COUNT(pe.id) AS total_assigned,
|
||||||
SUM(CASE WHEN pe.status = 'Awaiting Quotation' THEN 1 ELSE 0 END) AS awaiting_quotation,
|
SUM(CASE WHEN pe.status = 'Awaiting Quotation' THEN 1 ELSE 0 END) AS awaiting_quotation,
|
||||||
SUM(CASE WHEN pe.status = 'Quotation Created' THEN 1 ELSE 0 END) AS pending_quotation_approval,
|
SUM(CASE WHEN pe.status = 'Quotation Created' THEN 1 ELSE 0 END) AS pending_quotation_approval,
|
||||||
@ -131,6 +132,7 @@ class DashboardController extends ResourceController
|
|||||||
SUM(CASE WHEN pe.status = 'Policy Created' THEN 1 ELSE 0 END) AS policy_created
|
SUM(CASE WHEN pe.status = 'Policy Created' THEN 1 ELSE 0 END) AS policy_created
|
||||||
")
|
")
|
||||||
->join('partner_staff ps', 'ps.id = pe.assigned_to', 'left')
|
->join('partner_staff ps', 'ps.id = pe.assigned_to', 'left')
|
||||||
|
->join('partner_staff ph', 'ph.id = ps.handler_id', 'left')
|
||||||
->where('pe.manager_id', $manager_id)
|
->where('pe.manager_id', $manager_id)
|
||||||
->where('pe.is_active', 1)
|
->where('pe.is_active', 1)
|
||||||
->groupBy('pe.assigned_to')
|
->groupBy('pe.assigned_to')
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class MasterController extends ResourceController
|
|||||||
|
|
||||||
public function getRoleMaster()
|
public function getRoleMaster()
|
||||||
{
|
{
|
||||||
$data = $this->RoleMasterModel->findAll();
|
$data = $this->RoleMasterModel->whereIn('id',[2,3])->findAll();
|
||||||
|
|
||||||
if (!$data) {
|
if (!$data) {
|
||||||
return $this->failNotFound('No data found');
|
return $this->failNotFound('No data found');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user