Change rendering of user's home, taking into account systems that have been marked inactive
This commit is contained in:
parent
09a0139839
commit
37549a90b7
@ -81,6 +81,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
->join('systems',['systems.id'=>'addresses.system_id'])
|
->join('systems',['systems.id'=>'addresses.system_id'])
|
||||||
->join('system_user',['system_user.system_id'=>'systems.id'])
|
->join('system_user',['system_user.system_id'=>'systems.id'])
|
||||||
->where('system_user.user_id',$this->id)
|
->where('system_user.user_id',$this->id)
|
||||||
|
->where('systems.active',TRUE)
|
||||||
->ActiveFTN()
|
->ActiveFTN()
|
||||||
->FTN()
|
->FTN()
|
||||||
->get();
|
->get();
|
||||||
|
@ -22,14 +22,14 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
|
|||||||
|
|
||||||
<div class="row pt-2">
|
<div class="row pt-2">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
@if(($x=$user
|
||||||
|
->addresses()
|
||||||
|
->diff(our_address())
|
||||||
|
->filter(fn($item)=>($item->point_id === 0) && ($item->zone->domain->isManaged())))->count())
|
||||||
<h2>Hub Details for your nets</h2>
|
<h2>Hub Details for your nets</h2>
|
||||||
|
|
||||||
<div class="accordion" id="accordion_details">
|
<div class="accordion" id="accordion_details">
|
||||||
@foreach($user
|
@foreach($x->groupBy('zone.domain.name') as $list)
|
||||||
->addresses()
|
|
||||||
->diff(our_address())
|
|
||||||
->filter(fn($item)=>($item->point_id === 0) && ($item->zone->domain->isManaged()))
|
|
||||||
->groupBy('zone.domain.name') as $list)
|
|
||||||
<!-- {{ $x=$list->first()->domain->name }} -->
|
<!-- {{ $x=$list->first()->domain->name }} -->
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h3 class="accordion-header">
|
<h3 class="accordion-header">
|
||||||
@ -82,6 +82,7 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
|
|||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -119,8 +120,9 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
|
|||||||
<h3>Active and Available Echos</h3>
|
<h3>Active and Available Echos</h3>
|
||||||
<table class="table monotable">
|
<table class="table monotable">
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (($dl=$user
|
@forelse(($dl=$user
|
||||||
->systems
|
->systems
|
||||||
|
->where('active',TRUE)
|
||||||
->pluck('akas')->flatten()
|
->pluck('akas')->flatten()
|
||||||
->pluck('zone.domain')
|
->pluck('zone.domain')
|
||||||
->unique()
|
->unique()
|
||||||
@ -137,7 +139,9 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
|
|||||||
@endforeach
|
@endforeach
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@empty
|
||||||
|
<p>We share no active FTN addresses, so there are no Echos available</p>
|
||||||
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user