From df559b6b39655d5b452a0bf0ecf557a55f47c4e4 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 29 Jul 2023 20:50:56 +1000 Subject: [PATCH] Show correct zone_id in echoarea/filearea selection --- resources/views/system/form-echoarea.blade.php | 11 +++++------ resources/views/system/form-filearea.blade.php | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/resources/views/system/form-echoarea.blade.php b/resources/views/system/form-echoarea.blade.php index 9c44ab5..cc0041d 100644 --- a/resources/views/system/form-echoarea.blade.php +++ b/resources/views/system/form-echoarea.blade.php @@ -1,7 +1,6 @@ -@if(($x=\App\Models\Domain::active() - ->select('domains.*') - ->join('zones',['zones.domain_id'=>'domains.id']) - ->whereIn('zones.id',$o->sessions->pluck('pivot.zone_id')) +@if(($x=\App\Models\Zone::active() + ->whereIn('id',$o->sessions->pluck('pivot.zone_id')) + ->orderBy('zone_id') ->get())->count())
@@ -18,8 +17,8 @@ diff --git a/resources/views/system/form-filearea.blade.php b/resources/views/system/form-filearea.blade.php index 22e228e..a46e1f4 100644 --- a/resources/views/system/form-filearea.blade.php +++ b/resources/views/system/form-filearea.blade.php @@ -1,7 +1,6 @@ -@if(($x=\App\Models\Domain::active() - ->select('domains.*') - ->join('zones',['zones.domain_id'=>'domains.id']) - ->whereIn('zones.id',$o->sessions->pluck('pivot.zone_id')) +@if(($x=\App\Models\Zone::active() + ->whereIn('id',$o->sessions->pluck('pivot.zone_id')) + ->orderBy('zone_id') ->get())->count()) @@ -18,8 +17,8 @@