@php $hasBlockedPermission = checksettings('new-line-request') == 'enable' && auth()->user()->can('go-to-new-line-request'); @endphp @unless ($hasBlockedPermission) @endunless @if (!empty(siteinfo())) {{-- Asked for the url rather than the stored name: a record whose file has gone missing falls back to the initials instead of putting a broken image on every page. --}} @if (companyImageUrl(siteinfo()->img_url)) @else {{ Str::substr(siteinfo()->name, 0, 2) }} @endif @endif {{ Str::limit(auth()->user()->name, '15') }} {{ Auth::user()->getRoleNames()->first() }} My Profile @can('password-change') Password Change @endcan Settings @csrf Logout @unless ($hasBlockedPermission) @can('mac-customer_create') Add Customer @endcan @if (auth()->user()->id == 1) Total job Pending {{ totalPendingJobs() }} @endif @if (auth()->user()->id == 1) Cache Driver : {{ cachedrivers() }} @endif @can('manager-balance-on-topbar') Balance: {{ managerBalance() }} @endcan @can('sub-manager-balance-on-topbar') Balance: {{ subManagerBalance() }} @endcan @can('manager_commission_top_ber') @if (auth()->user()->hasRole(['Reseller Admin', 'Reseller', 'Reseller Technician'])) Commission: {{ managerCommission() }} @endif @endcan @if (siteinfo()->online_offline_topbar == 'Yes') @cannot('specific_management_services') Online: Offline: @endcannot @endif @can('radius_online_customer_reset') @if (!checkAPI()) Delete Online Customer @endif @endcan @if (checkAPI() == false) @can('refresh') Refresh @endcan @endif @if (checkSettings('store') == 'enable') @hasanyrole('Reseller Admin|Reseller|Sub Reseller|Reseller Technician') @else Requisition @endhasanyrole @endif @if (checksettings('new-line-request') == 'enable') @unless (auth()->user()->hasRole('Reseller Technician')) {{ newClientRequestCount() }} 🔗 {{ newLineRequestMultiRouterYesSupportDoneYesPendingCount() }} @endunless @endif @if (checkSettings('store') == 'enable') @hasrole('Admin|Store Manager') {{ \App\Classes\AvailableStockCalculation::stock_alert() }} @endhasrole @endif @php $pendingPaymentIssueCount = auth()->user()->can('payment-issue-approve') ? \App\Models\PaymentIssue::where('status', 'pending')->count() : 0; // Counted once here: the badge and the dropdown under it show the // same figures, and each count runs the whole customer list query. $pendingCustomerCount = \App\Services\ClientServices::customerList('pendingCustomer')->count(); $finalPendingCustomerCount = checkSettings('local-user-first-approve') == 'enable' && auth()->user()->can('local-user-first-approve') ? \App\Services\ClientServices::customerList('finalPendingCustomer')->count() : 0; @endphp @if (checkSettings('local-user-first-approve') == 'enable') {{ $pendingCustomerCount + $pendingPaymentIssueCount }} @can('local-user-first-approve') /{{ $finalPendingCustomerCount }} @endcan @else {{ $pendingCustomerCount + $pendingPaymentIssueCount }} @endif Pending Customer {{ $pendingCustomerCount }} @if (operationApprovalEnabled()) @canany(['operation-approval-index', 'operation-approval']) Operation Pending Customer {{ \App\Services\ClientServices::customerList('operationPendingCustomer')->count() }} @endcanany @endif @if (checkSettings('local-user-first-approve') == 'enable') @can('local-user-first-approve') Final Pending Customer {{ $finalPendingCustomerCount }} @endcan @endif @if ($pendingPaymentIssueCount > 0) Pending Payment Issues {{ $pendingPaymentIssueCount }} @endif {{ Str::limit(auth()->user()->name, '10') }} @if (!empty(siteinfo())) @if (companyImageUrl(siteinfo()->img_url)) @else {{ Str::substr(siteinfo()->name, 0, 2) }} @endif @endif {{ Str::limit(auth()->user()->name, '15') }} {{ Auth::user()->getRoleNames()->first() }} My Profile @can('password-change') Password Change @endcan @csrf Logout @endunless
{{ Str::limit(auth()->user()->name, '15') }}