perbaikan print out call report
This commit is contained in:
@@ -63,7 +63,7 @@ class PenilaiController extends Controller
|
|||||||
$forminspeksi = json_decode($inpeksi->data_form, true);
|
$forminspeksi = json_decode($inpeksi->data_form, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('lpj::penilai.lampiran', compact('permohonan', 'formFoto', 'forminspeksi','basicData', 'penilai'));
|
return view('lpj::penilai.lampiran', compact('permohonan', 'formFoto', 'forminspeksi', 'basicData', 'penilai'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
@@ -406,7 +406,7 @@ class PenilaiController extends Controller
|
|||||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||||
$nomorLaporan = $this->generateNoLaporan($permohonan, $documentId, 'call-report');
|
$nomorLaporan = $this->generateNoLaporan($permohonan, $documentId, 'call-report');
|
||||||
$basicData = $this->surveyorController->getCommonData();
|
$basicData = $this->surveyorController->getCommonData();
|
||||||
// $inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||||
// Penilai::updateOrCreate(
|
// Penilai::updateOrCreate(
|
||||||
// [
|
// [
|
||||||
// 'permohonan_id' => $permohonanId,
|
// 'permohonan_id' => $permohonanId,
|
||||||
@@ -424,46 +424,46 @@ class PenilaiController extends Controller
|
|||||||
// $rap = null;
|
// $rap = null;
|
||||||
// $forminspeksi = null;
|
// $forminspeksi = null;
|
||||||
// if ($resume) {
|
// if ($resume) {
|
||||||
// $forminspeksi = json_decode($inspeksi->data_form, true);
|
$forminspeksi = json_decode($inspeksi->data_form, true);
|
||||||
// $rap = json_decode($resume->rap, true);
|
// $rap = json_decode($resume->rap, true);
|
||||||
// }
|
// }
|
||||||
// Default: gunakan data dari debitur
|
// Default: gunakan data dari debitur
|
||||||
// $debitur = Debiture::find($permohonan->debiture_id);
|
$debitur = Debiture::find($permohonan->debiture_id);
|
||||||
|
|
||||||
// $provinceCode = $debitur->province_code;
|
$provinceCode = $debitur->province_code;
|
||||||
// $cityCode = $debitur->city_code;
|
$cityCode = $debitur->city_code;
|
||||||
// $districtCode = $debitur->district_code;
|
$districtCode = $debitur->district_code;
|
||||||
|
|
||||||
// $cekAlamat = $forminspeksi['asset']['alamat']['tidak sesuai'] ?? null;
|
$cekAlamat = $forminspeksi['asset']['alamat']['tidak sesuai'] ?? null;
|
||||||
|
|
||||||
// if ($cekAlamat) {
|
if ($cekAlamat) {
|
||||||
// $provinceCode = $cekAlamat['province_code'] ?? $provinceCode;
|
$provinceCode = $cekAlamat['province_code'] ?? $provinceCode;
|
||||||
// $cityCode = $cekAlamat['city_code'] ?? $cityCode;
|
$cityCode = $cekAlamat['city_code'] ?? $cityCode;
|
||||||
// $districtCode = $cekAlamat['district_code'] ?? $districtCode;
|
$districtCode = $cekAlamat['district_code'] ?? $districtCode;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// $cities = City::where('province_code', $provinceCode)->get();
|
$cities = City::where('province_code', $provinceCode)->get();
|
||||||
// $districts = District::where('city_code', $cityCode)->get();
|
$districts = District::where('city_code', $cityCode)->get();
|
||||||
// $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();
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (isset($forminspeksi['alamat']['sesuai']['city_code'])) {
|
if (isset($forminspeksi['alamat']['sesuai']['city_code'])) {
|
||||||
// $districts = District::where('city_code', $forminspeksi['alamat']['sesuai']['city_code'])->get();
|
$districts = District::where('city_code', $forminspeksi['alamat']['sesuai']['city_code'])->get();
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (isset($forminspeksi['alamat']['sesuai']['district_code'])) {
|
if (isset($forminspeksi['alamat']['sesuai']['district_code'])) {
|
||||||
// $villages = Village::where('district_code', $forminspeksi['alamat']['sesuai']['district_code'])->get();
|
$villages = Village::where('district_code', $forminspeksi['alamat']['sesuai']['district_code'])->get();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// return view('lpj::penilai.components.call-report', compact('permohonan', 'rap', 'provinces', 'cities',
|
// return view('lpj::penilai.components.call-report', compact('permohonan', 'rap', 'provinces', 'cities',
|
||||||
// 'districts',
|
// 'districts',
|
||||||
// 'villages','forminspeksi', 'noLpRAP', 'basicData','cekAlamat'));
|
// 'villages','forminspeksi', 'noLpRAP', 'basicData','cekAlamat'));
|
||||||
return view('lpj::penilai.components.call-report', compact('permohonan','basicData', 'nomorLaporan'));
|
return view('lpj::penilai.components.call-report', compact('permohonan', 'basicData', 'nomorLaporan', 'forminspeksi', 'cities', 'districts', 'villages', 'cekAlamat'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -988,6 +988,47 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function storeCallReport(Request $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$validated = $request->validate([
|
||||||
|
'permohonan_id' => 'required|exists:permohonan,id',
|
||||||
|
'dokument_id' => 'required|exists:dokument,id',
|
||||||
|
'inspeksi_id' => 'required|exists:inspeksi,id',
|
||||||
|
'data' => 'required'
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::beginTransaction();
|
||||||
|
$data = $request->input('data');
|
||||||
|
|
||||||
|
Penilai::updateOrCreate(
|
||||||
|
[
|
||||||
|
'permohonan_id' => $request->permohonanId,
|
||||||
|
'dokument_id' => $request->documentId,
|
||||||
|
'inspeksi_id' => $request->inspeksiId,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'call-report' => json_encode($data),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
DB::commit();
|
||||||
|
return response()->json([
|
||||||
|
'success' => true,
|
||||||
|
'message' => 'Berhasil menyimpan data',
|
||||||
|
'data' => $result
|
||||||
|
], 200);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
DB::rollBack();
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => 'Terjadi kesalahan saat menyimpan data',
|
||||||
|
'error' => $e->getMessage(),
|
||||||
|
'trace' => $e->getTraceAsString()
|
||||||
|
], 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function print_out(Request $request)
|
public function print_out(Request $request)
|
||||||
@@ -1044,7 +1085,7 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
if ($statusLpj) {
|
if ($statusLpj) {
|
||||||
// $pdf = view('lpj::' . $viewLaporan, compact(
|
// $pdf = view('lpj::' . $viewLaporan, compact(
|
||||||
$pdf = PDF::loadView('lpj::' . $viewLaporan, compact(
|
$pdf = PDF::loadView('lpj::' . $viewLaporan, compact(
|
||||||
'permohonan',
|
'permohonan',
|
||||||
'forminspeksi',
|
'forminspeksi',
|
||||||
'lpjData',
|
'lpjData',
|
||||||
@@ -1454,4 +1495,5 @@ class PenilaiController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -814,11 +814,17 @@ class SurveyorController extends Controller
|
|||||||
|
|
||||||
// If validation passes, update permohonan status
|
// If validation passes, update permohonan status
|
||||||
$permohonan = Permohonan::findOrFail($id);
|
$permohonan = Permohonan::findOrFail($id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$permohonan->update([
|
$permohonan->update([
|
||||||
'status' => 'survey-completed',
|
'status' => 'survey-completed',
|
||||||
'submitted_at' => now()
|
'submitted_at' => now()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Form surveyor berhasil disubmit'
|
'message' => 'Form surveyor berhasil disubmit'
|
||||||
@@ -2200,6 +2206,7 @@ class SurveyorController extends Controller
|
|||||||
'branch',
|
'branch',
|
||||||
'tujuanPenilaian',
|
'tujuanPenilaian',
|
||||||
'penilaian',
|
'penilaian',
|
||||||
|
'penawaran',
|
||||||
'debiture.documents' => function ($query) use ($dokumentId, $jaminanId) {
|
'debiture.documents' => function ($query) use ($dokumentId, $jaminanId) {
|
||||||
$query->where('id', $dokumentId)
|
$query->where('id', $dokumentId)
|
||||||
->where('jenis_jaminan_id', $jaminanId);
|
->where('jenis_jaminan_id', $jaminanId);
|
||||||
|
|||||||
@@ -9,11 +9,13 @@
|
|||||||
@php
|
@php
|
||||||
$senior_officer = null;
|
$senior_officer = null;
|
||||||
$jenisJaminan = null;
|
$jenisJaminan = null;
|
||||||
|
$tanggalPenilaian = null;
|
||||||
if ($permohonan->debiture && $permohonan->documents) {
|
if ($permohonan->debiture && $permohonan->documents) {
|
||||||
foreach ($permohonan->documents as $dokumen) {
|
foreach ($permohonan->documents as $dokumen) {
|
||||||
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
||||||
$teams = $permohonan->region->teams;
|
$teams = $permohonan->region->teams;
|
||||||
|
|
||||||
|
$tanggalPenilaian = $permohonan->penilaian->waktu_penilaian;
|
||||||
$jenisJaminan = $dokumen->jenisJaminan->name;
|
$jenisJaminan = $dokumen->jenisJaminan->name;
|
||||||
if ($teams) {
|
if ($teams) {
|
||||||
foreach ($teams as $team) {
|
foreach ($teams as $team) {
|
||||||
@@ -57,21 +59,21 @@
|
|||||||
<label class="form-label max-w-56">Kepada</label>
|
<label class="form-label max-w-56">Kepada</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
|
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
|
||||||
value=" {{ $callReport['kepada'] ?? '' }}">
|
value="{{ $callReport['kepada'] ?? old('kepada') }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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">Dari</label>
|
<label class="form-label max-w-56">Dari</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
|
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
|
||||||
value="{{ $callReport['dari'] ?? $permohonan->branch->name ?? "" }}">
|
value="{{ $callReport['dari'] ?? ($permohonan->branch->name ?? old('dari')) }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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">Nomor Laporan</label>
|
<label class="form-label max-w-56">Nomor Laporan</label>
|
||||||
<div class="flex flex-wrap items-base line w-full">
|
<div class="flex flex-wrap items-base line w-full">
|
||||||
<input type="text" name="nomor_rap" class="input w-full" placeholder="Masukkan..."
|
<input type="text" name="nomor_rap" class="input w-full cursor-not-allowed"
|
||||||
value="{{ $nomorLaporan ?? '' }}" @readonly(true)>
|
placeholder="Masukkan..." value="{{ $nomorLaporan ?? '' }}" @readonly(true)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{-- 250109828129/ --}}
|
{{-- 250109828129/ --}}
|
||||||
@@ -106,34 +108,36 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="grid gap-5 w-full">
|
<div class="grid gap-5 w-full">
|
||||||
|
|
||||||
<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">
|
||||||
<div class="grid gap-2.5 w-full">
|
<div class="grid gap-2.5 w-full">
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="nama_debiture" class="form-label max-w-56">Nama Debitur</label>
|
<label for="nama_debiture" class="form-label max-w-56">Nama Debitur</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" id="nama_debiture" name="nama_debiture" class="input w-full"
|
<input type="text" id="nama_debiture" name="nama_debiture"
|
||||||
placeholder="Nama Debiture"
|
class="input w-full cursor-not-allowed" placeholder="Nama Debiture"
|
||||||
value="{{ $permohonan->debiture->name ?? old('nama_debiture') }}" @readonly(true)>
|
value="{{ $permohonan->debiture->name ?? old('nama_debiture') }}"
|
||||||
|
@readonly(true)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="kjjp" class="form-label max-w-56">KJPP</label>
|
<label for="kjjp" class="form-label max-w-56">KJPP</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full ">
|
||||||
<input type="text" id="kjjp" name="kjjp" class="input w-full"
|
<input type="text" id="kjjp" name="kjjp"
|
||||||
placeholder="Masukkan kjjp"
|
class="input w-full cursor-not-allowed" placeholder="Masukkan kjjp"
|
||||||
>
|
value="{{ preg_replace('/^K\\d+ - /', '', $permohonan->penawaran->nama_kjpp_sebelumnya ?? old('kjjp')) }}
|
||||||
|
"
|
||||||
|
@readonly(true)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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">Jenis Aset</label>
|
<label class="form-label max-w-56">Jenis Aset</label>
|
||||||
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" id="jenis_asset" name="jenis_asset" class="input w-full"
|
<input type="text" id="jenis_asset" name="jenis_asset"
|
||||||
placeholder="Masukkan jenis_asset" value="{{ $jenisJaminan ?? old('jenis_asset') }}"
|
class="input w-full cursor-not-allowed" placeholder="Masukkan jenis_asset"
|
||||||
@readonly(true)>
|
value="{{ $jenisJaminan ?? old('jenis_asset') }}" @readonly(true)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -141,34 +145,14 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="penilai" class="form-label max-w-56">Tanggal Penilaian </label>
|
<label for="penilai" class="form-label max-w-56">Tanggal Penilaian </label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="date" id="tanggal_penilaian" name="tanggal_penilaian" class="input w-full"
|
<input type="datetime" id="tanggal_penilaian" name="tanggal_penilaian"
|
||||||
placeholder="Masukkan Tanggal Penilai"
|
class="input w-full cursor-not-allowed" placeholder="Masukkan Tanggal Penilai"
|
||||||
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
|
value="{{ $tanggalPenilaian ?? old('penilai') }}" @readonly(true)>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
|
||||||
<label for="Lelang" class="form-label max-w-56">Lelang ke </label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<input type="text" id="lelang" name="lelang" class="input w-full"
|
|
||||||
placeholder="Masukkan Lelang"
|
|
||||||
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
|
||||||
<label for="penilai" class="form-label max-w-56">Nilai Pasar Wajar (NPW)</label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<input type="text" id="likuidasi" name="likuidasi" class="input w-full"
|
|
||||||
placeholder="Masukkan likuidasi" value="{{ old('likuidasi') }}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
|
||||||
<label for="likuidasi_nilai_1" class="form-label max-w-56">Nilai Likuidasi (NL)</label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<input type="text" id="likuidasi_nilai_1" name="likuidasi_nilai_1" class="input w-full"
|
|
||||||
placeholder="Masukkan likuidasi_nilai_1" value="">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -177,6 +161,98 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md">
|
||||||
|
<div class="card-header bg-agi-50">
|
||||||
|
<h1 class="text-md font-medium text-gray-900 uppercase">lokasi objek
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body 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="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>
|
||||||
|
|
||||||
|
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md">
|
||||||
|
<div class="card-header bg-agi-50">
|
||||||
|
<h1 class="text-md font-medium text-gray-900 uppercase">Dokument</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
@include('lpj::component.detail-jaminan', ['status' => true])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md">
|
||||||
|
<div class="card-header bg-agi-50">
|
||||||
|
<h1 class="text-md font-medium text-gray-900 uppercase">Nilai Likuidasi</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body grid gap-5 w-full">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="Lelang" class="form-label max-w-56">Lelang ke </label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="lelang" name="lelang" class="input w-full"
|
||||||
|
placeholder="Masukkan Lelang" value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="penilai" class="form-label max-w-56">Nilai Pasar Wajar (NPW)</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="nilai-pasar" name="likuidasi"
|
||||||
|
class="input w-full nilai-pasar currency-format" placeholder="Masukkan likuidasi"
|
||||||
|
value="{{ old('likuidasi') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="likuidasi_nilai_1" class="form-label max-w-56">Nilai Likuidasi(%)</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="likuidasi" name="likuidasi_nilai_1" class="input w-full likuidasi"
|
||||||
|
placeholder="Masukkan likuidasi dalam bentuk persen" onkeyup="calculateTotal(this)">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="total-likuidasi" class="form-label max-w-56">Total Nilai Likuidasi
|
||||||
|
(NL)</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="total-likuidasi" name="likuidasi_nilai_1"
|
||||||
|
class="input w-full total-likuidasi" placeholder="Masukkan likuidasi" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md ">
|
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md ">
|
||||||
<div class="card-header bg-agi-50">
|
<div class="card-header bg-agi-50">
|
||||||
@@ -192,8 +268,8 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="staf" class="form-label max-w-56">Staf Subdit Appraisal </label>
|
<label for="staf" class="form-label max-w-56">Staf Subdit Appraisal </label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" id="staf" name="staf" class="input w-full"
|
<input type="text" id="staf" name="staf"
|
||||||
placeholder="Masukkan Nama Staff"
|
class="input w-full cursor-not-allowed" placeholder="Masukkan Nama Staff"
|
||||||
value="{{ $penilai->userPenilaiTeam->name ?? '' }}" @readonly(true)>
|
value="{{ $penilai->userPenilaiTeam->name ?? '' }}" @readonly(true)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -202,16 +278,19 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="penilai" class="form-label max-w-56">Pihak KJPP</label>
|
<label for="penilai" class="form-label max-w-56">Pihak KJPP</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" id="penilai" name="pihak_kjjpp" class="input w-full"
|
<input type="text" id="penilai" name="pihak_kjjpp"
|
||||||
value="{{$forminspeksi['signature']['kjjp']['name'] ?? ''}}" @readonly(true) placeholder="Masukkan Nama KJPP">
|
class="input w-full cursor-not-allowed"
|
||||||
|
value="{{ $forminspeksi['signature']['kjjp']['name'] ?? '' }}"
|
||||||
|
@readonly(true) placeholder="Masukkan Nama KJPP">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="pihak_bag" class="form-label max-w-56">Pihak BAGI Cab </label>
|
<label for="pihak_bag" class="form-label max-w-56">Pihak BAGI Cab </label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
|
||||||
<input type="text" id="pihak_bag" name="pihak_bag" class="input w-full"
|
<input type="text" id="pihak_bag" name="pihak_bag"
|
||||||
placeholder="Masukkan Pihak Bag" value="{{ $permohonan->user->name ?? '' }} || {{ $permohonan->branch->name }}"
|
class="input w-full cursor-not-allowed" placeholder="Masukkan Pihak Bag"
|
||||||
|
value="{{ $permohonan->user->name ?? '' }} || {{ $permohonan->branch->name }}"
|
||||||
@readonly(true)>
|
@readonly(true)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -219,11 +298,23 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="debitur_perwakilan" class="form-label max-w-56">Debitur/perwakilan debitur
|
<label for="debitur_perwakilan" class="form-label max-w-56">Debitur/perwakilan debitur
|
||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<input type="text" id="debitur_perwakilan" name="debitur_perwakilan"
|
@if (isset($forminspeksi['asset']['debitur_perwakilan']))
|
||||||
class="input w-full" placeholder="Masukkan Penilai"
|
@foreach ($forminspeksi['asset']['debitur_perwakilan'] as $item)
|
||||||
value="{{ $permohonan->debiture->name ?? '' }}" @readonly(true)>
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
</div>
|
<input type="text" id="debitur_perwakilan" name="debitur_perwakilan"
|
||||||
|
class="input w-full cursor-not-allowed" placeholder="Masukkan Penilai"
|
||||||
|
value="{{ $item ?? '' }}" @readonly(true)>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="debitur_perwakilan" name="debitur_perwakilan"
|
||||||
|
class="input w-full cursor-not-allowed" placeholder="Masukkan Penilai"
|
||||||
|
value="{{ $permohonan->debiture->name ?? '' }}" @readonly(true)>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -319,132 +410,10 @@
|
|||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
{{-- <script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const callReport = @json($forminspeksi ?? '');
|
const callReport = @json($forminspeksi ?? '');
|
||||||
console.log('callReport', callReport)
|
console.log('callReport', callReport)
|
||||||
|
|
||||||
function updateAlamatFields(status) {
|
|
||||||
// Ambil elemen formulir
|
|
||||||
const addressForm = document.getElementById('alamat_form');
|
|
||||||
const inputs = addressForm.querySelectorAll('input, select');
|
|
||||||
const addressInput = document.getElementById('address');
|
|
||||||
|
|
||||||
if (status === 'sesuai') {
|
|
||||||
addressInput.value = "{{ $dokumen->address ?? '' }}";
|
|
||||||
inputs.forEach(element => {
|
|
||||||
if (element.tagName === 'INPUT') {
|
|
||||||
element.setAttribute('readonly', true);
|
|
||||||
} else if (element.tagName === 'SELECT') {
|
|
||||||
element.setAttribute('disabled', true);
|
|
||||||
element.classList.add('disabled-input')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
addressForm.style.display = 'grid';
|
|
||||||
addressForm.disabled = true;
|
|
||||||
addressForm.classList.add('disabled-input')
|
|
||||||
|
|
||||||
|
|
||||||
} else if (status === 'tidak sesuai') {
|
|
||||||
addressForm.style.display = 'grid';
|
|
||||||
|
|
||||||
addressForm.removeAttribute('disabled');
|
|
||||||
addressForm.classList.remove('disabled-input')
|
|
||||||
const formInspeksi = @json($forminspeksi);
|
|
||||||
const addressInput = document.getElementById('address');
|
|
||||||
|
|
||||||
if (formInspeksi && formInspeksi.asset && formInspeksi.asset.alamat) {
|
|
||||||
if (formInspeksi.asset.alamat['tidak sesuai'] && formInspeksi.asset.alamat['tidak sesuai'].address) {
|
|
||||||
addressInput.value = formInspeksi.asset.alamat['tidak sesuai'].address;
|
|
||||||
} else if (formInspeksi.asset.alamat['sesuai'] && formInspeksi.asset.alamat['sesuai'].address) {
|
|
||||||
addressInput.value = formInspeksi.asset.alamat['sesuai'].address;
|
|
||||||
} else {
|
|
||||||
addressInput.value = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs.forEach(element => {
|
|
||||||
if (element.tagName === 'INPUT') {
|
|
||||||
element.removeAttribute('readonly');
|
|
||||||
} else if (element.tagName === 'SELECT') {
|
|
||||||
element.removeAttribute('disabled');
|
|
||||||
element.classList.remove('disabled-input')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleFieldVisibility(fieldName, inputId, visibleValues = []) {
|
|
||||||
const selectedValue = $(`[name="${fieldName}"]:checked`).val();
|
|
||||||
const inputField = $(`#${inputId}`);
|
|
||||||
|
|
||||||
if (visibleValues.includes(selectedValue)) {
|
|
||||||
inputField.show();
|
|
||||||
} else {
|
|
||||||
inputField.hide().val('');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function toggleCheckboxVisibility(fieldName, inputId, visibleValues = []) {
|
|
||||||
const selectedValues = $(`[name="${fieldName}[]"]:checked`)
|
|
||||||
.map(function() {
|
|
||||||
return $(this).val().toLowerCase(); // Konversi nilai ke huruf kecil
|
|
||||||
})
|
|
||||||
.get();
|
|
||||||
|
|
||||||
const inputField = $(`#${inputId}`);
|
|
||||||
|
|
||||||
// Cek apakah salah satu nilai yang dipilih cocok dengan visibleValues
|
|
||||||
const shouldShow = visibleValues.some(value => selectedValues.includes(value.toLowerCase()));
|
|
||||||
|
|
||||||
if (shouldShow) {
|
|
||||||
inputField.show();
|
|
||||||
} else {
|
|
||||||
inputField.hide().val('');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function toggleMultipleFields(fieldName, mappings) {
|
|
||||||
// Ambil semua nilai checkbox yang dicentang
|
|
||||||
const selectedValues = $(`[name="${fieldName}[]"]:checked`)
|
|
||||||
.map(function() {
|
|
||||||
return $(this).val().toLowerCase(); // Konversi nilai ke huruf kecil
|
|
||||||
})
|
|
||||||
.get();
|
|
||||||
|
|
||||||
// Iterasi melalui setiap mapping
|
|
||||||
for (const [key, inputId] of Object.entries(mappings)) {
|
|
||||||
const inputField = $(`#${inputId}`);
|
|
||||||
|
|
||||||
// Tampilkan input jika nilai yang relevan dipilih
|
|
||||||
if (selectedValues.includes(key.toLowerCase())) {
|
|
||||||
inputField.show();
|
|
||||||
} else {
|
|
||||||
inputField.hide().val(''); // Sembunyikan dan reset nilai
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function toggleAlamatVisibility(idSesuai, idTidakSesuai, selectedValue) {
|
|
||||||
// Ambil elemen berdasarkan ID
|
|
||||||
const alamatSesuai = document.getElementById(idSesuai);
|
|
||||||
const alamatTidakSesuai = document.getElementById(idTidakSesuai);
|
|
||||||
|
|
||||||
// Periksa nilai yang dipilih dan tampilkan elemen yang sesuai
|
|
||||||
if (selectedValue === 'sesuai') {
|
|
||||||
alamatSesuai.style.display = 'grid'; // Tampilkan "Alamat Sesuai"
|
|
||||||
alamatTidakSesuai.style.display = 'none'; // Sembunyikan "Alamat Tidak Sesuai"
|
|
||||||
} else if (selectedValue === 'tidak sesuai') {
|
|
||||||
alamatSesuai.style.display = 'none'; // Sembunyikan "Alamat Sesuai"
|
|
||||||
alamatTidakSesuai.style.display = 'grid'; // Tampilkan "Alamat Tidak Sesuai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function submitData() {
|
function submitData() {
|
||||||
showLoadingSwal('Mengirim data ke server...');
|
showLoadingSwal('Mengirim data ke server...');
|
||||||
const form = document.querySelector('form');
|
const form = document.querySelector('form');
|
||||||
@@ -455,7 +424,7 @@
|
|||||||
const documentId = urlParams.get('documentId');
|
const documentId = urlParams.get('documentId');
|
||||||
const inspeksiId = urlParams.get('inspeksiId');
|
const inspeksiId = urlParams.get('inspeksiId');
|
||||||
const requestUrl =
|
const requestUrl =
|
||||||
`{{ route('penilai.storeRap') }}?permohonanId=${permohonanId}&inspeksiId=${inspeksiId}&documentId=${documentId}`;
|
`{{ route('penilai.storeCallReport') }}?permohonanId=${permohonanId}&inspeksiId=${inspeksiId}&documentId=${documentId}`;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: requestUrl,
|
url: requestUrl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@@ -504,75 +473,46 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
function calculateTotal() {
|
||||||
|
let nilaiPasarInput = document.getElementById('nilai-pasar');
|
||||||
|
let nilaiLikuidasi = document.getElementById('likuidasi');
|
||||||
|
let totalLikuidasi = document.getElementById('total-likuidasi');
|
||||||
|
const cleanNilaiPasar = cleanCurrencyValue(nilaiPasarInput.value);
|
||||||
|
let cleanLikuidasi = cleanCurrencyValue(nilaiLikuidasi.value);
|
||||||
|
|
||||||
|
// Batasi likuidasi maksimal hingga 100
|
||||||
|
cleanLikuidasi = Math.min(parseFloat(cleanLikuidasi) || 0, 100);
|
||||||
|
|
||||||
|
// Format nilai likuidasi dengan simbol %
|
||||||
|
nilaiLikuidasi.value = cleanLikuidasi;
|
||||||
|
|
||||||
|
// Konversi ke angka untuk perhitungan
|
||||||
|
const nilaiPasar = parseFloat(cleanNilaiPasar) || 0;
|
||||||
|
const likuidasi = cleanLikuidasi / 100; // Konversi persentase ke desimal
|
||||||
|
|
||||||
|
// Hitung total likuidasi
|
||||||
|
const totalNilaiLikuidasi = nilaiPasar * likuidasi;
|
||||||
|
|
||||||
|
// Tampilkan hasil dengan format yang benar
|
||||||
|
totalLikuidasi.value = formatCurrency(totalNilaiLikuidasi.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
// Ensure existing remove buttons are functional
|
// Initialize currency format for existing inputs
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.querySelectorAll('.currency-format').forEach(input => {
|
||||||
const removeButtons = document.querySelectorAll('.remove-btn');
|
|
||||||
removeButtons.forEach(button => {
|
|
||||||
button.addEventListener('click', function() {
|
|
||||||
this.closest('.perwakilan').remove();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelectorAll('.number-format').forEach(input => {
|
|
||||||
input.addEventListener('input', function() {
|
input.addEventListener('input', function() {
|
||||||
formatNumber(this);
|
handleCurrencyInput(this);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
// Format initial values if they exist
|
||||||
|
if (input.value) {
|
||||||
function updateAnalisa(params) {
|
input.value = formatCurrency(input.value);
|
||||||
const inputMap = {
|
|
||||||
jenis_asset: 'jenis_asset_tidak_sesuai',
|
|
||||||
analisa_tanah: 'analisa_tanah_tidak_sesuai',
|
|
||||||
analisa_unit: 'analisa_luas_unit_tidak_sesuai',
|
|
||||||
analisa_bangunan: 'analisa_bangunan_tidak_sesuai',
|
|
||||||
};
|
|
||||||
|
|
||||||
// Pastikan elemen ID ada di inputMap
|
|
||||||
if (!inputMap[params]) {
|
|
||||||
console.error('Parameter tidak valid:', params);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ambil nilai berdasarkan parameter
|
|
||||||
const inputValue = document.getElementById(inputMap[params]).value;
|
|
||||||
const data = {
|
|
||||||
[params === 'jenis_asset' ? 'jenis_asset' : params.replace('analisa_', 'luas_')]: inputValue,
|
|
||||||
types: params
|
|
||||||
};
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: '{{ route('surveyor.update_analisa', ['id' => $permohonan->id]) }}',
|
|
||||||
type: 'POST',
|
|
||||||
data: data,
|
|
||||||
headers: {
|
|
||||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
console.log(response);
|
|
||||||
if (response.success) {
|
|
||||||
// window.location.href =
|
|
||||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
|
||||||
toastrSuccessBuild(response.message);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(xhr, status, error) {
|
|
||||||
console.error('Terjadi error:', error);
|
|
||||||
console.log('Status:', status);
|
|
||||||
console.log('Response:', xhr.responseText);
|
|
||||||
if (xhr.responseJSON.message) {
|
|
||||||
toastrErrorBuild(xhr.responseJSON.message);
|
|
||||||
} else {
|
|
||||||
toastrErrorBuild('Terjadi kesalahan');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
</script> --}}
|
</script>
|
||||||
@include('lpj::surveyor.js.utils')
|
@include('lpj::surveyor.js.utils')
|
||||||
@endpush
|
@endpush
|
||||||
|
|||||||
@@ -782,14 +782,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleCurrencyInput(input) {
|
|
||||||
const value = input.value.replace(/[^\d]/g, '');
|
|
||||||
input.value = formatCurrency(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function cleanCurrencyValue(value) {
|
|
||||||
return value.replace(/[^\d]/g, '');
|
|
||||||
}
|
|
||||||
|
|
||||||
function calculateTotal(element) {
|
function calculateTotal(element) {
|
||||||
|
|
||||||
|
|||||||
@@ -279,35 +279,22 @@
|
|||||||
<span class="menu-title">LPJ</span>
|
<span class="menu-title">LPJ</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="menu-item">
|
|
||||||
<a class="menu-link"
|
|
||||||
onclick="callReport('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
|
|
||||||
<span class="menu-icon">
|
|
||||||
<i class="ki-outline ki-profile-circle">
|
|
||||||
</i>
|
|
||||||
</span>
|
|
||||||
<span class="menu-title">
|
|
||||||
CALL REPORT
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4)
|
@if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4)
|
||||||
<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 }}', '{{ $inspeksiId }}', {{ $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>
|
||||||
</span>
|
</span>
|
||||||
<span class="menu-title">
|
<span class="menu-title">
|
||||||
CALL REPORT
|
CALL REPORT
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -359,20 +346,28 @@
|
|||||||
$jenisJaminanId = null;
|
$jenisJaminanId = null;
|
||||||
$inspeksiId = null;
|
$inspeksiId = null;
|
||||||
$documentId = null;
|
$documentId = null;
|
||||||
foreach ($permohonan->documents as $item) {
|
$firstDocument = $permohonan->documents->first(); // Ambil dokumen pertama
|
||||||
$documentId = $item->id;
|
|
||||||
}
|
if ($firstDocument) {
|
||||||
foreach ($dokumen->inspeksi as $item) {
|
$documentId = $firstDocument->id;
|
||||||
$inspeksiId = $item->id;
|
|
||||||
|
// Ambil ID inspeksi pertama (jika ada)
|
||||||
|
if ($firstDocument->inspeksi->isNotEmpty()) {
|
||||||
|
$inspeksiId = $firstDocument->inspeksi->first()->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ambil jenis jaminan jika ada
|
||||||
|
if ($firstDocument->jenisjaminan) {
|
||||||
|
$jenisJaminanId = $firstDocument->jenisjaminan->id;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$documentId = 'Tidak ada dokumen';
|
||||||
|
$inspeksiId = 'Tidak ada inspeksi';
|
||||||
|
$jenisJaminanId = 'Tidak ada jenis jaminan';
|
||||||
}
|
}
|
||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
@foreach ($permohonan->documents as $document)
|
|
||||||
@if ($document->jenisjaminan)
|
|
||||||
@php
|
|
||||||
$jenisJaminanId = $document->jenisjaminan->id;
|
|
||||||
@endphp
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
<div class="flex items-baseline w-full">
|
<div class="flex items-baseline w-full">
|
||||||
<label for="" class="form-label max-w-56">Import Kertas Kerja</label>
|
<label for="" class="form-label max-w-56">Import Kertas Kerja</label>
|
||||||
<div class="flex justify-center items-center gap-2">
|
<div class="flex justify-center items-center gap-2">
|
||||||
|
|||||||
@@ -502,4 +502,14 @@
|
|||||||
alamatTidakSesuai.style.display = 'grid'; // Tampilkan "Alamat Tidak Sesuai"
|
alamatTidakSesuai.style.display = 'grid'; // Tampilkan "Alamat Tidak Sesuai"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function handleCurrencyInput(input) {
|
||||||
|
const value = input.value.replace(/[^\d]/g, '');
|
||||||
|
input.value = formatCurrency(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanCurrencyValue(value) {
|
||||||
|
return value.replace(/[^\d]/g, '');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -604,6 +604,7 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('memo', [PenilaiController::class, 'memo'])->name('memo');
|
Route::get('memo', [PenilaiController::class, 'memo'])->name('memo');
|
||||||
Route::get('paparan', [PenilaiController::class, 'paparan'])->name('paparan');
|
Route::get('paparan', [PenilaiController::class, 'paparan'])->name('paparan');
|
||||||
Route::get('call-report', [PenilaiController::class, 'call_report'])->name('call-report');
|
Route::get('call-report', [PenilaiController::class, 'call_report'])->name('call-report');
|
||||||
|
Route::get('storeCallReport', [PenilaiController::class, 'storeCallReport'])->name('storeCallReport');
|
||||||
Route::post('storePaparan/{id}', [PenilaiController::class, 'storePaparan'])->name('storePaparan');
|
Route::post('storePaparan/{id}', [PenilaiController::class, 'storePaparan'])->name('storePaparan');
|
||||||
Route::get('rap', [PenilaiController::class, 'rap'])->name('rap');
|
Route::get('rap', [PenilaiController::class, 'rap'])->name('rap');
|
||||||
Route::get('/check-status-lpj', [PenilaiController::class, 'checkStatusLpj'])->name('check.status.lpj');
|
Route::get('/check-status-lpj', [PenilaiController::class, 'checkStatusLpj'])->name('check.status.lpj');
|
||||||
|
|||||||
Reference in New Issue
Block a user