Merge branch 'feature/senior-officer' of https://git.putrakuningan.com/daengdeni/lpj into feature/senior-officer
This commit is contained in:
42
Jenkinsfile
vendored
Normal file
42
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
PHP_VERSION = '8.1'
|
||||
COMPOSER_HOME = "${WORKSPACE}/.composer"
|
||||
DASHBOARD = '/var/www/lpj'
|
||||
WORKDIR = '/var/www/lpj/Modules/Lpj'
|
||||
GIT_SSH_COMMAND = 'ssh -i ~/.ssh/for_gitea -o StrictHostKeyChecking=no'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
dir("${env.DASHBOARD}") {
|
||||
sh "composer update daengdeni/lpj-module:dev-staging"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Assets') {
|
||||
steps {
|
||||
dir("${env.DASHBOARD}") {
|
||||
sh "npm install"
|
||||
sh "npm run build"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
cleanWs()
|
||||
}
|
||||
success {
|
||||
echo 'The pipeline has succeeded!'
|
||||
}
|
||||
failure {
|
||||
echo 'The pipeline has failed.'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,6 @@
|
||||
$debitur = Debiture::find($id);
|
||||
|
||||
$validate = $request->validated();
|
||||
|
||||
if ($validate) {
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
@@ -137,6 +137,7 @@ class PenilaiController extends Controller
|
||||
|
||||
$resume = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
$lpjData = null;
|
||||
$resumeData = null;
|
||||
if ($resume) {
|
||||
$resumeData = json_decode($resume->resume, true);
|
||||
}
|
||||
@@ -153,21 +154,31 @@ class PenilaiController extends Controller
|
||||
|
||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
|
||||
$penilai = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
$provinces = Province::all();
|
||||
$basicData = $this->surveyorController->getCommonData();
|
||||
|
||||
$formFoto = null;
|
||||
$formPeta = null;
|
||||
$formFoto = $formPeta = $cities = $districts = $villages= null;
|
||||
if ($inspeksi) {
|
||||
$formFoto = json_decode($inspeksi->foto_form, true);
|
||||
$formPeta = json_decode($inspeksi->data_form, true);
|
||||
$memo = json_decode($penilai->memo);
|
||||
if(isset($memo->province_code)){
|
||||
$cities = City::where('province_id', $memo->province_code)->get();
|
||||
}
|
||||
|
||||
if(isset($memo->city_code)){
|
||||
$districts = District::where('city_id', $memo->city_code)->get();
|
||||
}
|
||||
|
||||
if(isset($memo->district_code)) {
|
||||
$villages = Village::where('district_id', $memo->district_code)->get();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta', 'provinces', 'basicData'));
|
||||
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta', 'provinces', 'basicData','memo','cities', 'districts', 'villages'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,16 +13,17 @@
|
||||
: array
|
||||
{
|
||||
$rules = [
|
||||
'debiture_id' => 'required|exists:debitures,id',
|
||||
'pemilik_jaminan_id' => 'required',
|
||||
'jenis_jaminan_id' => 'required',
|
||||
'province_code' => 'nullable|exists:provinces,code',
|
||||
'city_code' => 'nullable|exists:cities,code',
|
||||
'district_code' => 'nullable|exists:districts,code',
|
||||
'village_code' => 'nullable|exists:villages,code',
|
||||
'address' => 'nullable|string',
|
||||
'postal_code' => 'nullable|string|max:10',
|
||||
'status' => 'nullable|boolean',
|
||||
'debiture_id' => 'required|exists:debitures,id',
|
||||
'permohonan_id' => 'required|exists:permohonan,id',
|
||||
'pemilik_jaminan_id' => 'required',
|
||||
'jenis_jaminan_id' => 'required',
|
||||
'province_code' => 'nullable|exists:provinces,code',
|
||||
'city_code' => 'nullable|exists:cities,code',
|
||||
'district_code' => 'nullable|exists:districts,code',
|
||||
'village_code' => 'nullable|exists:villages,code',
|
||||
'address' => 'nullable|string',
|
||||
'postal_code' => 'nullable|string|max:10',
|
||||
'status' => 'nullable|boolean',
|
||||
];
|
||||
|
||||
return $rules;
|
||||
|
||||
@@ -199,19 +199,28 @@
|
||||
},
|
||||
user_id: {
|
||||
title: 'User Pemohon',
|
||||
render: (item, data) => `${data.user.name}`,
|
||||
render: (item, data) => {
|
||||
return data.user && data.user.name ? `${data.user.name}` : '-';
|
||||
},
|
||||
},
|
||||
|
||||
branch_id: {
|
||||
title: 'Cabang Pemohon',
|
||||
render: (item, data) => `${data.branch.name}`,
|
||||
render: (item, data) => {
|
||||
return data.branch && data.branch.name ? `${data.branch.name}` : '-';
|
||||
},
|
||||
},
|
||||
debitur_id: {
|
||||
title: 'Debitur',
|
||||
render: (item, data) => `${data.debiture.name}`,
|
||||
render: (item, data) => {
|
||||
return data.debiture && data.debiture.name ? `${data.debiture.name}` : '-';
|
||||
},
|
||||
},
|
||||
tujuan_penilaian_id: {
|
||||
title: 'Tujuan Penilaian',
|
||||
render: (item, data) => `${data.tujuan_penilaian.name}`,
|
||||
render: (item, data) => {
|
||||
return data.tujuan_penilaian && data.tujuan_penilaian.name ? `${data.tujuan_penilaian.name}` : '-';
|
||||
},
|
||||
},
|
||||
status: {
|
||||
title: 'Status',
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<form action="{{ isset($debitur->id) ? route('debitur.update', $debitur->id) : route('debitur.store') }}" method="POST" class="grid gap-5">
|
||||
<form action="{{ isset($debitur->id) ? route('debitur.update', $debitur->id) : route('debitur.store') }}" method="POST" id="debitur-form" class="grid gap-5">
|
||||
@if(isset($debitur->id))
|
||||
<input type="hidden" name="id" value="{{ $debitur->id }}">
|
||||
@method('PUT')
|
||||
@endif
|
||||
@csrf
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<label class="form-label max-w-56 gap-1">
|
||||
Cabang
|
||||
<span class="text-danger">
|
||||
*
|
||||
</span>
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select class="input tomselect w-full @error('branch_id') border-danger bg-danger-light @enderror" name="branch_id" id="branch_id">
|
||||
@@ -26,11 +29,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<label class="form-label max-w-56 gap-1">
|
||||
CIF
|
||||
<span class="text-danger">
|
||||
*
|
||||
</span>
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('cif') border-danger bg-danger-light @enderror" type="number" name="cif" value="{{ $debitur->cif ?? '0000000000' }}">
|
||||
<input class="input @error('cif') border-danger bg-danger-light @enderror" type="number" id="cif" name="cif" value="{{ $debitur->cif ?? '0000000000' }}">
|
||||
@error('cif')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
@@ -48,11 +54,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<label class="form-label max-w-56 gap-1">
|
||||
Nama Debitur
|
||||
<span class="text-danger">
|
||||
*
|
||||
</span>
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text" name="name" value="{{ $debitur->name ?? '' }}">
|
||||
<input required class="input @error('name') border-danger bg-danger-light @enderror" type="text" name="name" value="{{ $debitur->name ?? '' }}">
|
||||
@error('name')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
@@ -92,13 +101,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<label class="form-label max-w-56 gap-1">
|
||||
Address
|
||||
<span class="text-danger">
|
||||
*
|
||||
</span>
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="flex flex-col lg:flex-row gap-2 w-full">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="province_code" name="province_code" class="select w-full @error('province_code') border-danger bg-danger-light @enderror">
|
||||
<select required id="province_code" name="province_code" class="select w-full @error('province_code') border-danger bg-danger-light @enderror">
|
||||
<option value="">Select Province</option>
|
||||
@foreach($provinces as $province)
|
||||
@if(isset($debitur))
|
||||
@@ -117,7 +129,7 @@
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="city_code" name="city_code" class="select w-full @error('city_code') border-danger bg-danger-light @enderror">
|
||||
<select required id="city_code" name="city_code" class="select w-full @error('city_code') border-danger bg-danger-light @enderror">
|
||||
<option value="">Select City</option>
|
||||
@if(isset($cities))
|
||||
@foreach($cities as $city)
|
||||
@@ -141,7 +153,7 @@
|
||||
</div>
|
||||
<div class="flex flex-col lg:flex-row gap-2 w-full mt-2 lg:mt-5">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="district_code" name="district_code" class="select w-full @error('district_code') border-danger bg-danger-light @enderror">
|
||||
<select required id="district_code" name="district_code" class="select w-full @error('district_code') border-danger bg-danger-light @enderror">
|
||||
<option value="">Select District</option>
|
||||
@if(isset($districts))
|
||||
@foreach($districts as $district)
|
||||
@@ -163,7 +175,7 @@
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="village_code" name="village_code" class="select w-full @error('district_code') border-danger bg-danger-light @enderror">
|
||||
<select required id="village_code" name="village_code" class="select w-full @error('district_code') border-danger bg-danger-light @enderror">
|
||||
<option value="">Select Village</option>
|
||||
@if(isset($villages))
|
||||
@foreach($villages as $village)
|
||||
@@ -185,14 +197,14 @@
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('postal_code') border-danger bg-danger-light @enderror" type="number" id="postal_code" name="postal_code" value="{{ $debitur->postal_code ?? '' }}" placeholder="Postal Code">
|
||||
<input required class="input @error('postal_code') border-danger bg-danger-light @enderror" type="number" id="postal_code" name="postal_code" value="{{ $debitur->postal_code ?? '' }}" placeholder="Postal Code">
|
||||
@error('postal_code')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row w-full mt-2 lg:mt-5">
|
||||
<textarea class="textarea @error('address') border-danger bg-danger-light @enderror" rows="3" type="number" id="address" name="address">{{ $debitur->address ?? '' }}</textarea>
|
||||
<textarea required class="textarea @error('address') border-danger bg-danger-light @enderror" rows="3" id="address" name="address" placeholder="Alamat Lengkap">{{ $debitur->address ?? '' }}</textarea>
|
||||
@error('address')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
@@ -200,8 +212,135 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<button type="submit" class="btn btn-primary" id="submit">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@push('scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const form = document.getElementById('debitur-form');
|
||||
const nameInput = form.querySelector('input[name="name"]');
|
||||
const provinceSelect = form.querySelector('#province_code');
|
||||
const citySelect = form.querySelector('#city_code');
|
||||
const districtSelect = form.querySelector('#district_code');
|
||||
const villageSelect = form.querySelector('#village_code');
|
||||
const postalCodeInput = form.querySelector('#postal_code');
|
||||
const addressTextarea = form.querySelector('#address');
|
||||
const branchSelect = document.getElementById('branch_id');
|
||||
const cifInput = document.getElementById('cif');
|
||||
const submitButton = document.getElementById('submit');
|
||||
|
||||
function validateField(field, errorMessage) {
|
||||
const value = field.value.trim();
|
||||
if (value.length === 0) {
|
||||
field.classList.add('border-danger', 'bg-danger-light');
|
||||
const existingError = field.parentElement.querySelector('.alert.text-danger');
|
||||
if (!existingError) {
|
||||
const em = document.createElement('em');
|
||||
em.className = 'alert text-danger text-sm';
|
||||
em.textContent = errorMessage;
|
||||
field.parentElement.appendChild(em);
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
field.classList.remove('border-danger', 'bg-danger-light');
|
||||
const existingError = field.parentElement.querySelector('.alert.text-danger');
|
||||
if (existingError) {
|
||||
existingError.remove();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function validateBranch() {
|
||||
return validateField(branchSelect, 'Cabang is required');
|
||||
}
|
||||
|
||||
function validateCIF() {
|
||||
return validateField(cifInput, 'CIF is required');
|
||||
}
|
||||
|
||||
function validateName() {
|
||||
return validateField(nameInput, 'Nama Debitur is required');
|
||||
}
|
||||
|
||||
function validateProvince() {
|
||||
return validateField(provinceSelect, 'Province is required');
|
||||
}
|
||||
|
||||
function validateCity() {
|
||||
return validateField(citySelect, 'City is required');
|
||||
}
|
||||
|
||||
function validateDistrict() {
|
||||
return validateField(districtSelect, 'District is required');
|
||||
}
|
||||
|
||||
function validateVillage() {
|
||||
return validateField(villageSelect, 'Village is required');
|
||||
}
|
||||
|
||||
function validatePostalCode() {
|
||||
return validateField(postalCodeInput, 'Postal Code is required');
|
||||
}
|
||||
|
||||
function validateAddress() {
|
||||
return validateField(addressTextarea, 'Address is required');
|
||||
}
|
||||
|
||||
nameInput.addEventListener('blur', validateName);
|
||||
nameInput.addEventListener('input', validateName);
|
||||
provinceSelect.addEventListener('change', validateProvince);
|
||||
citySelect.addEventListener('change', validateCity);
|
||||
districtSelect.addEventListener('change', validateDistrict);
|
||||
villageSelect.addEventListener('change', validateVillage);
|
||||
postalCodeInput.addEventListener('blur', validatePostalCode);
|
||||
postalCodeInput.addEventListener('input', validatePostalCode);
|
||||
addressTextarea.addEventListener('blur', validateAddress);
|
||||
addressTextarea.addEventListener('input', validateAddress);
|
||||
branchSelect.addEventListener('change', validateVillage);
|
||||
cifInput.addEventListener('blur', validateCIF);
|
||||
cifInput.addEventListener('input', validateName);
|
||||
|
||||
function validateAllFields() {
|
||||
const isValid =
|
||||
validateBranch() &&
|
||||
validateCIF() &&
|
||||
validateName() &&
|
||||
validateProvince() &&
|
||||
validateCity() &&
|
||||
validateDistrict() &&
|
||||
validateVillage() &&
|
||||
validatePostalCode() &&
|
||||
validateAddress();
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
form.addEventListener('submit', function (event) {
|
||||
const isValid =
|
||||
validateBranch() &&
|
||||
validateCIF() &&
|
||||
validateName() &&
|
||||
validateProvince() &&
|
||||
validateCity() &&
|
||||
validateDistrict() &&
|
||||
validateVillage() &&
|
||||
validatePostalCode() &&
|
||||
validateAddress();
|
||||
|
||||
if (!isValid) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
submitButton.addEventListener('click', function (event) {
|
||||
if (!validateAllFields()) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@method('PUT')
|
||||
@endif
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="permohonan_id" value="{{ $document->id ?? request()->get('permohonan_id') }}">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Debitur
|
||||
@@ -427,13 +427,13 @@
|
||||
@push('scripts')
|
||||
{{--Pemilik Jaminan--}}
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const namaSertifikatDiv = document.getElementById("nama_sertifikat");
|
||||
|
||||
// Function to add delete event listeners to existing buttons
|
||||
function addDeleteListeners() {
|
||||
document.querySelectorAll(".delete-button").forEach(button => {
|
||||
button.addEventListener("click", function () {
|
||||
button.addEventListener("click", function() {
|
||||
this.closest(".flex.items-baseline.flex-wrap.lg\\:flex-nowrap.gap-2\\.5.mb-5").remove();
|
||||
});
|
||||
});
|
||||
@@ -442,7 +442,7 @@
|
||||
// Add delete listeners to existing buttons
|
||||
addDeleteListeners();
|
||||
|
||||
document.getElementById("tambah_sertifikat").addEventListener("click", function () {
|
||||
document.getElementById("tambah_sertifikat").addEventListener("click", function() {
|
||||
const newDiv = document.createElement("div");
|
||||
newDiv.className = "flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mb-5";
|
||||
newDiv.innerHTML = `
|
||||
@@ -509,7 +509,7 @@
|
||||
${index + 1}. ${item.name}
|
||||
</label>
|
||||
<input type="hidden" name="jenis_legalitas_jaminan_id[]" value="${item.jenis_legalitas_jaminan_id}">
|
||||
${item.is_existing ? `<input type="hidden" name="detail_dokumen_jaminan_id[]" value="${item.id}">` : ''}
|
||||
${item.is_existing ? `<input type="hidden" name="detail_dokumen_jaminan_id[]" value="${item.id}">` : ""}
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -517,7 +517,7 @@
|
||||
Nomor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="name[]" value="${item.name || ''}" placeholder="Nomor">
|
||||
<input class="input" type="text" name="name[]" value="${item.name || ""}" placeholder="Nomor">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -527,7 +527,7 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full" id="file-container-${index}">
|
||||
<div class="flex flex-col w-full gap-2">
|
||||
${item.dokumen_jaminan ? renderExistingFiles(item.dokumen_jaminan, debiturId, item.id, item.dokumen_nomor) : ''}
|
||||
${item.dokumen_jaminan ? renderExistingFiles(item.dokumen_jaminan, debiturId, item.id, item.dokumen_nomor) : ""}
|
||||
</div>
|
||||
<div class="flex items-center gap-2 my-2 w-full">
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[${index}][]" placeholder="Nomor Dokumen">
|
||||
@@ -546,26 +546,26 @@
|
||||
${getCustomFieldInput(item.custom_field_type, item.custom_field, item.details)}
|
||||
</div>
|
||||
</div>
|
||||
` : ''}
|
||||
` : ""}
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Keterangan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea" rows="3" name="keterangan[]">${item.keterangan || ''}</textarea>
|
||||
<textarea class="textarea" rows="3" name="keterangan[]">${item.keterangan || ""}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
})
|
||||
.catch(error => console.error('Error:', error));
|
||||
.catch(error => console.error("Error:", error));
|
||||
}
|
||||
|
||||
function addFileInput(index) {
|
||||
const container = document.getElementById(`file-container-${index}`);
|
||||
const newInput = document.createElement('div');
|
||||
newInput.className = 'flex items-center gap-2 mb-2 w-full';
|
||||
const newInput = document.createElement("div");
|
||||
newInput.className = "flex items-center gap-2 mb-2 w-full";
|
||||
newInput.innerHTML = `
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[${index}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" accept=".pdf,image/*">
|
||||
@@ -575,60 +575,60 @@
|
||||
}
|
||||
|
||||
function removeFileInput(button) {
|
||||
button.closest('.flex.items-center.gap-2.mb-2').remove();
|
||||
button.closest(".flex.items-center.gap-2.mb-2").remove();
|
||||
}
|
||||
|
||||
function renderExistingFiles(dokumenJaminan, debiturId, itemId, dokumenNomor) {
|
||||
if (typeof dokumenJaminan === 'string' && typeof dokumenNomor === 'string') {
|
||||
if (typeof dokumenJaminan === "string" && typeof dokumenNomor === "string") {
|
||||
return `
|
||||
<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor}</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="flex-none badge badge-sm badge-outline mt-2">
|
||||
${dokumenJaminan.split('/').pop()}
|
||||
${dokumenJaminan.split("/").pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
} else if (typeof dokumenJaminan === 'string' && dokumenNomor === null) {
|
||||
} else if (typeof dokumenJaminan === "string" && dokumenNomor === null) {
|
||||
return `
|
||||
<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : --</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="flex-none badge badge-sm badge-outline mt-2">
|
||||
${dokumenJaminan.split('/').pop()}
|
||||
${dokumenJaminan.split("/").pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
} else if (Array.isArray(dokumenJaminan) && Array.isArray(dokumenNomor)) {
|
||||
return dokumenJaminan.map((file, index) => `<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor[index] || 'N/A'}</span>
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor[index] || "N/A"}</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
${file.split('/').pop()}
|
||||
${file.split("/").pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a></div>
|
||||
`).join('');
|
||||
} else if (Array.isArray(dokumenJaminan) && typeof dokumenNomor === 'string') {
|
||||
`).join("");
|
||||
} else if (Array.isArray(dokumenJaminan) && typeof dokumenNomor === "string") {
|
||||
return dokumenJaminan.map((file, index) => `<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor} || 'N/A'}</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
${file.split('/').pop()}
|
||||
${file.split("/").pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a></div>
|
||||
`).join('');
|
||||
} else if (Array.isArray(dokumenJaminan) && dokumenNomor === 'null') {
|
||||
`).join("");
|
||||
} else if (Array.isArray(dokumenJaminan) && dokumenNomor === "null") {
|
||||
return dokumenJaminan.map((file, index) => `<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor} || 'N/A'}</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
${file.split('/').pop()}
|
||||
${file.split("/").pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a></div>
|
||||
`).join('');
|
||||
`).join("");
|
||||
}
|
||||
return dokumenNomor;
|
||||
}
|
||||
|
||||
function getCustomFieldInput(type, fieldName, value) {
|
||||
value = value ? JSON.parse(value)[fieldName] || '' : '';
|
||||
value = value ? JSON.parse(value)[fieldName] || "" : "";
|
||||
switch (type) {
|
||||
case "text":
|
||||
return `<input class="input" type="text" name="custom_field[][${fieldName}]" value="${value}">`;
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
<div class="menu inline-flex" data-menu="true">
|
||||
<div class="flex flex-nowrap justify-center gap-1.5">
|
||||
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
|
||||
<a href="{{ route('debitur.jaminan.bulk.download',['id' => $debitur->id,'jaminan' => $document->id]) }}" class="btn btn-sm btn-icon btn-dark">
|
||||
<i class="ki-outline ki-cloud-download"></i>
|
||||
</a>
|
||||
<a href="{{ route('debitur.jaminan.bulk.download',['id' => $debitur->id,'jaminan' => $document->id]) }}" class="btn btn-sm btn-icon btn-dark">
|
||||
<i class="ki-outline ki-cloud-download"></i>
|
||||
</a>
|
||||
@endif
|
||||
<a href="{{ route('debitur.jaminan.edit',['id' => $debitur->id,'jaminan' => $document->id]) }}" class="btn btn-sm btn-icon btn-outline btn-info">
|
||||
<a href="{{ route('debitur.jaminan.edit',array_merge(request()->query(),['id' => $debitur->id,'jaminan' => $document->id])) }}" class="btn btn-sm btn-icon btn-outline btn-info">
|
||||
<i class="ki-outline ki-notepad-edit"></i>
|
||||
</a>
|
||||
<a onclick="deleteData({{ $document->id }})" class="delete btn btn-sm btn-icon btn-outline btn-danger">
|
||||
@@ -39,11 +39,21 @@
|
||||
</div>
|
||||
<div class="grid">
|
||||
<div class="flex items-center justify-between flex-wrap mb-3.5 gap-2">
|
||||
<span class="text-2xs text-gray-600 uppercase">
|
||||
Nomor Permohonan
|
||||
</span>
|
||||
<p class="text-2xs text-gray-600 text-right max-w-[250px] font-bold">
|
||||
{{ $document->permohonan->nomor_registrasi ?? "-" }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="border-t border-gray-300 border-dashed">
|
||||
</div>
|
||||
<div class="flex items-center justify-between flex-wrap my-2.5 gap-2">
|
||||
<span class="text-2xs text-gray-600 uppercase">
|
||||
pemilik jaminan
|
||||
</span>
|
||||
<p class="text-2xs text-gray-600 text-right max-w-[250px]">
|
||||
{{ $document->pemilik->name }}
|
||||
{{ $document->pemilik->name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="border-t border-gray-300 border-dashed">
|
||||
@@ -77,14 +87,14 @@
|
||||
$dokumen_nomor = is_array(json_decode($detail->dokumen_nomor)) ? json_decode($detail->dokumen_nomor) : ($detail->dokumen_nomor ? [$detail->dokumen_nomor] : []);
|
||||
@endphp
|
||||
@foreach($dokumen_jaminan as $index => $dokumen)
|
||||
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
|
||||
<a href="{{ route('debitur.jaminan.download', ['id' => $debitur->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
|
||||
class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
{{ basename($dokumen) }}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
@endif
|
||||
<span class="badge badge-sm badge-outline badge-warning mt-2" onclick="viewPDF('{{ Storage::url($dokumen_jaminan[$index]) }}')"><i class="ki-filled ki-eye mr-2"></i>Preview</span>
|
||||
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
|
||||
<a href="{{ route('debitur.jaminan.download', ['id' => $debitur->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
|
||||
class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
{{ basename($dokumen) }}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
@endif
|
||||
<span class="badge badge-sm badge-outline badge-warning mt-2" onclick="viewPDF('{{ Storage::url($dokumen_jaminan[$index]) }}')"><i class="ki-filled ki-eye mr-2"></i>Preview</span>
|
||||
<br>
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -115,38 +125,40 @@
|
||||
background-image: url('/assets/media/images/2600x1200/bg-4-dark.png');
|
||||
}
|
||||
</style>
|
||||
<a class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg" href="{{ route('debitur.jaminan.create',$debitur->id) }}">
|
||||
<div class="card-body grid items-center">
|
||||
<div class="flex flex-col gap-3">
|
||||
<div class="flex justify-center pt-5">
|
||||
<div class="relative size-[60px] shrink-0">
|
||||
<svg class="w-full h-full stroke-brand-clarity fill-light" fill="none" height="48" viewBox="0 0 44 48" width="44" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16 2.4641C19.7128 0.320509 24.2872 0.320508 28 2.4641L37.6506 8.0359C41.3634 10.1795 43.6506 14.141 43.6506
|
||||
@if(request()->get('permohonan_id'))
|
||||
<a class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg" href="{{ route('debitur.jaminan.create',array_merge(request()->query(),['id'=>$debitur->id])) }}">
|
||||
<div class="card-body grid items-center">
|
||||
<div class="flex flex-col gap-3">
|
||||
<div class="flex justify-center pt-5">
|
||||
<div class="relative size-[60px] shrink-0">
|
||||
<svg class="w-full h-full stroke-brand-clarity fill-light" fill="none" height="48" viewBox="0 0 44 48" width="44" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16 2.4641C19.7128 0.320509 24.2872 0.320508 28 2.4641L37.6506 8.0359C41.3634 10.1795 43.6506 14.141 43.6506
|
||||
18.4282V29.5718C43.6506 33.859 41.3634 37.8205 37.6506 39.9641L28 45.5359C24.2872 47.6795 19.7128 47.6795 16 45.5359L6.34937
|
||||
39.9641C2.63655 37.8205 0.349365 33.859 0.349365 29.5718V18.4282C0.349365 14.141 2.63655 10.1795 6.34937 8.0359L16 2.4641Z" fill="">
|
||||
</path>
|
||||
<path d="M16.25 2.89711C19.8081 0.842838 24.1919 0.842837 27.75 2.89711L37.4006 8.46891C40.9587 10.5232 43.1506 14.3196 43.1506
|
||||
</path>
|
||||
<path d="M16.25 2.89711C19.8081 0.842838 24.1919 0.842837 27.75 2.89711L37.4006 8.46891C40.9587 10.5232 43.1506 14.3196 43.1506
|
||||
18.4282V29.5718C43.1506 33.6804 40.9587 37.4768 37.4006 39.5311L27.75 45.1029C24.1919 47.1572 19.8081 47.1572 16.25 45.1029L6.59937
|
||||
39.5311C3.04125 37.4768 0.849365 33.6803 0.849365 29.5718V18.4282C0.849365 14.3196 3.04125 10.5232 6.59937 8.46891L16.25 2.89711Z" stroke="">
|
||||
</path>
|
||||
</svg>
|
||||
<div class="absolute leading-none left-2/4 top-2/4 -translate-y-2/4 -translate-x-2/4">
|
||||
<i class="ki-filled ki-additem text-2xl text-brand">
|
||||
</i>
|
||||
</path>
|
||||
</svg>
|
||||
<div class="absolute leading-none left-2/4 top-2/4 -translate-y-2/4 -translate-x-2/4">
|
||||
<i class="ki-filled ki-additem text-2xl text-brand">
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col text-center">
|
||||
<span class="text-lg font-semibold text-gray-900 hover:text-primary-active mb-px">
|
||||
Data Jaminan
|
||||
</span>
|
||||
<span class="text-2sm font-normal text-gray-600">
|
||||
Tambah Pemilik dan Dokumen Jaminan
|
||||
</span>
|
||||
<div class="flex flex-col text-center">
|
||||
<span class="text-lg font-semibold text-gray-900 hover:text-primary-active mb-px">
|
||||
Data Jaminan
|
||||
</span>
|
||||
<span class="text-2sm font-normal text-gray-600">
|
||||
Tambah Pemilik dan Dokumen Jaminan
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@include('lpj::component.pdfviewer')
|
||||
@@ -155,33 +167,33 @@
|
||||
<script type="text/javascript">
|
||||
function deleteData(data) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
title: "Are you sure?",
|
||||
text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, delete it!'
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
confirmButtonText: "Yes, delete it!"
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
"X-CSRF-TOKEN": '{{ csrf_token() }}'
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax(`debitur/{{$debitur->id}}}/jaminan/${data}`, {
|
||||
type: 'DELETE'
|
||||
type: "DELETE"
|
||||
}).then((response) => {
|
||||
swal.fire('Deleted!', 'Document Jaminan has been deleted.', 'success').then(() => {
|
||||
swal.fire("Deleted!", "Document Jaminan has been deleted.", "success").then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Error!', 'An error occurred while deleting the file.', 'error');
|
||||
console.error("Error:", error);
|
||||
Swal.fire("Error!", "An error occurred while deleting the file.", "error");
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -26,31 +26,30 @@
|
||||
<label class="form-label max-w-56">Kepada</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
|
||||
value="">
|
||||
value=" {{ $memo->kepada ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Dari</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
|
||||
value="">
|
||||
value="{{ $memo->dari ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Nomor Memo</label>
|
||||
<div class="flex flex-wrap items-base line w-full">
|
||||
<input type="text" name="nomor_memo" class="input w-full" placeholder="Masukkan..."
|
||||
value="">
|
||||
value="{{ $memo->nomor_memo ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Tanggal</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="date" name="tanggal" class="input w-full" placeholder="Masukkan..."
|
||||
value="">
|
||||
value="{{ $memo->tanggal ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +57,7 @@
|
||||
<label class="form-label max-w-56">Perihal</label>
|
||||
<div class="flex flex-wrap items-base line w-full">
|
||||
<input type="text" name="perihal" class="input w-full" placeholder="Masukkan..."
|
||||
value="">
|
||||
value="{{ $memo->perihal ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,9 +66,8 @@
|
||||
<div class="card w-full bg-white rounded-lg shadow-md ">
|
||||
<div class="card-header">
|
||||
<h1 class="text-md font-medium text-gray-900 uppercase">Sehubungan dengan permintaan BAGI Cabang
|
||||
............., untuk dilakukan survey untuk penilaian baru/review, calon debitur/debitur an
|
||||
….............,
|
||||
dengan deskripsi sebagai berikut :
|
||||
<b>{{ $permohonan->branch->name }}</b>, untuk dilakukan survey untuk penilaian baru/review, calon debitur/debitur an
|
||||
<b>{{ $permohonan->debiture->name }}</b>,dengan deskripsi sebagai berikut :
|
||||
</h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -82,15 +80,12 @@
|
||||
<select id="jenis_asset_tidak_sesuai" class="input w-full" name="jenis_asset_tidak_sesuai">
|
||||
<option value="">Select Jenis asset</option>
|
||||
@foreach ($basicData['jenisJaminan'] as $item)
|
||||
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||
<option value="{{ $item->name }}" {{ ($memo->jenis_asset_tidak_sesuai ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -99,7 +94,7 @@
|
||||
<label for="address" class="form-label max-w-56">Lokasi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="address" name="address" class="input w-full"
|
||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
||||
placeholder="Masukkan Jl." value="{{ $memo->address ?? old('address') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,7 +104,7 @@
|
||||
<select id="province_code" name="province_code" class="input w-full">
|
||||
<option value="">Pilih Provinsi</option>
|
||||
@foreach ($provinces as $item)
|
||||
<option value="{{ $item->code }}">{{ $item->name }}</option>
|
||||
<option value="{{ $item->code }}" {{ ($memo->province_code ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@@ -120,6 +115,11 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="city_code" name="city_code" class="select w-full">
|
||||
<option value="">Pilih Kota/Kabupaten</option>
|
||||
@if(isset($cities))
|
||||
@foreach ($cities as $item)
|
||||
<option value="{{ $item->code }}" {{ ($memo->city_code?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -129,6 +129,11 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="district_code" name="district_code" class="select w-full">
|
||||
<option value="">Pilih Kecamatan</option>
|
||||
@if(isset($districts))
|
||||
@foreach ($districts as $item)
|
||||
<option value="{{ $item->code }}" {{ ($memo->district_code?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,23 +143,36 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="village_code" name="village_code" class="select w-full">
|
||||
<option value="">Pilih Kelurahan</option>
|
||||
@if(isset($villages))
|
||||
@foreach ($villages as $item)
|
||||
<option value="{{ $item->code }}" {{ ($memo->village_code ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="address" class="form-label max-w-56">Tanggal Survey</label>
|
||||
<label for="address" class="form-label max-w-56">Address</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="date" id="address" name="address" class="input w-full"
|
||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
||||
<input type="text" id="address" name="address" class="input w-full"
|
||||
placeholder="Masukkan Jl." value="{{ $memo->address ?? old('address') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="address" class="form-label max-w-56">Penilai</label>
|
||||
<label for="tanggal_survey" class="form-label max-w-56">Tanggal Survey</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="address" name="address" class="input w-full"
|
||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
||||
<input type="date" id="tanggal_survey" name="tanggal_survey" class="input w-full"
|
||||
placeholder="Masukkan Tanggal Survey" value="{{ $memo->tanggal_survey ?? old('tanggal_survey') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="penilai" class="form-label max-w-56">Penilai</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="penilai" class="input w-full"
|
||||
placeholder="Masukkan Penilai" value="{{ $memo->penilai ?? old('penilai') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -167,7 +185,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
@@ -181,7 +198,7 @@
|
||||
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
||||
|
||||
<div class="terlampir flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="terlampir[]" rows="3">{{ old('terlampir', '') }}</textarea>
|
||||
<textarea class="textarea mt-2" name="terlampir[]" rows="3">{{ $memo->terlampir[0] ?? old('terlampir', '') }}</textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -190,12 +207,12 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Berdasarkan hasil survey dapat disampaikan sbb:</label>
|
||||
<div id="hasil_survey" class="flex flex-wrap items-baseline w-full">
|
||||
@if (!empty($forminspeksi['hasil_survey']))
|
||||
@foreach ($forminspeksi['hasil_survey'] as $index => $positif)
|
||||
@if (!empty($memo->hasil_survey))
|
||||
@foreach ($memo->hasil_survey as $index => $positif)
|
||||
<div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old("hasil_survey.$index", $positif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -204,13 +221,13 @@
|
||||
<div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old('hasil_survey.0', '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('hasil_survey', 'hasil_survey')">
|
||||
onclick="addClonableItem('hasil_survey', 'hasil_survey')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -220,28 +237,28 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Kesimpulan dan saran</label>
|
||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||
@if (!empty($forminspeksi['kesimpulan_saran']))
|
||||
@foreach ($forminspeksi['kesimpulan_saran'] as $index => $negatif)
|
||||
@if (!empty($memo->kesimpulan_saran))
|
||||
@foreach ($memo->kesimpulan_saran as $index => $negatif)
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old("kesimpulan_saran.$index", $negatif) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="kesimpulan_saran flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old('kesimpulan_saran.0', $forminspeksi['kesimpulan_saran'][0] ?? '') }}</textarea>
|
||||
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old('kesimpulan_saran.0') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-kesimpulan_saran" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||
onclick="addClonableItem('fakta-negatif-container', 'kesimpulan_saran')">
|
||||
onclick="addClonableItem('fakta-negatif-container', 'kesimpulan_saran')">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -250,7 +267,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
@@ -279,7 +295,7 @@
|
||||
</h2>
|
||||
<div class="flex items-center mt-5">
|
||||
<img src="{{ Storage::url($formPeta[$item]) }}"
|
||||
alt="{{ $item }}">
|
||||
alt="{{ $item }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -315,10 +331,7 @@
|
||||
{{ $item['name_rute'] . ' ' . $loop->index + 1 }}
|
||||
</h2>
|
||||
<div class="flex items-center">
|
||||
|
||||
|
||||
<img src="{{ Storage::url($item['foto_rute']) }}" alt="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -449,8 +462,6 @@
|
||||
</div>
|
||||
@endsection
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
|
||||
<script>
|
||||
function saveMemo() {
|
||||
const form = document.getElementById('form-memo');
|
||||
@@ -496,7 +507,7 @@
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
hideLoadingSwal();
|
||||
if (response.success) {
|
||||
Swal.fire({
|
||||
@@ -520,11 +531,11 @@
|
||||
}
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
error: function (xhr, status, error) {
|
||||
let errors = xhr.responseJSON?.errors;
|
||||
$('.alert').text('');
|
||||
if (errors) {
|
||||
$.each(errors, function(key, value) {
|
||||
$.each(errors, function (key, value) {
|
||||
$(`#error-${key}`).text(value[0]);
|
||||
toastrErrorBuild(value[0]);
|
||||
});
|
||||
|
||||
@@ -22,8 +22,12 @@
|
||||
</div>
|
||||
<div class="card-body flex items-center justify-between">
|
||||
@php
|
||||
$url = asset('storage/' . $penilai->kertas_kerja);
|
||||
$fileName = basename($penilai->kertas_kerja);
|
||||
$url = '';
|
||||
$fileName = '';
|
||||
if ($penilai && $penilai->kertas_kerja) {
|
||||
$url = asset('storage/' . $penilai->kertas_kerja);
|
||||
$fileName = basename($penilai->kertas_kerja);
|
||||
}
|
||||
@endphp
|
||||
<button type="button" class="btn btn-primary" onclick="window.open('{{ $url }}', '_blank')">
|
||||
<i class="ki-outline ki-cloud-download"></i>
|
||||
|
||||
@@ -139,31 +139,31 @@
|
||||
debitur_id: {
|
||||
title: 'Debitur',
|
||||
render: (item, data) => {
|
||||
return `${data.debiture.name}`;
|
||||
return data.debiture && data.debiture.name ? `${data.debiture.name}` : '-';
|
||||
},
|
||||
},
|
||||
branch_id: {
|
||||
title: 'Cabang Pemohon',
|
||||
render: (item, data) => {
|
||||
return `${data.branch.name}`;
|
||||
return data.branch && data.branch.name ? `${data.branch.name}` : '-';
|
||||
},
|
||||
},
|
||||
user_id: {
|
||||
title: 'User Pemohon',
|
||||
render: (item, data) => {
|
||||
return `${data.user.name}`;
|
||||
return data.user && data.user.name ? `${data.user.name}` : '-';
|
||||
},
|
||||
},
|
||||
tujuan_penilaian_id: {
|
||||
title: 'Tujuan Penilaian',
|
||||
render: (item, data) => {
|
||||
return `${data.tujuan_penilaian.name}`;
|
||||
return data.tujuan_penilaian && data.tujuan_penilaian.name ? `${data.tujuan_penilaian.name}` : '-';
|
||||
},
|
||||
},
|
||||
jenis_fasilitas_kredit_id: {
|
||||
title: 'Fasilitas Kredit',
|
||||
render: (item, data) => {
|
||||
return `${data.jenisfasilitas_kredit.name}`;
|
||||
return data.jenisfasilitas_kredit && data.jenisfasilitas_kredit.name ? `${data.jenisfasilitas_kredit.name}` : '-';
|
||||
},
|
||||
},
|
||||
tanggal_survei: {
|
||||
|
||||
@@ -451,11 +451,11 @@
|
||||
<tr>
|
||||
<td class="px-4 py-2">Harga Setelah Diskon</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon" class="input currency-format"
|
||||
<input type="text" name="harga_diskon" class="input currency-format" readonly
|
||||
value="{{ $inspectionData['asset']['harga_diskon'] ?? '' }}">
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<input type="text" name="harga_diskon_pembanding[]"
|
||||
<input type="text" name="harga_diskon_pembanding[]" readonly
|
||||
class="input currency-format">
|
||||
</td>
|
||||
</tr>
|
||||
@@ -777,7 +777,6 @@
|
||||
if (input.name.includes('diskon_pembanding')) {
|
||||
input.addEventListener('input', function() {
|
||||
let value = parseFloat(this.value.replace(/[^\d]/g, '') || '0');
|
||||
value = Math.min(value, 100);
|
||||
this.value = formatCurrency(value.toString());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
<div class="card w-full rounded-lg shadow-md overflow-hidden">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title uppercase">
|
||||
@@ -25,30 +23,31 @@
|
||||
@endif
|
||||
<div class="flex-wrap items-stretch">
|
||||
|
||||
<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'])"
|
||||
{{ 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'])"
|
||||
{{ 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;' }}">
|
||||
<input id="analisa_tanah_tidak_sesuai" type="text" name="luas_tanah_tidak_sesuai"
|
||||
class="input w-full" placeholder="Masukan Luas Tanah"
|
||||
value="{{ old('luas_tanah_tidak_sesuai', $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||
<button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('analisa_tanah')">Save</button>
|
||||
</div>
|
||||
<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'])"
|
||||
{{ 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'])"
|
||||
{{ 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;' }}">
|
||||
<input id="analisa_tanah_tidak_sesuai" type="text" name="luas_tanah_tidak_sesuai"
|
||||
class="input w-full" placeholder="Masukan Luas Tanah"
|
||||
value="{{ old('luas_tanah_tidak_sesuai', $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||
<button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('analisa_tanah')">Save
|
||||
</button>
|
||||
</div>
|
||||
<em id="error-luas_tanah" class="alert text-danger text-sm"></em>
|
||||
|
||||
</div>
|
||||
<em id="error-luas_tanah" class="alert text-danger text-sm"></em>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,13 +59,17 @@
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
if(is_array($luas)){
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$hadap_mata_angin = isset($details['hadap_mata_angin'])
|
||||
? $details['hadap_mata_angin']
|
||||
: 'N/A';
|
||||
} else {
|
||||
$luas_tanah = $hadap_mata_angin= 'N/A';
|
||||
}
|
||||
@endphp
|
||||
<input type="hidden" name="hadap_mata_angin_sesuai" class="input"
|
||||
value="{{ $hadap_mata_angin }}">
|
||||
value="{{ $hadap_mata_angin }}">
|
||||
<p class="text-2sm text-gray-700">{{ $hadap_mata_angin }} m<sup>2</sup></p>
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -74,42 +77,42 @@
|
||||
<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;' }}">
|
||||
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>
|
||||
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>
|
||||
@@ -126,22 +129,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
|
||||
@@ -159,7 +162,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>
|
||||
@@ -179,24 +182,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="m2"
|
||||
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="m2"
|
||||
value="{{ old('ketinggian_lebih_rendah', $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ?? '') }}"/>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@@ -246,17 +249,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
|
||||
@@ -315,9 +318,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>
|
||||
|
||||
@@ -325,9 +328,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
|
||||
|
||||
@@ -138,23 +138,25 @@
|
||||
},
|
||||
user_id: {
|
||||
title: 'User Pemohon',
|
||||
render: (item, data) => `${data.user.name}`,
|
||||
render: (item, data) => data.user ? `${data.user.name}` : 'N/A',
|
||||
},
|
||||
branch_id: {
|
||||
title: 'Cabang Pemohon',
|
||||
render: (item, data) => `${data.branch.name}`,
|
||||
render: (item, data) => data.branch ? `${data.branch.name}` : 'N/A',
|
||||
},
|
||||
debitur_id: {
|
||||
title: 'Debitur',
|
||||
render: (item, data) => `${data.debiture.name}`,
|
||||
render: (item, data) => {
|
||||
return data.debiture ? `${data.debiture.name}` : 'N/A';
|
||||
},
|
||||
},
|
||||
tujuan_penilaian_id: {
|
||||
title: 'Tujuan Penilaian',
|
||||
render: (item, data) => `${data.tujuan_penilaian.name}`,
|
||||
render: (item, data) => data.tujuan_penilaian ? `${data.tujuan_penilaian.name}` : 'N/A',
|
||||
},
|
||||
jenis_fasilitas_kredit_id: {
|
||||
title: 'Fasilitas Kredit',
|
||||
render: (item, data) => `${data.jenis_fasilitas_kredit.name}`,
|
||||
render: (item, data) => data.jenis_fasilitas_kredit ? `${data.jenis_fasilitas_kredit.name}` : 'N/A',
|
||||
},
|
||||
actions: {
|
||||
title: 'Action',
|
||||
|
||||
Reference in New Issue
Block a user