fix(penilai/surveyor): perbaikkan call report, button camera, dan inspeksi berdasarkan dokument
This commit is contained in:
@@ -280,7 +280,7 @@ class PenilaiController extends Controller
|
|||||||
// Menyimpan atau memperbarui data Penilai
|
// Menyimpan atau memperbarui data Penilai
|
||||||
$penilai = Penilai::updateOrCreate(
|
$penilai = Penilai::updateOrCreate(
|
||||||
[
|
[
|
||||||
'permohonan_id' => $request->permohonanId,
|
'permohonan_id' => $request->permohonan_id,
|
||||||
'dokument_id' => $request->documentId,
|
'dokument_id' => $request->documentId,
|
||||||
'inspeksi_id' => $request->inspeksiId,
|
'inspeksi_id' => $request->inspeksiId,
|
||||||
]
|
]
|
||||||
@@ -436,11 +436,8 @@ class PenilaiController extends Controller
|
|||||||
if ($call && isset($call->call_report)) {
|
if ($call && isset($call->call_report)) {
|
||||||
$callReport = json_decode($call->call_report, true);
|
$callReport = json_decode($call->call_report, true);
|
||||||
}
|
}
|
||||||
$forminspeksi = null;
|
|
||||||
if ($forminspeksi) {
|
|
||||||
|
|
||||||
$forminspeksi = json_decode($inspeksi->data_form, true);
|
$forminspeksi = json_decode($inspeksi->data_form, true);
|
||||||
}
|
|
||||||
// Default: gunakan data dari debitur
|
// Default: gunakan data dari debitur
|
||||||
$debitur = Debiture::find($permohonan->debiture_id);
|
$debitur = Debiture::find($permohonan->debiture_id);
|
||||||
|
|
||||||
@@ -461,6 +458,7 @@ class PenilaiController extends Controller
|
|||||||
$villages = Village::where('district_code', $districtCode)->get();
|
$villages = Village::where('district_code', $districtCode)->get();
|
||||||
|
|
||||||
if ($forminspeksi) {
|
if ($forminspeksi) {
|
||||||
|
|
||||||
if (isset($forminspeksi['alamat']['sesuai']['province_code'])) {
|
if (isset($forminspeksi['alamat']['sesuai']['province_code'])) {
|
||||||
$cities = City::where('province_code', $forminspeksi['alamat']['sesuai']['province_code'])->get();
|
$cities = City::where('province_code', $forminspeksi['alamat']['sesuai']['province_code'])->get();
|
||||||
}
|
}
|
||||||
@@ -474,7 +472,6 @@ class PenilaiController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return view('lpj::penilai.components.call-report', compact('permohonan', 'basicData', 'nomorLaporan', 'forminspeksi', 'cities', 'districts', 'villages', 'cekAlamat', 'callReport'));
|
return view('lpj::penilai.components.call-report', compact('permohonan', 'basicData', 'nomorLaporan', 'forminspeksi', 'cities', 'districts', 'villages', 'cekAlamat', 'callReport'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -752,7 +749,8 @@ class PenilaiController extends Controller
|
|||||||
!empty($item->memo) ||
|
!empty($item->memo) ||
|
||||||
!empty($item->resume) ||
|
!empty($item->resume) ||
|
||||||
!empty($item->lpj) ||
|
!empty($item->lpj) ||
|
||||||
!empty($item->rap)
|
!empty($item->rap) ||
|
||||||
|
!empty($item->call_report)
|
||||||
) && !empty($item->kertas_kerja);
|
) && !empty($item->kertas_kerja);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1053,10 +1051,14 @@ class PenilaiController extends Controller
|
|||||||
'permohonan_id' => 'required|exists:permohonan,id',
|
'permohonan_id' => 'required|exists:permohonan,id',
|
||||||
'dokument_id' => 'required',
|
'dokument_id' => 'required',
|
||||||
'inspeksi_id' => 'required',
|
'inspeksi_id' => 'required',
|
||||||
'data' => 'required'
|
'data' => 'required',
|
||||||
|
'fakta_positif' => 'nullable|array',
|
||||||
|
'fakta_negatif' => 'nullable|array',
|
||||||
|
'type' => 'required',
|
||||||
|
'action' => 'required',
|
||||||
|
'keterangan' => 'nullable|array'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$data = $request->input('data');
|
|
||||||
|
|
||||||
Penilai::updateOrCreate(
|
Penilai::updateOrCreate(
|
||||||
[
|
[
|
||||||
@@ -1068,11 +1070,51 @@ class PenilaiController extends Controller
|
|||||||
'call_report' => json_encode($validated['data']),
|
'call_report' => json_encode($validated['data']),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$inspeksi = Inspeksi::where('permohonan_id', $validated['permohonan_id'])
|
||||||
|
->where('dokument_id', $validated['dokument_id'])
|
||||||
|
->first();
|
||||||
|
if ($inspeksi) {
|
||||||
|
// Get existing data_form
|
||||||
|
$existingData = json_decode($inspeksi->data_form, true) ?: [];
|
||||||
|
|
||||||
|
// Structure the fakta data correctly
|
||||||
|
$existingFaktaData = $existingData['fakta'] ?? [];
|
||||||
|
|
||||||
|
// Gabungkan data baru dengan data yang sudah ada
|
||||||
|
$updatedFaktaData = array_merge($existingFaktaData, [
|
||||||
|
'fakta_positif' => $validated['fakta_positif'] ?? $existingFaktaData['fakta_positif'] ?? null,
|
||||||
|
'fakta_negatif' => $validated['fakta_negatif'] ?? $existingFaktaData['fakta_negatif'] ?? null,
|
||||||
|
'keterangan' => $validated['keterangan'] ?? $existingFaktaData['keterangan'] ?? null,
|
||||||
|
]);
|
||||||
|
$existingData['fakta'] = $updatedFaktaData;
|
||||||
|
|
||||||
|
$inspeksi->update([
|
||||||
|
'data_form' => json_encode($existingData),
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
// If inspeksi
|
||||||
|
$newData = [
|
||||||
|
'fakta' => [
|
||||||
|
'fakta_positif' => $validated['fakta_positif'] ?? null,
|
||||||
|
'fakta_negatif' => $validated['fakta_negatif'] ?? null,
|
||||||
|
'keterangan' => $validated['keterangan'] ?? null,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Inspeksi::create([
|
||||||
|
'permohonan_id' => $validated['permohonan_id'],
|
||||||
|
'dokument_id' => $validated['dokument_id'],
|
||||||
|
'data_form' => json_encode($newData),
|
||||||
|
'name' => $validated['type']
|
||||||
|
]);
|
||||||
|
}
|
||||||
// DB::commit();
|
// DB::commit();
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Berhasil menyimpan data',
|
'message' => 'Berhasil menyimpan data',
|
||||||
'data' => $data
|
|
||||||
], 200);
|
], 200);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
// DB::rollBack();
|
// DB::rollBack();
|
||||||
|
|||||||
@@ -825,7 +825,8 @@ class PenilaianController extends Controller
|
|||||||
'standard' => 'penilai.components.lpj-sederhana-standard',
|
'standard' => 'penilai.components.lpj-sederhana-standard',
|
||||||
'resume' => 'penilai.components.resume',
|
'resume' => 'penilai.components.resume',
|
||||||
'memo' => 'penilai.components.memo',
|
'memo' => 'penilai.components.memo',
|
||||||
'rap' => 'penilai.components.rap-penilai'
|
'rap' => 'penilai.components.rap-penilai',
|
||||||
|
'call-report' => 'penilai.components.call-report',
|
||||||
];
|
];
|
||||||
return $viewMap[$tipe] ?? '';
|
return $viewMap[$tipe] ?? '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1675,6 +1675,10 @@ class SurveyorController extends Controller
|
|||||||
'basicData',
|
'basicData',
|
||||||
'cekAlamat'
|
'cekAlamat'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// return response()->json([
|
||||||
|
// 'daya'=> $permohonan
|
||||||
|
// ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2650,16 +2654,17 @@ class SurveyorController extends Controller
|
|||||||
foreach ($fotoTypes as $fotoType) {
|
foreach ($fotoTypes as $fotoType) {
|
||||||
// Jika ada file baru diupload
|
// Jika ada file baru diupload
|
||||||
if ($request->hasFile($fotoType)) {
|
if ($request->hasFile($fotoType)) {
|
||||||
$factData[$fotoType] = $this->updateOrDeleteFile($dataForm, $request, $fotoType);
|
$factData[$fotoType] = $this->updateOrDeleteFile($dataForm, $request, $fotoType) ?: null;
|
||||||
} else {
|
} else {
|
||||||
$factData[$fotoType] = $dataForm[$fotoType] ?? null;
|
$factData[$fotoType] = $dataForm[$fotoType] ?? null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach ($fotoTypes as $fotoType) {
|
foreach ($fotoTypes as $fotoType) {
|
||||||
$factData[$fotoType] = $this->updateOrDeleteFile($data, $request, $fotoType);
|
$factData[$fotoType] = $this->updateOrDeleteFile($data, $request, $fotoType) ?: null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $factData;
|
return $factData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,20 +39,57 @@
|
|||||||
@endphp
|
@endphp
|
||||||
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
|
@foreach ($permohonan->documents as $dokumen)
|
||||||
|
@if ($dokumen->jenisJaminan)
|
||||||
|
@php
|
||||||
|
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
||||||
|
$jenisAset = $dokumen->jenisJaminan->name;
|
||||||
|
@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) }}">
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi ?? '' }}">
|
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi ?? '' }}">
|
||||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id ?? '' }}">
|
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id ?? '' }}">
|
||||||
<input type="hidden" name="dokument_id" value="{{ request('documentId') }}">
|
<input type="hidden" name="dokument_id" value="{{ request('documentId') }}">
|
||||||
<input type="hidden" name="action" value="callReport">
|
|
||||||
<input type="hidden" name="type" value="callReport">
|
|
||||||
@include('lpj::assetsku.includenya')
|
@include('lpj::assetsku.includenya')
|
||||||
{{-- @include('lpj::surveyor.components.header')
|
{{-- @include('lpj::surveyor.components.header')
|
||||||
@include('lpj::surveyor.components.callReport') --}}
|
@include('lpj::surveyor.components.callReport') --}}
|
||||||
|
@php
|
||||||
|
$paparan = $permohonan->status === 'proses-paparan' ? 'Paparan' : 'Pelaporan';
|
||||||
|
@endphp
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-agi-50">
|
<div class="card-header bg-agi-50">
|
||||||
<h3 class="card-title uppercase">
|
<h3 class="card-title uppercase">
|
||||||
CALL Report
|
CALL Report
|
||||||
</h3>
|
</h3>
|
||||||
|
@php
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
@endphp
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
|
||||||
|
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer', 'EO Appraisal', 'DD Appraisal']) &&
|
||||||
|
Route::currentRouteName('otorisator.show'))
|
||||||
|
<a href="{{ route('otorisator.show', ['id' => $permohonan->id, 'type' => $paparan]) }}"
|
||||||
|
class="btn btn-xs btn-info">
|
||||||
|
<i class="ki-filled ki-exit-left"></i> Back
|
||||||
|
</a>
|
||||||
|
@elseif (Auth::user()->hasAnyRole(['administrator', 'surveyor']) && Route::currentRouteName('penilai.show'))
|
||||||
|
<a href="{{ route('penilai.show', $permohonan->id) }}" class="btn btn-xs btn-info">
|
||||||
|
<i class="ki-filled ki-exit-left"></i> Back
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body grid gap-5">
|
<div class="card-body grid gap-5">
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
@@ -332,10 +369,10 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Faktor Positif</label>
|
<label class="form-label max-w-56">Faktor Positif</label>
|
||||||
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
||||||
@if (!empty($callReport['fakta']['fakta_positif']))
|
@if (!empty($forminspeksi['fakta']['fakta_positif']))
|
||||||
@foreach ($callReport['fakta']['fakta_positif'] as $index => $positif)
|
@foreach ($forminspeksi['fakta']['fakta_positif'] as $index => $positif)
|
||||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
<textarea class="textarea mt-2" name="fakta_positif[]" rows="10">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
style="display: none;">
|
style="display: none;">
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
@@ -344,9 +381,8 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old('fakta_positif.0', '') }}</textarea>
|
<textarea class="textarea mt-2" name="fakta_positif[]" rows="10">{{ old('fakta_positif.0', '') }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||||
style="display: none;">
|
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -361,10 +397,10 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Faktor Negatif</label>
|
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||||
@if (!empty($callReport['fakta']['fakta_negatif']))
|
@if (!empty($forminspeksi['fakta']['fakta_negatif']))
|
||||||
@foreach ($callReport['fakta']['fakta_negatif'] as $index => $negatif)
|
@foreach ($forminspeksi['fakta']['fakta_negatif'] as $index => $negatif)
|
||||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old("fakta_negatif.$index", $negatif) }}</textarea>
|
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="10">{{ old("fakta_negatif.$index", $negatif) }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
style="display: none;">
|
style="display: none;">
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
@@ -373,9 +409,8 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $callReport['fakta']['fakta_negatif'][0] ?? '') }}</textarea>
|
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="10">{{ old('fakta_negatif.0', $forminspeksi['fakta']['fakta_negatif'][0] ?? '') }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||||
style="display: none;">
|
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||||
@@ -387,6 +422,42 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 " style="margin-top: 20px ">
|
||||||
|
|
||||||
|
<label class="form-label lg:form-label max-w-56 ">Catatan yang Perlu Diperhatikan
|
||||||
|
</label>
|
||||||
|
<div class="w-full">
|
||||||
|
<div id="keterangan-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
|
||||||
|
@if (!empty($forminspeksi['fakta']['keterangan']) && is_array($forminspeksi['fakta']['keterangan']))
|
||||||
|
@foreach ($forminspeksi['fakta']['keterangan'] as $index => $item)
|
||||||
|
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
|
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="10">{{ old("keterangan.$index", $item) }}</textarea>
|
||||||
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
|
style="display: none;">
|
||||||
|
<i class="ki-outline ki-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
|
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="10"></textarea>
|
||||||
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
|
style="display: none;">
|
||||||
|
<i class="ki-outline ki-trash"></i>
|
||||||
|
</button>
|
||||||
|
<em id="error-keterangan" class="alert text-danger text-sm"></em>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<button type="button" onclick="addClonableItem('keterangan-container', 'keterangan')"
|
||||||
|
class="btn btn-primary btn-sm mt-5 ">
|
||||||
|
<i class="ki-outline ki-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -402,9 +473,13 @@
|
|||||||
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') }}&inspeksiId={{ request('inspeksiId') }}&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">
|
||||||
|
<i class="ki-filled ki-printer"></i> Hasil Inspeksi
|
||||||
|
</a>
|
||||||
<a class="btn btn-primary"
|
<a class="btn btn-primary"
|
||||||
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
|
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
|
||||||
<i class="ki-filled ki-printer"></i> Print
|
<i class="ki-filled ki-printer"></i> Print Laporan
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -413,7 +488,7 @@
|
|||||||
@endsection
|
@endsection
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const callReports = @json($callReport);
|
const callReports = @json($forminspeksi);
|
||||||
console.log('callReport', callReports)
|
console.log('callReport', callReports)
|
||||||
|
|
||||||
|
|
||||||
@@ -427,29 +502,11 @@
|
|||||||
pihak_kjjpp: "",
|
pihak_kjjpp: "",
|
||||||
dari: "",
|
dari: "",
|
||||||
lelang: "",
|
lelang: "",
|
||||||
fakta: {
|
|
||||||
fakta_positif: [],
|
|
||||||
fakta_negatif: []
|
|
||||||
},
|
|
||||||
nilai_pasar: "",
|
nilai_pasar: "",
|
||||||
persentase_likuidasi: "",
|
persentase_likuidasi: "",
|
||||||
hasil_nilai_likuidasi: ""
|
hasil_nilai_likuidasi: ""
|
||||||
};
|
};
|
||||||
|
|
||||||
// Ambil fakta positif
|
|
||||||
document.querySelectorAll('textarea[name="fakta_positif[]"]').forEach(textarea => {
|
|
||||||
if (textarea.value.trim() !== "") {
|
|
||||||
jsonData.fakta.fakta_positif.push(textarea.value.trim());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Ambil fakta negatif
|
|
||||||
document.querySelectorAll('textarea[name="fakta_negatif[]"]').forEach(textarea => {
|
|
||||||
if (textarea.value.trim() !== "") {
|
|
||||||
jsonData.fakta.fakta_negatif.push(textarea.value.trim());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
jsonData.perihal = document.querySelector('input[name="perihal"]')?.value.trim() || "";
|
jsonData.perihal = document.querySelector('input[name="perihal"]')?.value.trim() || "";
|
||||||
jsonData.dari = document.querySelector('input[name="dari"]')?.value.trim() || "";
|
jsonData.dari = document.querySelector('input[name="dari"]')?.value.trim() || "";
|
||||||
@@ -474,6 +531,24 @@
|
|||||||
const permohonanId = {{ $permohonan->id }};
|
const permohonanId = {{ $permohonan->id }};
|
||||||
const documentId = urlParams.get('documentId');
|
const documentId = urlParams.get('documentId');
|
||||||
const inspeksiId = urlParams.get('inspeksiId');
|
const inspeksiId = urlParams.get('inspeksiId');
|
||||||
|
|
||||||
|
const faktaPositif = Array.from(document.querySelectorAll('[name="fakta_positif[]"]'))
|
||||||
|
.map(textarea => textarea.value.trim())
|
||||||
|
.filter(value => value !== '');
|
||||||
|
|
||||||
|
const faktaNegatif = Array.from(document.querySelectorAll('[name="fakta_negatif[]"]'))
|
||||||
|
.map(textarea => textarea.value.trim())
|
||||||
|
.filter(value => value !== '');
|
||||||
|
const keterangan = Array.from(document.querySelectorAll('[name="keterangan[]"]'))
|
||||||
|
.map(textarea => textarea.value.trim())
|
||||||
|
.filter(value => value !== '');
|
||||||
|
|
||||||
|
const action = Array.from(document.querySelectorAll('input[name="action"]'))
|
||||||
|
.map(input => input.value)
|
||||||
|
.join(',') || "";
|
||||||
|
const type = Array.from(document.querySelectorAll('input[name="type"]'))
|
||||||
|
.map(input => input.value)
|
||||||
|
.join(',') || "";
|
||||||
const requestUrl =
|
const requestUrl =
|
||||||
`{{ route('penilai.storeCallReport') }}?permohonan_id=${permohonanId}&inspeksi_id=${inspeksiId}&dokument_id=${documentId}`;
|
`{{ route('penilai.storeCallReport') }}?permohonan_id=${permohonanId}&inspeksi_id=${inspeksiId}&dokument_id=${documentId}`;
|
||||||
|
|
||||||
@@ -487,6 +562,11 @@
|
|||||||
dokument_id: documentId,
|
dokument_id: documentId,
|
||||||
inspeksi_id: inspeksiId,
|
inspeksi_id: inspeksiId,
|
||||||
data: jsonData,
|
data: jsonData,
|
||||||
|
fakta_positif: faktaPositif,
|
||||||
|
fakta_negatif: faktaNegatif,
|
||||||
|
action: action,
|
||||||
|
type: type,
|
||||||
|
keterangan: keterangan
|
||||||
}),
|
}),
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -225,52 +225,52 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@isset($report['fakta']['fakta_positif'])
|
|
||||||
<table style="margin: 5px 0; border-collapse: collapse; width: 100%;">
|
<table style="margin: 5px 0; border-collapse: collapse; width: 100%;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="">
|
<td style="">
|
||||||
<h6 style="text-transform: uppercase; margin: 0; ">Faktor positif</h2>
|
<h6 style="text-transform: uppercase; margin: 0; ">Faktor Positif</h2>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@foreach ($report['fakta']['fakta_positif'] as $key => $item)
|
@isset($forminspeksi['fakta']['fakta_positif'])
|
||||||
|
@foreach ($forminspeksi['fakta']['fakta_positif'] as $key => $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item }}</td>
|
<td>{!! nl2br(e($item)) !!}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
@endisset
|
@endisset
|
||||||
@isset($report['fakta']['fakta_negatif'])
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table style="margin: 5px 0; border-collapse: collapse; width: 100%;">
|
||||||
|
<tr>
|
||||||
|
<td style="">
|
||||||
|
<h6 style="text-transform: uppercase; margin: 0; ">Faktor negatif</h2>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
@isset($forminspeksi['fakta']['fakta_negatif'])
|
||||||
|
@foreach ($forminspeksi['fakta']['fakta_negatif'] as $key => $item)
|
||||||
|
<tr>
|
||||||
|
<td>{!! nl2br(e($item)) !!}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
@endisset
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<table style="margin: 5px 0; border-collapse: collapse; width: 100%;">
|
<table style="margin: 5px 0; border-collapse: collapse; width: 100%;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="">
|
<td style="">
|
||||||
<h6 style="text-transform: uppercase; margin: 0; ">Faktor negatif</h2>
|
<h6 style="text-transform: uppercase; margin: 0; ">Catatan Yang Perlu Diperhatikan</h6>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@foreach ($report['fakta']['fakta_negatif'] as $key => $item)
|
@isset($forminspeksi['fakta']['keterangan'])
|
||||||
|
@foreach ($forminspeksi['fakta']['keterangan'] as $key => $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item }}</td>
|
<td>{!! nl2br(e($item)) !!}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
@endisset
|
@endisset
|
||||||
<table style="margin: 5px 0; border-collapse: collapse; width: 100%;">
|
|
||||||
<tr>
|
|
||||||
<td style="">
|
|
||||||
<h6 style="text-transform: uppercase; margin: 0; ">3. Catatan Yang Perlu Diperhatikan</h6>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
@isset($report['kesimpulan_saran'])
|
|
||||||
@foreach ($report['kesimpulan_saran'] as $key => $item)
|
|
||||||
<tr>
|
|
||||||
<td> {{ $item }}</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
@endisset
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi }}">
|
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi }}">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@foreach ($permohonan->documents as $dokumen)
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
@if ($dokumen->jenisJaminan)
|
@if ($dokumen->jenisJaminan)
|
||||||
@php
|
@php
|
||||||
$dokumentName = $dokumen->jenisJaminan->name;
|
$dokumentName = $dokumen->jenisJaminan->name;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
@include('lpj::surveyor.components.header')
|
@include('lpj::surveyor.components.header')
|
||||||
@include('lpj::surveyor.components.rap')
|
@include('lpj::surveyor.components.rap')
|
||||||
@else
|
@else
|
||||||
@foreach ($permohonan->documents as $dokumen)
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
@if ($dokumen->jenisJaminan)
|
@if ($dokumen->jenisJaminan)
|
||||||
@php
|
@php
|
||||||
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ video, canvas {
|
|||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="modal-title">Ambil Foto</h3>
|
<h3 class="modal-title">Ambil Foto</h3>
|
||||||
<button class="btn btn-xs btn-icon btn-light" data-modal-dismiss="true" id="closeModal">
|
<button type="button" class="btn btn-xs btn-icon btn-light" data-modal-dismiss="true" id="closeModal">
|
||||||
<i class="ki-outline ki-cross"></i>
|
<i class="ki-outline ki-cross"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user