penambahan lampiran foto dokumen dan paparan di so dan ganti unit di jenis jaminan ruko rukan

This commit is contained in:
majid
2025-01-14 09:50:25 +07:00
parent 090bb618b1
commit 76c1a74c3a
18 changed files with 768 additions and 490 deletions

View File

@@ -44,15 +44,15 @@ class PenilaiController extends Controller
/** /**
* Show the form for creating a new resource. * Show the form for creating a new resource.
*/ */
public function lampiran(Request $request, $id) public function lampiran(Request $request)
{ {
$permohonanId = $request->query('permohonanId'); $permohonanId = $request->query('permohonanId');
$documentId = $request->query('documentId'); $documentId = $request->query('documentId');
$jaminanId = $request->query('jaminanId'); $jaminanId = $request->query('jaminanId');
$permohonan = $this->surveyorController->getPermohonanJaminanId($id, $documentId, $jaminanId); $permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $documentId)->first(); $inpeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
$formFoto = null; $formFoto = null;
if ($inpeksi) { if ($inpeksi) {
@@ -280,6 +280,7 @@ class PenilaiController extends Controller
$jaminanId = $request->query('jaminanId'); $jaminanId = $request->query('jaminanId');
$provinces = Province::all(); $provinces = Province::all();
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId); $permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
$noLpRAP = $this->generateNoLaporan($permohonan, $documentId, 'rap');
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first(); $inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
Penilai::updateOrCreate( Penilai::updateOrCreate(
[ [
@@ -302,7 +303,7 @@ class PenilaiController extends Controller
$rap = json_decode($resume->rap, true); $rap = json_decode($resume->rap, true);
} }
return view('lpj::penilai.components.rap-penilai', compact('permohonan', 'rap', 'provinces', 'forminspeksi')); return view('lpj::penilai.components.rap-penilai', compact('permohonan', 'rap', 'provinces', 'forminspeksi', 'noLpRAP'));
} }
@@ -756,6 +757,60 @@ class PenilaiController extends Controller
} }
} }
public function storeRap(Request $request){
DB::beginTransaction();
try {
$formRequest = new FormSurveyorRequest();
$formRequest->setContainer(app());
$formRequest->initialize(
$request->all(),
$request->query->all(),
$request->attributes->all(),
$request->cookies->all(),
$request->files->all(),
$request->server->all(),
$request->getContent()
);
$validated = $formRequest->validateResolved();
$result = $this->surveyorController->store($formRequest);
$data =[
'kepada' => $request->input('kepada'),
'dari' => $request->input('dari'),
'nomor_rap' => $request->input('nomor_rap'),
'tanggal' => $request->input('tanggal'),
'perihal' => $request->input('perihal')
];
Penilai::updateOrCreate(
[
'permohonan_id' => $request->permohonanId,
'dokument_id' => $request->documentId,
'inspeksi_id' => $request->inspeksiId,
],
[
'rap' => json_encode($data),
]
);
DB::commit();
return response()->json([
'success' => true,
'message' => 'Berhasil menyimpan LPJ',
'data' => $result
], 200);
} catch (\Throwable $e) {
DB::rollBack();
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan saat menyimpan LPJ',
'error' => $e->getMessage(),
'trace' => $e->getTraceAsString()
], 500);
}
}
public function print_out(Request $request) public function print_out(Request $request)
@@ -794,6 +849,7 @@ class PenilaiController extends Controller
$lpjData = json_decode($lpj->lpj, true); $lpjData = json_decode($lpj->lpj, true);
$memo = json_decode($lpj->memo, true); $memo = json_decode($lpj->memo, true);
$resumeData = json_decode($lpj->resume, true); $resumeData = json_decode($lpj->resume, true);
$rap = json_decode($lpj->rap, true);
} }
$inputAddress = $forminspeksi['asset']['alamat']['sesuai'] ?? $forminspeksi['asset']['alamat']['tidak sesuai']; $inputAddress = $forminspeksi['asset']['alamat']['sesuai'] ?? $forminspeksi['asset']['alamat']['tidak sesuai'];
@@ -824,7 +880,8 @@ class PenilaiController extends Controller
'nomorLaporan', 'nomorLaporan',
'memo', 'memo',
'resumeData', 'resumeData',
'tanggalLaporan' 'tanggalLaporan',
'rap'
)); ));
$pdf->setPaper('A4', 'portrait'); $pdf->setPaper('A4', 'portrait');
@@ -845,7 +902,8 @@ class PenilaiController extends Controller
'nomorLaporan', 'nomorLaporan',
'memo', 'memo',
'resumeData', 'resumeData',
'tanggalLaporan' 'tanggalLaporan',
'rap'
)); ));
// return $pdf; // return $pdf;

View File

@@ -2763,7 +2763,7 @@ class SurveyorController extends Controller
'sensor_camera_recorder' => $data['sensor_camera_recorder'] ?? null, 'sensor_camera_recorder' => $data['sensor_camera_recorder'] ?? null,
'sensor_camera_recorder_input' => $data['sensor_camera_recorder_input'] ?? null, 'sensor_camera_recorder_input' => $data['sensor_camera_recorder_input'] ?? null,
'lcd' => $data['lcd'] ?? null, 'lcd' => $data['lcd'] ?? null,
'lcd_innput' => $data['lcd_innput'] ?? null, 'lcd_input' => $data['lcd_input'] ?? null,
'sabuk_keselamatan' => $data['sabuk_keselamatan'] ?? null, 'sabuk_keselamatan' => $data['sabuk_keselamatan'] ?? null,
'sabuk_keselamatan_input' => $data['sabuk_keselamatan_input'] ?? null, 'sabuk_keselamatan_input' => $data['sabuk_keselamatan_input'] ?? null,
'airbag' => $data['airbag'] ?? null, 'airbag' => $data['airbag'] ?? null,

View File

@@ -182,7 +182,7 @@ class FormSurveyorRequest extends FormRequest
'nama_jalan' => 'required', 'nama_jalan' => 'required',
'perumahan_gang' => 'required', 'perumahan_gang' => 'required',
'blok_nomor' => 'required', 'blok_nomor' => 'required',
'village_code' => 'nullable|string', 'village_code' => 'nullable|string',
'district_code' => 'nullable|string', 'district_code' => 'nullable|string',
'city_code' => 'nullable|string', 'city_code' => 'nullable|string',
@@ -280,10 +280,16 @@ class FormSurveyorRequest extends FormRequest
'nama_jalan' => 'required', 'nama_jalan' => 'required',
'perumahan_gang' => 'required', 'perumahan_gang' => 'required',
'blok_nomor' => 'required', 'blok_nomor' => 'required',
'desa_kelurahan' => 'required',
'kecamatan' => 'required', 'village_code' => 'nullable|string',
'kota_madya' => 'required', 'district_code' => 'nullable|string',
'provinsi' => 'required', 'city_code' => 'nullable|string',
'province_code' => 'nullable|string',
'masa_stnk' => 'required',
'masa_pajak' => 'required',
'kendaraan.*' => 'required',
'kendaraan_input.*' => 'nullable',
'kondisi' => 'required', 'kondisi' => 'required',
'nomor_polisi' => 'required', 'nomor_polisi' => 'required',
'nomor_polis_tidak_sesuai' => 'nullable', 'nomor_polis_tidak_sesuai' => 'nullable',
@@ -297,26 +303,47 @@ class FormSurveyorRequest extends FormRequest
'nomor_mesin_tidak_sesuai' => 'nullable', 'nomor_mesin_tidak_sesuai' => 'nullable',
'posisi_kilometer' => 'required', 'posisi_kilometer' => 'required',
'transmisi' => 'required', 'transmisi' => 'required',
'transmisi_input' => 'nullable',
'mesin_panel_instrument.*' => 'required', 'mesin_panel_instrument.*' => 'required',
'mesin_panel_instrument_input.*' => 'nullable',
'fungsi_mesin_panel_instrument.*' => 'required', 'fungsi_mesin_panel_instrument.*' => 'required',
'fungsi_mesin_panel_instrument_input.*' => 'nullable',
'interior.*' => 'required', 'interior.*' => 'required',
'interior_input.*' => 'nullable',
'jumlah_pintu.*' => 'required', 'jumlah_pintu.*' => 'required',
'jumlah_pintu_input.*' => 'nullable',
'rangka_karoseri.*' => 'required', 'rangka_karoseri.*' => 'required',
'rangka_karoseri_input.*' => 'nullable',
'ban.*' => 'required', 'ban.*' => 'required',
'ban_input.*' => 'nullable',
'velg.*' => 'required', 'velg.*' => 'required',
'velg_input.*' => 'nullable',
'bamper_depan.*' => 'required', 'bamper_depan.*' => 'required',
'bamper_depan_input.*' => 'nullable',
'bamper_belakang.*' => 'required', 'bamper_belakang.*' => 'required',
'bamper_belakang_input.*' => 'nullable',
'lampu_depan.*' => 'required', 'lampu_depan.*' => 'required',
'lampu_depan_input.*' => 'nullable',
'lampu_belakang.*' => 'required', 'lampu_belakang.*' => 'required',
'lampu_belakang_input.*' => 'nullable',
'kaca_kendaraan.*' => 'required', 'kaca_kendaraan.*' => 'required',
'kaca_kendaraan_input.*' => 'nullable',
'air_conditioner.*' => 'required', 'air_conditioner.*' => 'required',
'air_conditioner_input.*' => 'nullable',
'tape_radio_cd.*' => 'required', 'tape_radio_cd.*' => 'required',
'tape_radio_cd_input.*' => 'nullable',
'sensor_parkir.*' => 'required', 'sensor_parkir.*' => 'required',
'sensor_parkir_input.*' => 'nullable',
'sensor_camera_recorder.*' => 'required', 'sensor_camera_recorder.*' => 'required',
'sensor_camera_recorder_input.*' => 'nullable',
'lcd.*' => 'required', 'lcd.*' => 'required',
'lcd_input.*' => 'nullable',
'sabuk_keselamatan.*' => 'required', 'sabuk_keselamatan.*' => 'required',
'sabuk_keselamatan_input.*' => 'nullable',
'airbag.*' => 'required', 'airbag.*' => 'required',
'airbag_input.*' => 'nullable',
'asuransi.*' => 'required', 'asuransi.*' => 'required',
'asuransi_input.*' => 'nullable',
'perusahaan_asuransi' => 'required', 'perusahaan_asuransi' => 'required',
'tahun_berakhir' => 'required', 'tahun_berakhir' => 'required',
'fakta_positif.*' => 'nullable', 'fakta_positif.*' => 'nullable',
@@ -433,7 +460,7 @@ class FormSurveyorRequest extends FormRequest
'nama_jalan' => 'required', 'nama_jalan' => 'required',
'perumahan_gang' => 'required', 'perumahan_gang' => 'required',
'blok_nomor' => 'required', 'blok_nomor' => 'required',
'village_code' => 'nullable|string', 'village_code' => 'nullable|string',
'district_code' => 'nullable|string', 'district_code' => 'nullable|string',
'city_code' => 'nullable|string', 'city_code' => 'nullable|string',

View File

@@ -23,6 +23,7 @@ class Penilai extends Model
'lpj', 'lpj',
'type', 'type',
'memo', 'memo',
'rap',
'type_penilai' 'type_penilai'
]; ];

View File

@@ -14,9 +14,9 @@
<i class="ki-filled ki-exit-left"></i> Back <i class="ki-filled ki-exit-left"></i> Back
</a> </a>
@else @else
<a href="{{ route($backLink) }}" class="btn btn-xs btn-info"> <a href="{{ route($backLink, $queryParams ?? []) }}" class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back <i class="ki-filled ki-exit-left"></i> Back
</a> </a>
@endif @endif
</div> </div>
</div> </div>

View File

@@ -541,6 +541,7 @@
@if ($dokumen->jenisJaminan) @if ($dokumen->jenisJaminan)
@php @php
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true); $formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
$jenisAset = $dokumen->jenisJaminan->name;
@endphp @endphp
@if (isset($formKategori) && $formKategori) @if (isset($formKategori) && $formKategori)
@php @php
@@ -593,6 +594,11 @@
'pesawat' => 'Luas Pesawat', 'pesawat' => 'Luas Pesawat',
'kapal' => 'Luas Kapal', 'kapal' => 'Luas Kapal',
]; ];
if (strcasecmp($jenisAset, 'RUKO/RUKAN') === 0) {
$labelNilai['bangunan'] = 'Luas Unit';
unset($labelNilai['tanah']);
}
@endphp @endphp
@foreach ($kategoriUnik as $item) @foreach ($kategoriUnik as $item)
@@ -640,8 +646,8 @@
<label for="province" class="input"> <label for="province" class="input">
<i class="">Rp <i class="">Rp
</i> </i>
<input type="text" class=" w-full currency-format" <input type="text" class=" w-full currency-format" id="total_nilai_pasar_wajar"
id="total_nilai_pasar_wajar" name="total_nilai_pasar_wajar" name="total_nilai_pasar_wajar"
value="{{ old('total_nilai_pasar_wajar', $lpjData['total_nilai_pasar_wajar'] ?? null) }}"> value="{{ old('total_nilai_pasar_wajar', $lpjData['total_nilai_pasar_wajar'] ?? null) }}">
</label> </label>
</div> </div>
@@ -656,6 +662,8 @@
Tambah NPW </button> Tambah NPW </button>
</div> </div>
<div> <div>
<label for="total_nilai_pasar_wajar" class="form-label uppercase">TOTAL NILAI <label for="total_nilai_pasar_wajar" class="form-label uppercase">TOTAL NILAI
LIKUIDASI</label> LIKUIDASI</label>
@@ -693,6 +701,41 @@
</div> </div>
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
<label class="form-label lg:form-label max-w-56 ">Catatan yang Perlu Diperhatikan
</label>
<div class="w-full">
<div id="keterangan_penilai-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
@if (!empty($lpjData['keterangan_penilai']) && is_array($lpjData['keterangan_penilai']))
@foreach ($lpjData['keterangan_penilai'] as $index => $item)
<div class="keterangan_penilai flex items-center gap-2 mt-2 textarea-group w-full">
<textarea name="keterangan_penilai[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old("keterangan_penilai.$index", $item) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button"
style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="keterangan_penilai flex items-center gap-2 mt-2 textarea-group w-full">
<textarea name="keterangan_penilai[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3"></textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button"
style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
<em id="error-keterangan_penilai" class="alert text-danger text-sm"></em>
</div>
@endif
</div>
<button type="button"
onclick="addClonableItem('keterangan_penilai-container', 'keterangan_penilai')"
class="btn btn-primary btn-sm mt-5 ">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
</div> </div>
</div> </div>
@@ -770,20 +813,29 @@
oninput="calculateTotal()"> oninput="calculateTotal()">
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="province" class="">X</label>
<label class="input">
<i class="">Rp
</i>
<input type="text" <input type="text"
id="nilai_npw_${npwCounter}_1" id="nilai_npw_${npwCounter}_1"
class="input w-full currency-format" class=" w-full currency-format"
name="nilai_npw_${npwCounter}_1" name="nilai_npw_${npwCounter}_1"
placeholder="Harga per meter" placeholder="Harga per meter"
oninput="calculateTotal()"> oninput="calculateTotal()">
</label>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label class="input">
<i class="">Rp
</i>
<input type="text" <input type="text"
id="nilai_npw_${npwCounter}_2" id="nilai_npw_${npwCounter}_2"
class="input w-full currency-format" class="input w-full currency-format"
name="nilai_npw_${npwCounter}_2" name="nilai_npw_${npwCounter}_2"
placeholder="Total Nilai" placeholder="Total Nilai"
readonly> readonly>
</label>
<button type="button" class="btn btn-danger remove-npw"> <button type="button" class="btn btn-danger remove-npw">
<i class="ki-filled ki-minus"></i> <i class="ki-filled ki-minus"></i>
</button> </button>
@@ -841,22 +893,31 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="province" class="">X</label>
<label class="input">
<i class="">Rp
</i>
<input type="text" <input type="text"
id="nilai_npw_${npwCounter}_1" id="nilai_npw_${npwCounter}_1"
class="input w-full currency-format" class=" w-full currency-format"
name="nilai_npw_${npwCounter}_1" name="nilai_npw_${npwCounter}_1"
placeholder="Harga per meter" placeholder="Harga per meter"
value="${npw.nilai_1 || ''}" value="${npw.nilai_1 || ''}"
oninput="calculateTotal()"> oninput="calculateTotal()">
</label>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label class="input">
<i class="">Rp
</i>
<input type="text" <input type="text"
id="nilai_npw_${npwCounter}_2" id="nilai_npw_${npwCounter}_2"
class="input w-full currency-format" class=" w-full currency-format"
name="nilai_npw_${npwCounter}_2" name="nilai_npw_${npwCounter}_2"
placeholder="Total Nilai" placeholder="Total Nilai"
value="${npw.nilai_2 || ''}" value="${npw.nilai_2 || ''}"
readonly> readonly>
</label>
<div> <div>
<button type="button" class="btn btn-danger remove-npw h-full"> <button type="button" class="btn btn-danger remove-npw h-full">
<i class="ki-filled ki-minus"></i> <i class="ki-filled ki-minus"></i>
@@ -931,7 +992,7 @@
let totalNilai = luas * hargaPerMeter; let totalNilai = luas * hargaPerMeter;
document.querySelector(`input[name="${input.output}"]`).value = formatCurrency(totalNilai document.querySelector(`input[name="${input.output}"]`).value = formatCurrency(totalNilai
.toString()); .toString());
totalNilaiPasarWajar += totalNilai; totalNilaiPasarWajar += totalNilai;
}); });
@@ -1023,3 +1084,4 @@
}); });
} }
</script> </script>
@include('lpj::surveyor.js.utils')

View File

@@ -15,7 +15,15 @@
<button type="button" class="btn btn-success" id="saveButton" onclick="saveLpjSederhanadanStandard()"> <button type="button" class="btn btn-success" id="saveButton" onclick="saveLpjSederhanadanStandard()">
<span id="saveButtonText">Save</span> <span id="saveButtonText">Save</span>
</button> </button>
@if (Auth::user()->hasAnyRole(['senior-officer'])) @if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-secondary"
href="{{ route('penilai.paparan') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
PAPARAN
</a>
<a class="btn btn-primary" <a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )"> onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print <i class="ki-filled ki-printer"></i> Print

View File

@@ -24,21 +24,21 @@
<label class="form-label max-w-56">Kepada</label> <label class="form-label max-w-56">Kepada</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..." <input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
value=" {{ $memo->kepada ?? "" }}"> value=" {{ $memo->kepada ?? '' }}">
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Dari</label> <label class="form-label max-w-56">Dari</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..." <input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
value="{{ $memo->dari ?? "" }}"> value="{{ $memo->dari ?? '' }}">
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Nomor Memo</label> <label class="form-label max-w-56">Nomor Memo</label>
<div class="flex flex-wrap items-base line w-full"> <div class="flex flex-wrap items-base line w-full">
<input type="text" name="nomor_memo" class="input w-full" placeholder="Masukkan..." <input type="text" name="nomor_memo" class="input w-full" placeholder="Masukkan..."
value="{{ $noLpmemo ?? "" }}" @readonly(true)> value="{{ $noLpmemo ?? '' }}" @readonly(true)>
</div> </div>
</div> </div>
{{-- 250109828129/ --}} {{-- 250109828129/ --}}
@@ -47,7 +47,7 @@
<label class="form-label max-w-56">Tanggal</label> <label class="form-label max-w-56">Tanggal</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tanggal" class="input w-full" placeholder="Masukkan..." <input type="date" name="tanggal" class="input w-full" placeholder="Masukkan..."
value="{{ $memo->tanggal ?? "" }}"> value="{{ $memo->tanggal ?? '' }}">
</div> </div>
</div> </div>
@@ -55,7 +55,7 @@
<label class="form-label max-w-56">Perihal</label> <label class="form-label max-w-56">Perihal</label>
<div class="flex flex-wrap items-base line w-full"> <div class="flex flex-wrap items-base line w-full">
<input type="text" name="perihal" class="input w-full" placeholder="Masukkan..." <input type="text" name="perihal" class="input w-full" placeholder="Masukkan..."
value="{{ $memo->perihal ?? "" }}"> value="{{ $memo->perihal ?? '' }}">
</div> </div>
</div> </div>
</div> </div>
@@ -64,7 +64,8 @@
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md "> <div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md ">
<div class="card-header bg-agi-50"> <div class="card-header bg-agi-50">
<h1 class="text-md font-medium text-gray-900 uppercase">Sehubungan dengan permintaan BAGI Cabang <h1 class="text-md font-medium text-gray-900 uppercase">Sehubungan dengan permintaan BAGI Cabang
<b>{{ $permohonan->branch->name }}</b>, untuk dilakukan survey untuk penilaian baru/review, calon debitur/debitur an <b>{{ $permohonan->branch->name }}</b>, untuk dilakukan survey untuk penilaian baru/review, calon
debitur/debitur an
<b>{{ $permohonan->debiture->name }}</b>,dengan deskripsi sebagai berikut : <b>{{ $permohonan->debiture->name }}</b>,dengan deskripsi sebagai berikut :
</h1> </h1>
</div> </div>
@@ -78,7 +79,8 @@
<select id="jenis_asset_tidak_sesuai" class="input w-full" name="jenis_asset_tidak_sesuai"> <select id="jenis_asset_tidak_sesuai" class="input w-full" name="jenis_asset_tidak_sesuai">
<option value="">Select Jenis asset</option> <option value="">Select Jenis asset</option>
@foreach ($basicData['jenisJaminan'] as $item) @foreach ($basicData['jenisJaminan'] as $item)
<option value="{{ $item->name }}" {{ ($memo->jenis_asset_tidak_sesuai ?? '') == $item->name ? 'selected' : '' }}> <option value="{{ $item->name }}"
{{ ($memo->jenis_asset_tidak_sesuai ?? '') == $item->name ? 'selected' : '' }}>
{{ $item->name }} {{ $item->name }}
</option> </option>
@endforeach @endforeach
@@ -92,7 +94,8 @@
<label for="lokasi" class="form-label max-w-56">Lokasi</label> <label for="lokasi" class="form-label max-w-56">Lokasi</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" id="lokasi" name="lokasi" class="input w-full" <input type="text" id="lokasi" name="lokasi" class="input w-full"
placeholder="Masukkan Jl." value="{{ $memo->lokasi->lokasi ?? old('lokasi') }}"> placeholder="Masukkan Jl."
value="{{ $memo->lokasi->lokasi ?? old('lokasi') }}">
</div> </div>
</div> </div>
@@ -102,7 +105,9 @@
<select id="province_code" name="province_code" class="input w-full"> <select id="province_code" name="province_code" class="input w-full">
<option value="">Pilih Provinsi</option> <option value="">Pilih Provinsi</option>
@foreach ($provinces as $item) @foreach ($provinces as $item)
<option value="{{ $item->code }}" {{ ($memo->lokasi->province_code ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option> <option value="{{ $item->code }}"
{{ ($memo->lokasi->province_code ?? '') == $item->code ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach @endforeach
</select> </select>
</div> </div>
@@ -113,9 +118,11 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<select id="city_code" name="city_code" class="select w-full"> <select id="city_code" name="city_code" class="select w-full">
<option value="">Pilih Kota/Kabupaten</option> <option value="">Pilih Kota/Kabupaten</option>
@if(isset($cities)) @if (isset($cities))
@foreach ($cities as $item) @foreach ($cities as $item)
<option value="{{ $item->code }}" {{ ($memo->lokasi->city_code?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option> <option value="{{ $item->code }}"
{{ ($memo->lokasi->city_code ?? '') == $item->code ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach @endforeach
@endif @endif
</select> </select>
@@ -127,9 +134,11 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<select id="district_code" name="district_code" class="select w-full"> <select id="district_code" name="district_code" class="select w-full">
<option value="">Pilih Kecamatan</option> <option value="">Pilih Kecamatan</option>
@if(isset($districts)) @if (isset($districts))
@foreach ($districts as $item) @foreach ($districts as $item)
<option value="{{ $item->code }}" {{ ($memo->lokasi->district_code?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option> <option value="{{ $item->code }}"
{{ ($memo->lokasi->district_code ?? '') == $item->code ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach @endforeach
@endif @endif
</select> </select>
@@ -141,9 +150,11 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<select id="village_code" name="village_code" class="select w-full"> <select id="village_code" name="village_code" class="select w-full">
<option value="">Pilih Kelurahan</option> <option value="">Pilih Kelurahan</option>
@if(isset($villages)) @if (isset($villages))
@foreach ($villages as $item) @foreach ($villages as $item)
<option value="{{ $item->code }}" {{ ($memo->lokasi->village_code ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option> <option value="{{ $item->code }}"
{{ ($memo->lokasi->village_code ?? '') == $item->code ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach @endforeach
@endif @endif
</select> </select>
@@ -154,15 +165,17 @@
<label for="address" class="form-label max-w-56">Address</label> <label for="address" class="form-label max-w-56">Address</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" id="address" name="address" class="input w-full" <input type="text" id="address" name="address" class="input w-full"
placeholder="Masukkan Jl." value="{{ $memo->lokasi->address ?? old('address') }}"> placeholder="Masukkan Jl."
value="{{ $memo->lokasi->address ?? old('address') }}">
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="tanggal_survey" class="form-label max-w-56">Tanggal Survey</label> <label for="tanggal_survey" class="form-label max-w-56">Tanggal Survey</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="date" id="tanggal_survey" name="tanggal_survey" class="input w-full" <input type="date" id="tanggal_survey" name="tanggal_survey"
placeholder="Masukkan Tanggal Survey" value="{{ $memo->tanggal_survey ?? old('tanggal_survey') }}"> class="input w-full" placeholder="Masukkan Tanggal Survey"
value="{{ $memo->tanggal_survey ?? old('tanggal_survey') }}">
</div> </div>
</div> </div>
@@ -170,7 +183,8 @@
<label for="penilai" class="form-label max-w-56">Penilai</label> <label for="penilai" class="form-label max-w-56">Penilai</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" id="penilai" name="penilai" class="input w-full" <input type="text" id="penilai" name="penilai" class="input w-full"
placeholder="Masukkan Penilai" value="{{ $memo->lokasi->penilai ?? old('penilai') }}"> placeholder="Masukkan Penilai"
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
</div> </div>
</div> </div>
@@ -196,7 +210,7 @@
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full"> <div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
<div class="terlampir flex items-center gap-2 mt-2 textarea-group w-full"> <div class="terlampir flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="terlampir[]" rows="3">{{ $memo->terlampir[0] ?? old('terlampir', '') }}</textarea> <textarea class="textarea mt-2" name="terlampir[]" rows="3">{{ $memo->terlampir[0] ?? old('terlampir', '') }}</textarea>
</div> </div>
</div> </div>
@@ -210,7 +224,7 @@
<div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full"> <div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old("hasil_survey.$index", $positif) }}</textarea> <textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old("hasil_survey.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" <button class="btn btn-danger btn-sm remove-btn" type="button"
style="display: none;"> style="display: none;">
<i class="ki-outline ki-trash"></i> <i class="ki-outline ki-trash"></i>
</button> </button>
</div> </div>
@@ -219,13 +233,13 @@
<div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full"> <div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old('hasil_survey.0', '') }}</textarea> <textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old('hasil_survey.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" <button class="btn btn-danger btn-sm remove-btn" type="button"
style="display: none;"> style="display: none;">
<i class="ki-outline ki-trash"></i> <i class="ki-outline ki-trash"></i>
</button> </button>
</div> </div>
@endif @endif
<button type="button" class="btn btn-primary btn-sm mt-5" <button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('hasil_survey', 'hasil_survey')"> onclick="addClonableItem('hasil_survey', 'hasil_survey')">
<i class="ki-outline ki-plus"></i> <i class="ki-outline ki-plus"></i>
</button> </button>
</div> </div>
@@ -240,7 +254,7 @@
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full"> <div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old("kesimpulan_saran.$index", $negatif) }}</textarea> <textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old("kesimpulan_saran.$index", $negatif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" <button class="btn btn-danger btn-sm remove-btn" type="button"
style="display: none;"> style="display: none;">
<i class="ki-outline ki-trash"></i> <i class="ki-outline ki-trash"></i>
</button> </button>
</div> </div>
@@ -249,14 +263,14 @@
<div class="kesimpulan_saran flex items-center gap-2 mt-2 textarea-group w-full"> <div class="kesimpulan_saran flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old('kesimpulan_saran.0') }}</textarea> <textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old('kesimpulan_saran.0') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" <button class="btn btn-danger btn-sm remove-btn" type="button"
style="display: none;"> style="display: none;">
<i class="ki-outline ki-trash"></i> <i class="ki-outline ki-trash"></i>
</button> </button>
<em id="error-kesimpulan_saran" class="alert text-danger text-sm"></em> <em id="error-kesimpulan_saran" class="alert text-danger text-sm"></em>
</div> </div>
@endif @endif
<button type="button" class="btn btn-primary btn-sm mt-5" <button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('fakta-negatif-container', 'kesimpulan_saran')"> onclick="addClonableItem('fakta-negatif-container', 'kesimpulan_saran')">
<i class="ki-outline ki-plus"></i> <i class="ki-outline ki-plus"></i>
</button> </button>
</div> </div>
@@ -264,18 +278,26 @@
</div> </div>
</div> </div>
{{-- @include('lpj::penilai.components.foto-lampiran') --}} @include('lpj::penilai.components.foto-lampiran')
<div class="flex card-footer justify-end gap-5"> <div class="flex card-footer justify-end gap-5">
<a class="btn btn-success" onclick="saveMemo()"> <a class="btn btn-success" onclick="saveMemo()">
SAVE SAVE
</a> </a>
@if (Auth::user()->hasAnyRole(['senior-officer'])) @if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-primary" <a class="btn btn-info"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )"> href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
<i class="ki-filled ki-printer"></i> Print LAMPIRAN FOTO DAN DOKUMEN
</a> </a>
@endif <a class="btn btn-secondary"
href="{{ route('penilai.paparan') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
PAPARAN
</a>
<a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print
</a>
@endif
</div> </div>
</form> </form>
@@ -330,7 +352,7 @@
headers: { headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}' 'X-CSRF-TOKEN': '{{ csrf_token() }}'
}, },
success: function (response) { success: function(response) {
hideLoadingSwal(); hideLoadingSwal();
if (response.success) { if (response.success) {
Swal.fire({ Swal.fire({
@@ -353,11 +375,11 @@
} }
console.log(response); console.log(response);
}, },
error: function (xhr, status, error) { error: function(xhr, status, error) {
let errors = xhr.responseJSON?.errors; let errors = xhr.responseJSON?.errors;
$('.alert').text(''); $('.alert').text('');
if (errors) { if (errors) {
$.each(errors, function (key, value) { $.each(errors, function(key, value) {
$(`#error-${key}`).text(value[0]); $(`#error-${key}`).text(value[0]);
toastrErrorBuild(value[0]); toastrErrorBuild(value[0]);
}); });

View File

@@ -6,11 +6,26 @@
@section('content') @section('content')
@include('lpj::assetsku.includenya') @include('lpj::assetsku.includenya')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto"> <div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
@include('lpj::component.detail-jaminan', [
'backLink' => 'penilai.show', @if (Auth::user()->hasAnyRole(['senior-officer']))
'id' => $permohonan->id, @include('lpj::component.detail-jaminan', [
'title' => 'Paparan dokument', 'backLink' => 'otorisator.view-laporan',
]) 'queryParams' => [
'permohonanId' => request()->query('permohonanId'),
'documentId' => request()->query('documentId'),
'inspeksiId' => request()->query('inspeksiId'),
'jaminanId' => request()->query('jaminanId'),
'statusLpj' => 1,
],
'title' => 'Paparan dokument',
])
@else
@include('lpj::component.detail-jaminan', [
'backLink' => 'penilai.show',
'id' => $permohonan->id,
'title' => 'Paparan dokument',
])
@endif
@include('lpj::penilai.components.foto-lampiran') @include('lpj::penilai.components.foto-lampiran')
@@ -36,7 +51,7 @@
<p class="text-2sm text-gray-700">{{ $fileName }}</p> <p class="text-2sm text-gray-700">{{ $fileName }}</p>
@else @else
<p class="text-2sm text-gray-700">Belum ada kertas kerja</p> <p class="text-2sm text-gray-700">Belum ada kertas kerja</p>
@endif @endif
</div> </div>
</div> </div>
</div> </div>

View File

@@ -129,29 +129,29 @@
<table style="width: 100%;"> <table style="width: 100%;">
<tr> <tr>
<td style="width: 10%;">Kepada</td> <td style="width: 20%; padding: 2px;">Kepada</td>
<td>:</td> <td style="width: 1%; padding: 2px;">:</td>
<td>{{ $rap['kepada'] ?? '' }}</td> <td style="width: 79%; padding: 2px;">{{ $rap['kepada'] ?? '' }}</td>
</tr> </tr>
<tr> <tr>
<td>Dari</td> <td style="width: 20%; padding: 2px;">Dari</td>
<td>:</td> <td style="width: 1%; padding: 2px;">:</td>
<td>{{ $rap['dari'] ?? '' }}</td> <td style="width: 79%; padding: 2px;">{{ $rap['dari'] ?? '' }}</td>
</tr> </tr>
<tr> <tr>
<td>No</td> <td style="width: 20%; padding: 2px;">No</td>
<td>:</td> <td style="width: 1%; padding: 2px;">:</td>
<td>{{ $rap['nomor_rap'] ?? '' }}</td> <td style="width: 79%; padding: 2px;">{{ $nomorLaporan ?? '-' }}</td>
</tr> </tr>
<tr> <tr>
<td>Tanggal</td> <td style="width: 20%; padding: 2px;">Tanggal</td>
<td>:</td> <td style="width: 1%; padding: 2px;">:</td>
<td>_</td> <td style="width: 79%; padding: 2px;">{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}</td>
</tr> </tr>
<tr> <tr>
<td>Perihal</td> <td style="width: 20%; padding: 2px;">Perihal</td>
<td>:</td> <td style="width: 1%; padding: 2px;">:</td>
<td>{{ $rap['perihal'] ?? '' }}</td> <td style="width: 79%; padding: 2px;">{{ $rap['perihal'] ?? '' }}</td>
</tr> </tr>
</table> </table>

View File

@@ -15,6 +15,54 @@
@include('lpj::assetsku.includenya') @include('lpj::assetsku.includenya')
@include('lpj::surveyor.components.header') @include('lpj::surveyor.components.header')
@include('lpj::surveyor.components.rap') @include('lpj::surveyor.components.rap')
<div class="card">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
RAP
</h3>
</div>
<div class="card-body grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Kepada</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
value=" {{ $rap['kepada'] ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Dari</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
value="{{ $rap['dari'] ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Nomor RAP</label>
<div class="flex flex-wrap items-base line w-full">
<input type="text" name="nomor_rap" class="input w-full" placeholder="Masukkan..."
value="{{ $noLpRAP ?? '' }}" @readonly(true)>
</div>
</div>
{{-- 250109828129/ --}}
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tanggal</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tanggal" class="input w-full" placeholder="Masukkan..."
value="{{ $rap['tanggal'] ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Perihal</label>
<div class="flex flex-wrap items-base line w-full">
<input type="text" name="perihal" class="input w-full" placeholder="Masukkan..."
value="{{ $rap['perihal'] ?? '' }}">
</div>
</div>
</div>
</div>
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px"> <div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
<button type="button" class="btn btn-success" id="saveButton" onclick="submitData()"> <button type="button" class="btn btn-success" id="saveButton" onclick="submitData()">
<span id="saveButtonText">Save</span> <span id="saveButtonText">Save</span>
@@ -23,7 +71,11 @@
</div> </div>
</button> </button>
@if (Auth::user()->hasAnyRole(['senior-officer'])) @if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-primary" <a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )"> onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print <i class="ki-filled ki-printer"></i> Print
@@ -35,6 +87,9 @@
@endsection @endsection
@push('scripts') @push('scripts')
<script type="text/javascript"> <script type="text/javascript">
const rap = @json($rap);
console.log('rap', rap)
function updateAlamatFields(status) { function updateAlamatFields(status) {
// Ambil elemen formulir // Ambil elemen formulir
const addressForm = document.getElementById('alamat_form'); const addressForm = document.getElementById('alamat_form');
@@ -162,9 +217,14 @@
const form = document.querySelector('form'); const form = document.querySelector('form');
const formData = new FormData(form); const formData = new FormData(form);
console.log('Form data entries:', Array.from(formData.entries())); console.log('Form data entries:', Array.from(formData.entries()));
const urlParams = new URLSearchParams(window.location.search);
const permohonanId = {{ $permohonan->id }};
const documentId = urlParams.get('documentId');
const inspeksiId = urlParams.get('inspeksiId');
const requestUrl =
`{{ route('penilai.storeRap') }}?permohonanId=${permohonanId}&inspeksiId=${inspeksiId}&documentId=${documentId}`;
$.ajax({ $.ajax({
url: '{{ route('surveyor.store') }}', url: requestUrl,
type: 'POST', type: 'POST',
data: formData, data: formData,
processData: false, processData: false,
@@ -182,7 +242,7 @@
confirmButtonText: 'OK' confirmButtonText: 'OK'
}).then((response) => { }).then((response) => {
if (response.isConfirmed) { if (response.isConfirmed) {
window.location.reload(); // window.location.reload();
} }
}); });
} else { } else {

View File

@@ -337,14 +337,23 @@
<div class="flex card-footer justify-end gap-5"> <div class="flex card-footer justify-end gap-5">
<button type="button" class="btn btn-success" onclick="saveResume()">Save</button> <button type="button" class="btn btn-success" onclick="saveResume()">Save</button>
@if (Auth::user()->hasAnyRole(['senior-officer'])) @if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-primary" <a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-secondary"
href="{{ route('penilai.paparan') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
PAPARAN
</a>
<a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )"> onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print <i class="ki-filled ki-printer"></i> Print
</a> </a>
@endif @endif
</div> </div>
@include('lpj::penilai.components.foto-lampiran')
</div> </div>
</form> </form>

View File

@@ -6,10 +6,28 @@
@section('content') @section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto"> <div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
@include('lpj::component.detail-jaminan', ['backLink' => 'penilai.show', 'id' => $permohonan->id, 'title' => 'Lampiran foto dan dokument']) @if (Auth::user()->hasAnyRole(['senior-officer']))
@include('lpj::component.detail-jaminan', [
'backLink' => 'otorisator.view-laporan',
'queryParams' => [
'permohonanId' => request()->query('permohonanId'),
'documentId' => request()->query('documentId'),
'inspeksiId' => request()->query('inspeksiId'),
'jaminanId' => request()->query('jaminanId'),
'statusLpj' => 1,
],
'title' => 'Paparan dokument',
])
@else
@include('lpj::component.detail-jaminan', [
'backLink' => 'penilai.show',
'id' => $permohonan->id,
'title' => 'Lampiran foto dan dokument',
])
@endif
@include('lpj::penilai.components.foto-lampiran') @include('lpj::penilai.components.foto-lampiran')
</div> </div>
@endsection @endsection

View File

@@ -93,7 +93,7 @@
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm"> <p class="flex w-full text-gray-600 font-medium text-sm">
{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}</p> {{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) ?? '' }}</p>
</div> </div>
<label class="form-label max-w-56 "> <label class="form-label max-w-56 ">
Status Bayar Status Bayar
@@ -197,19 +197,20 @@
$jaminanId = $dokumen->id; $jaminanId = $dokumen->id;
$currentInspeksi = $inspeksiData[$jaminanId] ?? null; $currentInspeksi = $inspeksiData[$jaminanId] ?? null;
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT']; $tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'ALAT BERAT'];
@endphp @endphp
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full card-footer mt-2 "> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full card-footer mt-2 ">
<div class="flex gap-5"> <div class="flex gap-5">
<a class="btn btn-primary" <a class="btn btn-primary"
href="{{ route('penilai.lampiran', $permohonan->id) }}?documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}"> href="{{ route('penilai.lampiran') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
LAMPIRAN FOTO DAN DOKUMEN LAMPIRAN FOTO DAN DOKUMEN
</a> </a>
@if (strtolower($permohonan->tujuanPenilaian->name) != 'rap')
<a class="btn btn-primary" data-modal-toggle="#modal_2"> <a class="btn btn-primary" data-modal-toggle="#modal_2">
KERTAS KERJA KERTAS KERJA
</a> </a>
@endif
<a class="btn btn-primary" <a class="btn btn-primary"
href="{{ route('penilai.paparan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}"> href="{{ route('penilai.paparan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
PAPARAN PAPARAN
@@ -220,6 +221,7 @@
Pembuatan Laporan Pembuatan Laporan
</button> </button>
{{-- kios tanah bangunan kalo dalam mall ruko --}}
<div class="dropdown-content w-full max-w-56 py-2"> <div class="dropdown-content w-full max-w-56 py-2">
<div class="menu menu-default flex flex-col w-full"> <div class="menu menu-default flex flex-col w-full">
@if (strtolower($permohonan->tujuanPenilaian->name) == 'rap') @if (strtolower($permohonan->tujuanPenilaian->name) == 'rap')
@@ -236,6 +238,9 @@
</a> </a>
</div> </div>
@else @else
{{-- pendapingan kjjp leleang --}}
{{-- memo pendapingan lelang --}}
{{-- existing di --}}
<div class="menu-item"> <div class="menu-item">
<a class="menu-link" <a class="menu-link"
onclick="memo('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})"> onclick="memo('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">

View File

@@ -21,7 +21,7 @@
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tanggal Survey</label> <label class="form-label max-w-56">Tanggal Dibuat</label>
<div class="flex flex-wrap items-base line w-full"> <div class="flex flex-wrap items-base line w-full">
<p class="text-2sm text-gray-700">{{ $permohonan->created_at->format('d/m/Y') }}</p> <p class="text-2sm text-gray-700">{{ $permohonan->created_at->format('d/m/Y') }}</p>
</div> </div>
@@ -51,7 +51,7 @@
<label class="form-label max-w-56">Tanggal Survey</label> <label class="form-label max-w-56">Tanggal Survey</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tanggal_survey" class="input" <input type="date" name="tanggal_survey" class="input"
placeholder="Masukkan Hubungan Calon Debitur"> placeholder="Masukkan Hubungan Calon Debitur" value="{{ $forminspeksi['tanggal_survey'] ?? "" }}">
<em id="error-tanggal_survey" class="alert text-danger text-sm"></em> <em id="error-tanggal_survey" class="alert text-danger text-sm"></em>
</div> </div>
</div> </div>
@@ -83,7 +83,7 @@
<label class="form-label max-w-56">Nama Wakil Debitur</label> <label class="form-label max-w-56">Nama Wakil Debitur</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" name="nama_wakil" class="input" <input type="text" name="nama_wakil" class="input"
placeholder="Masukkan Hubungan Calon Debitur"> placeholder="Masukkan Hubungan Calon Debitur" value="{{ $forminspeksi['nama_wakil'] ?? '' }}">
<em id="error-nama_wakil" class="alert text-danger text-sm"></em> <em id="error-nama_wakil" class="alert text-danger text-sm"></em>
@@ -93,7 +93,7 @@
<label class="form-label max-w-56">Hubungan Calon Debitur</label> <label class="form-label max-w-56">Hubungan Calon Debitur</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" name="hub_calon_debitur" class="input" <input type="text" name="hub_calon_debitur" class="input"
placeholder="Masukkan Hubungan Calon Debitur"> placeholder="Masukkan Hubungan Calon Debitur" value="{{$forminspeksi['hub_calon_debitur'] ?? ''}}">
<em id="error-hub_calon_debitur" class="alert text-danger text-sm"></em> <em id="error-hub_calon_debitur" class="alert text-danger text-sm"></em>
@@ -190,7 +190,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Kondisi</label> <label class="form-label max-w-56">Kondisi</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" name="kondisi" class="input" placeholder="Masukkan Kondisi"> <input type="text" name="kondisi" class="input" placeholder="Masukkan Kondisi" value="{{ $forminspeksi['kondisi'] ?? '' }}">
<em id="error-kondisi" class="alert text-danger text-sm"></em> <em id="error-kondisi" class="alert text-danger text-sm"></em>
</div> </div>
@@ -395,7 +395,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Posisi Kilometer</label> <label class="form-label max-w-56">Posisi Kilometer</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" name="posisi_kilometer" class="input" placeholder="Posisi Kilometer"> <input type="text" name="posisi_kilometer" class="input" placeholder="Posisi Kilometer" value="{{ $forminspeksi['posisi_kilometer'] ?? '' }}">
<em id="error-posisi_kilometer" class="alert text-danger text-sm"></em> <em id="error-posisi_kilometer" class="alert text-danger text-sm"></em>
</div> </div>
@@ -571,7 +571,7 @@
<label class="form-label max-w-56">Perusahaan Asuransi</label> <label class="form-label max-w-56">Perusahaan Asuransi</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="text" name="perusahaan_asuransi" class="input" <input type="text" name="perusahaan_asuransi" class="input"
placeholder="Pesurahaan Asuransi"> placeholder="Pesurahaan Asuransi" value="{{ $forminspeksi['perusahaan_asuransi'] ?? '' }}">
<em class="alert text-danger text-sm"></em> <em class="alert text-danger text-sm"></em>
</div> </div>
@@ -580,7 +580,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tahun Berakhir</label> <label class="form-label max-w-56">Tahun Berakhir</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tahun_berakhir" class="input" placeholder="Tahun berakhir"> <input type="date" name="tahun_berakhir" class="input" placeholder="Tahun berakhir" value="{{ $forminspeksi['tahun_berakhir'] ?? "" }}">
<em class="alert text-danger text-sm"></em> <em class="alert text-danger text-sm"></em>
</div> </div>

View File

@@ -1,417 +1,412 @@
<div class="card-header bg-agi-50">
<div class="card-header bg-agi-50"> <h3 class="card-title">Data Pembanding</h3>
<h3 class="card-title">Data Pembanding</h3> <div class="flex items-center gap-2">
<div class="flex items-center gap-2"> <a href="{{ route('surveyor.show', ['id' => request('pembanding')]) }}" class="btn btn-xs btn-info">
<a href="{{ route('surveyor.show', ['id' => request('pembanding')]) }}" class="btn btn-xs btn-info"> <i class="ki-filled ki-exit-left"></i> Kembali
<i class="ki-filled ki-exit-left"></i> Kembali </a>
</a>
</div>
</div> </div>
</div>
<div class="card-header bg-agi-50 py-5 flex-wrap flex justify-end"> <div class="card-header bg-agi-50 py-5 flex-wrap flex justify-end">
<button type="button" id="addColumnBtn" class="btn btn-primary btn-sm"> <button type="button" id="addColumnBtn" class="btn btn-primary btn-sm">
<i class="ki-filled ki-plus"></i> Tambah Pembanding <i class="ki-filled ki-plus"></i> Tambah Pembanding
</button> </button>
<button type="button" id="removeColumnBtn" class="btn btn-danger btn-sm ml-2" style="display: none;"> <button type="button" id="removeColumnBtn" class="btn btn-danger btn-sm ml-2" style="display: none;">
<i class="ki-filled ki-minus"></i> Hapus Pembanding <i class="ki-filled ki-minus"></i> Hapus Pembanding
</button> </button>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="scrollable-x-auto"> <div class="scrollable-x-auto">
<table id="dataTable" class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"> <table id="dataTable" class="table table-auto table-border align-middle text-gray-700 font-medium text-sm">
<thead class="bg-gray-50 sticky top-0"> <thead class="bg-gray-50 sticky top-0">
<tr> <tr>
<th class="px-4 py-3 min-w-[200px]">Parameter</th> <th class="px-4 py-3 min-w-[200px]">Parameter</th>
<th class="px-4 py-3 min-w-[250px]">Objek Penilaian</th> <th class="px-4 py-3 min-w-[250px]">Objek Penilaian</th>
<th class="px-4 py-3 min-w-[250px]">Data Pembanding 1</th> <th class="px-4 py-3 min-w-[250px]">Data Pembanding 1</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<!-- Informasi Dasar --> <!-- Informasi Dasar -->
<tr class="bg-gray-100"> <tr class="bg-gray-100">
<td colspan="3" class="px-4 py-2 font-semibold">Informasi Dasar</td> <td colspan="3" class="px-4 py-2 font-semibold">Informasi Dasar</td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Foto</td> <td class="px-4 py-2">Foto</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<img id="uploadedImage1" <img id="uploadedImage1"
src="{{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? asset('storage/' . $fotoForm['object_jaminan'][0]['foto_objek']) : '' }}" src="{{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? asset('storage/' . $fotoForm['object_jaminan'][0]['foto_objek']) : '' }}"
class="max-w-[200px] {{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? '' : 'hidden' }}" class="max-w-[200px] {{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? '' : 'hidden' }}"
alt="Uploaded Image"> alt="Uploaded Image">
<input type="file" name="foto_objek" class="file-input" accept="image/*" <input type="file" name="foto_objek" class="file-input" accept="image/*"
onchange="previewImage(this, 'uploadedImage1')"> onchange="previewImage(this, 'uploadedImage1')">
</div> </div>
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<img id="uploadedImage2" class="max-w-[200px] hidden" alt="Pembanding Image"> <img id="uploadedImage2" class="max-w-[200px] hidden" alt="Pembanding Image">
<input type="file" name="foto_objek_pembanding[]" class="file-input" accept="image/*" <input type="file" name="foto_objek_pembanding[]" class="file-input" accept="image/*"
onchange="previewImage(this, 'uploadedImage2')"> onchange="previewImage(this, 'uploadedImage2')">
</div> </div>
</td> </td>
</tr> </tr>
<!-- Data Properti --> <!-- Data Properti -->
<tr class="bg-gray-100"> <tr class="bg-gray-100">
<td colspan="3" class="px-4 py-2 font-semibold">Data </td> <td colspan="3" class="px-4 py-2 font-semibold">Data </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Nama</td> <td class="px-4 py-2">Nama</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="nama" class="input" value="{{ $inspectionData['nama'] ?? '' }}"> <input type="text" name="nama" class="input" value="{{ $inspectionData['nama'] ?? '' }}">
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="nama_pembanding[]" class="input"> <input type="text" name="nama_pembanding[]" class="input">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Tipe</td> <td class="px-4 py-2">Tipe</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="type" class="input" value="{{ $inspectionData['type'] ?? '' }}"> <input type="text" name="type" class="input" value="{{ $inspectionData['type'] ?? '' }}">
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="type_pembanding[]" class="input"> <input type="text" name="type_pembanding[]" class="input">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Warna</td> <td class="px-4 py-2">Warna</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="warna" class="input " value="{{ $inspectionData['warna'] ?? '' }}"> <input type="text" name="warna" class="input "
</td> value="{{ $inspectionData['warna'] ?? '' }}">
<td class="px-4 py-2"> </td>
<input type="text" name="warna_pembanding[]" class="input"> <td class="px-4 py-2">
</td> <input type="text" name="warna_pembanding[]" class="input">
</tr> </td>
<tr> </tr>
<td class="px-4 py-2">Lokasi</td> <tr>
<td class="px-4 py-2"> <td class="px-4 py-2">Lokasi</td>
<td class="px-4 py-2">
<input type="text" name="lokasi" class="input" value="{{ $inspectionData['lokasi'] ?? '' }}"> <input type="text" name="lokasi" class="input"
</td> value="{{ $inspectionData['lokasi'] ?? '' }}">
<td class="px-4 py-2"> </td>
<input type="text" name="lokasi_pembanding[]" class="input"> <td class="px-4 py-2">
</td> <input type="text" name="lokasi_pembanding[]" class="input">
</tr> </td>
<tr> </tr>
<td class="px-4 py-2">Sumber data</td> <tr>
<td class="px-4 py-2"> <td class="px-4 py-2">Sumber data</td>
<td class="px-4 py-2">
<input type="text" name="sumber_data" class="input" value="{{ $inspectionData['sumber_data'] ?? '' }}"> <input type="text" name="sumber_data" class="input"
</td> value="{{ $inspectionData['sumber_data'] ?? '' }}">
<td class="px-4 py-2"> </td>
<input type="text" name="sumber_data_pembanding[]" class="input"> <td class="px-4 py-2">
</td> <input type="text" name="sumber_data_pembanding[]" class="input">
</tr> </td>
</tr>
<tr> <tr>
<td class="px-4 py-2">Tahun</td> <td class="px-4 py-2">Tahun</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="tahun" class="input number-format" value="{{ $inspectionData['tahun'] ?? '' }}" <input type="text" name="tahun" class="input number-format"
> value="{{ $inspectionData['tahun'] ?? '' }}">
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="tahun_pembanding[]" class="input number-format"> <input type="text" name="tahun_pembanding[]" class="input number-format">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Transmisi</td> <td class="px-4 py-2">Transmisi</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="transmisi" class="input"
<input type="text" name="transmisi" class="input " value="{{ is_array($inspectionData['transmisi'] ?? '') ? implode(', ', $inspectionData['transmisi']) : $inspectionData['transmisi'] ?? '' }}">
value="{{ $inspectionData['transmisi'] ?? '' }}"> </td>
</td> <td class="px-4 py-2">
<td class="px-4 py-2"> <input type="text" name="transmisi_pembanding[]" class="input ">
<input type="text" name="transmisi_pembanding[]" class="input "> </td>
</td> </tr>
</tr>
<!-- Informasi Harga --> <!-- Informasi Harga -->
<tr class="bg-gray-100"> <tr class="bg-gray-100">
<td colspan="3" class="px-4 py-2 font-semibold">Spesifikasi</td> <td colspan="3" class="px-4 py-2 font-semibold">Spesifikasi</td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Tahun Pembuatan <td class="px-4 py-2">Tahun Pembuatan
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="tahun_pembuatan" class="input number-format" <input type="text" name="tahun_pembuatan" class="input number-format"
value="{{ $inspectionData['tahun_pembuatan'] ?? '' }}" value="{{ $inspectionData['tahun_pembuatan'] ?? '' }}">
> </td>
</td> <td class="px-4 py-2">
<td class="px-4 py-2"> <input type="text" name="tahun_pembuatan_pembanding[]" class="input">
<input type="text" name="tahun_pembuatan_pembanding[]" class="input"> </td>
</td> </tr>
</tr> <tr>
<tr> <td class="px-4 py-2">Merek / Buatan
<td class="px-4 py-2">Merek / Buatan </td>
</td> <td class="px-4 py-2">
<td class="px-4 py-2"> <input type="text" name="merek_buatan" class="input"
<input type="text" name="merek_buatan" class="input"
value="{{ $inspectionData['merek_buatan'] ?? '' }}"> value="{{ $inspectionData['merek_buatan'] ?? '' }}">
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="merek_buatan_pembanding[]" class="input"> <input type="text" name="merek_buatan_pembanding[]" class="input">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Kapasitas / HP <td class="px-4 py-2">Kapasitas / HP
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="kapasitas" class="input" <input type="text" name="kapasitas" class="input"
value="{{ $inspectionData['kapasitas'] ?? '' }}"> value="{{ $inspectionData['kapasitas'] ?? '' }}">
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="kapasitas_pembanding[]" class="input"> <input type="text" name="kapasitas_pembanding[]" class="input">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Power</td> <td class="px-4 py-2">Power</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="power" class="input" <input type="text" name="power" class="input"
value="{{ $inspectionData['power'] ?? '' }}"> value="{{ $inspectionData['power'] ?? '' }}">
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="power_pembanding[]" class="input"> <input type="text" name="power_pembanding[]" class="input">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Kondisi</td> <td class="px-4 py-2">Kondisi</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="kondisi" class="input" <input type="text" name="kondisi" class="input"
value="{{ $inspectionData['kondisi'] ?? '' }}"> value="{{ $inspectionData['kondisi'] ?? '' }}">
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="kondisi_pembanding[]" class="input"> <input type="text" name="kondisi_pembanding[]" class="input">
</td> </td>
</tr> </tr>
<!-- Lokasi --> <!-- Lokasi -->
<tr class="bg-gray-100"> <tr class="bg-gray-100">
<td colspan="3" class="px-4 py-2 font-semibold">Lokasi</td> <td colspan="3" class="px-4 py-2 font-semibold">Lokasi</td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Koordinat</td> <td class="px-4 py-2">Koordinat</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<div class="grid grid-cols-2 gap-2"> <div class="grid grid-cols-2 gap-2">
<input type="text" name="kordinat_lat" class="input" placeholder="Latitude" <input type="text" name="kordinat_lat" class="input" placeholder="Latitude"
value="{{ $inspectionData['kordinat_lat'] ?? '' }}"> value="{{ $inspectionData['kordinat_lat'] ?? '' }}">
<input type="text" name="kordinat_lng" class="input" placeholder="Longitude" <input type="text" name="kordinat_lng" class="input" placeholder="Longitude"
value="{{ $inspectionData['kordinat_lng'] ?? '' }}"> value="{{ $inspectionData['kordinat_lng'] ?? '' }}">
</div> </div>
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<div class="grid grid-cols-2 gap-2"> <div class="grid grid-cols-2 gap-2">
<input type="text" name="kordinat_lat_pembanding[]" class="input" <input type="text" name="kordinat_lat_pembanding[]" class="input"
placeholder="Latitude"> placeholder="Latitude">
<input type="text" name="kordinat_lng_pembanding[]" class="input" <input type="text" name="kordinat_lng_pembanding[]" class="input"
placeholder="Longitude"> placeholder="Longitude">
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Alamat</td> <td class="px-4 py-2">Alamat</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
@php
$address = $inspectionData['nama_jalan'] ?? null;
@endphp
<textarea name="nama_jalan" class="input py-2" rows="2">{{ $address }}</textarea>
</td>
<td class="px-4 py-2">
<textarea name="address_pembanding[]" class="input py-2" rows="2"></textarea>
</td>
</tr>
<tr>
<td class="px-4 py-2">Provinsi</td>
<td class="px-4 py-2">
<select id="province_code" name="province_code" class="input w-full">
<option value="">Select Province</option>
@foreach ($provinces as $province)
@php
$selectedProvince = $inspectionData['alamat']['sesuai']['province_code'] ?? null;
@endphp
<option value="{{ $province->code }}"
{{ $selectedProvince == $province->code ? 'selected' : '' }}>
{{ $province->name }}
</option>
@endforeach
</select>
</td>
<td class="px-4 py-2">
<select id="province_code_pembanding" name="province_code_pembanding[]"
onchange="handleProvinceChange(this)" class="input w-full">
<option value="">Pilih Provinsi</option>
@foreach ($provinces as $province)
<option value="{{ $province->code }}">{{ $province->name }}
</option>
@endforeach
</select>
</td>
</tr>
<tr>
<td class="px-4 py-2">Kabupaten/Kota</td>
<td class="px-4 py-2">
<select id="city_code" name="city_code" class="select w-full">
@php @php
$address = $inspectionData['nama_jalan'] ?? null;
$selectedCity = $inspectionData['alamat']['sesuai']['city_code'] ?? null;
@endphp @endphp
<textarea name="nama_jalan" class="input py-2" rows="2">{{ $address }}</textarea> <option value="">Pilih Kota/Kabupaten</option>
</td> @if (isset($selectedCity))
<td class="px-4 py-2"> @foreach ($cities as $city)
<textarea name="address_pembanding[]" class="input py-2" rows="2"></textarea> <option value="{{ $city->code }}"
</td> {{ $selectedCity == $city->code ? 'selected' : '' }}>
</tr> {{ $city->name }}
<tr>
<td class="px-4 py-2">Provinsi</td>
<td class="px-4 py-2">
<select id="province_code" name="province_code" class="input w-full">
<option value="">Select Province</option>
@foreach ($provinces as $province)
@php
$selectedProvince =
$inspectionData['alamat']['sesuai']['province_code'] ?? null;
@endphp
<option value="{{ $province->code }}"
{{ $selectedProvince == $province->code ? 'selected' : '' }}>
{{ $province->name }}
</option> </option>
@endforeach @endforeach
</select> @endif
</td> </select>
<td class="px-4 py-2"> </td>
<select id="province_code_pembanding" name="province_code_pembanding[]" <td class="px-4 py-2">
onchange="handleProvinceChange(this)" class="input w-full"> <select id="city_code_pembanding" name="city_code_pembanding[]"
<option value="">Pilih Provinsi</option> onchange="handleCityChange(this)" class="input w-full">
@foreach ($provinces as $province) <option value="">Pilih Kota/Kabupaten</option>
<option value="{{ $province->code }}">{{ $province->name }} </select>
</td>
</tr>
<tr>
<td class="px-4 py-2">Kecamatan</td>
<td class="px-4 py-2">
<select id="district_code" name="district_code" class="select w-full">
@php
$selectedDisrict = $inspectionData['alamat']['sesuai']['district_code'] ?? null;
@endphp
<option value="">Pilih Kecamatan</option>
@if (isset($selectedDisrict))
@foreach ($districts as $district)
<option value="{{ $district->code }}"
{{ $selectedDisrict == $district->code ? 'selected' : '' }}>
{{ $district->name }}
</option> </option>
@endforeach @endforeach
</select> @endif
</td> </select>
</tr> </td>
<td class="px-4 py-2">
<tr> <select id="district_code_pembanding" name="district_code_pembanding[]"
<td class="px-4 py-2">Kabupaten/Kota</td> onchange="handleDistrictChange(this)" class="input w-full">
<td class="px-4 py-2"> <option value="">Pilih Kecamatan</option>
<select id="city_code" name="city_code" class="select w-full"> </select>
@php </td>
</tr>
<tr>
<td class="px-4 py-2">Desa/Kelurahan</td>
<td class="px-4 py-2">
<select id="village_code" name="village_code" class="select w-full">
@php
$selectedCity = $inspectionData['alamat']['sesuai']['city_code'] ?? null; $selectedDesa = $inspectionData['alamat']['sesuai']['village_code'] ?? null;
@endphp @endphp
<option value="">Pilih Kota/Kabupaten</option> <option value="">Pilih Kecamatan</option>
@if (isset($selectedCity)) @if (isset($selectedDesa))
@foreach ($cities as $city) @foreach ($villages as $village)
<option value="{{ $city->code }}" <option value="{{ $village->code }}"
{{ $selectedCity == $city->code ? 'selected' : '' }}> {{ $selectedDesa == $village->code ? 'selected' : '' }}>
{{ $city->name }} {{ $village->name }}
</option> </option>
@endforeach @endforeach
@endif @endif
</select> </select>
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<select id="city_code_pembanding" name="city_code_pembanding[]" <select id="village_code_pembanding" name="village_code_pembanding[]" class="input w-full">
onchange="handleCityChange(this)" class="input w-full"> <option value="">Pilih Desa/Kelurahan</option>
<option value="">Pilih Kota/Kabupaten</option> </select>
</select> </td>
</td> </tr>
</tr>
<tr> <tr class="bg-gray-100">
<td class="px-4 py-2">Kecamatan</td> <td colspan="3" class="px-4 py-2 font-semibold">Harga</td>
<td class="px-4 py-2"> </tr>
<select id="district_code" name="district_code" class="select w-full">
@php
$selectedDisrict = <tr>
$inspectionData['alamat']['sesuai']['district_code'] ?? null; <td class="px-4 py-2">Harga</td>
@endphp <td class="px-4 py-2">
<option value="">Pilih Kecamatan</option> <input type="text" name="harga" class="input currency"
@if (isset($selectedDisrict)) value="{{ $inspectionData['harga'] ?? '' }}">
@foreach ($districts as $district) </td>
<option value="{{ $district->code }}" <td class="px-4 py-2">
{{ $selectedDisrict == $district->code ? 'selected' : '' }}> <input type="text" name="harga_pembanding[]" class="input currency">
{{ $district->name }} </td>
</option> </tr>
@endforeach <tr>
@endif <td class="px-4 py-2">Diskon</td>
</select> <td class="px-4 py-2">
</td> <div class="input">
<td class="px-4 py-2"> <input type="text" name="diskon" class=" currency"
value="{{ $inspectionData['diskon'] ?? '' }}">
<span class="btn btn-icon">
<i class="ki-outline ki-percentage"></i>
</span>
</div>
<select id="district_code_pembanding" name="district_code_pembanding[]" </td>
onchange="handleDistrictChange(this)" class="input w-full"> <td class=" px-4 py-2">
<option value="">Pilih Kecamatan</option> <div class="input">
</select> <input type="text" name="diskon_pembanding[]" class="currency">
</td> <span class="btn btn-icon">
</tr> <i class="ki-outline ki-percentage"></i>
</i>
</span>
</div>
<tr> </td>
<td class="px-4 py-2">Desa/Kelurahan</td> </tr>
<td class="px-4 py-2"> <tr style="display: none;">
<select id="village_code" name="village_code" class="select w-full"> <td class="px-4 py-2">Total</td>
@php <td class="px-4 py-2">
<input type="text" name="total" class="input currency"
$selectedDesa = value="{{ $inspectionData['total'] ?? '' }}">
$inspectionData['alamat']['sesuai']['village_code'] ?? null; </td>
@endphp <td class="px-4 py-2">
<option value="">Pilih Kecamatan</option> <input type="text" name="total_pembanding[]" class="input currency-format">
@if (isset($selectedDesa)) </td>
@foreach ($villages as $village) </tr>
<option value="{{ $village->code }}" <tr>
{{ $selectedDesa == $village->code ? 'selected' : '' }}> <td class="px-4 py-2">Harga Setelah Diskon</td>
{{ $village->name }} <td class="px-4 py-2">
</option> <input type="text" name="harga_diskon" class="input currency-format" readonly
@endforeach value="{{ $inspectionData['harga_diskon'] ?? '' }}">
@endif </td>
</select> <td class="px-4 py-2">
</td> <input type="text" name="harga_diskon_pembanding[]" readonly
<td class="px-4 py-2"> class="input currency-format">
<select id="village_code_pembanding" name="village_code_pembanding[]" </td>
class="input w-full"> </tr>
<option value="">Pilih Desa/Kelurahan</option> </tbody>
</select> </table>
</td>
</tr>
<tr class="bg-gray-100">
<td colspan="3" class="px-4 py-2 font-semibold">Harga</td>
</tr>
<tr>
<td class="px-4 py-2">Harga</td>
<td class="px-4 py-2">
<input type="text" name="harga" class="input currency-format"
value="{{ $inspectionData['harga'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="harga_pembanding[]" class="input currency">
</td>
</tr>
<tr>
<td class="px-4 py-2">Diskon</td>
<td class="px-4 py-2">
<div class="input">
<input type="text" name="diskon" class=" currency"
value="{{ $inspectionData['diskon'] ?? '' }}">
<span class="btn btn-icon">
<i class="ki-outline ki-percentage"></i>
</span>
</div>
</td>
<td class=" px-4 py-2">
<div class="input">
<input type="text" name="diskon_pembanding[]" class="currency">
<span class="btn btn-icon">
<i class="ki-outline ki-percentage"></i>
</i>
</span>
</div>
</td>
</tr>
<tr style="display: none;">
<td class="px-4 py-2">Total</td>
<td class="px-4 py-2">
<input type="text" name="total" class="input currency"
value="{{ $inspectionData['total'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="total_pembanding[]" class="input currency-format">
</td>
</tr>
<tr>
<td class="px-4 py-2">Harga Setelah Diskon</td>
<td class="px-4 py-2">
<input type="text" name="harga_diskon" class="input currency-format" readonly
value="{{ $inspectionData['harga_diskon'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="harga_diskon_pembanding[]" readonly
class="input currency-format">
</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div>

View File

@@ -103,16 +103,13 @@
}); });
} }
// $('.card-title a').on('click', function(e) {
// e.preventDefault();
// var url = $(this).attr('href');
// $.get(url, function(response) {
// $('.card-body').html(response);
$('.card-title a').on('click', function(e) { // });
e.preventDefault(); // });
var url = $(this).attr('href');
$.get(url, function(response) {
$('.card-body').html(response);
});
});
</script> </script>
@endpush @endpush

View File

@@ -562,7 +562,7 @@ Route::middleware(['auth'])->group(function () {
Route::get('/{id}/show', [PenilaiController::class, 'show'])->name('show'); Route::get('/{id}/show', [PenilaiController::class, 'show'])->name('show');
Route::get('datatables', [PenilaiController::class, 'dataForDatatables'])->name('dataForTables'); Route::get('datatables', [PenilaiController::class, 'dataForDatatables'])->name('dataForTables');
Route::get('lampiran/{id}', [PenilaiController::class, 'lampiran'])->name('lampiran'); Route::get('lampiran', [PenilaiController::class, 'lampiran'])->name('lampiran');
Route::get('export/kertas-kerja', [PenilaiController::class, 'export_kertas_kerja'])->name('export.kertas-kerja'); Route::get('export/kertas-kerja', [PenilaiController::class, 'export_kertas_kerja'])->name('export.kertas-kerja');
Route::get('print-out', [PenilaiController::class, 'print_out'])->name('print-out'); Route::get('print-out', [PenilaiController::class, 'print_out'])->name('print-out');
@@ -581,6 +581,7 @@ Route::middleware(['auth'])->group(function () {
Route::post('storeResume', [PenilaiController::class, 'storeResume'])->name('storeResume'); Route::post('storeResume', [PenilaiController::class, 'storeResume'])->name('storeResume');
Route::post('storeMemo', [PenilaiController::class, 'storeMemo'])->name('storeMemo'); Route::post('storeMemo', [PenilaiController::class, 'storeMemo'])->name('storeMemo');
Route::post('storeRap', [PenilaiController::class, 'storeRap'])->name('storeRap');
Route::post('storeLpjSederhanadanStandard', [PenilaiController::class, 'storeLpjSederhanadanStandard'])->name('storeLpjSederhanadanStandard'); Route::post('storeLpjSederhanadanStandard', [PenilaiController::class, 'storeLpjSederhanadanStandard'])->name('storeLpjSederhanadanStandard');
}); });