Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Modules\Lpj\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Lpj\Models\Permohonan;
|
||||
use Modules\Lpj\Models\Inspeksi;
|
||||
use Modules\Lpj\Models\Penilai;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
@@ -15,6 +16,13 @@ class PenilaiController extends Controller
|
||||
{
|
||||
public $user;
|
||||
|
||||
protected $surveyorController;
|
||||
|
||||
public function __construct(SurveyorController $surveyorController)
|
||||
{
|
||||
$this->surveyorController = $surveyorController;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
@@ -30,9 +38,9 @@ class PenilaiController extends Controller
|
||||
{
|
||||
$permohonan = Permohonan::with('debiture.documents')->find($id);
|
||||
|
||||
$jaminanId = $permohonan->debiture->documents->first()->jenis_jaminan_id;
|
||||
$documentId = $request->query('documentId');
|
||||
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $jaminanId)->first();
|
||||
|
||||
$formFoto = null;
|
||||
if ($inpeksi) {
|
||||
@@ -56,14 +64,20 @@ class PenilaiController extends Controller
|
||||
//
|
||||
}
|
||||
|
||||
public function sederhana($id)
|
||||
public function sederhana(Request $request,$id)
|
||||
{
|
||||
$data = new SurveyorController();
|
||||
$basicData = $data->getCommonData();
|
||||
|
||||
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
||||
$jaminanId = $permohonan->debiture->documents->first()->jenis_jaminan_id;
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||
$basicData = $this->surveyorController->getCommonData();
|
||||
|
||||
$documentId = $request->query('documentId');
|
||||
$inspeksiId = $request->query('inspeksiId');
|
||||
$jaminanId = $request->query('jaminanId');
|
||||
|
||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($id, $documentId, $jaminanId);
|
||||
|
||||
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $documentId)->first();
|
||||
$forminspeksi = null;
|
||||
if ($inspeksi) {
|
||||
$forminspeksi = json_decode($inspeksi->data_form, true);
|
||||
@@ -71,33 +85,55 @@ class PenilaiController extends Controller
|
||||
return view('lpj::penilai.components.lpj-sederhana-standard', compact('permohonan', 'basicData', 'forminspeksi', 'inspeksi'));
|
||||
}
|
||||
|
||||
public function standard($id)
|
||||
public function standard(Request $request, $id)
|
||||
{
|
||||
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
||||
|
||||
$jaminanId = $permohonan->debiture->documents->first()->jenis_jaminan_id;
|
||||
$documentId = $request->query('documentId');
|
||||
$jaminanId = $request->query('jaminanId');
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($id, $documentId, $jaminanId);
|
||||
$basicData = $this->surveyorController->getCommonData();
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $documentId)->first();
|
||||
$forminspeksi = null;
|
||||
if ($inspeksi) {
|
||||
$forminspeksi = json_decode($inspeksi->data_form, true);
|
||||
}
|
||||
|
||||
$data = new SurveyorController();
|
||||
$basicData = $data->getCommonData();
|
||||
|
||||
|
||||
|
||||
return view('lpj::penilai.components.lpj-sederhana-standard', compact('permohonan', 'forminspeksi', 'basicData', 'inspeksi'));
|
||||
}
|
||||
|
||||
public function resume($id)
|
||||
public function resume(Request $request)
|
||||
{
|
||||
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
||||
$permohonanId = $request->query('permohonanId');
|
||||
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($permohonanId);
|
||||
return view('lpj::penilai.components.resume', compact('permohonan'));
|
||||
}
|
||||
|
||||
public function memo()
|
||||
public function memo(Request $request)
|
||||
{
|
||||
return view('lpj::resume.index');
|
||||
$permohonanId = $request->query('permohonanId');
|
||||
$documentId = $request->query('documentId');
|
||||
$inspeksiId = $request->query('inspeksiId');
|
||||
$jaminanId = $request->query('jaminanId');
|
||||
|
||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
|
||||
$formFoto = null;
|
||||
$formPeta = null;
|
||||
if ($inspeksi) {
|
||||
$formFoto = json_decode($inspeksi->foto_form, true);
|
||||
$formPeta = json_decode($inspeksi->data_form, true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta'));
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +142,7 @@ class PenilaiController extends Controller
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
||||
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian', 'documents.inspeksi'])->find($id);
|
||||
|
||||
// return response()->json(['permohonan' => $permohonan]);
|
||||
return view('lpj::penilai.show', compact('permohonan'));
|
||||
@@ -123,11 +159,20 @@ class PenilaiController extends Controller
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
public function paparan(Request $request)
|
||||
{
|
||||
//
|
||||
$permohonanId = $request->query('permohonanId');
|
||||
return view('lpj::penilai.components.paparan');
|
||||
}
|
||||
|
||||
|
||||
public function rap(Request $request)
|
||||
{
|
||||
$permohonanId = $request->query('permohonanId');
|
||||
return view('lpj::penilai.components.paparan');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
@@ -160,7 +205,7 @@ class PenilaiController extends Controller
|
||||
// Apply whereHas to check penilai_id, role, and user_id specifically for 'penilai' role
|
||||
$query->whereHas('penilaian.userPenilai', function ($q) {
|
||||
$q->where('role', 'penilai') // Ensure the role is 'penilai'
|
||||
->where('user_id', 12); // Ganti dengan Auth::user()->id jika dinamis
|
||||
->where('user_id', Auth::user()->id); // Ganti dengan Auth::user()->id jika dinamis
|
||||
});
|
||||
|
||||
// Apply sorting if provided
|
||||
@@ -213,9 +258,9 @@ class PenilaiController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function kertas_kerja($id, $jaminanId)
|
||||
public function export_kertas_kerja($id, $jaminanId)
|
||||
{
|
||||
$data = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||
$data = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $jaminanId)->first();
|
||||
|
||||
// $data = null;
|
||||
// $headerInfo = [
|
||||
@@ -234,5 +279,100 @@ class PenilaiController extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function import_kertas_kerja(Request $request)
|
||||
{
|
||||
|
||||
$validatedData = $request->validate([
|
||||
'permohonan_id' => 'required|integer',
|
||||
'document_id' => 'required|integer',
|
||||
'inspeksi_id' => 'required|integer',
|
||||
'kertas_kerja' => 'required|file|mimes:pdf,doc,docx,xls,xlsx,xlsx',
|
||||
]);
|
||||
|
||||
try {
|
||||
// Simpan file kertas kerja
|
||||
if ($request->hasFile('kertas_kerja')) {
|
||||
$file = $request->file('kertas_kerja');
|
||||
$filePath = $this->surveyorController->uploadFile($file, 'kertas_kerja');
|
||||
Penilai::updateOrCreate(
|
||||
[
|
||||
'permohonan_id' => $validatedData['permohonan_id'],
|
||||
'dokument_id' => $validatedData['document_id'],
|
||||
'inspeksi_id' => $validatedData['inspeksi_id'],
|
||||
],
|
||||
[
|
||||
'kertas_kerja' => $filePath,
|
||||
]
|
||||
);
|
||||
|
||||
return response()->json(['success' => true, 'message' => 'Kertas kerja berhasil diunggah.']);
|
||||
}
|
||||
|
||||
return response()->json(['success' => false, 'message' => 'File kertas kerja tidak ditemukan.'], 400);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json(['success' => false, 'message' => 'Terjadi kesalahan: ' . $e->getMessage()], 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function status($id)
|
||||
{
|
||||
$penilai = Penilai::find($id);
|
||||
return response()->json(['data' => $penilai]);
|
||||
}
|
||||
|
||||
public function checkStatusLpj(Request $request)
|
||||
{
|
||||
$permohonanId = $request->query('permohonanId');
|
||||
$documentId = $request->query('documentId');
|
||||
$inspeksiId = $request->query('inspeksiId');
|
||||
|
||||
$statusLpj = Penilai::where('permohonan_id', $permohonanId)
|
||||
->where('dokument_id', $documentId)
|
||||
->where('inspeksi_id', $inspeksiId)
|
||||
->first();
|
||||
|
||||
return response()->json(['status' => $statusLpj ? $statusLpj->type : null]);
|
||||
}
|
||||
|
||||
public function saveStatusLpj(Request $request)
|
||||
{
|
||||
|
||||
Penilai::updateOrCreate(
|
||||
[
|
||||
'permohonan_id' => $request->permohonan_id,
|
||||
'dokument_id' => $request->document_id,
|
||||
'inspeksi_id' => $request->inspeksi_id,
|
||||
],
|
||||
[
|
||||
'type' => $request->type,
|
||||
]
|
||||
);
|
||||
|
||||
return response()->json(['success' => true]);
|
||||
}
|
||||
|
||||
|
||||
public function storePenilaian($id){
|
||||
try {
|
||||
$permohonan = Permohonan::findOrFail($id);
|
||||
$permohonan->update([
|
||||
'status' => 'proses-laporan',
|
||||
]);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Berhasil menyimpan penilaian'
|
||||
], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Terjadi kesalahan',
|
||||
'error' => $e->getMessage()
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ class SurveyorController extends Controller
|
||||
'tujuanPenilaian',
|
||||
'penilaian',
|
||||
'documents.jenisJaminan',
|
||||
'documents',
|
||||
])->findOrFail($id);
|
||||
|
||||
$surveyor = $id;
|
||||
@@ -112,7 +113,7 @@ class SurveyorController extends Controller
|
||||
// Get all inspeksi data for this permohonan
|
||||
$inspeksiData = Inspeksi::where('permohonan_id', $id)
|
||||
->get()
|
||||
->keyBy('jenis_jaminan_id')
|
||||
->keyBy('dokument_id')
|
||||
->map(function ($item) {
|
||||
return [
|
||||
'data_form' => json_decode($item->data_form, true),
|
||||
@@ -153,7 +154,7 @@ class SurveyorController extends Controller
|
||||
$inspeksi = Inspeksi::updateOrCreate(
|
||||
[
|
||||
'permohonan_id' => $request->input('permohonan_id'),
|
||||
'jenis_jaminan_id' => $request->input('jenis_jaminan_id')
|
||||
'dokument_id' => $request->input('dokument_id')
|
||||
],
|
||||
[
|
||||
'data_form' => json_encode($processedData),
|
||||
@@ -164,6 +165,7 @@ class SurveyorController extends Controller
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Data berhasil disimpan',
|
||||
'data' => $processedData
|
||||
], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
@@ -195,7 +197,7 @@ class SurveyorController extends Controller
|
||||
|
||||
$pisah = array_filter(
|
||||
explode(',', $action),
|
||||
function($act) use ($allowedActions) {
|
||||
function ($act) use ($allowedActions) {
|
||||
return isset($allowedActions[trim($act)]);
|
||||
}
|
||||
);
|
||||
@@ -227,7 +229,7 @@ class SurveyorController extends Controller
|
||||
$validationRules = [
|
||||
'luas' => 'required|numeric',
|
||||
'permohonan_id' => 'required',
|
||||
'jenis_jaminan_id' => 'required'
|
||||
'dokument_id' => 'required'
|
||||
];
|
||||
|
||||
if ($request->hasFile('foto_denah')) {
|
||||
@@ -247,7 +249,7 @@ class SurveyorController extends Controller
|
||||
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))
|
||||
->where('jenis_jaminan_id', $request->input('jenis_jaminan_id'))
|
||||
->where('dokument_id', $request->input('dokument_id'))
|
||||
->first();
|
||||
|
||||
if ($inspeksi) {
|
||||
@@ -261,7 +263,7 @@ class SurveyorController extends Controller
|
||||
} else {
|
||||
Inspeksi::create([
|
||||
'permohonan_id' => $request->input('permohonan_id'),
|
||||
'jenis_jaminan_id' => $request->input('jenis_jaminan_id'),
|
||||
'dokument_id' => $request->input('dokument_id'),
|
||||
'denah_form' => json_encode($formatJsonDenah)
|
||||
]);
|
||||
}
|
||||
@@ -293,7 +295,7 @@ class SurveyorController extends Controller
|
||||
|
||||
$inspeksi = Inspeksi::firstOrNew([
|
||||
'permohonan_id' => $request->input('permohonan_id'),
|
||||
'jenis_jaminan_id' => $request->input('jenis_jaminan_id')
|
||||
'dokument_id' => $request->input('dokument_id')
|
||||
]);
|
||||
|
||||
// Get existing foto_form data if it exists
|
||||
@@ -398,24 +400,24 @@ class SurveyorController extends Controller
|
||||
$maxSize = getMaxFileSize('Foto');
|
||||
return $request->validate([
|
||||
'permohonan_id' => 'required',
|
||||
'jenis_jaminan_id' => 'required',
|
||||
'pendamping' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'foto_objek.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'dokument_id' => 'required',
|
||||
'pendamping' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'foto_objek.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'name_objek.*' => 'required|string|max:255',
|
||||
'foto_lingkungan.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'foto_lingkungan.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'name_lingkungan.*' => 'required|string|max:255',
|
||||
'foto_rute.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'foto_rute.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'name_rute.*' => 'required|string|max:255',
|
||||
'lantai.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'lantai.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'name_lantai_unit.*' => 'nullable|string|max:255',
|
||||
'foto_lantai_unit.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'foto_lantai_unit.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'name_rute_lainnya.*' => 'nullable|string',
|
||||
'foto_rute_lainnya.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'foto_lantai_lainnya.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'foto_rute_lainnya.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'foto_lantai_lainnya.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'name_lantai_lainnya.*' => 'nullable|string|max:255',
|
||||
'foto_basement.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'foto_basement.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'name_basement.*' => 'nullable|string|max:255',
|
||||
'foto_gerbang' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
|
||||
'foto_gerbang' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp,bmp,tiff,heic,heif|max:'. $maxSize,
|
||||
'name_gerbang' => 'nullable|string|max:255',
|
||||
]);
|
||||
}
|
||||
@@ -557,7 +559,7 @@ class SurveyorController extends Controller
|
||||
]);
|
||||
|
||||
$data['status'] = 'success';
|
||||
$data['message']= 'Jadwal '.$request->noReg.' berhasil di aprove';
|
||||
$data['message'] = 'Jadwal '.$request->noReg.' berhasil di aprove';
|
||||
} catch (\Exception $e) {
|
||||
$data['status'] = 'error';
|
||||
$data['message'] = 'Gagal membuat jadwal: ' . $e->getMessage();
|
||||
@@ -585,9 +587,9 @@ class SurveyorController extends Controller
|
||||
$fotoPembanding = $request->file('foto_objek_pembanding') ?? [];
|
||||
|
||||
$existingData = null;
|
||||
if ($request->has('permohonan_id') && $request->has('jenis_jaminan_id')) {
|
||||
if ($request->has('permohonan_id') && $request->has('dokument_id')) {
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))
|
||||
->where('jenis_jaminan_id', $request->input('jenis_jaminan_id'))
|
||||
->where('dokument_id', $request->input('dokument_id'))
|
||||
->first();
|
||||
|
||||
if ($inspeksi) {
|
||||
@@ -682,7 +684,7 @@ class SurveyorController extends Controller
|
||||
];
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))
|
||||
->where('jenis_jaminan_id', $request->input('jenis_jaminan_id'))
|
||||
->where('dokument_id', $request->input('dokument_id'))
|
||||
->first();
|
||||
|
||||
if ($inspeksi) {
|
||||
@@ -699,12 +701,12 @@ class SurveyorController extends Controller
|
||||
$dataForm = json_decode($inspeksi->data_form, true) ?: [];
|
||||
|
||||
// Inisialisasi struktur data jika belum ada
|
||||
if(!isset($dataForm['bangunan'])) {
|
||||
if (!isset($dataForm['bangunan'])) {
|
||||
$dataForm['bangunan'] = [];
|
||||
$needsSave = true;
|
||||
}
|
||||
|
||||
if(!isset($dataForm['tanah'])) {
|
||||
if (!isset($dataForm['tanah'])) {
|
||||
$dataForm['tanah'] = [];
|
||||
$needsSave = true;
|
||||
}
|
||||
@@ -721,17 +723,35 @@ class SurveyorController extends Controller
|
||||
|
||||
// Fields untuk tanah
|
||||
if (in_array($field, ['luas_tanah'])) {
|
||||
$cekLuas = $dataForm['tanah']['luas_tanah'] == 'sesuai' ? 'sesuai' : 'tidak sesuai';
|
||||
$dataForm['tanah'][$field][$cekLuas] = $newValue;
|
||||
}
|
||||
// Fields untuk bangunan
|
||||
else if (in_array($field, ['luas_tanah_bagunan'])) {
|
||||
// Pastikan struktur array ada sebelum diakses
|
||||
if (!isset($dataForm['tanah']['luas_tanah'])) {
|
||||
$dataForm['tanah']['luas_tanah'] = [];
|
||||
}
|
||||
|
||||
$cekBanguan = $dataForm['bangunan']['luas_tanah_bagunan'] == 'sesuai' ? 'sesuai' : 'tidak sesuai';
|
||||
$dataForm['bangunan'][$field][$cekBanguan] = $newValue;
|
||||
$cekLuas = isset($dataForm['tanah']['luas_tanah']['sesuai']) && $dataForm['tanah']['luas_tanah']['sesuai'] === 'sesuai'
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
|
||||
$dataForm['tanah']['luas_tanah'][$cekLuas] = $newValue;
|
||||
$needsSave = true;
|
||||
}
|
||||
|
||||
// Fields untuk bangunan
|
||||
elseif (in_array($field, ['luas_tanah_bagunan'])) {
|
||||
if (!isset($dataForm['bangunan']['luas_tanah_bagunan'])) {
|
||||
$dataForm['bangunan']['luas_tanah_bagunan'] = [];
|
||||
}
|
||||
|
||||
$cekBanguan = isset($dataForm['bangunan']['luas_tanah_bagunan']['sesuai']) && $dataForm['bangunan']['luas_tanah_bagunan']['sesuai'] === 'sesuai'
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
|
||||
$dataForm['bangunan']['luas_tanah_bagunan'][$cekBanguan] = $newValue;
|
||||
$needsSave = true;
|
||||
}
|
||||
|
||||
// Fields untuk alamat dalam asset
|
||||
else if (in_array($field, ['address', 'village_code', 'district_code', 'city_code', 'province_code'])) {
|
||||
elseif (in_array($field, ['address', 'village_code', 'district_code', 'city_code', 'province_code'])) {
|
||||
|
||||
if (!isset($dataForm['asset']['alamat'])) {
|
||||
$dataForm['asset']['alamat'] = [];
|
||||
@@ -745,7 +765,7 @@ class SurveyorController extends Controller
|
||||
$dataForm['asset']['alamat'][$alamatStatus][$field] = $newValue;
|
||||
}
|
||||
// Jenis asset dalam asset
|
||||
else if ($field === 'jenis_asset') {
|
||||
elseif ($field === 'jenis_asset') {
|
||||
$assetStatus = $request->input('asset_status', 'sesuai');
|
||||
$dataForm['asset']['jenis_asset'] = [
|
||||
$assetStatus => $newValue
|
||||
@@ -809,7 +829,7 @@ class SurveyorController extends Controller
|
||||
$inspeksi = Inspeksi::updateOrCreate(
|
||||
[
|
||||
'permohonan_id' => $formattedData['permohonan_id'],
|
||||
'jenis_jaminan_id' => $formattedData['jenis_jaminan_id']
|
||||
'dokument_id' => $formattedData['dokument_id']
|
||||
],
|
||||
[
|
||||
'data_pembanding' => json_encode($formattedData),
|
||||
@@ -828,7 +848,7 @@ class SurveyorController extends Controller
|
||||
$validator = $request->validate([
|
||||
'permohonan_id' => 'required|exists:permohonan,id',
|
||||
'type' => 'required|string',
|
||||
'jenis_jaminan_id' => 'required',
|
||||
'dokument_id' => 'required',
|
||||
'foto_objek' => 'nullable|image|max:'.$maxSize,
|
||||
'foto_objek_pembanding.*' => 'nullable|image|max:'.$maxSize,
|
||||
]);
|
||||
@@ -843,7 +863,7 @@ class SurveyorController extends Controller
|
||||
|
||||
// Update foto_form
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))
|
||||
->where('jenis_jaminan_id', $request->input('jenis_jaminan_id'))
|
||||
->where('dokument_id', $request->input('dokument_id'))
|
||||
->first();
|
||||
|
||||
if ($inspeksi) {
|
||||
@@ -868,7 +888,7 @@ class SurveyorController extends Controller
|
||||
$formattedData = [
|
||||
'permohonan_id' => $request->input('permohonan_id'),
|
||||
'type' => $request->input('type'),
|
||||
'jenis_jaminan_id' => $request->input('jenis_jaminan_id'),
|
||||
'dokument_id' => $request->input('dokument_id'),
|
||||
'objek_penilaian' => $objekPenilaian,
|
||||
'data_pembanding' => $this->formatDataPembanding($request)
|
||||
];
|
||||
@@ -899,9 +919,21 @@ class SurveyorController extends Controller
|
||||
* Form inspeksi.
|
||||
*/
|
||||
|
||||
public function formInspeksi($id, $jaminanId)
|
||||
public function formInspeksi(Request $request, $id)
|
||||
{
|
||||
$permohonan = $this->getPermohonanJaminanId($id, $jaminanId);
|
||||
|
||||
$validated = $request->validate([
|
||||
'form' => 'required|in:create-inspeksi',
|
||||
'inspeksi' => 'required|exists:permohonan,id',
|
||||
'dokument' => 'required',
|
||||
'jenisjaminan' => 'required'
|
||||
]);
|
||||
|
||||
$dokumentId = $validated['dokument'];
|
||||
$jaminanId = $validated['jenisjaminan'];
|
||||
|
||||
$permohonan = $this->getPermohonanJaminanId($id, $dokumentId, $jaminanId);
|
||||
|
||||
$link_url_region = Teams::with('regions', 'teamsUsers')
|
||||
->whereHas('teamsUsers', function ($query) {
|
||||
$query->where('user_id', Auth::user()->id);
|
||||
@@ -915,7 +947,7 @@ class SurveyorController extends Controller
|
||||
$surveyor = $id;
|
||||
$basicData = $this->getCommonData();
|
||||
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $dokumentId)->first();
|
||||
$forminspeksi = null;
|
||||
if ($inpeksi) {
|
||||
$forminspeksi = json_decode($inpeksi->data_form, true);
|
||||
@@ -962,13 +994,23 @@ class SurveyorController extends Controller
|
||||
* Denah.
|
||||
*/
|
||||
|
||||
public function denah($id, $jaminanId)
|
||||
public function denah(Request $request, $id)
|
||||
{
|
||||
$permohonan = $this->getPermohonanJaminanId($id, $jaminanId);
|
||||
$validated = $request->validate([
|
||||
'form' => 'required|in:create-denah',
|
||||
'denah' => 'required|exists:permohonan,id',
|
||||
'dokument' => 'required',
|
||||
'jenisjaminan' => 'required'
|
||||
]);
|
||||
|
||||
$dokumentId = $validated['dokument'];
|
||||
$jaminanId = $validated['jenisjaminan'];
|
||||
|
||||
$permohonan = $this->getPermohonanJaminanId($id, $dokumentId, $jaminanId);
|
||||
|
||||
$denah = null;
|
||||
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $dokumentId)->first();
|
||||
$formDenah = null;
|
||||
if ($inpeksi) {
|
||||
$formDenah = json_decode($inpeksi->denah_form, true);
|
||||
@@ -982,14 +1024,25 @@ class SurveyorController extends Controller
|
||||
* Foto.
|
||||
*/
|
||||
|
||||
public function foto($id, $jaminanId)
|
||||
public function foto(Request $request, $id)
|
||||
{
|
||||
$permohonan = $this->getPermohonanJaminanId($id, $jaminanId);
|
||||
$validated = $request->validate([
|
||||
'form' => 'required|in:create-foto',
|
||||
'foto' => 'required|exists:permohonan,id',
|
||||
'dokument' => 'required',
|
||||
'jenisjaminan' => 'required'
|
||||
]);
|
||||
|
||||
$dokumentId = $validated['dokument'];
|
||||
$jaminanId = $validated['jenisjaminan'];
|
||||
|
||||
$permohonan = $this->getPermohonanJaminanId($id, $dokumentId, $jaminanId);
|
||||
|
||||
$surveyor = $id;
|
||||
$branches = Branch::all();
|
||||
$provinces = Province::all();
|
||||
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $dokumentId)->first();
|
||||
|
||||
$formFoto = null;
|
||||
if ($inpeksi) {
|
||||
@@ -1003,25 +1056,28 @@ class SurveyorController extends Controller
|
||||
* Data pembanding.
|
||||
*/
|
||||
|
||||
public function dataPembanding($id, $jaminanId)
|
||||
public function dataPembanding(Request $request, $id)
|
||||
{
|
||||
try {
|
||||
// Ambil data permohonan dengan eager loading
|
||||
$permohonan = Permohonan::with([
|
||||
'user',
|
||||
'debiture.province',
|
||||
'debiture.city',
|
||||
'debiture.district',
|
||||
'debiture.village',
|
||||
'branch',
|
||||
'tujuanPenilaian',
|
||||
'penilaian'
|
||||
])->findOrFail($id);
|
||||
|
||||
$validated = $request->validate([
|
||||
'form' => 'required|in:data-pembanding',
|
||||
'pembanding' => 'required|exists:permohonan,id',
|
||||
'dokument' => 'required',
|
||||
'jenisjaminan' => 'required'
|
||||
]);
|
||||
|
||||
$dokumentId = $validated['dokument'];
|
||||
$jaminanId = $validated['jenisjaminan'];
|
||||
|
||||
$permohonan = $this->getPermohonanJaminanId($id, $dokumentId, $jaminanId);
|
||||
|
||||
|
||||
// Ambil data inspeksi
|
||||
$inspeksi = Inspeksi::where([
|
||||
'permohonan_id' => $id,
|
||||
'jenis_jaminan_id' => $jaminanId
|
||||
'dokument_id' => $dokumentId
|
||||
])->first();
|
||||
|
||||
// Inisialisasi variabel
|
||||
@@ -1496,7 +1552,7 @@ class SurveyorController extends Controller
|
||||
}
|
||||
|
||||
|
||||
private function getPermohonanJaminanId($id, $jaminanId)
|
||||
public function getPermohonanJaminanId($id, $dokumentId, $jaminanId)
|
||||
{
|
||||
return Permohonan::with([
|
||||
'user',
|
||||
@@ -1507,15 +1563,11 @@ class SurveyorController extends Controller
|
||||
'branch',
|
||||
'tujuanPenilaian',
|
||||
'penilaian',
|
||||
'debiture.documents.jenisJaminan',
|
||||
'debiture.documents' => function ($query) use ($jaminanId) {
|
||||
$query->where('jenis_jaminan_id', $jaminanId);
|
||||
'debiture.documents' => function ($query) use ($dokumentId, $jaminanId) {
|
||||
$query->where('id', $dokumentId)
|
||||
->where('jenis_jaminan_id', $jaminanId);
|
||||
}
|
||||
])
|
||||
->whereHas('debiture.documents', function ($query) use ($jaminanId) {
|
||||
$query->where('jenis_jaminan_id', $jaminanId);
|
||||
})
|
||||
->findOrFail($id);
|
||||
])->findOrFail($id);
|
||||
}
|
||||
|
||||
|
||||
@@ -1763,10 +1815,8 @@ class SurveyorController extends Controller
|
||||
'sifat_bangunan' => $data['sifat_bangunan'] ?? null,
|
||||
'sifat_bangunan_input' => $data['sifat_bangunan_input'] ?? null,
|
||||
'spesifikasi_bangunan' => $result ?? null,
|
||||
'sarana_pelengkap' => $this->mapArrayWithInputs(
|
||||
$data['sarana_pelengkap'] ?? [],
|
||||
$data['sarana_pelengkap_input'] ?? []
|
||||
),
|
||||
'sarana_pelengkap' => $data['sarana_pelengkap'] ?? null,
|
||||
'sarana_pelengkap_input' => $data['sarana_pelengkap_input'] ?? null,
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -1808,10 +1858,8 @@ class SurveyorController extends Controller
|
||||
'jarak_tps' => $data['jarak_tps'] ?? null,
|
||||
'nama_tps' => $data['nama_tps'] ?? null,
|
||||
'merupakan_daerah' => $data['merupakan_daerah'] ?? null,
|
||||
'fasilitas_dekat_object' => $this->mapArrayWithInputs(
|
||||
$data['fasilitas_dekat_object'] ?? [],
|
||||
$data['fasilitas_dekat_object_input'] ?? []
|
||||
),
|
||||
'fasilitas_dekat_object' => $data['fasilitas_dekat_object'] ?? null,
|
||||
'fasilitas_dekat_object_input' => $data['fasilitas_dekat_object_input'] ?? null,
|
||||
]
|
||||
];
|
||||
}
|
||||
@@ -1823,10 +1871,8 @@ class SurveyorController extends Controller
|
||||
'fakta_positif' => $data['fakta_positif'] ?? null,
|
||||
'fakta_negatif' => $data['fakta_negatif'] ?? null,
|
||||
'rute_menuju' => $data['rute_menuju'] ?? null,
|
||||
'batas_batas' => $this->mapArrayWithInputs(
|
||||
$data['batas_batas'] ?? [],
|
||||
$data['batas_batas_input'] ?? []
|
||||
),
|
||||
'batas_batas' => $data['batas_batas'] ?? null,
|
||||
'batas_batas_input' => $data['batas_batas_input'] ?? null,
|
||||
'kondisi_lingkungan' => $data['kondisi_lingkungan'] ?? null,
|
||||
'kondisi_lain_bangunan' => $data['kondisi_lain_bangunan'] ?? null,
|
||||
'informasi_dokument' => $data['informasi_dokument'] ?? null,
|
||||
@@ -1844,7 +1890,7 @@ class SurveyorController extends Controller
|
||||
];
|
||||
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))->where('jenis_jaminan_id', $request->input('jenis_jaminan_id'))->first();
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))->where('dokument_id', $request->input('dokument_id'))->first();
|
||||
|
||||
|
||||
$fotoTypes = [
|
||||
@@ -2278,7 +2324,7 @@ class SurveyorController extends Controller
|
||||
*/
|
||||
|
||||
|
||||
private function uploadFile($file, $type)
|
||||
public function uploadFile($file, $type)
|
||||
{
|
||||
if (!$file->isValid()) {
|
||||
throw new Exception("Invalid file upload for {$type}");
|
||||
@@ -2306,8 +2352,10 @@ class SurveyorController extends Controller
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ($keys as $index => $key) {
|
||||
$result[$key] = $values[$index] ?? null;
|
||||
foreach ($keys as $key) {
|
||||
// Jika checkbox dicentang, ambil nilai input yang sesuai
|
||||
// Gunakan nilai dari $values berdasarkan nama checkbox
|
||||
$result[$key] = $values[$key] ?? null;
|
||||
}
|
||||
|
||||
return $result;
|
||||
@@ -2315,6 +2363,7 @@ class SurveyorController extends Controller
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Helper method generic untuk mengambil data field
|
||||
*
|
||||
|
||||
@@ -67,4 +67,8 @@
|
||||
public function detail(){
|
||||
return $this->hasMany(DetailDokumenJaminan::class, 'dokumen_jaminan_id', 'id');
|
||||
}
|
||||
public function inspeksi()
|
||||
{
|
||||
return $this->hasMany(Inspeksi::class, 'dokument_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
42
app/Models/Penilai.php
Normal file
42
app/Models/Penilai.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
// use Modules\Lpj\Database\Factories\PenilaiFactory;
|
||||
|
||||
class Penilai extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'penilai';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'dokument_id',
|
||||
'permohonan_id',
|
||||
'inspeksi_id',
|
||||
'kertas_kerja',
|
||||
'resume',
|
||||
'lpj',
|
||||
'type',
|
||||
'memo',
|
||||
];
|
||||
|
||||
// protected static function newFactory(): PenilaiFactory
|
||||
// {
|
||||
// // return PenilaiFactory::new();
|
||||
// }
|
||||
public function dokument(){
|
||||
return $this->belongsTo(DokumenJaminan::class);
|
||||
}
|
||||
public function permohonan(){
|
||||
return $this->belongsTo(Permohonan::class);
|
||||
}
|
||||
public function inspeksi(){
|
||||
return $this->belongsTo(Inspeksi::class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('penilai', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('type')->nullable();
|
||||
$table->json('lpj')->nullable();
|
||||
$table->json('resume')->nullable();
|
||||
$table->json('memo')->nullable();
|
||||
$table->string('kertas_kerja')->nullable();
|
||||
$table->unsignedBigInteger('dokument_id')->nullable();
|
||||
$table->unsignedBigInteger('permohonan_id')->nullable();
|
||||
$table->unsignedBigInteger('inspeksi_id')->nullable();
|
||||
$table->timestamps();
|
||||
$table->timestamp('authorized_at')->nullable();
|
||||
$table->char('authorized_status', 1)->nullable();
|
||||
$table->softDeletes();
|
||||
$table->unsignedBigInteger('created_by')->nullable();
|
||||
$table->unsignedBigInteger('updated_by')->nullable();
|
||||
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||
$table->unsignedBigInteger('authorized_by')->nullable();
|
||||
$table->foreign('dokument_id')->references('id')->on('dokumen_jaminan')->onDelete('set null');
|
||||
$table->foreign('permohonan_id')->references('id')->on('permohonan')->onDelete('set null');
|
||||
$table->foreign('inspeksi_id')->references('id')->on('inspeksi')->onDelete('set null');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('penilai');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('inspeksi', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('inspeksi', 'jenis_jaminan_id')) {
|
||||
$table->dropForeign(['jenis_jaminan_id']);
|
||||
}
|
||||
|
||||
if (Schema::hasColumn('inspeksi', 'jenis_jaminan_id')) {
|
||||
$table->dropColumn('jenis_jaminan_id');
|
||||
}
|
||||
|
||||
$table->unsignedBigInteger('dokument_id')->nullable()->after('permohonan_id');
|
||||
$table->foreign('dokument_id')->references('id')->on('dokumen_jaminan')->onDelete('cascade');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
Schema::table('inspeksi', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['dokument_id']);
|
||||
$table->dropColumn('dokument_id');
|
||||
|
||||
$table->unsignedBigInteger('jenis_jaminan_id')->nullable()->after('permohonan_id');
|
||||
$table->foreign('jenis_jaminan_id')->references('id')->on('jenis_jaminan')->onDelete('cascade');
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
202
module.json
202
module.json
@@ -364,10 +364,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo",
|
||||
"admin",
|
||||
"surveyor"
|
||||
"admin"
|
||||
],
|
||||
"sub": [
|
||||
{
|
||||
@@ -378,8 +375,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -390,8 +386,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -402,8 +397,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -414,8 +408,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -426,8 +419,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -438,8 +430,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -450,8 +441,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -462,8 +452,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"pemohon-ao",
|
||||
"pemohon-eo"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -473,7 +462,8 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator"
|
||||
"administrator",
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -483,7 +473,8 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator"
|
||||
"administrator",
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -494,8 +485,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"admin",
|
||||
"senior-officer"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -506,7 +496,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"senior-officer"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -517,8 +507,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"admin",
|
||||
"senior-officer"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -584,7 +573,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -595,7 +584,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -606,7 +595,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -617,7 +606,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -628,7 +617,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -639,7 +628,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -650,7 +639,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -661,7 +650,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -672,52 +661,64 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Jenis Unit",
|
||||
"path": "basicdata.jenis-unit",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Bentuk Unit",
|
||||
"path": "basicdata.bentuk-unit",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Merupakan Daerah",
|
||||
"path": "basicdata.merupakan-daerah",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Fasilitas Umum Dekat Objek",
|
||||
"path": "basicdata.fasilitas-objek",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Posisi Unit",
|
||||
"path": "basicdata.posisi-unit",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"title": "Jenis Unit",
|
||||
"path": "basicdata.jenis-unit",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": ["administrator","surveyor"]
|
||||
},
|
||||
{
|
||||
"title": "Bentuk Unit",
|
||||
"path": "basicdata.bentuk-unit",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": ["administrator","surveyor"]
|
||||
},
|
||||
{
|
||||
"title": "Merupakan Daerah",
|
||||
"path": "basicdata.merupakan-daerah",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": ["administrator","surveyor"]
|
||||
},
|
||||
|
||||
{
|
||||
"title": "Fasilitas Umum Dekat Objek",
|
||||
"path": "basicdata.fasilitas-objek",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": ["administrator","surveyor"]
|
||||
},
|
||||
|
||||
{
|
||||
"title": "Posisi Unit",
|
||||
"path": "basicdata.posisi-unit",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": ["administrator","surveyor"]
|
||||
},
|
||||
{
|
||||
"title": "Lalu Lintas Sekitar",
|
||||
"path": "basicdata.lalu-lintas-lokasi",
|
||||
@@ -726,7 +727,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -737,7 +738,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -748,7 +749,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -759,7 +760,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -770,7 +771,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -781,7 +782,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -792,7 +793,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -803,7 +804,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -814,7 +815,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -825,7 +826,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -836,7 +837,7 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -847,17 +848,20 @@
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"surveyor"
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Terletak Di Area",
|
||||
"path": "basicdata.terletak-area",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": ["administrator","surveyor"]
|
||||
}
|
||||
{
|
||||
"title": "Terletak Di Area",
|
||||
"path": "basicdata.terletak-area",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator",
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -538,8 +538,6 @@
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -4,68 +4,70 @@
|
||||
$informasiPembanding = isset($inspeksi->data_pembanding) ? json_decode($inspeksi->data_pembanding, true) : [];
|
||||
@endphp
|
||||
|
||||
@foreach ($informasiPembanding['data_pembanding'] as $key => $item)
|
||||
<div class="border border-gray-200">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-5 p-5">
|
||||
<div class="form-label lg:form-label max-w-56 grid gap-2.5">
|
||||
<label class=" ">Pembanding {{ $key + 1 }}
|
||||
</label>
|
||||
<img src="{{ isset($item['foto_objek']) ? asset('storage/' . old('foto_objek', $item['foto_objek'])) : '#' }}"
|
||||
alt="Gambar foto_objek" style="width: 20rem;" class="mx-auto object-cover">
|
||||
@if (isset($informasiPembanding['data_pembanding']))
|
||||
@foreach ($informasiPembanding['data_pembanding'] as $key => $item)
|
||||
<div class="border border-gray-200">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-5 p-5">
|
||||
<div class="form-label lg:form-label max-w-56 grid gap-2.5">
|
||||
<label class=" ">Pembanding {{ $key + 1 }}
|
||||
</label>
|
||||
<img src="{{ isset($item['foto_objek']) ? asset('storage/' . old('foto_objek', $item['foto_objek'])) : '#' }}"
|
||||
alt="Gambar foto_objek" style="width: 20rem;" class="mx-auto object-cover">
|
||||
</div>
|
||||
<div class="grid gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Jenis Properti</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['jenis_aset'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Harga Penawara</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['harga_diskon'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Penjualan (HP)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['harga'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Ditawarkan sejak</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['harga'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">LT</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['luas_tanah'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">LB</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['luas_bangunan'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Titik Koordinat</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['kordinat_lat'] }} , {{ $item['kordinat_lng'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Jenis Properti</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['jenis_aset'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Harga Penawara</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['harga_diskon'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Penjualan (HP)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['harga'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Ditawarkan sejak</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['harga'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">LT</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['luas_tanah'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">LB</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['luas_bangunan'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Titik Koordinat</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $item['kordinat_lat'] }} , {{ $item['kordinat_lng'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{formatAlamat($dokumen->pemilik)}}
|
||||
{{ formatAlamat($dokumen->pemilik) }}
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -82,7 +82,34 @@
|
||||
Identitas Cadeb/Debitur
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body grid gap-2.5 w-full">
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Nama</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>
|
||||
@if (isset($permohonan->debiture))
|
||||
<p class="text-2sm text-gray-700">{{ $permohonan->debiture->name }}</p>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Perwakilan Cadeb/Debitur Di lokasi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>
|
||||
{{ $forminspeksi['asset']['debitur_perwakilan'][0] ?? '' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Pihak Bank Selain Appraisal</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,7 +121,61 @@
|
||||
Deskripsi dan Alamat Aset
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body grid gap-2.5 w-full">
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Jenis Asset</label>
|
||||
@php
|
||||
$statusKey = isset($forminspeksi['asset']['jenis_asset']['sesuai']) ? 'sesuai' : 'tidak sesuai';
|
||||
$selectedValue = $forminspeksi['asset']['jenis_asset'][$statusKey] ?? null;
|
||||
@endphp
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $selectedValue }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@php
|
||||
$statusKey = isset($forminspeksi['asset']['alamat']['sesuai']) ? 'sesuai' : 'tidak sesuai';
|
||||
$selectedValue = $forminspeksi['asset']['alamat'][$statusKey] ?? null;
|
||||
@endphp
|
||||
<label class="form-label max-w-56">Terletak di</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>{{ $selectedValue['address'] ?? '' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,7 +187,98 @@
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div data-accordion="true">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200"
|
||||
data-accordion-item="true" id="accordion_detail_jaminan">
|
||||
<button class="accordion-toggle py-4 group "
|
||||
data-accordion-toggle="#accordion_detail_jaminan_{{ $loop->index }}">
|
||||
<span class="text-base text-gray-900 font-medium">
|
||||
Dokument Kepemilikan
|
||||
</span>
|
||||
<i class="ki-outline ki-plus text-gray-600 text-2sm accordion-active:hidden block">
|
||||
</i>
|
||||
<i class="ki-outline ki-minus text-gray-600 text-2sm accordion-active:block hidden">
|
||||
</i>
|
||||
</button>
|
||||
|
||||
<div class="accordion-content hidden" id="accordion_detail_jaminan_{{ $loop->index }}">
|
||||
<div class="card-table scrollable-x-auto pb-3">
|
||||
<a href="{{ route('debitur.jaminan.bulk.download', ['id' => $permohonan->debiture->id, 'jaminan' => $dokumen->id]) }}"
|
||||
class="ml-6 btn btn-dark dark:btn-light">
|
||||
<i class="ki-outline ki-cloud-download"></i> Download Semua Dokumen
|
||||
</a>
|
||||
<table class="table align-middle text-sm text-gray-500">
|
||||
@foreach ($dokumen->detail as $detail)
|
||||
<tr>
|
||||
<td class="py-2 text-gray-600 font-normal max-w-[100px]">
|
||||
{{ $loop->index + 1 }}. {{ $detail->jenisLegalitasJaminan->name }}
|
||||
</td>
|
||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||
{{ $detail->name ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-3 max-w-[100px] align-top">
|
||||
Dokumen Jaminan
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
|
||||
@if (isset($detail->dokumen_jaminan))
|
||||
@php
|
||||
$dokumen_jaminan = is_array(
|
||||
json_decode($detail->dokumen_jaminan),
|
||||
)
|
||||
? json_decode($detail->dokumen_jaminan)
|
||||
: [$detail->dokumen_jaminan];
|
||||
$dokumen_nomor = is_array(
|
||||
json_decode($detail->dokumen_nomor),
|
||||
)
|
||||
? json_decode($detail->dokumen_nomor)
|
||||
: ($detail->dokumen_nomor
|
||||
? [$detail->dokumen_nomor]
|
||||
: []);
|
||||
@endphp
|
||||
@foreach ($dokumen_jaminan as $index => $dokumen)
|
||||
<div class="flex w-full lg:w-[30%]">
|
||||
@if (in_array(Auth::user()->roles[0]->name, ['administrator', 'pemohon-eo']))
|
||||
@if (!empty($dokumen_nomor))
|
||||
<span class="flex-1 mt-2 text-info">Nomor Dokumen :
|
||||
{{ $dokumen_nomor[$index] }}</span>
|
||||
@endif
|
||||
<a href="{{ route('debitur.jaminan.download', ['id' => $permohonan->debiture->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
|
||||
class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
{{ basename($dokumen) }}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
@endif
|
||||
<span
|
||||
class="flex-none badge badge-sm badge-outline badge-warning mt-2"
|
||||
onclick="viewPDF('{{ Storage::url($dokumen_jaminan[$index]) }}')"><i
|
||||
class="ki-filled ki-eye mr-2"></i>Preview</span>
|
||||
</div>
|
||||
<br>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-3 max-w-[100px]">
|
||||
Keterangan
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
{{ $detail->keterangan ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@include('lpj::component.pdfviewer')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -116,15 +288,38 @@
|
||||
Hubungan Cadeb/Debitur dengan pemilik dan penghuni
|
||||
</h3>
|
||||
</div>
|
||||
@php
|
||||
$statusKey = isset($forminspeksi['asset']['hub_cadeb']['sesuai']) ? 'sesuai' : 'tidak sesuai';
|
||||
$selectedData = $forminspeksi['asset']['hub_cadeb'][$statusKey] ?? null;
|
||||
@endphp
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('lpj::surveyor.components.tanah')
|
||||
@include('lpj::surveyor.components.bangunan')
|
||||
@include('lpj::surveyor.components.lingkungan')
|
||||
@include('lpj::surveyor.components.fakta')
|
||||
@include('lpj::surveyor.components.informasi')
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@if ($dokumen->jenisJaminan)
|
||||
@php
|
||||
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
||||
@endphp
|
||||
@if (isset($formKategori) && $formKategori)
|
||||
@php
|
||||
$kategoriArray = is_array($formKategori) ? $formKategori : [$formKategori];
|
||||
$kategoriUnik = array_unique($kategoriArray);
|
||||
@endphp
|
||||
<input type="hidden" name="action" value="{{ implode(',', $kategoriUnik) }}">
|
||||
<input type="hidden" name="type" value="{{ implode(',', $kategoriUnik) }}">
|
||||
|
||||
|
||||
@foreach ($kategoriUnik as $kategori)
|
||||
{{-- Tampilkan komponen sesuai kategori --}}
|
||||
@include('lpj::surveyor.components.' . str_replace('-', '-', $kategori), [
|
||||
'dokumen' => $dokumen,
|
||||
])
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
@@ -142,17 +337,114 @@
|
||||
total nilai pasar wajar
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body gap-5">
|
||||
<div>
|
||||
<label for="total_nilai_pasar_wajar" class="form-label">Total Nilai Pasar Wajar</label>
|
||||
<div class="card-body grid gap-2.5 w-full">
|
||||
<div class="flex grid-col-3 gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="form-label max-w-56">Luas Tanah</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex grid-col-3 gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="form-label max-w-56">Luas Bangunan</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex grid-col-3 gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="form-label max-w-56">Sarana Pelengkap</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="total_nilai_pasar_wajar" class="form-label uppercase">TOTAL NILAI LIKUIDASI</label>
|
||||
<div class="card-body grid gap-2.5 w-full">
|
||||
<div class="flex grid-col-3 gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="grid gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
nilai asuransi
|
||||
nilai asuransi
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<label for="total_nilai_pasar_wajar" class="form-label uppercase">TOTAL NILAI ASURANSI</label>
|
||||
<div class="card-body grid gap-2.5 w-full">
|
||||
<div class="flex grid-col-3 gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="form-label">Luas Bangunan</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province" class="">Rp</label>
|
||||
<input type="text" id="province" class="input w-full" value="">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||
@@ -165,11 +457,4 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loadingOverlay" class="fixed inset-0 bg-black bg-opacity-50 hidden items-center justify-center z-50">
|
||||
<div class="bg-white p-4 rounded-lg">
|
||||
<div class="loader"></div>
|
||||
<p class="mt-2 text-center">Sedang memproses...</p>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,458 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{-- {{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
--}}
|
||||
Resume
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@include('lpj::assetsku.includenya')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
Memo Antar Kantor
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('penilai.show', ['id' => $permohonan->id]) }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</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="">
|
||||
</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="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Nomor Memo</label>
|
||||
<div class="flex flex-wrap items-base line w-full">
|
||||
<input type="text" name="nomor_memo" class="input w-full"
|
||||
placeholder="Masukkan..."
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<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="">
|
||||
</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="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card w-full bg-white rounded-lg shadow-md ">
|
||||
<div class="card-header">
|
||||
<h1 class="text-md font-medium text-gray-900 uppercase">Sehubungan dengan permintaan BAGI Cabang ............., untuk dilakukan survey untuk penilaian baru/review, calon debitur/debitur an ….............,
|
||||
dengan deskripsi sebagai berikut :
|
||||
</h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="grid gap-5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Jenis Aset</label>
|
||||
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
|
||||
<select id="jenis_asset_tidak_sesuai" class="input w-full"
|
||||
name="jenis_asset_tidak_sesuai">
|
||||
<option value="">Select Jenis asset</option>
|
||||
|
||||
</select>
|
||||
{{-- <button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('jenis_asset')">Save</button> --}}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<div class="grid gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="address" class="form-label max-w-56">Lokasi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="address" name="address" class="input w-full"
|
||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="province_code" class="form-label max-w-56">Provinsi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="province_code" name="province_code" class="input w-full" >
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="city_code" class="form-label max-w-56">Kota/Kabupaten</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="city_code" name="city_code" class="select w-full">
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="district_code" class="form-label max-w-56">Kecamatan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="district_code" name="district_code" class="select w-full" >
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="village_code" class="form-label max-w-56">Kelurahan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="village_code" name="village_code" class="select w-full">
|
||||
<option value="">Pilih Kelurahan</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="address" class="form-label max-w-56">Tanggal Survey</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="date" id="address" name="address" class="input w-full"
|
||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="address" class="form-label max-w-56">Penilai</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="address" name="address" class="input w-full"
|
||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
Dokument
|
||||
</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">Terlampir</label>
|
||||
<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">
|
||||
<textarea class="textarea mt-2" name="terlampir[]" rows="3">{{ old('terlampir', '') }}</textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Berdasarkan hasil survey dapat disampaikan sbb:</label>
|
||||
<div id="hasil_survey" class="flex flex-wrap items-baseline w-full">
|
||||
@if (!empty($forminspeksi['fakta']['hasil_survey']))
|
||||
@foreach ($forminspeksi['fakta']['hasil_survey'] as $index => $positif)
|
||||
<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>
|
||||
<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="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>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('hasil_survey', 'hasil_survey')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Kesimpulan dan saran</label>
|
||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||
@if (!empty($forminspeksi['fakta']['fakta_negatif']))
|
||||
@foreach ($forminspeksi['fakta']['fakta_negatif'] as $index => $negatif)
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old("fakta_negatif.$index", $negatif) }}</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="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $forminspeksi['fakta']['fakta_negatif'][0] ?? '') }}</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-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-negatif-container', 'fakta_negatif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
Peta lokasi
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
<div class="border-t mt-5">
|
||||
<div class="flex card-header justify-center" id="basic_settings">
|
||||
<h3 class="card-title uppercase">
|
||||
Rute Menuju Lokasi
|
||||
</h3>
|
||||
</div>
|
||||
<div class="">
|
||||
@if (isset($formPeta))
|
||||
@php
|
||||
$foto = [
|
||||
'foto_gistaru',
|
||||
'foto_bhumi',
|
||||
'foto_argis_region',
|
||||
'foto_tempat',
|
||||
]
|
||||
@endphp
|
||||
|
||||
@foreach ($foto as $item)
|
||||
@if (isset($formPeta[$item]) && $formPeta[$item])
|
||||
<div class="flex items-center justify-between mt-5 border-b">
|
||||
<div class="grid gap-5">
|
||||
<h2 class="text-gray-600 font-semibold text-xl">
|
||||
{{ ucwords(str_replace('_', ' ', $item)) }}
|
||||
</h2>
|
||||
<div class="flex items-center mt-5">
|
||||
<img src="{{ Storage::url($formPeta[$item]) }}" alt="{{ $item }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
Foto jaminan
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
<div class="border-t mt-5">
|
||||
<div class="flex card-header justify-center" id="basic_settings">
|
||||
<h3 class="card-title uppercase">
|
||||
Rute Menuju Lokasi
|
||||
</h3>
|
||||
</div>
|
||||
<div class="">
|
||||
@if (isset($formFoto))
|
||||
@foreach ($formFoto['rute_menuju_lokasi'] as $item)
|
||||
<div class="flex items-center justify-between mt-5">
|
||||
<div class="grid gap-5">
|
||||
<h2 class="text-gray-600 font-semibold text-xl">
|
||||
{{ $item['name_rute'] . ' ' . $loop->index + 1 }}
|
||||
</h2>
|
||||
<div class="flex items-center">
|
||||
|
||||
|
||||
<img src="{{ Storage::url($item['foto_rute']) }}" alt="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="border-t mt-5">
|
||||
<div class="flex card-header justify-center" id="basic_settings">
|
||||
<h3 class="card-title uppercase">
|
||||
Object Jaminan
|
||||
</h3>
|
||||
</div>
|
||||
<div class="">
|
||||
@if (isset($formFoto['object_jaminan']))
|
||||
@foreach ($formFoto['object_jaminan'] as $item)
|
||||
<div class="flex items-center justify-between mt-5">
|
||||
<div class="grid gap-5">
|
||||
<h2 class=" font-semibold text-xl">
|
||||
{{ $item['name_objek'] }}
|
||||
</h2>
|
||||
<div class="flex items-center">
|
||||
|
||||
|
||||
<img src="{{ Storage::url($item['foto_objek']) }}" alt="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (isset($formFoto['foto_basement']))
|
||||
<div class="border-t mt-5">
|
||||
<div class="flex card-header justify-center" id="basic_settings">
|
||||
<h3 class="card-title uppercase">
|
||||
Basement
|
||||
</h3>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="flex items-center justify-between mt-5">
|
||||
<div class="grid gap-5">
|
||||
<h2 class=" font-semibold text-xl">
|
||||
Basemnt
|
||||
</h2>
|
||||
<div class="flex items-center">
|
||||
|
||||
|
||||
<img src="{{ Storage::url($formFoto['foto_basement']) }}" alt="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (isset($formFoto['foto_gerbang']))
|
||||
<div class="border-t mt-5">
|
||||
<div class="flex card-header justify-center" id="basic_settings">
|
||||
<h3 class="card-title uppercase">
|
||||
Gerbang
|
||||
</h3>
|
||||
</div>
|
||||
<div class="">
|
||||
|
||||
|
||||
<div class="flex items-center justify-between mt-5">
|
||||
<div class="grid gap-5">
|
||||
<h2 class=" font-semibold text-xl">
|
||||
Gerbang
|
||||
</h2>
|
||||
<div class="flex items-center">
|
||||
|
||||
|
||||
<img src="{{ Storage::url($formFoto['foto_gerbang']) }}" alt="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if (isset($formFoto['pendamping']))
|
||||
<div class="border-t mt-5">
|
||||
<div class="flex card-header justify-center" id="basic_settings">
|
||||
<h3 class="card-title uppercase">
|
||||
Pendamping
|
||||
</h3>
|
||||
</div>
|
||||
<div class="">
|
||||
|
||||
|
||||
<div class="flex items-center justify-between mt-5">
|
||||
<div class="grid gap-5">
|
||||
<h2 class=" font-semibold text-xl">
|
||||
Pendamping
|
||||
</h2>
|
||||
<div class="flex items-center">
|
||||
|
||||
|
||||
<img src="{{ Storage::url($formFoto['pendamping']) }}" alt="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-start gap-5">
|
||||
<a class="btn btn-success" onclick="saveMemo(){
|
||||
()">
|
||||
SAVE
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
|
||||
<script>
|
||||
function saveMemo(){
|
||||
const form = document.getElementById('form-resume');
|
||||
form.submit();
|
||||
showLoadingSwal('Mengirim data keserver ...');
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -109,7 +109,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||
@@ -141,54 +140,129 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card min-w-full">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
KESIMPULAN NILAI PASAR WAJAR
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
<div class="card min-w-full">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
KESIMPULAN NILAI PASAR WAJAR
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body grid gap-5">
|
||||
|
||||
<div class="gird gap-5">
|
||||
<label class="form-label max-w-56">1. SESUAI FISIK</label>
|
||||
<div class="flex flex-wrap items-baseline w-full mt-5">
|
||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Sertipikat</th>
|
||||
<th class="text-center">Luas Tanah</th>
|
||||
<th class="text-center">Luas Bangunan</th>
|
||||
<th class="text-center">Nilai Pasar Wajar</th>
|
||||
<div class="gird gap-5">
|
||||
<label class="form-label max-w-56">1. SESUAI FISIK</label>
|
||||
<div class="flex flex-wrap items-baseline w-full mt-5">
|
||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Sertipikat</th>
|
||||
<th class="text-center">Luas Tanah</th>
|
||||
<th class="text-center">Luas Bangunan</th>
|
||||
<th class="text-center">Nilai Pasar Wajar</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center"> <input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format"></td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_sertifikat[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_luas_tanah[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center"> <input type="text" name="fisik_luas_bangunan[]"
|
||||
class="input number-format"></td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="fisik_nilai[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gird gap-5">
|
||||
<label class="form-label max-w-56">2. SESUAI IMB</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
|
||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm mt-5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Sertipikat</th>
|
||||
<th class="text-center">Luas Tanah</th>
|
||||
<th class="text-center">Luas Bangunan</th>
|
||||
<th class="text-center">Nilai Pasar Wajar</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_sertifikat[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_tanah[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_luas_bangunan[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sesuai_nilai[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5" onclick="tambahKesimpulanNilai()">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
Kesimpulan Nilai
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="kesimpulan" class="grid gap-5 w-full"></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="input-group w-full flex gap-2">
|
||||
<textarea name="keterangan" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old('keterangan', $forminspeksi['fakta']['keterangan'] ?? '') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gird gap-5">
|
||||
<label class="form-label max-w-56">2. SESUAI IMB</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="card-footer">
|
||||
|
||||
<button type="button" class="btn btn-success" onclick="saveResume()">Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@include('lpj::surveyor.js.utils')
|
||||
<script type="text/javascript">
|
||||
let counter = 1;
|
||||
function tambahKesimpulanNilai() {
|
||||
const kesimpulan = document.getElementById('kesimpulan');
|
||||
|
||||
kesimpulan.innerHTML += `
|
||||
<div class="grid gap-5 w-full" id="kesimpulan-${counter}">
|
||||
<label class="form-label kesimpulan max-w-56">${counter}. SESUAI IMB</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="tabel-container w-full">
|
||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm mt-5">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -196,59 +270,57 @@
|
||||
<th class="text-center">Luas Tanah</th>
|
||||
<th class="text-center">Luas Bangunan</th>
|
||||
<th class="text-center">Nilai Pasar Wajar</th>
|
||||
|
||||
<th class="text-center">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
<input type="text" name="sertipikat[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
<input type="text" name="luas_tanah[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
<input type="text" name="luat_bangunan[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
class="input number-format">
|
||||
<input type="text" name="nilai_pasar_wajar[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button type="button" class="btn btn-danger" onclick="deleteRow(this)">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div >
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
Kesimpulan Nilai
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="kesimpulan"></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="input-group w-full flex gap-2">
|
||||
<textarea name="keterangan" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old('keterangan', $forminspeksi['fakta']['keterangan'] ?? '') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
counter++;
|
||||
}
|
||||
|
||||
<div class="card-footer">
|
||||
function deleteRow(button) {
|
||||
const rowContainer = button.closest('.grid');
|
||||
rowContainer.remove();
|
||||
updateLabelNumbers();
|
||||
}
|
||||
|
||||
<button type="submit" class="btn btn-success">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
function updateLabelNumbers() {
|
||||
const labels = document.querySelectorAll('.kesimpulan');
|
||||
labels.forEach((label, index) => {
|
||||
// Update setiap label dengan nomor yang benar
|
||||
label.textContent = `${index + 1}. SESUAI IMB`;
|
||||
});
|
||||
}
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@include('lpj::surveyor.js.utils')
|
||||
function saveResume(){
|
||||
showLoadingSwal('Mengirim data keserver ...');
|
||||
const form = document.getElementById('form-resume');
|
||||
form.submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@include('lpj::assetsku.includenya')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
@@ -174,8 +175,6 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -188,7 +187,7 @@
|
||||
<a class="btn btn-primary" data-modal-toggle="#modal_2">
|
||||
KERTAS KERJA
|
||||
</a>
|
||||
<a class="btn btn-primary" href="#">
|
||||
<a class="btn btn-primary" href="{{ route('penilai.paparan') }}">
|
||||
PAPARAN
|
||||
</a>
|
||||
|
||||
@@ -196,10 +195,17 @@
|
||||
<button class="dropdown-toggle btn btn-primary">
|
||||
WORKSHEET
|
||||
</button>
|
||||
@php
|
||||
$inspeksiId = null;
|
||||
foreach ($dokumen->inspeksi as $item) {
|
||||
$inspeksiId = $item->id;
|
||||
}
|
||||
@endphp
|
||||
<div class="dropdown-content w-full max-w-56 py-2">
|
||||
<div class="menu menu-default flex flex-col w-full">
|
||||
<div class="menu-item">
|
||||
<a class="menu-link" href="{{ route('penilai.memo', $permohonan->id) }}">
|
||||
<a class="menu-link"
|
||||
onclick="memo('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||
<span class="menu-icon">
|
||||
<i class="ki-outline ki-badge">
|
||||
</i>
|
||||
@@ -210,7 +216,8 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<a class="menu-link" href="{{ route('penilai.resume', $permohonan->id) }}">
|
||||
<a class="menu-link"
|
||||
onclick="resume('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||
<span class="menu-icon">
|
||||
<i class="ki-outline ki-profile-circle">
|
||||
</i>
|
||||
@@ -220,20 +227,21 @@
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="menu-item">
|
||||
<a class="menu-link" onclick="seletSederhanaStandart()">
|
||||
<span class="menu-icon">
|
||||
<i class="ki-outline ki-setting-2">
|
||||
</i>
|
||||
</span>
|
||||
<span class="menu-title">
|
||||
LPJ
|
||||
</span>
|
||||
|
||||
|
||||
<div class="menu-item">
|
||||
<a class="menu-link"
|
||||
onclick="seletSederhanaStandart('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||
<span class="menu-icon">
|
||||
<i class="ki-outline ki-setting-2"></i>
|
||||
</span>
|
||||
<span class="menu-title">LPJ</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="menu-item">
|
||||
<a class="menu-link" href="#">
|
||||
<a class="menu-link"
|
||||
onclick="rap('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||
<span class="menu-icon">
|
||||
<i class="ki-outline ki-message-programming">
|
||||
</i>
|
||||
@@ -249,15 +257,10 @@
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-5">
|
||||
<a class="btn btn-success" href="#">
|
||||
SAVE
|
||||
</a>
|
||||
|
||||
<a class="btn btn-success" href="#">
|
||||
REPORT
|
||||
</a>
|
||||
|
||||
|
||||
<a class="btn btn-success" href="#">
|
||||
PRINT OUT
|
||||
</a>
|
||||
@@ -265,9 +268,14 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
<div class="flex justify-start gap-5">
|
||||
<a class="btn btn-success" onclick="savePenilai()">
|
||||
SAVE
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -285,26 +293,35 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body grid gap-5">
|
||||
@php
|
||||
$jenisJaminanId = null;
|
||||
$inspeksiId = null;
|
||||
$documentId = null;
|
||||
foreach ($permohonan->debiture->documents as $item) {
|
||||
$documentId = $item->id;
|
||||
}
|
||||
foreach ($dokumen->inspeksi as $item) {
|
||||
$inspeksiId = $item->id;
|
||||
}
|
||||
@endphp
|
||||
@foreach ($permohonan->debiture->documents as $document)
|
||||
@if ($document->jenisjaminan)
|
||||
@php
|
||||
$jenisJaminanId = $document->jenisjaminan->id;
|
||||
@endphp
|
||||
@endif
|
||||
@endforeach
|
||||
<div class="flex items-baseline w-full">
|
||||
<label for="" class="form-label max-w-56">Import Kertas Kerja</label>
|
||||
|
||||
<div class="flex justify-center items-center gap-2">
|
||||
<input type="file" name="" id="" class="file-input">
|
||||
<input type="file" id="kertas_kerja" class="file-input">
|
||||
<button type="button" class="btn btn-outline btn-success"
|
||||
onclick="uploadKertasKerja()">Upload</button>
|
||||
onclick="uploadKertasKerja({{ $permohonan->id }}, '{{ $documentId }}', '{{ $inspeksiId }}', '{{ $jenisJaminanId }}')">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group flex items-baseline flex-wrap">
|
||||
@php
|
||||
$jenisJaminanId = null;
|
||||
@endphp
|
||||
@foreach ($permohonan->debiture->documents as $document)
|
||||
@if ($document->jenisjaminan)
|
||||
@php
|
||||
$jenisJaminanId = $document->jenisjaminan->id;
|
||||
@endphp
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@if ($jenisJaminanId)
|
||||
<a class="btn btn-outline btn-primary w-full"
|
||||
href="{{ route('penilai.export.kertas-kerja', ['id' => $permohonan->id, 'jaminanId' => $jenisJaminanId]) }}">
|
||||
@@ -325,42 +342,184 @@
|
||||
|
||||
|
||||
<script>
|
||||
function seletSederhanaStandart() {
|
||||
Swal.fire({
|
||||
title: 'Apakah kamu akan memilih lpj standar?',
|
||||
icon: 'warning',
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: 'Yes',
|
||||
denyButtonText: 'No',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = "{{ route('penilai.standard', $permohonan->id) }}";
|
||||
} else if (result.isDenied) {
|
||||
window.location.href = "{{ route('penilai.sederhana', $permohonan->id) }}";
|
||||
}
|
||||
})
|
||||
function seletSederhanaStandart(permohonanId, documentId, inspeksiId, jaminanId) {
|
||||
fetch(
|
||||
`{{ url('/penilai/check-status-lpj') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}`
|
||||
)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.status) {
|
||||
// Jika status LPJ sudah ada, arahkan langsung ke halaman
|
||||
if (data.status === 'standar') {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.standard', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
} else if (data.status === 'sederhana') {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Pilih Jenis LPJ',
|
||||
text: 'Apakah kamu akan memilih LPJ Standar?',
|
||||
icon: 'question',
|
||||
showCloseButton: true,
|
||||
showDenyButton: true,
|
||||
confirmButtonText: 'LPJ Standar',
|
||||
denyButtonText: 'LPJ Sederhana',
|
||||
confirmButtonColor: '#3085d6',
|
||||
denyButtonColor: '#d33',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'standar', jaminanId);
|
||||
} else if (result.isDenied) {
|
||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'sederhana', jaminanId);
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(data);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function saveStatusLpj(permohonanId, documentId, inspeksiId, type, jaminanId) {
|
||||
fetch(`{{ url('/penilai/save-status-lpj') }}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
permohonan_id: permohonanId,
|
||||
document_id: documentId,
|
||||
inspeksi_id: inspeksiId,
|
||||
type: type
|
||||
}),
|
||||
}).then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
if (type === 'standar') {
|
||||
window.location.href =
|
||||
`{{ route('penilai.standard', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
} else if (type === 'sederhana') {
|
||||
window.location.href =
|
||||
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function uploadKertasKerja() {
|
||||
showLoadingSwal('Mengirim data ke server...');
|
||||
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
timer: 2000,
|
||||
timerProgressBar: true,
|
||||
didOpen: () => {
|
||||
Swal.showLoading()
|
||||
},
|
||||
willClose: () => {
|
||||
hideLoadingSwal();
|
||||
function uploadKertasKerja(permohonanId, documentId, inspeksiId, jaminanId) {
|
||||
const kertasKerjaInput = document.getElementById('kertas_kerja');
|
||||
if (!kertasKerjaInput.files.length) {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: 'Silakan pilih file sebelum mengupload.',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const kertasKerja = kertasKerjaInput.files[0];
|
||||
const formData = new FormData();
|
||||
formData.append('permohonan_id', permohonanId);
|
||||
formData.append('document_id', documentId);
|
||||
formData.append('inspeksi_id', inspeksiId);
|
||||
formData.append('jenis_jaminan_id', jaminanId);
|
||||
formData.append('kertas_kerja', kertasKerja);
|
||||
|
||||
fetch(`{{ url('/penilai/import/kertas-kerja') }}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}',
|
||||
},
|
||||
body: formData,
|
||||
})
|
||||
.then(response => response.json()) // Pastikan respons diurai menjadi JSON
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: data.message || 'Kertas kerja berhasil diunggah.',
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then(result => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: data.message || 'Terjadi kesalahan.',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: 'Terjadi kesalahan saat mengunggah file.',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
console.error('Error:', error); // Debug error di konsol
|
||||
});
|
||||
}
|
||||
|
||||
function resume(permohonanId, documentId, inspeksiId, jaminanId) {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.resume') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
|
||||
function memo(permohonanId, documentId, inspeksiId, jaminanId) {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.memo') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
|
||||
function rap(permohonanId, documentId, inspeksiId, jaminanId) {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.rap') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
|
||||
|
||||
function savePenilai() {
|
||||
showLoadingSwal('Mengirim data keserver ...');
|
||||
$.ajax({
|
||||
url: "{{ route('penilai.proses.laporan', ['id' => $permohonan->id]) }}",
|
||||
type: "POST",
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
// window.location.reload();
|
||||
hideLoadingSwal();
|
||||
toastrSuccessBuild(response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.log('Error checking button status:', error, status, xhr);
|
||||
if (xhr.responseJSON.message) {
|
||||
// window.location.reload();
|
||||
toastrErrorBuild(xhr.responseJSON.message);
|
||||
} else {
|
||||
// window.location.reload();
|
||||
toastrErrorBuild('Terjadi kesalahan');
|
||||
}
|
||||
hideLoadingSwal();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$luas_unit = isset($details['luas_unit']) ? $details['luas_unit'] : 'N/A';
|
||||
$luas_units = isset($details['luas_unit']) ? $details['luas_unit'] : 'N/A';
|
||||
@endphp
|
||||
<input type="hidden" name="luas_unit_sesuai" class="input" value="{{ $luas_unit }}">
|
||||
<p class="text-2sm text-gray-700">{{ $luas_unit }} m<sup>2</sup></p>
|
||||
<input type="hidden" name="luas_unit_sesuai" class="input" value="{{ $luas_units }}">
|
||||
<p class="text-2sm text-gray-700">{{ $luas_units }} m<sup>2</sup></p>
|
||||
@endforeach
|
||||
|
||||
@endif
|
||||
@@ -29,19 +29,19 @@
|
||||
<input
|
||||
onclick="toggleFieldVisibility('luas_unit','luas_unit_tidak_sesuai', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="luas_unit" value="sesuai"
|
||||
{{ old('luas_unit', $forminspeksi['luas_unit'] ?? '') == 'sesuai' ? 'checked' : '' }}>
|
||||
{{ old('luas_unit', isset($forminspeksi['luas_unit']['sesuai'])) ? 'checked' : ''}}>
|
||||
<span class="ml-2">Sesuai</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input
|
||||
onclick="toggleFieldVisibility('luas_unit','luas_unit_tidak_sesuai', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="luas_unit" value="tidak sesuai"
|
||||
{{ old('luas_unit', $forminspeksi['luas_unit'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
{{ old('luas_unit', isset($forminspeksi['luas_unit']['tidak sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak Sesuai</span>
|
||||
</label>
|
||||
|
||||
<div id="luas_unit_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ old('luas_unit', $forminspeksi['luas_unit'] ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}">
|
||||
style="{{ old('luas_unit', isset($forminspeksi['luas_unit']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<input id="analisa_luas_unit_tidak_sesuai" type="text" name="luas_unit_tidak_sesuai"
|
||||
class="input w-full" placeholder="Masukan Luas Tanah"
|
||||
value="{{ old('luas_unit_tidak_sesuai', $forminspeksi['luas_unit_tidak_sesuai'] ?? '') }}">
|
||||
|
||||
@@ -258,33 +258,21 @@
|
||||
|
||||
<!-- 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>
|
||||
<label class="form-label max-w-56">Sarana Pelengkap</label>
|
||||
<div class="flex-wrap items-stretch">
|
||||
<div class="flex flex-col items-start gap-4">
|
||||
@if (isset($basicData['saranaPelengkap']))
|
||||
@foreach ($basicData['saranaPelengkap'] as $item)
|
||||
@php
|
||||
$isChecked = false;
|
||||
$inputValue = '';
|
||||
|
||||
if (isset($forminspeksi['bangunan']['sarana_pelengkap'])) {
|
||||
foreach ($forminspeksi['bangunan']['sarana_pelengkap'] as $key => $value) {
|
||||
if ($key === $item->name) {
|
||||
$isChecked = true;
|
||||
$inputValue = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||
<input class="checkbox" name="sarana_pelengkap[]" type="checkbox"
|
||||
value="{{ $item->name }}" {{ $isChecked ? 'checked' : '' }} />
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('sarana_pelengkap', $forminspeksi['bangunan']['sarana_pelengkap'] ?? [])) ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<input type="text" name="sarana_pelengkap_input[]" class="input w-full"
|
||||
placeholder="Masukkan {{ $item->name }}..." value="{{ $inputValue }}">
|
||||
placeholder="Masukkan {{ $item->name }}..."
|
||||
value="{{ old('sarana_pelengkap_input.' . $loop->index, $forminspeksi['bangunan']['sarana_pelengkap_input'][$loop->index] ?? '') }}">
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -293,6 +281,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5 lg:gap-7.5">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@php
|
||||
$jaminanId = $dokumen->jenisJaminan->id;
|
||||
$jaminanId = $dokumen->id;
|
||||
$currentInspeksi = $inspeksiData[$jaminanId] ?? null;
|
||||
|
||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT'];
|
||||
@@ -11,8 +11,7 @@
|
||||
'label' => 'form inspeksi',
|
||||
'url' => route('surveyor.inspeksi', [
|
||||
'id' => $permohonan->id,
|
||||
'jaminanId' => $jaminanId,
|
||||
]) . "?form=create-inspeksi&inspeksi={$permohonan->id}&jenis_jaminan={$jaminanId}",
|
||||
]) . "?form=create-inspeksi&inspeksi={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['data_form']),
|
||||
],
|
||||
@@ -22,9 +21,8 @@
|
||||
$href[] = [
|
||||
'label' => 'denah tanah dan bangunan',
|
||||
'url' => route('surveyor.denah', [
|
||||
'id' => $permohonan->id,
|
||||
'jaminanId' => $jaminanId,
|
||||
]) . "?form=create-denah&denah={$permohonan->id}&jenis_jaminan={$jaminanId}",
|
||||
'id' => $permohonan->id
|
||||
]) . "?form=create-denah&denah={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['denah_form']),
|
||||
];
|
||||
@@ -34,18 +32,16 @@
|
||||
[
|
||||
'label' => 'foto',
|
||||
'url' => route('surveyor.foto', [
|
||||
'id' => $permohonan->id,
|
||||
'jaminanId' => $jaminanId,
|
||||
]) . "?form=create-foto&foto={$permohonan->id}&jenis_jaminan={$jaminanId}",
|
||||
'id' => $permohonan->id
|
||||
]) . "?form=create-foto&foto={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['foto_form']),
|
||||
],
|
||||
[
|
||||
'label' => 'data pembanding',
|
||||
'url' => route('surveyor.data-pembanding', [
|
||||
'id' => $permohonan->id,
|
||||
'jaminanId' => $jaminanId,
|
||||
]) . "?form=data-pembanding&pembanding={$permohonan->id}&jenis_jaminan={$jaminanId}",
|
||||
'id' => $permohonan->id
|
||||
]) . "?form=data-pembanding&pembanding={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['data_pembanding']),
|
||||
],
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
@csrf
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="type" value="tanah">
|
||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
@@ -111,16 +111,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$apartemenKantorData = explode(',', $inspeksi->name);
|
||||
$isApartemenKantor = array_intersect($apartemenKantorData, [
|
||||
'tanah',
|
||||
'bangunan',
|
||||
]);
|
||||
|
||||
@endphp
|
||||
|
||||
@if ($isApartemenKantor)
|
||||
<tr>
|
||||
<td class="px-4 py-2">Luas Tanah (m²)</td>
|
||||
@php
|
||||
@@ -153,19 +143,6 @@
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td class="px-4 py-2">Luas Unit (m²)</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_unit" class="input number-format"
|
||||
value="{{ $inspectionData['unit']['luas_unit']['sesuai'] ?? ($inspectionData['unit']['luas_unit']['tidak sesuai'] ?? '') }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="luas_unit_pembanding[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
||||
<!-- Informasi Harga -->
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
@csrf
|
||||
|
||||
<input type="hidden" value="{{ $permohonan->id }}" name="permohonan_id">
|
||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
|
||||
<div class="mt-2">
|
||||
<div class=" mx-auto overflow-hidden">
|
||||
<div class="flex flex-wrap gap-4" style="margin-top: 20px">
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
@@ -77,24 +77,20 @@
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Batas batas</label>
|
||||
<label class="form-label max-w-56">Batas Batas</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="grid grid-cols-1 gap-4 items-center w-full">
|
||||
@if (isset($basicData['arahMataAngin']))
|
||||
@foreach ($basicData['arahMataAngin'] as $item)
|
||||
@php
|
||||
$isChecked = false;
|
||||
$inputValue = '';
|
||||
|
||||
if (isset($forminspeksi['fakta']['batas_batas'])) {
|
||||
foreach ($forminspeksi['fakta']['batas_batas'] as $key => $value) {
|
||||
if ($key === $item->name) {
|
||||
$isChecked = true;
|
||||
$inputValue = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$isChecked = in_array(
|
||||
$item->name,
|
||||
old('batas_batas', $forminspeksi['fakta']['batas_batas'] ?? []),
|
||||
);
|
||||
$inputValue = old(
|
||||
'batas_batas_input.' . $item->name,
|
||||
$forminspeksi['fakta']['batas_batas_input'][$item->name] ?? '',
|
||||
);
|
||||
@endphp
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||
@@ -102,8 +98,8 @@
|
||||
value="{{ $item->name }}" {{ $isChecked ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<input type="text" name="batas_batas_input[]" class="input w-full"
|
||||
placeholder="Masukkan Batas {{ $item->name }}..."
|
||||
<input type="text" name="batas_batas_input[{{ $item->name }}]"
|
||||
class="input w-full" placeholder="Masukkan Batas {{ $item->name }}..."
|
||||
value="{{ $inputValue }}">
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<form id="formFoto" method="POST" class="grid gap-5" enctype="multipart/form-data">
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
|
||||
|
||||
<div class="card bg-white rounded-lg shadow-md">
|
||||
<div class="card-body">
|
||||
|
||||
@@ -128,9 +128,9 @@
|
||||
<img id="gistaru-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_gistaru']) ? $forminspeksi['foto_gistaru'] : '')) }}"
|
||||
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_gistaru']) ? '' : 'display: none;' }}" />
|
||||
style="{{ isset($forminspeksi['foto_gistaru']) ? '' : 'display: none;' }} max-width: 30rem;" />
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a href="https://gistaru.atrbpn.go.id/rtronline" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
@@ -154,7 +154,7 @@
|
||||
<img id="bhumi-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_bhumi']) ? $forminspeksi['foto_bhumi'] : '')) }}"
|
||||
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_bhumi']) ? '' : 'display: none;' }}" />
|
||||
style="{{ isset($forminspeksi['foto_bhumi']) ? ' ' : 'display: none;' }} max-width: 30rem;" />
|
||||
</div>
|
||||
<a href="https://bhumi.atrbpn.go.id/peta" type="button" class="btn btn-light" target="_blank">
|
||||
<i class="ki-filled ki-map"></i> Bhumi
|
||||
@@ -176,7 +176,7 @@
|
||||
<img id="argis-region-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_argis_region']) ? $forminspeksi['foto_argis_region'] : '')) }}"
|
||||
alt="Foto Argis Region" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_argis_region']) ? '' : 'display: none;' }}">
|
||||
style="{{ isset($forminspeksi['foto_argis_region']) ? '' : 'display: none;' }} max-width: 30rem;">
|
||||
</div>
|
||||
<a href="{{ $link_url_region->regions->url }}" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
@@ -205,7 +205,7 @@
|
||||
<img id="foto_tempat-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_tempat']) ? $forminspeksi['foto_tempat'] : '')) }}"
|
||||
alt="Foto Argis Region" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_tempat']) ? '' : 'display: none;' }}">
|
||||
style="{{ isset($forminspeksi['foto_tempat']) ? '' : 'display: none;' }} max-width: 30rem;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||
@csrf
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@if ($dokumen->jenisJaminan)
|
||||
@php
|
||||
|
||||
@@ -369,35 +369,27 @@
|
||||
@if (isset($basicData['fasilitasObjek']))
|
||||
@foreach ($basicData['fasilitasObjek'] as $item)
|
||||
@php
|
||||
$isChecked = false;
|
||||
$inputValue = '';
|
||||
|
||||
// Cek old input terlebih dahulu
|
||||
if (old('fasilitas_dekat_object') && in_array($item->name, old('fasilitas_dekat_object'))) {
|
||||
$isChecked = true;
|
||||
$oldInputIndex = array_search($item->name, old('fasilitas_dekat_object'));
|
||||
$inputValue = old('fasilitas_dekat_object_input')[$oldInputIndex] ?? '';
|
||||
}
|
||||
elseif (isset($forminspeksi['lingkungan']['fasilitas_dekat_object'])) {
|
||||
foreach ($forminspeksi['lingkungan']['fasilitas_dekat_object'] as $key => $value) {
|
||||
if ($key === $item->name) {
|
||||
$isChecked = true;
|
||||
$inputValue = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$isChecked = in_array(
|
||||
$item->name,
|
||||
old(
|
||||
'fasilitas_dekat_object',
|
||||
$forminspeksi['lingkungan']['fasilitas_dekat_object'] ?? [],
|
||||
),
|
||||
);
|
||||
$inputValue = old(
|
||||
'fasilitas_dekat_object_input.' . $item->name,
|
||||
$forminspeksi['lingkungan']['fasilitas_dekat_object_input'][$item->name] ?? '',
|
||||
);
|
||||
@endphp
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||
<input class="checkbox" name="fasilitas_dekat_object[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ $isChecked ? 'checked' : '' }} />
|
||||
value="{{ $item->name }}" {{ $isChecked ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<input type="text" name="fasilitas_dekat_object_input[]" class="input w-full"
|
||||
placeholder="Masukkan fasilitas {{ $item->name }}..."
|
||||
<input type="text" name="fasilitas_dekat_object_input[{{ $item->name }}]"
|
||||
class="input w-full" placeholder="Masukkan fasilitas {{ $item->name }}..."
|
||||
value="{{ $inputValue }}">
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
// window.location.href = "{{ route('surveyor.index') }}";
|
||||
window.location.href = "{{ route('surveyor.index') }}";
|
||||
toastrSuccessBuild(response.message);
|
||||
}
|
||||
},
|
||||
@@ -98,7 +98,7 @@
|
||||
toastrErrorBuild('Terjadi kesalahan');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -525,10 +525,10 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::get('checkButtonStatus/{id}', [SurveyorController::class, 'checkButtonStatus'])->name('checkButtonStatus');
|
||||
|
||||
Route::get('datatables', [SurveyorController::class, 'dataForDatatables'])->name('datatables');
|
||||
Route::get('inspeksi/{id}/{jaminanId}', [SurveyorController::class, 'formInspeksi'])->name('inspeksi');
|
||||
Route::get('denah/{id}/{jaminanId}', [SurveyorController::class, 'denah'])->name('denah');
|
||||
Route::get('foto/{id}/{jaminanId}', [SurveyorController::class, 'foto'])->name('foto');
|
||||
Route::get('data-pembanding/{id}/{jaminanId}', [SurveyorController::class, 'dataPembanding'])->name('data-pembanding');
|
||||
Route::get('inspeksi/{id}', [SurveyorController::class, 'formInspeksi'])->name('inspeksi');
|
||||
Route::get('denah/{id}', [SurveyorController::class, 'denah'])->name('denah');
|
||||
Route::get('foto/{id}', [SurveyorController::class, 'foto'])->name('foto');
|
||||
Route::get('data-pembanding/{id}', [SurveyorController::class, 'dataPembanding'])->name('data-pembanding');
|
||||
Route::post('submitSurveyor/{id}', [SurveyorController::class, 'submitSurveyor'])->name('submitSurveyor');
|
||||
Route::post('update_analisa/{id}', [SurveyorController::class, 'update_analisa'])->name('update_analisa');
|
||||
|
||||
@@ -540,12 +540,19 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::get('datatables', [PenilaiController::class, 'dataForDatatables'])->name('dataForTables');
|
||||
|
||||
Route::get('lampiran/{id}', [PenilaiController::class, 'lampiran'])->name('lampiran');
|
||||
Route::get('export/kertas-kerja/{id}/{jaminanId}', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja');
|
||||
Route::get('export/kertas-kerja/{id}/{jaminanId}', [PenilaiController::class, 'export_kertas_kerja'])->name('export.kertas-kerja');
|
||||
|
||||
Route::post('import/kertas-kerja', [PenilaiController::class, 'import_kertas_kerja'])->name('import.kertas-kerja');
|
||||
|
||||
Route::get('sederhana/{id}', [PenilaiController::class, 'sederhana'])->name('sederhana');
|
||||
Route::get('standard/{id}', [PenilaiController::class, 'standard'])->name('standard');
|
||||
Route::get('resume/{id}', [PenilaiController::class, 'resume'])->name('resume');
|
||||
Route::get('memo/{id}', [PenilaiController::class, 'standard'])->name('memo');
|
||||
Route::get('resume', [PenilaiController::class, 'resume'])->name('resume');
|
||||
Route::get('memo', [PenilaiController::class, 'memo'])->name('memo');
|
||||
Route::get('paparan', [PenilaiController::class, 'paparan'])->name('paparan');
|
||||
Route::get('rap', [PenilaiController::class, 'rap'])->name('rap');
|
||||
Route::get('/check-status-lpj', [PenilaiController::class, 'checkStatusLpj'])->name('check.status.lpj');
|
||||
Route::post('/save-status-lpj', [PenilaiController::class, 'saveStatusLpj'])->name('save.status.lpj');
|
||||
Route::post('/preoses-laporan/{id}', [PenilaiController::class, 'storePenilaian'])->name('proses.laporan');
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user