@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 (array_key_exists('reasonofinfo', $notification->data) && $notification->data['reasonofinfo'] == 'adminreset2fa')
@if ($notification->read_at != null)
{{ Str::limit($notification->data['title'], '50', '...') }}
{{ lang('Two Factor Authentication', 'notification') }}
{{ lang('Your two factor authentication details are removed by admin.', 'notification') }}
{{ \Carbon\Carbon::parse($notification->created_at)->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format')) }}
@else
{{ Str::limit($notification->data['title'], '50', '...') }}
{{ lang('Two Factor Authentication', 'notification') }}
{{ lang('Your two factor authentication details are removed by admin.', 'notification') }}
{{ \Carbon\Carbon::parse($notification->created_at)->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format')) }}
@endif
@else
@if ($notification->data['status'] == 'New')
@if ($notification->read_at != null)
{{ Str::limit($notification->data['title'], '50', '...') }}
@if(isset($notification->data['replystatus']) && $notification->data['replystatus'] == 'Bot-Replied') {{lang('Bot Replied', 'notification')}} @else {{ lang('New Ticket', 'notification') }} @endif
@if(isset($notification->data['replystatus']) && $notification->data['replystatus'] == 'Bot-Replied') {{lang('You got a new reply on this ticket', 'notification')}} @else {{ lang('Your new ticket has been created', 'notification') }} @endif
{{ $notification->data['ticket_id'] }}
{{ lang('View') }}
{{ \Carbon\Carbon::parse($notification->created_at)->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format')) }}
@else
{{ Str::limit($notification->data['title'], '50', '...') }}
@if(isset($notification->data['replystatus']) && $notification->data['replystatus'] == 'Bot-Replied') {{lang('Bot Replied', 'notification')}} @else {{ lang('New Ticket', 'notification') }} @endif
@if(isset($notification->data['replystatus']) && $notification->data['replystatus'] == 'Bot-Replied') {{lang('You got a new reply on this ticket', 'notification')}} @else {{ lang('Your new ticket has been created', 'notification') }} @endif
{{ $notification->data['ticket_id'] }}
{{ lang('View') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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') }}
{{ \Carbon\Carbon::parse($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'] }}
{{ strip_tags(Str::limit($notification->data['mailtext'], '70')) }}{{ lang('View') }}
{{ \Carbon\Carbon::parse($notification->created_at)->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format')) }}
@else
{{ $notification->data['mailsubject'] }}
{{ $notification->data['mailsendtag'] }}
{{ strip_tags(Str::limit($notification->data['mailtext'], '70')) }}{{ lang('View') }}
{{ \Carbon\Carbon::parse($notification->created_at)->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format')) }}
@endif
@endif
@if(($notification->data['status'] == 'invoice') && ($notification->data['itemStatus'] == 'pending'))
@php
$id = decrypt($notification->data['invoice_id']);
$invoiceExists = \App\Models\AllTransactions::where('invoiceId', $id)->exists();
@endphp
@if($notification->read_at != null)
{{ lang('New custom invoice created.')}}
{{ lang('Custom Invoice Created', 'notification') }}
@if($invoiceExists)
{{ Str::limit(lang('A new custom invoice is created', 'notification'), '30' , '...' ) }} {{lang('View')}}
@endif
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@else
{{ lang('New custom invoice created.')}}
{{ lang('Custom Invoice Created', 'notification') }}
{{ Str::limit(lang('A new custom invoice is created', 'notification'), '30' , '...' ) }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@if($notification->data['status'] == 'invoice' && $notification->data['itemStatus'] == 'refundRejected')
@if($notification->read_at != null)
{{ lang('Your refund request is rejected.') }}
{{lang('Refund Rejected', 'notification')}}
{{ lang('Your refund request has been rejected.') }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@else
{{ lang('Your refund request is rejected.') }}
{{lang('Refund Rejected', 'notification')}}
{{ lang('Your refund request has been rejected.') }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@endif
@endif
@if($notification->data['status'] == 'invoice' && $notification->data['itemStatus'] == 'refunded')
@if($notification->read_at != null)
{{ lang('Your refund request is approved.') }}
{{lang('Refund Approved', 'notification')}}
{{ lang('Your refund request has been approved.') }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->user()->timezone)->format(setting('time_format'))}}
@else
{{ lang('Your refund request is approved.') }}
{{lang('Refund Approved', 'notification')}}
{{ lang('Your refund request has been approved.') }} {{lang('View')}}
{{$notification->created_at->timezone(Auth::guard('customer')->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()->guard('customer')->user()->notifications()->paginate(10)->links('admin.notificationpagination') }}
@endif