Some interface SQL performance improvements

This commit is contained in:
2024-05-11 00:00:58 +10:00
parent cd2efbd1d4
commit 4d13199848
8 changed files with 65 additions and 53 deletions

View File

@@ -1,4 +1,5 @@
@php
use App\Classes\FTN\Packet;
use App\Models\{Mailer,User};
@endphp
@@ -177,7 +178,7 @@
<div class="input-group">
<span class="input-group-text"><i class="bi bi-ui-radios"></i></span>
<select class="form-select @error('pkt_type') is-invalid @enderror" id="pkt_type" name="pkt_type" @cannot($action,$o)readonly @endcannot>
@foreach (\App\Classes\FTN\Packet::PACKET_TYPES as $type => $class)
@foreach (Packet::PACKET_TYPES as $type => $class)
<option value="{{ $type }}" @if(old('pkt_type',$o->pkt_type ?: config('fido.packet_default')) === $type)selected @endif>{{ $type }}</option>
@endforeach
</select>
@@ -349,7 +350,7 @@
Last Poll:
</div>
<div class="col-8">
<strong class="highlight">{{ ($x=$o->logs->where('originate',TRUE)->last())?->created_at ?: 'Never' }}</strong>
<strong class="highlight">{{ ($x=$o->logs()->where('originate',TRUE)->orderBy('created_at','DESC')->limit(1)->single())?->created_at ?: 'Never' }}</strong>
</div>
</div>