penambahan kirim email, dan perbaikan print out
This commit is contained in:
63
app/Emails/SendJadwalKunjunganEmail.php
Normal file
63
app/Emails/SendJadwalKunjunganEmail.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Emails;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class SendJadwalKunjunganEmail extends Mailable
|
||||
{
|
||||
/**
|
||||
* ID Penilaian.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* Waktu Penilaian.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $waktu_penilaian;
|
||||
|
||||
/**
|
||||
* Deskripsi Penilaian.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $deskripsi_penilaian;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param array $emailData
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(array $emailData)
|
||||
{
|
||||
// Validasi data yang diterima
|
||||
if (!isset($emailData['emailData']['id']) ||
|
||||
!isset($emailData['emailData']['waktu_penilaian']) ||
|
||||
!isset($emailData['emailData']['deskripsi_penilaian'])) {
|
||||
throw new \InvalidArgumentException("Data email tidak lengkap.");
|
||||
}
|
||||
|
||||
$this->id = $emailData['emailData']['id'];
|
||||
$this->waktu_penilaian = $emailData['emailData']['waktu_penilaian'];
|
||||
$this->deskripsi_penilaian = $emailData['emailData']['deskripsi_penilaian'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->subject('Jadwal Kunjungan Penilaian Resmi')
|
||||
->view('lpj::emails.jadwal-kunjungan');
|
||||
}
|
||||
}
|
||||
@@ -385,6 +385,77 @@ class PenilaiController extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function call_report(Request $request)
|
||||
{
|
||||
|
||||
$permohonanId = $request->query('permohonanId');
|
||||
$documentId = $request->query('documentId');
|
||||
$inspeksiId = $request->query('inspeksiId');
|
||||
$jaminanId = $request->query('jaminanId');
|
||||
$provinces = Province::all();
|
||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||
// $nomorLaporan = $this->generateNoLaporan($permohonan, $documentId, 'rap');
|
||||
// $basicData = $this->surveyorController->getCommonData();
|
||||
// $inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
// Penilai::updateOrCreate(
|
||||
// [
|
||||
// 'permohonan_id' => $permohonanId,
|
||||
// 'dokument_id' => $documentId,
|
||||
// 'inspeksi_id' => $inspeksiId,
|
||||
// ],
|
||||
// [
|
||||
// 'type_penilai' => 'call-report',
|
||||
// ]
|
||||
// );
|
||||
|
||||
// $resume = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
|
||||
// $lpjData = null;
|
||||
// $rap = null;
|
||||
// $forminspeksi = null;
|
||||
// if ($resume) {
|
||||
// $forminspeksi = json_decode($inspeksi->data_form, true);
|
||||
// $rap = json_decode($resume->rap, true);
|
||||
// }
|
||||
// Default: gunakan data dari debitur
|
||||
// $debitur = Debiture::find($permohonan->debiture_id);
|
||||
|
||||
// $provinceCode = $debitur->province_code;
|
||||
// $cityCode = $debitur->city_code;
|
||||
// $districtCode = $debitur->district_code;
|
||||
|
||||
// $cekAlamat = $forminspeksi['asset']['alamat']['tidak sesuai'] ?? null;
|
||||
|
||||
// if ($cekAlamat) {
|
||||
// $provinceCode = $cekAlamat['province_code'] ?? $provinceCode;
|
||||
// $cityCode = $cekAlamat['city_code'] ?? $cityCode;
|
||||
// $districtCode = $cekAlamat['district_code'] ?? $districtCode;
|
||||
// }
|
||||
|
||||
// $cities = City::where('province_code', $provinceCode)->get();
|
||||
// $districts = District::where('city_code', $cityCode)->get();
|
||||
// $villages = Village::where('district_code', $districtCode)->get();
|
||||
|
||||
// if ($forminspeksi) {
|
||||
// if (isset($forminspeksi['alamat']['sesuai']['province_code'])) {
|
||||
// $cities = City::where('province_code', $forminspeksi['alamat']['sesuai']['province_code'])->get();
|
||||
// }
|
||||
|
||||
// if (isset($forminspeksi['alamat']['sesuai']['city_code'])) {
|
||||
// $districts = District::where('city_code', $forminspeksi['alamat']['sesuai']['city_code'])->get();
|
||||
// }
|
||||
|
||||
// if (isset($forminspeksi['alamat']['sesuai']['district_code'])) {
|
||||
// $villages = Village::where('district_code', $forminspeksi['alamat']['sesuai']['district_code'])->get();
|
||||
// }
|
||||
// }
|
||||
|
||||
// return view('lpj::penilai.components.call-report', compact('permohonan', 'rap', 'provinces', 'cities',
|
||||
// 'districts',
|
||||
// 'villages','forminspeksi', 'noLpRAP', 'basicData','cekAlamat'));
|
||||
return view('lpj::penilai.components.call-report', compact('permohonan'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
@@ -1022,7 +1093,8 @@ class PenilaiController extends Controller
|
||||
'standard' => 'penilai.components.print-out-standard',
|
||||
'resume' => 'penilai.components.print-resume',
|
||||
'memo' => 'penilai.components.print-memo',
|
||||
'rap' => 'penilai.components.print-out-rap'
|
||||
'rap' => 'penilai.components.print-out-rap',
|
||||
'call-report' => 'penilai.components.print-out-call-report'
|
||||
];
|
||||
return $viewMap[$tipe] ?? 'penilai.components.print-resume';
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Str;
|
||||
use Barryvdh\DomPDF\Facade\Pdf;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Lpj\Models\Debiture;
|
||||
use Modules\Lpj\Models\Permohonan;
|
||||
@@ -77,16 +79,15 @@ use Modules\Lpj\Models\LaluLintasLokasi;
|
||||
use Modules\Lpj\Models\SpekBagunanAnalisaDetail;
|
||||
use Modules\Lpj\Http\Requests\SurveyorRequest;
|
||||
use Modules\Lpj\Http\Requests\FormSurveyorRequest;
|
||||
use Modules\Lpj\Emails\SendEmail;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Modules\Lpj\Emails\SendJadwalKunjunganEmail;
|
||||
|
||||
class SurveyorController extends Controller
|
||||
{
|
||||
public $user;
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
return view('lpj::surveyor.index');
|
||||
@@ -899,8 +900,6 @@ class SurveyorController extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function checkButtonStatus($id)
|
||||
{
|
||||
try {
|
||||
@@ -969,24 +968,24 @@ class SurveyorController extends Controller
|
||||
'deskripsi_penilaian' => 'required'
|
||||
]);
|
||||
|
||||
// $user = ['user' => 'rustammajid76@gmail.com'];
|
||||
$penilaian = Penilaian::findOrFail($validate['id']);
|
||||
|
||||
// $emailData = [
|
||||
// 'email' => 'rustammajid76@gmail.com',
|
||||
// 'subject' => 'Test',
|
||||
// 'emailData' => '<h2>Hello, World!</h2><h2>This is the email content. Waktu Penilaian:</h2>'
|
||||
// ];
|
||||
$emailData = [
|
||||
'email' => $penilaian->permohonan->user->email,
|
||||
'subject' => 'Jadwal Kunjungan',
|
||||
'emailData' => $validate,
|
||||
|
||||
// $this->sendMessage($emailData, $user);
|
||||
];
|
||||
|
||||
$id = $request->input('id');
|
||||
$penilaian = Penilaian::findOrFail($id);
|
||||
Mail::to($emailData['email'])->send(new SendJadwalKunjunganEmail($emailData, $penilaian->permohonan->nomor_resitrasi, $penilaian->permohonan->debiture));
|
||||
|
||||
if ($validate['waktu_penilaian'] <= $penilaian->tanggal_kunjungan) {
|
||||
|
||||
if (Carbon::parse($validate['waktu_penilaian']) <= Carbon::parse($penilaian->tanggal_kunjungan)) {
|
||||
return redirect()
|
||||
->route('surveyor.index')
|
||||
->with('error', 'Waktu penilaian harus lebih besar dari tanggal assign.');
|
||||
}
|
||||
|
||||
$penilaian->update([
|
||||
'waktu_penilaian' => $validate['waktu_penilaian'],
|
||||
'deskripsi_penilaian' => $validate['deskripsi_penilaian'],
|
||||
|
||||
118
resources/views/emails/jadwal-kunjungan.blade.php
Normal file
118
resources/views/emails/jadwal-kunjungan.blade.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Jadwal Kunjungan</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #f3f4f6;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.email-container {
|
||||
max-width: 42rem;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
padding-bottom: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: #1f2937;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
color: #4b5563;
|
||||
margin: 0.25rem 0 0 0;
|
||||
}
|
||||
|
||||
.content-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.content-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
width: 8rem;
|
||||
font-weight: 500;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #111827;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 2rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid #e5e7eb;
|
||||
font-size: 0.875rem;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.content-row {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.label {
|
||||
margin-bottom: 0.5rem;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="email-container">
|
||||
<!-- Header -->
|
||||
<div class="header">
|
||||
<h1 class="title">Jadwal Kunjungan Penilaian</h1>
|
||||
<p class="subtitle">Dikirim melalui Sistem Penilaian</p>
|
||||
</div>
|
||||
|
||||
<!-- Content -->
|
||||
<div class="content">
|
||||
<div class="content-row">
|
||||
<span class="label">ID Penilaian:</span>
|
||||
<span class="value">{{ $id }}</span>
|
||||
</div>
|
||||
|
||||
<div class="content-row">
|
||||
<span class="label">Waktu Penilaian:</span>
|
||||
<span class="value">{{ \Carbon\Carbon::parse($waktu_penilaian)->format('d F Y H:i') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="content-row">
|
||||
<span class="label">Deskripsi:</span>
|
||||
<p class="value">{{ $deskripsi_penilaian }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="footer">
|
||||
<p>Email ini dikirim secara otomatis, mohon tidak membalas email ini.</p>
|
||||
<p style="margin-top: 0.5rem;">© {{ date('Y') }} Sistem Penilaian. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
596
resources/views/penilai/components/call-report.blade.php
Normal file
596
resources/views/penilai/components/call-report.blade.php
Normal file
@@ -0,0 +1,596 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
@php
|
||||
$senior_officer = null;
|
||||
if ($permohonan->debiture && $permohonan->debiture->documents) {
|
||||
foreach ($permohonan->debiture->documents as $dokumen) {
|
||||
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
||||
$teams = $permohonan->region->teams;
|
||||
|
||||
if ($teams) {
|
||||
foreach ($teams as $team) {
|
||||
$team_users = $team->teamsUsers;
|
||||
// print_r($team_users);
|
||||
if ($team_users) {
|
||||
foreach ($team_users as $team_user) {
|
||||
$user = $team_user->user;
|
||||
|
||||
if ($user && $user->hasRole('senior-officer')) {
|
||||
$senior_officer = $user;
|
||||
break 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@endphp
|
||||
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||
@csrf
|
||||
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi ?? ''}}">
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id ?? "" }}">
|
||||
<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::surveyor.components.header')
|
||||
@include('lpj::surveyor.components.callReport') --}}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
CALL Report
|
||||
</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=" {{ $callReport['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="{{ $callReport['dari'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Nomor Laporan</label>
|
||||
<div class="flex flex-wrap items-base line w-full">
|
||||
<input type="text" name="nomor_rap" class="input w-full" placeholder="Masukkan..."
|
||||
value="{{ $nomorLaporan ?? '' }}" @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="{{ $callReport['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="{{ $callReport['perihal'] ?? '' }}">
|
||||
</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">Menindak lanjuti permintaan <b>
|
||||
{{$permohonan->tujuanPenilaian->name ?? ''}}</b>, BAG CABang <b>{{ $permohonan->branch->name }}</b>
|
||||
disampaikan hal sebagai berikut:
|
||||
</h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="grid gap-5 w-full">
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<div class="grid gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="lokasi" class="form-label max-w-56">Nama Debitur</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') }}">
|
||||
</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">KJPP</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') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Jenis Aset</label>
|
||||
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
|
||||
<select id="jenis_asset_tidak_sesuai" class="input w-full" name="jenis_asset_tidak_sesuai">
|
||||
<option value="">Select Jenis asset</option>
|
||||
@isset($basicData['jenisJaminan'] )
|
||||
@foreach ($basicData['jenisJaminan'] as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ ($memo->jenis_asset_tidak_sesuai ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endisset
|
||||
</select>
|
||||
</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">Lokasi Objek Penilaian</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') }}">
|
||||
</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">Dokumen </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') }}">
|
||||
</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">Tanggal Penilaian </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') }}">
|
||||
</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">Lelang ke </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') }}">
|
||||
</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="penilai" class="form-label max-w-56">Nilai Likuidasi (NL)</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="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</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">Penilaian ke lokasi objek telah dilakukan oleh :
|
||||
</h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="grid gap-5 w-full">
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<div class="grid gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="staf" class="form-label max-w-56">Staf Subdit Appraisal </label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="staf" name="staf" class="input w-full"
|
||||
placeholder="Masukkan Nama Staff"
|
||||
value="{{ $penilai->userPenilaiTeam->name ?? "" }}" @readonly(true)>
|
||||
</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">Pihak KJPP</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="pihak_kjjpp" class="input w-full"
|
||||
placeholder="Masukkan Pihak KJPP"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="pihak_bag" name="pihak_bag" class="input w-full"
|
||||
placeholder="Masukkan Pihak Bag"
|
||||
value="{{ $permohonan->user->name ?? '' }}" @readonly(true)>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="debitur_perwakilan" name="debitur_perwakilan" class="input w-full"
|
||||
placeholder="Masukkan Penilai"
|
||||
value="{{ $permohonan->debiture->name ?? '' }}" @readonly(true)>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
Informasi yang didapatkan sebagai berikut :
|
||||
</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">Faktor Positif</label>
|
||||
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
||||
@if (!empty($callReport['fakta']['fakta_positif']))
|
||||
@foreach ($callReport['fakta']['fakta_positif'] as $index => $positif)
|
||||
<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>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="fakta_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>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-positif-container', 'fakta_positif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||
@if (!empty($callReport['fakta']['fakta_negatif']))
|
||||
@foreach ($callReport['fakta']['fakta_negatif'] as $index => $negatif)
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old("fakta_negatif.$index", $negatif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $callReport['fakta']['fakta_negatif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-negatif-container', 'fakta_negatif')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||
<button type="button" class="btn btn-primary" id="saveButton" onclick="submitData()">
|
||||
<i class="ki-filled ki-save-2"></i>
|
||||
<span id="saveButtonText">Save</span>
|
||||
</button>
|
||||
@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
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
{{-- <script type="text/javascript">
|
||||
const callReport = @json($forminspeksi ?? '');
|
||||
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() {
|
||||
showLoadingSwal('Mengirim data ke server...');
|
||||
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: requestUrl,
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
hideLoadingSwal();
|
||||
if (response.success) {
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
// window.location.reload();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: response.message || 'Terjadi kesalahan',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
|
||||
let errors = xhr.responseJSON?.errors;
|
||||
$('.alert').text('');
|
||||
if (errors) {
|
||||
$.each(errors, function(key, value) {
|
||||
$(`#error-${key}`).text(value[0]);
|
||||
toastrErrorBuild(value[0]);
|
||||
});
|
||||
// toastrErrorBuild(error);
|
||||
}
|
||||
hideLoadingSwal();
|
||||
console.log(errors);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Ensure existing remove buttons are functional
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
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() {
|
||||
formatNumber(this);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function updateAnalisa(params) {
|
||||
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> --}}
|
||||
@include('lpj::surveyor.js.utils')
|
||||
@endpush
|
||||
@@ -30,21 +30,21 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Harga Penawaran</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>Rp. {{ $item['harga_diskon'] }}</span>
|
||||
<span>Rp. {{ $item['harga'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Penjualan (HP)</label>
|
||||
<label class="form-label max-w-56">Penjual (HP)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>Rp. {{ $item['harga'] }}</span>
|
||||
<span>{{ $item['telepon'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Ditawarkan sejak</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<span>Rp. {{ $item['harga'] }}</span>
|
||||
<span>{{ $item['penawaran'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -862,9 +862,31 @@
|
||||
D. ASURANSI
|
||||
</td>
|
||||
</tr>
|
||||
@if (!empty($lpjData['asuransi_luas_bangunan']))
|
||||
<tr>
|
||||
<td><table border="1" style="width: 100%; border-collapse: collapse; margin-bottom: 10px;">
|
||||
<tr>
|
||||
|
||||
<td style="border: 1px solid #000; padding: 4px;">Luas Bangunan</td>
|
||||
<td style="border: 1px solid #000; padding: 4px;">Harga</td>
|
||||
<td style="border: 1px solid #000; padding: 4px;">Nilai Pasar Wajar (Rp)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="border: 1px solid #000; padding: 4px;">{{ $lpjData['asuransi_luas_bangunan'] ?? '' }}</td>
|
||||
|
||||
<td style="border: 1px solid #000; padding: 4px;">{{ formatRupiah($lpjData['asuransi_nilai_1']) ?? '' }}</td>
|
||||
<td style="border: 1px solid #000; padding: 4px;">{{ formatRupiah($lpjData['asuransi_nilai_2']) ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td>Tidak Ada</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
|
||||
<table style="width: 100%">
|
||||
@@ -1035,7 +1057,7 @@
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="border: 1px solid #000;">
|
||||
G. CATATAN YANG PERLU DI PERHATIKAN
|
||||
G. ANALISA FAKTA
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1068,6 +1090,65 @@
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Batas batas</strong></td>
|
||||
<td>
|
||||
@foreach ($forminspeksi['fakta']['batas_batas_input'] ?? [] as $arah => $batas)
|
||||
@if ($batas)
|
||||
<p> - {{ $arah }} : {{ $batas }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Informasi Dinas Tata Ruang</strong>
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$informasi = [
|
||||
'peruntukan',
|
||||
'kdb',
|
||||
'kdh',
|
||||
'gsb',
|
||||
'max_lantai',
|
||||
'klb',
|
||||
'gss',
|
||||
'pelebaran_jalan',
|
||||
'nama_petugas',
|
||||
];
|
||||
@endphp
|
||||
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
<p> - {{ ucfirst(str_replace('_', ' ', $key)) }}:
|
||||
{{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['keterangan']))
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Catatan yang Perlu Diperhatikan</strong></td>
|
||||
<td>
|
||||
@php
|
||||
$keterangan = $forminspeksi['fakta']['keterangan'] ?? '';
|
||||
if (is_array($keterangan)) {
|
||||
$keterangan = implode(', ', array_filter($keterangan));
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if (!empty($keterangan))
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td>{{ $keterangan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<title>Laporan Penilai jaminan</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
font-size: 8px;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -498,7 +498,8 @@
|
||||
@if (json_decode($detail->details))
|
||||
@foreach (json_decode($detail->details) as $key => $value)
|
||||
@if (!is_null($value) && $value !== '')
|
||||
<td style=" padding: 2px;">{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}</td>
|
||||
<td style=" padding: 2px;">
|
||||
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}</td>
|
||||
|
||||
<td style=" padding: 2px;">{{ $value }}
|
||||
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
||||
@@ -549,7 +550,8 @@
|
||||
@php $count++; @endphp
|
||||
|
||||
@if ($count % 3 === 0)
|
||||
</tr><tr>
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@@ -1318,11 +1320,31 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table class="checkbox-table">
|
||||
<table>
|
||||
@if (!empty($lpjData['asuransi_luas_bangunan']))
|
||||
<tr>
|
||||
<td><input type="checkbox" checked> Tidak Ada</td>
|
||||
<td><input type="checkbox"> Ada</td>
|
||||
|
||||
<td width="25%">Luas Bangunan</td>
|
||||
<td style="">
|
||||
{{ $lpjData['asuransi_luas_bangunan'] ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="">Harga</td>
|
||||
<td style="">
|
||||
{{ formatRupiah($lpjData['asuransi_nilai_1']) ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="">Nilai Pasar Wajar (Rp)</td>
|
||||
|
||||
<td style="">
|
||||
{{ formatRupiah($lpjData['asuransi_nilai_2']) ?? '' }}</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td>Tidak Ada</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1386,33 +1408,54 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- Lain-lain --}}
|
||||
@if (!empty($forminspeksi['fakta']['rute_menuju']))
|
||||
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Lain - lain :</strong></td>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Rute Menuju</strong></td>
|
||||
<td>
|
||||
@foreach ($forminspeksi['fakta']['keterangan'] ?? [] as $keterangan)
|
||||
<p>{!! nl2br(e($keterangan)) !!}</p>
|
||||
@endforeach
|
||||
<p>{{ $forminspeksi['fakta']['rute_menuju'] ?? '' }}</p>
|
||||
|
||||
@foreach ($forminspeksi['fakta']['informasi_dokument'] ?? [] as $informasi)
|
||||
<p>{!! nl2br(e($informasi)) !!}</p>
|
||||
@endforeach
|
||||
|
||||
@foreach ($forminspeksi['fakta']['kondisi_lingkungan'] ?? [] as $kondisi)
|
||||
<p>{!! nl2br(e($kondisi)) !!}</p>
|
||||
@endforeach
|
||||
{!! nl2br(e($forminspeksi['fakta']['rute_menuju'] ?? '')) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['batas_batas_input']))
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Batas batas</strong></td>
|
||||
<td>
|
||||
@foreach ($forminspeksi['fakta']['batas_batas_input'] ?? [] as $arah => $batas)
|
||||
@if ($batas)
|
||||
<p> - {{ $arah }} : {{ $batas }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@foreach ($forminspeksi['fakta']['kondisi_lain_bangunan'] ?? [] as $kondisiLain)
|
||||
<p>{!! nl2br(e($kondisiLain)) !!}</p>
|
||||
@if (!empty($forminspeksi['fakta']['kondisi_lingkungan']))
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Kondisi Lingkungan</strong></td>
|
||||
<td>
|
||||
@foreach ($forminspeksi['fakta']['kondisi_lingkungan'] ?? [] as $kondisi)
|
||||
<p>{!! nl2br(e($kondisi)) !!}</p>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (!empty($forminspeksi['fakta']['informasi_dokument']))
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Informasi Lain terkait Dokumen</strong></td>
|
||||
<td>
|
||||
@foreach ($forminspeksi['fakta']['informasi_dokument'] ?? [] as $informasi)
|
||||
<p>{!! nl2br(e($informasi)) !!}</p>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Informasi Dinas Tata Ruang</strong>
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$informasi = [
|
||||
'peruntukan',
|
||||
@@ -1434,10 +1477,32 @@
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['keterangan']))
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Catatan yang Perlu Diperhatikan</strong></td>
|
||||
<td>
|
||||
@php
|
||||
$keterangan = $forminspeksi['fakta']['keterangan'] ?? '';
|
||||
if (is_array($keterangan)) {
|
||||
$keterangan = implode(', ', array_filter($keterangan));
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if (!empty($keterangan))
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td>{{ $keterangan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
{{-- Lain-lain --}}
|
||||
|
||||
<tr>
|
||||
<td>2. Informasi Harga:</td>
|
||||
</tr>
|
||||
@@ -1522,14 +1587,14 @@
|
||||
@foreach ($labelNilai as $key => $label)
|
||||
@if (isset($lpjData['luas_' . $key]))
|
||||
<tr>
|
||||
<td style="padding: 3px; text-align: right; width:10%; ">
|
||||
<td style="padding: 3px; text-align: right; width:45%; ">
|
||||
{{ $label }} {{ $lpjData['luas_' . $key] ?? '' }} m<sup>2</sup>
|
||||
</td>
|
||||
<td style="padding: 3px; width:10%;">
|
||||
<td style="padding: 3px; width:5%;">
|
||||
<span style="padding-left:20px; padding-right: 20px">X</span> Rp
|
||||
{{ $lpjData['nilai_' . $key . '_1'] ?? '' }}
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; width:70%;">
|
||||
<td style="padding: 3px; text-align: left; width:60%;">
|
||||
<span style="padding-left:20px; padding-right: 20px"> = </span> Rp
|
||||
{{ $lpjData['nilai_' . $key . '_2'] ?? '' }}
|
||||
</td>
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
@isset($resumeData['fakta']['fakta_positif'])
|
||||
@foreach ($resumeData['fakta']['fakta_positif'] as $key => $item)
|
||||
<tr>
|
||||
<td>{{ $item }}</td>
|
||||
<td>{!! nl2br(e($item)) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endisset
|
||||
@@ -298,7 +298,7 @@
|
||||
@isset($resumeData['fakta']['fakta_negatif'])
|
||||
@foreach ($resumeData['fakta']['fakta_negatif'] as $key => $item)
|
||||
<tr>
|
||||
<td>{{ $item }}</td>
|
||||
<td>{!! nl2br(e($item)) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endisset
|
||||
@@ -404,7 +404,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $resumeData['keterangan'] ?? '' }}</td>
|
||||
<td>{!! nl2br(e($resumeData['keterangan'] ?? '' )) !!}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -279,9 +279,37 @@
|
||||
<span class="menu-title">LPJ</span>
|
||||
</a>
|
||||
</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
|
||||
|
||||
@if ($permohonan->penilaian->jenis_penilaian_id == 2 && $permohonan->tujuanPenilaian->id == 4)
|
||||
<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
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -566,6 +594,13 @@
|
||||
});
|
||||
}
|
||||
|
||||
function callReport(permohonanId, documentId, inspeksiId, jaminanId) {
|
||||
showLoadingSwal('Tunggu ...');
|
||||
window.location.href =
|
||||
`{{ route('penilai.call-report') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||
}
|
||||
|
||||
|
||||
function savePenilai() {
|
||||
showLoadingSwal('Mengirim data keserver ...');
|
||||
$.ajax({
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
$inspeksiId = null;
|
||||
$documentId = null;
|
||||
$jenisJaminanId = null;
|
||||
foreach ($permohonan->debiture->documents as $item) {
|
||||
foreach ($permohonan->documents as $item) {
|
||||
foreach ($item->inspeksi as $key => $value) {
|
||||
$inspeksiId = $value->id;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,8 @@
|
||||
<i class="ki-filled ki-save-2"></i>
|
||||
<span id="saveButtonText">Save</span>
|
||||
</button>
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('dokument'), 'jenis_jaminan_id' => request('jenis_jaminan')]) }}" class="btn btn-info" id="saveButton">
|
||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('dokument'), 'jenis_jaminan_id' => request('jenis_jaminan')]) }}"
|
||||
class="btn btn-info" id="saveButton">
|
||||
<i class="ki-filled ki-printer"></i>
|
||||
<span>Print Out</span>
|
||||
</a>
|
||||
@@ -80,7 +81,6 @@
|
||||
@push('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/signature_pad@4.1.7/dist/signature_pad.umd.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const datas = @json($forminspeksi ?? '');
|
||||
console.log(datas);
|
||||
|
||||
@@ -347,6 +347,17 @@ const datas = @json($forminspeksi ?? '');
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
hideLoadingSwal();
|
||||
if (status === 'timeout') {
|
||||
Swal.fire({
|
||||
title: 'Timeout!',
|
||||
text: 'Waktu permintaan habis. Silakan coba lagi.',
|
||||
icon: 'warning',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let errors = xhr.responseJSON?.errors;
|
||||
$('.alert').text('');
|
||||
@@ -355,11 +366,16 @@ const datas = @json($forminspeksi ?? '');
|
||||
$(`#error-${key}`).text(value[0]);
|
||||
toastrErrorBuild(value[0]);
|
||||
});
|
||||
// toastrErrorBuild(error);
|
||||
}
|
||||
hideLoadingSwal();
|
||||
console.log(errors);
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: xhr.responseJSON?.message || 'Terjadi kesalahan saat mengirim data.',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
},
|
||||
timeout: 10000
|
||||
});
|
||||
}
|
||||
|
||||
@@ -380,10 +396,6 @@ const datas = @json($forminspeksi ?? '');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script></script>
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
function jadwal(id) {
|
||||
document.getElementById('ids').value = id;
|
||||
}
|
||||
|
||||
function surveyorFreeze(permohonanId, noReg, debitur) {
|
||||
|
||||
Swal.fire({
|
||||
@@ -256,26 +257,42 @@
|
||||
title: 'Action',
|
||||
render: (item, data) => {
|
||||
let actionHtml = '';
|
||||
// if (data.documents.length > 0) {
|
||||
|
||||
if (data.penilaian.waktu_penilaian == null || data.penilaian.waktu_penilaian && data
|
||||
.penilaian.authorized_status == null) {
|
||||
if (data.penilaian.waktu_penilaian == null ||
|
||||
(data.penilaian.waktu_penilaian && data.penilaian.authorized_status == null)) {
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-primary" data-modal-toggle="#modal_jadwal" onclick="jadwal(${data.penilaian.id})" title="Buat Jadwal Kunjungan">
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-primary"
|
||||
data-modal-toggle="#modal_jadwal"
|
||||
onclick="jadwal(${data.penilaian.id})"
|
||||
title="Buat Jadwal Kunjungan">
|
||||
<i class="ki-filled ki-calendar-edit"></i>
|
||||
</a>
|
||||
`;
|
||||
} else {
|
||||
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-warning" href="surveyor/${data.id}/show?form=inspeksi" title="Lihat Form Inspeksi">
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-warning"
|
||||
href="surveyor/${data.id}/show?form=inspeksi"
|
||||
title="Lihat Form Inspeksi">
|
||||
<i class="ki-outline ki-eye"></i>
|
||||
</a>
|
||||
<button type="button" class="btn btn-sm btn-icon btn-clear btn-info" onclick="surveyorFreeze('${data.id}', '${data.nomor_registrasi}', '${data.debiture?.name}')" title="Freeze Survey">
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-icon btn-clear btn-info"
|
||||
onclick="surveyorFreeze('${data.id}', '${data.nomor_registrasi}', '${data.debiture?.name}')"
|
||||
title="Freeze Survey">
|
||||
<i class="ki-filled ki-arrow-circle-right"></i>
|
||||
</button>
|
||||
`;
|
||||
}
|
||||
// } else {
|
||||
|
||||
// actionHtml =
|
||||
// `<span class="badge badge-sm badge-danger uppercase flex justify-center">Lengkapi Aset Jaminan</span>`;
|
||||
// }
|
||||
|
||||
return actionHtml;
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -643,6 +643,11 @@
|
||||
$trail->push('RAP');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('penilai.call-report', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('penilai.show');
|
||||
$trail->push('Call Report');
|
||||
});
|
||||
|
||||
|
||||
Breadcrumbs::for('sla', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('basicdata');
|
||||
|
||||
@@ -595,6 +595,7 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::get('resume', [PenilaiController::class, 'resume'])->name('resume');
|
||||
Route::get('memo', [PenilaiController::class, 'memo'])->name('memo');
|
||||
Route::get('paparan', [PenilaiController::class, 'paparan'])->name('paparan');
|
||||
Route::get('call-report', [PenilaiController::class, 'call_report'])->name('call-report');
|
||||
Route::post('storePaparan/{id}', [PenilaiController::class, 'storePaparan'])->name('storePaparan');
|
||||
Route::get('rap', [PenilaiController::class, 'rap'])->name('rap');
|
||||
Route::get('/check-status-lpj', [PenilaiController::class, 'checkStatusLpj'])->name('check.status.lpj');
|
||||
|
||||
Reference in New Issue
Block a user