Change rendering of user's home, taking into account systems that have been marked inactive
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 35s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m30s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-12-02 19:57:39 +11:00
parent 09a0139839
commit 37549a90b7
2 changed files with 63 additions and 58 deletions

View File

@ -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();

View File

@ -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>