@extends('layouts.app') @section('css') @endsection @section('content')
Welcome to your inbox Mail Dashboard
--}} {{--ID | User ID | Sender Name | Sender Email | Subject | Attachment | Sent Date | {{--is_spam | --}} @if ($type == 'Reply pending mail')Waiting for Reply Since | @endif @if ($type == 'Replied Mail')Replied Date | {{--Response Time | --}} @endif @if ($type == 'Read Mail' || $type == 'Un-Read Mail' || $type == 'All Mail') @if ($type == 'All Mail')Message Status | Sentiment | {{--Group By | --}}Action Required | @endif {{--Types Mail | --}} {{-- @elseif ($type == 'send-mail')Spam Status | --}} @endifActions |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ $loop->iteration }} | {{ $mail->email_id }} | {{ $mail->sender_name }} | {{ $mail->sender_email }} | {{ $mail->subject === 'No Subject' ? '-' : $mail->subject }} | {{ $mail->attachment_status == 1 ? 'Yes' : 'No' }} | {{ $sent->format('d M Y H:i A') }} | @if ($type == 'Reply pending mail') @php $now = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $interval = $sent->diff($now); // Difference formatting $diffParts = []; if ($interval->y) { $diffParts[] = "{$interval->y} years"; } if ($interval->m) { $diffParts[] = "{$interval->m} months"; } if ($interval->d) { $diffParts[] = "{$interval->d} days"; } if ($interval->h) { $diffParts[] = "{$interval->h} hours"; } if ($interval->i) { $diffParts[] = "{$interval->i} minutes"; } if ($interval->s) { $diffParts[] = "{$interval->s} seconds"; } $diffText = implode(' ', $diffParts) . ' ago'; // Color logic if ($interval->y >= 2) { $color = 'text-dark'; } elseif ($interval->y >= 1) { $color = 'text-secondary'; } elseif ($interval->m >= 6) { $color = 'text-warning'; } elseif ($interval->m >= 1) { $color = 'text-danger'; } elseif ($interval->d >= 2) { $color = 'text-danger'; } elseif ($interval->d == 1) { $color = 'text-primary'; } else { $color = 'text-success'; } @endphp{{ $diffText }} | @endif @if ($type == 'Replied Mail'){{ $replied->format('d M Y H:i A') }} | @php $interval = $sent->diff($replied); $diffParts = []; if ($interval->y) { $diffParts[] = "{$interval->y} years"; } if ($interval->m) { $diffParts[] = "{$interval->m} months"; } if ($interval->d) { $diffParts[] = "{$interval->d} days"; } if ($interval->h) { $diffParts[] = "{$interval->h} hours"; } if ($interval->i) { $diffParts[] = "{$interval->i} minutes"; } if ($interval->s) { $diffParts[] = "{$interval->s} seconds"; } $diffText = implode(' ', $diffParts); // Color logic if ($interval->y >= 1) { $color = 'text-secondary'; } elseif ($interval->m >= 1) { $color = 'text-warning'; } elseif ($interval->d >= 2) { $color = 'text-danger'; } elseif ($interval->d == 1) { $color = 'text-primary'; } else { $color = 'text-success'; } @endphp {{--{{ $diffText }} | --}} @endif @if ($type == 'Read Mail' || $type == 'Un-Read Mail' || $type == 'All Mail') @if ($type == 'All Mail'){{ $mail->message_status == 1 ? 'Read' : 'Unread' }} | {{-- Sentiment --}}{{ $mail->is_promotion == 1 ? 'Promotion / ' : '' }}{{ ucfirst($mail->is_spam_value) }} | {{-- Category --}} {{--{{$mail->is_category_value }} | --}}{{ $mail->action_required == 1 ? 'Yes' : 'No' }} | @endif {{--@php switch ($mail->is_spam) { case 0: $statusText = 'Negative'; break; case 1: $statusText = 'Positive'; break; case 2: $statusText = 'Reply Mail'; break; case 3: $statusText = 'Neutral'; break; case 4: $statusText = 'Promotion'; break; case 5: $statusText = 'Sales'; break; case 6: $statusText = 'AMC'; break; default: $statusText = 'Unknown'; break; } @endphp {{ $statusText }} | --}} {{-- @elseif ($type == 'send-mail')ok | --}} @endif {{--{{ $mail->is_spam }}1 | --}}
View
{{--
{{-- View --}}
--}}
{{-- --}}
{{-- {{ $counts['countis_not_spam_heading'] ?? 'Negative' }} --}}
{{-- View
@if ($mail->new_feteched_data == '0')
--}}
{{-- ! --}}
{{-- {{ $mail->related_message_status }} --}}
{{-- {{ $mail->message_status }}{{ $mail->related_email_id }} --}}
{{--
@endif --}}
{{-- --}}
@if ($mail->sent_mail_id != -1)
{{-- {{ $mail->sent_mail_id }} --}}
{{-- {{ $mail->action_required }} --}}
@if ($mail->action_required == 1)
@endif
@endif
|
ID | Sender Name | Sender Email | Subject | Sent Date | Attachment | Message Status | @if ($type == 'all') @elseif ($type != 'Read')Spam Status | @endifActions |
---|---|---|---|---|---|---|---|---|
{{ $mail->email_id }} | {{ $mail->sender_name }} | {{ $mail->sender_email }} | {{ $mail->subject }} | {{ $mail->sent_date }} | {{ $mail->attachment_status == 1 ? 'Yes' : 'No' }} | {{ $mail->message_status == 1 ? 'Read' : 'Unread' }} | @if ($type == 'all') @elseif ($type != 'Read'){{ $mail->is_spam == 1 ? 'Not Spam' : 'Spam' }} | @endifView |