Minor optimisations when editing and viewing domains

This commit is contained in:
2024-11-05 00:28:34 +11:00
parent dc2e84386f
commit 60ea0afc98
6 changed files with 91 additions and 73 deletions

View File

@@ -1,3 +1,4 @@
@use(App\Models\Address)
@use(Illuminate\Mail\Markdown)
<!-- $o=Domain::class -->
@@ -176,7 +177,7 @@
</div>
<!-- Sign up -->
@if ($o->can_accept_app)
@if ($o->can_accept_app && ($x=Auth::user()->systems->filter(fn($item)=>$item->address && (! $item->inDomain($o))))->count())
<div class="accordion-item">
<h3 class="accordion-header">
<span class="accordion-button collapsed" id="signup" data-bs-toggle="collapse" data-bs-target="#collapse_signup" aria-expanded="false" aria-controls="collapse_signup">Join Network</span>
@@ -184,7 +185,10 @@
<div id="collapse_signup" class="accordion-collapse collapse" aria-labelledby="signup" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
<p>Your system(s) <strong class="highlight">{!! $o->userHasSystemsNotInNet(Auth::user())->pluck('name')->join('</strong>, <strong class="highlight">') !!}</strong> can join this network.</p>
<p>Your system(s) <strong class="highlight">{!! $x->pluck('name')->sort()->join('</strong>, <strong class="highlight">') !!}</strong> can join this network.</p>
@if (($x=Auth::user()->systems->filter(fn($item)=>(! $item->address) && (! $item->inDomain($o))))->count())
<p><small>Your other systems(s) <strong class="highlight">{!! $x->pluck('name')->sort()->join('</strong>, <strong class="highlight">') !!}</strong> cant use this process, because they are missing network details.</small></p>
@endif
<p>
If you want to join it/them to this network, make sure:
</p>
@@ -206,7 +210,7 @@
<li>Enjoy!</li>
</ul>
<button class="btn btn-success">Lets Do It</button>
<button class="btn btn-success">Lets Do It</button> <small><-- NOT READY YET</small>
</div>
</div>
</div>