penambahan lampiran foto dokumen dan paparan di so dan ganti unit di jenis jaminan ruko rukan

This commit is contained in:
majid
2025-01-14 09:50:25 +07:00
parent 090bb618b1
commit 76c1a74c3a
18 changed files with 768 additions and 490 deletions

View File

@@ -44,15 +44,15 @@ class PenilaiController extends Controller
/**
* Show the form for creating a new resource.
*/
public function lampiran(Request $request, $id)
public function lampiran(Request $request)
{
$permohonanId = $request->query('permohonanId');
$documentId = $request->query('documentId');
$jaminanId = $request->query('jaminanId');
$permohonan = $this->surveyorController->getPermohonanJaminanId($id, $documentId, $jaminanId);
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('dokument_id', $documentId)->first();
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
$inpeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
$formFoto = null;
if ($inpeksi) {
@@ -280,6 +280,7 @@ class PenilaiController extends Controller
$jaminanId = $request->query('jaminanId');
$provinces = Province::all();
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
$noLpRAP = $this->generateNoLaporan($permohonan, $documentId, 'rap');
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
Penilai::updateOrCreate(
[
@@ -302,7 +303,7 @@ class PenilaiController extends Controller
$rap = json_decode($resume->rap, true);
}
return view('lpj::penilai.components.rap-penilai', compact('permohonan', 'rap', 'provinces', 'forminspeksi'));
return view('lpj::penilai.components.rap-penilai', compact('permohonan', 'rap', 'provinces', 'forminspeksi', 'noLpRAP'));
}
@@ -756,6 +757,60 @@ class PenilaiController extends Controller
}
}
public function storeRap(Request $request){
DB::beginTransaction();
try {
$formRequest = new FormSurveyorRequest();
$formRequest->setContainer(app());
$formRequest->initialize(
$request->all(),
$request->query->all(),
$request->attributes->all(),
$request->cookies->all(),
$request->files->all(),
$request->server->all(),
$request->getContent()
);
$validated = $formRequest->validateResolved();
$result = $this->surveyorController->store($formRequest);
$data =[
'kepada' => $request->input('kepada'),
'dari' => $request->input('dari'),
'nomor_rap' => $request->input('nomor_rap'),
'tanggal' => $request->input('tanggal'),
'perihal' => $request->input('perihal')
];
Penilai::updateOrCreate(
[
'permohonan_id' => $request->permohonanId,
'dokument_id' => $request->documentId,
'inspeksi_id' => $request->inspeksiId,
],
[
'rap' => json_encode($data),
]
);
DB::commit();
return response()->json([
'success' => true,
'message' => 'Berhasil menyimpan LPJ',
'data' => $result
], 200);
} catch (\Throwable $e) {
DB::rollBack();
return response()->json([
'success' => false,
'message' => 'Terjadi kesalahan saat menyimpan LPJ',
'error' => $e->getMessage(),
'trace' => $e->getTraceAsString()
], 500);
}
}
public function print_out(Request $request)
@@ -794,6 +849,7 @@ class PenilaiController extends Controller
$lpjData = json_decode($lpj->lpj, true);
$memo = json_decode($lpj->memo, true);
$resumeData = json_decode($lpj->resume, true);
$rap = json_decode($lpj->rap, true);
}
$inputAddress = $forminspeksi['asset']['alamat']['sesuai'] ?? $forminspeksi['asset']['alamat']['tidak sesuai'];
@@ -824,7 +880,8 @@ class PenilaiController extends Controller
'nomorLaporan',
'memo',
'resumeData',
'tanggalLaporan'
'tanggalLaporan',
'rap'
));
$pdf->setPaper('A4', 'portrait');
@@ -845,7 +902,8 @@ class PenilaiController extends Controller
'nomorLaporan',
'memo',
'resumeData',
'tanggalLaporan'
'tanggalLaporan',
'rap'
));
// return $pdf;

View File

@@ -2763,7 +2763,7 @@ class SurveyorController extends Controller
'sensor_camera_recorder' => $data['sensor_camera_recorder'] ?? null,
'sensor_camera_recorder_input' => $data['sensor_camera_recorder_input'] ?? null,
'lcd' => $data['lcd'] ?? null,
'lcd_innput' => $data['lcd_innput'] ?? null,
'lcd_input' => $data['lcd_input'] ?? null,
'sabuk_keselamatan' => $data['sabuk_keselamatan'] ?? null,
'sabuk_keselamatan_input' => $data['sabuk_keselamatan_input'] ?? null,
'airbag' => $data['airbag'] ?? null,

View File

@@ -280,10 +280,16 @@ class FormSurveyorRequest extends FormRequest
'nama_jalan' => 'required',
'perumahan_gang' => 'required',
'blok_nomor' => 'required',
'desa_kelurahan' => 'required',
'kecamatan' => 'required',
'kota_madya' => 'required',
'provinsi' => 'required',
'village_code' => 'nullable|string',
'district_code' => 'nullable|string',
'city_code' => 'nullable|string',
'province_code' => 'nullable|string',
'masa_stnk' => 'required',
'masa_pajak' => 'required',
'kendaraan.*' => 'required',
'kendaraan_input.*' => 'nullable',
'kondisi' => 'required',
'nomor_polisi' => 'required',
'nomor_polis_tidak_sesuai' => 'nullable',
@@ -297,26 +303,47 @@ class FormSurveyorRequest extends FormRequest
'nomor_mesin_tidak_sesuai' => 'nullable',
'posisi_kilometer' => 'required',
'transmisi' => 'required',
'transmisi_input' => 'nullable',
'mesin_panel_instrument.*' => 'required',
'mesin_panel_instrument_input.*' => 'nullable',
'fungsi_mesin_panel_instrument.*' => 'required',
'fungsi_mesin_panel_instrument_input.*' => 'nullable',
'interior.*' => 'required',
'interior_input.*' => 'nullable',
'jumlah_pintu.*' => 'required',
'jumlah_pintu_input.*' => 'nullable',
'rangka_karoseri.*' => 'required',
'rangka_karoseri_input.*' => 'nullable',
'ban.*' => 'required',
'ban_input.*' => 'nullable',
'velg.*' => 'required',
'velg_input.*' => 'nullable',
'bamper_depan.*' => 'required',
'bamper_depan_input.*' => 'nullable',
'bamper_belakang.*' => 'required',
'bamper_belakang_input.*' => 'nullable',
'lampu_depan.*' => 'required',
'lampu_depan_input.*' => 'nullable',
'lampu_belakang.*' => 'required',
'lampu_belakang_input.*' => 'nullable',
'kaca_kendaraan.*' => 'required',
'kaca_kendaraan_input.*' => 'nullable',
'air_conditioner.*' => 'required',
'air_conditioner_input.*' => 'nullable',
'tape_radio_cd.*' => 'required',
'tape_radio_cd_input.*' => 'nullable',
'sensor_parkir.*' => 'required',
'sensor_parkir_input.*' => 'nullable',
'sensor_camera_recorder.*' => 'required',
'sensor_camera_recorder_input.*' => 'nullable',
'lcd.*' => 'required',
'lcd_input.*' => 'nullable',
'sabuk_keselamatan.*' => 'required',
'sabuk_keselamatan_input.*' => 'nullable',
'airbag.*' => 'required',
'airbag_input.*' => 'nullable',
'asuransi.*' => 'required',
'asuransi_input.*' => 'nullable',
'perusahaan_asuransi' => 'required',
'tahun_berakhir' => 'required',
'fakta_positif.*' => 'nullable',

View File

@@ -23,6 +23,7 @@ class Penilai extends Model
'lpj',
'type',
'memo',
'rap',
'type_penilai'
];

View File

@@ -14,7 +14,7 @@
<i class="ki-filled ki-exit-left"></i> Back
</a>
@else
<a href="{{ route($backLink) }}" class="btn btn-xs btn-info">
<a href="{{ route($backLink, $queryParams ?? []) }}" class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back
</a>
@endif

View File

@@ -541,6 +541,7 @@
@if ($dokumen->jenisJaminan)
@php
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
$jenisAset = $dokumen->jenisJaminan->name;
@endphp
@if (isset($formKategori) && $formKategori)
@php
@@ -593,6 +594,11 @@
'pesawat' => 'Luas Pesawat',
'kapal' => 'Luas Kapal',
];
if (strcasecmp($jenisAset, 'RUKO/RUKAN') === 0) {
$labelNilai['bangunan'] = 'Luas Unit';
unset($labelNilai['tanah']);
}
@endphp
@foreach ($kategoriUnik as $item)
@@ -640,8 +646,8 @@
<label for="province" class="input">
<i class="">Rp
</i>
<input type="text" class=" w-full currency-format"
id="total_nilai_pasar_wajar" name="total_nilai_pasar_wajar"
<input type="text" class=" w-full currency-format" id="total_nilai_pasar_wajar"
name="total_nilai_pasar_wajar"
value="{{ old('total_nilai_pasar_wajar', $lpjData['total_nilai_pasar_wajar'] ?? null) }}">
</label>
</div>
@@ -656,6 +662,8 @@
Tambah NPW </button>
</div>
<div>
<label for="total_nilai_pasar_wajar" class="form-label uppercase">TOTAL NILAI
LIKUIDASI</label>
@@ -693,6 +701,41 @@
</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_penilai-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
@if (!empty($lpjData['keterangan_penilai']) && is_array($lpjData['keterangan_penilai']))
@foreach ($lpjData['keterangan_penilai'] as $index => $item)
<div class="keterangan_penilai flex items-center gap-2 mt-2 textarea-group w-full">
<textarea name="keterangan_penilai[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old("keterangan_penilai.$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_penilai flex items-center gap-2 mt-2 textarea-group w-full">
<textarea name="keterangan_penilai[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3"></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_penilai" class="alert text-danger text-sm"></em>
</div>
@endif
</div>
<button type="button"
onclick="addClonableItem('keterangan_penilai-container', 'keterangan_penilai')"
class="btn btn-primary btn-sm mt-5 ">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
</div>
</div>
@@ -770,20 +813,29 @@
oninput="calculateTotal()">
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="province" class="">X</label>
<label class="input">
<i class="">Rp
</i>
<input type="text"
id="nilai_npw_${npwCounter}_1"
class="input w-full currency-format"
class=" w-full currency-format"
name="nilai_npw_${npwCounter}_1"
placeholder="Harga per meter"
oninput="calculateTotal()">
</label>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label class="input">
<i class="">Rp
</i>
<input type="text"
id="nilai_npw_${npwCounter}_2"
class="input w-full currency-format"
name="nilai_npw_${npwCounter}_2"
placeholder="Total Nilai"
readonly>
</label>
<button type="button" class="btn btn-danger remove-npw">
<i class="ki-filled ki-minus"></i>
</button>
@@ -841,22 +893,31 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="province" class="">X</label>
<label class="input">
<i class="">Rp
</i>
<input type="text"
id="nilai_npw_${npwCounter}_1"
class="input w-full currency-format"
class=" w-full currency-format"
name="nilai_npw_${npwCounter}_1"
placeholder="Harga per meter"
value="${npw.nilai_1 || ''}"
oninput="calculateTotal()">
</label>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label class="input">
<i class="">Rp
</i>
<input type="text"
id="nilai_npw_${npwCounter}_2"
class="input w-full currency-format"
class=" w-full currency-format"
name="nilai_npw_${npwCounter}_2"
placeholder="Total Nilai"
value="${npw.nilai_2 || ''}"
readonly>
</label>
<div>
<button type="button" class="btn btn-danger remove-npw h-full">
<i class="ki-filled ki-minus"></i>
@@ -1023,3 +1084,4 @@
});
}
</script>
@include('lpj::surveyor.js.utils')

View File

@@ -15,7 +15,15 @@
<button type="button" class="btn btn-success" id="saveButton" onclick="saveLpjSederhanadanStandard()">
<span id="saveButtonText">Save</span>
</button>
@if (Auth::user()->hasAnyRole(['senior-officer']))
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-secondary"
href="{{ route('penilai.paparan') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
PAPARAN
</a>
<a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print

View File

@@ -24,21 +24,21 @@
<label class="form-label max-w-56">Kepada</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
value=" {{ $memo->kepada ?? "" }}">
value=" {{ $memo->kepada ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Dari</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
value="{{ $memo->dari ?? "" }}">
value="{{ $memo->dari ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Nomor Memo</label>
<div class="flex flex-wrap items-base line w-full">
<input type="text" name="nomor_memo" class="input w-full" placeholder="Masukkan..."
value="{{ $noLpmemo ?? "" }}" @readonly(true)>
value="{{ $noLpmemo ?? '' }}" @readonly(true)>
</div>
</div>
{{-- 250109828129/ --}}
@@ -47,7 +47,7 @@
<label class="form-label max-w-56">Tanggal</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tanggal" class="input w-full" placeholder="Masukkan..."
value="{{ $memo->tanggal ?? "" }}">
value="{{ $memo->tanggal ?? '' }}">
</div>
</div>
@@ -55,7 +55,7 @@
<label class="form-label max-w-56">Perihal</label>
<div class="flex flex-wrap items-base line w-full">
<input type="text" name="perihal" class="input w-full" placeholder="Masukkan..."
value="{{ $memo->perihal ?? "" }}">
value="{{ $memo->perihal ?? '' }}">
</div>
</div>
</div>
@@ -64,7 +64,8 @@
<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">Sehubungan dengan permintaan BAGI Cabang
<b>{{ $permohonan->branch->name }}</b>, untuk dilakukan survey untuk penilaian baru/review, calon debitur/debitur an
<b>{{ $permohonan->branch->name }}</b>, untuk dilakukan survey untuk penilaian baru/review, calon
debitur/debitur an
<b>{{ $permohonan->debiture->name }}</b>,dengan deskripsi sebagai berikut :
</h1>
</div>
@@ -78,7 +79,8 @@
<select id="jenis_asset_tidak_sesuai" class="input w-full" name="jenis_asset_tidak_sesuai">
<option value="">Select Jenis asset</option>
@foreach ($basicData['jenisJaminan'] as $item)
<option value="{{ $item->name }}" {{ ($memo->jenis_asset_tidak_sesuai ?? '') == $item->name ? 'selected' : '' }}>
<option value="{{ $item->name }}"
{{ ($memo->jenis_asset_tidak_sesuai ?? '') == $item->name ? 'selected' : '' }}>
{{ $item->name }}
</option>
@endforeach
@@ -92,7 +94,8 @@
<label for="lokasi" class="form-label max-w-56">Lokasi</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" id="lokasi" name="lokasi" class="input w-full"
placeholder="Masukkan Jl." value="{{ $memo->lokasi->lokasi ?? old('lokasi') }}">
placeholder="Masukkan Jl."
value="{{ $memo->lokasi->lokasi ?? old('lokasi') }}">
</div>
</div>
@@ -102,7 +105,9 @@
<select id="province_code" name="province_code" class="input w-full">
<option value="">Pilih Provinsi</option>
@foreach ($provinces as $item)
<option value="{{ $item->code }}" {{ ($memo->lokasi->province_code ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
<option value="{{ $item->code }}"
{{ ($memo->lokasi->province_code ?? '') == $item->code ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach
</select>
</div>
@@ -115,7 +120,9 @@
<option value="">Pilih Kota/Kabupaten</option>
@if (isset($cities))
@foreach ($cities as $item)
<option value="{{ $item->code }}" {{ ($memo->lokasi->city_code?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
<option value="{{ $item->code }}"
{{ ($memo->lokasi->city_code ?? '') == $item->code ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach
@endif
</select>
@@ -129,7 +136,9 @@
<option value="">Pilih Kecamatan</option>
@if (isset($districts))
@foreach ($districts as $item)
<option value="{{ $item->code }}" {{ ($memo->lokasi->district_code?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
<option value="{{ $item->code }}"
{{ ($memo->lokasi->district_code ?? '') == $item->code ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach
@endif
</select>
@@ -143,7 +152,9 @@
<option value="">Pilih Kelurahan</option>
@if (isset($villages))
@foreach ($villages as $item)
<option value="{{ $item->code }}" {{ ($memo->lokasi->village_code ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
<option value="{{ $item->code }}"
{{ ($memo->lokasi->village_code ?? '') == $item->code ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach
@endif
</select>
@@ -154,15 +165,17 @@
<label for="address" class="form-label max-w-56">Address</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" id="address" name="address" class="input w-full"
placeholder="Masukkan Jl." value="{{ $memo->lokasi->address ?? old('address') }}">
placeholder="Masukkan Jl."
value="{{ $memo->lokasi->address ?? old('address') }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="tanggal_survey" class="form-label max-w-56">Tanggal Survey</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="date" id="tanggal_survey" name="tanggal_survey" class="input w-full"
placeholder="Masukkan Tanggal Survey" value="{{ $memo->tanggal_survey ?? old('tanggal_survey') }}">
<input type="date" id="tanggal_survey" name="tanggal_survey"
class="input w-full" placeholder="Masukkan Tanggal Survey"
value="{{ $memo->tanggal_survey ?? old('tanggal_survey') }}">
</div>
</div>
@@ -170,7 +183,8 @@
<label for="penilai" class="form-label max-w-56">Penilai</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" id="penilai" name="penilai" class="input w-full"
placeholder="Masukkan Penilai" value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
placeholder="Masukkan Penilai"
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
</div>
</div>
@@ -264,13 +278,21 @@
</div>
</div>
{{-- @include('lpj::penilai.components.foto-lampiran') --}}
@include('lpj::penilai.components.foto-lampiran')
<div class="flex card-footer justify-end gap-5">
<a class="btn btn-success" onclick="saveMemo()">
SAVE
</a>
@if (Auth::user()->hasAnyRole(['senior-officer']))
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-secondary"
href="{{ route('penilai.paparan') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
PAPARAN
</a>
<a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print

View File

@@ -6,11 +6,26 @@
@section('content')
@include('lpj::assetsku.includenya')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
@if (Auth::user()->hasAnyRole(['senior-officer']))
@include('lpj::component.detail-jaminan', [
'backLink' => 'otorisator.view-laporan',
'queryParams' => [
'permohonanId' => request()->query('permohonanId'),
'documentId' => request()->query('documentId'),
'inspeksiId' => request()->query('inspeksiId'),
'jaminanId' => request()->query('jaminanId'),
'statusLpj' => 1,
],
'title' => 'Paparan dokument',
])
@else
@include('lpj::component.detail-jaminan', [
'backLink' => 'penilai.show',
'id' => $permohonan->id,
'title' => 'Paparan dokument',
])
@endif
@include('lpj::penilai.components.foto-lampiran')

View File

@@ -129,29 +129,29 @@
<table style="width: 100%;">
<tr>
<td style="width: 10%;">Kepada</td>
<td>:</td>
<td>{{ $rap['kepada'] ?? '' }}</td>
<td style="width: 20%; padding: 2px;">Kepada</td>
<td style="width: 1%; padding: 2px;">:</td>
<td style="width: 79%; padding: 2px;">{{ $rap['kepada'] ?? '' }}</td>
</tr>
<tr>
<td>Dari</td>
<td>:</td>
<td>{{ $rap['dari'] ?? '' }}</td>
<td style="width: 20%; padding: 2px;">Dari</td>
<td style="width: 1%; padding: 2px;">:</td>
<td style="width: 79%; padding: 2px;">{{ $rap['dari'] ?? '' }}</td>
</tr>
<tr>
<td>No</td>
<td>:</td>
<td>{{ $rap['nomor_rap'] ?? '' }}</td>
<td style="width: 20%; padding: 2px;">No</td>
<td style="width: 1%; padding: 2px;">:</td>
<td style="width: 79%; padding: 2px;">{{ $nomorLaporan ?? '-' }}</td>
</tr>
<tr>
<td>Tanggal</td>
<td>:</td>
<td>_</td>
<td style="width: 20%; padding: 2px;">Tanggal</td>
<td style="width: 1%; padding: 2px;">:</td>
<td style="width: 79%; padding: 2px;">{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}</td>
</tr>
<tr>
<td>Perihal</td>
<td>:</td>
<td>{{ $rap['perihal'] ?? '' }}</td>
<td style="width: 20%; padding: 2px;">Perihal</td>
<td style="width: 1%; padding: 2px;">:</td>
<td style="width: 79%; padding: 2px;">{{ $rap['perihal'] ?? '' }}</td>
</tr>
</table>

View File

@@ -15,6 +15,54 @@
@include('lpj::assetsku.includenya')
@include('lpj::surveyor.components.header')
@include('lpj::surveyor.components.rap')
<div class="card">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
RAP
</h3>
</div>
<div class="card-body grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Kepada</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
value=" {{ $rap['kepada'] ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Dari</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
value="{{ $rap['dari'] ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Nomor RAP</label>
<div class="flex flex-wrap items-base line w-full">
<input type="text" name="nomor_rap" class="input w-full" placeholder="Masukkan..."
value="{{ $noLpRAP ?? '' }}" @readonly(true)>
</div>
</div>
{{-- 250109828129/ --}}
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tanggal</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tanggal" class="input w-full" placeholder="Masukkan..."
value="{{ $rap['tanggal'] ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Perihal</label>
<div class="flex flex-wrap items-base line w-full">
<input type="text" name="perihal" class="input w-full" placeholder="Masukkan..."
value="{{ $rap['perihal'] ?? '' }}">
</div>
</div>
</div>
</div>
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
<button type="button" class="btn btn-success" id="saveButton" onclick="submitData()">
<span id="saveButtonText">Save</span>
@@ -23,7 +71,11 @@
</div>
</button>
@if (Auth::user()->hasAnyRole(['senior-officer']))
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print
@@ -35,6 +87,9 @@
@endsection
@push('scripts')
<script type="text/javascript">
const rap = @json($rap);
console.log('rap', rap)
function updateAlamatFields(status) {
// Ambil elemen formulir
const addressForm = document.getElementById('alamat_form');
@@ -162,9 +217,14 @@
const form = document.querySelector('form');
const formData = new FormData(form);
console.log('Form data entries:', Array.from(formData.entries()));
const urlParams = new URLSearchParams(window.location.search);
const permohonanId = {{ $permohonan->id }};
const documentId = urlParams.get('documentId');
const inspeksiId = urlParams.get('inspeksiId');
const requestUrl =
`{{ route('penilai.storeRap') }}?permohonanId=${permohonanId}&inspeksiId=${inspeksiId}&documentId=${documentId}`;
$.ajax({
url: '{{ route('surveyor.store') }}',
url: requestUrl,
type: 'POST',
data: formData,
processData: false,
@@ -182,7 +242,7 @@
confirmButtonText: 'OK'
}).then((response) => {
if (response.isConfirmed) {
window.location.reload();
// window.location.reload();
}
});
} else {

View File

@@ -337,7 +337,15 @@
<div class="flex card-footer justify-end gap-5">
<button type="button" class="btn btn-success" onclick="saveResume()">Save</button>
@if (Auth::user()->hasAnyRole(['senior-officer']))
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
<a class="btn btn-info"
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
LAMPIRAN FOTO DAN DOKUMEN
</a>
<a class="btn btn-secondary"
href="{{ route('penilai.paparan') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
PAPARAN
</a>
<a class="btn btn-primary"
onclick="checkLaporan('{{ $permohonan->id }}', '{{ request('documentId') }}', '{{ request('inspeksiId') }}', {{ request('jaminanId') }}, )">
<i class="ki-filled ki-printer"></i> Print
@@ -345,6 +353,7 @@
@endif
</div>
@include('lpj::penilai.components.foto-lampiran')
</div>
</form>

View File

@@ -6,10 +6,28 @@
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
@include('lpj::component.detail-jaminan', ['backLink' => 'penilai.show', 'id' => $permohonan->id, 'title' => 'Lampiran foto dan dokument'])
@if (Auth::user()->hasAnyRole(['senior-officer']))
@include('lpj::component.detail-jaminan', [
'backLink' => 'otorisator.view-laporan',
'queryParams' => [
'permohonanId' => request()->query('permohonanId'),
'documentId' => request()->query('documentId'),
'inspeksiId' => request()->query('inspeksiId'),
'jaminanId' => request()->query('jaminanId'),
'statusLpj' => 1,
],
'title' => 'Paparan dokument',
])
@else
@include('lpj::component.detail-jaminan', [
'backLink' => 'penilai.show',
'id' => $permohonan->id,
'title' => 'Lampiran foto dan dokument',
])
@endif
@include('lpj::penilai.components.foto-lampiran')
</div>
@endsection

View File

@@ -93,7 +93,7 @@
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}</p>
{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) ?? '' }}</p>
</div>
<label class="form-label max-w-56 ">
Status Bayar
@@ -197,19 +197,20 @@
$jaminanId = $dokumen->id;
$currentInspeksi = $inspeksiData[$jaminanId] ?? null;
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT'];
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'ALAT BERAT'];
@endphp
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full card-footer mt-2 ">
<div class="flex gap-5">
<a class="btn btn-primary"
href="{{ route('penilai.lampiran', $permohonan->id) }}?documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
href="{{ route('penilai.lampiran') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
LAMPIRAN FOTO DAN DOKUMEN
</a>
@if (strtolower($permohonan->tujuanPenilaian->name) != 'rap')
<a class="btn btn-primary" data-modal-toggle="#modal_2">
KERTAS KERJA
</a>
@endif
<a class="btn btn-primary"
href="{{ route('penilai.paparan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
PAPARAN
@@ -220,6 +221,7 @@
Pembuatan Laporan
</button>
{{-- kios tanah bangunan kalo dalam mall ruko --}}
<div class="dropdown-content w-full max-w-56 py-2">
<div class="menu menu-default flex flex-col w-full">
@if (strtolower($permohonan->tujuanPenilaian->name) == 'rap')
@@ -236,6 +238,9 @@
</a>
</div>
@else
{{-- pendapingan kjjp leleang --}}
{{-- memo pendapingan lelang --}}
{{-- existing di --}}
<div class="menu-item">
<a class="menu-link"
onclick="memo('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">

View File

@@ -21,7 +21,7 @@
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tanggal Survey</label>
<label class="form-label max-w-56">Tanggal Dibuat</label>
<div class="flex flex-wrap items-base line w-full">
<p class="text-2sm text-gray-700">{{ $permohonan->created_at->format('d/m/Y') }}</p>
</div>
@@ -51,7 +51,7 @@
<label class="form-label max-w-56">Tanggal Survey</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tanggal_survey" class="input"
placeholder="Masukkan Hubungan Calon Debitur">
placeholder="Masukkan Hubungan Calon Debitur" value="{{ $forminspeksi['tanggal_survey'] ?? "" }}">
<em id="error-tanggal_survey" class="alert text-danger text-sm"></em>
</div>
</div>
@@ -83,7 +83,7 @@
<label class="form-label max-w-56">Nama Wakil Debitur</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="nama_wakil" class="input"
placeholder="Masukkan Hubungan Calon Debitur">
placeholder="Masukkan Hubungan Calon Debitur" value="{{ $forminspeksi['nama_wakil'] ?? '' }}">
<em id="error-nama_wakil" class="alert text-danger text-sm"></em>
@@ -93,7 +93,7 @@
<label class="form-label max-w-56">Hubungan Calon Debitur</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="hub_calon_debitur" class="input"
placeholder="Masukkan Hubungan Calon Debitur">
placeholder="Masukkan Hubungan Calon Debitur" value="{{$forminspeksi['hub_calon_debitur'] ?? ''}}">
<em id="error-hub_calon_debitur" class="alert text-danger text-sm"></em>
@@ -190,7 +190,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Kondisi</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="kondisi" class="input" placeholder="Masukkan Kondisi">
<input type="text" name="kondisi" class="input" placeholder="Masukkan Kondisi" value="{{ $forminspeksi['kondisi'] ?? '' }}">
<em id="error-kondisi" class="alert text-danger text-sm"></em>
</div>
@@ -395,7 +395,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Posisi Kilometer</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="posisi_kilometer" class="input" placeholder="Posisi Kilometer">
<input type="text" name="posisi_kilometer" class="input" placeholder="Posisi Kilometer" value="{{ $forminspeksi['posisi_kilometer'] ?? '' }}">
<em id="error-posisi_kilometer" class="alert text-danger text-sm"></em>
</div>
@@ -571,7 +571,7 @@
<label class="form-label max-w-56">Perusahaan Asuransi</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="perusahaan_asuransi" class="input"
placeholder="Pesurahaan Asuransi">
placeholder="Pesurahaan Asuransi" value="{{ $forminspeksi['perusahaan_asuransi'] ?? '' }}">
<em class="alert text-danger text-sm"></em>
</div>
@@ -580,7 +580,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tahun Berakhir</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="date" name="tahun_berakhir" class="input" placeholder="Tahun berakhir">
<input type="date" name="tahun_berakhir" class="input" placeholder="Tahun berakhir" value="{{ $forminspeksi['tahun_berakhir'] ?? "" }}">
<em class="alert text-danger text-sm"></em>
</div>

View File

@@ -1,4 +1,3 @@
<div class="card-header bg-agi-50">
<h3 class="card-title">Data Pembanding</h3>
<div class="flex items-center gap-2">
@@ -84,7 +83,8 @@
<td class="px-4 py-2">Warna</td>
<td class="px-4 py-2">
<input type="text" name="warna" class="input " value="{{ $inspectionData['warna'] ?? '' }}">
<input type="text" name="warna" class="input "
value="{{ $inspectionData['warna'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="warna_pembanding[]" class="input">
@@ -94,7 +94,8 @@
<td class="px-4 py-2">Lokasi</td>
<td class="px-4 py-2">
<input type="text" name="lokasi" class="input" value="{{ $inspectionData['lokasi'] ?? '' }}">
<input type="text" name="lokasi" class="input"
value="{{ $inspectionData['lokasi'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="lokasi_pembanding[]" class="input">
@@ -104,7 +105,8 @@
<td class="px-4 py-2">Sumber data</td>
<td class="px-4 py-2">
<input type="text" name="sumber_data" class="input" value="{{ $inspectionData['sumber_data'] ?? '' }}">
<input type="text" name="sumber_data" class="input"
value="{{ $inspectionData['sumber_data'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="sumber_data_pembanding[]" class="input">
@@ -115,8 +117,8 @@
<td class="px-4 py-2">Tahun</td>
<td class="px-4 py-2">
<input type="text" name="tahun" class="input number-format" value="{{ $inspectionData['tahun'] ?? '' }}"
>
<input type="text" name="tahun" class="input number-format"
value="{{ $inspectionData['tahun'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="tahun_pembanding[]" class="input number-format">
@@ -126,9 +128,8 @@
<tr>
<td class="px-4 py-2">Transmisi</td>
<td class="px-4 py-2">
<input type="text" name="transmisi" class="input"
value="{{ $inspectionData['transmisi'] ?? '' }}">
value="{{ is_array($inspectionData['transmisi'] ?? '') ? implode(', ', $inspectionData['transmisi']) : $inspectionData['transmisi'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="transmisi_pembanding[]" class="input ">
@@ -146,8 +147,7 @@
</td>
<td class="px-4 py-2">
<input type="text" name="tahun_pembuatan" class="input number-format"
value="{{ $inspectionData['tahun_pembuatan'] ?? '' }}"
>
value="{{ $inspectionData['tahun_pembuatan'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="tahun_pembuatan_pembanding[]" class="input">
@@ -245,8 +245,7 @@
@foreach ($provinces as $province)
@php
$selectedProvince =
$inspectionData['alamat']['sesuai']['province_code'] ?? null;
$selectedProvince = $inspectionData['alamat']['sesuai']['province_code'] ?? null;
@endphp
<option value="{{ $province->code }}"
@@ -274,7 +273,6 @@
<select id="city_code" name="city_code" class="select w-full">
@php
$selectedCity = $inspectionData['alamat']['sesuai']['city_code'] ?? null;
@endphp
<option value="">Pilih Kota/Kabupaten</option>
@@ -302,8 +300,7 @@
<select id="district_code" name="district_code" class="select w-full">
@php
$selectedDisrict =
$inspectionData['alamat']['sesuai']['district_code'] ?? null;
$selectedDisrict = $inspectionData['alamat']['sesuai']['district_code'] ?? null;
@endphp
<option value="">Pilih Kecamatan</option>
@if (isset($selectedDisrict))
@@ -331,8 +328,7 @@
<select id="village_code" name="village_code" class="select w-full">
@php
$selectedDesa =
$inspectionData['alamat']['sesuai']['village_code'] ?? null;
$selectedDesa = $inspectionData['alamat']['sesuai']['village_code'] ?? null;
@endphp
<option value="">Pilih Kecamatan</option>
@if (isset($selectedDesa))
@@ -346,8 +342,7 @@
</select>
</td>
<td class="px-4 py-2">
<select id="village_code_pembanding" name="village_code_pembanding[]"
class="input w-full">
<select id="village_code_pembanding" name="village_code_pembanding[]" class="input w-full">
<option value="">Pilih Desa/Kelurahan</option>
</select>
</td>
@@ -360,7 +355,7 @@
<tr>
<td class="px-4 py-2">Harga</td>
<td class="px-4 py-2">
<input type="text" name="harga" class="input currency-format"
<input type="text" name="harga" class="input currency"
value="{{ $inspectionData['harga'] ?? '' }}">
</td>
<td class="px-4 py-2">

View File

@@ -103,16 +103,13 @@
});
}
// $('.card-title a').on('click', function(e) {
// e.preventDefault();
// var url = $(this).attr('href');
$('.card-title a').on('click', function(e) {
e.preventDefault();
var url = $(this).attr('href');
$.get(url, function(response) {
$('.card-body').html(response);
});
});
// $.get(url, function(response) {
// $('.card-body').html(response);
// });
// });
</script>
@endpush

View File

@@ -562,7 +562,7 @@ Route::middleware(['auth'])->group(function () {
Route::get('/{id}/show', [PenilaiController::class, 'show'])->name('show');
Route::get('datatables', [PenilaiController::class, 'dataForDatatables'])->name('dataForTables');
Route::get('lampiran/{id}', [PenilaiController::class, 'lampiran'])->name('lampiran');
Route::get('lampiran', [PenilaiController::class, 'lampiran'])->name('lampiran');
Route::get('export/kertas-kerja', [PenilaiController::class, 'export_kertas_kerja'])->name('export.kertas-kerja');
Route::get('print-out', [PenilaiController::class, 'print_out'])->name('print-out');
@@ -581,6 +581,7 @@ Route::middleware(['auth'])->group(function () {
Route::post('storeResume', [PenilaiController::class, 'storeResume'])->name('storeResume');
Route::post('storeMemo', [PenilaiController::class, 'storeMemo'])->name('storeMemo');
Route::post('storeRap', [PenilaiController::class, 'storeRap'])->name('storeRap');
Route::post('storeLpjSederhanadanStandard', [PenilaiController::class, 'storeLpjSederhanadanStandard'])->name('storeLpjSederhanadanStandard');
});