Merge branch 'feature/senior-officer' of https://git.putrakuningan.com/daengdeni/lpj into feature/senior-officer
This commit is contained in:
@@ -146,7 +146,6 @@
|
||||
$debitur = Debiture::find($id);
|
||||
|
||||
$validate = $request->validated();
|
||||
|
||||
if ($validate) {
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
@@ -137,6 +137,7 @@ class PenilaiController extends Controller
|
||||
|
||||
$resume = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
$lpjData = null;
|
||||
$resumeData = null;
|
||||
if ($resume) {
|
||||
$resumeData = json_decode($resume->resume, true);
|
||||
}
|
||||
@@ -153,21 +154,31 @@ class PenilaiController extends Controller
|
||||
|
||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
|
||||
$penilai = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
$provinces = Province::all();
|
||||
$basicData = $this->surveyorController->getCommonData();
|
||||
|
||||
$formFoto = null;
|
||||
$formPeta = null;
|
||||
$formFoto = $formPeta = $cities = $districts = $villages= null;
|
||||
if ($inspeksi) {
|
||||
$formFoto = json_decode($inspeksi->foto_form, true);
|
||||
$formPeta = json_decode($inspeksi->data_form, true);
|
||||
$memo = json_decode($penilai->memo);
|
||||
if(isset($memo->province_code)){
|
||||
$cities = City::where('province_id', $memo->province_code)->get();
|
||||
}
|
||||
|
||||
if(isset($memo->city_code)){
|
||||
$districts = District::where('city_id', $memo->city_code)->get();
|
||||
}
|
||||
|
||||
if(isset($memo->district_code)) {
|
||||
$villages = Village::where('district_id', $memo->district_code)->get();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta', 'provinces', 'basicData'));
|
||||
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta', 'provinces', 'basicData','memo','cities', 'districts', 'villages'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user