update print out
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
@endphp
|
||||
|
||||
<div id="luas_tanah_bagunan_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ old('luas_tanah_bagunan_tidak_sesuai', $selectedData) ? '' : 'display: none'}}">
|
||||
style="{{ old('luas_tanah_bagunan_tidak_sesuai', $selectedData) ? '' : 'display: none' }}">
|
||||
<input type="text" id="analisa_bangunan_tidak_sesuai"
|
||||
name="luas_tanah_bagunan_tidak_sesuai" class="input w-full"
|
||||
placeholder="Masukan Luas Bangunan Tidak Sesuai..."
|
||||
@@ -75,10 +75,11 @@
|
||||
<input class="checkbox" name="jenis_bangunan[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ (is_array(old('jenis_bangunan')) && in_array($item->name, old('jenis_bangunan'))) ||
|
||||
(isset($forminspeksi['bangunan']['jenis_bangunan']) &&
|
||||
(isset($forminspeksi['bangunan']['jenis_bangunan']) &&
|
||||
(is_array($forminspeksi['bangunan']['jenis_bangunan']) &&
|
||||
in_array($item->name, $forminspeksi['bangunan']['jenis_bangunan'])))
|
||||
? 'checked' : '' }}
|
||||
in_array($item->name, $forminspeksi['bangunan']['jenis_bangunan'])))
|
||||
? 'checked'
|
||||
: '' }}
|
||||
onclick="toggleCheckboxVisibility('jenis_bangunan', 'jenis_bangunan_lainnya', ['lainnya'])" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@@ -169,17 +170,14 @@
|
||||
@if (@isset($basicData['spekKategoriBangunan']))
|
||||
@foreach ($basicData['spekKategoriBangunan'] as $item)
|
||||
<div>
|
||||
<input type="hidden" name="spek_kategori_bangunan[]"
|
||||
value="{{ $item->name }}">
|
||||
<input type="hidden" name="spek_kategori_bangunan[]" value="{{ $item->name }}">
|
||||
<label
|
||||
class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="flex flex-col items-start gap-4"
|
||||
style="margin-top: 10px">
|
||||
<div class="flex flex-col items-start gap-4" style="margin-top: 10px">
|
||||
@foreach ($basicData['spekBangunan'] as $spek)
|
||||
@if ($spek->spek_kategori_bangunan_id == $item->id)
|
||||
<label
|
||||
class="form-label flex items-center gap-2.5">
|
||||
<label class="form-label flex items-center gap-2.5">
|
||||
<input class="checkbox"
|
||||
name="spek_bangunan[{{ $index }}][{{ $item->name }}][]"
|
||||
type="checkbox"
|
||||
@@ -192,17 +190,20 @@
|
||||
</label>
|
||||
@endif
|
||||
@endforeach
|
||||
<label class="form-label flex items-center gap-2.5 mt-2">
|
||||
<input class="input" type="text"
|
||||
name="spek_bangunan[{{ $index }}][{{ $item->name }}][lainnya]"
|
||||
placeholder="Lainnya (sebutkan)"
|
||||
value="{{ isset($bangunan['spek_kategori_bangunan'][$item->name]['lainnya']) ? $bangunan['spek_kategori_bangunan'][$item->name]['lainnya'] : '' }}">
|
||||
</label>
|
||||
</div>
|
||||
<em id="error-spek_bangunan_{{ $item->name }}"
|
||||
class="alert text-danger text-sm"></em>
|
||||
<em id="error-spek_bangunan_{{ $item->name }}" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<button type="button"
|
||||
class="mt-2 btn btn-danger btn-outline btn-xs delete-button"
|
||||
style="display: none;">Hapus</button>
|
||||
<button type="button" class="mt-2 btn btn-danger btn-outline btn-xs delete-button" style="display: none;">Hapus</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
@@ -213,13 +214,10 @@
|
||||
@if (@isset($basicData['spekKategoriBangunan']))
|
||||
@foreach ($basicData['spekKategoriBangunan'] as $item)
|
||||
<div>
|
||||
<input type="hidden" name="spek_kategori_bangunan[]"
|
||||
value="{{ $item->name }}">
|
||||
<label
|
||||
class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
|
||||
<input type="hidden" name="spek_kategori_bangunan[]" value="{{ $item->name }}">
|
||||
<label class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="flex flex-col items-start gap-4"
|
||||
style="margin-top: 10px">
|
||||
<div class="flex flex-col items-start gap-4" style="margin-top: 10px">
|
||||
@foreach ($basicData['spekBangunan'] as $spek)
|
||||
@if ($spek->spek_kategori_bangunan_id == $item->id)
|
||||
<label class="form-label flex items-center gap-2.5">
|
||||
@@ -231,16 +229,19 @@
|
||||
</label>
|
||||
@endif
|
||||
@endforeach
|
||||
<label class="form-label flex items-center gap-2.5 mt-2">
|
||||
<input class=input" type="text"
|
||||
name="spek_bangunan[0][{{ $item->name }}][lainnya]"
|
||||
placeholder="Lainnya (sebutkan)">
|
||||
</label>
|
||||
</div>
|
||||
<em id="error-spek_bangunan_{{ $item->name }}"
|
||||
class="alert text-danger text-sm"></em>
|
||||
<em id="error-spek_bangunan_{{ $item->name }}" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<button type="button" class="mt-2 btn btn-danger btn-outline btn-xs delete-button"
|
||||
style="display: none;">Hapus</button>
|
||||
<button type="button" class="mt-2 btn btn-danger btn-outline btn-xs delete-button" style="display: none;">Hapus</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@@ -252,10 +253,10 @@
|
||||
<i class="ki-filled ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Sarana pelengkap -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Sarana Pelengkap</label>
|
||||
@@ -326,7 +327,7 @@
|
||||
input.name = `spek_bangunan[${index}][${matches[1]}][]`;
|
||||
}
|
||||
} else {
|
||||
// Handle other array inputs
|
||||
// Handle lainnya array inputs
|
||||
input.name = input.name.replace(/\[\d*\]/, `[${index}]`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user