PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.1.2
Fluent Support – Helpdesk & Customer Support Ticket System v2.1.2
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
← All changes | app/Modules/StatModule.php +13 -10 1.10.32.1.2 View file →
@@ -30,10 +30,10 @@
30 30 $startDate = $currentDate;
31 31 $endDate = $currentDate;
32 32 }
33 33
34 - $startDate = date('Y-m-d 00:00.01', strtotime($startDate));
35 - $endDate = date('Y-m-d 23:59.59', strtotime($endDate));
34 + $startDate = gmdate('Y-m-d 00:00.01', strtotime($startDate));
35 + $endDate = gmdate('Y-m-d 23:59.59', strtotime($endDate));
36 36
37 37 //Get list of new ticket by agent
38 38 $newTickets = Ticket::where('agent_id', $agentId)
39 39 ->where('status', 'new')
@@ -135,10 +135,10 @@
135 135 * @return array result in array format
136 136 */
137 137 public static function getTodayStats($agentId = false)
138 138 {
139 - $start = date('Y-m-d 00:00.01');
140 - $end = date('Y-m-d 23:59.59');
139 + $start = gmdate('Y-m-d 00:00.01');
140 + $end = gmdate('Y-m-d 23:59.59');
141 141
142 142 $newTickets = Ticket::whereBetween('created_at', [$start, $end]);
143 143
144 144 $closedTickets = Ticket::where('status', 'closed')->whereBetween('resolved_at', [$start, $end]);
@@ -195,12 +195,12 @@
195 195 'replies_count' => [
196 196 'title' => __('Total Replies', 'fluent-support'),
197 197 'count' => $replies_count
198 198 ],
199 - 'interactions_count' => [
200 - 'title' => __('Total Interactions', 'fluent-support'),
201 - 'count' => $interactions_count
202 - ],
199 + // 'interactions_count' => [
200 + // 'title' => __('Total Interactions', 'fluent-support'),
201 + // 'count' => $interactions_count
202 + // ],
203 203 'total_closed' => [
204 204 'title' => __('Total Closed', 'fluent-support'),
205 205 'count' => $total_closed
206 206 ]
@@ -257,14 +257,17 @@
257 257 */
258 258 public static function getAgentTodayStats()
259 259 {
260 260 $stats = [];
261 - Agent::select(['id', 'first_name'])->get()->each(function ($agent) use (&$stats) {
261 + Agent::get()->each(function ($agent) use (&$stats) {
262 262 $agentStat = static::getTodayStats($agent->id);
263 263 $waiting = static::countAwaitingTickets('agent_id', $agent->id);
264 264 if(!empty($agentStat['responses']['count']) || $waiting) {
265 265 $stats[] = [
266 - 'agent_name' => $agent->first_name,
266 + 'agent_id' => $agent->id,
267 + 'agent_name' => $agent->full_name,
268 + 'agent_email' => $agent->email,
269 + 'avatar' => $agent->photo,
267 270 'stats' => array_merge(
268 271 [
269 272 'waiting_today' => [
270 273 'title' => __('Waiting Today', 'fluent-support'),