@if(auth()->guard('customer')->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'))
{{lang('Today')}}
@elseif($createdat->format('Y-m-d') == $yesterday->format('Y-m-d'))
{{lang('Yesterday')}}
@else
{{$createdat->timezone(Auth::guard('customer')->user()->timezone)->format(setting('date_format'))}}
@endif
@foreach ($notificationss as $notification)
@if($notification->data['status'] == 'New')
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('New Ticket', 'notification')}}
{{lang('Your new ticket has been created', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('New Ticket', 'notification')}}
{{lang('Your new ticket has been created', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->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('Your ticket has been closed', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Closed Ticket', 'notification')}}
{{lang('Your ticket has been closed', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->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('Your ticket status is On-Hold', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('On-Hold Ticket', 'notification')}}
{{lang('Your ticket status is On-Hold', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@if($notification->data['status'] == 'overdue')
@if($notification->read_at != null)
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Overdue Ticket', 'notification')}}
{{lang('Your ticket status is overdue', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Overdue Ticket', 'notification')}}
{{lang('Your ticket status is overdue', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->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('Your ticket has been Reopened', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@else
{{Str::limit($notification->data['title'], '50', '...')}} {{lang('Re-Open Ticket', 'notification')}}
{{lang('Your ticket has been Reopened', 'notification')}} {{ $notification->data['ticket_id'] }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@if($notification->data['status'] == 'Inprogress')
@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::guard('customer')->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::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@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::guard('customer')->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::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@endif
@endif
{{-- @if($loop->last)
Mark all as read
@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()->guard('customer')->user()->notifications()->paginate(10)->links('admin.notificationpagination') }}
@endif