fix(penilai): perbaikkan data double di table penilai -> hapus field inspeksi id dan perbaikkan format tanggal
This commit is contained in:
@@ -19,11 +19,16 @@ use Modules\Location\Models\Village;
|
|||||||
function formatTanggalIndonesia($date, $time = false)
|
function formatTanggalIndonesia($date, $time = false)
|
||||||
{
|
{
|
||||||
Carbon::setLocale('id');
|
Carbon::setLocale('id');
|
||||||
$waktu = Carbon::parse($date);
|
try {
|
||||||
if (!$time) {
|
$waktu = Carbon::parse($date);
|
||||||
return $waktu->translatedFormat('d F Y');
|
if (!$time) {
|
||||||
|
return $waktu->translatedFormat('d F Y');
|
||||||
|
}
|
||||||
|
return $waktu->translatedFormat('d F Y') . ' pukul ' . $waktu->format('H.i') . ' WIB';
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
return $date;
|
||||||
}
|
}
|
||||||
return $waktu->translatedFormat('d F Y') . ' pukul ' . $waktu->format('H.i') . ' WIB';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
$documentId = $request->query('documentId');
|
$documentId = $request->query('documentId');
|
||||||
$jaminanId = $request->query('jaminanId');
|
$jaminanId = $request->query('jaminanId');
|
||||||
$inspeksiId = $request->query('inspeksiId');
|
|
||||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($id, $documentId, $jaminanId);
|
$permohonan = $this->surveyorController->getPermohonanJaminanId($id, $documentId, $jaminanId);
|
||||||
$basicData = $this->surveyorController->getCommonData();
|
$basicData = $this->surveyorController->getCommonData();
|
||||||
$provinces = Province::all();
|
$provinces = Province::all();
|
||||||
@@ -96,7 +95,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $id,
|
'permohonan_id' => $id,
|
||||||
'dokument_id' => $documentId,
|
'dokument_id' => $documentId,
|
||||||
'inspeksi_id' => $inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type_penilai' => 'sederhana',
|
'type_penilai' => 'sederhana',
|
||||||
@@ -152,7 +150,6 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
$documentId = $request->query('documentId');
|
$documentId = $request->query('documentId');
|
||||||
$jaminanId = $request->query('jaminanId');
|
$jaminanId = $request->query('jaminanId');
|
||||||
$inspeksiId = $request->query('inspeksiId');
|
|
||||||
|
|
||||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($id, $documentId, $jaminanId);
|
$permohonan = $this->surveyorController->getPermohonanJaminanId($id, $documentId, $jaminanId);
|
||||||
$basicData = $this->surveyorController->getCommonData();
|
$basicData = $this->surveyorController->getCommonData();
|
||||||
@@ -164,7 +161,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $id,
|
'permohonan_id' => $id,
|
||||||
'dokument_id' => $documentId,
|
'dokument_id' => $documentId,
|
||||||
'inspeksi_id' => $inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type_penilai' => 'standar',
|
'type_penilai' => 'standar',
|
||||||
@@ -219,7 +215,6 @@ class PenilaiController extends Controller
|
|||||||
{
|
{
|
||||||
$permohonanId = $request->query('permohonanId');
|
$permohonanId = $request->query('permohonanId');
|
||||||
$documentId = $request->query('documentId');
|
$documentId = $request->query('documentId');
|
||||||
$inspeksiId = $request->query('inspeksiId');
|
|
||||||
$jaminanId = $request->query('jaminanId');
|
$jaminanId = $request->query('jaminanId');
|
||||||
|
|
||||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||||
@@ -230,7 +225,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $permohonanId,
|
'permohonan_id' => $permohonanId,
|
||||||
'dokument_id' => $documentId,
|
'dokument_id' => $documentId,
|
||||||
'inspeksi_id' => $inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type_penilai' => 'resume',
|
'type_penilai' => 'resume',
|
||||||
@@ -269,7 +263,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $req['permohonanId'],
|
'permohonan_id' => $req['permohonanId'],
|
||||||
'dokument_id' => $req['documentId'],
|
'dokument_id' => $req['documentId'],
|
||||||
'inspeksi_id' => $request->inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type_penilai' => 'memo',
|
'type_penilai' => 'memo',
|
||||||
@@ -348,7 +341,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $request->permohonan_id,
|
'permohonan_id' => $request->permohonan_id,
|
||||||
'dokument_id' => $request->dokument_id,
|
'dokument_id' => $request->dokument_id,
|
||||||
'inspeksi_id' => $request->inspeksi_id,
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -377,7 +369,6 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
$permohonanId = $request->query('permohonanId');
|
$permohonanId = $request->query('permohonanId');
|
||||||
$documentId = $request->query('documentId');
|
$documentId = $request->query('documentId');
|
||||||
$inspeksiId = $request->query('inspeksiId');
|
|
||||||
$jaminanId = $request->query('jaminanId');
|
$jaminanId = $request->query('jaminanId');
|
||||||
|
|
||||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||||
@@ -398,7 +389,6 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
$permohonanId = $request->query('permohonanId');
|
$permohonanId = $request->query('permohonanId');
|
||||||
$documentId = $request->query('documentId');
|
$documentId = $request->query('documentId');
|
||||||
$inspeksiId = $request->query('inspeksiId');
|
|
||||||
$jaminanId = $request->query('jaminanId');
|
$jaminanId = $request->query('jaminanId');
|
||||||
$provinces = Province::all();
|
$provinces = Province::all();
|
||||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||||
@@ -409,7 +399,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $permohonanId,
|
'permohonan_id' => $permohonanId,
|
||||||
'dokument_id' => $documentId,
|
'dokument_id' => $documentId,
|
||||||
'inspeksi_id' => $inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type_penilai' => 'rap',
|
'type_penilai' => 'rap',
|
||||||
@@ -478,7 +467,6 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
$permohonanId = $request->query('permohonanId');
|
$permohonanId = $request->query('permohonanId');
|
||||||
$documentId = $request->query('documentId');
|
$documentId = $request->query('documentId');
|
||||||
$inspeksiId = $request->query('inspeksiId');
|
|
||||||
$jaminanId = $request->query('jaminanId');
|
$jaminanId = $request->query('jaminanId');
|
||||||
$provinces = Province::all();
|
$provinces = Province::all();
|
||||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||||
@@ -489,7 +477,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $permohonanId,
|
'permohonan_id' => $permohonanId,
|
||||||
'dokument_id' => $documentId,
|
'dokument_id' => $documentId,
|
||||||
'inspeksi_id' => $inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type_penilai' => 'call-report',
|
'type_penilai' => 'call-report',
|
||||||
@@ -721,7 +708,6 @@ class PenilaiController extends Controller
|
|||||||
$validatedData = $request->validate([
|
$validatedData = $request->validate([
|
||||||
'permohonan_id' => 'required|integer',
|
'permohonan_id' => 'required|integer',
|
||||||
'document_id' => 'required|integer',
|
'document_id' => 'required|integer',
|
||||||
'inspeksi_id' => 'required|integer',
|
|
||||||
'kertas_kerja' => 'required|file|mimes:pdf',
|
'kertas_kerja' => 'required|file|mimes:pdf',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -734,7 +720,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $validatedData['permohonan_id'],
|
'permohonan_id' => $validatedData['permohonan_id'],
|
||||||
'dokument_id' => $validatedData['document_id'],
|
'dokument_id' => $validatedData['document_id'],
|
||||||
'inspeksi_id' => $validatedData['inspeksi_id'],
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'kertas_kerja' => $filePath,
|
'kertas_kerja' => $filePath,
|
||||||
@@ -761,11 +746,9 @@ class PenilaiController extends Controller
|
|||||||
{
|
{
|
||||||
$permohonanId = $request->query('permohonanId');
|
$permohonanId = $request->query('permohonanId');
|
||||||
$documentId = $request->query('documentId');
|
$documentId = $request->query('documentId');
|
||||||
$inspeksiId = $request->query('inspeksiId');
|
|
||||||
|
|
||||||
$statusLpj = Penilai::where('permohonan_id', $permohonanId)
|
$statusLpj = Penilai::where('permohonan_id', $permohonanId)
|
||||||
->where('dokument_id', $documentId)
|
->where('dokument_id', $documentId)
|
||||||
->where('inspeksi_id', $inspeksiId)
|
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
return response()->json(['status' => $statusLpj ? $statusLpj->type : null]);
|
return response()->json(['status' => $statusLpj ? $statusLpj->type : null]);
|
||||||
@@ -778,8 +761,7 @@ class PenilaiController extends Controller
|
|||||||
Penilai::updateOrCreate(
|
Penilai::updateOrCreate(
|
||||||
[
|
[
|
||||||
'permohonan_id' => $request->permohonan_id,
|
'permohonan_id' => $request->permohonan_id,
|
||||||
'dokument_id' => $request->document_id,
|
'dokument_id' => $request->document_i
|
||||||
'inspeksi_id' => $request->inspeksi_id,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type' => $request->type,
|
'type' => $request->type,
|
||||||
@@ -887,7 +869,7 @@ class PenilaiController extends Controller
|
|||||||
$validatedData = $request->validate([
|
$validatedData = $request->validate([
|
||||||
'permohonan_id' => 'required',
|
'permohonan_id' => 'required',
|
||||||
'dokument_id' => 'required',
|
'dokument_id' => 'required',
|
||||||
'inspeksi_id' => 'required',
|
|
||||||
'resume' => 'required|array',
|
'resume' => 'required|array',
|
||||||
'fakta_positif' => 'nullable|array',
|
'fakta_positif' => 'nullable|array',
|
||||||
'fakta_negatif' => 'nullable|array',
|
'fakta_negatif' => 'nullable|array',
|
||||||
@@ -901,7 +883,7 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $validatedData['permohonan_id'],
|
'permohonan_id' => $validatedData['permohonan_id'],
|
||||||
'dokument_id' => $validatedData['dokument_id'],
|
'dokument_id' => $validatedData['dokument_id'],
|
||||||
'inspeksi_id' => $validatedData['inspeksi_id'],
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'resume' => json_encode($validatedData['resume']),
|
'resume' => json_encode($validatedData['resume']),
|
||||||
@@ -970,7 +952,6 @@ class PenilaiController extends Controller
|
|||||||
$validatedData = $request->validate([
|
$validatedData = $request->validate([
|
||||||
'permohonan_id' => 'required|integer',
|
'permohonan_id' => 'required|integer',
|
||||||
'document_id' => 'required|integer',
|
'document_id' => 'required|integer',
|
||||||
'inspeksi_id' => 'required|integer',
|
|
||||||
'memo' => 'required',
|
'memo' => 'required',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -980,7 +961,7 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $validatedData['permohonan_id'],
|
'permohonan_id' => $validatedData['permohonan_id'],
|
||||||
'dokument_id' => $validatedData['document_id'],
|
'dokument_id' => $validatedData['document_id'],
|
||||||
'inspeksi_id' => $validatedData['inspeksi_id'],
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'memo' => json_encode($memoData),
|
'memo' => json_encode($memoData),
|
||||||
@@ -1075,7 +1056,7 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $request->permohonanId,
|
'permohonan_id' => $request->permohonanId,
|
||||||
'dokument_id' => $request->documentId,
|
'dokument_id' => $request->documentId,
|
||||||
'inspeksi_id' => $request->inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'lpj' => json_encode($data),
|
'lpj' => json_encode($data),
|
||||||
@@ -1129,7 +1110,7 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $request->permohonanId,
|
'permohonan_id' => $request->permohonanId,
|
||||||
'dokument_id' => $request->documentId,
|
'dokument_id' => $request->documentId,
|
||||||
'inspeksi_id' => $request->inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'rap' => json_encode($data),
|
'rap' => json_encode($data),
|
||||||
@@ -1160,7 +1141,6 @@ class PenilaiController extends Controller
|
|||||||
$validated = $request->validate([
|
$validated = $request->validate([
|
||||||
'permohonan_id' => 'required|exists:permohonan,id',
|
'permohonan_id' => 'required|exists:permohonan,id',
|
||||||
'dokument_id' => 'required',
|
'dokument_id' => 'required',
|
||||||
'inspeksi_id' => 'required',
|
|
||||||
'data' => 'required',
|
'data' => 'required',
|
||||||
'fakta_positif' => 'nullable|array',
|
'fakta_positif' => 'nullable|array',
|
||||||
'fakta_negatif' => 'nullable|array',
|
'fakta_negatif' => 'nullable|array',
|
||||||
@@ -1175,7 +1155,6 @@ class PenilaiController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $validated['permohonan_id'],
|
'permohonan_id' => $validated['permohonan_id'],
|
||||||
'dokument_id' => $validated['dokument_id'],
|
'dokument_id' => $validated['dokument_id'],
|
||||||
'inspeksi_id' => $validated['inspeksi_id'],
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'call_report' => json_encode($validated['data']),
|
'call_report' => json_encode($validated['data']),
|
||||||
@@ -1389,7 +1368,6 @@ class PenilaiController extends Controller
|
|||||||
'permohonanId' => $request->query('permohonanId'),
|
'permohonanId' => $request->query('permohonanId'),
|
||||||
'documentId' => $request->query('documentId'),
|
'documentId' => $request->query('documentId'),
|
||||||
'jaminanId' => $request->query('jaminanId'),
|
'jaminanId' => $request->query('jaminanId'),
|
||||||
'inspeksiId' => $request->query('inspeksiId')
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1397,12 +1375,10 @@ class PenilaiController extends Controller
|
|||||||
{
|
{
|
||||||
$permohonanId = $request->query('permohonanId');
|
$permohonanId = $request->query('permohonanId');
|
||||||
$documentId = $request->query('documentId');
|
$documentId = $request->query('documentId');
|
||||||
$inspeksiId = $request->query('inspeksiId');
|
|
||||||
|
|
||||||
// Ambil data berdasarkan ID
|
// Ambil data berdasarkan ID
|
||||||
$statusLpj = Penilai::where('permohonan_id', $permohonanId)
|
$statusLpj = Penilai::where('permohonan_id', $permohonanId)
|
||||||
->where('dokument_id', $documentId)
|
->where('dokument_id', $documentId)
|
||||||
->where('inspeksi_id', $inspeksiId)
|
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
// Jika data tidak ditemukan, kembalikan status null
|
// Jika data tidak ditemukan, kembalikan status null
|
||||||
|
|||||||
@@ -786,7 +786,6 @@ class PenilaianController extends Controller
|
|||||||
$inspeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $documentId)->first();
|
$inspeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $documentId)->first();
|
||||||
$lpj = Penilai::where('permohonan_id', $id)
|
$lpj = Penilai::where('permohonan_id', $id)
|
||||||
->where('dokument_id', $documentId)
|
->where('dokument_id', $documentId)
|
||||||
->where('inspeksi_id', $inspeksi->id)
|
|
||||||
->first();
|
->first();
|
||||||
$penilai = $lpj;
|
$penilai = $lpj;
|
||||||
|
|
||||||
@@ -879,7 +878,7 @@ class PenilaianController extends Controller
|
|||||||
[
|
[
|
||||||
'permohonan_id' => $request->permohonanId,
|
'permohonan_id' => $request->permohonanId,
|
||||||
'dokument_id' => $request->documentId,
|
'dokument_id' => $request->documentId,
|
||||||
'inspeksi_id' => $request->inspeksiId,
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'lpj' => json_encode($data),
|
'lpj' => json_encode($data),
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Modules\Lpj\Models\Inspeksi;
|
||||||
|
|
||||||
|
return new class () extends Migration {
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('penilai', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['inspeksi_id']);
|
||||||
|
$table->dropColumn('inspeksi_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('penilai', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('inspeksi_id')->nullable();
|
||||||
|
$table->foreign('inspeksi_id')->references('id')->on('inspeksi')->onDelete('cascade');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
@endphp
|
@endphp
|
||||||
<td style="width: 25%; padding: 2px; vertical-align: top;">Luas Tanah</td>
|
<td style="width: 25%; padding: 2px; vertical-align: top;">Luas Tanah</td>
|
||||||
<td style=" width:1%; padding: 2px; vertical-align: top;">:</td>
|
<td style=" width:1%; padding: 2px; vertical-align: top;">:</td>
|
||||||
<td style="width: 74%; padding: 2px; vertical-align: top;">{{ $luas ?? '' }}</td>
|
<td style="width: 74%; padding: 2px; vertical-align: top;">{{ $luas ?? '' }} <sup>m2</sup></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
|
|||||||
@@ -512,7 +512,7 @@
|
|||||||
@endif
|
@endif
|
||||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
|
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokument
|
Lampiran Foto dan Dokument
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
||||||
@@ -520,7 +520,7 @@
|
|||||||
<i class="ki-filled ki-printer"></i>Cetak Hasil Inspeksi
|
<i class="ki-filled ki-printer"></i>Cetak Hasil Inspeksi
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary"
|
<a class="btn btn-primary"
|
||||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
|
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}',{{ request('jaminanId') }}, )">
|
||||||
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@@ -589,7 +589,6 @@
|
|||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const permohonanId = {{ $permohonan->id }};
|
const permohonanId = {{ $permohonan->id }};
|
||||||
const documentId = urlParams.get('documentId');
|
const documentId = urlParams.get('documentId');
|
||||||
const inspeksiId = urlParams.get('inspeksiId');
|
|
||||||
|
|
||||||
const faktaPositif = Array.from(document.querySelectorAll('[name="fakta_positif[]"]'))
|
const faktaPositif = Array.from(document.querySelectorAll('[name="fakta_positif[]"]'))
|
||||||
.map(textarea => textarea.value.trim())
|
.map(textarea => textarea.value.trim())
|
||||||
@@ -609,7 +608,7 @@
|
|||||||
.map(input => input.value)
|
.map(input => input.value)
|
||||||
.join(',') || "";
|
.join(',') || "";
|
||||||
const requestUrl =
|
const requestUrl =
|
||||||
`{{ route('penilai.storeCallReport') }}?permohonan_id=${permohonanId}&inspeksi_id=${inspeksiId}&dokument_id=${documentId}`;
|
`{{ route('penilai.storeCallReport') }}?permohonan_id=${permohonanId}&dokument_id=${documentId}`;
|
||||||
|
|
||||||
|
|
||||||
const jsonData = formatJson(formElement);
|
const jsonData = formatJson(formElement);
|
||||||
@@ -619,7 +618,7 @@
|
|||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
permohonan_id: permohonanId,
|
permohonan_id: permohonanId,
|
||||||
dokument_id: documentId,
|
dokument_id: documentId,
|
||||||
inspeksi_id: inspeksiId,
|
|
||||||
data: jsonData,
|
data: jsonData,
|
||||||
fakta_positif: faktaPositif,
|
fakta_positif: faktaPositif,
|
||||||
fakta_negatif: faktaNegatif,
|
fakta_negatif: faktaNegatif,
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
@endif
|
@endif
|
||||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ $permohonan->id }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ $permohonan->id }}&documentId={{ request('documentId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokumen
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<i class="ki-filled ki-printer"></i> Cetak Hasil Inspeksi
|
<i class="ki-filled ki-printer"></i> Cetak Hasil Inspeksi
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-success"
|
<a class="btn btn-success"
|
||||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
|
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', {{ request('jaminanId') }}, )">
|
||||||
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -322,7 +322,7 @@
|
|||||||
@endif
|
@endif
|
||||||
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer', 'EO Appraisal', 'DD Appraisal']))
|
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer', 'EO Appraisal', 'DD Appraisal']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokumen
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
||||||
@@ -330,7 +330,7 @@
|
|||||||
<i class="ki-filled ki-printer"></i> Hasil Inspeksi
|
<i class="ki-filled ki-printer"></i> Hasil Inspeksi
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-success"
|
<a class="btn btn-success"
|
||||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
|
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', {{ request('jaminanId') }}, )">
|
||||||
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@@ -440,13 +440,11 @@
|
|||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const permohonanId = urlParams.get('permohonanId');
|
const permohonanId = urlParams.get('permohonanId');
|
||||||
const documentId = urlParams.get('documentId');
|
const documentId = urlParams.get('documentId');
|
||||||
const inspeksiId = urlParams.get('inspeksiId');
|
|
||||||
|
|
||||||
// Create a new FormData object to send both JSON and files
|
// Create a new FormData object to send both JSON and files
|
||||||
const sendFormData = new FormData();
|
const sendFormData = new FormData();
|
||||||
sendFormData.append('permohonan_id', permohonanId);
|
sendFormData.append('permohonan_id', permohonanId);
|
||||||
sendFormData.append('document_id', documentId);
|
sendFormData.append('document_id', documentId);
|
||||||
sendFormData.append('inspeksi_id', inspeksiId);
|
|
||||||
sendFormData.append('memo', JSON.stringify(jsonData));
|
sendFormData.append('memo', JSON.stringify(jsonData));
|
||||||
|
|
||||||
// Append all files from Dropzone
|
// Append all files from Dropzone
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
$data = '';
|
$data = '';
|
||||||
foreach ($permohonan->documents as $dokumen) {
|
foreach ($permohonan->documents as $dokumen) {
|
||||||
$data .= $dokumen->jenisJaminan->name . ', ';
|
$data .= $dokumen->jenisJaminan->name . ', ';
|
||||||
|
$jenisAset = $dokumen->jenisJaminan->name;
|
||||||
}
|
}
|
||||||
$data = rtrim($data, ', ');
|
$data = rtrim($data, ', ');
|
||||||
@endphp
|
@endphp
|
||||||
@@ -730,6 +731,10 @@
|
|||||||
'pesawat' => 'Luas Pesawat',
|
'pesawat' => 'Luas Pesawat',
|
||||||
'kapal' => 'Luas Kapal',
|
'kapal' => 'Luas Kapal',
|
||||||
];
|
];
|
||||||
|
if (strcasecmp($jenisAset, 'RUKO/RUKAN') === 0) {
|
||||||
|
$labelNilai['bangunan'] = 'Luas Unit';
|
||||||
|
unset($labelNilai['tanah']);
|
||||||
|
}
|
||||||
@endphp
|
@endphp
|
||||||
@foreach ($labelNilai as $key => $label)
|
@foreach ($labelNilai as $key => $label)
|
||||||
@if (isset($lpjData['luas_' . $key]))
|
@if (isset($lpjData['luas_' . $key]))
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
$dokument = null;
|
$dokument = null;
|
||||||
foreach ($permohonan->documents as $dokumen) {
|
foreach ($permohonan->documents as $dokumen) {
|
||||||
$data .= $dokumen->jenisJaminan->name . ', ';
|
$data .= $dokumen->jenisJaminan->name . ', ';
|
||||||
|
$jenisAset = $dokumen->jenisJaminan->name;
|
||||||
$dokument = $dokumen;
|
$dokument = $dokumen;
|
||||||
}
|
}
|
||||||
$data = rtrim($data, ', ');
|
$data = rtrim($data, ', ');
|
||||||
@@ -269,10 +270,10 @@
|
|||||||
'kapal' => 'Luas Kapal',
|
'kapal' => 'Luas Kapal',
|
||||||
];
|
];
|
||||||
|
|
||||||
// if (strcasecmp($jenisAset, 'RUKO/RUKAN') === 0) {
|
if (strcasecmp($jenisAset, 'RUKO/RUKAN') === 0) {
|
||||||
// $labelNilai['bangunan'] = 'Luas Unit';
|
$labelNilai['bangunan'] = 'Luas Unit';
|
||||||
// unset($labelNilai['tanah']);
|
unset($labelNilai['tanah']);
|
||||||
// }
|
}
|
||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
@foreach ($labelNilai as $key => $label)
|
@foreach ($labelNilai as $key => $label)
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
@endif
|
@endif
|
||||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokumen
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
<i class="ki-filled ki-printer"></i> Cetak Hasil Inspeksi
|
<i class="ki-filled ki-printer"></i> Cetak Hasil Inspeksi
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-success"
|
<a class="btn btn-success"
|
||||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
|
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', {{ request('jaminanId') }}, )">
|
||||||
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@@ -228,9 +228,9 @@
|
|||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const permohonanId = {{ $permohonan->id }};
|
const permohonanId = {{ $permohonan->id }};
|
||||||
const documentId = urlParams.get('documentId');
|
const documentId = urlParams.get('documentId');
|
||||||
const inspeksiId = urlParams.get('inspeksiId');
|
|
||||||
const requestUrl =
|
const requestUrl =
|
||||||
`{{ route('penilai.storeRap') }}?permohonanId=${permohonanId}&inspeksiId=${inspeksiId}&documentId=${documentId}`;
|
`{{ route('penilai.storeRap') }}?permohonanId=${permohonanId}&documentId=${documentId}`;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: requestUrl,
|
url: requestUrl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
|||||||
@@ -431,7 +431,7 @@
|
|||||||
|
|
||||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokumen
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
||||||
@@ -439,7 +439,7 @@
|
|||||||
<i class="ki-filled ki-printer"></i>Cetak Hasil Inspeksi
|
<i class="ki-filled ki-printer"></i>Cetak Hasil Inspeksi
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-success"
|
<a class="btn btn-success"
|
||||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
|
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', {{ request('jaminanId') }}, )">
|
||||||
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
<i class="ki-filled ki-printer"></i> Cetak Laporan
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@@ -551,7 +551,6 @@
|
|||||||
const urlParams = new URLSearchParams(window.location.search); // Mengambil query parameters dari URL
|
const urlParams = new URLSearchParams(window.location.search); // Mengambil query parameters dari URL
|
||||||
const permohonanId = urlParams.get('permohonanId');
|
const permohonanId = urlParams.get('permohonanId');
|
||||||
const documentId = urlParams.get('documentId');
|
const documentId = urlParams.get('documentId');
|
||||||
const inspeksiId = urlParams.get('inspeksiId');
|
|
||||||
const faktaPositif = Array.from(document.querySelectorAll('[name="fakta_positif[]"]'))
|
const faktaPositif = Array.from(document.querySelectorAll('[name="fakta_positif[]"]'))
|
||||||
.map(textarea => textarea.value.trim())
|
.map(textarea => textarea.value.trim())
|
||||||
.filter(value => value !== '');
|
.filter(value => value !== '');
|
||||||
@@ -580,7 +579,6 @@
|
|||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
permohonan_id: permohonanId,
|
permohonan_id: permohonanId,
|
||||||
dokument_id: documentId,
|
dokument_id: documentId,
|
||||||
inspeksi_id: inspeksiId,
|
|
||||||
resume: jsonData,
|
resume: jsonData,
|
||||||
fakta_positif: faktaPositif,
|
fakta_positif: faktaPositif,
|
||||||
fakta_negatif: faktaNegatif,
|
fakta_negatif: faktaNegatif,
|
||||||
|
|||||||
@@ -211,10 +211,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
@php
|
@php
|
||||||
$inspeksiId = null;
|
|
||||||
foreach ($dokumen->inspeksi as $item) {
|
|
||||||
$inspeksiId = $item->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
$jaminanId = $dokumen->id;
|
$jaminanId = $dokumen->id;
|
||||||
$currentInspeksi = $inspeksiData[$jaminanId] ?? null;
|
$currentInspeksi = $inspeksiData[$jaminanId] ?? null;
|
||||||
@@ -224,7 +220,7 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full card-footer mt-2 ">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full card-footer mt-2 ">
|
||||||
<div class="flex gap-5">
|
<div class="flex gap-5">
|
||||||
<a class="btn btn-primary"
|
<a class="btn btn-primary"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
|
||||||
Lampiran Foto dan Dokumen
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
@if (strtolower($permohonan->tujuanPenilaian->name) != 'rap')
|
@if (strtolower($permohonan->tujuanPenilaian->name) != 'rap')
|
||||||
@@ -233,7 +229,7 @@
|
|||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
<a class="btn btn-primary"
|
<a class="btn btn-primary"
|
||||||
onclick="paparan({{ $permohonan->id }}, {{ $dokumen->id }}, {{ $inspeksiId }}, {{ $dokumen->jenis_jaminan_id }})">
|
onclick="paparan({{ $permohonan->id }}, {{ $dokumen->id }}, {{ $dokumen->jenis_jaminan_id }})">
|
||||||
Paparan
|
Paparan
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -248,7 +244,7 @@
|
|||||||
@if (strtolower($permohonan->tujuanPenilaian->name) == 'rap')
|
@if (strtolower($permohonan->tujuanPenilaian->name) == 'rap')
|
||||||
<div class="menu-item">
|
<div class="menu-item">
|
||||||
<a class="menu-link"
|
<a class="menu-link"
|
||||||
onclick="rap('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
onclick="rap('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||||
<span class="menu-icon">
|
<span class="menu-icon">
|
||||||
<i class="ki-outline ki-message-programming">
|
<i class="ki-outline ki-message-programming">
|
||||||
</i>
|
</i>
|
||||||
@@ -264,7 +260,7 @@
|
|||||||
{{-- existing di --}}
|
{{-- existing di --}}
|
||||||
<div class="menu-item">
|
<div class="menu-item">
|
||||||
<a class="menu-link"
|
<a class="menu-link"
|
||||||
onclick="memo('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
onclick="memo('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||||
<span class="menu-icon">
|
<span class="menu-icon">
|
||||||
<i class="ki-outline ki-badge">
|
<i class="ki-outline ki-badge">
|
||||||
</i>
|
</i>
|
||||||
@@ -278,7 +274,7 @@
|
|||||||
@if ($permohonan->status_bayar === 'belum_bayar')
|
@if ($permohonan->status_bayar === 'belum_bayar')
|
||||||
<div class="menu-item">
|
<div class="menu-item">
|
||||||
<a class="menu-link"
|
<a class="menu-link"
|
||||||
onclick="resume('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
onclick="resume('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||||
<span class="menu-icon">
|
<span class="menu-icon">
|
||||||
<i class="ki-outline ki-profile-circle">
|
<i class="ki-outline ki-profile-circle">
|
||||||
</i>
|
</i>
|
||||||
@@ -294,7 +290,7 @@
|
|||||||
|
|
||||||
<div class="menu-item">
|
<div class="menu-item">
|
||||||
<a class="menu-link"
|
<a class="menu-link"
|
||||||
onclick="seletSederhanaStandart('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }}, '{{ $permohonan->jenisFasilitasKredit->name }}', '{{ $permohonan->status_bayar }}')">
|
onclick="seletSederhanaStandart('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }}, '{{ $permohonan->jenisFasilitasKredit->name }}', '{{ $permohonan->status_bayar }}')">
|
||||||
<span class="menu-icon">
|
<span class="menu-icon">
|
||||||
<i class="ki-outline ki-setting-2"></i>
|
<i class="ki-outline ki-setting-2"></i>
|
||||||
</span>
|
</span>
|
||||||
@@ -304,7 +300,7 @@
|
|||||||
@endif
|
@endif
|
||||||
<div class="menu-item">
|
<div class="menu-item">
|
||||||
<a class="menu-link"
|
<a class="menu-link"
|
||||||
onclick="callReport('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
onclick="callReport('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }})">
|
||||||
<span class="menu-icon">
|
<span class="menu-icon">
|
||||||
<i class="ki-outline ki-profile-circle">
|
<i class="ki-outline ki-profile-circle">
|
||||||
</i>
|
</i>
|
||||||
@@ -372,13 +368,13 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="btn btn-outline btn-info "
|
<a class="btn btn-outline btn-info "
|
||||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }}, 1 )">
|
onclick="checkLaporan('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }}, 1 )">
|
||||||
<i class="ki-filled ki-eye"></i>
|
<i class="ki-filled ki-eye"></i>
|
||||||
Lihat Laporan
|
Lihat Laporan
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="btn btn-success"
|
<a class="btn btn-success"
|
||||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }}, 0 )">
|
onclick="checkLaporan('{{ $permohonan->id }}', '{{ $dokumen->id }}', {{ $dokumen->jenis_jaminan_id }}, 0 )">
|
||||||
<i class="ki-filled ki-printer"></i>
|
<i class="ki-filled ki-printer"></i>
|
||||||
Cetak Laporan
|
Cetak Laporan
|
||||||
</a>
|
</a>
|
||||||
@@ -420,7 +416,7 @@
|
|||||||
<div class="modal-body grid gap-5">
|
<div class="modal-body grid gap-5">
|
||||||
@php
|
@php
|
||||||
$jenisJaminanId = null;
|
$jenisJaminanId = null;
|
||||||
$inspeksiId = null;
|
|
||||||
$documentId = null;
|
$documentId = null;
|
||||||
$firstDocument = $permohonan->documents->first(); // Ambil dokumen pertama
|
$firstDocument = $permohonan->documents->first(); // Ambil dokumen pertama
|
||||||
|
|
||||||
@@ -428,9 +424,7 @@
|
|||||||
$documentId = $firstDocument->id;
|
$documentId = $firstDocument->id;
|
||||||
|
|
||||||
// Ambil ID inspeksi pertama (jika ada)
|
// Ambil ID inspeksi pertama (jika ada)
|
||||||
if ($firstDocument->inspeksi->isNotEmpty()) {
|
|
||||||
$inspeksiId = $firstDocument->inspeksi->first()->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ambil jenis jaminan jika ada
|
// Ambil jenis jaminan jika ada
|
||||||
if ($firstDocument->jenisjaminan) {
|
if ($firstDocument->jenisjaminan) {
|
||||||
@@ -438,7 +432,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$documentId = 'Tidak ada dokumen';
|
$documentId = 'Tidak ada dokumen';
|
||||||
$inspeksiId = 'Tidak ada inspeksi';
|
|
||||||
$jenisJaminanId = 'Tidak ada jenis jaminan';
|
$jenisJaminanId = 'Tidak ada jenis jaminan';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,7 +443,7 @@
|
|||||||
<div class="flex justify-center items-center gap-2">
|
<div class="flex justify-center items-center gap-2">
|
||||||
<input type="file" id="kertas_kerja" class="file-input">
|
<input type="file" id="kertas_kerja" class="file-input">
|
||||||
<button type="button" class="btn btn-outline btn-success"
|
<button type="button" class="btn btn-outline btn-success"
|
||||||
onclick="uploadKertasKerja({{ $permohonan->id }}, '{{ $documentId }}', '{{ $inspeksiId }}', '{{ $jenisJaminanId }}')">Upload
|
onclick="uploadKertasKerja({{ $permohonan->id }}, '{{ $documentId }}', '{{ $jenisJaminanId }}')">Upload
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -472,7 +466,7 @@
|
|||||||
@include('lpj::component.pdfviewer')
|
@include('lpj::component.pdfviewer')
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function seletSederhanaStandart(permohonanId, documentId, inspeksiId, jaminanId, fasilitasKredit, statusBayar) {
|
function seletSederhanaStandart(permohonanId, documentId, jaminanId, fasilitasKredit, statusBayar) {
|
||||||
if (statusBayar === 'belum_bayar') {
|
if (statusBayar === 'belum_bayar') {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Jenis LPJ Ditentukan',
|
title: 'Jenis LPJ Ditentukan',
|
||||||
@@ -481,12 +475,12 @@
|
|||||||
confirmButtonText: 'Lanjutkan',
|
confirmButtonText: 'Lanjutkan',
|
||||||
confirmButtonColor: '#3085d6',
|
confirmButtonColor: '#3085d6',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
resume(permohonanId, documentId, inspeksiId, jaminanId)
|
resume(permohonanId, documentId, jaminanId)
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
fetch(
|
fetch(
|
||||||
`{{ url('/penilai/check-status-lpj') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}`
|
`{{ url('/penilai/check-status-lpj') }}?permohonanId=${permohonanId}&documentId=${documentId}`
|
||||||
)
|
)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
@@ -495,11 +489,11 @@
|
|||||||
if (data.status === 'standar') {
|
if (data.status === 'standar') {
|
||||||
showLoadingSwal('Tunggu ...');
|
showLoadingSwal('Tunggu ...');
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.standar', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.standar', $permohonan->id) }}?documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||||
} else if (data.status === 'sederhana') {
|
} else if (data.status === 'sederhana') {
|
||||||
showLoadingSwal('Tunggu ...');
|
showLoadingSwal('Tunggu ...');
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fasilitasKredit.toUpperCase() === 'KPR KERJASAMA') {
|
if (fasilitasKredit.toUpperCase() === 'KPR KERJASAMA') {
|
||||||
@@ -510,7 +504,7 @@
|
|||||||
confirmButtonText: 'Lanjutkan',
|
confirmButtonText: 'Lanjutkan',
|
||||||
confirmButtonColor: '#3085d6',
|
confirmButtonColor: '#3085d6',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'sederhana', jaminanId);
|
saveStatusLpj(permohonanId, documentId, 'sederhana', jaminanId);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@@ -525,10 +519,10 @@
|
|||||||
denyButtonColor: '#d33',
|
denyButtonColor: '#d33',
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'standar',
|
saveStatusLpj(permohonanId, documentId, 'standar',
|
||||||
jaminanId);
|
jaminanId);
|
||||||
} else if (result.isDenied) {
|
} else if (result.isDenied) {
|
||||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'sederhana',
|
saveStatusLpj(permohonanId, documentId, 'sederhana',
|
||||||
jaminanId);
|
jaminanId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -541,7 +535,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveStatusLpj(permohonanId, documentId, inspeksiId, type, jaminanId) {
|
function saveStatusLpj(permohonanId, documentId, type, jaminanId) {
|
||||||
fetch(`{{ url('/penilai/save-status-lpj') }}`, {
|
fetch(`{{ url('/penilai/save-status-lpj') }}`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -551,7 +545,6 @@
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
permohonan_id: permohonanId,
|
permohonan_id: permohonanId,
|
||||||
document_id: documentId,
|
document_id: documentId,
|
||||||
inspeksi_id: inspeksiId,
|
|
||||||
type: type,
|
type: type,
|
||||||
}),
|
}),
|
||||||
}).then(response => response.json())
|
}).then(response => response.json())
|
||||||
@@ -559,17 +552,17 @@
|
|||||||
if (data.success) {
|
if (data.success) {
|
||||||
if (type === 'standar') {
|
if (type === 'standar') {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.standar', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.standar', $permohonan->id) }}?documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||||
} else if (type === 'sederhana') {
|
} else if (type === 'sederhana') {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function uploadKertasKerja(permohonanId, documentId, inspeksiId, jaminanId) {
|
function uploadKertasKerja(permohonanId, documentId, jaminanId) {
|
||||||
const kertasKerjaInput = document.getElementById('kertas_kerja');
|
const kertasKerjaInput = document.getElementById('kertas_kerja');
|
||||||
if (!kertasKerjaInput.files.length) {
|
if (!kertasKerjaInput.files.length) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@@ -585,7 +578,6 @@
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('permohonan_id', permohonanId);
|
formData.append('permohonan_id', permohonanId);
|
||||||
formData.append('document_id', documentId);
|
formData.append('document_id', documentId);
|
||||||
formData.append('inspeksi_id', inspeksiId);
|
|
||||||
formData.append('jenis_jaminan_id', jaminanId);
|
formData.append('jenis_jaminan_id', jaminanId);
|
||||||
formData.append('kertas_kerja', kertasKerja);
|
formData.append('kertas_kerja', kertasKerja);
|
||||||
|
|
||||||
@@ -629,26 +621,26 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function resume(permohonanId, documentId, inspeksiId, jaminanId) {
|
function resume(permohonanId, documentId, jaminanId) {
|
||||||
showLoadingSwal('Tunggu ...');
|
showLoadingSwal('Tunggu ...');
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.resume') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.resume') }}?permohonanId=${permohonanId}&documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function memo(permohonanId, documentId, inspeksiId, jaminanId) {
|
function memo(permohonanId, documentId, jaminanId) {
|
||||||
showLoadingSwal('Tunggu ...');
|
showLoadingSwal('Tunggu ...');
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.memo') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.memo') }}?permohonanId=${permohonanId}&documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function rap(permohonanId, documentId, inspeksiId, jaminanId) {
|
function rap(permohonanId, documentId, jaminanId) {
|
||||||
showLoadingSwal('Tunggu ...');
|
showLoadingSwal('Tunggu ...');
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.rap') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.rap') }}?permohonanId=${permohonanId}&documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function paparan(permohonanId, documentId, inspeksiId, jaminanId) {
|
function paparan(permohonanId, documentId, jaminanId) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Apakah Kamu yakin ingin melakukan paparan',
|
title: 'Apakah Kamu yakin ingin melakukan paparan',
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
@@ -659,15 +651,15 @@
|
|||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`/penilai/${permohonanId}/edit?document_id=${documentId}&inspeksi_id=${inspeksiId}&jaminanId=${jaminanId}`;
|
`/penilai/${permohonanId}/edit?document_id=${documentId}&jaminanId=${jaminanId}`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function callReport(permohonanId, documentId, inspeksiId, jaminanId) {
|
function callReport(permohonanId, documentId, jaminanId) {
|
||||||
showLoadingSwal('Tunggu ...');
|
showLoadingSwal('Tunggu ...');
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.call-report') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.call-report') }}?permohonanId=${permohonanId}&documentId=${documentId}&jaminanId=${jaminanId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,12 +58,6 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@php
|
|
||||||
$inspeksiId = null;
|
|
||||||
foreach ($dokumen->inspeksi as $item) {
|
|
||||||
$inspeksiId = $item->id;
|
|
||||||
}
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -153,13 +147,11 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex gap-2.5">
|
<div class="flex gap-2.5">
|
||||||
@php
|
@php
|
||||||
$inspeksiId = null;
|
|
||||||
$documentId = null;
|
$documentId = null;
|
||||||
$jenisJaminanId = null;
|
$jenisJaminanId = null;
|
||||||
foreach ($permohonan->documents as $item) {
|
foreach ($permohonan->documents as $item) {
|
||||||
foreach ($item->inspeksi as $key => $value) {
|
|
||||||
$inspeksiId = $value->id;
|
|
||||||
}
|
|
||||||
$documentId = $item->id;
|
$documentId = $item->id;
|
||||||
$jenisJaminanId = $item->jenis_jaminan_id;
|
$jenisJaminanId = $item->jenis_jaminan_id;
|
||||||
}
|
}
|
||||||
@@ -167,7 +159,7 @@
|
|||||||
|
|
||||||
@if ($dataHeader == 'pelaporan')
|
@if ($dataHeader == 'pelaporan')
|
||||||
<a class="btn btn-success"
|
<a class="btn btn-success"
|
||||||
href="{{ route('otorisator.view-laporan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
href="{{ route('otorisator.view-laporan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
||||||
Lihat Laporan
|
Lihat Laporan
|
||||||
</a>
|
</a>
|
||||||
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer']) && $permohonan->approval_so == null)
|
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer']) && $permohonan->approval_so == null)
|
||||||
@@ -211,7 +203,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<a class="btn btn-success"
|
<a class="btn btn-success"
|
||||||
href="{{ route('otorisator.view-laporan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
href="{{ route('otorisator.view-laporan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
||||||
Lihat resume
|
Lihat resume
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user