perabaikan hub cadeb penghuni dan penambahan title pesan swall jadwal, nama debitur, form inspeksi denah dinamis
This commit is contained in:
@@ -186,9 +186,9 @@
|
||||
let actionHtml = `<div class="flex flex-nowrap justify-center gap-1.5">`;
|
||||
|
||||
if (data && data.penilaian && data.penilaian.waktu_penilaian !== null && data.status !==
|
||||
'done' && data.penilaian.authorized_status==null) {
|
||||
'done' && data.penilaian.authorized_status == null) {
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-outline btn-primary" href="javascript:void(0)" onclick="surveyorApproveKunjungan(${data.penilaian.id},'${data.nomor_registrasi}')" title="Approve Jadwal Kunjungan No Reg ${data.nomor_registrasi}">
|
||||
<a class="btn btn-sm btn-outline btn-primary" href="javascript:void(0)" onclick="surveyorApproveKunjungan(${data.penilaian.id},'${data.nomor_registrasi}', '${data.debiture.name}', '${data.penilaian.waktu_penilaian}')" title="Approve Jadwal Kunjungan No Reg ${data.nomor_registrasi}" >
|
||||
<i class="ki-filled ki-calendar-edit"></i>
|
||||
</a>
|
||||
`;
|
||||
@@ -196,17 +196,17 @@
|
||||
|
||||
if (data.status !== 'order') {
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-outline btn-success" href="permohonan/${data.id}">
|
||||
<a class="btn btn-sm btn-outline btn-success" href="permohonan/${data.id}" href="javascript:void(0)" title="Surat Permohonan">
|
||||
<i class="ki-filled ki-document"></i>
|
||||
</a>
|
||||
`;
|
||||
}
|
||||
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-outline btn-info" href="permohonan/${data.id}/edit">
|
||||
<a class="btn btn-sm btn-outline btn-info" href="permohonan/${data.id}/edit" title="Edit Permohonan">
|
||||
<i class="ki-outline ki-notepad-edit"></i>
|
||||
</a>
|
||||
<a onclick="deleteData(${data.id})" class="delete btn btn-sm btn-outline btn-danger">
|
||||
<a onclick="deleteData(${data.id})" class="delete btn btn-sm btn-outline btn-danger" title="Hapus Permohonan">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</a>
|
||||
</div>`;
|
||||
@@ -226,10 +226,11 @@
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function surveyorApproveKunjungan(id, noReg) {
|
||||
function surveyorApproveKunjungan(id, noReg, debitur, waktuPenilaian) {
|
||||
Swal.fire({
|
||||
title: ' ',
|
||||
text: "Yakin akan Menyetujui Jadwal Kunjungan "+noReg+"?",
|
||||
text: "Yakin akan Menyetujui Jadwal Kunjungan " + noReg + " untuk Debitur " + debitur +
|
||||
" pada waktu " + window.formatTanggalWaktuIndonesia(waktuPenilaian) + "?",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
@@ -240,12 +241,12 @@
|
||||
//define variable
|
||||
// $id ==> penilaian.id
|
||||
let token = "{{ csrf_token() }}";
|
||||
let useURL = "{{ URL::to('/surveyor/storeAproved') }}"+"/"+id;
|
||||
|
||||
let useURL = "{{ URL::to('/surveyor/storeAproved') }}" + "/" + id;
|
||||
|
||||
var input_data = new Object();
|
||||
input_data._token = token;
|
||||
input_data.id = id;
|
||||
input_data.noReg =noReg;
|
||||
input_data.noReg = noReg;
|
||||
$.ajax({
|
||||
url: useURL,
|
||||
type: "PUT",
|
||||
@@ -254,17 +255,15 @@
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if('success' == response.status)
|
||||
{
|
||||
swal.fire('Sukses Menyetujui!', response.message, 'success').then(() => {
|
||||
if ('success' == response.status) {
|
||||
swal.fire('Sukses Menyetujui!', response.message, 'success').then(
|
||||
() => {
|
||||
location.reload(true);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Swal.fire('Error!', response.message, 'error');
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
error: function(response, textStatus, errorThrown) {
|
||||
// var errors = response.responseJSON.errors;
|
||||
@@ -272,11 +271,12 @@
|
||||
console.log(response);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
// window.formatTanggalIndonesia(date)
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$luas_units = isset($details['luas_unit']) ? $details['luas_unit'] : 'N/A';
|
||||
$luas_units = isset($details['luas']) ? $details['luas'] : 'N/A';
|
||||
@endphp
|
||||
<input type="hidden" name="luas_unit_sesuai" class="input" value="{{ $luas_units }}">
|
||||
<p class="text-2sm text-gray-700">{{ $luas_units }} m<sup>2</sup></p>
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT'];
|
||||
|
||||
|
||||
|
||||
$href = [
|
||||
[
|
||||
'label' => 'form inspeksi',
|
||||
@@ -18,8 +20,10 @@
|
||||
];
|
||||
|
||||
if (!in_array(strtoupper($dokumen->jenisJaminan->name), $tanahBangunanTypes)) {
|
||||
|
||||
$denahLabel = strtoupper($dokumen->jenisJaminan->name);
|
||||
$href[] = [
|
||||
'label' => 'denah tanah dan bangunan',
|
||||
'label' => 'denah ' . $denahLabel,
|
||||
'url' => route('surveyor.denah', [
|
||||
'id' => $permohonan->id
|
||||
]) . "?form=create-denah&denah={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
type="radio" class="radio" name="hub_cadeb_penghuni" value="sesuai"
|
||||
{{ old('hub_cadeb_penghuni', isset($forminspeksi['asset']['hub_cadeb_penghuni'])) ? 'checked' : '' }}>
|
||||
|
||||
<span class="ml-2">Ya</span>
|
||||
<span class="ml-2">Ditempati Sendiri</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input
|
||||
@@ -441,21 +441,14 @@
|
||||
: 'tidak sesuai';
|
||||
$selectedData = $forminspeksi['asset']['hub_cadeb_penghuni'][$statusKey] ?? null;
|
||||
@endphp
|
||||
<select id="hub_penghuni_tidak_sesuai" name="hub_penghuni_tidak_sesuai"
|
||||
class="input w-full"
|
||||
style="{{ old('hub_penghuni_tidak_sesuai', $selectedData) ? '' : 'display: none;' }}">
|
||||
<option value="">Select Hubungan Cadeb</option>
|
||||
@if (isset($basicData['hubPenghuni']))
|
||||
@foreach ($basicData['hubPenghuni'] as $item)
|
||||
@if ($item->name != $hubCadebPenghuni)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('hub_penghuni_tidak_sesuai', $selectedData) == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
|
||||
<input id="hub_penghuni_tidak_sesuai" class="input"
|
||||
name="hub_penghuni_tidak_sesuai"
|
||||
placeholder="Masukkan Hubungin penghuni jaminan"
|
||||
value="{{ old('hub_penghuni_tidak_sesuai', isset($selectedData) ? $selectedData : '') }}"
|
||||
|
||||
style="{{ old('hub_penghuni_tidak_sesuai', $selectedData ?? false) ? '' : 'display: none;' }}">
|
||||
</div>
|
||||
<em id="error-hub_cadeb_penghuni" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$luas_tanah = isset($details['luas_tanah']) ? $details['luas_tanah'] : 'N/A';
|
||||
$luas_tanah = isset($details['luas']) ? $details['luas'] : 'N/A';
|
||||
@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>
|
||||
|
||||
Reference in New Issue
Block a user