@extends('layout.app') @section('content')
@csrf
@error('clientId')
{{ $message }}
@enderror
@error('tokenCategory')
{{ $message }}
@enderror
@error('tokenCode')
{{ $message }}
@enderror
@error('reportedBy')
{{ $message }}
@enderror
@error('reporterContact')
{{ $message }}
@enderror
@error('description')
{{ $message }}
@enderror
@if (checkSettings('token_source') == 'enable')
@endif @can('assign-token')
@endcan
@if ($table)

Total Token: {{ $tokenCount }}

@foreach ($token as $r) @endforeach
ID Token# Category(Code) Description Source Creator Reseller POP Customer ID
UserName
Customer Info Reporter
Contact
Assigned Token Type ONU
{{ $r->id }} {{-- Token ID --}}
TKN {{ $r->token }}
{{-- Created Time --}}
Created
{{ date('d M Y, g:i a', strtotime($r->created_at)) }}
{{-- Assign Time --}} @if ($r->assign_time)
Assigned
{{ date('d M Y, g:i a', strtotime($r->assign_time)) }}
@if (!$r->close_time)
{{ dateTimeDifferent(now(), $r->assign_time) }} ago · not closed
@endif
@else
{{ dateTimeDifferent(now(), $r->created_at) }} ago · not assigned
@endif {{-- Work Start / Solve Time --}} @if ($r->work_start_time)
Work Started
{{ date('d M Y, g:i a', strtotime($r->work_start_time)) }}
@if ($r->close_time)
Closed
{{ date('d M Y, g:i a', strtotime($r->close_time)) }}
Solved in {{ dateTimeDifferent($r->close_time, $r->work_start_time) }}
@else
Live --:--:--
@endif @endif
{{ $r->category->tokenCategory ?? '' }} ({{ $r->Code->tokenCode ?? '' }}) {{ $r->description }} @if ($r->token_source == 'CRM') {{ $r->token_source }} @else {{ $r->token_source }} @endif {{ $r->creator->name ?? '' }} @if ($r->createByClient) {{ $r->createByClient ?? '' }} @endif {{ $r->clients->pops->reseller->name ?? '' }} {{ $r->clients->pops->popname ?? '' }} {{ $r->clientId }}
{{ $r->clients->userid ?? '' }}

@if (checkAPI()) @if (array_key_exists($r->clients->userid ?? '', $mikrotik_online_users['onlineUsers'])) Online @else Offline @endif
@else @if (isset($mikrotik_online_users) && in_array($r->clients->userid ?? '', $mikrotik_online_users)) Online @else Offline @endif @endif @if (!empty($r->clients->clientsInfo->clients_name)) C Name : {{ $r->clients->clientsInfo->clients_name ?? '' }}
@endif @if (!empty($r->clients->pops->reseller->name)) R Name : {{ $r->clients->pops->reseller->name ?? '' }}
@endif @if (!empty($r->clients->clientsinfo->flat_no)) Flat No: {{ $r->clients->clientsinfo->flat_no ?? '' }}, @endif @if (!empty($r->clients->clientsinfo->building_name)) Building Name: {{ $r->clients->clientsinfo->building_name ?? '' }},
@endif @if (!empty($r->clients->clientsinfo->road_no)) Road No: {{ $r->clients->clientsinfo->road_no ?? '' }},
@endif @if (!empty($r->clients->clientsinfo->block_sector)) Block/Sector: {{ $r->clients->clientsinfo->block_sector ?? '' }}, @endif @if (!empty($r->clients->clientsinfo->area)) Area : {{ $r->clients->clientsinfo->area ?? '' }},
@endif @if (!empty($r->clients->clientsinfo->box)) Box : {{ $r->clients->clientsinfo->box ?? '' }},
@endif @if (checkSettings('select_option_for_box_and_ponsetting') == 'enable') @if (!empty(optional($r->clients->clientsinfo)->map_box_id)) Map Box : {{ optional($r->clients->clientsinfo->mapBox)->name ?? '' }}, @endif @if (!empty(optional($r->clients->clientsinfo)->onu_serial))
ONU Serial : {{ optional(optional($r->clients->clientsinfo)->pon)->name ?? optional($r->clients->clientsinfo)->onu_serial }} @endif @endif

{{ $r->reportedBy }}
{{ $r->reporterContact }}
@foreach ($r->assignUsers as $assignUser) {{ $assignUser->employee->name ?? '' }}
@endforeach
{{ $r->token_type ?? '' }} @if ($r->onu_status === 'online') {{ $r->onu_power ?? '—' }} @else {{ $r->onu_status ?? '—' }} @endif
@endif
@endsection @section('ajax') @endsection