Merge remote-tracking branch 'composer/staging' into staging
This commit is contained in:
58
app/Exports/BasicDataSurveyorExport.php
Normal file
58
app/Exports/BasicDataSurveyorExport.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
|
||||
class BasicDataSurveyorExport implements WithColumnFormatting, WithHeadings, FromCollection, withMapping
|
||||
{
|
||||
|
||||
|
||||
protected $model;
|
||||
|
||||
|
||||
public function __construct($model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
|
||||
public function collection()
|
||||
{
|
||||
return $this->model::all();
|
||||
}
|
||||
|
||||
public function map($row)
|
||||
: array
|
||||
{
|
||||
return [
|
||||
$row->id,
|
||||
$row->code,
|
||||
$row->name,
|
||||
$row->created_at
|
||||
];
|
||||
}
|
||||
|
||||
public function headings()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
'ID',
|
||||
'Code',
|
||||
'Name',
|
||||
'Created At'
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
'A' => NumberFormat::FORMAT_NUMBER,
|
||||
'D' => NumberFormat::FORMAT_DATE_DATETIME
|
||||
];
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -71,8 +71,10 @@ class FormSurveyorRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'luas_tanah' => 'required',
|
||||
'luas_tanah_sesuai' => 'nullable',
|
||||
'luas_tanah_tidak_sesuai' => 'nullable',
|
||||
'hadap_mata_angin' => 'required',
|
||||
'hadap_mata_angin_sesuai' => 'nullable',
|
||||
'hadap_mata_angin_tidak_sesuai' => 'nullable',
|
||||
'bentuk_tanah' => 'nullable|array',
|
||||
'bentuk_tanah_lainnya' => 'nullable',
|
||||
@@ -95,7 +97,9 @@ class FormSurveyorRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'action' => 'required',
|
||||
'luas_tanah_bangunan_sesuai' => 'nullable',
|
||||
'luas_tanah_bagunan' => 'required',
|
||||
'luas_tanah_bangunan_tidak_sesuai' => 'nullable',
|
||||
'jenis_bangunan' => 'required',
|
||||
'kondisi_bangunan' => 'nullable',
|
||||
'sifat_bangunan' => 'required|array',
|
||||
@@ -116,6 +120,7 @@ class FormSurveyorRequest extends FormRequest
|
||||
return [
|
||||
'action' => 'required',
|
||||
'luas_unit' => 'required',
|
||||
'luas_unit_sesuai' => 'nullable',
|
||||
'luas_unit_tidak_sesuai' => 'nullable',
|
||||
'jenis_unit' => 'required|array',
|
||||
'kondisi_unit' => 'required|array',
|
||||
@@ -511,10 +516,19 @@ class FormSurveyorRequest extends FormRequest
|
||||
'permohonan_id' => 'required',
|
||||
'type' => 'required',
|
||||
'debitur_perwakilan' => 'required|array',
|
||||
'jenis_asset_name' => 'nullable',
|
||||
'jenis_asset' => 'required',
|
||||
'jenis_asset_tidak_sesuai' => 'nullable',
|
||||
'alamat_sesuai' => 'required',
|
||||
'alamat_tidak_sesuai' => 'nullable',
|
||||
|
||||
'hub_cadeb' => 'required',
|
||||
'hub_cadeb_sesuai' => 'nullable',
|
||||
'hub_cadeb_tidak_sesuai' => 'nullable',
|
||||
'hub_cadeb_penghuni' => 'required',
|
||||
'hub_cadeb_penghuni_sesuai' => 'nullable',
|
||||
'hub_cadeb_penghuni_tidak_sesuai' => 'nullable',
|
||||
|
||||
'nama_jalan' => 'nullable',
|
||||
'desa_kelurahan' => 'nullable',
|
||||
'kecamatan' => 'nullable',
|
||||
|
||||
@@ -37,6 +37,7 @@ class SurveyorRequest extends FormRequest
|
||||
'posisi-unit' => 'posisi_unit',
|
||||
'bentuk-unit' => 'bentuk_unit',
|
||||
'fasilitas-objek' => 'fasilitas_objek',
|
||||
'perkerasan-jalan' => 'perkerasan_jalan',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,26 +12,44 @@
|
||||
<!-- Luas tanah -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Luas Unit</label>
|
||||
@if (isset($permohonan->debiture->documents))
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$luas_unit = isset($details['luas_unit']) ? $details['luas_unit'] : 'N/A';
|
||||
@endphp
|
||||
<input type="hidden" name="luas_unit_sesuai" class="input" value="{{ $luas_unit }}">
|
||||
<p class="text-2sm text-gray-700">{{ $luas_unit }} m<sup>2</sup></p>
|
||||
@endforeach
|
||||
|
||||
@endif
|
||||
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||
<input onclick="toggleFieldVisibility('luas_unit','luas_unit_tidak_sesuai', ['tidak sesuai'])" type="radio" class="radio" name="luas_unit" value="sesuai"
|
||||
<input
|
||||
onclick="toggleFieldVisibility('luas_unit','luas_unit_tidak_sesuai', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="luas_unit" value="sesuai"
|
||||
{{ old('luas_unit', $forminspeksi['luas_unit'] ?? '') == 'sesuai' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Sesuai</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input onclick="toggleFieldVisibility('luas_unit','luas_unit_tidak_sesuai', ['tidak sesuai'])" type="radio" class="radio" name="luas_unit" value="tidak sesuai"
|
||||
<input
|
||||
onclick="toggleFieldVisibility('luas_unit','luas_unit_tidak_sesuai', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="luas_unit" value="tidak sesuai"
|
||||
{{ old('luas_unit', $forminspeksi['luas_unit'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak Sesuai</span>
|
||||
</label>
|
||||
|
||||
<div id="luas_unit_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ old('luas_unit', $forminspeksi['luas_unit'] ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}">
|
||||
<input id="analisa_luas_unit_tidak_sesuai" type="text" name="luas_unit_tidak_sesuai" class="input w-full"
|
||||
placeholder="Masukan Luas Tanah"
|
||||
value="{{ old('luas_unit_tidak_sesuai', $forminspeksi['luas_unit_tidak_sesuai'] ?? '') }}">
|
||||
<button type="button" class="btn btn-md btn-primary" onclick="updateAnalisa('analisa_unit')">Save</button>
|
||||
</div>
|
||||
style="{{ old('luas_unit', $forminspeksi['luas_unit'] ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}">
|
||||
<input id="analisa_luas_unit_tidak_sesuai" type="text" name="luas_unit_tidak_sesuai"
|
||||
class="input w-full" placeholder="Masukan Luas Tanah"
|
||||
value="{{ old('luas_unit_tidak_sesuai', $forminspeksi['luas_unit_tidak_sesuai'] ?? '') }}">
|
||||
<button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('analisa_unit')">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
<em id="error-luas_unit" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@@ -94,8 +112,8 @@
|
||||
{{ in_array($item->name, old('lantai', $forminspeksi['lantai'] ?? [])) ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<input type="text" name="lantai_input[]" class="input w-full"
|
||||
id="lantaiInput" placeholder="Masukkan {{ $item->name }}..."
|
||||
<input type="text" name="lantai_input[]" class="input w-full" id="lantaiInput"
|
||||
placeholder="Masukkan {{ $item->name }}..."
|
||||
value="{{ old('lantai_input.' . $loop->index, $forminspeksi['lantai_input'][$loop->index] ?? '') }}">
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Luas Bagunan</label>
|
||||
<div class="mt-2">
|
||||
|
||||
|
||||
@if (isset($permohonan->debiture->documents))
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
@php
|
||||
@@ -15,9 +15,10 @@
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$luas_bangunan = isset($details['luas_bangunan']) ? $details['luas_bangunan'] : 'N/A';
|
||||
@endphp
|
||||
<input type="hidden" name="luas_bangunan_sesuai" class="input" value="{{ $luas_bangunan }}">
|
||||
<p class="text-2sm text-gray-700">{{ $luas_bangunan }} m<sup>2</sup></p>
|
||||
@endforeach
|
||||
|
||||
|
||||
@endif
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||
@@ -60,20 +61,16 @@
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="jenis_bangunan[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ old('jenis_bangunan') == $item->name || isset($forminspeksi['bangunan']['jenis_bangunan']) == $item->name ? 'checked' : '' }} />
|
||||
{{ old('jenis_bangunan') == $item->name || isset($forminspeksi['bangunan']['jenis_bangunan']) == $item->name ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('jenis_bangunan', 'jenis_bangunan_lainnya', ['lainnya'])"
|
||||
/>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'lainnya') == 0)
|
||||
<div class="flex items-center">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="jenis_bangunan[]" type="checkbox"
|
||||
value="{{ $item->name }}" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<input type="text" name="jenis_bangunan" class="input mt-2"
|
||||
id="bentukTanahInput" placeholder="Masukkan Jenis Bangunan...">
|
||||
</div>
|
||||
@endif
|
||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||
<input id="jenis_bangunan_lainnya" type="text" style="display: none;"
|
||||
name="jenis_bangunan_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan lainnya..." />
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -153,7 +150,7 @@
|
||||
@if (@isset($spekKategoriBagunan))
|
||||
@foreach ($spekKategoriBagunan as $item)
|
||||
<div>
|
||||
<input type="hidden" name="spek_kategori_bangunan.[]"
|
||||
<input type="hidden" name="spek_kategori_bangunan[]"
|
||||
value="{{ $item->name }}">
|
||||
<label
|
||||
class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
|
||||
|
||||
@@ -1,78 +1,93 @@
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5 lg:gap-7.5">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@if (request()->has('form') && request('form') === 'denah')
|
||||
<a class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg"
|
||||
href="{{ route('surveyor.denah', ['id' => $permohonan->id, 'jaminanId' => $dokumen->jenisJaminan->id]) }}?form=create-denah&denah={{ $permohonan->id }}&jenis_jaminan={{ $dokumen->jenisJaminan->id }}">
|
||||
@elseif(request()->has('form') && request('form') === 'foto')
|
||||
<a class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg"
|
||||
href="{{ route('surveyor.foto', ['id' => $permohonan->id, 'jaminanId' => $dokumen->jenisJaminan->id]) }}?form=create-foto&foto={{ $permohonan->id }}&jenis_jaminan={{ $dokumen->jenisJaminan->id }}">
|
||||
@elseif(request()->has('form') && request('form') === 'inspeksi')
|
||||
<a class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg"
|
||||
href="{{ route('surveyor.inspeksi', ['id' => $permohonan->id, 'jaminanId' => $dokumen->jenisJaminan->id]) }}?form=create-inspeksi&inspeksi={{ $permohonan->id }}&jenis_jaminan={{ $dokumen->jenisJaminan->id }}">
|
||||
@php
|
||||
$jaminanId = $dokumen->jenisJaminan->id;
|
||||
$currentInspeksi = $inspeksiData[$jaminanId] ?? null;
|
||||
|
||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT'];
|
||||
|
||||
$href = [
|
||||
[
|
||||
'label' => 'form inspeksi',
|
||||
'url' => route('surveyor.inspeksi', [
|
||||
'id' => $permohonan->id,
|
||||
'jaminanId' => $jaminanId,
|
||||
]) . "?form=create-inspeksi&inspeksi={$permohonan->id}&jenis_jaminan={$jaminanId}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['data_form']),
|
||||
],
|
||||
];
|
||||
|
||||
@elseif(request()->has('form') && request('form') === 'data-pembanding')
|
||||
<a class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg"
|
||||
href="{{ route('surveyor.data-pembanding', ['id' => $permohonan->id, 'jaminanId' => $dokumen->jenisJaminan->id]) }}?form=data-pembanding&pembanding={{ $permohonan->id }}&jenis_jaminan={{ $dokumen->jenisJaminan->id }}">
|
||||
@endif
|
||||
if (!in_array(strtoupper($dokumen->jenisJaminan->name), $tanahBangunanTypes)) {
|
||||
$href[] = [
|
||||
'label' => 'denah tanah dan bangunan',
|
||||
'url' => route('surveyor.denah', [
|
||||
'id' => $permohonan->id,
|
||||
'jaminanId' => $jaminanId,
|
||||
]) . "?form=create-denah&denah={$permohonan->id}&jenis_jaminan={$jaminanId}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['denah_form']),
|
||||
];
|
||||
}
|
||||
|
||||
<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 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>
|
||||
</div>
|
||||
$href = array_merge($href, [
|
||||
[
|
||||
'label' => 'foto',
|
||||
'url' => route('surveyor.foto', [
|
||||
'id' => $permohonan->id,
|
||||
'jaminanId' => $jaminanId,
|
||||
]) . "?form=create-foto&foto={$permohonan->id}&jenis_jaminan={$jaminanId}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['foto_form']),
|
||||
],
|
||||
[
|
||||
'label' => 'data pembanding',
|
||||
'url' => route('surveyor.data-pembanding', [
|
||||
'id' => $permohonan->id,
|
||||
'jaminanId' => $jaminanId,
|
||||
]) . "?form=data-pembanding&pembanding={$permohonan->id}&jenis_jaminan={$jaminanId}",
|
||||
'show' => true,
|
||||
'icon' => !empty($currentInspeksi['data_pembanding']),
|
||||
],
|
||||
]);
|
||||
@endphp
|
||||
|
||||
<div class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg grid gap-5"
|
||||
style="padding: 20px">
|
||||
<div class="card-group flex items-center flex-wrap sm:flex-nowrap justify-between py-4 gap-2.5">
|
||||
<div class="flex items-center gap-3.5">
|
||||
<div class="relative size-[50px] shrink-0">
|
||||
<!-- SVG code remains the same -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col text-center">
|
||||
<span class="text-lg font-semibold text-gray-900 hover:text-primary-active mb-px">
|
||||
@php
|
||||
$formType = request()->input('form');
|
||||
$formData = null;
|
||||
$formAction = 'Tambah';
|
||||
@endphp
|
||||
|
||||
@if ($formType === 'inspeksi')
|
||||
@php
|
||||
$formData = $forminspeksi ?? null;
|
||||
@endphp
|
||||
@elseif ($formType === 'foto')
|
||||
@php
|
||||
$formData = $formFoto ?? null;
|
||||
@endphp
|
||||
@elseif ($formType === 'denah')
|
||||
@php
|
||||
$formData = $formDenah ?? null;
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
@if ($formData)
|
||||
@php
|
||||
$formAction = 'Update';
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
{{ $formAction }}
|
||||
|
||||
|
||||
{{ request('form') }}
|
||||
</span>
|
||||
<span class="text-2sm font-normal text-gray-600">
|
||||
<div class="flex items-center gap-2.5">
|
||||
<span class="flex items-center gap-1.5 leading-none font-medium text-sm text-gray-900">
|
||||
{{ $dokumen->jenisJaminan->name ?? '' }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@foreach ($href as $item)
|
||||
@if ($item['show'])
|
||||
<a href="{{ $item['url'] }}"
|
||||
class="flex items-center justify-between border border-gray-200 rounded-xl gap-2 px-4 py-4 btn-outline {{ $item['icon'] ? 'btn-success' : 'btn-primary' }} hover:btn-light">
|
||||
<div class="flex items-center gap-3.5">
|
||||
<div class="flex flex-col">
|
||||
<h1 class="text-sm font-medium text-gray-900 mb-px uppercase">
|
||||
{{ $item['label'] }}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-5">
|
||||
<div class="flex gap-0.5">
|
||||
<div class="btn btn-sm btn-icon btn-clear {{ $item['icon'] ? '' : 'btn-light' }}">
|
||||
<i class="ki-filled {{ $item['icon'] ? 'ki-check-circle' : 'ki-notepad-edit'}}"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@@ -1,40 +1,33 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
{{-- @section('breadcrumbs')
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection --}}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@include('lpj::assetsku.includenya')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5">
|
||||
<div class="card min-w-full">
|
||||
<div class="card min-w-full">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Data Pembanding
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{
|
||||
{ route('surveyor.show', ['id' => request('pembanding')]) }}?form=data-pembanding
|
||||
"
|
||||
class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-5">
|
||||
<div class="card-grid min-w-full" data-datatable="false" data-datatable-page-size="5"
|
||||
data-datatable-state-save="false" id="data-table" data-api-url="">
|
||||
|
||||
<form id="dataPembandingForm" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="type" value="tanah">
|
||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Data Pembanding
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('surveyor.show', ['id' => request('pembanding')]) }}"
|
||||
class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-header py-5 flex-wrap flex justify-end">
|
||||
<button type="button" id="addColumnBtn" class="btn btn-primary btn-sm">
|
||||
<i class="ki-filled ki-plus"></i> Tambah Kolom
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
{{-- @section('breadcrumbs')
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection --}}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@include('lpj::assetsku.includenya')
|
||||
@@ -144,7 +144,7 @@
|
||||
src="{{ isset($formDenah['foto_denah']) ? asset('storage/' . old('foto_denah', $formDenah['foto_denah'])) : '' }}"
|
||||
alt="Gambar foto_denah" style="{{ isset($formDenah['foto_denah']) ? 'width: 30rem;' : 'display: none;' }}">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input type="file"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
{{-- @section('breadcrumbs')
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection --}}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@include('lpj::assetsku.includenya')
|
||||
@@ -14,7 +14,7 @@
|
||||
Data Jaminan
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('surveyor.show', ['id' => request('foto')]) }}?form=foto"
|
||||
<a href="{{ route('surveyor.show', ['id' => request('foto')]) }}"
|
||||
class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
@@ -621,10 +621,12 @@
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=foto';
|
||||
// window.location.href =
|
||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=foto';
|
||||
toastrSuccessBuild(response.message);
|
||||
}
|
||||
console.log(response);
|
||||
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
<div class=" card w-full bg-white rounded-lg shadow-md ">
|
||||
|
||||
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Form Inspeksi
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('surveyor.show', ['id' => request('inspeksi')]) }}" class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
<div class="py-4">
|
||||
<h1 class="text-md font-medium text-gray-900">Order Penilaian</h1>
|
||||
@@ -93,6 +108,7 @@
|
||||
@if (isset($permohonan->debiture->documents))
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
<p class="text-2sm text-gray-700">{{ $item->jenisJaminan->name }}</p>
|
||||
<input type="hidden" name="jenis_asset_name" value="{{ $item->jenisJaminan->name }}">
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -101,19 +117,18 @@
|
||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||
<input onclick="toggleFieldVisibility('jenis_asset', 'jenis_asset', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="jenis_asset" value="sesuai"
|
||||
{{ old('jenis_asset', $forminspeksi['asset']['jenis_asset'] ?? '') == 'sesuai' ? 'checked' : '' }}>
|
||||
{{ isset($forminspeksi['asset']['jenis_asset']['sesuai']) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Ya</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input onclick="toggleFieldVisibility('jenis_asset', 'jenis_asset', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="jenis_asset" value="tidak sesuai"
|
||||
{{ old('jenis_asset', $forminspeksi['asset']['jenis_asset'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
{{ isset($forminspeksi['asset']['jenis_asset']['tidak sesuai']) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
<!-- Select dropdown untuk "Tidak Sesuai" -->
|
||||
|
||||
<div id="jenis_asset" class="flex items-baseline gap-2"
|
||||
style="{{ old('jenis_asset', $forminspeksi['asset']['jenis_asset'] ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}">
|
||||
style="{{ isset($forminspeksi['asset']['jenis_asset']['tidak sesuai']) ? '' : 'display: none;' }}">
|
||||
<select id="jenis_asset_tidak_sesuai" class="input w-full"
|
||||
name="jenis_asset_tidak_sesuai">
|
||||
<option value="">Select Jenis asset</option>
|
||||
@@ -129,10 +144,10 @@
|
||||
<button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('jenis_asset')">Save</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<em id="error-jenis_asset" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -152,14 +167,14 @@
|
||||
<input
|
||||
onclick="toggleAlamatVisibility('alamat_sesuai', 'alamat_tidak_sesuai', 'sesuai')"
|
||||
type="radio" class="radio" name="alamat_sesuai" value="sesuai"
|
||||
{{ old('jenis_asset', $forminspeksi['asset']['jenis_asset'] ?? '') == 'sesuai' ? 'checked' : '' }}>
|
||||
{{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Ya</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||
<input
|
||||
onclick="toggleAlamatVisibility('alamat_sesuai', 'alamat_tidak_sesuai', 'tidak sesuai')"
|
||||
type="radio" class="radio" name="alamat_sesuai" value="tidak sesuai"
|
||||
{{ old('jenis_asset', $forminspeksi['asset']['jenis_asset'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
{{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['tidak sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -169,7 +184,7 @@
|
||||
</div>
|
||||
|
||||
{{-- Alamat Sesuai --}}
|
||||
<div id="alamat_sesuai" class="grid gap-2 mt-5" style="display: none;">
|
||||
<div id="alamat_sesuai" class="grid gap-2 mt-5" style="{{ isset($forminspeksi['asset']['alamat']['sesuai']) ? '' : 'display: none;' }}">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@php
|
||||
$fields = [
|
||||
@@ -218,7 +233,7 @@
|
||||
</div>
|
||||
|
||||
{{-- Alamat Tidak Sesuai --}}
|
||||
<div id="alamat_tidak_sesuai" class="grid gap-2 mt-5" style="display: none;">
|
||||
<div id="alamat_tidak_sesuai" class="grid gap-2 mt-5" style="{{ isset($forminspeksi['asset']['alamat']['tidak sesuai']) ? '' : 'display: none;' }}"">
|
||||
@php
|
||||
$inputDataLokasi = [
|
||||
['label' => 'Jl.', 'id' => 'address', 'name' => 'address', 'type' => 'text'],
|
||||
@@ -409,6 +424,8 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
{{ $dokumen->pemilik->hubungan_pemilik->name ?? '' }}
|
||||
<input type="hidden" name="hub_cadeb_sesuai"
|
||||
value="{{ $dokumen->pemilik->hubungan_pemilik->name }}" id="">
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@@ -418,14 +435,14 @@
|
||||
<input
|
||||
onclick="toggleFieldVisibility('hub_cadeb','hub_cadeb_tidak_sesuai', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="hub_cadeb" value="sesuai"
|
||||
{{ old('hub_cadeb', $forminspeksi['asset']['hub_cadeb'] ?? '') == 'sesuai' ? 'checked' : '' }}>
|
||||
{{ old('hub_cadeb', isset($forminspeksi['asset']['hub_cadeb']['sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Ya</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input
|
||||
onclick="toggleFieldVisibility('hub_cadeb','hub_cadeb_tidak_sesuai', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="hub_cadeb" value="tidak sesuai"
|
||||
{{ old('hub_cadeb', $forminspeksi['asset']['hub_cadeb'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
{{ old('hub_cadeb', isset($forminspeksi['asset']['hub_cadeb']['tidak sesuai']))? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
<!-- Select dropdown untuk "Tidak Sesuai" -->
|
||||
@@ -461,6 +478,9 @@
|
||||
<div class="flex flex-wrap items-baseline w-full text-sm">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
{{ $dokumen->penghuni->hubungan_penghuni->name ?? 'N/A' }}
|
||||
<input type="hidden" name="hub_cadeb_penguhuni_sesuai"
|
||||
value="{{ isset($dokumen->penghuni->hubungan_penghuni->name) ?? '' }}"
|
||||
id="">
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@@ -470,21 +490,21 @@
|
||||
<input
|
||||
onclick="toggleFieldVisibility('hub_cadeb_penghuni','hub_cadeb_Penghuni_tidak_sesuai', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="hub_cadeb_penghuni" value="sesuai"
|
||||
{{ old('hub_cadeb_penghuni', $forminspeksi['asset']['hub_cadeb_penghuni'] ?? '') == 'sesuai' ? 'checked' : '' }}>
|
||||
{{ old('hub_cadeb_penghuni', isset($forminspeksi['asset']['hub_cadeb_penghuni']['sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Ya</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input
|
||||
onclick="toggleFieldVisibility('hub_cadeb_penghuni', 'hub_cadeb_Penghuni_tidak_sesuai', ['tidak sesuai'])"
|
||||
type="radio" class="radio" name="hub_cadeb_penghuni" value="tidak sesuai"
|
||||
{{ old('hub_cadeb_penghuni', $forminspeksi['asset']['hub_cadeb_penghuni'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
{{ old('hub_cadeb_penghuni', isset($forminspeksi['asset']['hub_cadeb_penghuni']['tidak sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
<!-- Select dropdown untuk "Tidak Sesuai" -->
|
||||
<select id="hub_cadeb_Penghuni_tidak_sesuai"
|
||||
class="input w-full
|
||||
name="hub_cadeb_Penghuni_tidak_sesuai"
|
||||
style="{{ old('hub_cadeb', $forminspeksi['asset']['hub_cadeb'] ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}">
|
||||
style="{{ old('hub_cadeb', isset($forminspeksi['asset']['hub_cadeb_penghuni']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<option value="">Select Hubungan Cadeb</option>
|
||||
@if (isset($hubPenghuni))
|
||||
@foreach ($hubPenghuni as $item)
|
||||
|
||||
@@ -1,39 +1,16 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
{{-- @section('breadcrumbs')
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection --}}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@include('lpj::assetsku.includenya')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card min-w-full">
|
||||
<div class="card min-w-full">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Form Inspeksi
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('surveyor.show', ['id' => request('inspeksi')]) }}?form=inspeksi"
|
||||
class="btn btn-xs btn-info">
|
||||
<i class="ki-filled ki-exit-left"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{{-- <div class="card">
|
||||
<div class="card-body"> --}}
|
||||
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||
|
||||
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@if ($dokumen->jenisJaminan)
|
||||
@php
|
||||
@@ -65,8 +42,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{{-- </div>
|
||||
</div> --}}
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
@@ -126,19 +101,19 @@
|
||||
|
||||
|
||||
function toggleAlamatVisibility(idSesuai, idTidakSesuai, selectedValue) {
|
||||
// Ambil elemen berdasarkan ID
|
||||
const alamatSesuai = document.getElementById(idSesuai);
|
||||
const alamatTidakSesuai = document.getElementById(idTidakSesuai);
|
||||
// Ambil elemen berdasarkan ID
|
||||
const alamatSesuai = document.getElementById(idSesuai);
|
||||
const alamatTidakSesuai = document.getElementById(idTidakSesuai);
|
||||
|
||||
// Periksa nilai yang dipilih dan tampilkan elemen yang sesuai
|
||||
if (selectedValue === 'sesuai') {
|
||||
alamatSesuai.style.display = 'grid'; // Tampilkan "Alamat Sesuai"
|
||||
alamatTidakSesuai.style.display = 'none'; // Sembunyikan "Alamat Tidak Sesuai"
|
||||
} else if (selectedValue === 'tidak sesuai') {
|
||||
alamatSesuai.style.display = 'none'; // Sembunyikan "Alamat Sesuai"
|
||||
alamatTidakSesuai.style.display = 'grid'; // Tampilkan "Alamat Tidak Sesuai"
|
||||
}
|
||||
}
|
||||
// Periksa nilai yang dipilih dan tampilkan elemen yang sesuai
|
||||
if (selectedValue === 'sesuai') {
|
||||
alamatSesuai.style.display = 'grid'; // Tampilkan "Alamat Sesuai"
|
||||
alamatTidakSesuai.style.display = 'none'; // Sembunyikan "Alamat Tidak Sesuai"
|
||||
} else if (selectedValue === 'tidak sesuai') {
|
||||
alamatSesuai.style.display = 'none'; // Sembunyikan "Alamat Sesuai"
|
||||
alamatTidakSesuai.style.display = 'grid'; // Tampilkan "Alamat Tidak Sesuai"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -275,7 +250,11 @@
|
||||
console.error('Terjadi error:', error);
|
||||
console.log('Status:', status);
|
||||
console.log('Response:', xhr.responseText);
|
||||
toastrErrorBuild(error);
|
||||
if (xhr.responseJSON.message) {
|
||||
toastrErrorBuild(xhr.responseJSON.message);
|
||||
} else {
|
||||
toastrErrorBuild('Terjadi kesalahan');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,9 +50,15 @@
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="perkerasan_jalan[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, isset($forminspeksi['lingkungan']['perkerasan_jalan']) ? $forminspeksi['lingkungan']['perkerasan_jalan'] : []) ? 'checked' : '' }} />
|
||||
{{ in_array($item->name, isset($forminspeksi['lingkungan']['perkerasan_jalan']) ? $forminspeksi['lingkungan']['perkerasan_jalan'] : []) ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('perkerasan_jalan', 'perkerasan_jalan_lainnya', ['lainnya'])"/>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||
<input id="perkerasan_jalan_lainnya" type="text" style="display: none;"
|
||||
name="perkerasan_jalan_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan lainnya..." />
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -133,10 +139,16 @@
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="terletak_diarea[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ isset($forminspeksi['lingkungan']['terletak_diarea']) && in_array($item->name, explode(',', is_array(old('terletak_diarea', $forminspeksi['lingkungan']['terletak_diarea'] ?? '')) ? implode(',', old('terletak_diarea', $forminspeksi['lingkungan']['terletak_diarea'] ?? '')) : old('terletak_diarea', $forminspeksi['lingkungan']['terletak_diarea'] ?? ''))) ? 'checked' : '' }} />
|
||||
{{ isset($forminspeksi['lingkungan']['terletak_diarea']) && in_array($item->name, explode(',', is_array(old('terletak_diarea', $forminspeksi['lingkungan']['terletak_diarea'] ?? '')) ? implode(',', old('terletak_diarea', $forminspeksi['lingkungan']['terletak_diarea'] ?? '')) : old('terletak_diarea', $forminspeksi['lingkungan']['terletak_diarea'] ?? ''))) ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('terletak_diarea', 'terletak_diarea_lainnya', ['Lainnya'])" />
|
||||
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||
<input id="terletak_diarea_lainnya" type="text" style="display: none;"
|
||||
name="terletak_diarea_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan lainnya..." />
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -246,53 +258,34 @@
|
||||
<!-- Opsi Ya -->
|
||||
<div class="flex w-full items-center gap-4">
|
||||
<label class="text-sm flex items-center gap-2.5 text-nowrap">
|
||||
<input
|
||||
onclick="toggleFieldVisibility('dekat_tps', 'dekat-tps', ['ya'])"
|
||||
<input onclick="toggleFieldVisibility('dekat_tps', 'dekat-tps', ['ya'])"
|
||||
type="radio" class="radio" name="dekat_tps" value="ya"
|
||||
{{ old('dekat_tps', $forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'ya' ? 'checked' : '' }}
|
||||
/>
|
||||
{{ old('dekat_tps', $forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'ya' ? 'checked' : '' }} />
|
||||
<span class="ml-2">Ya</span>
|
||||
</label>
|
||||
<div
|
||||
id="dekat-tps"
|
||||
class="flex flex-wrap gap-4 w-full"
|
||||
style="{{ old('dekat_tps', $forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'ya' ? 'display:flex;' : 'display:none;' }}"
|
||||
>
|
||||
<div id="dekat-tps" class="flex flex-wrap gap-4 w-full"
|
||||
style="{{ old('dekat_tps', $forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'ya' ? 'display:flex;' : 'display:none;' }}">
|
||||
<div class="flex items-center gap-2">
|
||||
<label for="jarak_tps" class="form-label max-w-56">Jarak</label>
|
||||
<input
|
||||
type="number"
|
||||
id="jarak_tps"
|
||||
class="input mt-2"
|
||||
name="jarak_tps"
|
||||
<input type="number" id="jarak_tps" class="input mt-2" name="jarak_tps"
|
||||
value="{{ old('jarak_tps', $forminspeksi['lingkungan']['jarak_tps'] ?? '') }}"
|
||||
placeholder="Km"
|
||||
/>
|
||||
placeholder="Km" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<label for="nama_tps" class="form-label max-w-56">Nama TPS</label>
|
||||
<input
|
||||
type="text"
|
||||
id="nama_tps"
|
||||
class="input mt-2"
|
||||
name="nama_tps"
|
||||
<input type="text" id="nama_tps" class="input mt-2" name="nama_tps"
|
||||
value="{{ old('nama_tps', $forminspeksi['lingkungan']['nama_tps'] ?? '') }}"
|
||||
placeholder="Nama TPS"
|
||||
/>
|
||||
placeholder="Nama TPS" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Opsi Tidak -->
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input
|
||||
onclick="toggleFieldVisibility('dekat_tps', 'dekat-tps', ['ya'])"
|
||||
type="radio" class="radio"
|
||||
name="dekat_tps"
|
||||
value="tidak"
|
||||
{{ old('dekat_tps', $forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'tidak' ? 'checked' : '' }}
|
||||
/>
|
||||
<input onclick="toggleFieldVisibility('dekat_tps', 'dekat-tps', ['ya'])" type="radio"
|
||||
class="radio" name="dekat_tps" value="tidak"
|
||||
{{ old('dekat_tps', $forminspeksi['lingkungan']['dekat_tps'] ?? '') == 'tidak' ? 'checked' : '' }} />
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -332,9 +325,15 @@
|
||||
@php
|
||||
|
||||
$selectedFasilitas = is_array(
|
||||
old('fasilitas_dekat_object', $forminspeksi['lingkungan']['fasilitas_dekat_object'] ?? []),
|
||||
old(
|
||||
'fasilitas_dekat_object',
|
||||
$forminspeksi['lingkungan']['fasilitas_dekat_object'] ?? [],
|
||||
),
|
||||
)
|
||||
? old('fasilitas_dekat_object', $forminspeksi['lingkungan']['fasilitas_dekat_object'] ?? [])
|
||||
? old(
|
||||
'fasilitas_dekat_object',
|
||||
$forminspeksi['lingkungan']['fasilitas_dekat_object'] ?? [],
|
||||
)
|
||||
: explode(
|
||||
',',
|
||||
old(
|
||||
@@ -353,10 +352,18 @@
|
||||
: explode(',', old('fasilitas_dekat_object', $forminspeksi['lingkungan']['fasilitas_dekat_object'] ?? '')),
|
||||
)
|
||||
? 'checked'
|
||||
: '' }} />
|
||||
: '' }}
|
||||
onclick="toggleCheckboxVisibility('fasilitas_dekat_object', 'fasilitas_dekat_object_lainnya', ['Lainnya'])"
|
||||
/>
|
||||
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
|
||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||
<input id="fasilitas_dekat_object_lainnya" type="text" style="display: none;"
|
||||
name="fasilitas_dekat_object_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan lainnya..." />
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -367,4 +374,3 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
<label class="form-label max-w-56">Luas Tanah</label>
|
||||
<div class="mt-2">
|
||||
@if (isset($permohonan->debiture->documents))
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$luas_tanah = isset($details['luas_tanah']) ? $details['luas_tanah'] : 'N/A';
|
||||
@endphp
|
||||
<p class="text-2sm text-gray-700">{{ $luas_tanah }} m<sup>2</sup></p>
|
||||
@endforeach
|
||||
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$luas_tanah = isset($details['luas_tanah']) ? $details['luas_tanah'] : '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>
|
||||
@endforeach
|
||||
@endif
|
||||
<div class="flex-wrap items-stretch">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@@ -29,21 +29,22 @@
|
||||
<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', $forminspeksi['tanah']['luas_tanah'] ?? '') == 'sesuai' ? 'checked' : '' }}>
|
||||
{{ 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', $forminspeksi['tanah']['luas_tanah'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
{{ 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', $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"
|
||||
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>
|
||||
<button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('analisa_tanah')">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
<em id="error-luas_tanah" class="alert text-danger text-sm"></em>
|
||||
@@ -55,29 +56,40 @@
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Hadap Mata Angin</label>
|
||||
<div class="mt-2">
|
||||
@if (isset($permohonan->debiture->documents))
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
$details = json_decode($luas[0]->details, true);
|
||||
$hadap_mata_angin = isset($details['hadap_mata_angin']) ? $details['hadap_mata_angin'] : 'N/A';
|
||||
@endphp
|
||||
<input type="hidden" name="hadap_mata_angin_sesuai" class="input" value="{{ $hadap_mata_angin }}">
|
||||
<p class="text-2sm text-gray-700">{{ $hadap_mata_angin }} m<sup>2</sup></p>
|
||||
@endforeach
|
||||
@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="hadap_mata_angin" value="sesuai"
|
||||
onclick="toggleFieldVisibility('hadap_mata_angin', 'hadap_mata_angin_tidak_sesuai' ,['tidak sesuai'])"
|
||||
{{ old('hadap_mata_angin', $forminspeksi['tanah']['hadap_mata_angin'] ?? '') == 'sesuai' ? 'checked' : '' }}>
|
||||
{{ 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"
|
||||
<input type="radio" class="radio" name="hadap_mata_angin" value="tidak sesuai"
|
||||
onclick="toggleFieldVisibility('hadap_mata_angin', 'hadap_mata_angin_tidak_sesuai' ,['tidak sesuai'])"
|
||||
{{ old('hadap_mata_angin', $forminspeksi['tanah']['hadap_mata_angin'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
{{ 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', $forminspeksi['tanah']['hadap_mata_angin'] ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}">
|
||||
<select
|
||||
class="input w-full
|
||||
style="{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<select class="input w-full
|
||||
id="hadap_matangin_tidak_sesuai"
|
||||
name="analisa_tanah_hadap_mata_angin_tidak_sesuai">
|
||||
name="analisa_tanah_hadap_mata_angin_tidak_sesuai">
|
||||
<option value="">Select Hadap Mata Angin</option>
|
||||
@if (isset($arahMataAngin))
|
||||
@foreach ($arahMataAngin as $item)
|
||||
@@ -94,6 +106,7 @@
|
||||
<em id="error-hadap_mata_angin" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Bentuk Tanah -->
|
||||
@@ -106,33 +119,22 @@
|
||||
@foreach ($bentukTanah as $item)
|
||||
<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"
|
||||
<input class="checkbox" name="bentuk_tanah[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{
|
||||
in_array($item->name, old('bentuk_tanah', [])) ||
|
||||
(isset($forminspeksi['tanah']['bentuk_tanah']) &&
|
||||
is_array($forminspeksi['tanah']['bentuk_tanah']) &&
|
||||
in_array($item->name, $forminspeksi['tanah']['bentuk_tanah']))
|
||||
{{ 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'])"
|
||||
/>
|
||||
: '' }}
|
||||
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="display: none;"
|
||||
name="bentuk_tanah_lainnya"
|
||||
class="input w-full mt-2"
|
||||
<input id="bentuk_tanah_lainnya" type="text" style="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'] ?? '') }}"
|
||||
/>
|
||||
value="{{ old('bentuk_tanah_lainnya', $forminspeksi['tanah']['bentuk_tanah']['lainnya'] ?? '') }}" />
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -149,20 +151,9 @@
|
||||
@if (isset($konturTanah))
|
||||
@foreach ($konturTanah as $item)
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input
|
||||
class="checkbox"
|
||||
name="kontur_tanah[]"
|
||||
type="checkbox"
|
||||
<input class="checkbox" name="kontur_tanah[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{
|
||||
in_array(
|
||||
$item->name,
|
||||
old('kontur_tanah', $forminspeksi['tanah']['kontur_tanah'] ?? [])
|
||||
)
|
||||
? 'checked'
|
||||
: ''
|
||||
}}
|
||||
/>
|
||||
{{ in_array($item->name, old('kontur_tanah', $forminspeksi['tanah']['kontur_tanah'] ?? [])) ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
@@ -238,27 +229,18 @@
|
||||
<div class="flex flex-col items-start gap-4">
|
||||
@if (isset($posisiKavling))
|
||||
@foreach ($posisiKavling as $item)
|
||||
<div class="flex items-center">
|
||||
<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"
|
||||
<input class="checkbox" name="posisi_kavling[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('posisi_kavling', $forminspeksi['tanah']['posisi_kavling'] ?? [])) ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('posisi_kavling', 'posisi_kavling_lainnya', ['Lainnya'])"
|
||||
/>
|
||||
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="display: none;"
|
||||
name="posisi_kavling_lainnya"
|
||||
class="input w-full mt-2"
|
||||
placeholder="Masukkan Posisi Kavling lainnya..."
|
||||
/>
|
||||
<input id="posisi_kavling_lainnya" type="text" style="display: none;"
|
||||
name="posisi_kavling_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan Posisi Kavling lainnya..." />
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -319,7 +301,7 @@
|
||||
<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']) && in_array($item->name, $forminspeksi['tanah']['kondisi_fisik_tanah'])) ? 'checked' : '' }}
|
||||
{{ 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>
|
||||
@@ -330,7 +312,7 @@
|
||||
<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') }}">
|
||||
value="{{ old('kondisi_fisik_tanah_lainnya', isset($forminspeksi['tanah']['kondisi_fisik_tanah']['lainnya'])) }}">
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2.5">
|
||||
<div class="h-[24px] border border-r-gray-200"></div>
|
||||
<a class="btn btn-sm btn-light" href=""> Export to Excel </a>
|
||||
<a class="btn btn-sm btn-light" href="{{ route('basicdata.export', $header[1] ) }}"> Export to Excel </a>
|
||||
|
||||
@php
|
||||
$href = route('basicdata.createData', ['type' => $header[1]]);
|
||||
@@ -42,7 +42,7 @@
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[250px]" data-datatable-column="name">
|
||||
<span class="sort"> <span class="sort-label"> Jenis Aset </span>
|
||||
<span class="sort"> <span class="sort-label">{{ isset($header[0]) ? $header[0] : '' }}</span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@include('lpj::assetsku.includenya')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
|
||||
|
||||
@@ -25,33 +25,12 @@
|
||||
<div class="card min-w-full py-2 px-2">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<div class="card-title flex flex-row gap-1.5">
|
||||
<a href="{{ route('surveyor.show', array_merge(request()->query(), ['id' => $surveyor, 'form' => 'inspeksi'])) }}"
|
||||
class="btn btn-xs {{ request()->has('form') && request('form') == 'inspeksi' ? 'btn-outline btn-primary' : 'btn-light' }}">FORM
|
||||
INSPEKSI</a>
|
||||
|
||||
<a href="{{ route('surveyor.show', array_merge(request()->query(), ['id' => $surveyor, 'form' => 'denah'])) }}"
|
||||
class="btn btn-xs {{ request()->has('form') && request('form') == 'denah' ? 'btn-outline btn-primary' : 'btn-light' }}">DENAH
|
||||
TANAH DAN BANGUNAN</a>
|
||||
|
||||
<a href="{{ route('surveyor.show', array_merge(request()->query(), ['id' => $surveyor, 'form' => 'foto'])) }}"
|
||||
class="btn btn-xs {{ request()->has('form') && request('form') == 'foto' ? 'btn-outline btn-primary' : 'btn-light' }}">FOTO</a>
|
||||
|
||||
<a href="{{ route('surveyor.show', array_merge(request()->query(), ['id' => $surveyor, 'form' => 'data-pembanding'])) }}"
|
||||
class="btn btn-xs {{ request()->has('form') && request('form') == 'data-pembanding' ? 'btn-outline btn-primary' : 'btn-light' }}">DATA
|
||||
PEMBANDING</a>
|
||||
Form Jaminan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (request()->has('form') && request('form') == 'denah')
|
||||
@include('lpj::surveyor.components.card-tambah')
|
||||
@elseif(request()->has('form') && request('form') == 'data-pembanding')
|
||||
@include('lpj::surveyor.components.card-tambah')
|
||||
@elseif(request()->has('form') && request('form') == 'foto')
|
||||
@include('lpj::surveyor.components.card-tambah')
|
||||
@else
|
||||
@include('lpj::surveyor.components.card-tambah')
|
||||
@endIf
|
||||
</div>
|
||||
|
||||
<div class="card-footer ">
|
||||
@@ -107,11 +86,19 @@
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
window.location.href = "{{ route('surveyor.index') }}";
|
||||
// window.location.href = "{{ route('surveyor.index') }}";
|
||||
toastrSuccessBuild(response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.log('Error checking button status:', error, status, xhr);
|
||||
if (xhr.responseJSON.message) {
|
||||
toastrErrorBuild(xhr.responseJSON.message);
|
||||
}else{
|
||||
toastrErrorBuild('Terjadi kesalahan');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -418,6 +418,10 @@
|
||||
Breadcrumbs::for('surveyor', function (BreadcrumbTrail $trail) {
|
||||
$trail->push('Surveyor', route('surveyor.index'));
|
||||
});
|
||||
Breadcrumbs::for('surveyor.inspeksi', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('surveyor');
|
||||
$trail->push('Form Inspeksi');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('surveyor.show', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('surveyor');
|
||||
|
||||
954
routes/web.php
954
routes/web.php
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user