Improve netmail sent/receive information
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 35s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m47s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2024-10-21 17:46:33 +11:00
parent 53c5488df7
commit a6e911fb48
2 changed files with 8 additions and 3 deletions

View File

@ -241,6 +241,11 @@ final class Netmail extends Model implements Packet
->using(ViaPivot::class);
}
public function sent()
{
return $this->belongsTo(Address::class);
}
public function tftn()
{
return $this

View File

@ -106,7 +106,7 @@ use App\Models\{Echomail,Netmail};
RECEIVED:<br>
@if($msg instanceof Netmail)
@foreach ($msg->path as $path)
<strong class="highlight">{{ $path->pivot->recv_pkt }}</strong> from <strong class="highlight">{{ $path->ftn }}</strong> {{ $msg->created_at }}<br>
<strong class="highlight">{{ $msg->created_at }}</strong> via <strong class="highlight">{{ $path->ftn }}</strong> pkt <strong class="highlight">{{ $path->pivot->recv_pkt }}</strong><br>
@endforeach
@elseif ($msg instanceof Echomail)
<strong class="highlight">{{ ($x=$msg->path->sortBy('pivot.parent_id')->last())->pivot->recv_pkt }}</strong> from <strong class="highlight">{{ $x->ftn }}</strong> {{ $x->pivot->recv_at }}<br>
@ -117,9 +117,9 @@ use App\Models\{Echomail,Netmail};
@if($msg instanceof Netmail)
<div class="col-8">
SENT:
SENT:<br>
@if($msg->sent_pkt && $msg->sent_at)
<strong class="highlight">{{ $msg->sent_at }}</strong> (<strong class="highlight">{{ $msg->sent_pkt }}.pkt</strong>)
<strong class="highlight">{{ $msg->sent_at }}</strong> via <strong class="highlight">{{ $msg->sent->ftn }}</strong> pkt <strong class="highlight">{{ $msg->sent_pkt }}</strong>
@else
<strong class="highlight">NOT SENT</strong>
@endif