@extends('layout.app') @section('content')

Token Dashboard

@php $totalCreated = $total_create_token_group_by_pop->sum(); $totalOpen = $total_not_close_token_group_by_pop->sum(); $totalAssigned = $total_not_close_token_but_assign_token_group_by_pop->sum(); $totalUnassigned = $total_not_close_token_and_not_assign_token_group_by_pop->sum(); $totalNoUpdate = $all_the_tokens_thats_are_not_close_but_assign_but_no_notes_added_more_than_one_hour_group_pop_id->sum(); $totalDueTimeOver = $token_assign_but_not_solve_till_now_as_per_token_code_solve_time_from_assign_time_group_pop_id->sum(); $summaryCards = [ [ 'label' => 'Total Tokens', 'value' => $totalCreated, 'bg' => 'bg-primary', 'icon' => 'fa-ticket-alt', 'text' => 'text-white', ], [ 'label' => 'Open Tokens', 'value' => $totalOpen, 'bg' => 'bg-info', 'icon' => 'fa-folder-open', 'text' => 'text-white', ], [ 'label' => 'Assigned (Open)', 'value' => $totalAssigned, 'bg' => 'bg-success', 'icon' => 'fa-user-check', 'text' => 'text-white', ], [ 'label' => 'Unassigned (Open)', 'value' => $totalUnassigned, 'bg' => 'bg-warning', 'icon' => 'fa-user-clock', 'text' => 'text-dark', ], [ 'label' => 'No Update (1hr+)', 'value' => $totalNoUpdate, 'bg' => 'bg-secondary', 'icon' => 'fa-clock', 'text' => 'text-white', ], [ 'label' => 'Due Time Over', 'value' => $totalDueTimeOver, 'bg' => 'bg-danger', 'icon' => 'fa-exclamation-triangle', 'text' => 'text-white', ], ]; $columns = [ ['key' => 'totalcreated', 'data' => $total_create_token_group_by_pop], ['key' => 'notclose', 'data' => $total_not_close_token_group_by_pop], ['key' => 'assigned', 'data' => $total_not_close_token_but_assign_token_group_by_pop], ['key' => 'unassigned', 'data' => $total_not_close_token_and_not_assign_token_group_by_pop], [ 'key' => 'noupdate', 'data' => $all_the_tokens_thats_are_not_close_but_assign_but_no_notes_added_more_than_one_hour_group_pop_id, ], [ 'key' => 'timeover', 'data' => $token_assign_but_not_solve_till_now_as_per_token_code_solve_time_from_assign_time_group_pop_id, ], ]; @endphp {{-- Summary Cards --}}
@foreach ($summaryCards as $card)
{{ $card['label'] }}

{{ number_format($card['value']) }}

@endforeach
{{-- Table --}}
Token Summary by POP
@forelse($pops as $popId => $popName) @foreach ($columns as $col) @php $count = $col['data']->get($popId, 0); @endphp @endforeach @empty @endforelse
# POP Name Total Created Open Assigned Unassigned No Update More Than One Hour Due Time Over
{{ $popId }} {{ $popName }} @if ($count > 0) {{ number_format($count) }} @endif
No POP data available.
@endsection @section('ajax') @endsection