Fixes for saving a new system
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 41s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 2m8s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s

This commit is contained in:
2024-06-03 22:31:38 +10:00
parent 434226f8bc
commit 27cdb02b06
6 changed files with 23 additions and 12 deletions

View File

@@ -4,6 +4,10 @@
Register System
@endsection
@php
use App\Models\{Setup,System};
@endphp
@section('content')
<form class="needs-validation" method="post" autocomplete="off" novalidate>
@csrf
@@ -22,8 +26,9 @@
<span class="input-group-text"><i class="bi bi-laptop-fill"></i></span>
<select style="width: 80%;" class="form-select @error('system_id') is-invalid @enderror" id="system" name="id" required>
<option value="">&nbsp;</option>
@foreach (\App\Models\System::select(['systems.id','systems.name'])
@foreach (System::select(['systems.id','systems.name'])
->active()
->where('id','<>',Setup::findOrFail(config('app.id'))->system_id)
->whereRaw('id NOT IN (SELECT system_id FROM system_user)')
->cursor() as $oo)
<option value="{{ $oo->id }}" @if(old('id')===$oo->id)selected @endif>{{ $oo->name }}</option>