Address input fixes, region_id/host_id must not be null, address constraints changes

This commit is contained in:
Deon George
2021-06-25 16:42:12 +10:00
parent 848f41b382
commit 1f04f8374e
6 changed files with 77 additions and 13 deletions

View File

@@ -68,7 +68,7 @@
</thead>
<tbody>
@foreach ($o->zones as $oz)
@foreach ($o->zones->sortBy('zone_id') as $oz)
<!-- First System Zone -->
<tr>
<td>{{ sprintf('ZC-%s-%05d',$oz->domain->name,$oz->zone_id) }}</td>
@@ -80,7 +80,7 @@
</tr>
<!-- Other Nodes -->
@foreach ($oz->addresses()->FTNorder()->with(['system','zone.domain'])->get() as $ao)
@foreach ($oz->addresses()->active()->FTNorder()->whereNull('hub_id')->with(['system','zone.domain'])->get() as $ao)
<tr>
<td>{{ $ao->system->name($ao) }}</td>
<td>{{ $ao->system->sysop }}</td>
@@ -89,6 +89,18 @@
<td>{{ $ao->ftn }}</td>
<td>-</td>
</tr>
<!-- If this node is a hub -->
@foreach ($oz->addresses()->active()->FTNorder()->where('hub_id',$ao->id)->with(['system','zone.domain'])->get() as $aoo)
<tr>
<td>{{ $aoo->system->name($aoo) }}</td>
<td>{{ $aoo->system->sysop }}</td>
<td>{{ $ao->system->location }}</td>
<td>{{ $aoo->role }}</td>
<td>{{ $aoo->ftn }}</td>
<td>-</td>
</tr>
@endforeach
@endforeach
@endforeach
</tbody>