Merge branch 'staging' into feature/senior-officer
This commit is contained in:
@@ -415,6 +415,7 @@ class PenilaianController extends Controller
|
||||
return view('lpj::penilaian.otorisator.sla', compact('permohonan', 'header', 'authorization'));
|
||||
}
|
||||
if ($header === 'Paparan') {
|
||||
$authorization = Authorization::with(['user'])->where('permohonan_id', $id)->first();
|
||||
return view('lpj::penilaian.otorisator.show', compact('permohonan', 'header', 'authorization'));
|
||||
}
|
||||
return view('lpj::penilaian.otorisator.show', compact('permohonan', 'header', 'authorization'));
|
||||
@@ -430,6 +431,14 @@ class PenilaianController extends Controller
|
||||
], 404);
|
||||
}
|
||||
$permohonan = Permohonan::find($authorization->permohonan_id);
|
||||
} elseif ($context === 'Paparan') {
|
||||
$authorization = Authorization::with(['user'])->find($id);
|
||||
if (!$authorization) {
|
||||
return response()->json([
|
||||
'message' => 'Data authorization Paparan tidak ditemukan.',
|
||||
], 404);
|
||||
}
|
||||
$permohonan = Permohonan::find($authorization->permohonan_id);
|
||||
} else {
|
||||
$permohonan = Permohonan::find($id);
|
||||
}
|
||||
@@ -483,16 +492,17 @@ class PenilaianController extends Controller
|
||||
break;
|
||||
|
||||
case 'sla':
|
||||
if (Auth::user()->roles[0]->name === 'senior-officer') {
|
||||
if (Auth::user()->roles[0]->name === 'senior-officer' || Auth::user()->roles[0]->name === 'administrator' && $authorization->approve_so === null) {
|
||||
$authorization->update([
|
||||
'status' => '3',
|
||||
'status_so' => '1',
|
||||
'approve_so' => Auth::user()->id,
|
||||
'approve_so_at' => now(),
|
||||
'keterangan_so' => $request->message,
|
||||
]);
|
||||
} elseif (Auth::user()->roles[0]->name === 'EO Appraisal' || Auth::user()->roles[0]->name === 'administrator') {
|
||||
} elseif (Auth::user()->roles[0]->name === 'EO Appraisal' || Auth::user()->roles[0]->name === 'administrator' && $authorization->approve_so && $authorization->approve_eo === null) {
|
||||
$status = '2';
|
||||
if (!in_array($permohonan->nulai_plafond_id, [1, 4])) {
|
||||
if (!in_array($permohonan->nilai_plafond_id, [1, 4])) {
|
||||
$status = '1';
|
||||
$permohonan->update([
|
||||
'status' => $authorization->request
|
||||
@@ -501,13 +511,15 @@ class PenilaianController extends Controller
|
||||
|
||||
$authorization->update([
|
||||
'status' => $status,
|
||||
'status_eo' => '1',
|
||||
'approve_eo' => Auth::user()->id,
|
||||
'approve_eo_at' => now(),
|
||||
'keterangan_eo' => $request->message,
|
||||
]);
|
||||
} elseif (Auth::user()->roles[0]->name === 'DD Appraisal') {
|
||||
} elseif (Auth::user()->roles[0]->name === 'DD Appraisal' || Auth::user()->roles[0]->name === 'administrator' && $authorization->approve_so && $authorization->approve_eo && $authorization->approve_dd === null) {
|
||||
$authorization->update([
|
||||
'status' => '1',
|
||||
'status_dd' => '1',
|
||||
'approve_dd' => Auth::user()->id,
|
||||
'approve_dd_at' => now(),
|
||||
'keterangan_dd' => $request->message,
|
||||
@@ -519,11 +531,45 @@ class PenilaianController extends Controller
|
||||
}
|
||||
break;
|
||||
case 'paparan':
|
||||
$permohonan->update([
|
||||
'status' => 'paparan',
|
||||
'keterangan' => $request->message,
|
||||
]);
|
||||
if (Auth::user()->roles[0]->name === 'senior-officer' || Auth::user()->roles[0]->name === 'administrator' && $authorization->approve_so === null) {
|
||||
$authorization->update([
|
||||
'status' => '3',
|
||||
'status_so' => '1',
|
||||
'approve_so' => Auth::user()->id,
|
||||
'approve_so_at' => now(),
|
||||
'keterangan_so' => $request->message,
|
||||
]);
|
||||
} elseif (Auth::user()->roles[0]->name === 'EO Appraisal') {
|
||||
$status = '2';
|
||||
if (!in_array($permohonan->nilai_plafond_id, [1, 4])) {
|
||||
$status = '1';
|
||||
$permohonan->update([
|
||||
'status' => $authorization->request
|
||||
]);
|
||||
}
|
||||
$authorization->update([
|
||||
'status' => $status,
|
||||
'status_eo' => '1',
|
||||
'approve_eo' => Auth::user()->id,
|
||||
'approve_eo_at' => now(),
|
||||
'keterangan_eo' => $request->message,
|
||||
]);
|
||||
} elseif (Auth::user()->roles[0]->name === 'DD Appraisal' || Auth::user()->roles[0]->name === 'administrator' && $authorization->approve_so && $authorization->approve_dd === null) {
|
||||
$authorization->update([
|
||||
'status' => '1',
|
||||
'status_dd' => '1',
|
||||
'approve_dd' => Auth::user()->id,
|
||||
'approve_dd_at' => now(),
|
||||
'keterangan_dd' => $request->message,
|
||||
]);
|
||||
|
||||
$permohonan->update([
|
||||
'status' => 'paparan',
|
||||
'tanggal_paparan' => $request->tanggalPaparan
|
||||
]);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return response()->json([
|
||||
'message' => 'Konteks otorisasi tidak valid.',
|
||||
|
||||
@@ -71,7 +71,7 @@ class SLAController extends Controller
|
||||
// abort(403, 'Sorry! You are not allowed to view users.');
|
||||
}
|
||||
|
||||
$query = Authorization::query()->with('permohonan.debiture','user','approveSo','approveEo','approveDd');
|
||||
$query = Authorization::query()->with('permohonan.debiture','user','approveSo','approveEo','approveDd')->where('jenis','sla');
|
||||
|
||||
// Pencarian berdasarkan parameter search
|
||||
if ($request->has('search') && !empty($request->get('search'))) {
|
||||
|
||||
@@ -1019,13 +1019,15 @@ class SurveyorController extends Controller
|
||||
public function storeFreeze($id, Request $request)
|
||||
{
|
||||
try {
|
||||
$permohonan = Permohonan::findOrFail($id);
|
||||
|
||||
$permohonan = Permohonan::findOrFail($id);
|
||||
|
||||
$permohonan->update([
|
||||
'status' => 'request-freeze',
|
||||
'keterangan' => $request->message
|
||||
]);
|
||||
Authorization::updateOrCreate([
|
||||
'permohonan_id' => $permohonan->id,
|
||||
'jenis' => 'sla'
|
||||
],[
|
||||
'request' => 'freeze',
|
||||
'user_id' => Auth::user()->id
|
||||
]);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
|
||||
@@ -102,8 +102,15 @@
|
||||
{
|
||||
$historyService = app(PermohonanHistoryService::class);
|
||||
|
||||
$keterangan = request()->input('keterangan', '');
|
||||
if (request()->filled('registrasi_catatan')) {
|
||||
if (!empty($keterangan)) {
|
||||
$keterangan .= "\n";
|
||||
}
|
||||
$keterangan .= request()->input('registrasi_catatan');
|
||||
}
|
||||
|
||||
$status = $permohonan->status;
|
||||
$keterangan = request()->input('keterangan'); // Get keterangan from request
|
||||
$beforeRequest = $action === 'updated' ? $permohonan->getOriginal() : [];
|
||||
$afterRequest = $permohonan->toArray();
|
||||
$file = $permohonan->dokumen ?? null;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div class="ml-3 mb-5">
|
||||
<span class="text-sm text-gray-700 capitalize font-medium">{{ str_replace('-',' ',$activity->status) }}</span>
|
||||
<p class="text-xs text-gray-500 mt-1">{{ $activity->keterangan }}</p>
|
||||
<p class="text-xs text-gray-500 mt-1">{{ $activity->keterangan ? 'Catatan : '.$activity->keterangan : '' }}</p>
|
||||
<div class="flex items-center mt-2">
|
||||
<span class="text-xs text-gray-400">{{ $activity->created_by ? $activity->creator->name : 'System' }}</span>
|
||||
<span class="text-xs text-gray-400 ml-2">{{ $activity->created_at->format('d M Y H:i') }}</span>
|
||||
|
||||
@@ -269,8 +269,7 @@
|
||||
Catatan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea @error('keterangan') border-danger bg-danger-light @enderror" rows="3"
|
||||
type="text" name="keterangan">{{ $permohonan->registrasi_cat ?? "" }} {{ $penilaian->keterangan ?? '' }}</textarea>
|
||||
<textarea class="textarea @error('keterangan') border-danger bg-danger-light @enderror" rows="3" name="keterangan">{{ $permohonan->registrasi_catatan ? $permohonan->registrasi_catatan . "\n\n" : "" }}{{ $penilaian->keterangan ?? '' }}</textarea>
|
||||
</div>
|
||||
|
||||
<em id="error-keterangan" class="alert text-danger text-sm"></em>
|
||||
|
||||
@@ -129,50 +129,57 @@
|
||||
href="{{ route('otorisator.view-laporan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
||||
Lihat Laporan
|
||||
</a>
|
||||
@endif
|
||||
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer']) && $permohonan->approval_so == null)
|
||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
<button class="btn btn-warning" onclick="revisiLaporan({{ $permohonan->id }})">
|
||||
<i class="ki-filled ki-arrow-circle-right"></i> Revisi
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($dataHeader == 'paparan')
|
||||
<a class="btn btn-success"
|
||||
href="{{ route('penilai.paparan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
||||
Lihat Data Paparan
|
||||
</a>
|
||||
@if (Auth::user()->hasAnyRole(['administrator', 'DD Appraisal']))
|
||||
@if (Auth::user()->hasAnyRole(['administrator', 'EO Appraisal']) &&
|
||||
$permohonan->approval_so &&
|
||||
$permohonan->approval_eo == null)
|
||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer']) && $permohonan->approval_so == null)
|
||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
@if ($dataHeader != 'paparan')
|
||||
<button class="btn btn-warning" onclick="revisiLaporan({{ $permohonan->id }})">
|
||||
<i class="ki-filled ki-arrow-circle-right"></i> Revisi
|
||||
@if (Auth::user()->hasAnyRole(['administrator', 'DD Appraisal']) &&
|
||||
$permohonan->approval_eo &&
|
||||
$permohonan->approval_dd == null &&
|
||||
in_array($permohonan->nilai_plafond_id, [1, 4]))
|
||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->hasAnyRole(['administrator', 'EO Appraisal']) &&
|
||||
$permohonan->approval_so &&
|
||||
$permohonan->approval_eo == null)
|
||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
@endif
|
||||
@elseif($dataHeader == 'paparan')
|
||||
<a class="btn btn-success"
|
||||
href="{{ route('penilai.paparan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
||||
Lihat Data Paparan
|
||||
</a>
|
||||
|
||||
@if (Auth::user()->hasAnyRole(['administrator', 'DD Appraisal']) &&
|
||||
$permohonan->approval_eo &&
|
||||
$permohonan->approval_dd == null &&
|
||||
@if(Auth::user()->hasAnyRole(['administrator','senior-officer']) && $authorization->approve_so==null)
|
||||
<button onclick="otorisatorData({{ $authorization->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->hasAnyRole(['administrator', 'DD Appraisal']) &&
|
||||
$authorization->approve_so &&
|
||||
$authorization->approve_dd == null &&
|
||||
in_array($permohonan->nilai_plafond_id, [1, 4]))
|
||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
<button onclick="otorisatorData({{ $authorization->id }},'DD')" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,53 +188,162 @@
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function otorisatorData(dataId) {
|
||||
function otorisatorData(dataId, role='') {
|
||||
const dataHeader = @json($header);
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan otorisator ${dataHeader}!`,
|
||||
icon: 'warning',
|
||||
input: 'textarea',
|
||||
inputLabel: 'Keterangan',
|
||||
inputPlaceholder: 'Masukkan keterangan...',
|
||||
inputAttributes: {
|
||||
'aria-label': 'Masukkan keterangan'
|
||||
},
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, Lanjutkan!',
|
||||
cancelButtonText: 'Batal',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const userMessage = result.value || ''; // Ambil pesan dari textarea
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
if(dataHeader == 'Paparan'){
|
||||
if(role == 'DD'){
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan otorisator ${dataHeader}!`,
|
||||
icon: 'warning',
|
||||
html: `
|
||||
<input id="swal-keterangan" class="swal2-input input" placeholder="Keterangan">
|
||||
<input id="swal-tanggal-paparan" class="swal2-input input" type="date" placeholder="Tanggal paparan">
|
||||
`,
|
||||
focusConfirm: false,
|
||||
preConfirm: () => {
|
||||
const keterangan = document.getElementById('swal-keterangan').value;
|
||||
const tanggalPaparan = document.getElementById('swal-tanggal-paparan').value;
|
||||
|
||||
if (!keterangan || !tanggalPaparan) {
|
||||
Swal.showValidationMessage('Keterangan atau Tanggal Paparan Harus diisi!');
|
||||
return false;
|
||||
}
|
||||
|
||||
return { keterangan, tanggalPaparan };
|
||||
},
|
||||
});
|
||||
$.ajax({
|
||||
url: `/otorisator/otorisator/${dataId}/${dataHeader}`,
|
||||
type: 'POST',
|
||||
data: {
|
||||
message: userMessage
|
||||
},
|
||||
success: (response) => {
|
||||
Swal.fire('Berhasil!',
|
||||
'Data berhasil diotorisasi. Menunggu Approval EO dan atau DD',
|
||||
'success').then(() => {
|
||||
window.location.reload();
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, Lanjutkan!',
|
||||
cancelButtonText: 'Batal',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const keterangan = result.value.keterangan || '';
|
||||
const tanggalPaparan = result.value.tanggalPaparan || '';
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
$.ajax({
|
||||
url: `/otorisator/otorisator/${dataId}/${dataHeader}`,
|
||||
type: 'POST',
|
||||
data: {
|
||||
message: keterangan,
|
||||
tanggalPaparan: tanggalPaparan
|
||||
},
|
||||
success: (response) => {
|
||||
Swal.fire('Berhasil!',
|
||||
'Data berhasil diotorisasi. Menunggu Approval dan Tanggal Paparan dari DD',
|
||||
'success').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan otorisator.',
|
||||
'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan otorisator ${dataHeader}!`,
|
||||
icon: 'warning',
|
||||
input: 'textarea',
|
||||
inputLabel: 'Keterangan',
|
||||
inputPlaceholder: 'Masukkan keterangan...',
|
||||
inputAttributes: {
|
||||
'aria-label': 'Masukkan keterangan'
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan otorisator.',
|
||||
'error');
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, Lanjutkan!',
|
||||
cancelButtonText: 'Batal',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const userMessage = result.value || ''; // Ambil pesan dari textarea
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
});
|
||||
$.ajax({
|
||||
url: `/otorisator/otorisator/${dataId}/${dataHeader}`,
|
||||
type: 'POST',
|
||||
data: {
|
||||
message: userMessage
|
||||
},
|
||||
success: (response) => {
|
||||
Swal.fire('Berhasil!',
|
||||
'Data berhasil diotorisasi. Menunggu Approval dan Tanggal Paparan dari DD',
|
||||
'success').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan otorisator.',
|
||||
'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan otorisator ${dataHeader}!`,
|
||||
icon: 'warning',
|
||||
input: 'textarea',
|
||||
inputLabel: 'Keterangan',
|
||||
inputPlaceholder: 'Masukkan keterangan...',
|
||||
inputAttributes: {
|
||||
'aria-label': 'Masukkan keterangan'
|
||||
},
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, Lanjutkan!',
|
||||
cancelButtonText: 'Batal',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const userMessage = result.value || ''; // Ambil pesan dari textarea
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
});
|
||||
$.ajax({
|
||||
url: `/otorisator/otorisator/${dataId}/${dataHeader}`,
|
||||
type: 'POST',
|
||||
data: {
|
||||
message: userMessage
|
||||
},
|
||||
success: (response) => {
|
||||
Swal.fire('Berhasil!',
|
||||
'Data berhasil diotorisasi. Menunggu Approval EO dan atau DD',
|
||||
'success').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan otorisator.',
|
||||
'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,258 +1,268 @@
|
||||
<!-- Informasi Tata Ruang -->
|
||||
<div class="card border border-agi-100 w-full ">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
Informasi Dinas Tata Ruang
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- Informasi Tata Ruang Form -->
|
||||
<div class="grid gap-5">
|
||||
@php
|
||||
$inputDinasTata = [
|
||||
[
|
||||
'label' => 'Peruntukan',
|
||||
'name' => 'peruntukan',
|
||||
'index' => 0,
|
||||
'value' => old(
|
||||
'peruntukan',
|
||||
isset($forminspeksi['fakta']['peruntukan']) ? $forminspeksi['fakta']['peruntukan'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'KDB',
|
||||
'name' => 'kdb',
|
||||
'index' => 1,
|
||||
'value' => old(
|
||||
'kdb',
|
||||
isset($forminspeksi['fakta']['kdb']) ? $forminspeksi['fakta']['kdb'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'KDH',
|
||||
'name' => 'kdh',
|
||||
'index' => 2,
|
||||
'value' => old(
|
||||
'kdh',
|
||||
isset($forminspeksi['fakta']['kdh']) ? $forminspeksi['fakta']['kdh'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'GSB',
|
||||
'name' => 'gsb',
|
||||
'index' => 3,
|
||||
'value' => old(
|
||||
'gsb',
|
||||
isset($forminspeksi['fakta']['gsb']) ? $forminspeksi['fakta']['gsb'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'Max Lantai',
|
||||
'name' => 'max_lantai',
|
||||
'index' => 4,
|
||||
'value' => old(
|
||||
'max_lantai',
|
||||
isset($forminspeksi['fakta']['max_lantai']) ? $forminspeksi['fakta']['max_lantai'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'KLB',
|
||||
'name' => 'klb',
|
||||
'index' => 5,
|
||||
'value' => old(
|
||||
'klb',
|
||||
isset($forminspeksi['fakta']['klb']) ? $forminspeksi['fakta']['klb'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'GSS',
|
||||
'name' => 'gss',
|
||||
'index' => 6,
|
||||
'value' => old(
|
||||
'gss',
|
||||
isset($forminspeksi['fakta']['gss']) ? $forminspeksi['fakta']['gss'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'Pelebaran Jalan',
|
||||
'name' => 'pelebaran_jalan',
|
||||
'index' => 7,
|
||||
'value' => old(
|
||||
'pelebaran_jalan',
|
||||
isset($forminspeksi['fakta']['pelebaran_jalan'])
|
||||
? $forminspeksi['fakta']['pelebaran_jalan']
|
||||
: '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'Nama Petugas TK',
|
||||
'name' => 'nama_petugas',
|
||||
'index' => 8,
|
||||
'value' => old(
|
||||
'nama_petugas',
|
||||
isset($forminspeksi['fakta']['nama_petugas'])
|
||||
? $forminspeksi['fakta']['nama_petugas']
|
||||
: '',
|
||||
),
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
<!-- Informasi Tata Ruang -->
|
||||
<div class="card border border-agi-100 w-full ">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h3 class="card-title uppercase">
|
||||
Informasi Dinas Tata Ruang
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- Informasi Tata Ruang Form -->
|
||||
<div class="grid gap-5">
|
||||
@php
|
||||
$inputDinasTata = [
|
||||
[
|
||||
'label' => 'Peruntukan',
|
||||
'name' => 'peruntukan',
|
||||
'index' => 0,
|
||||
'value' => old(
|
||||
'peruntukan',
|
||||
isset($forminspeksi['fakta']['peruntukan']) ? $forminspeksi['fakta']['peruntukan'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'KDB',
|
||||
'name' => 'kdb',
|
||||
'index' => 1,
|
||||
'value' => old(
|
||||
'kdb',
|
||||
isset($forminspeksi['fakta']['kdb']) ? $forminspeksi['fakta']['kdb'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'KDH',
|
||||
'name' => 'kdh',
|
||||
'index' => 2,
|
||||
'value' => old(
|
||||
'kdh',
|
||||
isset($forminspeksi['fakta']['kdh']) ? $forminspeksi['fakta']['kdh'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'GSB',
|
||||
'name' => 'gsb',
|
||||
'index' => 3,
|
||||
'value' => old(
|
||||
'gsb',
|
||||
isset($forminspeksi['fakta']['gsb']) ? $forminspeksi['fakta']['gsb'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'Max Lantai',
|
||||
'name' => 'max_lantai',
|
||||
'index' => 4,
|
||||
'value' => old(
|
||||
'max_lantai',
|
||||
isset($forminspeksi['fakta']['max_lantai']) ? $forminspeksi['fakta']['max_lantai'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'KLB',
|
||||
'name' => 'klb',
|
||||
'index' => 5,
|
||||
'value' => old(
|
||||
'klb',
|
||||
isset($forminspeksi['fakta']['klb']) ? $forminspeksi['fakta']['klb'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'GSS',
|
||||
'name' => 'gss',
|
||||
'index' => 6,
|
||||
'value' => old(
|
||||
'gss',
|
||||
isset($forminspeksi['fakta']['gss']) ? $forminspeksi['fakta']['gss'] : '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'Pelebaran Jalan',
|
||||
'name' => 'pelebaran_jalan',
|
||||
'index' => 7,
|
||||
'value' => old(
|
||||
'pelebaran_jalan',
|
||||
isset($forminspeksi['fakta']['pelebaran_jalan'])
|
||||
? $forminspeksi['fakta']['pelebaran_jalan']
|
||||
: '',
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'Nama Petugas TK',
|
||||
'name' => 'nama_petugas',
|
||||
'index' => 8,
|
||||
'value' => old(
|
||||
'nama_petugas',
|
||||
isset($forminspeksi['fakta']['nama_petugas'])
|
||||
? $forminspeksi['fakta']['nama_petugas']
|
||||
: '',
|
||||
),
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
|
||||
@if (count($inputDinasTata) > 0)
|
||||
@foreach ($inputDinasTata 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>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" name="{{ $item['name'] }}" class="input"
|
||||
@if (count($inputDinasTata) > 0)
|
||||
@foreach ($inputDinasTata 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>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" name="{{ $item['name'] }}" class="input"
|
||||
placeholder="Masukkan {{ $item['label'] }}" value="{{ $item['value'] }}">
|
||||
@error($item['name'])
|
||||
<em class="alert text-danger text-sm"></em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@error($item['name'])
|
||||
<em class="alert text-danger text-sm"></em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">Gistaru</span>
|
||||
</label>
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input class="name_rute" type="hidden" name="name_rute" value="rute">
|
||||
<div class="w-full">
|
||||
<input id="inputGistaru" type="file" name="foto_gistaru"
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<span class="form-label">Gistaru</span>
|
||||
</label>
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input class="name_rute" type="hidden" name="name_rute" value="rute">
|
||||
<div class="w-full">
|
||||
<input id="inputGistaru" type="file" name="foto_gistaru"
|
||||
class="file-input file-input-bordered w-full"
|
||||
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
|
||||
onchange="previewImage(this, 'gistaru-preview')">
|
||||
|
||||
<img id="gistaru-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_gistaru']) ? $forminspeksi['foto_gistaru'] : '')) }}"
|
||||
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_gistaru']) ? '' : 'display: none;' }} max-width: 30rem;" />
|
||||
<img id="gistaru-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_gistaru']) ? $forminspeksi['foto_gistaru'] : '')) }}"
|
||||
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_gistaru']) ? '' : 'display: none;' }} max-width: 30rem;"/>
|
||||
|
||||
|
||||
</div>
|
||||
<a href="https://gistaru.atrbpn.go.id/rtronline" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
<i class="ki-filled ki-map"></i> Gistaru
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="https://gistaru.atrbpn.go.id/rtronline" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
<i class="ki-filled ki-map"></i> Gistaru
|
||||
</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 ">Bhumi</span>
|
||||
</label>
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input class="name_rute" type="hidden" name="name_rute" value="rute">
|
||||
<div class="w-full grid gap-2">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
<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">
|
||||
<div class="w-full grid gap-2">
|
||||
|
||||
|
||||
<input id="inputBhumi" type="file" name="foto_bhumi"
|
||||
<input id="inputBhumi" type="file" name="foto_bhumi"
|
||||
class="file-input file-input-bordered w-full "
|
||||
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
|
||||
onchange="previewImage(this, 'bhumi-preview')">
|
||||
<img id="bhumi-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_bhumi']) ? $forminspeksi['foto_bhumi'] : '')) }}"
|
||||
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_bhumi']) ? ' ' : 'display: none;' }} max-width: 30rem;" />
|
||||
</div>
|
||||
<a href="https://bhumi.atrbpn.go.id/peta" type="button" class="btn btn-light" target="_blank">
|
||||
<i class="ki-filled ki-map"></i> Bhumi
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<img id="bhumi-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_bhumi']) ? $forminspeksi['foto_bhumi'] : '')) }}"
|
||||
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_bhumi']) ? ' ' : 'display: none;' }} max-width: 30rem;"/>
|
||||
</div>
|
||||
<a href="https://bhumi.atrbpn.go.id/peta" type="button" class="btn btn-light" target="_blank">
|
||||
<i class="ki-filled ki-map"></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">
|
||||
<div class="w-full">
|
||||
<input id="inputArgisRegion" type="file" name="foto_argis_region"
|
||||
@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">
|
||||
<div class="w-full">
|
||||
<input id="inputArgisRegion" type="file" name="foto_argis_region"
|
||||
class="file-input file-input-bordered w-full"
|
||||
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
|
||||
onchange="previewImage(this, 'argis-region-preview')">
|
||||
<img id="argis-region-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_argis_region']) ? $forminspeksi['foto_argis_region'] : '')) }}"
|
||||
alt="Foto Argis Region" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_argis_region']) ? '' : 'display: none;' }} max-width: 30rem;">
|
||||
</div>
|
||||
<a href="{{ $link_url_region->regions->url }}" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
<i class="ki-filled ki-map"></i>
|
||||
{{ $link_url_region->regions->name_url }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<!-- Upload Photo Button -->
|
||||
<img id="argis-region-preview"
|
||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_argis_region']) ? $forminspeksi['foto_argis_region'] : '')) }}"
|
||||
alt="Foto Argis Region" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_argis_region']) ? '' : 'display: none;' }} max-width: 30rem;">
|
||||
</div>
|
||||
<a href="{{ $link_url_region->regions->url }}" type="button" class="btn btn-light"
|
||||
target="_blank">
|
||||
<i class="ki-filled ki-map"></i>
|
||||
{{ $link_url_region->regions->name_url }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<!-- Upload Photo Button -->
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
|
||||
<label for="" class="form-label max-w-56 text-sm font-medium text-gray-700">Upload Peta</label>
|
||||
<div class="w-full grid gap-5">
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input id="foto_tempat" type="file" name="foto_tempat"
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
|
||||
<label for="" class="form-label max-w-56 text-sm font-medium text-gray-700">Upload Peta</label>
|
||||
<div class="w-full grid gap-5">
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input id="foto_tempat" type="file" name="foto_tempat"
|
||||
class="file-input file-input-bordered w-full"
|
||||
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
|
||||
onchange="previewImage(this, 'foto_tempat-preview')">
|
||||
<button type="button" id="btnCamera" class="btn btn-light" data-modal-toggle="#cameraModal">
|
||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" id="btnCamera" class="btn btn-light" data-modal-toggle="#cameraModal">
|
||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<img id="foto_tempat-preview"
|
||||
src="{{ isset($forminspeksi['foto_tempat']) ? asset('storage/' . (is_array($forminspeksi['foto_tempat']) ? $forminspeksi['foto_tempat'][0] : $forminspeksi['foto_tempat'])) : '' }}"
|
||||
alt="Foto Tempat" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_tempat']) ? '' : 'display: none;' }} max-width: 30rem;">
|
||||
@if($forminspeksi)
|
||||
@if(is_array($forminspeksi['foto_tempat']))
|
||||
@if(count($forminspeksi['foto_tempat']) > 0)
|
||||
<img id="foto_tempat-preview"
|
||||
src="{{ isset($forminspeksi['foto_tempat']) ? asset('storage/' . (is_array($forminspeksi['foto_tempat']) ? $forminspeksi['foto_tempat'][0] : $forminspeksi['foto_tempat'])) : '' }}"
|
||||
alt="Foto Tempat" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_tempat']) ? '' : 'display: none;' }} max-width: 30rem;">
|
||||
@endif
|
||||
@else
|
||||
<img id="foto_tempat-preview"
|
||||
src="{{ asset('storage/'. (isset($forminspeksi['foto_tempat'])? $forminspeksi['foto_tempat'] : '')) }}"
|
||||
alt="Foto Tempat" class="mt-2 max-w-full h-auto"
|
||||
style="{{ isset($forminspeksi['foto_tempat']) ? '' : 'display: none;' }} max-width: 30rem;">
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Notes Section -->
|
||||
|
||||
<!-- Notes Section -->
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
|
||||
<label class="form-label lg:form-label max-w-56 ">Catatan yang Perlu Diperhatikan
|
||||
</label>
|
||||
<div class="w-full">
|
||||
<div id="keterangan-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
|
||||
@if (!empty($forminspeksi['fakta']['keterangan']) && is_array($forminspeksi['fakta']['keterangan']))
|
||||
@foreach ($forminspeksi['fakta']['keterangan'] as $index => $item)
|
||||
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old("keterangan.$index", $item) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3"></textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-keterangan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<button type="button" onclick="addClonableItem('keterangan-container', 'keterangan')"
|
||||
class="btn btn-primary btn-sm mt-5 ">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="form-label lg:form-label max-w-56 ">Catatan yang Perlu Diperhatikan
|
||||
</label>
|
||||
<div class="w-full">
|
||||
<div id="keterangan-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
|
||||
@if (!empty($forminspeksi['fakta']['keterangan']) && is_array($forminspeksi['fakta']['keterangan']))
|
||||
@foreach ($forminspeksi['fakta']['keterangan'] as $index => $item)
|
||||
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old("keterangan.$index", $item) }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea name="keterangan[]" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3"></textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-keterangan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<button type="button" onclick="addClonableItem('keterangan-container', 'keterangan')"
|
||||
class="btn btn-primary btn-sm mt-5 ">
|
||||
<i class="ki-outline ki-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('lpj::surveyor.components.modal-kamera')
|
||||
|
||||
@include('lpj::surveyor.components.modal-kamera')
|
||||
|
||||
@push('scripts')
|
||||
@include('lpj::surveyor.js.camera-editor')
|
||||
@endpush
|
||||
@push('scripts')
|
||||
@include('lpj::surveyor.js.camera-editor')
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user