Fix assigning default when system has more than 1 AKA in different zones
This commit is contained in:
parent
988d4dda52
commit
0789ee9042
@ -112,7 +112,7 @@ class ZoneController extends Controller
|
||||
|
||||
$default = $o->systems->where('pivot.default',TRUE);
|
||||
|
||||
if ($default->first()->addresses->pluck('role')->search(DomainController::NODE_ZC) !== FALSE)
|
||||
if ($default->count() && $default->first()->addresses->pluck('role')->search(DomainController::NODE_ZC) !== FALSE)
|
||||
abort(412);
|
||||
|
||||
if ($default->count() && ($default->first()->id != $request->sid))
|
||||
|
@ -65,7 +65,7 @@ use App\Http\Controllers\DomainController as DC;
|
||||
@if(($x=$oo->systems->where('pivot.default',TRUE))->count() && ($x->first()->id !== $o->id))
|
||||
<i class="bi bi-dash-square"></i>
|
||||
@else
|
||||
<span id="default" itemid="{{$oo->id}}"><i class="bi bi-{{ $x->count() ? 'check-square' : 'square' }}"></i></span>
|
||||
<span class="default" itemid="{{$oo->id}}"><i class="bi bi-{{ $x->count() ? 'check-square' : 'square' }}"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $oo->pivot->sespass }}</td>
|
||||
@ -288,7 +288,7 @@ use App\Http\Controllers\DomainController as DC;
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#default').click(function() {
|
||||
$('.default').click(function() {
|
||||
var item = this;
|
||||
icon = $(item).find('i');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user