Skip to content

Commit 2444c26

Browse files
committed
Merge branch 'master' of https://github.com/ayoubolk/kpi
2 parents 9fca683 + ea0771f commit 2444c26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Http/Controllers/AgentController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function dashboard3() {
9494
->join('agent_dim','agent_dim.Id','=','fact.fk_agent')
9595
->join('contact_dim', 'fact.fk_contact', '=', 'contact_dim.Id')
9696
->join('tickets_dim', 'fact.fk_ticket', '=', 'tickets_dim.Id')
97-
->select(DB::raw('agent_dim.Id, agent_dim.Name, SUM(CASE WHEN (Category not like \'Service Catalog\' AND Contact_type like \'Phone\' AND FCR_resolved = 1 AND FCR_resolvable = \'Yes\') THEN 1 ELSE 0 END) * 100 / SUM(CASE WHEN (Category not like \'Service Catalog\' AND Contact_type like \'Phone\' AND FCR_resolvable = \'Yes\') THEN 1 ELSE 0 END) AS count'))
97+
->select(DB::raw('agent_dim.Id, agent_dim.Name, SUM(CASE WHEN (Category not like \'Service Catalog\' AND Contact_type like \'Phone\' AND FCR_resolved = 1) THEN 1 ELSE 0 END) * 100 / SUM(CASE WHEN (Category not like \'Service Catalog\' AND Contact_type like \'Phone\') THEN 1 ELSE 0 END) AS count'))
9898
->groupBy('agent_dim.Id')
9999
->orderBy('count','desc')
100100
->get();
@@ -103,7 +103,7 @@ public function dashboard3() {
103103
->join('agent_dim','agent_dim.Id','=','fact.fk_agent')
104104
->join('contact_dim', 'fact.fk_contact', '=', 'contact_dim.Id')
105105
->join('tickets_dim', 'fact.fk_ticket', '=', 'tickets_dim.Id')
106-
->select(DB::raw('agent_dim.Id, agent_dim.Name, IFNULL(SUM(CASE WHEN (Contact_type like \'Phone\' AND Category not like \'Service Catalog\' AND FCR_resolved = 1 AND FCR_resolvable = \'Yes\') THEN 1 ELSE 0 END) * 100 / SUM(CASE WHEN FCR_resolvable = \'Yes\' THEN 1 ELSE 0 END),0) AS count'))
106+
->select(DB::raw('agent_dim.Id, agent_dim.Name, SUM(CASE WHEN (Category not like \'Service Catalog\' AND Contact_type like \'Phone\' AND FCR_resolved = 1 AND FCR_resolvable = \'Yes\') THEN 1 ELSE 0 END) * 100 / SUM(CASE WHEN (Category not like \'Service Catalog\' AND Contact_type like \'Phone\' AND FCR_resolvable = \'Yes\') THEN 1 ELSE 0 END) AS count'))
107107
->groupBy('agent_dim.Id')
108108
->orderBy('count','desc')
109109
->get();

0 commit comments

Comments
 (0)