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.
|
* Remove the specified resource from storage.
|
||||||
*/
|
*/
|
||||||
@@ -1022,7 +1093,8 @@ class PenilaiController extends Controller
|
|||||||
'standard' => 'penilai.components.print-out-standard',
|
'standard' => 'penilai.components.print-out-standard',
|
||||||
'resume' => 'penilai.components.print-resume',
|
'resume' => 'penilai.components.print-resume',
|
||||||
'memo' => 'penilai.components.print-memo',
|
'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';
|
return $viewMap[$tipe] ?? 'penilai.components.print-resume';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ use Illuminate\Support\Facades\Auth;
|
|||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Barryvdh\DomPDF\Facade\Pdf;
|
use Barryvdh\DomPDF\Facade\Pdf;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Modules\Lpj\Models\Debiture;
|
use Modules\Lpj\Models\Debiture;
|
||||||
use Modules\Lpj\Models\Permohonan;
|
use Modules\Lpj\Models\Permohonan;
|
||||||
@@ -77,16 +79,15 @@ use Modules\Lpj\Models\LaluLintasLokasi;
|
|||||||
use Modules\Lpj\Models\SpekBagunanAnalisaDetail;
|
use Modules\Lpj\Models\SpekBagunanAnalisaDetail;
|
||||||
use Modules\Lpj\Http\Requests\SurveyorRequest;
|
use Modules\Lpj\Http\Requests\SurveyorRequest;
|
||||||
use Modules\Lpj\Http\Requests\FormSurveyorRequest;
|
use Modules\Lpj\Http\Requests\FormSurveyorRequest;
|
||||||
use Modules\Lpj\Emails\SendEmail;
|
use Modules\Lpj\Emails\SendJadwalKunjunganEmail;
|
||||||
use Illuminate\Support\Facades\Mail;
|
|
||||||
|
|
||||||
class SurveyorController extends Controller
|
class SurveyorController extends Controller
|
||||||
{
|
{
|
||||||
public $user;
|
public $user;
|
||||||
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*/
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return view('lpj::surveyor.index');
|
return view('lpj::surveyor.index');
|
||||||
@@ -899,8 +900,6 @@ class SurveyorController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function checkButtonStatus($id)
|
public function checkButtonStatus($id)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -969,24 +968,24 @@ class SurveyorController extends Controller
|
|||||||
'deskripsi_penilaian' => 'required'
|
'deskripsi_penilaian' => 'required'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// $user = ['user' => 'rustammajid76@gmail.com'];
|
$penilaian = Penilaian::findOrFail($validate['id']);
|
||||||
|
|
||||||
// $emailData = [
|
$emailData = [
|
||||||
// 'email' => 'rustammajid76@gmail.com',
|
'email' => $penilaian->permohonan->user->email,
|
||||||
// 'subject' => 'Test',
|
'subject' => 'Jadwal Kunjungan',
|
||||||
// 'emailData' => '<h2>Hello, World!</h2><h2>This is the email content. Waktu Penilaian:</h2>'
|
'emailData' => $validate,
|
||||||
// ];
|
|
||||||
|
|
||||||
// $this->sendMessage($emailData, $user);
|
];
|
||||||
|
|
||||||
$id = $request->input('id');
|
Mail::to($emailData['email'])->send(new SendJadwalKunjunganEmail($emailData, $penilaian->permohonan->nomor_resitrasi, $penilaian->permohonan->debiture));
|
||||||
$penilaian = Penilaian::findOrFail($id);
|
|
||||||
|
|
||||||
if ($validate['waktu_penilaian'] <= $penilaian->tanggal_kunjungan) {
|
|
||||||
|
if (Carbon::parse($validate['waktu_penilaian']) <= Carbon::parse($penilaian->tanggal_kunjungan)) {
|
||||||
return redirect()
|
return redirect()
|
||||||
->route('surveyor.index')
|
->route('surveyor.index')
|
||||||
->with('error', 'Waktu penilaian harus lebih besar dari tanggal assign.');
|
->with('error', 'Waktu penilaian harus lebih besar dari tanggal assign.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$penilaian->update([
|
$penilaian->update([
|
||||||
'waktu_penilaian' => $validate['waktu_penilaian'],
|
'waktu_penilaian' => $validate['waktu_penilaian'],
|
||||||
'deskripsi_penilaian' => $validate['deskripsi_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">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Harga Penawaran</label>
|
<label class="form-label max-w-56">Harga Penawaran</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<span>Rp. {{ $item['harga_diskon'] }}</span>
|
<span>Rp. {{ $item['harga'] }}</span>
|
||||||
</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">Penjualan (HP)</label>
|
<label class="form-label max-w-56">Penjual (HP)</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<span>Rp. {{ $item['harga'] }}</span>
|
<span>{{ $item['telepon'] }}</span>
|
||||||
</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">Ditawarkan sejak</label>
|
<label class="form-label max-w-56">Ditawarkan sejak</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<span>Rp. {{ $item['harga'] }}</span>
|
<span>{{ $item['penawaran'] }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -862,9 +862,31 @@
|
|||||||
D. ASURANSI
|
D. ASURANSI
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td>Tidak Ada</td>
|
<td>Tidak Ada</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@endif
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
@@ -1035,7 +1057,7 @@
|
|||||||
<table style="width: 100%;">
|
<table style="width: 100%;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border: 1px solid #000;">
|
<td style="border: 1px solid #000;">
|
||||||
G. CATATAN YANG PERLU DI PERHATIKAN
|
G. ANALISA FAKTA
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1068,6 +1090,65 @@
|
|||||||
@endisset
|
@endisset
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
</table>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
<title>Laporan Penilai jaminan</title>
|
<title>Laporan Penilai jaminan</title>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font-size: 8px;
|
font-size: 10px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,15 +497,16 @@
|
|||||||
@if (isset($detail->details))
|
@if (isset($detail->details))
|
||||||
@if (json_decode($detail->details))
|
@if (json_decode($detail->details))
|
||||||
@foreach (json_decode($detail->details) as $key => $value)
|
@foreach (json_decode($detail->details) as $key => $value)
|
||||||
@if (!is_null($value) && $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 }}
|
<td style=" padding: 2px;">{{ $value }}
|
||||||
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
|
||||||
<sup>m2</sup>
|
<sup>m2</sup>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@@ -521,16 +522,16 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
// Ambil nilai hub_cadeb langsung
|
// Ambil nilai hub_cadeb langsung
|
||||||
$hubCadeb = isset($forminspeksi['asset']['hub_cadeb'])
|
$hubCadeb = isset($forminspeksi['asset']['hub_cadeb'])
|
||||||
? $forminspeksi['asset']['hub_cadeb']
|
? $forminspeksi['asset']['hub_cadeb']
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
// Jika nilai adalah array dengan key 'sesuai', ambil nilainya
|
// Jika nilai adalah array dengan key 'sesuai', ambil nilainya
|
||||||
if (is_array($hubCadeb) && isset($hubCadeb['sesuai'])) {
|
if (is_array($hubCadeb) && isset($hubCadeb['sesuai'])) {
|
||||||
$hubCadeb = $hubCadeb['sesuai'];
|
$hubCadeb = $hubCadeb['sesuai'];
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
<td style="vertical-align: top;"><strong>Hubungan Pemilik Jaminan dengan Debitur</strong>
|
<td style="vertical-align: top;"><strong>Hubungan Pemilik Jaminan dengan Debitur</strong>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -549,19 +550,20 @@
|
|||||||
@php $count++; @endphp
|
@php $count++; @endphp
|
||||||
|
|
||||||
@if ($count % 3 === 0)
|
@if ($count % 3 === 0)
|
||||||
</tr><tr>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
@if ($count % 3 !== 0)
|
|
||||||
@for ($i = 0; $i < 3 - ($count % 3); $i++)
|
|
||||||
<td></td>
|
|
||||||
@endfor
|
|
||||||
@endif
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
<tr>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
@endforeach
|
||||||
|
|
||||||
|
@if ($count % 3 !== 0)
|
||||||
|
@for ($i = 0; $i < 3 - ($count % 3); $i++)
|
||||||
|
<td></td>
|
||||||
|
@endfor
|
||||||
|
@endif
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1318,11 +1320,31 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<table class="checkbox-table">
|
<table>
|
||||||
<tr>
|
@if (!empty($lpjData['asuransi_luas_bangunan']))
|
||||||
<td><input type="checkbox" checked> Tidak Ada</td>
|
<tr>
|
||||||
<td><input type="checkbox"> Ada</td>
|
|
||||||
</tr>
|
<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>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1386,33 +1408,54 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{{-- Lain-lain --}}
|
@if (!empty($forminspeksi['fakta']['rute_menuju']))
|
||||||
|
|
||||||
<tr>
|
<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>
|
<td>
|
||||||
@foreach ($forminspeksi['fakta']['keterangan'] ?? [] as $keterangan)
|
{!! nl2br(e($forminspeksi['fakta']['rute_menuju'] ?? '')) !!}
|
||||||
<p>{!! nl2br(e($keterangan)) !!}</p>
|
</td>
|
||||||
@endforeach
|
</tr>
|
||||||
<p>{{ $forminspeksi['fakta']['rute_menuju'] ?? '' }}</p>
|
@endif
|
||||||
|
|
||||||
@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
|
|
||||||
|
|
||||||
|
@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)
|
@foreach ($forminspeksi['fakta']['batas_batas_input'] ?? [] as $arah => $batas)
|
||||||
@if ($batas)
|
@if ($batas)
|
||||||
<p> - {{ $arah }} : {{ $batas }}</p>
|
<p> - {{ $arah }} : {{ $batas }}</p>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
|
||||||
@foreach ($forminspeksi['fakta']['kondisi_lain_bangunan'] ?? [] as $kondisiLain)
|
@if (!empty($forminspeksi['fakta']['kondisi_lingkungan']))
|
||||||
<p>{!! nl2br(e($kondisiLain)) !!}</p>
|
<tr>
|
||||||
@endforeach
|
<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
|
@php
|
||||||
$informasi = [
|
$informasi = [
|
||||||
'peruntukan',
|
'peruntukan',
|
||||||
@@ -1434,10 +1477,32 @@
|
|||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td>2. Informasi Harga:</td>
|
<td>2. Informasi Harga:</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1522,14 +1587,14 @@
|
|||||||
@foreach ($labelNilai as $key => $label)
|
@foreach ($labelNilai as $key => $label)
|
||||||
@if (isset($lpjData['luas_' . $key]))
|
@if (isset($lpjData['luas_' . $key]))
|
||||||
<tr>
|
<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>
|
{{ $label }} {{ $lpjData['luas_' . $key] ?? '' }} m<sup>2</sup>
|
||||||
</td>
|
</td>
|
||||||
<td style="padding: 3px; width:10%;">
|
<td style="padding: 3px; width:5%;">
|
||||||
<span style="padding-left:20px; padding-right: 20px">X</span> Rp
|
<span style="padding-left:20px; padding-right: 20px">X</span> Rp
|
||||||
{{ $lpjData['nilai_' . $key . '_1'] ?? '' }}
|
{{ $lpjData['nilai_' . $key . '_1'] ?? '' }}
|
||||||
</td>
|
</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
|
<span style="padding-left:20px; padding-right: 20px"> = </span> Rp
|
||||||
{{ $lpjData['nilai_' . $key . '_2'] ?? '' }}
|
{{ $lpjData['nilai_' . $key . '_2'] ?? '' }}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -281,7 +281,7 @@
|
|||||||
@isset($resumeData['fakta']['fakta_positif'])
|
@isset($resumeData['fakta']['fakta_positif'])
|
||||||
@foreach ($resumeData['fakta']['fakta_positif'] as $key => $item)
|
@foreach ($resumeData['fakta']['fakta_positif'] as $key => $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item }}</td>
|
<td>{!! nl2br(e($item)) !!}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endisset
|
@endisset
|
||||||
@@ -298,7 +298,7 @@
|
|||||||
@isset($resumeData['fakta']['fakta_negatif'])
|
@isset($resumeData['fakta']['fakta_negatif'])
|
||||||
@foreach ($resumeData['fakta']['fakta_negatif'] as $key => $item)
|
@foreach ($resumeData['fakta']['fakta_negatif'] as $key => $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item }}</td>
|
<td>{!! nl2br(e($item)) !!}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endisset
|
@endisset
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $resumeData['keterangan'] ?? '' }}</td>
|
<td>{!! nl2br(e($resumeData['keterangan'] ?? '' )) !!}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -279,9 +279,37 @@
|
|||||||
<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)
|
||||||
|
<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>
|
</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() {
|
function savePenilai() {
|
||||||
showLoadingSwal('Mengirim data keserver ...');
|
showLoadingSwal('Mengirim data keserver ...');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
$inspeksiId = null;
|
$inspeksiId = null;
|
||||||
$documentId = null;
|
$documentId = null;
|
||||||
$jenisJaminanId = null;
|
$jenisJaminanId = null;
|
||||||
foreach ($permohonan->debiture->documents as $item) {
|
foreach ($permohonan->documents as $item) {
|
||||||
foreach ($item->inspeksi as $key => $value) {
|
foreach ($item->inspeksi as $key => $value) {
|
||||||
$inspeksiId = $value->id;
|
$inspeksiId = $value->id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,8 @@
|
|||||||
<i class="ki-filled ki-save-2"></i>
|
<i class="ki-filled ki-save-2"></i>
|
||||||
<span id="saveButtonText">Save</span>
|
<span id="saveButtonText">Save</span>
|
||||||
</button>
|
</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>
|
<i class="ki-filled ki-printer"></i>
|
||||||
<span>Print Out</span>
|
<span>Print Out</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -80,9 +81,8 @@
|
|||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script src="https://cdn.jsdelivr.net/npm/signature_pad@4.1.7/dist/signature_pad.umd.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/signature_pad@4.1.7/dist/signature_pad.umd.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
const datas = @json($forminspeksi ?? '');
|
||||||
const datas = @json($forminspeksi ?? '');
|
console.log(datas);
|
||||||
console.log(datas);
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
const signaturePads = {};
|
const signaturePads = {};
|
||||||
@@ -238,10 +238,10 @@ const datas = @json($forminspeksi ?? '');
|
|||||||
fetch(`{{ url('/surveyor/signatures/${type}') }}`, {
|
fetch(`{{ url('/surveyor/signatures/${type}') }}`, {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'X-CSRF-TOKEN': '{{ csrf_token() }}',
|
'X-CSRF-TOKEN': '{{ csrf_token() }}',
|
||||||
},
|
},
|
||||||
body: JSON.stringify(data)
|
body: JSON.stringify(data)
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
@@ -347,6 +347,17 @@ const datas = @json($forminspeksi ?? '');
|
|||||||
console.log(response);
|
console.log(response);
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
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;
|
let errors = xhr.responseJSON?.errors;
|
||||||
$('.alert').text('');
|
$('.alert').text('');
|
||||||
@@ -355,11 +366,16 @@ const datas = @json($forminspeksi ?? '');
|
|||||||
$(`#error-${key}`).text(value[0]);
|
$(`#error-${key}`).text(value[0]);
|
||||||
toastrErrorBuild(value[0]);
|
toastrErrorBuild(value[0]);
|
||||||
});
|
});
|
||||||
// toastrErrorBuild(error);
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Error!',
|
||||||
|
text: xhr.responseJSON?.message || 'Terjadi kesalahan saat mengirim data.',
|
||||||
|
icon: 'error',
|
||||||
|
confirmButtonText: 'OK'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
hideLoadingSwal();
|
},
|
||||||
console.log(errors);
|
timeout: 10000
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,10 +396,6 @@ const datas = @json($forminspeksi ?? '');
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script></script>
|
<script></script>
|
||||||
|
|||||||
@@ -146,9 +146,10 @@
|
|||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
function jadwal(id) {
|
function jadwal(id) {
|
||||||
document.getElementById('ids').value = id;
|
document.getElementById('ids').value = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
function surveyorFreeze(permohonanId, noReg, debitur) {
|
function surveyorFreeze(permohonanId, noReg, debitur) {
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@@ -256,26 +257,42 @@
|
|||||||
title: 'Action',
|
title: 'Action',
|
||||||
render: (item, data) => {
|
render: (item, data) => {
|
||||||
let actionHtml = '';
|
let actionHtml = '';
|
||||||
|
// if (data.documents.length > 0) {
|
||||||
|
|
||||||
|
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">
|
||||||
|
<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">
|
||||||
|
<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">
|
||||||
|
<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>`;
|
||||||
|
// }
|
||||||
|
|
||||||
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">
|
|
||||||
<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">
|
|
||||||
<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">
|
|
||||||
<i class="ki-filled ki-arrow-circle-right"></i>
|
|
||||||
</button>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
return actionHtml;
|
return actionHtml;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -643,6 +643,11 @@
|
|||||||
$trail->push('RAP');
|
$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) {
|
Breadcrumbs::for('sla', function (BreadcrumbTrail $trail) {
|
||||||
$trail->parent('basicdata');
|
$trail->parent('basicdata');
|
||||||
|
|||||||
@@ -595,6 +595,7 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('resume', [PenilaiController::class, 'resume'])->name('resume');
|
Route::get('resume', [PenilaiController::class, 'resume'])->name('resume');
|
||||||
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::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