mengubah dropdown multiple ijin usaha dan jenis aset menjadi bisa klik silang ketika tidak mau dipilih di menu kjpp
This commit is contained in:
@@ -347,20 +347,14 @@
|
||||
</label>
|
||||
<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">
|
||||
class="input tomselect w-full @error('ijin_usaha_id') border-danger @enderror"
|
||||
id="ijin_usaha_select">
|
||||
<option value="">Pilih Ijin Usaha</option>
|
||||
@foreach ($ijin_usaha 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
|
||||
<option value="{{ $row->code }}"
|
||||
{{ isset($kjpp->ijin_usaha_id) ? (in_array($row->code, old('ijin_usaha_id', json_decode($kjpp->ijin_usaha_id, true))) ? 'selected' : '') : (in_array($row->code, old('ijin_usaha_id', [])) ? 'selected' : '') }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@@ -374,20 +368,14 @@
|
||||
</label>
|
||||
<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">
|
||||
class="input tomselect w-full @error('jenis_aset_id') border-danger @enderror"
|
||||
id="jenis_aset_select">
|
||||
<option value="">Pilih Jenis Aset</option>
|
||||
@foreach ($jenis_aset 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
|
||||
<option value="{{ $row->code }}"
|
||||
{{ in_array($row->code, old('jenis_aset_id', json_decode($kjpp->jenis_aset_id ?? '[]', true))) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user