Memperbaiki Label Jenis Kantor Pada Edit Create, ijin usaha dan jenis aset dari tombol switch menjadi multiple dropdown
This commit is contained in:
@@ -49,11 +49,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Kantor Cabang</label>
|
||||
<label class="form-label max-w-56">Jenis Kantor</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select class="input tomselect @error('jenis_kantor') border-danger @enderror"
|
||||
name="jenis_kantor">
|
||||
<option value="">Pilih Kantor Cabang</option>
|
||||
<option value="">Pilih Jenis Kantor</option>
|
||||
@if (isset($branch))
|
||||
@if (isset($kjpp))
|
||||
@foreach ($branch as $branches)
|
||||
@@ -345,46 +345,51 @@
|
||||
<label class="form-label max-w-56">
|
||||
Ijin Usaha
|
||||
</label>
|
||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||
@foreach ($ijin_usaha as $row)
|
||||
<label class="switch">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select name="ijin_usaha_id[]" multiple="multiple"
|
||||
class="input tomselect w-full @error('ijin_usaha_id') border-danger @enderror">
|
||||
<option value="">Pilih Ijin Usaha</option>
|
||||
@foreach ($ijin_usaha as $row)
|
||||
@if (isset($kjpp->ijin_usaha_id))
|
||||
<input type="checkbox"
|
||||
@if (in_array($row->code, old('ijin_usaha_id', json_decode($kjpp->ijin_usaha_id, true)))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="ijin_usaha_id[]" />
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('ijin_usaha_id', json_decode($kjpp->ijin_usaha_id, true))) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<input type="checkbox"
|
||||
@if (in_array($row->code, old('ijin_usaha_id', []))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="ijin_usaha_id[]" />
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('ijin_usaha_id', [])) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
<span class="switch-label">
|
||||
{{ $row->name }}
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@error('ijin_usaha_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Pengalaman (Jenis Aset)
|
||||
</label>
|
||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||
@foreach ($jenis_aset as $row)
|
||||
<label class="switch">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select name="jenis_aset_id[]" multiple="multiple"
|
||||
class="input tomselect w-full @error('jenis_aset_id') border-danger @enderror">
|
||||
<option value="">Pilih Jenis Aset</option>
|
||||
@foreach ($jenis_aset as $row)
|
||||
@if (isset($kjpp->jenis_aset_id))
|
||||
<input type="checkbox"
|
||||
@if (in_array($row->code, old('jenis_aset_id', json_decode($kjpp->jenis_aset_id, true)))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="jenis_aset_id[]" />
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('jenis_aset_id', json_decode($kjpp->jenis_aset_id, true))) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<input type="checkbox"
|
||||
@if (in_array($row->code, old('jenis_aset_id', []))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="jenis_aset_id[]" />
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('jenis_aset_id', [])) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
<span class="switch-label">
|
||||
{{ $row->name }}
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
|
||||
@@ -148,32 +148,46 @@
|
||||
<label class="form-label max-w-56">
|
||||
Ijin Usaha
|
||||
</label>
|
||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||
@foreach ($ijin_usahas as $row)
|
||||
<label class="switch">
|
||||
<input type="checkbox" @if (in_array($row->code, old('ijin_usaha_id', json_decode($kjpp->ijin_usaha_id, true)))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="ijin_usaha_id[]" disabled="" />
|
||||
<span class="switch-label">
|
||||
{{ $row->name }}
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select name="ijin_usaha_id[]" multiple="multiple" class="input tomselect w-full" disabled>
|
||||
<option value="">Pilih Ijin Usaha</option>
|
||||
@foreach ($ijin_usahas as $row)
|
||||
@if (isset($kjpp->ijin_usaha_id))
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('ijin_usaha_id', json_decode($kjpp->ijin_usaha_id, true))) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('ijin_usaha_id', [])) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Pengalaman (Jenis Aset)
|
||||
</label>
|
||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||
@foreach ($jenis_jaminan as $row)
|
||||
<label class="switch">
|
||||
<input type="checkbox" @if (in_array($row->code, old('jenis_aset_id', json_decode($kjpp->jenis_aset_id, true)))) {{ 'checked' }} @endif
|
||||
value="{{ $row->code }}" name="jenis_aset_id[]" disabled="" />
|
||||
<span class="switch-label">
|
||||
{{ $row->name }}
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select name="jenis_aset_id[]" multiple="multiple" class="input tomselect w-full" disabled>
|
||||
<option value="">Pilih Jenis Aset</option>
|
||||
@foreach ($jenis_jaminan as $row)
|
||||
@if (isset($kjpp->jenis_aset_id))
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('jenis_aset_id', json_decode($kjpp->jenis_aset_id, true))) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('jenis_aset_id', [])) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
|
||||
Reference in New Issue
Block a user