@php $notifys = auth()->user()->unreadNotifications()->paginate(2); $badgecount = auth()->user()->unreadNotifications->count(); @endphp @forelse( $notifys as $notification) @if(array_key_exists('reasonofinfo', $notification->data) && $notification->data['reasonofinfo'] == 'adminreset2fa')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('Your two factor authentication details are removed by admin', 'notification')}}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@elseif(array_key_exists('ticketassign', $notification->data) && $notification->data['ticketassign'] == 'yes')
{{ Str::limit($notification->data['title'], '30') }}

{{ $notification->data['ticket_id'] }} {{lang('Ticket is assigned', 'notification')}}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@elseif(array_key_exists('draftnotify', $notification->data) && $notification->data['draftnotify'] == 'draftcreated')
{{ lang('Draft') }} {{ lang($notification->data['title']) }}

{{ $notification->data['ticket_id'] }} {{lang('Ticket Draft is ', 'notification')}} {{ $notification->data['title'] }} {{ lang(' By ') }} {{ lang($notification->data['created_username']) }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@else @if($notification->data['status'] == 'New') @if(isset($notification->data['replystatus']) && $notification->data['replystatus'] == 'Replied')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('You got a new reply on this ticket', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@else @if($notification->data['overduestatus'] == 'Overdue')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('This ticket status is overdue', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@else {{-- {{$stringreplaceurl}} --}}
{{ Str::limit($notification->data['title'], '30') }}

{{lang('A new ticket has been created', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @endif @endif @if($notification->data['status'] == 'Closed')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('This ticket has been closed', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['status'] == 'On-Hold')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('This ticket status is On-Hold', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['status'] == 'Re-Open')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('This ticket has been reopened', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if($notification->data['status'] == 'Inprogress') @if($notification->data['overduestatus'] == 'Overdue')
{{ Str::limit($notification->data['title'], '30') }}

{{lang('This ticket status is overdue', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@else
{{ Str::limit($notification->data['title'], '30') }}

{{lang('You got a new reply on this ticket', 'notification')}} {{ $notification->data['ticket_id'] }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @endif @if ($notification->data['status'] == 'mail')
{{$notification->data['mailsubject']}}

{{ strip_tags(Str::limit($notification->data['mailtext'], '30', '...')) }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if ($notification->data['status'] == 'invoice') @php $id = decrypt($notification->data['invoice_id']); $invoiceExists = \App\Models\AllTransactions::where('invoiceId', $id)->exists(); @endphp @if($notification->data['itemStatus'] == 'pending') {{-- @if($invoiceExists) --}} {{-- @endif --}}
{{ lang('New custom invoice created.') }}

{{ Str::limit(lang('A new custom invoice is created', 'notification'), '30' , '...') }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
{{-- @if ($invoiceExists) --}}
{{-- @endif --}} @endif @if ($notification->data['itemStatus'] == 'refundpending')
{{ lang('Recieved a new refund request') }}

{{ Str::limit($notification->data['reason'], '30') }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @if ($notification->data['itemStatus'] == 'refunded')
{{ lang('Recieved a new refund request for #'.$notification->data['invoice_id']) }}

{{ Str::limit($notification->data['reason'], '30') }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}
@endif @endif @endif @empty

{{lang('There are no new notifications to display', 'notification')}}

@endforelse