From 00bdcfba03401ed06ef70693844b65e718c1f8d7 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 3 Dec 2022 13:35:23 +1100 Subject: [PATCH] Minor bug fixes for migration rollback, domain/list and system last_seen --- database/migrations/2022_10_22_001507_echoarea.php | 2 +- database/migrations/2022_10_22_001607_echomails.php | 1 + resources/views/domain/list.blade.php | 4 ++-- resources/views/system/view.blade.php | 8 ++++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/database/migrations/2022_10_22_001507_echoarea.php b/database/migrations/2022_10_22_001507_echoarea.php index b15307d..4b87114 100644 --- a/database/migrations/2022_10_22_001507_echoarea.php +++ b/database/migrations/2022_10_22_001507_echoarea.php @@ -73,7 +73,7 @@ class Echoarea extends Migration */ public function down() { - Schema::dropIfExists('address_echomail'); + Schema::dropIfExists('address_echoarea'); Schema::dropIfExists('address_filearea'); Schema::dropIfExists('fileareas'); diff --git a/database/migrations/2022_10_22_001607_echomails.php b/database/migrations/2022_10_22_001607_echomails.php index d23c872..d5de8de 100644 --- a/database/migrations/2022_10_22_001607_echomails.php +++ b/database/migrations/2022_10_22_001607_echomails.php @@ -86,6 +86,7 @@ class Echomails extends Migration */ public function down() { + Schema::dropIfExists('echomail_seenby'); Schema::dropIfExists('echomail_path'); Schema::dropIfExists('echomails'); } diff --git a/resources/views/domain/list.blade.php b/resources/views/domain/list.blade.php index 0f8c08a..5b81425 100644 --- a/resources/views/domain/list.blade.php +++ b/resources/views/domain/list.blade.php @@ -31,8 +31,8 @@ {{ $do->active ? 'YES' : 'NO' }} {{ $do->managed() ? 'YES' : 'NO' }} - @foreach (($x=$do->zones->pluck('addresses')->flatten())->where('role',\App\Models\Address::NODE_ZC) as $ao) - {{ $ao->system->sysop }}, {{ $ao->system->name }} + @foreach (($x=$do->zones->pluck('addresses')->flatten())->where('role',\App\Models\Address::NODE_ZC)->sortBy('zone.zone_id') as $ao) + {{ $ao->system->sysop }}, {{ $ao->system->name }}
@endforeach {{ $x->pluck('system')->unique('name')->count() }} diff --git a/resources/views/system/view.blade.php b/resources/views/system/view.blade.php index ae4c3b3..3f76c72 100644 --- a/resources/views/system/view.blade.php +++ b/resources/views/system/view.blade.php @@ -31,16 +31,16 @@ Mailer {{ $o->access_mailer }} - - Last Seen - {{ $o->logs->last()->created_at }} - @if($o->phone) Phone {{ $o->phone }} @endif + + Last Seen + {{ $o->logs->count() ? $o->logs->last()->created_at : '-' }} + @if($o->addresses->count()) FTN Addresses