@extends('layouts.app') @section('title') {{ __('messages.analytic.vcard_analytic') }} @endsection @section('header_toolbar')

@yield('title')

@if(getLogInUser() && getLoggedInUserRoleId() != getSuperAdminRoleId()) {{ __('messages.common.back') }} @else {{ __('messages.common.back') }} @endif
@endsection @section('content') @include('layouts.errors') @if(!empty($data['noRecord']))
{{$data['noRecord']}}
@else {{ Form::hidden('analytic_vcard_id', $vcard->id, ['id' => 'analyticVcardId']) }} {{ Form::hidden('visitors', __('messages.analytics.visitors'), ['id' => 'analyticVisitors']) }}

{{ __('messages.analytic.vcard_analytic') }}

  
@if(getLogInUser() && getLoggedInUserRoleId() != getSuperAdminRoleId()) @include('vcards.sub_analytics') @else @include('sadmin.vcards.sub_analytics') @endif
@if($partName == 'overview')

{{__('messages.analytics.countries')}}

@foreach($data['country'] as $name => $country) @if($loop->index < 5)
@if(file_exists('vendor/blade-flags/country-'.getCountryShortCode($name).'.svg')) @endif {{$name}}
{{round($country['per'])}} % {{$country['count']}}
@endif @endforeach
@if(getLogInUser() && getLoggedInUserRoleId() != getSuperAdminRoleId()) {{__('messages.analytics.view_more')}} @else {{__('messages.analytics.view_more')}} @endif

{{__('messages.analytics.devices')}}

@foreach($data['device'] as $name => $device) @if($loop->index < 5)
{{(ucfirst($name))}}
{{round($device['per'])}} % {{$device['count']}}
@endif @endforeach
@if(getLogInUser() && getLoggedInUserRoleId() != getSuperAdminRoleId()) {{__('messages.analytics.view_more')}} @else {{__('messages.analytics.view_more')}} @endif

{{__('messages.analytics.os')}}

@foreach($data['operating_system'] as $name => $os) @if($loop->index < 5)
{{$name}}
{{round($os['per'])}}% {{$os['count']}}
@endif @endforeach
@if(getLogInUser() && getLoggedInUserRoleId() != getSuperAdminRoleId()) {{__('messages.analytics.view_more')}} @else {{__('messages.analytics.view_more')}} @endif

{{__('messages.analytics.browsers')}}

@foreach($data['browser'] as $name => $browser) @if($loop->index < 5)
{{$name}}
{{round($browser['per'])}} % {{$browser['count']}}
@endif @endforeach
@if(getLogInUser() && getLoggedInUserRoleId() != getSuperAdminRoleId()) {{__('messages.analytics.view_more')}} @else {{__('messages.analytics.view_more')}} @endif

{{__('messages.analytics.languages')}}

@foreach($data['language'] as $name => $language) @if($loop->index < 5)
{{ $name != '' ? \App\Models\User::ALL_LANGUAGES[$name] : ''}}
{{round($language['per'])}} % {{$language['count']}}
@endif @endforeach
@if(getLogInUser() && getLoggedInUserRoleId() != getSuperAdminRoleId()) {{__('messages.analytics.view_more')}} @else {{__('messages.analytics.view_more')}} @endif
@endif @if($partName == 'country')

{{__('messages.analytics.countries')}}

@foreach($data['country'] as $name => $country)
@if(file_exists('vendor/blade-flags/country-'.getCountryShortCode($name).'.svg')) @endif {{$name}}
{{round($country['per'])}} % {{$country['count']}}
@endforeach
@endif @if($partName == 'device')

{{__('messages.analytics.devices')}}

@foreach($data['device'] as $name => $device)
{{(ucfirst($name))}}
{{round($device['per'])}} % {{$device['count']}}
@endforeach
@endif @if($partName == 'os')

{{__('messages.analytics.os')}}

@foreach($data['operating_system'] as $name => $os)
{{$name}}
{{round($os['per'])}}% {{$os['count']}}
@endforeach
@endif @if($partName == 'browser')

{{__('messages.analytics.browsers')}}

@foreach($data['browser'] as $name => $browser)
{{$name}}
{{round($browser['per'])}} % {{$browser['count']}}
@endforeach
@endif @if($partName == 'language')

{{__('messages.analytics.languages')}}

@foreach($data['language'] as $name => $language)
{{$name != '' ? \App\Models\User::ALL_LANGUAGES[$name] : ''}}
{{round($language['per'])}} % {{$language['count']}}
@endforeach
@endif
@endif @endsection