update data pembading surveyor
This commit is contained in:
@@ -6,6 +6,7 @@ use Illuminate\Http\Request;
|
||||
use Modules\Lpj\Models\Permohonan;
|
||||
use Modules\Lpj\Models\Inspeksi;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class PenilaiController extends Controller
|
||||
{
|
||||
@@ -22,7 +23,8 @@ class PenilaiController extends Controller
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function lampiran($id){
|
||||
public function lampiran($id)
|
||||
{
|
||||
$permohonan = Permohonan::with('debiture.documents')->find($id);
|
||||
|
||||
$jaminanId = $permohonan->debiture->documents->first()->jenis_jaminan_id;
|
||||
@@ -36,7 +38,7 @@ class PenilaiController extends Controller
|
||||
|
||||
|
||||
return view('lpj::penilai.lampiran', compact('permohonan', 'formFoto'));
|
||||
}
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
@@ -87,67 +89,83 @@ class PenilaiController extends Controller
|
||||
}
|
||||
|
||||
public function dataForDatatables(Request $request)
|
||||
{
|
||||
if (is_null($this->user) || !$this->user->can('penilai.view')) {
|
||||
//abort(403, 'Sorry! You are not allowed to view users.');
|
||||
}
|
||||
|
||||
// Retrieve data from the database
|
||||
$query = Permohonan::query()->where('status', '=', 'done');
|
||||
|
||||
// Apply search filter if provided
|
||||
if ($request->has('search') && !empty($request->get('search'))) {
|
||||
$search = $request->get('search');
|
||||
$query->where(function ($q) use ($search) {
|
||||
$q->where('nomor_registrasi', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('debiture', 'name', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('branch', 'name', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('user', 'name', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('tujuanPenilaian', 'name', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('jenisfasilitasKredit', 'name', 'LIKE', '%' . $search . '%');
|
||||
});
|
||||
}
|
||||
|
||||
// Apply sorting if provided
|
||||
if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) {
|
||||
$order = $request->get('sortOrder');
|
||||
$column = $request->get('sortField');
|
||||
$query->orderBy($column, $order);
|
||||
}
|
||||
|
||||
// Get the total count of records
|
||||
$totalRecords = $query->count();
|
||||
|
||||
// Apply pagination if provided
|
||||
if ($request->has('page') && $request->has('size')) {
|
||||
$page = $request->get('page');
|
||||
$size = $request->get('size');
|
||||
$offset = ($page - 1) * $size; // Calculate the offset
|
||||
|
||||
$query->skip($offset)->take($size);
|
||||
}
|
||||
|
||||
// Get the filtered count of records
|
||||
$filteredRecords = $query->count();
|
||||
|
||||
// Get the data for the current page
|
||||
$data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian', 'jenisfasilitasKredit'])->get();
|
||||
|
||||
// Calculate the page count
|
||||
$pageCount = ceil($totalRecords / $request->get('size'));
|
||||
|
||||
// Calculate the current page number
|
||||
$currentPage = 0 + 1;
|
||||
|
||||
// Return the response data as a JSON object
|
||||
return response()->json([
|
||||
'draw' => $request->get('draw'),
|
||||
'recordsTotal' => $totalRecords,
|
||||
'recordsFiltered' => $filteredRecords,
|
||||
'pageCount' => $pageCount,
|
||||
'page' => $currentPage,
|
||||
'totalCount' => $totalRecords,
|
||||
'data' => $data,
|
||||
]);
|
||||
{
|
||||
if (is_null($this->user) || !$this->user->can('penilai.view')) {
|
||||
//abort(403, 'Sorry! You are not allowed to view users.');
|
||||
}
|
||||
|
||||
// Retrieve data from the database
|
||||
$query = Permohonan::query();
|
||||
|
||||
// Apply search filter if provided
|
||||
if ($request->has('search') && !empty($request->get('search'))) {
|
||||
$search = $request->get('search');
|
||||
$columns = ['nomor_registrasi', 'debiture.name', 'branch.name', 'user.name', 'tujuanPenilaian.name', 'jenisfasilitasKredit.name'];
|
||||
|
||||
$query->where(function ($q) use ($search, $columns) {
|
||||
foreach ($columns as $column) {
|
||||
$q->orWhereRelation(explode('.', $column)[0], explode('.', $column)[1], 'LIKE', '%' . $search . '%');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Apply whereHas to check penilai_id, role, and user_id specifically for 'penilai' role
|
||||
$query->whereHas('penilaian.userPenilai', function ($q) {
|
||||
$q->where('role', 'penilai') // Ensure the role is 'penilai'
|
||||
->where('user_id', 12); // Ganti dengan Auth::user()->id jika dinamis
|
||||
});
|
||||
|
||||
// Apply sorting if provided
|
||||
if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) {
|
||||
$order = $request->get('sortOrder');
|
||||
$column = $request->get('sortField');
|
||||
$query->orderBy($column, $order);
|
||||
}
|
||||
|
||||
// Get the total count of records
|
||||
$totalRecords = $query->count();
|
||||
|
||||
// Apply pagination if provided
|
||||
if ($request->has('page') && $request->has('size')) {
|
||||
$page = $request->get('page');
|
||||
$size = $request->get('size');
|
||||
$offset = ($page - 1) * $size;
|
||||
|
||||
$query->skip($offset)->take($size);
|
||||
}
|
||||
|
||||
// Get the filtered count of records
|
||||
$filteredRecords = $query->count();
|
||||
|
||||
// Get the data for the current page
|
||||
$data = $query->with([
|
||||
'user',
|
||||
'debiture',
|
||||
'branch',
|
||||
'tujuanPenilaian',
|
||||
'jenisfasilitasKredit',
|
||||
'penilaian.userPenilai' // Ensure this relation is included
|
||||
])->get();
|
||||
|
||||
// Calculate the page count
|
||||
$pageCount = ceil($totalRecords / $request->get('size'));
|
||||
|
||||
// Calculate the current page number
|
||||
$currentPage = $request->get('page', 1);
|
||||
|
||||
// Return the response data as a JSON object
|
||||
return response()->json([
|
||||
'draw' => $request->get('draw'),
|
||||
'recordsTotal' => $totalRecords,
|
||||
'recordsFiltered' => $filteredRecords,
|
||||
'pageCount' => $pageCount,
|
||||
'page' => $currentPage,
|
||||
'totalCount' => $totalRecords,
|
||||
'data' => $data,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Modules\Lpj\Http\Controllers;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Modules\Lpj\Exports\BasicDataSurveyorExport;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -97,12 +98,12 @@ class SurveyorController extends Controller
|
||||
'penilaian',
|
||||
'documents.jenisJaminan',
|
||||
])->findOrFail($id);
|
||||
|
||||
|
||||
$surveyor = $id;
|
||||
$branches = Branch::all();
|
||||
$provinces = Province::all();
|
||||
$bentukTanah = BentukTanah::all();
|
||||
|
||||
|
||||
// Get all inspeksi data for this permohonan
|
||||
$inspeksiData = Inspeksi::where('permohonan_id', $id)
|
||||
->get()
|
||||
@@ -115,7 +116,8 @@ class SurveyorController extends Controller
|
||||
'data_pembanding' => json_decode($item->data_pembanding, true),
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
|
||||
return view('lpj::surveyor.detail', compact(
|
||||
'permohonan',
|
||||
'surveyor',
|
||||
@@ -125,7 +127,7 @@ class SurveyorController extends Controller
|
||||
'inspeksiData'
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Store form inspeksi.
|
||||
*/
|
||||
@@ -134,10 +136,10 @@ class SurveyorController extends Controller
|
||||
try {
|
||||
// Validate request data
|
||||
$validatedData = $request->validated();
|
||||
|
||||
|
||||
// Get action specific rules and process data
|
||||
$processedData = $this->getActionSpecificRules(
|
||||
$validatedData,
|
||||
$validatedData,
|
||||
$request->input('type'),
|
||||
$request
|
||||
);
|
||||
@@ -264,19 +266,19 @@ class SurveyorController extends Controller
|
||||
'foto_lantai_lainnya' => ['foto_lantai_lainnya', 'name_lantai_lainnya'],
|
||||
'foto_rute_lainnya' => ['foto_rute_lainnya', 'name_rute_lainnya'],
|
||||
];
|
||||
|
||||
|
||||
$inspeksi = Inspeksi::firstOrNew([
|
||||
'permohonan_id' => $request->input('permohonan_id'),
|
||||
'jenis_jaminan_id' => $request->input('jenis_jaminan_id')
|
||||
]);
|
||||
|
||||
|
||||
// Get existing foto_form data if it exists
|
||||
$existingData = $inspeksi->exists && $inspeksi->foto_form
|
||||
? json_decode($inspeksi->foto_form, true)
|
||||
$existingData = $inspeksi->exists && $inspeksi->foto_form
|
||||
? json_decode($inspeksi->foto_form, true)
|
||||
: [];
|
||||
|
||||
|
||||
$formatFotojson = $existingData; // Start with existing data
|
||||
|
||||
|
||||
// Process each photo category
|
||||
foreach ($photoCategories as $category => $fields) {
|
||||
// Only update if new files are provided
|
||||
@@ -288,7 +290,7 @@ class SurveyorController extends Controller
|
||||
$formatFotojson[$category] = $this->processPhotoCategory($request, $fields);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Process single files
|
||||
$singleFiles = ['foto_basement', 'foto_gerbang', 'pendamping'];
|
||||
foreach ($singleFiles as $file) {
|
||||
@@ -300,7 +302,7 @@ class SurveyorController extends Controller
|
||||
$formatFotojson[$file] = $this->uploadFile($request->file($file), $file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update record
|
||||
$inspeksi->foto_form = json_encode($formatFotojson);
|
||||
$inspeksi->save();
|
||||
@@ -340,34 +342,34 @@ class SurveyorController extends Controller
|
||||
}
|
||||
|
||||
private function categoryHasNewFiles(Request $request, array $fields): bool
|
||||
{
|
||||
$photoField = $fields[0]; // First element is usually the photo field
|
||||
return $request->hasFile($photoField) ||
|
||||
(is_array($request->file($photoField)) && count($request->file($photoField)) > 0);
|
||||
}
|
||||
|
||||
private function deleteFilesForCategory($categoryData)
|
||||
{
|
||||
if (!is_array($categoryData)) {
|
||||
return;
|
||||
{
|
||||
$photoField = $fields[0]; // First element is usually the photo field
|
||||
return $request->hasFile($photoField) ||
|
||||
(is_array($request->file($photoField)) && count($request->file($photoField)) > 0);
|
||||
}
|
||||
|
||||
foreach ($categoryData as $item) {
|
||||
if (isset($item['foto'])) {
|
||||
$this->deleteOfFile($item['foto']);
|
||||
private function deleteFilesForCategory($categoryData)
|
||||
{
|
||||
if (!is_array($categoryData)) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($categoryData as $item) {
|
||||
if (isset($item['foto'])) {
|
||||
$this->deleteOfFile($item['foto']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function deleteOfFile($filePath)
|
||||
{
|
||||
if ($filePath && Storage::exists($filePath)) {
|
||||
Storage::delete($filePath);
|
||||
private function deleteOfFile($filePath)
|
||||
{
|
||||
if ($filePath && Storage::exists($filePath)) {
|
||||
Storage::delete($filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Custom validation request for foto
|
||||
@@ -377,7 +379,7 @@ private function deleteOfFile($filePath)
|
||||
return $request->validate([
|
||||
'permohonan_id' => 'required',
|
||||
'jenis_jaminan_id' => 'required',
|
||||
'pendamping' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
|
||||
'pendamping' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
|
||||
'foto_objek.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
|
||||
'name_objek.*' => 'required|string|max:255',
|
||||
'foto_lingkungan.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
|
||||
@@ -399,40 +401,40 @@ private function deleteOfFile($filePath)
|
||||
}
|
||||
|
||||
public function submitSurveyor($id)
|
||||
{
|
||||
try {
|
||||
// Get button status check result
|
||||
$buttonStatusCheck = $this->checkButtonStatus($id);
|
||||
$buttonStatus = json_decode($buttonStatusCheck->getContent(), true);
|
||||
{
|
||||
try {
|
||||
// Get button status check result
|
||||
$buttonStatusCheck = $this->checkButtonStatus($id);
|
||||
$buttonStatus = json_decode($buttonStatusCheck->getContent(), true);
|
||||
|
||||
// Check if button should be disabled
|
||||
if ($buttonStatus['buttonDisable']) {
|
||||
// Check if button should be disabled
|
||||
if ($buttonStatus['buttonDisable']) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Form belum lengkap. Pastikan semua data telah diisi dengan benar.',
|
||||
], 422);
|
||||
}
|
||||
|
||||
// If validation passes, update permohonan status
|
||||
// $permohonan = Permohonan::findOrFail($id);
|
||||
// $permohonan->update([
|
||||
// 'status' => 'done',
|
||||
// 'submitted_at' => now()
|
||||
// ]);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Form surveyor berhasil disubmit'
|
||||
], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Form belum lengkap. Pastikan semua data telah diisi dengan benar.',
|
||||
], 422);
|
||||
'message' => 'Terjadi kesalahan',
|
||||
'error' => $e->getMessage()
|
||||
], 500);
|
||||
}
|
||||
|
||||
// If validation passes, update permohonan status
|
||||
// $permohonan = Permohonan::findOrFail($id);
|
||||
// $permohonan->update([
|
||||
// 'status' => 'done',
|
||||
// 'submitted_at' => now()
|
||||
// ]);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Form surveyor berhasil disubmit'
|
||||
], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Terjadi kesalahan',
|
||||
'error' => $e->getMessage()
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -442,41 +444,41 @@ private function deleteOfFile($filePath)
|
||||
try {
|
||||
// Get all inspeksi records for this permohonan
|
||||
$inspeksiRecords = Inspeksi::where('permohonan_id', $id)->get();
|
||||
|
||||
|
||||
if ($inspeksiRecords->isEmpty()) {
|
||||
return response()->json(['buttonDisable' => true]);
|
||||
}
|
||||
|
||||
|
||||
foreach ($inspeksiRecords as $inspeksi) {
|
||||
$dataForm = json_decode($inspeksi->data_form, true);
|
||||
$fotoForm = json_decode($inspeksi->foto_form, true);
|
||||
$denahForm = json_decode($inspeksi->denah_form, true);
|
||||
$dataPembanding = json_decode($inspeksi->data_pembanding, true);
|
||||
|
||||
|
||||
// Get jenis jaminan to check if it needs denah
|
||||
$jenisJaminan = JenisJaminan::find($inspeksi->jenis_jaminan_id);
|
||||
$isTanahBangunan = !in_array(
|
||||
strtoupper($jenisJaminan->name ?? ''),
|
||||
strtoupper($jenisJaminan->name ?? ''),
|
||||
['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT']
|
||||
);
|
||||
|
||||
|
||||
// Check if required forms are empty or incomplete
|
||||
if (empty($dataForm) || empty($fotoForm)) {
|
||||
return response()->json(['buttonDisable' => true]);
|
||||
}
|
||||
|
||||
|
||||
if ($isTanahBangunan && empty($denahForm)) {
|
||||
return response()->json(['buttonDisable' => true]);
|
||||
}
|
||||
|
||||
|
||||
if (empty($dataPembanding)) {
|
||||
return response()->json(['buttonDisable' => true]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If we get here, all checks passed
|
||||
return response()->json(['buttonDisable' => false]);
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'error' => 'Something went wrong',
|
||||
@@ -485,7 +487,7 @@ private function deleteOfFile($filePath)
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -548,41 +550,141 @@ private function deleteOfFile($filePath)
|
||||
}
|
||||
|
||||
|
||||
public function storeDataPembanding(Request $request)
|
||||
private function formatDataPembanding($request)
|
||||
{
|
||||
$data = $request->all();
|
||||
if (!$data) {
|
||||
return response()->json(['success' => false, 'message' => 'Invalid data'], 400);
|
||||
$dataPembanding = [];
|
||||
$pembandingCount = count($request->input('alamat_pembanding', []));
|
||||
|
||||
for ($i = 0; $i < $pembandingCount; $i++) {
|
||||
$pembanding = $this->formatSinglePembanding($request, $i);
|
||||
|
||||
// Perbaikan penanganan foto pembanding
|
||||
$fotoKey = "foto_objek_pembanding_{$i}"; // Sesuaikan dengan nama field di form
|
||||
if ($request->hasFile($fotoKey)) {
|
||||
$pembanding['foto_objek'] = $this->handleFileUpload(
|
||||
$request->file($fotoKey),
|
||||
'pembanding',
|
||||
"pembanding_{$i}"
|
||||
);
|
||||
}
|
||||
|
||||
$dataPembanding[] = $pembanding;
|
||||
}
|
||||
|
||||
return $dataPembanding;
|
||||
}
|
||||
|
||||
private function handleFileUpload($file, $folder, $prefix)
|
||||
{
|
||||
if (!$file) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
// Buat nama file yang unik
|
||||
$extension = $file->getClientOriginalExtension();
|
||||
$fileName = $prefix . '_' . time() . '_' . uniqid() . '.' . $extension;
|
||||
|
||||
// Pastikan folder exists
|
||||
$path = storage_path("app/public/{$folder}");
|
||||
if (!File::exists($path)) {
|
||||
File::makeDirectory($path, 0777, true);
|
||||
}
|
||||
|
||||
// Simpan file
|
||||
$file->storeAs("public/{$folder}", $fileName);
|
||||
|
||||
// Log untuk debugging
|
||||
\Log::info("File berhasil disimpan: {$folder}/{$fileName}");
|
||||
|
||||
return $fileName;
|
||||
} catch (\Exception $e) {
|
||||
\Log::error("Error saat upload file: " . $e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
private function formatSinglePembanding($request, $index)
|
||||
{
|
||||
$fields = [
|
||||
'alamat', 'desa', 'kecamatan', 'kabupaten', 'provinsi',
|
||||
'tahun', 'luas_tanah', 'luas_bangunan', 'tahun_bangunan',
|
||||
'status_nara_sumber', 'harga', 'nama_nara_sumber',
|
||||
'peruntukan', 'penawaran_transaksi', 'nomor_tlp',
|
||||
'kordinat_lat', 'kordinat_lng', 'jenis_aset',
|
||||
];
|
||||
|
||||
$pembanding = [];
|
||||
foreach ($fields as $field) {
|
||||
$inputName = "{$field}_pembanding";
|
||||
$pembanding[$field] = $request->input($inputName)[$index] ?? null;
|
||||
}
|
||||
|
||||
// Inisialisasi foto_objek sebagai null
|
||||
$pembanding['foto_objek'] = null;
|
||||
|
||||
return $pembanding;
|
||||
}
|
||||
|
||||
public function storeDataPembanding(Request $request)
|
||||
{
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
// $action = $request->input('type');
|
||||
// $rules = $this->getActionSpecificRules($data, $action, $request);
|
||||
$validator = $request->validate([
|
||||
'permohonan_id' => 'required|exists:permohonan,id',
|
||||
'type' => 'required|string',
|
||||
'jenis_jaminan_id' => 'required',
|
||||
'foto_objek' => 'nullable|image|max:2048',
|
||||
'foto_objek_pembanding_*' => 'nullable|image|max:2048',
|
||||
]);
|
||||
|
||||
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))->where('jenis_jaminan_id', $request->input('jenis_jaminan_id'))->first();
|
||||
|
||||
if (!$inspeksi) {
|
||||
Inspeksi::create([
|
||||
'permohonan_id' => $request->input('permohonan_id'),
|
||||
'data_pembanding' => json_encode($data),
|
||||
'name' => $request->input('type'),
|
||||
'jenis_jaminan_id' => $request->input('jenis_jaminan_id'),
|
||||
]);
|
||||
} else {
|
||||
$inspeksi->update(['data_pembanding' => json_encode($data)]);
|
||||
if ($validator->fails()) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Validasi gagal',
|
||||
'errors' => $validator->errors()
|
||||
], 422);
|
||||
}
|
||||
|
||||
$objekPenilaian = $this->formatObjekPenilaian($request);
|
||||
if ($request->hasFile('foto_objek')) {
|
||||
$objekPenilaian['foto_objek'] = $this->handleFileUpload(
|
||||
$request->file('foto_objek'),
|
||||
'pembanding',
|
||||
'objek_penilaian'
|
||||
);
|
||||
}
|
||||
|
||||
$formattedData = [
|
||||
'permohonan_id' => $request->input('permohonan_id'),
|
||||
'type' => $request->input('type'),
|
||||
'jenis_jaminan_id' => $request->input('jenis_jaminan_id'),
|
||||
'objek_penilaian' => $objekPenilaian,
|
||||
'data_pembanding' => $this->formatDataPembanding($request)
|
||||
];
|
||||
|
||||
$inspeksi = $this->saveInspeksi($formattedData);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json(['success' => true, 'message' => 'Data saved successfully', 'data' => json_encode($data)], 200);
|
||||
} catch (Exception $e) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Data berhasil disimpan',
|
||||
'data' => $formattedData
|
||||
], 200);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
return response()->json(['success' => false, 'message' => 'Failed to save data: ' . $e->getMessage()], 500);
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Gagal menyimpan data: ' . $e->getMessage()
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Form inspeksi.
|
||||
*/
|
||||
@@ -737,8 +839,9 @@ private function deleteOfFile($filePath)
|
||||
|
||||
public function dataPembanding($id, $jaminanId)
|
||||
{
|
||||
$permohonan = Permohonan::with(
|
||||
[
|
||||
try {
|
||||
// Ambil data permohonan dengan eager loading
|
||||
$permohonan = Permohonan::with([
|
||||
'user',
|
||||
'debiture.province',
|
||||
'debiture.city',
|
||||
@@ -747,28 +850,65 @@ private function deleteOfFile($filePath)
|
||||
'branch',
|
||||
'tujuanPenilaian',
|
||||
'penilaian'
|
||||
],
|
||||
)->findOrFail($id);
|
||||
$surveyor = $id;
|
||||
$branches = Branch::all();
|
||||
$provinces = Province::all();
|
||||
])->findOrFail($id);
|
||||
|
||||
$data = $this->getCommonData();
|
||||
// Ambil data inspeksi
|
||||
$inspeksi = Inspeksi::where([
|
||||
'permohonan_id' => $id,
|
||||
'jenis_jaminan_id' => $jaminanId
|
||||
])->first();
|
||||
|
||||
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||
$forminspeksi = null;
|
||||
if ($inpeksi) {
|
||||
$forminspeksi = $inpeksi;
|
||||
// $forminspeksi = json_decode($inpeksi->data_form, true);
|
||||
// Inisialisasi variabel
|
||||
$inspectionData = null;
|
||||
$comparisons = null;
|
||||
$fotoForm = null;
|
||||
|
||||
|
||||
if ($inspeksi) {
|
||||
|
||||
$inspectionData = json_decode($inspeksi->data_form, true);
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
throw new \Exception('Error decoding inspection data: ' . json_last_error_msg());
|
||||
}
|
||||
|
||||
if ($inspeksi->data_pembanding) {
|
||||
$comparisons = json_decode($inspeksi->data_pembanding, true);
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
throw new \Exception('Error decoding comparison data: ' . json_last_error_msg());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
$fotoForm = json_decode($inspeksi->foto_form, true);
|
||||
|
||||
}
|
||||
|
||||
// Ambil data pendukung
|
||||
$data = $this->getCommonData();
|
||||
$branches = Branch::all();
|
||||
$provinces = Province::all();
|
||||
|
||||
return view('lpj::surveyor.components.data-pembanding', compact(
|
||||
'permohonan',
|
||||
'id',
|
||||
'branches',
|
||||
'provinces',
|
||||
'inspectionData',
|
||||
'comparisons',
|
||||
'data',
|
||||
'jaminanId',
|
||||
'fotoForm'
|
||||
));
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', 'Terjadi kesalahan saat memuat data: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
// return response()->json($forminspeksi);
|
||||
return view('lpj::surveyor.components.data-pembanding', compact('permohonan', 'surveyor', 'branches', 'provinces', 'forminspeksi', 'data'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private function getHeader(string $type): array
|
||||
{
|
||||
return self::HEADERS[$type] ?? [];
|
||||
@@ -1338,14 +1478,14 @@ private function deleteOfFile($filePath)
|
||||
$data,
|
||||
'hub_cadeb',
|
||||
true
|
||||
)
|
||||
)
|
||||
],
|
||||
'hub_cadeb_penghuni' => [
|
||||
$data['hub_cadeb_penghuni'] => $this->getFieldData(
|
||||
$data,
|
||||
'hub_cadeb_penghuni',
|
||||
true
|
||||
)
|
||||
)
|
||||
],
|
||||
|
||||
'kordinat_lng' => $data['kordinat_lng'] ?? null,
|
||||
@@ -1407,23 +1547,23 @@ private function deleteOfFile($filePath)
|
||||
$data = $request->all();
|
||||
$result = [];
|
||||
|
||||
foreach ($data['nama_bagunan'] as $index => $bangunan) {
|
||||
$bangunanData = [
|
||||
'bangunan' => $bangunan,
|
||||
'kategori' => []
|
||||
];
|
||||
// foreach ($data['nama_bangunan'] as $index => $bangunan) {
|
||||
// $bangunanData = [
|
||||
// 'bangunan' => $bangunan,
|
||||
// 'kategori' => []
|
||||
// ];
|
||||
|
||||
foreach ($data['spek_kategori_bangunan'] as $kategoriIndex => $kategori) {
|
||||
if (isset($data['spek_bangunan'][$kategori])) {
|
||||
$bangunanData['kategori'][] = [
|
||||
'kategori' => $kategori,
|
||||
'spesifikasi' => $data['spek_bangunan'][$kategori]
|
||||
];
|
||||
}
|
||||
}
|
||||
// foreach ($data['spek_kategori_bangunan'] as $kategoriIndex => $kategori) {
|
||||
// if (isset($data['spek_bangunan'][$kategori])) {
|
||||
// $bangunanData['kategori'][] = [
|
||||
// 'kategori' => $kategori,
|
||||
// 'spesifikasi' => $data['spek_bangunan'][$kategori]
|
||||
// ];
|
||||
// }
|
||||
// }
|
||||
|
||||
$result[] = $bangunanData;
|
||||
}
|
||||
// $result[] = $bangunanData;
|
||||
// }
|
||||
|
||||
return [
|
||||
'bangunan' => [
|
||||
@@ -1459,7 +1599,10 @@ private function deleteOfFile($filePath)
|
||||
'gol_mas_sekitar' => $data['gol_mas_sekitar'] ?? null,
|
||||
'tingkat_keramaian' => $data['tingkat_keramaian'] ?? null,
|
||||
'terletak_diarea' => $data['terletak_diarea'] ?? null,
|
||||
'disekitar_lokasi' => $data['disekitar_lokasi'] ?? null,
|
||||
'disekitar_lokasi' => $data['disekitar_lokasi'] === 'yes' ? [
|
||||
'kondisi' => $data['kondisi_bagunan_disekitar_lokasi'] ?? null,
|
||||
'sifat' => $data['sifat_bagunan_disekitar_lokasi'] ?? null,
|
||||
] : $data['disekitar_lokasi'],
|
||||
'kondisi_bangunan_sekitar' => $data['kondisi_bangunan_sekitar'] ?? null,
|
||||
'sifat_bangunan_sekitar' => $data['sifat_bangunan_sekitar'] ?? null,
|
||||
'dekat_makam' => $data['dekat_makam'] ?? null,
|
||||
@@ -1917,7 +2060,6 @@ private function deleteOfFile($filePath)
|
||||
'luas_unit',
|
||||
true
|
||||
),
|
||||
'jenis_unit' => $data['jenis_unit'] ?? null,
|
||||
'kondisi_unit' => $data['kondisi_unit'] ?? null,
|
||||
'posisi_unit' => $data['posisi_unit'] ?? null,
|
||||
'lantai' => $data['lantai'] ?? null,
|
||||
|
||||
@@ -104,7 +104,7 @@ class FormSurveyorRequest extends FormRequest
|
||||
'kondisi_bangunan' => 'nullable',
|
||||
'sifat_bangunan' => 'required|array',
|
||||
'sifat_bangunan_input' => 'nullable|array',
|
||||
'nama_bagunan' => 'required',
|
||||
'nama_bagunan' => 'required|nullable',
|
||||
'spek_kategori_bangunan.*' => 'required',
|
||||
'spek_bangunan.*' => 'required',
|
||||
'sarana_pelengkap' => 'required',
|
||||
@@ -122,7 +122,6 @@ class FormSurveyorRequest extends FormRequest
|
||||
'luas_unit' => 'required',
|
||||
'luas_unit_sesuai' => 'nullable',
|
||||
'luas_unit_tidak_sesuai' => 'nullable',
|
||||
'jenis_unit' => 'required|array',
|
||||
'kondisi_unit' => 'required|array',
|
||||
'posisi_unit' => 'required|array',
|
||||
'lantai' => 'required|array',
|
||||
@@ -150,8 +149,8 @@ class FormSurveyorRequest extends FormRequest
|
||||
'tingkat_keramaian' => 'nullable',
|
||||
'terletak_diarea' => 'nullable',
|
||||
'disekitar_lokasi' => 'nullable',
|
||||
'kondisi_bangunan_sekitar' => 'nullable',
|
||||
'sifat_bangunan_sekitar' => 'nullable',
|
||||
'kondisi_bagunan_disekitar_lokasi' => 'nullable',
|
||||
'sifat_bagunan_disekitar_lokasi' => 'nullable',
|
||||
'dekat_makam' => 'nullable',
|
||||
'jarak_makam' => 'nullable',
|
||||
'nama_makam' => 'nullable',
|
||||
@@ -521,7 +520,7 @@ class FormSurveyorRequest extends FormRequest
|
||||
'jenis_asset_tidak_sesuai' => 'nullable',
|
||||
'alamat_sesuai' => 'required',
|
||||
'alamat_tidak_sesuai' => 'nullable',
|
||||
|
||||
|
||||
'hub_cadeb' => 'required',
|
||||
'hub_cadeb_sesuai' => 'nullable',
|
||||
'hub_cadeb_tidak_sesuai' => 'nullable',
|
||||
|
||||
@@ -14,7 +14,7 @@ class Inspeksi extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = ['data_form', 'foto_form', 'denah_form','permohonan_id', 'name', 'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_by', 'updated_by', 'deleted_by','jenis_jaminan_id'];
|
||||
protected $fillable = ['data_form', 'foto_form', 'denah_form','permohonan_id', 'name', 'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_by', 'updated_by', 'deleted_by','jenis_jaminan_id','data_pembanding'];
|
||||
|
||||
public function permohonan()
|
||||
{
|
||||
|
||||
@@ -23,4 +23,8 @@ class Regions extends Model
|
||||
public function teams(){
|
||||
return $this->hasMany(Teams::class, 'regions_id', 'id');
|
||||
}
|
||||
|
||||
public function penilaiTeam(){
|
||||
return $this->hasMany(PenilaianTeam::class, 'team_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,13 +51,12 @@
|
||||
@php
|
||||
|
||||
$sortedTeamsActivity = $teamsActivity->sortBy(function ($item) {
|
||||
return $item->team->penilaianTeam
|
||||
->filter(function ($penilaianTeam) use ($item) {
|
||||
return $penilaianTeam->user_id == $item->user->id;
|
||||
return $item->team->regions->penilaiTeam
|
||||
->filter(function ($penilaiTeam) use ($item) {
|
||||
return $penilaiTeam->user_id == $item->user->id;
|
||||
})
|
||||
->count();
|
||||
});
|
||||
|
||||
@endphp
|
||||
|
||||
@foreach ($sortedTeamsActivity as $index => $item)
|
||||
@@ -75,9 +74,9 @@
|
||||
<th class="min-w-[150px]">
|
||||
<span class="text-base text-gray-900 font-normal">
|
||||
@php
|
||||
$totalTasks = $item->team->penilaianTeam
|
||||
->filter(function ($penilaianTeam) use ($item) {
|
||||
return $penilaianTeam->user_id == $item->user->id;
|
||||
$totalTasks = $item->team->regions->penilaiTeam
|
||||
->filter(function ($penilaiTeam) use ($item) {
|
||||
return $penilaiTeam->user_id == $item->user->id;
|
||||
})
|
||||
->count();
|
||||
@endphp
|
||||
@@ -208,7 +207,7 @@
|
||||
tanggal_kunjungan: {
|
||||
title: 'Tgl Kunjungan',
|
||||
render: (item, data) =>
|
||||
`${formatDateFromISO(data.tanggal_kunjungan) || ''}`,
|
||||
`${formatDateFromISO(data.waktu_penilaian) || ''}`,
|
||||
},
|
||||
progress: {
|
||||
title: 'Progress',
|
||||
@@ -222,6 +221,7 @@
|
||||
return `${mulai.getDate()}-${mulai.getMonth() + 1}-${mulai.getFullYear()} - ${selesai.getDate()}-${selesai.getMonth() + 1}-${selesai.getFullYear()}`
|
||||
},
|
||||
},
|
||||
|
||||
paparan: {
|
||||
title: 'Paparan',
|
||||
render: (item, data) => `${data.paparan || ''}`,
|
||||
|
||||
@@ -8,47 +8,52 @@
|
||||
<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
|
||||
$luas = $item->detail;
|
||||
$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
|
||||
@if (isset($permohonan->debiture->documents))
|
||||
@foreach ($permohonan->debiture->documents as $item)
|
||||
@php
|
||||
$luas = $item->detail;
|
||||
$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">
|
||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||
<input type="radio"
|
||||
onclick="toggleFieldVisibility('luas_tanah_bagunan', 'luas_tanah_bagunan_tidak_sesuai', ['tidak sesuai'])"
|
||||
class="radio" name="luas_tanah_bagunan" value="sesuai"
|
||||
{{ old('luas_tanah_bagunan', $forminspeksi['bangunan']['luas_tanah_bagunan'] ?? '') == '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_bagunan"
|
||||
onclick="toggleFieldVisibility('luas_tanah_bagunan', 'luas_tanah_bagunan_tidak_sesuai', ['tidak sesuai'])"
|
||||
value="tidak sesuai"
|
||||
{{ old('luas_tanah_bagunan', $forminspeksi['bangunan']['luas_tanah_bagunan'] ?? '') == 'tidak sesuai' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak Sesuai</span>
|
||||
</label>
|
||||
@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 type="radio"
|
||||
onclick="toggleFieldVisibility('luas_tanah_bagunan', 'luas_tanah_bagunan_tidak_sesuai', ['tidak sesuai'])"
|
||||
class="radio" name="luas_tanah_bagunan" value="sesuai"
|
||||
{{ old('luas_tanah_bagunan', isset($forminspeksi['bangunan']['luas_tanah_bagunan']['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_bagunan"
|
||||
onclick="toggleFieldVisibility('luas_tanah_bagunan', 'luas_tanah_bagunan_tidak_sesuai', ['tidak sesuai'])"
|
||||
value="tidak sesuai"
|
||||
{{ old('luas_tanah_bagunan', isset($forminspeksi['bangunan']['luas_tanah_bagunan']['tidak sesuai'])) ? 'checked' : '' }}>
|
||||
<span class="ml-2">Tidak Sesuai</span>
|
||||
</label>
|
||||
|
||||
<div id="luas_tanah_bagunan_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ isset($forminspeksi['bangunan']['luas_tanah_bagunan']['tidak_sesuai']) ? '' : 'display: none;' }}">
|
||||
<input type="text" id="analisa_bangunan_tidak_sesuai"
|
||||
name="luas_tanah_bagunan_tidak_sesuai" class="input w-full"
|
||||
placeholder="Masukan Luas Bangunan Tidak Sesuai..."
|
||||
value="{{ old('luas_tanah_bagunan_tidak_sesuai', $forminspeksi['bangunan']['luas_tanah_bagunan']['tidak_sesuai'] ?? '') }}">
|
||||
<button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('analisa_bangunan')">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="luas_tanah_bagunan_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ old('luas_tanah_bagunan_bagunan', $forminspeksi['bangunan']['luas_tanah_bagunan_bagunan'] ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}">
|
||||
<input type="text"id="analisa_bangunan_tidak_sesuai" name="luas_tanah_bagunan_tidak_sesuai" class="input w-full"
|
||||
placeholder="Masukan Luas Bangunan Tidak Sesuai..."
|
||||
value="{{ old('luas_tanah_bagunan_tidak_sesuai', $forminspeksi['bangunan']['luas_tanah_bagunan_tidak_sesuai'] ?? '') }}">
|
||||
<button type="button" class="btn btn-md btn-primary" onclick="updateAnalisa('analisa_bangunan')">Save</button>
|
||||
</div>
|
||||
<em id="error-luas_tanah_bagunan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
<em id="error-luas_tanah_bagunan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Jenis Bangunan -->
|
||||
@@ -62,15 +67,14 @@
|
||||
<input class="checkbox" name="jenis_bangunan[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ old('jenis_bangunan') == $item->name || isset($forminspeksi['bangunan']['jenis_bangunan']) == $item->name ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('jenis_bangunan', 'jenis_bangunan_lainnya', ['lainnya'])"
|
||||
/>
|
||||
onclick="toggleCheckboxVisibility('jenis_bangunan', 'jenis_bangunan_lainnya', ['lainnya'])" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@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
|
||||
<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>
|
||||
@@ -160,7 +164,7 @@
|
||||
@if ($spek->spek_kategori_bangunan_id == $item->id)
|
||||
<label class="form-label flex items-center gap-2.5">
|
||||
<input class="checkbox"
|
||||
name="spek_bangunan[{{ $item->name }}][]"
|
||||
name="spek_bangunan[{{ $item->name }}][]"
|
||||
type="checkbox" value="{{ $spek->name }}" />
|
||||
{{ $spek->name }}
|
||||
</label>
|
||||
@@ -196,16 +200,28 @@
|
||||
<div class="flex flex-col items-start gap-4">
|
||||
@if (isset($saranaPelengkap))
|
||||
@foreach ($saranaPelengkap as $item)
|
||||
@php
|
||||
$isChecked = false;
|
||||
$inputValue = '';
|
||||
|
||||
if (isset($forminspeksi['bangunan']['sarana_pelengkap'])) {
|
||||
foreach ($forminspeksi['bangunan']['sarana_pelengkap'] as $key => $value) {
|
||||
if ($key === $item->name) {
|
||||
$isChecked = true;
|
||||
$inputValue = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||
<input class="checkbox" name="sarana_pelengkap[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('sarana_pelengkap', $forminspeksi['bangunan']['sarana_pelengkap'] ?? [])) ? 'checked' : '' }} />
|
||||
value="{{ $item->name }}" {{ $isChecked ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<input type="text" name="sarana_pelengkap_input[]" class="input w-full"
|
||||
id="bentukTanahInput" placeholder="Masukkan {{ $item->name }}..."
|
||||
value="{{ old('sarana_pelengkap_input.' . $loop->index, $forminspeksi['bangunan']['sarana_pelengkap_input'][$loop->index] ?? '') }}">
|
||||
placeholder="Masukkan {{ $item->name }}..." value="{{ $inputValue }}">
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -213,6 +229,7 @@
|
||||
<em id="error-sarana_pelengkap" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@php
|
||||
$jaminanId = $dokumen->jenisJaminan->id;
|
||||
$currentInspeksi = $inspeksiData[$jaminanId] ?? null;
|
||||
|
||||
|
||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT'];
|
||||
|
||||
|
||||
$href = [
|
||||
[
|
||||
'label' => 'form inspeksi',
|
||||
@@ -57,7 +57,14 @@
|
||||
<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 -->
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-2.5">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@include('lpj::assetsku.includenya')
|
||||
@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">
|
||||
@@ -142,7 +142,8 @@
|
||||
<div class="w-full grid gap-5">
|
||||
<img id="foto_denah-preview"
|
||||
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;' }}">
|
||||
alt="Gambar foto_denah"
|
||||
style="{{ isset($formDenah['foto_denah']) ? 'width: 30rem;' : 'display: none;' }}">
|
||||
|
||||
|
||||
|
||||
@@ -150,9 +151,7 @@
|
||||
<input type="file"
|
||||
value="{{ old('foto_denah', isset($formDenah['foto_denah']) ? $formDenah['foto_denah'] : '') }}"
|
||||
name="foto_denah" class="file-input file-input-bordered w-full "
|
||||
accept="image/*"
|
||||
onchange="previewImage(this, 'foto_denah-preview')"
|
||||
>
|
||||
accept="image/*" onchange="previewImage(this, 'foto_denah-preview')">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,29 +177,32 @@
|
||||
|
||||
</div>
|
||||
|
||||
<em id="error-luas" class="alert text-danger text-sm"></em>
|
||||
<em id="error-luas" class="alert text-danger text-sm"></em>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||
<button type="button" class="btn btn-success" id="saveButton" onclick="submitDenah()">
|
||||
<span id="saveButtonText">Save</span>
|
||||
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;"
|
||||
id="saveButtonSpinner">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loadingOverlay" class="fixed inset-0 bg-black bg-opacity-50 hidden items-center justify-center z-50">
|
||||
<div class="bg-white p-4 rounded-lg">
|
||||
<div class="loader"></div>
|
||||
<p class="mt-2 text-center">Sedang memproses...</p>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function previewImage(input, previewId) {
|
||||
function previewImage(input, previewId) {
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
@@ -213,15 +215,13 @@
|
||||
}
|
||||
|
||||
function submitDenah() {
|
||||
const loadingOverlay = document.getElementById('loadingOverlay');
|
||||
loadingOverlay.classList.remove('hidden');
|
||||
loadingOverlay.classList.add('flex');
|
||||
|
||||
const formElement = $('#formDenah')[0];
|
||||
const formData = new FormData(formElement);
|
||||
|
||||
// Disable the button and show the spinner
|
||||
$('#saveButton').prop('disabled', true);
|
||||
$('#saveButtonText').hide();
|
||||
$('#saveButtonSpinner').show();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route('surveyor.storeDenah') }}',
|
||||
type: 'POST',
|
||||
@@ -233,9 +233,24 @@
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=denah';
|
||||
toastrSuccessBuild(response.message);
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: response.message || 'Terjadi kesalahan',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
console.log(response);
|
||||
},
|
||||
@@ -255,13 +270,32 @@
|
||||
|
||||
},
|
||||
complete: function() {
|
||||
// Re-enable the button and hide the spinner
|
||||
$('#saveButton').prop('disabled', false);
|
||||
$('#saveButtonText').show();
|
||||
$('#saveButtonSpinner').hide();
|
||||
loadingOverlay.classList.add('hidden');
|
||||
loadingOverlay.classList.remove('flex');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
<style>
|
||||
.loader {
|
||||
border: 4px solid #f3f3f3;
|
||||
border-radius: 50%;
|
||||
border-top: 4px solid #3498db;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -76,19 +76,32 @@
|
||||
<label class="form-label max-w-56">Batas batas</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="grid grid-cols-1 gap-4 items-center w-full">
|
||||
|
||||
@if (isset($arahMataAngin))
|
||||
@foreach ($arahMataAngin as $item)
|
||||
@php
|
||||
$isChecked = false;
|
||||
$inputValue = '';
|
||||
|
||||
if (isset($forminspeksi['fakta']['batas_batas'])) {
|
||||
foreach ($forminspeksi['fakta']['batas_batas'] as $key => $value) {
|
||||
if ($key === $item->name) {
|
||||
$isChecked = true;
|
||||
$inputValue = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||
<input class="checkbox" name="batas_batas[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('batas_batas', $forminspeksi['fakta']['batas_batas'] ?? [])) ? 'checked' : '' }} />
|
||||
{{ $isChecked ? 'checked' : '' }} />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
<input type="text" name="batas_batas_input[]" class="input w-full"
|
||||
id="bentukTanahInput" placeholder="Masukkan Batas {{ $item->name }}..."
|
||||
value="{{ old('batas_batas_input.' . $loop->index, $forminspeksi['fakta']['batas_batas_input'][$loop->index] ?? '') }}">
|
||||
placeholder="Masukkan Batas {{ $item->name }}..."
|
||||
value="{{ $inputValue }}">
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -98,6 +111,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Kondisi lain terkait lingkungan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full" id="kondisi-lingkungan-container">
|
||||
|
||||
@@ -585,8 +585,12 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="loadingOverlay" class="fixed inset-0 bg-black bg-opacity-50 hidden items-center justify-center z-50">
|
||||
<div class="bg-white p-4 rounded-lg">
|
||||
<div class="loader"></div>
|
||||
<p class="mt-2 text-center">Sedang memproses...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Kamera -->
|
||||
@@ -598,17 +602,16 @@
|
||||
@push('scripts')
|
||||
<script>
|
||||
function submitFoto() {
|
||||
const loadingOverlay = document.getElementById('loadingOverlay');
|
||||
loadingOverlay.classList.remove('hidden');
|
||||
loadingOverlay.classList.add('flex');
|
||||
|
||||
const formElement = $('#formFoto')[0];
|
||||
const formData = new FormData(formElement);
|
||||
// for (const [key, value] of formData.entries()) {
|
||||
// console.log(`Key: ${key}, Value: ${value}`);
|
||||
// }
|
||||
|
||||
// Disable the button and show the spinner
|
||||
$('#saveButtonFoto').prop('disabled', true);
|
||||
$('#saveButtonFotoText').hide();
|
||||
$('#saveButtonSpinner').show();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route('surveyor.storeFoto') }}',
|
||||
type: 'POST',
|
||||
@@ -621,12 +624,27 @@
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
// window.location.href =
|
||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=foto';
|
||||
toastrSuccessBuild(response.message);
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: response.message || 'Terjadi kesalahan',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
console.log(response);
|
||||
|
||||
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
@@ -645,9 +663,8 @@
|
||||
},
|
||||
complete: function() {
|
||||
// Re-enable the button and hide the spinner
|
||||
$('#saveButtonFoto').prop('disabled', false);
|
||||
$('#saveButtonFotoText').show();
|
||||
$('#saveButtonSpinner').hide();
|
||||
loadingOverlay.classList.add('hidden');
|
||||
loadingOverlay.classList.remove('flex');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -655,6 +672,28 @@
|
||||
@include('lpj::surveyor.js.camera-editor')
|
||||
@endpush
|
||||
|
||||
<style>
|
||||
.loader {
|
||||
border: 4px solid #f3f3f3;
|
||||
border-radius: 50%;
|
||||
border-top: 4px solid #3498db;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,12 +37,20 @@
|
||||
<span id="saveButtonText">Save</span>
|
||||
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;"
|
||||
id="saveButtonSpinner">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Loading Overlay -->
|
||||
<div id="loadingOverlay" class="fixed inset-0 bg-black bg-opacity-50 hidden items-center justify-center z-50">
|
||||
<div class="bg-white p-4 rounded-lg">
|
||||
<div class="loader"></div>
|
||||
<p class="mt-2 text-center">Sedang memproses...</p>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
@@ -118,14 +126,14 @@
|
||||
|
||||
|
||||
function submitData() {
|
||||
|
||||
const loadingOverlay = document.getElementById('loadingOverlay');
|
||||
loadingOverlay.classList.remove('hidden');
|
||||
loadingOverlay.classList.add('flex');
|
||||
|
||||
const formElement = $('#formInspeksi')[0];
|
||||
const formData = new FormData(formElement);
|
||||
|
||||
// Disable the button and show the spinner
|
||||
$('#saveButton').prop('disabled', true);
|
||||
$('#saveButtonText').hide();
|
||||
$('#saveButtonSpinner').show();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ route('surveyor.store') }}',
|
||||
type: 'POST',
|
||||
@@ -136,12 +144,26 @@
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
// if (response.success) {
|
||||
// toastrSuccessBuild(response.message)
|
||||
// window.location.href =
|
||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=inspeksi';
|
||||
// }
|
||||
|
||||
if (response.success) {
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: response.message || 'Terjadi kesalahan',
|
||||
icon: 'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
}
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
@@ -160,9 +182,8 @@
|
||||
},
|
||||
complete: function() {
|
||||
// Re-enable the button and hide the spinner
|
||||
$('#saveButton').prop('disabled', false);
|
||||
$('#saveButtonText').show();
|
||||
$('#saveButtonSpinner').hide();
|
||||
loadingOverlay.classList.add('hidden');
|
||||
loadingOverlay.classList.remove('flex');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -239,10 +260,9 @@
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if (response.success) {
|
||||
if (response.jenis_asset) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=inspeksi';
|
||||
}
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
|
||||
toastrSuccessBuild(response.message);
|
||||
}
|
||||
},
|
||||
@@ -260,3 +280,34 @@
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
<style>
|
||||
.loader {
|
||||
border: 4px solid #f3f3f3;
|
||||
border-radius: 50%;
|
||||
border-top: 4px solid #3498db;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.scrollable-x-auto {
|
||||
overflow-x: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.table {
|
||||
min-width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -169,25 +169,38 @@
|
||||
<span class="ml-2">Telah ada bangunan</span>
|
||||
</label>
|
||||
<div class="flex w-full items-center gap-4">
|
||||
|
||||
<div id="disekitar_lokasi_sesuai" class="grid grid-cols-2 gap-4 mt-5 mb-5"
|
||||
style="display: none;">
|
||||
style="{{ old('disekitar_lokasi', $forminspeksi['lingkungan']['disekitar_lokasi'] ?? '') == 'ya' ? '' : 'display: none;' }}">
|
||||
<div class="flex items-center gap-2">
|
||||
<label for="" class="text-sm text-gray-700">Kondisi bangunan</label>
|
||||
|
||||
@php
|
||||
$kondisi = ['Cukup', 'Baik', 'Kurang'];
|
||||
@endphp
|
||||
|
||||
<select class="select" name="kondisi_bagunan_disekitar_lokasi" id="">
|
||||
<option value="">pilih kondisi</option>
|
||||
<option value="Cukup">Cukup</option>
|
||||
<option value="Baik">Baik</option>
|
||||
<option value="Kurang">Kurang</option>
|
||||
@foreach ($kondisi as $item)
|
||||
<option value="{{ $item }}"
|
||||
{{ old('kondisi_bagunan_disekitar_lokasi', $forminspeksi['lingkungan']['disekitar_lokasi'] ?? '') == $item ? 'selected' : '' }}>
|
||||
{{ $item }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<label for="" class="text-sm text-gray-700">Sifat bangunan</label>
|
||||
@php
|
||||
$sifat = ['Permanen', 'Semi Permanen', 'Tidak Permanen'];
|
||||
@endphp
|
||||
<select class="select" name="sifat_bagunan_disekitar_lokasi" id="">
|
||||
<option value="">pilih sifat bagunan</option>
|
||||
<option value="Permanen">Permanen</option>
|
||||
<option value="Semi Permanen">Semi Permanen</option>
|
||||
<option value="Tidak Permanen">Tidak Permanen</option>
|
||||
@foreach ($sifat as $item)
|
||||
<option value="{{ $item }}"
|
||||
{{ old('sifat_bagunan_disekitar_lokasi', $forminspeksi['lingkungan']['disekitar_lokasi'] ?? '') == $item ? 'selected' : '' }}>
|
||||
{{ $item }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
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'] ?? '') }}">
|
||||
value="{{ old('luas_tanah_tidak_sesuai', $forminspeksi['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||
<button type="button" class="btn btn-md btn-primary"
|
||||
onclick="updateAnalisa('analisa_tanah')">Save</button>
|
||||
</div>
|
||||
@@ -85,6 +85,7 @@
|
||||
</label>
|
||||
|
||||
<!-- Select dropdown untuk "Tidak Sesuai" -->
|
||||
|
||||
<div id="hadap_mata_angin_tidak_sesuai" class="flex items-baseline gap-2"
|
||||
style="{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? '' : 'display: none;' }}">
|
||||
<select class="input w-full
|
||||
@@ -94,7 +95,7 @@
|
||||
@if (isset($arahMataAngin))
|
||||
@foreach ($arahMataAngin as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ old('hadap_mata_angin_tidak_sesuai', $forminspeksi['tanah']['hadap_mata_angin_tidak_sesuai'] ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ old('hadap_mata_angin_tidak_sesuai', $forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'] ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@@ -233,14 +234,14 @@
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input class="checkbox" name="posisi_kavling[]" type="checkbox"
|
||||
value="{{ $item->name }}"
|
||||
{{ in_array($item->name, old('posisi_kavling', $forminspeksi['tanah']['posisi_kavling'] ?? [])) ? 'checked' : '' }}
|
||||
{{ in_array($item->name, old('posisi_kavling', $forminspeksi['tanah']['posisi_kavling']['posisi_kavling'] ?? [])) ? 'checked' : '' }}
|
||||
onclick="toggleCheckboxVisibility('posisi_kavling', 'posisi_kavling_lainnya', ['Lainnya'])" />
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||
<input id="posisi_kavling_lainnya" type="text" style="display: none;"
|
||||
name="posisi_kavling_lainnya" class="input w-full mt-2"
|
||||
placeholder="Masukkan Posisi Kavling lainnya..." />
|
||||
placeholder="Masukkan Posisi Kavling lainnya..." value="{{ old('posisi_kavling_lainnya', $forminspeksi['tanah']['posisi_kavling']['lainnya'] ?? '') }}" />
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user