fix(surveyor) :perbaikkan alamat dan luas unit
This commit is contained in:
@@ -3257,6 +3257,7 @@ class SurveyorController extends Controller
|
||||
private function getUnitData($data, $request): array
|
||||
{
|
||||
|
||||
|
||||
$luas_unit_key = ($data['luas_unit'] ?? null) === 'sesuai' ? 'sesuai' : 'tidak sesuai';
|
||||
$luas_unit = [];
|
||||
|
||||
@@ -3265,11 +3266,11 @@ class SurveyorController extends Controller
|
||||
: ($data['luas_unit_tidak_sesuai'] ?? null);
|
||||
|
||||
// Masukkan key baru yang sesuai
|
||||
$luas_unit_key[$luas_unit_key] = preg_replace('/[^0-9.,]/', '', $hasil_luas_unit);
|
||||
$luas_unit[$luas_unit_key] = preg_replace('/[^0-9.,]/', '', $hasil_luas_unit);
|
||||
|
||||
return [
|
||||
'action' => $data['action'] ?? null,
|
||||
'luas_unit' => $luas_unit_key,
|
||||
'luas_unit' => $luas_unit,
|
||||
'kondisi_unit' => $data['kondisi_unit'] ?? null,
|
||||
'posisi_unit' => $data['posisi_unit'] ?? null,
|
||||
'lantai' => $data['lantai'] ?? null,
|
||||
|
||||
@@ -207,9 +207,13 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Alamat</label>
|
||||
<div class="w-full">
|
||||
|
||||
@foreach ($permohonan->documents as $dokumen)
|
||||
@php
|
||||
$alamat = $dokumen->pemilik;
|
||||
@endphp
|
||||
@endforeach
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ formatAlamat($permohonan->debiture) }}
|
||||
{{ formatAlamat($alamat) }}
|
||||
</span>
|
||||
|
||||
|
||||
@@ -481,43 +485,43 @@
|
||||
<label for="address" class="form-label max-w-56">Terletak di.</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="address" name="address" class="input w-full "
|
||||
value="{{ isset($permohonan->debiture->address) ? $permohonan->debiture->address : old('address') }}">
|
||||
value="{{ isset($alamat->address) ? $alamat->address : old('address') }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="province_code"
|
||||
value="{{ isset($permohonan->debiture->province) ? $permohonan->debiture->province->code : '' }}">
|
||||
value="{{ isset($alamat->province) ? $alamat->province->code : '' }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="form-label max-w-56">Provinsi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="province" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->province) ? $permohonan->debiture->province->name : '' }}">
|
||||
value="{{ isset($alamat->province) ? $alamat->province->name : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="city_code"
|
||||
value="{{ isset($permohonan->debiture->city) ? $permohonan->debiture->city->code : '' }}">
|
||||
value="{{ isset($alamat->city) ? $alamat->city->code : '' }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="city" class="form-label max-w-56">Kabupaten/Kota</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="city" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->city) ? $permohonan->debiture->city->name : '' }}">
|
||||
value="{{ isset($alamat->city) ? $alamat->city->name : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="district_code"
|
||||
value="{{ isset($permohonan->debiture->district) ? $permohonan->debiture->district->code : '' }}">
|
||||
value="{{ isset($alamat->district) ? $alamat->district->code : '' }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="district" class="form-label max-w-56">Kecamatan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="district" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->district) ? $permohonan->debiture->district->name : '' }}">
|
||||
value="{{ isset($alamat->district) ? $alamat->district->name : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="village_code"
|
||||
value="{{ isset($permohonan->debiture->village) ? $permohonan->debiture->village->code : '' }}">
|
||||
value="{{ isset($alamat->village) ? $alamat->village->code : '' }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="village" class="form-label max-w-56">Desa/Kelurahan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="village" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->village) ? $permohonan->debiture->village->name : '' }}">
|
||||
value="{{ isset($alamat->village) ? $alamat->village->name : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user