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}]`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<td class="px-4 py-2">Hak atas properti yang dialihkan</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="hak_properti" class="input"
|
||||
value="{{ $inspectionData['hak_properti'] ?? '' }}">
|
||||
value="{{ $inspectionData['asset']['hak_properti'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="hak_properti_pembanding[]"
|
||||
@@ -165,7 +165,7 @@
|
||||
<td class="px-4 py-2">Penawaran/ Transaksi</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="penawaran" class="input"
|
||||
value="{{ $inspectionData['penawaran'] ?? '' }}">
|
||||
value="{{ $inspectionData['asset']['penawaran'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="penawaran_pembanding[]"
|
||||
@@ -178,7 +178,7 @@
|
||||
<td class="px-4 py-2">Telepon Contact Person</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="telepon" class="input"
|
||||
value="{{ $inspectionData['telepon'] ?? '' }}">
|
||||
value="{{ $inspectionData['asset']['telepon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="telepon_pembanding[]"
|
||||
@@ -523,7 +523,9 @@
|
||||
|
||||
// Ambil nilai numerik dari input
|
||||
const harga = parseFloat(hargaInput.value.replace(/[^\d]/g, '') || '0');
|
||||
let diskon = parseFloat(diskonInput.value.replace(/[^\d]/g, '') || '0');
|
||||
let diskonInput_value = diskonInput.value.replace(',', '.');
|
||||
let diskon = parseFloat(diskonInput_value.replace(/[^\d.]/g, '') || '0');
|
||||
|
||||
|
||||
// Batasi diskon maksimal 100%
|
||||
diskon = Math.min(diskon, 100);
|
||||
@@ -582,6 +584,9 @@
|
||||
'harga_diskon_pembanding[]': data.harga_diskon,
|
||||
'total_pembanding[]': data.total,
|
||||
'diskon_pembanding[]': data.diskon,
|
||||
'hak_properti_pembanding[]': data.hak_properti,
|
||||
'telepon_pembanding[]': data.telepon,
|
||||
'penawaran_pembanding[]': data.penawaran,
|
||||
};
|
||||
|
||||
Object.entries(inputs).forEach(([name, value]) => {
|
||||
|
||||
@@ -386,14 +386,15 @@
|
||||
<div id="inputContainerLantai" class="w-full">
|
||||
<div class="flex w-full items-center justify-center gap-4">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">Foto Lantai 1</span>
|
||||
<span class="form-label">Foto Lantai {{ $loop->iteration }}</span>
|
||||
</label>
|
||||
<div class="input-group w-full grid gap-5">
|
||||
<div class="preview-container">
|
||||
<img id="foto_lantai-preview"
|
||||
<img id="foto_lantai-preview-{{ $loop->index }}"
|
||||
src="{{ asset('storage/' . old('foto_lantai_unit', $item['foto_lantai_unit'])) }}"
|
||||
alt="Foto Rute" class="mt-2 h-auto"
|
||||
style="display: none; width: 30rem;">
|
||||
alt="Foto Lantai" class="mt-2 h-auto"
|
||||
style="{{ old('foto_lantai_unit', $item['foto_lantai_unit']) ? 'display: block;' : 'display: none;' }} width: 30rem;">
|
||||
|
||||
</div>
|
||||
<input type="hidden" name="name_lantai_unit[]" value="lantai">
|
||||
<input id="inputLantai" type="file" name="foto_lantai_unit[]"
|
||||
@@ -417,8 +418,11 @@
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input type="hidden" name="name_lantai_unit[]" value="lantai">
|
||||
<div class="preview-container">
|
||||
<img id="foto_lantai-preview" src="" alt="Foto Rute"
|
||||
class="mt-2 h-auto" style="display: none; width: 30rem;">
|
||||
<img id="foto_lantai-preview-{{ $loop->index }}"
|
||||
src="{{ asset('storage/' . old('foto_lantai_unit', $item['foto_lantai_unit'])) }}"
|
||||
alt="Foto Lantai" class="mt-2 h-auto"
|
||||
style="{{ old('foto_lantai_unit', $item['foto_lantai_unit']) ? 'display: block;' : 'display: none;' }} width: 30rem;">
|
||||
|
||||
</div>
|
||||
<input id="inputLantai" type="file" name="foto_lantai_unit[]"
|
||||
class="file-input file-input-bordered w-full" accept="image/*"
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
const datas = @json($forminspeksi);
|
||||
console.log(datas);
|
||||
|
||||
function updateAlamatFields(status) {
|
||||
// Ambil elemen formulir
|
||||
const addressForm = document.getElementById('alamat_form');
|
||||
|
||||
Reference in New Issue
Block a user