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('system_user',['system_user.system_id'=>'systems.id'])
|
||||
->where('system_user.user_id',$this->id)
|
||||
->where('systems.active',TRUE)
|
||||
->ActiveFTN()
|
||||
->FTN()
|
||||
->get();
|
||||
|
@ -22,14 +22,14 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
|
||||
|
||||
<div class="row pt-2">
|
||||
<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>
|
||||
|
||||
<div class="accordion" id="accordion_details">
|
||||
@foreach($user
|
||||
->addresses()
|
||||
->diff(our_address())
|
||||
->filter(fn($item)=>($item->point_id === 0) && ($item->zone->domain->isManaged()))
|
||||
->groupBy('zone.domain.name') as $list)
|
||||
@foreach($x->groupBy('zone.domain.name') as $list)
|
||||
<!-- {{ $x=$list->first()->domain->name }} -->
|
||||
<div class="accordion-item">
|
||||
<h3 class="accordion-header">
|
||||
@ -82,6 +82,7 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -119,8 +120,9 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
|
||||
<h3>Active and Available Echos</h3>
|
||||
<table class="table monotable">
|
||||
<tbody>
|
||||
@foreach (($dl=$user
|
||||
@forelse(($dl=$user
|
||||
->systems
|
||||
->where('active',TRUE)
|
||||
->pluck('akas')->flatten()
|
||||
->pluck('zone.domain')
|
||||
->unique()
|
||||
@ -137,7 +139,9 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@empty
|
||||
<p>We share no active FTN addresses, so there are no Echos available</p>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user