update memo, lpj, resume, dan perbaikan form inspeksi
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -723,15 +723,33 @@ 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;
|
||||
// Pastikan struktur array ada sebelum diakses
|
||||
if (!isset($dataForm['tanah']['luas_tanah'])) {
|
||||
$dataForm['tanah']['luas_tanah'] = [];
|
||||
}
|
||||
|
||||
$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'])) {
|
||||
|
||||
$cekBanguan = $dataForm['bangunan']['luas_tanah_bagunan'] == 'sesuai' ? 'sesuai' : 'tidak sesuai';
|
||||
$dataForm['bangunan'][$field][$cekBanguan] = $newValue;
|
||||
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
|
||||
elseif (in_array($field, ['address', 'village_code', 'district_code', 'city_code', 'province_code'])) {
|
||||
|
||||
@@ -2306,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}");
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
@@ -538,8 +538,6 @@
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
$informasiPembanding = isset($inspeksi->data_pembanding) ? json_decode($inspeksi->data_pembanding, true) : [];
|
||||
@endphp
|
||||
|
||||
@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">
|
||||
@@ -68,4 +69,5 @@
|
||||
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</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,7 +337,82 @@
|
||||
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>
|
||||
|
||||
@@ -153,6 +423,28 @@
|
||||
</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">
|
||||
@@ -166,17 +165,17 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
<input type="text" name="fisik_sertifikat[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
<input type="text" name="fisik_luas_tanah[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center"> <input type="text" name="luas_bangunan_pembanding[]"
|
||||
<td class="text-center"> <input type="text" name="fisik_luas_bangunan[]"
|
||||
class="input number-format"></td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
<input type="text" name="fisik_nilai[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -203,19 +202,19 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
<input type="text" name="sesuai_sertifikat[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
<input type="text" name="sesuai_luas_tanah[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
<input type="text" name="sesuai_luas_bangunan[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_bangunan_pembanding[]"
|
||||
<input type="text" name="sesuai_nilai[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -225,13 +224,13 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5">
|
||||
<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"></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">
|
||||
|
||||
@@ -245,10 +244,83 @@
|
||||
|
||||
<div class="card-footer">
|
||||
|
||||
<button type="submit" class="btn btn-success">Save</button>
|
||||
<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>
|
||||
<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>
|
||||
<th class="text-center">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<input type="text" name="sertipikat[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luas_tanah[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" name="luat_bangunan[]"
|
||||
class="input number-format">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<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>
|
||||
`;
|
||||
counter++;
|
||||
}
|
||||
|
||||
function deleteRow(button) {
|
||||
const rowContainer = button.closest('.grid');
|
||||
rowContainer.remove();
|
||||
updateLabelNumbers();
|
||||
}
|
||||
|
||||
function updateLabelNumbers() {
|
||||
const labels = document.querySelectorAll('.kesimpulan');
|
||||
labels.forEach((label, index) => {
|
||||
// Update setiap label dengan nomor yang benar
|
||||
label.textContent = `${index + 1}. SESUAI IMB`;
|
||||
});
|
||||
}
|
||||
|
||||
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,18 +293,16 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body grid gap-5">
|
||||
<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">
|
||||
<button type="button" class="btn btn-outline btn-success"
|
||||
onclick="uploadKertasKerja()">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group flex items-baseline flex-wrap">
|
||||
@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)
|
||||
@@ -305,6 +311,17 @@
|
||||
@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" id="kertas_kerja" class="file-input">
|
||||
<button type="button" class="btn btn-outline btn-success"
|
||||
onclick="uploadKertasKerja({{ $permohonan->id }}, '{{ $documentId }}', '{{ $inspeksiId }}', '{{ $jenisJaminanId }}')">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group flex items-baseline flex-wrap">
|
||||
|
||||
@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() {
|
||||
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: 'Apakah kamu akan memilih lpj standar?',
|
||||
icon: 'warning',
|
||||
title: 'Pilih Jenis LPJ',
|
||||
text: 'Apakah kamu akan memilih LPJ Standar?',
|
||||
icon: 'question',
|
||||
showCloseButton: true,
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: 'Yes',
|
||||
denyButtonText: 'No',
|
||||
confirmButtonText: 'LPJ Standar',
|
||||
denyButtonText: 'LPJ Sederhana',
|
||||
confirmButtonColor: '#3085d6',
|
||||
denyButtonColor: '#d33',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = "{{ route('penilai.standard', $permohonan->id) }}";
|
||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'standar', jaminanId);
|
||||
} else if (result.isDenied) {
|
||||
window.location.href = "{{ route('penilai.sederhana', $permohonan->id) }}";
|
||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'sederhana', jaminanId);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
console.log(data);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function uploadKertasKerja() {
|
||||
showLoadingSwal('Mengirim data ke server...');
|
||||
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
timer: 2000,
|
||||
timerProgressBar: true,
|
||||
didOpen: () => {
|
||||
Swal.showLoading()
|
||||
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() }}',
|
||||
},
|
||||
willClose: () => {
|
||||
hideLoadingSwal();
|
||||
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(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'] ?? '') }}">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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,7 +128,7 @@
|
||||
<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>
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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