update form surveyor
This commit is contained in:
@@ -32,7 +32,8 @@
|
||||
|
||||
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200"
|
||||
data-accordion-item="true" id="accordion_1_item_1">
|
||||
<button class="accordion-toggle py-4 group mx-8" data-accordion-toggle="#accordion_detail_jaminan_{{ $loop->index }}">
|
||||
<button class="accordion-toggle py-4 group mx-8"
|
||||
data-accordion-toggle="#accordion_detail_jaminan_{{ $loop->index }}">
|
||||
<span class="text-base text-gray-900 font-medium">
|
||||
Jaminan {{ $loop->index + 1 }}
|
||||
</span>
|
||||
@@ -124,371 +125,114 @@
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form id="debiturForm"
|
||||
action="{{ isset($analisa->id) ? route('debitur.update', $analisa->id) : route('surveyor.store') }}"
|
||||
method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||
@if (isset($analisa->id))
|
||||
<input type="hidden" name="id" value="{{ $analisa->id }}">
|
||||
@method('PUT')
|
||||
@endif
|
||||
@csrf
|
||||
{{-- <div class="card">
|
||||
<div class="card-body"> --}}
|
||||
<form id="formInspeksi" {{-- action="{{ isset($analisa->id) ? route('debitur.update', $analisa->id) : route('surveyor.store') }}" --}} method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||
@if (isset($analisa->id))
|
||||
<input type="hidden" name="id" value="{{ $analisa->id }}">
|
||||
@method('PUT')
|
||||
@endif
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||
|
||||
@php
|
||||
$analisaType = 'unknown';
|
||||
$data = [
|
||||
'tanah' => 'Tanah',
|
||||
'unit_rumah' => 'Rumah Tinggal / Ruko (Unit) / Apartemen (Unit) / Gudang',
|
||||
'tanah_bangunan' => 'Kawasan Industrial / Komersil / Residensial - Perumahan',
|
||||
'unit_gedung' => 'Gedung Apartement / Kantor / Condotel (Strata Title)',
|
||||
'tanah_bangunan' => 'Mall',
|
||||
];
|
||||
@php
|
||||
$analisaType = 'unknown';
|
||||
$data = [
|
||||
'tanah' => 'Tanah',
|
||||
'unit_rumah' => 'Rumah Tinggal / Ruko (Unit) / Apartemen (Unit) / Gudang',
|
||||
'tanah_bangunan' => 'Kawasan Industrial / Komersil / Residensial - Perumahan',
|
||||
'unit_gedung' => 'Gedung Apartement / Kantor / Condotel (Strata Title)',
|
||||
'tanah_bangunan' => 'Mall',
|
||||
];
|
||||
|
||||
if (isset($analisa->id)) {
|
||||
$analisaType = $analisa->type;
|
||||
} else {
|
||||
foreach ($data as $key => $value) {
|
||||
if (
|
||||
isset($jenisJaminanData) &&
|
||||
trim(strtolower($jenisJaminanData)) === trim(strtolower($value))
|
||||
) {
|
||||
$analisaType = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($analisaType === 'tanah') {
|
||||
$analisaType = 'tanah_bangunan';
|
||||
if (isset($analisa->id)) {
|
||||
$analisaType = $analisa->type;
|
||||
} else {
|
||||
foreach ($data as $key => $value) {
|
||||
if (
|
||||
isset($jenisJaminanData) &&
|
||||
trim(strtolower($jenisJaminanData)) === trim(strtolower($value))
|
||||
) {
|
||||
$analisaType = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($analisaType === 'tanah') {
|
||||
$analisaType = 'tanah_bangunan';
|
||||
}
|
||||
|
||||
if ($analisaType === 'unit_rumah' || $analisaType === 'unit_gedung') {
|
||||
$analisaType = 'unit';
|
||||
}
|
||||
if ($analisaType === 'unit_rumah' || $analisaType === 'unit_gedung') {
|
||||
$analisaType = 'unit';
|
||||
}
|
||||
|
||||
@endphp
|
||||
@endphp
|
||||
|
||||
<input type="hidden" name="action" value="{{ $analisaType }}">
|
||||
<input type="hidden" name="type" value="{{ $analisaType }}">
|
||||
<input type="hidden" name="action" value="{{ $analisaType }}">
|
||||
<input type="hidden" name="type" value="{{ $analisaType }}">
|
||||
|
||||
@if ($analisaType == 'tanah_bangunan')
|
||||
@include('lpj::surveyor.components.tanah')
|
||||
@elseif($analisaType == 'unit')
|
||||
@include('lpj::surveyor.components.apartemen-kantor')
|
||||
@elseif($analisaType == 'alat-berat')
|
||||
@include('lpj::surveyor.components.alat-berat')
|
||||
@elseif($analisaType == 'mesin')
|
||||
@include('lpj::surveyor.components.mesin')
|
||||
@elseif($analisaType == 'kapal')
|
||||
@include('lpj::surveyor.components.kapal')
|
||||
@elseif($analisaType == 'kendaraan')
|
||||
@include('lpj::surveyor.components.kendaraan')
|
||||
@endif
|
||||
@if ($analisaType == 'tanah_bangunan')
|
||||
@include('lpj::surveyor.components.tanah')
|
||||
@elseif($analisaType == 'unit')
|
||||
@include('lpj::surveyor.components.apartemen-kantor')
|
||||
@elseif($analisaType == 'alat-berat')
|
||||
@include('lpj::surveyor.components.alat-berat')
|
||||
@elseif($analisaType == 'mesin')
|
||||
@include('lpj::surveyor.components.mesin')
|
||||
@elseif($analisaType == 'kapal')
|
||||
@include('lpj::surveyor.components.kapal')
|
||||
@elseif($analisaType == 'kendaraan')
|
||||
@include('lpj::surveyor.components.kendaraan')
|
||||
@elseif($analisaType == 'pesawat')
|
||||
@include('lpj::surveyor.components.pesawat')
|
||||
@endif
|
||||
|
||||
@if($analisaType == 'tanah_bangunan')
|
||||
@include('lpj::surveyor.components.bangunan')
|
||||
@endif
|
||||
@if ($analisaType == 'tanah_bangunan')
|
||||
@include('lpj::surveyor.components.bangunan')
|
||||
@endif
|
||||
|
||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal')
|
||||
<div class=" bg-white rounded-lg overflow-hidden">
|
||||
<div class=" text-white py-4 px-6">
|
||||
<h1 class="text-md font-medium text-gray-900">Analisis Lingkungan</h1>
|
||||
</div>
|
||||
<div class="grid gap-5">
|
||||
<!-- Jarak dari Objek Utama -->
|
||||
<div class="bg-gray-50 rounded-lg">
|
||||
<div class="grid grid-cols-3 gap-5">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Jarak Dari Jalan
|
||||
Utama</label>
|
||||
<input type="text" class="input mt-2" name="jarak_jalan_utama" placeholder="Km"
|
||||
value="{{ old('jarak_jalan_utama', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->jarak_jalan_utama : '') }}">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Jarak ke CBD Point</label>
|
||||
<input type="text" class="input mt-2" name="jarak_cbd_point" placeholder="Km"
|
||||
value="{{ old('jarak_cbd_point', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->jarak_cbd_point : '') }}">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Lebar Perkerasan Jalan Depan
|
||||
objek</label>
|
||||
<input type="text" name="lebar_perkerasan_jalan" class="input mt-2"
|
||||
placeholder="Meter"
|
||||
value="{{ old('lebar_perkerasan_jalan', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->lebar_perkerasan_jalan : '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Alamat</label>
|
||||
<input type="text" name="alamat" class="input mt-2"
|
||||
placeholder="Masukkan Nama Jalan"
|
||||
value="{{ old('alamat', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->alamat : '') }}">
|
||||
</div>
|
||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal' && $analisaType != 'kendaraan' && $analisaType != 'pesawat')
|
||||
@include('lpj::surveyor.components.lingkungan')
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Perkerasan Jalan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('perkerasan_jalan') border-danger bg-danger-light @enderror"
|
||||
name="perkerasan_jalan">
|
||||
<option value="">Select Perkerasan Jalan</option>
|
||||
@if (isset($konturTanah))
|
||||
@foreach ($konturTanah as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('perkerasan_jalan', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->perkerasan_jalan : '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
@error('perkerasan_jalan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Lalulintas -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Lalulintas Depan Lokasi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('lalu_lintas') border-danger bg-danger-light @enderror"
|
||||
name="lalu_lintas">
|
||||
<option value="">Select Lalulintas Depan Lokasi</option>
|
||||
@if (isset($laluLintasLokasi))
|
||||
@foreach ($laluLintasLokasi as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('lalu_lintas', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->lalu_lintas : '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
@error('lalu_lintas')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Golongan Hidup Sekitar -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Golongan Hidup Sekitar</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('gol_mas_sekitar') border-danger bg-danger-light @enderror"
|
||||
name="gol_mas_sekitar">
|
||||
<option value="">Select Golongan Hidup Sekitar</option>
|
||||
|
||||
@if (isset($golMasySekitar))
|
||||
@foreach ($golMasySekitar as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('gol_mas_sekitar', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->gol_mas_sekitar : '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
@error('gol_mas_sekitar')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tingkat Keramaian -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Tingkat Keramaian</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('tingkat_keramaian') border-danger bg-danger-light @enderror"
|
||||
name="tingkat_keramaian">
|
||||
<option value="">Select Tingkat Keramaian</option>
|
||||
@if (isset($tingkatKeramaian))
|
||||
@foreach ($tingkatKeramaian as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('tingkat_keramaian', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->tingkat_keramaian : '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
@error('tingkat_keramaian')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tataletak di Area -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Tataletak di Area</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('terletak_diarea') border-danger bg-danger-light @enderror"
|
||||
name="terletak_diarea">
|
||||
<option value="">Select Tataletak di Area</option>
|
||||
@if (isset($konturTanah))
|
||||
@foreach ($konturTanah as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('terletak_diarea', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->terletak_diarea : '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
@error('terletak_diarea')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Struktru tata letak -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Struktru tata letak</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="disekitar_lokasi" value="tidak"
|
||||
{{ old('disekitar_lokasi', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->disekitar_lokasi : '') == 'tidak' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Telah Ada Bangunan</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="disekitar_lokasi" value="ya"
|
||||
{{ old('disekitar_lokasi', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->disekitar_lokasi : '') == 'ya' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Belum Ada Bangunan</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@error('disekitar_lokasi')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Dekat Makam -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Dekat Makamh</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="grid grid-cols-2 gap-4 mt-2">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="dekat_makam" value="ya"
|
||||
{{ old('dekat_makam', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->dekat_makam : '') == 'ya' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Ya</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="dekat_makam" value="tidak"
|
||||
{{ old('dekat_makam', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->dekat_makam : '') == 'tidak' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@error('dekatMakam')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Dekat Tps</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="grid grid-cols-2 gap-4 mt-2">
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="dekat_tps" value="ya"
|
||||
{{ old('dekat_tps', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->dekat_tps : '') == 'ya' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Ya</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="dekat_tps" value="tidak"
|
||||
{{ old('dekat_tps', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->dekat_tps : '') == 'tidak' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@error('dekatTps')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Merupakan daerah</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('merupakan_daerah') border-danger bg-danger-light @enderror"
|
||||
name="merupakan_daerah">
|
||||
<option value="">Select Merupakan daerah</option>
|
||||
@if (isset($konturTanah))
|
||||
@foreach ($konturTanah as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('merupakan_daerah', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->merupakan_daerah : '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
@error('merupakan_daerah')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Fasilitas Umum Sekitar -->
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Fasilitas Umum dekat Object</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('fasilitas_dekat_object') border-danger bg-danger-light @enderror"
|
||||
name="fasilitas_dekat_object">
|
||||
<option value="">Select Fasilitas Umum Ddekat Object</option>
|
||||
@if (isset($konturTanah))
|
||||
@foreach ($konturTanah as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('fasilitas_dekat_object', isset($analisa->analisaLingkungan) ? $analisa->analisaLingkungan->fasilitas_dekat_object : '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
@error('fasilitas_dekat_object')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- analisa fakta --}}
|
||||
<div class="card bg-white rounded-lg overflow-hidden">
|
||||
<div class="card-body">
|
||||
<div class=" py-4 px-6">
|
||||
<h1 class="text-md font-medium text-gray-900">Analisis Fakta</h1>
|
||||
</div>
|
||||
@endif
|
||||
<div class="grid gap-5">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Positif</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif" rows="3">{{ old('fakta_positif', isset($analisa->analisaFakta) ? $analisa->analisaFakta->fakta_positif : '') }}</textarea>
|
||||
|
||||
@error('fakta_positif')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button class="btn btn-primary btn-sm">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
|
||||
<div class=" bg-white rounded-lg overflow-hidden">
|
||||
<div class=" py-4 px-6">
|
||||
<h1 class="text-md font-medium text-gray-900">Analisis Fakta</h1>
|
||||
</div>
|
||||
<div class="grid gap-5">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Positif</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif" rows="3">{{ old('fakta_positif', isset($analisa->analisaFakta) ? $analisa->analisaFakta->fakta_positif : '') }}</textarea>
|
||||
@error('fakta_positif')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif" rows="3">{{ old('fakta_negatif', isset($analisa->analisaFakta) ? $analisa->analisaFakta->fakta_negatif : '') }}</textarea>
|
||||
@error('fakta_negatif')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif" rows="3">{{ old('fakta_negatif', isset($analisa->analisaFakta) ? $analisa->analisaFakta->fakta_negatif : '') }}</textarea>
|
||||
@error('fakta_negatif')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button class="btn btn-primary btn-sm">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal')
|
||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal' && $analisaType != 'kendaraan' && $analisaType != 'pesawat')
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Rute Menuju</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@@ -502,21 +246,24 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Batas batas</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="grid grid-cols-2 gap-4 items-center w-full">
|
||||
<div>
|
||||
<select class="select mt-2" name="batas_batas">
|
||||
@if (isset($arahMataAngin))
|
||||
@foreach ($arahMataAngin as $item)
|
||||
<option value="{{ $item->id }}"
|
||||
{{ old('batas_batas', isset($analisa->analisaFakta) ? $analisa->analisaFakta->batas_batas : '') == $item->id ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<input name="keteranganBatas" type="text" class="input mt-2">
|
||||
</div>
|
||||
<div class="grid grid-cols-1 gap-4 items-center w-full">
|
||||
@php
|
||||
$inputBatas = [];
|
||||
$inputBatas = [
|
||||
['label' => 'Utara', 'index' => 0],
|
||||
['label' => 'Timur', 'index' => 1],
|
||||
['label' => 'Selatan', 'index' => 2],
|
||||
['label' => 'Barat', 'index' => 3],
|
||||
];
|
||||
@endphp
|
||||
@if ($inputBatas > 0)
|
||||
@foreach ($inputBatas as $item)
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">{{ $item['label'] }}</label>
|
||||
<input type="text" name="batas_batas" class="input" />
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@error('batas_batas')
|
||||
@@ -530,10 +277,16 @@
|
||||
<label class="form-label max-w-56">Kondisi lain terkait lingkungan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea mt-2" name="kondisi_linkungan" rows="3">{{ old('kondisi_linkungan', isset($analisa->analisaFakta) ? $analisa->analisaFakta->kondisi_linkungan : '') }}</textarea>
|
||||
|
||||
|
||||
@error('kondisi_linkungan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button class="btn btn-primary btn-sm mt-5 ">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -545,6 +298,9 @@
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button class="btn btn-primary btn-sm mt-5 ">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -555,17 +311,22 @@
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button class="btn btn-primary btn-sm mt-5 ">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Informasi Tata Ruang -->
|
||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal')
|
||||
<!-- Informasi Tata Ruang -->
|
||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal' && $analisaType != 'kendaraan' && $analisaType != 'pesawat')
|
||||
<div class="card w-full bg-white">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="">
|
||||
<!-- Header -->
|
||||
<div class="py-4 px-6">
|
||||
<h1 class="text-md font-medium text-gray-900">Informasi Dinas Tata Ruang</h1>
|
||||
</div>
|
||||
@@ -686,29 +447,44 @@
|
||||
<input class="name_rute" type="hidden" name="name_rute[]" value="rute">
|
||||
<input id="inputRute" type="file" name="foto_rute"
|
||||
class="file-input file-input-bordered w-full" accept="image/*">
|
||||
<button id="gistaru" type="button" class="btn btn-light"
|
||||
onclick="openModal('gistaru')">
|
||||
<a href="https://gistaru.atrbpn.go.id/rtronline" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
<i class="ki-outline ki-abstract-33"></i> Gistaru
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">Bumi</span>
|
||||
<span class="form-label">Bhumi</span>
|
||||
</label>
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input class="name_rute" type="hidden" name="name_rute" value="rute">
|
||||
<input id="inputRute" type="file" name="foto_rute"
|
||||
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
||||
<button id="bumi" type="button" class="btn btn-light"
|
||||
onclick="openModal('bumi')">
|
||||
<i class="ki-outline ki-abstract-33"></i> Bumi
|
||||
</button>
|
||||
<a href="https://bhumi.atrbpn.go.id/peta" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
<i class="ki-outline ki-abstract-33"></i> Bhumi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (isset($link_url_region->regions->url))
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">{{ $link_url_region->regions->name_url }}</span>
|
||||
</label>
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input class="name_rute" type="hidden" name="name_rute" value="rute">
|
||||
<input id="inputRute" type="file" name="foto_rute"
|
||||
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
||||
<a href="{{$link_url_region->regions->url}}" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
<i class="ki-outline ki-abstract-33"></i> {{ $link_url_region->regions->name_url }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Peta Section -->
|
||||
|
||||
<div class="mt-2" style="margin-top: 20px">
|
||||
@@ -758,16 +534,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||
<button type="submit" class="btn btn-success">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||
<button type="button" class="btn btn-success" onclick="submitData()">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{-- </div>
|
||||
</div> --}}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -780,7 +557,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body" id="screenshotContainer" style="height: 500px">
|
||||
<iframe id="mapFrameGis" style="width: 100%; height: 100%;"></iframe>
|
||||
<iframe id="mapFrameGis" style="width: 100%; height: 100%;"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer flex justify-end">
|
||||
<button id="takeScreenshot" class="btn btn-success">Take Screenshot</button>
|
||||
@@ -808,7 +585,7 @@
|
||||
|
||||
if (type === 'bumi') {
|
||||
modalBumi.setAttribute('data-modal-toggle', '#modal');
|
||||
}else if (type === 'gistaru') {
|
||||
} else if (type === 'gistaru') {
|
||||
modalGistaru.setAttribute('data-modal-toggle', '#modal');
|
||||
}
|
||||
|
||||
@@ -877,4 +654,32 @@
|
||||
}
|
||||
window.onload = getUserLocation;
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
function submitData() {
|
||||
// Ambil form element
|
||||
const formElement = document.getElementById('formInspeksi');
|
||||
const formData = new FormData(formElement);
|
||||
|
||||
// for (let [key, value] of formData.entries()) {
|
||||
// console.log(key, value);
|
||||
// }
|
||||
|
||||
fetch('{{ route("surveyor.store") }}', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log("Response data:", data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user