Merge remote-tracking branch 'composer/feature/senior-officer' into staging
This commit is contained in:
@@ -392,7 +392,7 @@ class ActivityController extends Controller
|
||||
$q->where('user_id', $id);
|
||||
})
|
||||
->whereHas('permohonan', function ($q) {
|
||||
$q->whereIn('status', ['assign', 'proses-laporan', 'done', 'proses-survey', 'request-reschedule', 'reschedule', 'rejected-reschedule', 'approved-reschedule', 'revisi-laporan', 'survey']);
|
||||
$q->whereNotIn('status', ['done']);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -181,7 +181,13 @@ class PembayaranController extends Controller
|
||||
$permohonan = Permohonan::find($id);
|
||||
|
||||
if ($permohonan) {
|
||||
$data['status_bayar'] = 'sudah_bayar';
|
||||
|
||||
if ($request->type === 'revisi') {
|
||||
$data['status_bayar'] = 'belum_bayar';
|
||||
} else {
|
||||
$data['status_bayar'] = 'sudah_bayar';
|
||||
}
|
||||
|
||||
if ($permohonan->jenis_penilaian_id == 2) {
|
||||
$data['status'] = 'spk';
|
||||
}
|
||||
|
||||
@@ -297,7 +297,6 @@ class PenilaiController extends Controller
|
||||
|
||||
return redirect()
|
||||
->route('penilai.show', ['id' => $id])->with('success', 'diperbarui ke status paparan dan dikirim ke So untuk proses lebih lanjut.');
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return redirect()->route('penilai.show', ['id' => $id])->with('error', 'Terjadi kesalahan saat memproses permohonan.');
|
||||
}
|
||||
@@ -505,7 +504,7 @@ class PenilaiController extends Controller
|
||||
});
|
||||
}
|
||||
|
||||
$query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ?,?, ?)', ['assign','survey-completed', 'proses-laporan', 'paparan', 'proses-paparan','paparan', 'revisi-laporan','revisi-paparan']);
|
||||
$query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ?,?, ?)', ['assign', 'survey-completed', 'proses-laporan', 'paparan', 'proses-paparan', 'paparan', 'revisi-laporan', 'revisi-paparan']);
|
||||
|
||||
if (!Auth::user()->hasRole('administrator')) {
|
||||
$query->whereHas('penilaian.userPenilai', function ($q) {
|
||||
@@ -574,8 +573,8 @@ class PenilaiController extends Controller
|
||||
$jaminanId = $request->query('jaminanId');
|
||||
// Fetch the data from the database
|
||||
$data = Inspeksi::where('permohonan_id', $permohonanId)
|
||||
->where('dokument_id', $documentId)
|
||||
->first();
|
||||
->where('dokument_id', $documentId)
|
||||
->first();
|
||||
|
||||
$permohonan = $this->surveyorController->getPermohonanJaminanId(
|
||||
$permohonanId,
|
||||
@@ -772,7 +771,6 @@ class PenilaiController extends Controller
|
||||
'success' => true,
|
||||
'message' => 'Berhasil Megirim reported ke so'
|
||||
], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
@@ -810,8 +808,8 @@ class PenilaiController extends Controller
|
||||
);
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $validatedData['permohonan_id'])
|
||||
->where('dokument_id', $validatedData['dokument_id'])
|
||||
->first();
|
||||
->where('dokument_id', $validatedData['dokument_id'])
|
||||
->first();
|
||||
if ($inspeksi) {
|
||||
// Get existing data_form
|
||||
$existingData = json_decode($inspeksi->data_form, true) ?: [];
|
||||
@@ -1039,7 +1037,6 @@ class PenilaiController extends Controller
|
||||
'trace' => $e->getTraceAsString()
|
||||
], 500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function storeCallReport(Request $request)
|
||||
@@ -1056,7 +1053,8 @@ class PenilaiController extends Controller
|
||||
'fakta_negatif' => 'nullable|array',
|
||||
'type' => 'required',
|
||||
'action' => 'required',
|
||||
'keterangan' => 'nullable|array'
|
||||
'keterangan' => 'nullable|array',
|
||||
|
||||
]);
|
||||
|
||||
|
||||
@@ -1072,8 +1070,8 @@ class PenilaiController extends Controller
|
||||
);
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $validated['permohonan_id'])
|
||||
->where('dokument_id', $validated['dokument_id'])
|
||||
->first();
|
||||
->where('dokument_id', $validated['dokument_id'])
|
||||
->first();
|
||||
if ($inspeksi) {
|
||||
// Get existing data_form
|
||||
$existingData = json_decode($inspeksi->data_form, true) ?: [];
|
||||
@@ -1206,8 +1204,8 @@ class PenilaiController extends Controller
|
||||
$cleanNomorLaporan = str_replace(['/', '\\'], '-', $nomorLaporan);
|
||||
$pdf->setPaper('A4', 'portrait');
|
||||
return response($pdf->output(), 200)
|
||||
->header('Content-Type', 'application/pdf')
|
||||
->header('Content-Disposition', 'inline; filename="Laporan_' . $tipeLaporan . '_' .$permohonan->debiture->name . '_' . $cleanNomorLaporan .'.pdf"');
|
||||
->header('Content-Type', 'application/pdf')
|
||||
->header('Content-Disposition', 'inline; filename="Laporan_' . $tipeLaporan . '_' . $permohonan->debiture->name . '_' . $cleanNomorLaporan . '.pdf"');
|
||||
// return $pdf->stream();
|
||||
} else {
|
||||
// $pdf = view('lpj::' . $viewLaporan, compact(
|
||||
@@ -1232,14 +1230,12 @@ class PenilaiController extends Controller
|
||||
// return $pdf;
|
||||
$cleanNomorLaporan = str_replace(['/', '\\'], '-', $nomorLaporan);
|
||||
$pdf->setPaper('A4', 'portrait');
|
||||
return $pdf->download('Laporan_'. $tipeLaporan . '_' .$permohonan->debiture->name . '_' . $cleanNomorLaporan .'_data.pdf');
|
||||
return $pdf->download('Laporan_' . $tipeLaporan . '_' . $permohonan->debiture->name . '_' . $cleanNomorLaporan . '_data.pdf');
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error('PDF generation failed: ' . $e->getMessage());
|
||||
return response()->json(['error' => 'Failed to generate PDF. Please check the log for details.'. $e->getMessage()], 500);
|
||||
return response()->json(['error' => 'Failed to generate PDF. Please check the log for details.' . $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function getViewLaporan($tipe)
|
||||
@@ -1262,10 +1258,10 @@ class PenilaiController extends Controller
|
||||
private function getDataPermohonanWithPenilaiAndInspeksi($permohonanId, $documentId, $jaminanId)
|
||||
{
|
||||
return [
|
||||
'permohonan' => $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId),
|
||||
'penilai' => Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first(),
|
||||
'inspeksi' => Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first()
|
||||
];
|
||||
'permohonan' => $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId),
|
||||
'penilai' => Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first(),
|
||||
'inspeksi' => Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first()
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1608,6 +1604,4 @@ class PenilaiController extends Controller
|
||||
'message' => 'Berhasil Revisi Ke surveyor',
|
||||
], 200);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -682,6 +682,7 @@ class SurveyorController extends Controller
|
||||
$request->validate([
|
||||
'edited_image' => 'required|string',
|
||||
'original_path' => 'required|string',
|
||||
'nomor_registrasi' => 'required',
|
||||
]);
|
||||
|
||||
// Decode base64 image
|
||||
@@ -701,7 +702,7 @@ class SurveyorController extends Controller
|
||||
// Path asli
|
||||
$originalPath = $request->input('original_path');
|
||||
$fileName = basename($originalPath);
|
||||
$newFilePath = 'edited_images/' . $fileName;
|
||||
$newFilePath = 'surveyor/upload_foto/'. $request->input('nomor_registrasi') . '/' . $fileName;
|
||||
|
||||
// Simpan file ke storage
|
||||
Storage::disk('public')->put($newFilePath, $decodedImage);
|
||||
@@ -1675,10 +1676,6 @@ class SurveyorController extends Controller
|
||||
'basicData',
|
||||
'cekAlamat'
|
||||
));
|
||||
|
||||
// return response()->json([
|
||||
// 'daya'=> $permohonan
|
||||
// ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,11 +106,14 @@
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
function pembayaranOtorisator(id) {
|
||||
// alert('hai id = ' + id);
|
||||
function handlePembayaran(id, type) {
|
||||
let rv = type
|
||||
let title = type === 'revisi' ? 'Apakah Anda yakin ingin merevisi pembayaran ini?' : 'Apakah Anda yakin?';
|
||||
let text = type === 'revisi' ? 'Untuk melakukan revisi pembayaran!' : 'Untuk melakukan approve pembayaran!';
|
||||
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan approve Pembayaran!`,
|
||||
title: title,
|
||||
text: text,
|
||||
icon: 'warning',
|
||||
input: 'textarea', // Menambahkan input textarea
|
||||
inputLabel: 'Keterangan',
|
||||
@@ -133,6 +136,7 @@
|
||||
input_data._method = 'PUT';
|
||||
input_data.id = id;
|
||||
input_data.keterangan = keterangan;
|
||||
input_data.type = rv;
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
@@ -324,10 +328,10 @@
|
||||
}
|
||||
|
||||
if(permohonan) {
|
||||
return `${permohonan.approve_keterangan_bayar}`;
|
||||
return `${permohonan.approve_keterangan_bayar}` || '-';
|
||||
}
|
||||
|
||||
return "";
|
||||
return "-";
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
@@ -339,12 +343,16 @@
|
||||
var permohonan = data.penawaran.permohonan;
|
||||
}
|
||||
|
||||
var iconPembayaranOtorisator = '';
|
||||
if(permohonan) {
|
||||
var iconPembayaranOtorisator = '';
|
||||
if (!permohonan.approve_bayar_by) {
|
||||
iconPembayaranOtorisator = `<a class="btn btn-sm btn-icon btn-clear btn-primary " onclick="pembayaranOtorisator(${permohonan.id})">
|
||||
iconPembayaranOtorisator = `<a class="btn btn-sm btn-icon btn-clear btn-primary " onclick="handlePembayaran(${permohonan.id},'otorisator')">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
</a>`;
|
||||
}else{
|
||||
iconPembayaranOtorisator = `<a class="btn btn-sm btn-icon btn-clear btn-primary " onclick="handlePembayaran(${permohonan.id}, 'revisi')">
|
||||
<i class="ki-filled ki-arrow-circle-left"></i>
|
||||
</a>`;
|
||||
}
|
||||
|
||||
return `<div class="flex flex-nowrap justify-center">` + iconPembayaranOtorisator + `</div>`;
|
||||
|
||||
@@ -20,8 +20,13 @@
|
||||
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
<p> - {{ ucfirst(str_replace('_', ' ', $key)) }}:
|
||||
{{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@php
|
||||
$displayKey = ucfirst(str_replace('_', ' ', $key));
|
||||
if (strlen($key) == 3) {
|
||||
$displayKey = strtoupper($key);
|
||||
}
|
||||
@endphp
|
||||
<p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
|
||||
@@ -116,7 +116,11 @@
|
||||
<td>Tusuk Sate</td>
|
||||
<td>:</td>
|
||||
<td>
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'yes' ? 'Ya' : 'Tidak' }}
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate']['Ya'] ? 'Ya' : 'Tidak' }}
|
||||
@if (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate']['Ya'])
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate_ya']) ? ' (' . $forminspeksi['tanah']['tusuk_sate_ya'] . ')' : '' }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
{{-- @include('lpj::surveyor.components.header')
|
||||
@include('lpj::surveyor.components.callReport') --}}
|
||||
@php
|
||||
$paparan = $permohonan->status === 'proses-paparan' ? 'Paparan' : 'Pelaporan';
|
||||
@endphp
|
||||
$paparan = $permohonan->status === 'proses-paparan' ? 'Paparan' : 'Pelaporan';
|
||||
@endphp
|
||||
<div class="card">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
@@ -251,40 +251,81 @@
|
||||
@include('lpj::component.detail-jaminan', ['status' => true])
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h1 class="text-md font-medium text-gray-900 uppercase">Nilai Likuidasi</h1>
|
||||
|
||||
<div class="w-full grid grid-cols-1 lg:grid-cols-2 gap-4">
|
||||
|
||||
<!-- Bagian Nilai KJPP -->
|
||||
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h1 class="text-md font-medium text-gray-900 uppercase">Nilai KJPP</h1>
|
||||
</div>
|
||||
<div class="card-body grid gap-5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="lelang-1" class="form-label max-w-56">Lelang ke </label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="lelang-1" name="lelang_kjpp" class="input w-full"
|
||||
placeholder="Masukkan Lelang" value="{{ $callReport['lelang_kjpp'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="nilai-pasar-1" class="form-label max-w-56">Nilai Pasar Wajar (NPW)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="nilai-pasar-1" name="nilai_pasar_kjpp"
|
||||
class="input w-full nilai-pasar currency-format" placeholder="Masukkan likuidasi" value="{{ $callReport['nilai_pasar_kjpp'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="likuidasi-1" class="form-label max-w-56">Nilai Likuidasi(%)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="likuidasi-1" name="persentase_likuidasi_kjpp" class="input w-full likuidasi"
|
||||
placeholder="Masukkan likuidasi dalam bentuk persen" onkeyup="calculateTotal(this)"
|
||||
data-group="1" value="{{ $callReport['persentase_likuidasi_kjpp'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="total-likuidasi-1" class="form-label max-w-56">Total Nilai Likuidasi (NL)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="total-likuidasi-1" name="hasil_nilai_likuidasi_kjpp"
|
||||
class="input w-full total-likuidasi currency-format" placeholder="Hasil perhitungan" value="{{ $callReport['hasil_nilai_likuidasi_kjpp'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body grid gap-5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="Lelang" class="form-label max-w-56">Lelang ke </label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="lelang" name="lelang" class="input w-full"
|
||||
placeholder="Masukkan Lelang" value="{{ $callReport['lelang'] ?? old('lelang') }}">
|
||||
</div>
|
||||
<!-- Bagian Nilai Internal -->
|
||||
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h1 class="text-md font-medium text-gray-900 uppercase">Nilai Internal</h1>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="penilai" class="form-label max-w-56">Nilai Pasar Wajar (NPW)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="nilai-pasar" name="nilai_pasar"
|
||||
class="input w-full nilai-pasar currency-format" placeholder="Masukkan likuidasi"
|
||||
value="{{ $callReport['nilai_pasar'] ?? old('likuidasi') }}">
|
||||
<div class="card-body grid gap-5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="lelang-2" class="form-label max-w-56">Lelang ke </label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="lelang-2" name="lelang_internal" class="input w-full"
|
||||
placeholder="Masukkan Lelang" value="{{ $callReport['lelang_internal'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="likuidasi_nilai_1" class="form-label max-w-56">Nilai Likuidasi(%)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="likuidasi" name="likuidasi" class="input w-full likuidasi"
|
||||
placeholder="Masukkan likuidasi dalam bentuk persen" onkeyup="calculateTotal(this)" value="{{ $callReport['persentase_likuidasi'] ?? old('likuidasi') }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="nilai-pasar-2" class="form-label max-w-56">Nilai Pasar Wajar (NPW)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="nilai-pasar-2" name="nilai_pasar_internal"
|
||||
class="input w-full nilai-pasar currency-format" placeholder="Masukkan likuidasi" value="{{ $callReport['nilai_pasar_internal'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="total-likuidasi" class="form-label max-w-56">Total Nilai Likuidasi
|
||||
(NL)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="total-likuidasi" name="likuidasi_nilai_1"
|
||||
class="input w-full total-likuidasi currency-format" placeholder="Masukkan likuidasi" value="{{ $callReport['hasil_nilai_likuidasi'] ?? old('likuidasi') }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="likuidasi-2" class="form-label max-w-56">Nilai Likuidasi(%)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="likuidasi-2" name="persentase_likuidasi_internal" class="input w-full likuidasi"
|
||||
placeholder="Masukkan likuidasi dalam bentuk persen" onkeyup="calculateTotal(this)"
|
||||
data-group="2" value="{{ $callReport['persentase_likuidasi_internal'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="total-likuidasi-2" class="form-label max-w-56">Total Nilai Likuidasi (NL)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="total-likuidasi-2" name="hasil_nilai_likuidasi_internal"
|
||||
class="input w-full total-likuidasi currency-format" placeholder="Hasil perhitungan" value="{{ $callReport['hasil_nilai_likuidasi_internal'] ?? '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -315,10 +356,9 @@
|
||||
<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 "
|
||||
value="{{ $forminspeksi['signature']['kjjp']['name'] ?? $callReport['pihak_kjjpp'] ?? '' }}"
|
||||
placeholder="Masukkan Nama KJPP">
|
||||
<input type="text" id="penilai" name="pihak_kjjpp" class="input w-full "
|
||||
value="{{ $callReport['pihak_kjjpp'] ?? ($forminspeksi['signature']['kjjp']['name'] ?? '') }}"
|
||||
placeholder="Masukkan Nama KJPP">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
@@ -382,7 +422,8 @@
|
||||
@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="10">{{ old('fakta_positif.0', '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -410,7 +451,8 @@
|
||||
@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="10">{{ old('fakta_negatif.0', $forminspeksi['fakta']['fakta_negatif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<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>
|
||||
@@ -463,10 +505,10 @@
|
||||
|
||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'surveyor', 'administrator']))
|
||||
<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>
|
||||
<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>
|
||||
@endif
|
||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal']))
|
||||
<a class="btn btn-info"
|
||||
@@ -501,24 +543,41 @@
|
||||
perihal: "",
|
||||
pihak_kjjpp: "",
|
||||
dari: "",
|
||||
lelang: "",
|
||||
nilai_pasar: "",
|
||||
persentase_likuidasi: "",
|
||||
hasil_nilai_likuidasi: ""
|
||||
lelang_kjpp: "",
|
||||
nilai_pasar_kjpp: "",
|
||||
persentase_likuidasi_kjpp: "",
|
||||
hasil_nilai_likuidasi_kjpp: "",
|
||||
lelang_internal: "",
|
||||
nilai_pasar_internal: "",
|
||||
persentase_likuidasi_internal: "",
|
||||
hasil_nilai_likuidasi_internal: "",
|
||||
|
||||
};
|
||||
|
||||
|
||||
jsonData.perihal = document.querySelector('input[name="perihal"]')?.value.trim() || "";
|
||||
jsonData.pihak_kjjpp = document.querySelector('input[name="pihak_kjjpp"]')?.value.trim() || "";
|
||||
jsonData.dari = document.querySelector('input[name="dari"]')?.value.trim() || "";
|
||||
jsonData.tanggal = document.querySelector('input[name="tanggal"]')?.value.trim() || "";
|
||||
jsonData.kepada = document.querySelector('input[name="kepada"]')?.value.trim() || "";
|
||||
jsonData.nomor_laporan = document.querySelector('input[name="nomor_laporan"]')?.value.trim() || "";
|
||||
jsonData.lelang = document.querySelector('input[name="lelang"]')?.value.trim() || "";
|
||||
jsonData.lelang_kjpp = document.querySelector('input[name="lelang_kjpp"]')?.value.trim() || "";
|
||||
|
||||
// Ambil nilai lainnya
|
||||
jsonData.nilai_pasar = cleanCurrencyValue(document.querySelector('input[name="nilai_pasar"]')?.value.trim() || "");
|
||||
jsonData.persentase_likuidasi = cleanCurrencyValue(document.querySelector('input[name="likuidasi"]')?.value.trim() || "");
|
||||
jsonData.hasil_nilai_likuidasi = cleanCurrencyValue(document.querySelector('input[name="likuidasi_nilai_1"]')?.value.trim() || "");
|
||||
jsonData.nilai_pasar_kjpp = cleanCurrencyValue(document.querySelector('input[name="nilai_pasar_kjpp"]')?.value.trim() ||
|
||||
"");
|
||||
jsonData.persentase_likuidasi_kjpp = cleanCurrencyValue(document.querySelector('input[name="persentase_likuidasi_kjpp"]')?.value
|
||||
.trim() || "");
|
||||
jsonData.hasil_nilai_likuidasi_kjpp = cleanCurrencyValue(document.querySelector('input[name="hasil_nilai_likuidasi_kjpp"]')
|
||||
?.value.trim() || "");
|
||||
|
||||
jsonData.lelang_internal = document.querySelector('input[name="lelang_internal"]')?.value.trim() || "";
|
||||
jsonData.nilai_pasar_internal = cleanCurrencyValue(document.querySelector('input[name="nilai_pasar_internal"]')?.value.trim() ||
|
||||
"");
|
||||
jsonData.persentase_likuidasi_internal = cleanCurrencyValue(document.querySelector('input[name="persentase_likuidasi_internal"]')?.value
|
||||
.trim() || "");
|
||||
jsonData.hasil_nilai_likuidasi_internal = cleanCurrencyValue(document.querySelector('input[name="hasil_nilai_likuidasi_internal"]')
|
||||
?.value.trim() || "");
|
||||
|
||||
return jsonData;
|
||||
}
|
||||
@@ -533,22 +592,22 @@
|
||||
const inspeksiId = urlParams.get('inspeksiId');
|
||||
|
||||
const faktaPositif = Array.from(document.querySelectorAll('[name="fakta_positif[]"]'))
|
||||
.map(textarea => textarea.value.trim())
|
||||
.filter(value => value !== '');
|
||||
.map(textarea => textarea.value.trim())
|
||||
.filter(value => value !== '');
|
||||
|
||||
const faktaNegatif = Array.from(document.querySelectorAll('[name="fakta_negatif[]"]'))
|
||||
.map(textarea => textarea.value.trim())
|
||||
.filter(value => value !== '');
|
||||
const keterangan = Array.from(document.querySelectorAll('[name="keterangan[]"]'))
|
||||
.map(textarea => textarea.value.trim())
|
||||
.filter(value => value !== '');
|
||||
const faktaNegatif = Array.from(document.querySelectorAll('[name="fakta_negatif[]"]'))
|
||||
.map(textarea => textarea.value.trim())
|
||||
.filter(value => value !== '');
|
||||
const keterangan = Array.from(document.querySelectorAll('[name="keterangan[]"]'))
|
||||
.map(textarea => textarea.value.trim())
|
||||
.filter(value => value !== '');
|
||||
|
||||
const action = Array.from(document.querySelectorAll('input[name="action"]'))
|
||||
.map(input => input.value)
|
||||
.join(',') || "";
|
||||
const type = Array.from(document.querySelectorAll('input[name="type"]'))
|
||||
.map(input => input.value)
|
||||
.join(',') || "";
|
||||
const action = Array.from(document.querySelectorAll('input[name="action"]'))
|
||||
.map(input => input.value)
|
||||
.join(',') || "";
|
||||
const type = Array.from(document.querySelectorAll('input[name="type"]'))
|
||||
.map(input => input.value)
|
||||
.join(',') || "";
|
||||
const requestUrl =
|
||||
`{{ route('penilai.storeCallReport') }}?permohonan_id=${permohonanId}&inspeksi_id=${inspeksiId}&dokument_id=${documentId}`;
|
||||
|
||||
@@ -563,10 +622,10 @@
|
||||
inspeksi_id: inspeksiId,
|
||||
data: jsonData,
|
||||
fakta_positif: faktaPositif,
|
||||
fakta_negatif: faktaNegatif,
|
||||
action: action,
|
||||
type: type,
|
||||
keterangan: keterangan
|
||||
fakta_negatif: faktaNegatif,
|
||||
action: action,
|
||||
type: type,
|
||||
keterangan: keterangan
|
||||
}),
|
||||
contentType: 'application/json',
|
||||
headers: {
|
||||
@@ -613,29 +672,33 @@
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function calculateTotal() {
|
||||
let nilaiPasarInput = document.getElementById('nilai-pasar');
|
||||
let nilaiLikuidasi = document.getElementById('likuidasi');
|
||||
let totalLikuidasi = document.getElementById('total-likuidasi');
|
||||
const cleanNilaiPasar = cleanCurrencyValue(nilaiPasarInput.value);
|
||||
let cleanLikuidasi = cleanCurrencyValue(nilaiLikuidasi.value);
|
||||
function calculateTotal(event) {
|
||||
const group = event.dataset.group;
|
||||
|
||||
// Batasi likuidasi maksimal hingga 100
|
||||
cleanLikuidasi = Math.min(parseFloat(cleanLikuidasi) || 0, 100);
|
||||
// Ambil elemen-elemen terkait berdasarkan group
|
||||
const nilaiPasarInput = document.querySelector(`#nilai-pasar-${group}`);
|
||||
const nilaiLikuidasi = document.querySelector(`#likuidasi-${group}`);
|
||||
const totalLikuidasi = document.querySelector(`#total-likuidasi-${group}`);
|
||||
|
||||
// Format nilai likuidasi dengan simbol %
|
||||
nilaiLikuidasi.value = cleanLikuidasi;
|
||||
const cleanNilaiPasar = cleanCurrencyValue(nilaiPasarInput.value);
|
||||
let cleanLikuidasi = cleanCurrencyValue(nilaiLikuidasi.value);
|
||||
|
||||
// Konversi ke angka untuk perhitungan
|
||||
const nilaiPasar = parseFloat(cleanNilaiPasar) || 0;
|
||||
const likuidasi = cleanLikuidasi / 100; // Konversi persentase ke desimal
|
||||
// Batasi likuidasi maksimal hingga 100
|
||||
cleanLikuidasi = Math.min(parseFloat(cleanLikuidasi) || 0, 100);
|
||||
|
||||
// Hitung total likuidasi
|
||||
const totalNilaiLikuidasi = nilaiPasar * likuidasi;
|
||||
// Format nilai likuidasi dengan simbol %
|
||||
nilaiLikuidasi.value = cleanLikuidasi;
|
||||
|
||||
// Tampilkan hasil dengan format yang benar
|
||||
totalLikuidasi.value = formatCurrency(totalNilaiLikuidasi.toString());
|
||||
}
|
||||
// Konversi ke angka untuk perhitungan
|
||||
const nilaiPasar = parseFloat(cleanNilaiPasar) || 0;
|
||||
const likuidasi = cleanLikuidasi / 100; // Konversi persentase ke desimal
|
||||
|
||||
// Hitung total likuidasi
|
||||
const totalNilaiLikuidasi = nilaiPasar * likuidasi;
|
||||
|
||||
// Tampilkan hasil dengan format yang benar
|
||||
totalLikuidasi.value = formatCurrency(totalNilaiLikuidasi.toString());
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
@@ -748,320 +748,325 @@
|
||||
@include('lpj::penilai.components.print-pembanding')
|
||||
</div>
|
||||
<div class="no-break">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="border: 1px solid #000; "> <strong>E. INFORMASI NILAI</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="padding: 8px; width: 100%;">
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td colspan="3" style="padding: 8px; text-align: left;">
|
||||
<strong>a. Total Nilai Pasar Wajar</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@php
|
||||
$labelNilai = [
|
||||
'bangunan' => 'Luas Bangunan',
|
||||
'tanah' => 'Luas Tanah',
|
||||
'apartement-kantor' => 'Luas Apartemen/Kantor',
|
||||
'alat-berat' => 'Luas Alat Berat',
|
||||
'mesin' => 'Luas Mesin',
|
||||
'kendaraan' => 'Luas Kendaraan',
|
||||
'pesawat' => 'Luas Pesawat',
|
||||
'kapal' => 'Luas Kapal',
|
||||
];
|
||||
@endphp
|
||||
@foreach ($labelNilai as $key => $label)
|
||||
@if (isset($lpjData['luas_' . $key]))
|
||||
<tr>
|
||||
<td style="padding: 3px; text-align: right; width:30%; ">
|
||||
{{ $label }} {{ $lpjData['luas_' . $key] ?? '' }} m<sup>2</sup>
|
||||
</td>
|
||||
<td style="padding: 3px; width:30%;">
|
||||
<span style="padding-left:20px; padding-right: 20px">X</span> Rp
|
||||
{{ $lpjData['nilai_' . $key . '_1'] ?? '' }}
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; width:40%;">
|
||||
<span style="padding-left:20px; padding-right: 20px"> = </span> Rp
|
||||
{{ $lpjData['nilai_' . $key . '_2'] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@if (isset($lpjData['npw_tambahan']))
|
||||
@foreach ($lpjData['npw_tambahan'] as $npw)
|
||||
<tr>
|
||||
<td style="padding: 3px; text-align: right;">
|
||||
{{ $npw['name'] }} {{ $npw['luas'] }} m<sup>2</sup>
|
||||
</td>
|
||||
<td style="padding: 3px;">
|
||||
<span style="padding-left:20px; padding-right: 20px">X</span> Rp
|
||||
{{ $npw['nilai_1'] }}
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; width:40%">
|
||||
<span style="padding-left:20px; padding-right: 20px"> = </span> Rp
|
||||
{{ $npw['nilai_2'] }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
<tr>
|
||||
<td style="padding: 3px; font-weight: bold; width:30%;">Total Nilai Pasar Wajar</td>
|
||||
<td style="padding: 3px; text-align: right; font-weight: bold; width:30%"></td>
|
||||
<td style="padding: 3px; text-align: left; font-weight: bold; width: 40%;">
|
||||
<span style="padding-left: 20px; padding-right: 20px;">=</span>
|
||||
<div style="display: inline-block; border-top: 1px solid black; padding-top: 3px;">
|
||||
Rp {{ $lpjData['total_nilai_pasar_wajar'] ?? '' }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding: 8px; text-align: left; font-weight: bold;">
|
||||
b. Total Nilai Likuidasi
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 3px; text-align: right; width:30%">
|
||||
{{ $lpjData['likuidasi'] ?? '' }}%
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; font-weight: bold; width:30%">
|
||||
<span style="padding-left:20px; padding-right: 20px">X</span> Total Nilai Pasar Wajar
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; width:40%;">
|
||||
<span style="padding-left:20px; padding-right: 20px"> = </span> Rp
|
||||
{{ $lpjData['likuidasi_nilai_2'] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="no-break">
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="border: 1px solid #000;">
|
||||
F. ANALISA FAKTA
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Faktor Positif</strong></td>
|
||||
<td>
|
||||
@isset($forminspeksi['fakta']['fakta_positif'])
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
@foreach ($forminspeksi['fakta']['fakta_positif'] as $key => $item)
|
||||
<tr>
|
||||
<td>{!! nl2br(e($item)) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Faktor Negatif</strong></td>
|
||||
<td>
|
||||
@isset($forminspeksi['fakta']['fakta_negatif'])
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
@foreach ($forminspeksi['fakta']['fakta_negatif'] as $key => $item)
|
||||
<tr>
|
||||
<td>{!! nl2br(e($item)) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@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>
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="border: 1px solid #000; "> <strong>E. INFORMASI NILAI</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="padding: 8px; width: 100%;">
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td colspan="3" style="padding: 8px; text-align: left;">
|
||||
<strong>a. Total Nilai Pasar Wajar</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@php
|
||||
$informasi = [
|
||||
'peruntukan',
|
||||
'kdb',
|
||||
'kdh',
|
||||
'gsb',
|
||||
'max_lantai',
|
||||
'klb',
|
||||
'gss',
|
||||
'pelebaran_jalan',
|
||||
'nama_petugas',
|
||||
$labelNilai = [
|
||||
'bangunan' => 'Luas Bangunan',
|
||||
'tanah' => 'Luas Tanah',
|
||||
'apartement-kantor' => 'Luas Apartemen/Kantor',
|
||||
'alat-berat' => 'Luas Alat Berat',
|
||||
'mesin' => 'Luas Mesin',
|
||||
'kendaraan' => 'Luas Kendaraan',
|
||||
'pesawat' => 'Luas Pesawat',
|
||||
'kapal' => 'Luas Kapal',
|
||||
];
|
||||
@endphp
|
||||
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
<p> - {{ ucfirst(str_replace('_', ' ', $key)) }}:
|
||||
{{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@foreach ($labelNilai as $key => $label)
|
||||
@if (isset($lpjData['luas_' . $key]))
|
||||
<tr>
|
||||
<td style="padding: 3px; text-align: right; width:30%; ">
|
||||
{{ $label }} {{ $lpjData['luas_' . $key] ?? '' }} m<sup>2</sup>
|
||||
</td>
|
||||
<td style="padding: 3px; width:30%;">
|
||||
<span style="padding-left:20px; padding-right: 20px">X</span> Rp
|
||||
{{ $lpjData['nilai_' . $key . '_1'] ?? '' }}
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; width:40%;">
|
||||
<span style="padding-left:20px; padding-right: 20px"> = </span> Rp
|
||||
{{ $lpjData['nilai_' . $key . '_2'] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['keterangan']))
|
||||
@if (isset($lpjData['npw_tambahan']))
|
||||
@foreach ($lpjData['npw_tambahan'] as $npw)
|
||||
<tr>
|
||||
<td style="padding: 3px; text-align: right;">
|
||||
{{ $npw['name'] }} {{ $npw['luas'] }} m<sup>2</sup>
|
||||
</td>
|
||||
<td style="padding: 3px;">
|
||||
<span style="padding-left:20px; padding-right: 20px">X</span> Rp
|
||||
{{ $npw['nilai_1'] }}
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; width:40%">
|
||||
<span style="padding-left:20px; padding-right: 20px"> = </span> Rp
|
||||
{{ $npw['nilai_2'] }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
<tr>
|
||||
<td style="padding: 3px; font-weight: bold; width:30%;">Total Nilai Pasar Wajar</td>
|
||||
<td style="padding: 3px; text-align: right; font-weight: bold; width:30%"></td>
|
||||
<td style="padding: 3px; text-align: left; font-weight: bold; width: 40%;">
|
||||
<span style="padding-left: 20px; padding-right: 20px;">=</span>
|
||||
<div style="display: inline-block; border-top: 1px solid black; padding-top: 3px;">
|
||||
Rp {{ $lpjData['total_nilai_pasar_wajar'] ?? '' }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="padding: 8px; text-align: left; font-weight: bold;">
|
||||
b. Total Nilai Likuidasi
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 3px; text-align: right; width:30%">
|
||||
{{ $lpjData['likuidasi'] ?? '' }}%
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; font-weight: bold; width:30%">
|
||||
<span style="padding-left:20px; padding-right: 20px">X</span> Total Nilai Pasar Wajar
|
||||
</td>
|
||||
<td style="padding: 3px; text-align: left; width:40%;">
|
||||
<span style="padding-left:20px; padding-right: 20px"> = </span> Rp
|
||||
{{ $lpjData['likuidasi_nilai_2'] ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="no-break">
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="border: 1px solid #000;">
|
||||
F. ANALISA FAKTA
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Catatan yang Perlu
|
||||
Diperhatikan</strong></td>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Faktor Positif</strong></td>
|
||||
<td>
|
||||
@php
|
||||
$keterangan = $forminspeksi['fakta']['keterangan'] ?? '';
|
||||
if (is_array($keterangan)) {
|
||||
$keterangan = implode(', ', array_filter($keterangan));
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if (!empty($keterangan))
|
||||
@isset($forminspeksi['fakta']['fakta_positif'])
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td>{{ $keterangan }}</td>
|
||||
</tr>
|
||||
@foreach ($forminspeksi['fakta']['fakta_positif'] as $key => $item)
|
||||
<tr>
|
||||
<td>{!! nl2br(e($item)) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%" style="vertical-align: top;"><strong>Faktor Negatif</strong></td>
|
||||
<td>
|
||||
@isset($forminspeksi['fakta']['fakta_negatif'])
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
@foreach ($forminspeksi['fakta']['fakta_negatif'] as $key => $item)
|
||||
<tr>
|
||||
<td>{!! nl2br(e($item)) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@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
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<div style="margin-top: 20px;">
|
||||
<label style="font-weight: bold;">DISCLAIMER</label>
|
||||
<div>
|
||||
<ol style="padding-left: 20px; list-style-type: decimal; margin-top: 0;">
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
@php
|
||||
$displayKey = ucfirst(str_replace('_', ' ', $key));
|
||||
if (strlen($key) == 3) {
|
||||
$displayKey = strtoupper($key);
|
||||
}
|
||||
@endphp
|
||||
<p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<li style="margin-bottom: 5px;">PENILAIAN INI DIBUAT BERDASARKAN ATURAN YANG
|
||||
BERLAKU DI SUBDIT APPRAISAL</li>
|
||||
<li style="margin-bottom: 5px;">LAPORAN INI DIBUAT BERDASARKAN DATA FOTOCOPY
|
||||
DOKUMEN YANG DITERIMA PENILAI DENGAN ASUMSI BAHWA DATA TERSEBUT SESUAI DENGAN
|
||||
DOKUMEN ASLINYA</li>
|
||||
<li style="margin-bottom: 5px;">PENILAI TIDAK MELAKUKAN PEMBUKTIAN LEBIH RINCI ATAU
|
||||
PENGAKUAN TERTULIS DARI PIHAK YANG DITEMUI SAAT PENILAIAN, ATAS INFORMASI YANG
|
||||
DIBERIKAN SECARA LISAN SEHUBUNGAN DENGAN IDENTITAS DIRI DAN HUBUNGAN DI ANTARA
|
||||
PIHAK TERKAIT SAAT MELAKUKAN INSPEKSI OBJEK YANG DINILAI</li>
|
||||
<li style="margin-bottom: 5px;">LAPORAN INI DIGUNAKAN HANYA UNTUK KEPENTINGAN
|
||||
INTERNAL DAN DILARANG MENYEBARKAN KEPADA PIHAK KETIGA</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Demikian laporan penilai jaminan ini di buat secara objektif, tanpa adanya pengaruh baik intern
|
||||
maupun ekstern</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<table style="width: 100%; border-collapse: collapse; text-align: center;">
|
||||
@php
|
||||
use Modules\Usermanagement\Models\User;
|
||||
$penilaiUser = User::where('id', $penilai->userPenilaiTeam->id)->first();
|
||||
$imagePathPenilai = storage_path(
|
||||
'app/public/signatures/' . $penilaiUser->id . '/' . $penilaiUser->sign,
|
||||
);
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<div style="margin-top: 20px;">
|
||||
<label style="font-weight: bold;">DISCLAIMER</label>
|
||||
<div>
|
||||
<ol style="padding-left: 20px; list-style-type: decimal; margin-top: 0;">
|
||||
|
||||
$soUser = User::where('id', $senior_officer->id)->first();
|
||||
$imagePathSo = storage_path('app/public/signatures/' . $soUser->id . '/' . $soUser->sign);
|
||||
<li style="margin-bottom: 5px;">PENILAIAN INI DIBUAT BERDASARKAN ATURAN YANG
|
||||
BERLAKU DI SUBDIT APPRAISAL</li>
|
||||
<li style="margin-bottom: 5px;">LAPORAN INI DIBUAT BERDASARKAN DATA FOTOCOPY
|
||||
DOKUMEN YANG DITERIMA PENILAI DENGAN ASUMSI BAHWA DATA TERSEBUT SESUAI DENGAN
|
||||
DOKUMEN ASLINYA</li>
|
||||
<li style="margin-bottom: 5px;">PENILAI TIDAK MELAKUKAN PEMBUKTIAN LEBIH RINCI ATAU
|
||||
PENGAKUAN TERTULIS DARI PIHAK YANG DITEMUI SAAT PENILAIAN, ATAS INFORMASI YANG
|
||||
DIBERIKAN SECARA LISAN SEHUBUNGAN DENGAN IDENTITAS DIRI DAN HUBUNGAN DI ANTARA
|
||||
PIHAK TERKAIT SAAT MELAKUKAN INSPEKSI OBJEK YANG DINILAI</li>
|
||||
<li style="margin-bottom: 5px;">LAPORAN INI DIGUNAKAN HANYA UNTUK KEPENTINGAN
|
||||
INTERNAL DAN DILARANG MENYEBARKAN KEPADA PIHAK KETIGA</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
$imagePathEO = storage_path(
|
||||
'app/public/signatures/' .
|
||||
User::role('EO Appraisal')->first()->id .
|
||||
'/' .
|
||||
User::role('EO Appraisal')->first()->sign,
|
||||
);
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
$imagePathDD = storage_path(
|
||||
'app/public/signatures/' .
|
||||
User::role('DD Appraisal')->first()->id .
|
||||
'/' .
|
||||
User::role('DD Appraisal')->first()->sign,
|
||||
);
|
||||
@endphp
|
||||
<tr>
|
||||
<td style=" padding: 4px;height: 50px">
|
||||
@if (file_exists($imagePathPenilai))
|
||||
<img src="{{ $imagePathPenilai }}" alt="{{ $imagePathPenilai }}" width="80px">
|
||||
<tr>
|
||||
<td>Demikian laporan penilai jaminan ini di buat secara objektif, tanpa adanya pengaruh baik intern
|
||||
maupun ekstern</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<table style="width: 100%; border-collapse: collapse; text-align: center;">
|
||||
@php
|
||||
use Modules\Usermanagement\Models\User;
|
||||
$penilaiUser = User::where('id', $penilai->userPenilaiTeam->id)->first();
|
||||
$imagePathPenilai = storage_path(
|
||||
'app/public/signatures/' . $penilaiUser->id . '/' . $penilaiUser->sign,
|
||||
);
|
||||
|
||||
$soUser = User::where('id', $senior_officer->id)->first();
|
||||
$imagePathSo = storage_path('app/public/signatures/' . $soUser->id . '/' . $soUser->sign);
|
||||
|
||||
$imagePathEO = storage_path(
|
||||
'app/public/signatures/' .
|
||||
User::role('EO Appraisal')->first()->id .
|
||||
'/' .
|
||||
User::role('EO Appraisal')->first()->sign,
|
||||
);
|
||||
|
||||
$imagePathDD = storage_path(
|
||||
'app/public/signatures/' .
|
||||
User::role('DD Appraisal')->first()->id .
|
||||
'/' .
|
||||
User::role('DD Appraisal')->first()->sign,
|
||||
);
|
||||
@endphp
|
||||
<tr>
|
||||
<td style=" padding: 4px;height: 50px">
|
||||
@if (file_exists($imagePathPenilai))
|
||||
<img src="{{ $imagePathPenilai }}" alt="{{ $imagePathPenilai }}" width="80px">
|
||||
@endif
|
||||
</td>
|
||||
@if ($permohonan->approval_so != null)
|
||||
<td style=" padding: 4px;height: 50px">
|
||||
@if (file_exists($imagePathSo))
|
||||
<img src="{{ $imagePathSo }}" alt="{{ $imagePathSo }}" width="80px">
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
</td>
|
||||
@if ($permohonan->approval_so != null)
|
||||
<td style=" padding: 4px;height: 50px">
|
||||
@if (file_exists($imagePathSo))
|
||||
<img src="{{ $imagePathSo }}" alt="{{ $imagePathSo }}" width="80px">
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
@if ($permohonan->approval_eo != null)
|
||||
<td style=" padding: 4px;height: 50px">
|
||||
@if (file_exists($imagePathEO))
|
||||
<img src="{{ $imagePathEO }}" alt="{{ $imagePathEO }}" width="80px">
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
@if ($permohonan->approval_dd != null)
|
||||
<td style=" padding: 4px;height: 50px">
|
||||
@if (file_exists($imagePathDD))
|
||||
<img src="{{ $imagePathDD }}" alt="{{ $imagePathDD }}" width="80px">
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td style=" padding: 4px;">{{ $penilai->userPenilaiTeam->name ?? '' }}</br>
|
||||
<span>
|
||||
{{ ucwords(strtolower('PENILAI')) }}
|
||||
</span>
|
||||
</td>
|
||||
@if ($permohonan->approval_so != null)
|
||||
<td style=" padding: 4px;">
|
||||
{{ $senior_officer->name ?? '' }}</br>
|
||||
@if ($permohonan->approval_eo != null)
|
||||
<td style=" padding: 4px;height: 50px">
|
||||
@if (file_exists($imagePathEO))
|
||||
<img src="{{ $imagePathEO }}" alt="{{ $imagePathEO }}" width="80px">
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
@if ($permohonan->approval_dd != null)
|
||||
<td style=" padding: 4px;height: 50px">
|
||||
@if (file_exists($imagePathDD))
|
||||
<img src="{{ $imagePathDD }}" alt="{{ $imagePathDD }}" width="80px">
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td style=" padding: 4px;">{{ $penilai->userPenilaiTeam->name ?? '' }}</br>
|
||||
<span>
|
||||
{{ ucwords(strtolower('SENIOR OFFICER')) }}
|
||||
{{ ucwords(strtolower('PENILAI')) }}
|
||||
</span>
|
||||
</td>
|
||||
@if ($permohonan->approval_so != null)
|
||||
<td style=" padding: 4px;">
|
||||
{{ $senior_officer->name ?? '' }}</br>
|
||||
<span>
|
||||
{{ ucwords(strtolower('SENIOR OFFICER')) }}
|
||||
</span>
|
||||
|
||||
</td>
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@if ($permohonan->approval_eo != null)
|
||||
<td style=" padding: 4px;">
|
||||
{{ User::role('EO Appraisal')->first()->name ?? '' }}</br>
|
||||
<span>
|
||||
{{ ucwords(strtolower('EXECUTIVE OFFICER')) }}
|
||||
</span>
|
||||
</td>
|
||||
@endif
|
||||
@if ($permohonan->approval_dd != null)
|
||||
<td style=" padding: 4px;">
|
||||
{{ User::role('DD Appraisal')->first()->name ?? '' }}</br>
|
||||
<span>
|
||||
{{ ucwords(strtolower('DEPUTY DIRECTOR')) }}
|
||||
</span>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
</table>
|
||||
</tr>
|
||||
</table>
|
||||
@if ($permohonan->approval_eo != null)
|
||||
<td style=" padding: 4px;">
|
||||
{{ User::role('EO Appraisal')->first()->name ?? '' }}</br>
|
||||
<span>
|
||||
{{ ucwords(strtolower('EXECUTIVE OFFICER')) }}
|
||||
</span>
|
||||
</td>
|
||||
@endif
|
||||
@if ($permohonan->approval_dd != null)
|
||||
<td style=" padding: 4px;">
|
||||
{{ User::role('DD Appraisal')->first()->name ?? '' }}</br>
|
||||
<span>
|
||||
{{ ucwords(strtolower('DEPUTY DIRECTOR')) }}
|
||||
</span>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
</table>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="page-break"></div>
|
||||
<table style="width: 100%; border-collapse: collapse; border: 1px solid #000;">
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
YANG BERLAKU, APABILA LEWAT MAKA HARUS DILAKUKAN ORDER ULANG SESUAI PROSEDUR YANG
|
||||
BERLAKU
|
||||
</li>
|
||||
<li>Apabila sudah melewati 6 bulan, maka harus penilaian ulang kembali
|
||||
<li class="uppercase">Apabila sudah melewati 6 bulan, maka harus penilaian ulang kembali
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="card border border-agi-100 pb-2.5">
|
||||
<div class="card-header bg-agi-50" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
Detail Penilai
|
||||
Detail Penilaian
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('penilai.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i>
|
||||
|
||||
@@ -329,10 +329,10 @@
|
||||
).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const requestData = isPaparanSO ? {
|
||||
message: result.value.keterangan,
|
||||
message: result.value.message,
|
||||
tanggalPaparan: result.value.tanggalPaparan
|
||||
} : {
|
||||
message: result.value.keterangan
|
||||
message: result.value.message
|
||||
};
|
||||
|
||||
handleAjaxRequest(
|
||||
|
||||
@@ -206,7 +206,14 @@
|
||||
|
||||
if (data.status === 'proses-survey' || data.status == 'rejected-reschedule') {
|
||||
actionHtml += `
|
||||
<a onclick="surveyorRescheduleJadwalSurvey(${data.id},${data.penilaian.id},'${data.nomor_registrasi}', '${data.debiture.name}', '${data.penilaian.waktu_penilaian}', ${JSON.stringify(data.penilaian.rejected_note)})" class="delete btn btn-sm btn-outline btn-light" title="Reschedule Jadwal Survey">
|
||||
<a onclick="surveyorRescheduleJadwalSurvey(
|
||||
${data.id},
|
||||
${data.penilaian.id},
|
||||
${data.nomor_registrasi},
|
||||
${data.debiture.name},
|
||||
${data.penilaian.waktu_penilaian},
|
||||
${JSON.stringify(data.penilaian.rejected_note)}
|
||||
)" class="delete btn btn-sm btn-outline btn-light" title="Reschedule Jadwal Survey">
|
||||
<i class="ki-filled ki-calendar-remove"></i>
|
||||
</a>`;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<link rel="stylesheet" href="https://unpkg.com/dropzone@5/dist/min/dropzone.min.css" type="text/css" />
|
||||
{{-- <link rel="stylesheet" href="https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.css" /> --}}
|
||||
<style>
|
||||
.dropzone {
|
||||
border: 2px dashed #3498db;
|
||||
@@ -266,9 +264,6 @@
|
||||
@include('lpj::surveyor.js.fotojs')
|
||||
@include('lpj::surveyor.js.utils')
|
||||
@push('scripts')
|
||||
<script src="https://unpkg.com/dropzone@5/dist/min/dropzone.min.js"></script>
|
||||
<script src="https://scaleflex.cloudimg.io/v7/plugins/filerobot-image-editor/latest/filerobot-image-editor.min.js">
|
||||
</script>
|
||||
<script>
|
||||
let jsonDataContoh = @json($formFoto);
|
||||
Dropzone.autoDiscover = false;
|
||||
@@ -609,7 +604,7 @@
|
||||
e.preventDefault();
|
||||
// Get the file path from hidden input
|
||||
const filePath = document.getElementById('editDataFilePath').value;
|
||||
|
||||
|
||||
if (filePath) {
|
||||
openFilerobotEditor(filePath);
|
||||
} else {
|
||||
@@ -632,20 +627,9 @@
|
||||
const config = {
|
||||
source: imagePath || '',
|
||||
onSave: (editedImageObject, designState) => {
|
||||
console.log('Image saved', editedImageObject);
|
||||
|
||||
// Save the edited image
|
||||
saveEditedImage(editedImageObject, document.getElementById('editDataFilePath').value);
|
||||
window.FilerobotImageEditor.terminate();
|
||||
|
||||
// Close the editor
|
||||
FilerobotImageEditor.terminate();
|
||||
|
||||
// Hide the modal
|
||||
document.getElementById('modal_10').setAttribute('data-modal-dismiss', 'true');
|
||||
|
||||
|
||||
// Update the preview if needed
|
||||
updateImagePreview(editedImageObject.imageBase64 || editedImageObject.imageCanvas.toDataURL());
|
||||
},
|
||||
annotationsCommon: {
|
||||
fill: '#ff0000'
|
||||
@@ -681,17 +665,29 @@
|
||||
config
|
||||
);
|
||||
|
||||
// Render the editor
|
||||
|
||||
filerobotImageEditor.render({
|
||||
onClose: (closingReason) => {
|
||||
console.log('Editor closed:', closingReason);
|
||||
|
||||
filerobotImageEditor.terminate();
|
||||
|
||||
// Hide the modal
|
||||
document.querySelector('#modal_10').setAttribute('data-modal-dismiss', 'true');
|
||||
let closeButton = document.getElementById('modal_10');
|
||||
|
||||
if (!closeButton) {
|
||||
closeButton = document.createElement('button');
|
||||
closeButton.setAttribute('data-modal-dismiss', 'true');
|
||||
closeButton.setAttribute('type', 'button');
|
||||
closeButton.setAttribute('class', 'btn btn-primary');
|
||||
closeButton.setAttribute('data-modal-toggle', '#modal_10');
|
||||
document.body.appendChild(closeButton);
|
||||
}
|
||||
|
||||
closeButton.click();
|
||||
console.log('Modal closed via close button simulation');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
window.addEditAndDeleteButtons = function(file, response) {
|
||||
|
||||
@@ -828,16 +824,23 @@
|
||||
formData.append('original_path', originalFilePath);
|
||||
|
||||
formData.forEach((value, key) => {
|
||||
console.log(`${key}:`, value);
|
||||
});
|
||||
console.log(`${key}:`, value);
|
||||
});
|
||||
|
||||
fetch('/api/save-edited-image', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
$.ajax({
|
||||
url: `{{ route('surveyor.saveEditedImage') }}`,
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
data: {
|
||||
edited_image: imageData,
|
||||
original_path: originalFilePath,
|
||||
nomor_registrasi: '{{ $permohonan->nomor_registrasi }}'
|
||||
},
|
||||
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Perubahan Disimpan',
|
||||
@@ -848,17 +851,23 @@
|
||||
window.location.reload();
|
||||
|
||||
}
|
||||
});;
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
error: function(xhr) {
|
||||
const errorMessage = xhr.responseJSON?.message || 'Terjadi kesalahan';
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Gagal Menyimpan',
|
||||
text: errorMessage,
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.reload();
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
@endphp
|
||||
|
||||
<select id="hub_cadeb_tidak_sesuai" class="input w-full" name="hub_cadeb_tidak_sesuai"
|
||||
style="{{ old('hub_cadeb_tidak_sesuai', $selectedData) ? '' : 'display: none;' }}">
|
||||
style="{{ $statusKey != 'sesuai' ? '' : 'display: none;' }}">
|
||||
<option value="">Select Hubungan Cadeb</option>
|
||||
@if (isset($basicData['hubCadeb']))
|
||||
@foreach ($basicData['hubCadeb'] as $item)
|
||||
@@ -403,7 +403,7 @@
|
||||
<input id="hub_penghuni_tidak_sesuai" class="input" name="hub_penghuni_tidak_sesuai"
|
||||
placeholder="Masukkan Hubungan penghuni jaminan"
|
||||
value="{{ old('hub_penghuni_tidak_sesuai', isset($selectedData) ? $selectedData : '') }}"
|
||||
style="{{ old('hub_penghuni_tidak_sesuai', $selectedData ?? false) ? '' : 'display: none;' }}">
|
||||
style="{{ $statusKey != 'sesuai' ? '' : 'display: none;' }}">
|
||||
</div>
|
||||
<em id="error-hub_cadeb_penghuni" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
|
||||
@@ -91,6 +91,8 @@
|
||||
@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);
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const signaturePads = {};
|
||||
const types = ['penilai', 'cabang', 'debitur', 'kjjp'];
|
||||
@@ -343,8 +345,6 @@
|
||||
showLoadingSwal('Mengirim data ke server...');
|
||||
const form = document.querySelector('form');
|
||||
const formData = new FormData(form);
|
||||
console.log('Form data entries:', Array.from(formData.entries()));
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route('surveyor.store') }}',
|
||||
type: 'POST',
|
||||
@@ -364,8 +364,8 @@
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
// window.location.href =
|
||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -389,8 +389,6 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let errors = xhr.responseJSON?.errors;
|
||||
$('.alert').text('');
|
||||
if (errors) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
: 'sesuai';
|
||||
$luasBangunan = $forminspeksi['bangunan']['luas_tanah_bagunan'][$cekLuasBangunan] ?? null;
|
||||
@endphp
|
||||
<td width="25%"><strong>Luas Tanah Bangunan</strong></td>
|
||||
<td width="25%"><strong>Luas Bangunan (IMB)</strong></td>
|
||||
<td>{{ $luasBangunan }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['bangunan']['jenis_bangunan']) && in_array($item->name, $forminspeksi['bangunan']['jenis_bangunan']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
@@ -80,6 +81,18 @@
|
||||
<input type="checkbox" name="sifat_bangunan[]" value="{{ $item->name }}"
|
||||
{{ isset($forminspeksi['bangunan']['sifat_bangunan']) && in_array($item->name, $forminspeksi['bangunan']['sifat_bangunan']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
|
||||
@if (isset($forminspeksi['bangunan']['sifat_bangunan']) &&
|
||||
in_array($item->name, $forminspeksi['bangunan']['sifat_bangunan']))
|
||||
@php
|
||||
$inputValues = isset($forminspeksi['bangunan']['sifat_bangunan_input'][$index])
|
||||
? $forminspeksi['bangunan']['sifat_bangunan_input'][$index]
|
||||
: null;
|
||||
@endphp
|
||||
@if ($inputValues)
|
||||
<span class="label-checkbox"> - {{ $inputValues }}</span>
|
||||
@endif
|
||||
@endif
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
@@ -90,7 +103,8 @@
|
||||
</tr>
|
||||
|
||||
|
||||
@if (isset($forminspeksi['bangunan']['spesifikasi_bangunan']) && count($forminspeksi['bangunan']['spesifikasi_bangunan']) > 0)
|
||||
@if (isset($forminspeksi['bangunan']['spesifikasi_bangunan']) &&
|
||||
count($forminspeksi['bangunan']['spesifikasi_bangunan']) > 0)
|
||||
@foreach ($forminspeksi['bangunan']['spesifikasi_bangunan'] as $bangunanIndex => $bangunan)
|
||||
<tr>
|
||||
<td colspan="2"><strong>Spesifikasi Bangunan {{ $bangunanIndex + 1 }}</strong></td>
|
||||
@@ -109,14 +123,20 @@
|
||||
@php
|
||||
$selectedValues = [];
|
||||
if (isset($bangunan['spek_kategori_bangunan'][$spesifikasi->name])) {
|
||||
$selectedValues = array_values($bangunan['spek_kategori_bangunan'][$spesifikasi->name]);
|
||||
$selectedValues = array_values(
|
||||
$bangunan['spek_kategori_bangunan'][$spesifikasi->name],
|
||||
);
|
||||
}
|
||||
$lainnyaValue = $bangunan['spek_kategori_bangunan'][$spesifikasi->name]['lainnya'] ?? '';
|
||||
$lainnyaValue =
|
||||
$bangunan['spek_kategori_bangunan'][$spesifikasi->name][
|
||||
'lainnya'
|
||||
] ?? '';
|
||||
@endphp
|
||||
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox" class="checkbox-lainnya" style="margin-right: 3px;"
|
||||
<input type="checkbox" class="checkbox-lainnya"
|
||||
style="margin-right: 3px;"
|
||||
name="spesifikasi_bangunan[{{ $bangunanIndex }}][{{ $spesifikasi->name }}][]"
|
||||
value="{{ $kategori->name }}"
|
||||
@if (in_array($kategori->name, $selectedValues)) checked @endif>
|
||||
@@ -134,19 +154,19 @@
|
||||
@php $count++; @endphp
|
||||
|
||||
@if ($count % 3 == 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</table>
|
||||
|
||||
@@ -129,8 +129,13 @@
|
||||
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
<p> - {{ ucfirst(str_replace('_', ' ', $key)) }}:
|
||||
{{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@php
|
||||
$displayKey = ucfirst(str_replace('_', ' ', $key));
|
||||
if (strlen($key) == 3) {
|
||||
$displayKey = strtoupper($key);
|
||||
}
|
||||
@endphp
|
||||
<p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
|
||||
@@ -13,23 +13,23 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td width="25%">Jarak Jalan Utama</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_jalan_utama'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_jalan_utama'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jalan Lingkungan</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_jalan_utama'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jalan_linkungan'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jarak CBD Point</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_cbd_point'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['jarak_cbd_point'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nama CBD Point</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['nama_cbd_point'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['nama_cbd_point'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lebar Perkerasan Jalan</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['lebar_perkerasan_jalan'] ?? 'Tidak Diketahui' }}</td>
|
||||
<td>{{ $forminspeksi['lingkungan']['lebar_perkerasan_jalan'] ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Sarana Pelengkap</strong></td>
|
||||
@@ -191,6 +191,55 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Dekat Makam</strong></td>
|
||||
<td>
|
||||
<div class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="radio" name="disekitar_lokasi" value="ya"
|
||||
{{ ($forminspeksi['lingkungan']['dekat_makam'] ?? '') == 'ya' ? 'checked' : '' }}>
|
||||
Ya
|
||||
@if (($forminspeksi['lingkungan']['dekat_makam'] ?? '') == 'ya')
|
||||
- Nama Makam:
|
||||
{{ $forminspeksi['lingkungan']['nama_makam'] ?? '' }}
|
||||
, Jarak Makam:
|
||||
{{ $forminspeksi['lingkungan']['jarak_makam'] ?? '' }}
|
||||
@endif
|
||||
</label>
|
||||
<label class="checkbox-label">
|
||||
<input type="radio" name="disekitar_lokasi" value="tidak"
|
||||
{{ ($forminspeksi['lingkungan']['dekat_makam'] ?? '') == 'tidak' ? 'checked' : '' }}>
|
||||
Tidak
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Dekat TPS</strong></td>
|
||||
<td>
|
||||
<div class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="radio" name="disekitar_lokasi" value="ya"
|
||||
{{ ($forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'ya' ? 'checked' : '' }}>
|
||||
Ya
|
||||
@if (($forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'ya')
|
||||
- Nama TPS:
|
||||
{{ $forminspeksi['lingkungan']['nama_tps'] ?? '' }}
|
||||
, Jarak TPS:
|
||||
{{ $forminspeksi['lingkungan']['jarak_tps'] ?? '' }}
|
||||
@endif
|
||||
</label>
|
||||
<label class="checkbox-label">
|
||||
<input type="radio" name="disekitar_lokasi" value="tidak"
|
||||
{{ ($forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'tidak' ? 'checked' : '' }}>
|
||||
Tidak
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Merupakan Daerah</strong></td>
|
||||
<td>
|
||||
|
||||
@@ -193,6 +193,12 @@
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
.no-break {
|
||||
page-break-inside: avoid;
|
||||
page-break-before: auto;
|
||||
page-break-after: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -308,7 +314,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Nama Debiture/ Wakil Debiture</strong></td>
|
||||
<td>{{ $permohonan->debiture->name ?? '' }}</td>
|
||||
<td>{{ $permohonan->debiture->name ?? '' }}
|
||||
@if (isset($forminspeksi['asset']['debitur_perwakilan']) && !empty($forminspeksi['asset']['debitur_perwakilan']))
|
||||
@foreach ($forminspeksi['asset']['debitur_perwakilan'] as $key => $item)
|
||||
/ {{ $item }}
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td><strong>Kunjungan Tanggal</strong></td>
|
||||
<td>{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}</td>
|
||||
</tr>
|
||||
@@ -556,10 +568,12 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (strtolower($permohonan->tujuanPenilaian->name) == 'rap')
|
||||
@include('lpj::surveyor.components.print-out.rap')
|
||||
@else
|
||||
<tr>
|
||||
|
||||
<td style="text-align: center; border: 1px solid #000;">
|
||||
E
|
||||
</td>
|
||||
@@ -600,7 +614,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
@endIf
|
||||
|
||||
</div>
|
||||
{{-- <tr>
|
||||
<td style="text-align: center; border: 1px solid #000;">
|
||||
G
|
||||
|
||||
@@ -123,13 +123,16 @@
|
||||
<td><strong>Tusuk Sate</strong></td>
|
||||
<td>
|
||||
<label>
|
||||
<input type="radio" name="tusuk_sate" value="yes"
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'yes' ? 'Ya' : 'Tidak' }}
|
||||
<input type="radio" name="tusuk_sate" value="Ya"
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']['Ya']) && $forminspeksi['tanah']['tusuk_sate']['Ya'] ? 'checked' : '' }}>
|
||||
Ya
|
||||
@if (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate']['Ya'])
|
||||
{{ isset($forminspeksi['tanah']['tusuk_sate']['Ya']) ? ' (' . $forminspeksi['tanah']['tusuk_sate']['Ya'] . ')' : '' }}
|
||||
@endif
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="tusuk_sate" value="no"
|
||||
{{isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'no' ? 'checked' : '' }}>
|
||||
<input type="radio" name="tusuk_sate" value="Tidak"
|
||||
{{isset($forminspeksi['tanah']['tusuk_sate']['Tidak']) && $forminspeksi['tanah']['tusuk_sate']['Tidak'] ? 'checked' : '' }}>
|
||||
Tidak
|
||||
</label>
|
||||
</td>
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
@if (isset($permohonan->documents))
|
||||
@foreach ($permohonan->documents as $item)
|
||||
@php
|
||||
$luas_tanah = 0;
|
||||
if ($item->detail) {
|
||||
foreach ($item->detail as $luas) {
|
||||
if (isset($luas->name) && $luas->jenis_legalitas_jaminan_id === 1) {
|
||||
$details = json_decode($luas->details, true);
|
||||
$luas_tanah = isset($details['luas_tanah']) ? $details['luas_tanah'] : 0;
|
||||
break;
|
||||
$luas_tanah = 0;
|
||||
if ($item->detail) {
|
||||
foreach ($item->detail as $luas) {
|
||||
if (isset($luas->name) && $luas->jenis_legalitas_jaminan_id === 1) {
|
||||
$details = json_decode($luas->details, true);
|
||||
$luas_tanah = isset($details['luas_tanah']) ? $details['luas_tanah'] : 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<input type="hidden" name="luas_tanah_sesuai" class="input" value="{{ $luas_tanah }}">
|
||||
<p class="text-2sm text-gray-700">{{ $luas_tanah }} m<sup>2</sup></p>
|
||||
@@ -33,26 +33,26 @@
|
||||
<div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2">
|
||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||
<input type="radio" class="radio" name="luas_tanah" value="sesuai"
|
||||
onclick="toggleFieldVisibility('luas_tanah', 'luas_tanah_tidak_sesuai', ['tidak sesuai'])"
|
||||
onclick="toggleFieldVisibility('luas_tanah', 'luas_tanah_tidak_sesuai', ['tidak sesuai'])"
|
||||
{{ old('luas_tanah', isset($forminspeksi['tanah']['luas_tanah']['sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Sesuai</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="luas_tanah" value="tidak sesuai"
|
||||
onclick="toggleFieldVisibility('luas_tanah', 'luas_tanah_tidak_sesuai', ['tidak sesuai'])"
|
||||
onclick="toggleFieldVisibility('luas_tanah', 'luas_tanah_tidak_sesuai', ['tidak sesuai'])"
|
||||
{{ old('luas_tanah', isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak Sesuai</span>
|
||||
</label>
|
||||
<div id="luas_tanah_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ old('luas_tanah', isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<div class="input">
|
||||
<input id="analisa_tanah_tidak_sesuai" type="text" name="luas_tanah_tidak_sesuai"
|
||||
class="w-full number-format" placeholder="Masukan Luas Tanah"
|
||||
value="{{ old('luas_tanah_tidak_sesuai', $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||
<i>M<sup>2</sup></i>
|
||||
</div>
|
||||
style="{{ old('luas_tanah', isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<div class="input">
|
||||
<input id="analisa_tanah_tidak_sesuai" type="text" name="luas_tanah_tidak_sesuai"
|
||||
class="w-full number-format" placeholder="Masukan Luas Tanah"
|
||||
value="{{ old('luas_tanah_tidak_sesuai', $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||
<i>M<sup>2</sup></i>
|
||||
</div>
|
||||
<button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('analisa_tanah')">Save
|
||||
onclick="updateAnalisa('analisa_tanah')">Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,42 +70,41 @@
|
||||
<div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2">
|
||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||
<input type="radio" class="radio" name="hadap_mata_angin" value="sesuai"
|
||||
onclick="toggleFieldVisibility('hadap_mata_angin', 'hadap_mata_angin_tidak_sesuai' ,['tidak sesuai'])"
|
||||
onclick="toggleFieldVisibility('hadap_mata_angin', 'hadap_mata_angin_tidak_sesuai' ,['tidak sesuai'])"
|
||||
{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Sesuai</span>
|
||||
</label>
|
||||
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="hadap_mata_angin" value="tidak sesuai"
|
||||
onclick="toggleFieldVisibility('hadap_mata_angin', 'hadap_mata_angin_tidak_sesuai' ,['tidak sesuai'])"
|
||||
onclick="toggleFieldVisibility('hadap_mata_angin', 'hadap_mata_angin_tidak_sesuai' ,['tidak sesuai'])"
|
||||
{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak Sesuai</span>
|
||||
</label>
|
||||
|
||||
<!-- Select dropdown untuk "Tidak Sesuai" -->
|
||||
<div id="hadap_mata_angin_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<select
|
||||
class="input w-full
|
||||
id=" hadap_mata_angin_tidak_sesuai"
|
||||
name="hadap_mata_angin_tidak_sesuai">
|
||||
@php
|
||||
$statusKey = isset($forminspeksi['tanah']['hadap_mata_angin']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedData = $forminspeksi['tanah']['hadap_mata_angin'][$statusKey] ?? null;
|
||||
@endphp
|
||||
<option value="">Select Hadap Mata Angin</option>
|
||||
@if (isset($basicData['arahMataAngin']))
|
||||
@foreach ($basicData['arahMataAngin'] as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('hadap_mata_angin_tidak_sesuai', $selectedData ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}
|
||||
</option>
|
||||
style="{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<select class="input w-full
|
||||
id="
|
||||
hadap_mata_angin_tidak_sesuai" name="hadap_mata_angin_tidak_sesuai">
|
||||
@php
|
||||
$statusKey = isset($forminspeksi['tanah']['hadap_mata_angin']['sesuai'])
|
||||
? 'sesuai'
|
||||
: 'tidak sesuai';
|
||||
$selectedData = $forminspeksi['tanah']['hadap_mata_angin'][$statusKey] ?? null;
|
||||
@endphp
|
||||
<option value="">Select Hadap Mata Angin</option>
|
||||
@if (isset($basicData['arahMataAngin']))
|
||||
@foreach ($basicData['arahMataAngin'] as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('hadap_mata_angin_tidak_sesuai', $selectedData ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
{{-- <button type="button" class="btn btn-md btn-primary" onclick="updateAnalisa('hadap_mata_angin')">Save</button> --}}
|
||||
@endif
|
||||
</select>
|
||||
{{-- <button type="button" class="btn btn-md btn-primary" onclick="updateAnalisa('hadap_mata_angin')">Save</button> --}}
|
||||
</div>
|
||||
</div>
|
||||
<em id="error-hadap_mata_angin" class="alert text-danger text-sm"></em>
|
||||
@@ -122,22 +121,22 @@
|
||||
<div class="flex items-center">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="bentuk_tanah[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('bentuk_tanah', [])) ||
|
||||
(isset($forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']) &&
|
||||
is_array($forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']) &&
|
||||
in_array($item->name, $forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']))
|
||||
? 'checked'
|
||||
: '' }}
|
||||
onclick="toggleCheckboxVisibility('bentuk_tanah', 'bentuk_tanah_lainnya', ['lainnya'])"/>
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('bentuk_tanah', [])) ||
|
||||
(isset($forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']) &&
|
||||
is_array($forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']) &&
|
||||
in_array($item->name, $forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']))
|
||||
? 'checked'
|
||||
: '' }}
|
||||
onclick="toggleCheckboxVisibility('bentuk_tanah', 'bentuk_tanah_lainnya', ['lainnya'])" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'lainnya') == 0)
|
||||
<input id="bentuk_tanah_lainnya" type="text"
|
||||
style="{{ isset($forminspeksi['tanah']['bentuk_tanah']['lainnya']) && $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ? '' : 'display: none;' }}"
|
||||
name="bentuk_tanah_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan bentuk tanah..."
|
||||
value="{{ old('bentuk_tanah_lainnya', $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ?? '') }}"/>
|
||||
style="{{ isset($forminspeksi['tanah']['bentuk_tanah']['lainnya']) && $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ? '' : 'display: none;' }}"
|
||||
name="bentuk_tanah_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan bentuk tanah..."
|
||||
value="{{ old('bentuk_tanah_lainnya', $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ?? '') }}" />
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -155,7 +154,7 @@
|
||||
@foreach ($basicData['konturTanah'] as $item)
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="kontur_tanah[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('kontur_tanah', $forminspeksi['tanah']['kontur_tanah'] ?? [])) ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@@ -175,24 +174,24 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="ketinggian_jalan[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('ketinggian_jalan', $forminspeksi['tanah']['ketinggian_jalan'] ?? [])) ? 'checked' : '' }}
|
||||
onclick="toggleMultipleFields('ketinggian_jalan', {
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('ketinggian_jalan', $forminspeksi['tanah']['ketinggian_jalan'] ?? [])) ? 'checked' : '' }}
|
||||
onclick="toggleMultipleFields('ketinggian_jalan', {
|
||||
'Lebih Tinggi': 'input-lebih-tinggi',
|
||||
'Lebih Rendah': 'input-lebih-rendah'
|
||||
})"/>
|
||||
})" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'Lebih Tinggi') == 0)
|
||||
<input id="input-lebih-tinggi" type="text"
|
||||
style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ? '' : 'display: none;' }}"
|
||||
name="ketinggian_lebih_tinggi" class="input w-full mt-2" placeholder="m2"
|
||||
value="{{ old('ketinggian_lebih_tinggi', $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ?? '') }}"/>
|
||||
style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ? '' : 'display: none;' }}"
|
||||
name="ketinggian_lebih_tinggi" class="input w-full mt-2" placeholder="m2"
|
||||
value="{{ old('ketinggian_lebih_tinggi', $forminspeksi['tanah']['ketinggian_tanah']['lebih_tinggi'] ?? '') }}" />
|
||||
@elseif (strcasecmp($item->name, 'Lebih Rendah') == 0)
|
||||
<input id="input-lebih-rendah" type="text"
|
||||
style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ? '' : 'display: none;' }}"
|
||||
name="ketinggian_lebih_rendah" class="input w-full mt-2" placeholder="m"
|
||||
value="{{ old('ketinggian_lebih_rendah', $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ?? '') }}"/>
|
||||
style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ? '' : 'display: none;' }}"
|
||||
name="ketinggian_lebih_rendah" class="input w-full mt-2" placeholder="m"
|
||||
value="{{ old('ketinggian_lebih_rendah', $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ?? '') }}" />
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@@ -247,17 +246,17 @@
|
||||
<div class="flex items-center">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="posisi_kavling[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, $selectedPosisiKavling) ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('posisi_kavling', 'posisi_kavling_lainnya', ['Lainnya'])"/>
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, $selectedPosisiKavling) ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('posisi_kavling', 'posisi_kavling_lainnya', ['Lainnya'])" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||
<input id="posisi_kavling_lainnya" type="text"
|
||||
style="{{ $lainnyaValue ? '' : 'display: none' }}"
|
||||
name="posisi_kavling_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan Posisi Kavling lainnya..."
|
||||
value="{{ $lainnyaValue }}"/>
|
||||
style="{{ $lainnyaValue ? '' : 'display: none' }}"
|
||||
name="posisi_kavling_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan Posisi Kavling lainnya..."
|
||||
value="{{ $lainnyaValue }}" />
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -272,14 +271,25 @@
|
||||
<label class="form-label max-w-56">Tusuk Sate</label>
|
||||
<div class="flex-wrap items-stretch">
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="tusuk_sate" value="yes"
|
||||
{{ old('tusuk_sate') == 'yes' || (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'yes') ? 'checked' : '' }}>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input onclick="toggleFieldVisibility('tusuk_sate', 'tusuk_sate_ya', ['Ya'])"
|
||||
type="radio" class="radio" name="tusuk_sate" value="Ya"
|
||||
{{ old('tusuk_sate') == 'Ya' || (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate']['Ya']) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Ya</span>
|
||||
|
||||
@php
|
||||
$statusKey = isset($forminspeksi['tanah']['tusuk_sate']['Ya']) ? 'Ya' : 'Tidak';
|
||||
$selectedData = $forminspeksi['tanah']['tusuk_sate'][$statusKey] ?? null;
|
||||
@endphp
|
||||
<input id="tusuk_sate_ya" class="input" name="tusuk_sate_ya"
|
||||
placeholder="Masukkan Tusuk Sate..."
|
||||
value="{{ old('tusuk_sate_ya', isset($selectedData) ? $selectedData : '') }}"
|
||||
style="{{ $statusKey == 'Ya' ? '' : 'display: none;' }}">
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="tusuk_sate" value="no"
|
||||
{{ old('tusuk_sate') == 'no' || (isset($forminspeksi['tanah']['tusuk_sate']) && $forminspeksi['tanah']['tusuk_sate'] == 'no') ? 'checked' : '' }}>
|
||||
<input onclick="toggleFieldVisibility('tusuk_sate', 'tusuk_sate_ya', ['Ya'])"
|
||||
type="radio" class="radio" name="tusuk_sate" value="Tidak"
|
||||
{{ old('tusuk_sate') == 'Tidak' || (isset($forminspeksi['tanah']['tusuk_sate']['Tidak']) && $forminspeksi['tanah']['tusuk_sate']['Tidak']) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -316,9 +326,9 @@
|
||||
@foreach ($basicData['kondisiFisikTanah'] as $item)
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="kondisi_fisik_tanah[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('kondisi_fisik_tanah', [])) || (isset($forminspeksi['tanah']['kondisi_fisik_tanah']['kondisi_fisik_tanah']) && in_array($item->name, $forminspeksi['tanah']['kondisi_fisik_tanah']['kondisi_fisik_tanah'])) ? 'checked' : '' }}
|
||||
onclick="toggleInputLainnya(this, 'kondisi_fisik_tanah_lainnya', '{{ $item->name }}')"/>
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('kondisi_fisik_tanah', [])) || (isset($forminspeksi['tanah']['kondisi_fisik_tanah']['kondisi_fisik_tanah']) && in_array($item->name, $forminspeksi['tanah']['kondisi_fisik_tanah']['kondisi_fisik_tanah'])) ? 'checked' : '' }}
|
||||
onclick="toggleInputLainnya(this, 'kondisi_fisik_tanah_lainnya', '{{ $item->name }}')" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
|
||||
@@ -326,9 +336,9 @@
|
||||
@if (strcasecmp($item->name, 'lainnya') == 0)
|
||||
<div class="flex items-center">
|
||||
<input type="text" name="kondisi_fisik_tanah_lainnya"
|
||||
id="kondisi_fisik_tanah_lainnya" class="input mt-2"
|
||||
placeholder="Masukkan Kondisi Fisik Tanah..." style="display: none;"
|
||||
value="{{ old('kondisi_fisik_tanah_lainnya', isset($forminspeksi['tanah']['kondisi_fisik_tanah']['lainnya'])) }}">
|
||||
id="kondisi_fisik_tanah_lainnya" class="input mt-2"
|
||||
placeholder="Masukkan Kondisi Fisik Tanah..." style="display: none;"
|
||||
value="{{ old('kondisi_fisik_tanah_lainnya', isset($forminspeksi['tanah']['kondisi_fisik_tanah']['lainnya'])) }}">
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
||||
<script>
|
||||
function surveyorFreeze(permohonanId, noReg, debitur) {
|
||||
|
||||
@@ -308,12 +310,33 @@
|
||||
<div class="text-left space-y-4">
|
||||
<p class="text-gray-700 text-center">Untuk membuat jadwal kunjungan, silahkan isi form berikut!</p>
|
||||
<div>
|
||||
<label for="waktu_penilaian" class="block text-sm font-medium text-gray-700 mb-1 " style="text-align: start;">Jadwal Kunjungan <span class="text-danger">*</span></label>
|
||||
<input type="datetime-local" id="waktu_penilaian" class="input" style="margin-top: 10px;" required>
|
||||
<label for="tanggal_kunjungan" class="block text-sm font-medium text-gray-700 mb-1" style="text-align: start;">Tanggal Kunjungan <span class="text-danger">*</span></label>
|
||||
<input type="date" id="tanggal_kunjungan" class="input" style="margin-top: 10px; width: 100%;" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="deskripsi_penilaian" class="block text-sm font-medium text-gray-700 mb-1 mt-2" style="text-align: start;">Keterangan <span class="text-danger">*</span> </label>
|
||||
<textarea id="deskripsi-penilaian" class="textarea" placeholder="Masukkan keterangan" style="margin-top: 10px;" required></textarea>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1 mt-2" style="text-align: start;">Waktu Kunjungan (Format 24 Jam) <span class="text-danger">*</span></label>
|
||||
<div style="display: flex; align-items: center; gap: 10px; margin-top: 10px;">
|
||||
<div style="position: relative; flex: 1;">
|
||||
<input type="text" id="jam_kunjungan" class="input" maxlength="2" style="width: 100%; text-align: center; padding-right: 30px;" placeholder="00">
|
||||
<div style="position: absolute; right: 5px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column;">
|
||||
<button type="button" id="jam_up" class="btn btn-xs btn-light" style="height: 12px; padding: 0 4px; font-size: 10px; margin-bottom: 2px;">▲</button>
|
||||
<button type="button" id="jam_down" class="btn btn-xs btn-light" style="height: 12px; padding: 0 4px; font-size: 10px;">▼</button>
|
||||
</div>
|
||||
</div>
|
||||
<span style="font-weight: bold;">:</span>
|
||||
<div style="position: relative; flex: 1;">
|
||||
<input type="text" id="menit_kunjungan" class="input" maxlength="2" style="width: 100%; text-align: center; padding-right: 30px;" placeholder="00">
|
||||
<div style="position: absolute; right: 5px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column;">
|
||||
<button type="button" id="menit_up" class="btn btn-xs btn-light" style="height: 12px; padding: 0 4px; font-size: 10px; margin-bottom: 2px;">▲</button>
|
||||
<button type="button" id="menit_down" class="btn btn-xs btn-light" style="height: 12px; padding: 0 4px; font-size: 10px;">▼</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<label for="deskripsi-penilaian" class="block text-sm font-medium text-gray-700 mb-1 mt-2" style="text-align: start;">Keterangan <span class="text-danger">*</span> </label>
|
||||
<textarea id="deskripsi-penilaian" class="textarea" placeholder="Masukkan keterangan" style="margin-top: 10px;" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
@@ -322,14 +345,120 @@
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Submit',
|
||||
cancelButtonText: 'Batal',
|
||||
didOpen: () => {
|
||||
// Set default value ke waktu saat ini
|
||||
const now = new Date();
|
||||
const dateString = now.toISOString().slice(0, 10);
|
||||
const hours = now.getHours();
|
||||
const minutes = now.getMinutes();
|
||||
|
||||
// Set default values
|
||||
document.getElementById('tanggal_kunjungan').value = dateString;
|
||||
document.getElementById('jam_kunjungan').value = hours.toString().padStart(2, '0');
|
||||
document.getElementById('menit_kunjungan').value = minutes.toString().padStart(2, '0');
|
||||
|
||||
// Handler untuk input jam
|
||||
const jamInput = document.getElementById('jam_kunjungan');
|
||||
const jamUp = document.getElementById('jam_up');
|
||||
const jamDown = document.getElementById('jam_down');
|
||||
|
||||
// Validasi hanya angka untuk jam
|
||||
jamInput.addEventListener('input', function(e) {
|
||||
this.value = this.value.replace(/[^0-9]/g, '').substring(0, 2);
|
||||
let value = parseInt(this.value, 10);
|
||||
|
||||
if (!isNaN(value)) {
|
||||
if (value > 23) {
|
||||
this.value = "00";
|
||||
} else {
|
||||
this.value = value.toString().padStart(2, '0');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
jamInput.addEventListener('blur', function() {
|
||||
if (this.value === "" || isNaN(parseInt(this.value, 10))) {
|
||||
this.value = "00";
|
||||
} else {
|
||||
this.value = parseInt(this.value, 10).toString().padStart(2, '0');
|
||||
}
|
||||
});
|
||||
|
||||
// Button handlers untuk jam
|
||||
jamUp.addEventListener('click', function() {
|
||||
let value = parseInt(jamInput.value, 10);
|
||||
if (isNaN(value)) value = 0;
|
||||
|
||||
value = (value + 1) % 24;
|
||||
jamInput.value = value.toString().padStart(2, '0');
|
||||
});
|
||||
|
||||
jamDown.addEventListener('click', function() {
|
||||
let value = parseInt(jamInput.value, 10);
|
||||
if (isNaN(value)) value = 0;
|
||||
|
||||
value = (value - 1 + 24) % 24;
|
||||
jamInput.value = value.toString().padStart(2, '0');
|
||||
});
|
||||
|
||||
// Handler untuk input menit
|
||||
const menitInput = document.getElementById('menit_kunjungan');
|
||||
const menitUp = document.getElementById('menit_up');
|
||||
const menitDown = document.getElementById('menit_down');
|
||||
|
||||
// Validasi hanya angka untuk menit
|
||||
menitInput.addEventListener('input', function(e) {
|
||||
this.value = this.value.replace(/[^0-9]/g, '').substring(0, 2);
|
||||
let value = parseInt(this.value, 10);
|
||||
|
||||
if (!isNaN(value)) {
|
||||
if (value > 59) {
|
||||
this.value = "00";
|
||||
} else {
|
||||
this.value = value.toString().padStart(2, '0');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
menitInput.addEventListener('blur', function() {
|
||||
if (this.value === "" || isNaN(parseInt(this.value, 10))) {
|
||||
this.value = "00";
|
||||
} else {
|
||||
this.value = parseInt(this.value, 10).toString().padStart(2, '0');
|
||||
}
|
||||
});
|
||||
|
||||
// Button handlers untuk menit
|
||||
menitUp.addEventListener('click', function() {
|
||||
let value = parseInt(menitInput.value, 10);
|
||||
if (isNaN(value)) value = 0;
|
||||
|
||||
value = (value + 1) % 60;
|
||||
menitInput.value = value.toString().padStart(2, '0');
|
||||
});
|
||||
|
||||
menitDown.addEventListener('click', function() {
|
||||
let value = parseInt(menitInput.value, 10);
|
||||
if (isNaN(value)) value = 0;
|
||||
|
||||
value = (value - 1 + 60) % 60;
|
||||
menitInput.value = value.toString().padStart(2, '0');
|
||||
});
|
||||
},
|
||||
preConfirm: () => {
|
||||
// Ambil nilai input
|
||||
const tanggalInspeksi = document.getElementById('waktu_penilaian').value;
|
||||
const tanggalKunjungan = document.getElementById('tanggal_kunjungan').value;
|
||||
let jamKunjungan = document.getElementById('jam_kunjungan').value;
|
||||
let menitKunjungan = document.getElementById('menit_kunjungan').value;
|
||||
const keteranganInspeksi = document.getElementById('deskripsi-penilaian').value;
|
||||
|
||||
// Validasi input: cek apakah input kosong
|
||||
if (!tanggalInspeksi.trim()) {
|
||||
Swal.showValidationMessage('Harap mengisi Jadwal Kunjungan.');
|
||||
if (!tanggalKunjungan.trim()) {
|
||||
Swal.showValidationMessage('Harap mengisi Tanggal Kunjungan.');
|
||||
return false;
|
||||
}
|
||||
if (!jamKunjungan || !menitKunjungan) {
|
||||
Swal.showValidationMessage('Harap mengisi Waktu Kunjungan.');
|
||||
return false;
|
||||
}
|
||||
if (!keteranganInspeksi.trim()) {
|
||||
@@ -337,9 +466,16 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
// Pastikan format 2 digit
|
||||
jamKunjungan = parseInt(jamKunjungan, 10).toString().padStart(2, '0');
|
||||
menitKunjungan = parseInt(menitKunjungan, 10).toString().padStart(2, '0');
|
||||
|
||||
// Gabungkan tanggal dan waktu dalam format ISO
|
||||
const datetimeValue = `${tanggalKunjungan}T${jamKunjungan}:${menitKunjungan}`;
|
||||
|
||||
// Jika semua valid, kembalikan data
|
||||
return {
|
||||
tanggal: tanggalInspeksi,
|
||||
tanggal: datetimeValue,
|
||||
keterangan: keteranganInspeksi
|
||||
};
|
||||
}
|
||||
@@ -360,17 +496,15 @@
|
||||
deskripsi_penilaian: keterangan
|
||||
};
|
||||
|
||||
// Change from PUT to POST method
|
||||
$.ajax({
|
||||
url: useURL,
|
||||
type: "POST", // Changed from PUT to POST
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: input_data,
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
// Arahkan langsung ke halaman inspeksi
|
||||
Swal.fire('Berhasil!', 'Data berhasil disimpan.', 'success').then(
|
||||
() => {
|
||||
Swal.fire('Berhasil!', 'Berhasil membuat jadwal.', 'success').then(
|
||||
() => {
|
||||
window.location.reload();
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -3,19 +3,7 @@
|
||||
const ruteLainnyaDiv = document.getElementById("ruteLainnya");
|
||||
const lantaiLainnyaDiv = document.getElementById("lantaiLainnya");
|
||||
|
||||
// Function to add delete event listeners to existing buttons
|
||||
function addDeleteListeners(container) {
|
||||
container.querySelectorAll(".delete-btn").forEach(button => {
|
||||
button.addEventListener("click", function() {
|
||||
this.closest(
|
||||
".flex.items-baseline.flex-wrap.lg\\:flex-nowrap.gap-2\\.5.mb-5")
|
||||
.remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Add delete listeners to existing buttons
|
||||
addDeleteListeners(ruteLainnyaDiv);
|
||||
|
||||
// Create new div for additional items
|
||||
function createNewDiv(container, inputName) {
|
||||
@@ -64,13 +52,8 @@
|
||||
}
|
||||
|
||||
// Event listener for adding more items
|
||||
document.getElementById("btnAddMore").addEventListener("click", function() {
|
||||
createNewDiv(ruteLainnyaDiv, "rute_lainnya");
|
||||
});
|
||||
|
||||
document.getElementById("btnAddMoreObject").addEventListener("click", function() {
|
||||
createNewDiv(lantaiLainnyaDiv, "lantai_lainnya");
|
||||
});
|
||||
|
||||
|
||||
function setupInputHandlers(containerId, buttonId, labelText, inputDataClass, buttonDeleteClass) {
|
||||
const addButton = document.getElementById(buttonId);
|
||||
|
||||
@@ -600,7 +600,7 @@
|
||||
|
||||
Breadcrumbs::for('penilai.show', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('penilai');
|
||||
$trail->push('Detail Penilai');
|
||||
$trail->push('Detail Penilaian');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('penilai.edit', function (BreadcrumbTrail $trail) {
|
||||
|
||||
@@ -583,6 +583,7 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::put('store-approve-reschedule/{id}', [SurveyorController::class, 'approveReschedule'])->name('approveReschedule');
|
||||
Route::put('store-rejected-reschedule/{id}', [SurveyorController::class, 'rejectReschedule'])->name('rejectReschedule');
|
||||
Route::put('store-proses-survey/{id}', [SurveyorController::class, 'storeProsesSurvey'])->name('storeProsesSurvey');
|
||||
Route::post('save-edited-image/', [SurveyorController::class, 'saveEditedImage'])->name('saveEditedImage');
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user