@if(auth()->user())
@forelse( $notifications as $created_at => $notificationss)
@php
$today = \Carbon\Carbon::parse(now());
$yesterday = \Carbon\Carbon::yesterday();
$createdat = \Carbon\Carbon::parse($created_at);
$dateformat1 = \Carbon\Carbon::parse($created_at)->format('Y-m-d');
@endphp
@if($createdat->format('Y-m-d') == $today->format('Y-m-d'))
Today
@elseif($createdat->format('Y-m-d') == $yesterday->format('Y-m-d'))
Yesterday
@else
{{$createdat->timezone(Auth::user()->timezone)->format(setting('date_format'))}}
@endif
@foreach ($notificationss as $notification)
@if(array_key_exists( 'ticketassign', $notification->data) && $notification->data['ticketassign'] == 'yes')
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Assigned Ticket', 'notification')}}
{{ $notification->data['ticket_id'] }} {{lang('Ticket is assigned.', 'notification')}} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Assigned Ticket', 'notification')}}
{{ $notification->data['ticket_id'] }} {{lang('Ticket is assigned.', 'notification')}} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@endif
@else
@if($notification->data['status'] == 'New')
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('New Ticket', 'notification')}}
{{lang('A new ticket has been created', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('New Ticket', 'notification')}}
{{lang('A new ticket has been created', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@if($notification->data['status'] == 'Closed')
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Closed Ticket', 'notification')}}
{{lang('This ticket has been closed', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Closed Ticket', 'notification')}}
{{lang('This ticket has been closed', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@if($notification->data['status'] == 'On-Hold')
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('On-Hold Ticket', 'notification')}}
{{lang('This ticket status is On-Hold', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('On-Hold Ticket', 'notification')}}
{{lang('This ticket status is On-Hold', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@if($notification->data['status'] == 'Re-Open')
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Re-Open Ticket', 'notification')}}
{{lang('This ticket has been reopened', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Re-Open Ticket', 'notification')}}
{{lang('This ticket has been reopened', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@if($notification->data['status'] == 'Inprogress')
@if($notification->data['overduestatus'] == 'Overdue')
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Overdue Ticket', 'notification')}}
{{lang('This ticket status is overdue', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Overdue Ticket', 'notification')}}
{{lang('This ticket status is overdue', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@endif
@else
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Inprogress Ticket', 'notification')}}
{{lang('You got a new reply on this ticket', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Inprogress Ticket', 'notification')}}
{{lang('You got a new reply on this ticket', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@endif
@if ($notification->data['status'] == 'mail')
@if($notification->read_at != null)
{{$notification->data['mailsubject']}}{{$notification->data['mailsendtag']}}
{{Str::limit($notification->data['mailtext'], '400', '...')}}{{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@else
{{$notification->data['mailsubject']}} {{$notification->data['mailsendtag']}}
{{Str::limit($notification->data['mailtext'], '400', '...')}}{{lang('View')}}
{{$notification->created_at->timezone(Auth::user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@endif
@endforeach
@empty
{{lang('There are no new notifications to display', 'notification')}}
{{lang('There are no notifications. We will notify you when the new notification arrives.', 'notification')}}
@endforelse
{{ auth()->user()->notifications()->paginate(10)->links('admin.notificationpagination') }}
@endif