Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into andydev

This commit is contained in:
Andy Chaerudin
2024-12-09 10:22:13 +07:00
63 changed files with 2994 additions and 2380 deletions

View File

@@ -6,6 +6,7 @@
use Modules\Lpj\Models\PenawaranDetailTender; use Modules\Lpj\Models\PenawaranDetailTender;
use Modules\Lpj\Models\PenawaranTender; use Modules\Lpj\Models\PenawaranTender;
use Modules\Lpj\Models\Penilaian; use Modules\Lpj\Models\Penilaian;
use Modules\Lpj\Models\JenisDokumen;
function formatTanggalIndonesia($date, $time = false) function formatTanggalIndonesia($date, $time = false)
{ {
@@ -289,5 +290,24 @@
{ {
return Penilaian::whereHas('userPenilai', function ($query) use ($userId) { return Penilaian::whereHas('userPenilai', function ($query) use ($userId) {
$query->where('user_id', $userId); $query->where('user_id', $userId);
})->count(); })
->whereHas('permohonan', function ($query) {
$query->where('status', 'assign');
})
->count();
} }
function getMaxFileSize($jenis)
{
$jenisDokumen = JenisDokumen::where('name', $jenis)->first();
if (!$jenisDokumen) {
return 2048;
}
//konversi ke KB (1 MB = 1024 KB)
$maxSizeInKB = (int) $jenisDokumen->max_size * 1024;
return $maxSizeInKB;
}

View File

@@ -250,6 +250,8 @@ class ActivityController extends Controller
]) ])
->whereHas('userPenilai', function ($q) use ($id) { ->whereHas('userPenilai', function ($q) use ($id) {
$q->where('user_id', $id); $q->where('user_id', $id);
})->whereHas('permohonan', function ($q) {
$q->where('status', 'assign');
}); });

View File

@@ -9,6 +9,8 @@ use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Facades\Excel; use Maatwebsite\Excel\Facades\Excel;
use Modules\Lpj\Exports\KertasKerjaExport; use Modules\Lpj\Exports\KertasKerjaExport;
use App\Http\Controllers\SurveyorController;
class PenilaiController extends Controller class PenilaiController extends Controller
{ {
public $user; public $user;
@@ -54,6 +56,30 @@ class PenilaiController extends Controller
// //
} }
public function sederhana($id)
{
$data = new SurveyorController();
$basicData = $data->getCommonData();
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
return view('lpj::penilai.components.lpj-sederhana-standard', compact('permohonan', 'basicData'));
}
public function standard($id)
{
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
return view('lpj::penilai.components.lpj-sederhana-standard', compact('permohonan'));
}
public function resume(){
return view('lpj::resume.index');
}
public function memo(){
return view('lpj::resume.index');
}
/** /**
* Show the specified resource. * Show the specified resource.
*/ */

View File

@@ -12,12 +12,16 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Modules\Lpj\Models\Debiture;
use Modules\Lpj\Models\Permohonan; use Modules\Lpj\Models\Permohonan;
use Modules\Lpj\Models\Branch; use Modules\Lpj\Models\Branch;
use Modules\Lpj\Models\Surveyor; use Modules\Lpj\Models\Surveyor;
use Modules\Lpj\Models\BentukTanah; use Modules\Lpj\Models\BentukTanah;
use Modules\Lpj\Models\KonturTanah; use Modules\Lpj\Models\KonturTanah;
use Modules\Location\Models\Province; use Modules\Location\Models\Province;
use Modules\Location\Models\City;
use Modules\Location\Models\District;
use Modules\Location\Models\Village;
use Modules\Lpj\Models\PosisiKavling; use Modules\Lpj\Models\PosisiKavling;
use Modules\Lpj\Models\KondisiFisikTanah; use Modules\Lpj\Models\KondisiFisikTanah;
use Modules\Lpj\Models\KetinggianTanah; use Modules\Lpj\Models\KetinggianTanah;
@@ -58,7 +62,6 @@ use Modules\Lpj\Models\DetailDokumenJaminan;
use Modules\Lpj\Models\JenisKapal; use Modules\Lpj\Models\JenisKapal;
use Modules\Lpj\Models\JenisKendaraan; use Modules\Lpj\Models\JenisKendaraan;
use Modules\Lpj\Models\RuteJaminan; use Modules\Lpj\Models\RuteJaminan;
use Modules\Lpj\Models\HubunganPemilikJaminan; use Modules\Lpj\Models\HubunganPemilikJaminan;
use Modules\Lpj\Models\HubunganPenghuniJaminan; use Modules\Lpj\Models\HubunganPenghuniJaminan;
use Modules\Lpj\Models\AnalisaUnit; use Modules\Lpj\Models\AnalisaUnit;
@@ -212,8 +215,9 @@ class SurveyorController extends Controller
public function storeDenah(Request $request) public function storeDenah(Request $request)
{ {
try { try {
$maxSize = getMaxFileSize('Foto');
$validatedData = $request->validate([ $validatedData = $request->validate([
'foto_denah' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_denah' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'luas' => 'required|numeric', 'luas' => 'required|numeric',
'permohonan_id' => 'required', 'permohonan_id' => 'required',
'jenis_jaminan_id' => 'required' 'jenis_jaminan_id' => 'required'
@@ -308,8 +312,6 @@ class SurveyorController extends Controller
$inspeksi->foto_form = json_encode($formatFotojson); $inspeksi->foto_form = json_encode($formatFotojson);
$inspeksi->save(); $inspeksi->save();
return response()->json(['success' => true, 'message' => 'Data berhasil disimpan', 'data' => $formatFotojson], 200); return response()->json(['success' => true, 'message' => 'Data berhasil disimpan', 'data' => $formatFotojson], 200);
} catch (Exception $e) { } catch (Exception $e) {
return response()->json(['success' => false, 'message' => 'Failed to upload: ' . $e->getMessage()], 500); return response()->json(['success' => false, 'message' => 'Failed to upload: ' . $e->getMessage()], 500);
@@ -369,34 +371,32 @@ class SurveyorController extends Controller
} }
} }
/** /**
* Custom validation request for foto * Custom validation request for foto
*/ */
public function validateFotoRequest(Request $request) public function validateFotoRequest(Request $request)
{ {
$maxSize = getMaxFileSize('Foto');
return $request->validate([ return $request->validate([
'permohonan_id' => 'required', 'permohonan_id' => 'required',
'jenis_jaminan_id' => 'required', 'jenis_jaminan_id' => 'required',
'pendamping' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'pendamping' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'foto_objek.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_objek.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'name_objek.*' => 'required|string|max:255', 'name_objek.*' => 'required|string|max:255',
'foto_lingkungan.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_lingkungan.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'name_lingkungan.*' => 'required|string|max:255', 'name_lingkungan.*' => 'required|string|max:255',
'foto_rute.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_rute.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'name_rute.*' => 'required|string|max:255', 'name_rute.*' => 'required|string|max:255',
'lantai.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'lantai.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'name_lantai_unit.*' => 'nullable|string|max:255', 'name_lantai_unit.*' => 'nullable|string|max:255',
'foto_lantai_unit.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_lantai_unit.*' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'name_rute_lainnya.*' => 'nullable|string', 'name_rute_lainnya.*' => 'nullable|string',
'foto_rute_lainnya.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_rute_lainnya.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'foto_lantai_lainnya.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_lantai_lainnya.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'name_lantai_lainnya.*' => 'nullable|string|max:255', 'name_lantai_lainnya.*' => 'nullable|string|max:255',
'foto_basement.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_basement.*' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'name_basement.*' => 'nullable|string|max:255', 'name_basement.*' => 'nullable|string|max:255',
'foto_gerbang' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'foto_gerbang' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:'. $maxSize,
'name_gerbang' => 'nullable|string|max:255', 'name_gerbang' => 'nullable|string|max:255',
]); ]);
} }
@@ -490,8 +490,6 @@ class SurveyorController extends Controller
} }
public function storeJadwal(Request $request) public function storeJadwal(Request $request)
{ {
try { try {
@@ -532,10 +530,7 @@ class SurveyorController extends Controller
public function storeAproved($id) public function storeAproved($id)
{ {
try { try {
$penilaian = Penilaian::findOrFail($id); $penilaian = Penilaian::findOrFail($id);
$penilaian->update([ $penilaian->update([
'authorized_status' => 1, 'authorized_status' => 1,
]); ]);
@@ -551,7 +546,8 @@ class SurveyorController extends Controller
} }
public function storeFreeze() { public function storeFreeze()
{
} }
@@ -559,16 +555,16 @@ class SurveyorController extends Controller
private function formatDataPembanding($request) private function formatDataPembanding($request)
{ {
$dataPembanding = []; $dataPembanding = [];
$pembandingCount = count($request->input('alamat_pembanding', [])); $pembandingCount = count($request->input('address_pembanding', []));
$fotoPembanding = $request->file('foto_objek_pembanding') ?? [];
for ($i = 0; $i < $pembandingCount; $i++) { for ($i = 0; $i < $pembandingCount; $i++) {
$pembanding = $this->formatSinglePembanding($request, $i); $pembanding = $this->formatSinglePembanding($request, $i);
// Perbaikan penanganan foto pembanding // Penanganan foto pembanding
$fotoKey = "foto_objek_pembanding_{$i}"; // Sesuaikan dengan nama field di form if (isset($fotoPembanding[$i]) && $fotoPembanding[$i]->isValid()) {
if ($request->hasFile($fotoKey)) { $pembanding['foto_objek'] = $this->handleupdateOrDeleteFile(
$pembanding['foto_objek'] = $this->handleFileUpload( $fotoPembanding[$i],
$request->file($fotoKey),
'pembanding', 'pembanding',
"pembanding_{$i}" "pembanding_{$i}"
); );
@@ -580,42 +576,33 @@ class SurveyorController extends Controller
return $dataPembanding; return $dataPembanding;
} }
private function handleFileUpload($file, $folder, $prefix) private function handleupdateOrDeleteFile($file, $type, $prefix)
{ {
if (!$file) {
return null;
}
try { try {
// Buat nama file yang unik if ($file) {
$extension = $file->getClientOriginalExtension(); // Generate nama file unik
$fileName = $prefix . '_' . time() . '_' . uniqid() . '.' . $extension; $fileName = $prefix . '_' . uniqid() . '_' . time() . '.' . $file->getClientOriginalExtension();
$path = "{$type}/" . date('Y/m');
// Pastikan folder exists Storage::makeDirectory("public/{$path}");
$path = storage_path("app/public/{$folder}"); $filePath = $file->storeAs("public/{$path}", $fileName);
if (!File::exists($path)) { return str_replace('public/', '', $filePath);
File::makeDirectory($path, 0777, true);
} }
// Simpan file return null;
$file->storeAs("public/{$folder}", $fileName);
// Log untuk debugging
\Log::info("File berhasil disimpan: {$folder}/{$fileName}");
return $fileName;
} catch (\Exception $e) { } catch (\Exception $e) {
\Log::error("Error saat upload file: " . $e->getMessage()); \Log::error('File upload error: ' . $e->getMessage());
throw $e; throw new \Exception("Gagal mengupload file: " . $e->getMessage());
} }
} }
private function formatSinglePembanding($request, $index) private function formatSinglePembanding($request, $index)
{ {
$fields = [ $fields = [
'alamat', 'desa', 'kecamatan', 'kabupaten', 'provinsi', 'address', 'village_code', 'district_code', 'city_code', 'province_code',
'tahun', 'luas_tanah', 'luas_bangunan', 'tahun_bangunan', 'tahun', 'luas_tanah', 'luas_bangunan', 'tahun_bangunan',
'status_nara_sumber', 'harga', 'nama_nara_sumber', 'status_nara_sumber', 'harga', 'harga_diskon', 'diskon','total','nama_nara_sumber',
'peruntukan', 'penawaran_transaksi', 'nomor_tlp', 'peruntukan', 'penawaran_transaksi', 'nomor_tlp',
'kordinat_lat', 'kordinat_lng', 'jenis_aset', 'kordinat_lat', 'kordinat_lng', 'jenis_aset',
]; ];
@@ -632,32 +619,58 @@ class SurveyorController extends Controller
return $pembanding; return $pembanding;
} }
private function formatObjekPenilaian($request)
{
$fields = [
'address', 'village_code', 'district_code', 'city_code', 'province_code',
'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',
];
$objekPenilaian = array_reduce($fields, function ($carry, $field) use ($request) {
$carry[$field] = $request->input($field);
return $carry;
}, ['foto_objek' => null]);
return $objekPenilaian;
}
private function saveInspeksi($formattedData)
{
$inspeksi = Inspeksi::updateOrCreate(
[
'permohonan_id' => $formattedData['permohonan_id'],
'jenis_jaminan_id' => $formattedData['jenis_jaminan_id']
],
[
'data_pembanding' => json_encode($formattedData),
'name' => $formattedData['type']
]
);
return $inspeksi;
}
public function storeDataPembanding(Request $request) public function storeDataPembanding(Request $request)
{ {
try { try {
DB::beginTransaction(); DB::beginTransaction();
$maxSize = getMaxFileSize('Foto');
$validator = $request->validate([ $validator = $request->validate([
'permohonan_id' => 'required|exists:permohonan,id', 'permohonan_id' => 'required|exists:permohonan,id',
'type' => 'required|string', 'type' => 'required|string',
'jenis_jaminan_id' => 'required', 'jenis_jaminan_id' => 'required',
'foto_objek' => 'nullable|image|max:2048', 'foto_objek' => 'nullable|image|max:'.$maxSize,
'foto_objek_pembanding_*' => 'nullable|image|max:2048', 'foto_objek_pembanding.*' => 'nullable|image|max:'.$maxSize,
]); ]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'message' => 'Validasi gagal',
'errors' => $validator->errors()
], 422);
}
$objekPenilaian = $this->formatObjekPenilaian($request); $objekPenilaian = $this->formatObjekPenilaian($request);
if ($request->hasFile('foto_objek')) { if ($request->hasFile('foto_objek')) {
$objekPenilaian['foto_objek'] = $this->handleFileUpload( $objekPenilaian['foto_objek'] = $this->handleupdateOrDeleteFile(
$request->file('foto_objek'), $request->file('foto_objek'),
'pembanding', $request['type'] = 'pembanding',
'objek_penilaian' 'objek_penilaian'
); );
} }
@@ -677,7 +690,7 @@ class SurveyorController extends Controller
return response()->json([ return response()->json([
'success' => true, 'success' => true,
'message' => 'Data berhasil disimpan', 'message' => 'Data berhasil disimpan',
'data' => $formattedData 'data' => $objekPenilaian
], 200); ], 200);
} catch (\Exception $e) { } catch (\Exception $e) {
@@ -698,10 +711,6 @@ class SurveyorController extends Controller
public function formInspeksi($id, $jaminanId) public function formInspeksi($id, $jaminanId)
{ {
$permohonan = $this->getPermohonanJaminanId($id, $jaminanId); $permohonan = $this->getPermohonanJaminanId($id, $jaminanId);
// Auth::user()->id
$link_url_region = Teams::with('regions', 'teamsUsers') $link_url_region = Teams::with('regions', 'teamsUsers')
->whereHas('teamsUsers', function ($query) { ->whereHas('teamsUsers', function ($query) {
$query->where('user_id', Auth::user()->id); $query->where('user_id', Auth::user()->id);
@@ -709,41 +718,13 @@ class SurveyorController extends Controller
$branches = Branch::all(); $branches = Branch::all();
$provinces = Province::all(); $provinces = Province::all();
$debitur = Debiture::find($permohonan->debiture_id);
$cities = City::where('province_code', $debitur->province_code)->get();
$districts = District::where('city_code', $debitur->city_code)->get();
$villages = Village::where('district_code', $debitur->district_code)->get();
$surveyor = $id; $surveyor = $id;
$branches = Branch::all(); $basicData = $this->getCommonData();
$provinces = Province::all();
$bentukTanah = BentukTanah::all();
$konturTanah = KonturTanah::all();
$posisiKavling = PosisiKavling::all();
$ketinggianTanah = KetinggianTanah::all();
$kondisiFisikTanah = KondisiFisikTanah::all();
$jenisBangunan = JenisBangunan::all();
$kondisiBangunan = KondisiBangunan::all();
$sifatBangunan = SifatBangunan::all();
$spekKategoriBagunan = SpekKategoritBangunan::all();
$spekBangunan = SpekBangunan::all();
$saranaPelengkap = SaranaPelengkap::all();
$arahMataAngin = ArahMataAngin::all();
$lantai = Lantai::all();
$viewUnit = ViewUnit::all();
$golMasySekitar = GolonganMasySekitar::all();
$tingkatKeramaian = TingkatKeramaian::all();
$laluLintasLokasi = LaluLintasLokasi::all();
$perkerasanJalan = PerkerasanJalan::all();
$jenisKendaraan = JenisKendaraan::all();
$jenisKapal = JenisKapal::all();
$jenisPesawat = JenisPesawat::all();
$modelAlatBerat = ModelAlatBerat::all();
$hubCadeb = HubunganPemilikJaminan::all();
$hubPenghuni = HubunganPenghuniJaminan::all();
$jenisJaminan = JenisJaminan::all();
$fasilitasObjek = FasilitasObjek::all();
$merupakanDaerah = MerupakanDaerah::all();
$terletakDiArea = TerletakArea::all();
$posisiUnit = PosisiUnit::all();
$bentukUnit = BentukUnit::all();
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first(); $inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
$forminspeksi = null; $forminspeksi = null;
@@ -755,38 +736,13 @@ class SurveyorController extends Controller
'surveyor', 'surveyor',
'branches', 'branches',
'provinces', 'provinces',
'bentukTanah', 'debitur',
'konturTanah', 'cities',
'posisiKavling', 'districts',
'kondisiFisikTanah', 'villages',
'ketinggianTanah',
'kondisiBangunan',
'jenisBangunan',
'sifatBangunan',
'spekKategoriBagunan',
'spekBangunan',
'saranaPelengkap',
'arahMataAngin',
'lantai',
'viewUnit',
'golMasySekitar',
'tingkatKeramaian',
'laluLintasLokasi',
'perkerasanJalan',
'link_url_region', 'link_url_region',
'forminspeksi', 'forminspeksi',
'jenisKendaraan', 'basicData'
'jenisKapal',
'jenisPesawat',
'modelAlatBerat',
'hubCadeb',
'jenisJaminan',
'fasilitasObjek',
'merupakanDaerah',
'terletakDiArea',
'posisiUnit',
'bentukUnit',
'hubPenghuni'
)); ));
} }
@@ -821,8 +777,6 @@ class SurveyorController extends Controller
$branches = Branch::all(); $branches = Branch::all();
$provinces = Province::all(); $provinces = Province::all();
$inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first(); $inpeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
$formFoto = null; $formFoto = null;
@@ -830,12 +784,6 @@ class SurveyorController extends Controller
$formFoto = json_decode($inpeksi->foto_form, true); $formFoto = json_decode($inpeksi->foto_form, true);
} }
$fotoJaminan = null; $fotoJaminan = null;
// return response()->json([
// 'inspeksi' => $formFoto,
// ]);
return view('lpj::surveyor.components.foto', compact('permohonan', 'surveyor', 'branches', 'provinces', 'fotoJaminan', 'formFoto')); return view('lpj::surveyor.components.foto', compact('permohonan', 'surveyor', 'branches', 'provinces', 'fotoJaminan', 'formFoto'));
} }
@@ -883,7 +831,6 @@ class SurveyorController extends Controller
throw new \Exception('Error decoding comparison data: ' . json_last_error_msg()); throw new \Exception('Error decoding comparison data: ' . json_last_error_msg());
} }
} }
$fotoForm = json_decode($inspeksi->foto_form, true); $fotoForm = json_decode($inspeksi->foto_form, true);
@@ -891,19 +838,26 @@ class SurveyorController extends Controller
// Ambil data pendukung // Ambil data pendukung
$data = $this->getCommonData(); $data = $this->getCommonData();
$branches = Branch::all();
$provinces = Province::all(); $provinces = Province::all();
$cities = City::where('province_code', $this->getCodeAlamat('province_code', $inspectionData))->get();
$districts = District::where('city_code', $this->getCodeAlamat('city_code', $inspectionData))->get();
$villages = Village::where('district_code',$this->getCodeAlamat('district_code', $inspectionData))->get();
return view('lpj::surveyor.components.data-pembanding', compact( return view('lpj::surveyor.components.data-pembanding', compact(
'permohonan', 'permohonan',
'id', 'id',
'branches',
'provinces',
'inspectionData', 'inspectionData',
'comparisons', 'comparisons',
'data', 'data',
'jaminanId', 'jaminanId',
'fotoForm' 'fotoForm',
'cities',
'districts',
'villages',
'provinces'
)); ));
} catch (\Exception $e) { } catch (\Exception $e) {
@@ -914,6 +868,19 @@ class SurveyorController extends Controller
} }
public function getCodeAlamat($code, $inspectionData){
$cekAlamat = isset(
$inspectionData['asset']['alamat']['sesuai'],
)
? 'sesuai'
: 'tidak sesuai';
$selectedProvince =
$inspectionData['asset']['alamat'][$cekAlamat][
$code
] ?? null;
return $selectedProvince;
}
private function getHeader(string $type): array private function getHeader(string $type): array
{ {
@@ -931,7 +898,6 @@ class SurveyorController extends Controller
public function createData($type) public function createData($type)
{ {
$spekKategoriBagunan = SpekKategoritBangunan::all(); $spekKategoriBagunan = SpekKategoritBangunan::all();
$header = $this->getHeader($type); $header = $this->getHeader($type);
return view('lpj::surveyor.data.form', compact('header', 'spekKategoriBagunan')); return view('lpj::surveyor.data.form', compact('header', 'spekKategoriBagunan'));
@@ -940,7 +906,6 @@ class SurveyorController extends Controller
public function storeData(SurveyorRequest $request, $type) public function storeData(SurveyorRequest $request, $type)
{ {
$validate = $request->validated(); $validate = $request->validated();
if ($validate) { if ($validate) {
@@ -1041,8 +1006,6 @@ class SurveyorController extends Controller
->with('error', 'Invalid type specified.'); ->with('error', 'Invalid type specified.');
} }
$model = $modelClass::findOrFail($id); $model = $modelClass::findOrFail($id);
$model->update($validate); $model->update($validate);
@@ -1311,10 +1274,7 @@ class SurveyorController extends Controller
if (!$modelClass) { if (!$modelClass) {
return response()->json(['success' => false, 'message' => 'Invalid type specified.'], 400); return response()->json(['success' => false, 'message' => 'Invalid type specified.'], 400);
} }
$model = $modelClass::findOrFail($id); $model = $modelClass::findOrFail($id);
$model->delete(); $model->delete();
return response()->json(['success' => true, 'message' => 'deleted successfully']); return response()->json(['success' => true, 'message' => 'deleted successfully']);
} catch (ModelNotFoundException $e) { } catch (ModelNotFoundException $e) {
@@ -1394,7 +1354,6 @@ class SurveyorController extends Controller
{ {
return [ return [
'branches' => Branch::all(), 'branches' => Branch::all(),
'provinces' => Province::all(),
'bentukTanah' => BentukTanah::all(), 'bentukTanah' => BentukTanah::all(),
'konturTanah' => KonturTanah::all(), 'konturTanah' => KonturTanah::all(),
'posisiKavling' => PosisiKavling::all(), 'posisiKavling' => PosisiKavling::all(),
@@ -1423,10 +1382,15 @@ class SurveyorController extends Controller
'merupakanDaerah' => MerupakanDaerah::all(), 'merupakanDaerah' => MerupakanDaerah::all(),
'jenisUnit' => JenisUnit::all(), 'jenisUnit' => JenisUnit::all(),
'jenisJaminan' => JenisJaminan::all(), 'jenisJaminan' => JenisJaminan::all(),
'hubCadeb' => HubunganPemilikJaminan::all(),
'hubPenghuni' => HubunganPenghuniJaminan::all(),
'perkerasanJalan' => PerkerasanJalan::all(),
'terletakDiArea' => TerletakArea::all(),
]; ];
} }
private const HEADERS = [ private const HEADERS = [
'bentuk-tanah' => ['Bentuk Tanah', 'bentuk-tanah'], 'bentuk-tanah' => ['Bentuk Tanah', 'bentuk-tanah'],
'kontur-tanah' => ['Kontur Tanah', 'kontur-tanah'], 'kontur-tanah' => ['Kontur Tanah', 'kontur-tanah'],
@@ -1460,11 +1424,11 @@ class SurveyorController extends Controller
private function getAssetData(array $data): array private function getAssetData(array $data): array
{ {
$alamatData = [ $alamatData = [
'nama_jalan' => $data['nama_jalan'] ?? null, 'address' => $data['address'] ?? null,
'desa_kelurahan' => $data['desa_kelurahan'] ?? null, 'village_code' => $data['village_code'] ?? null,
'kecamatan' => $data['kecamatan'] ?? null, 'district_code' => $data['district_code'] ?? null,
'kota_kabupaten' => $data['kota_kabupaten'] ?? null, 'city_code' => $data['city_code'] ?? null,
'provinsi' => $data['provinsi'] ?? null, 'province_code' => $data['province_code'] ?? null,
]; ];
return [ return [
@@ -1552,23 +1516,35 @@ class SurveyorController extends Controller
$data = $request->all(); $data = $request->all();
$result = []; $result = [];
// foreach ($data['nama_bangunan'] as $index => $bangunan) {
// $bangunanData = [
// 'bangunan' => $bangunan,
// 'kategori' => []
// ];
// foreach ($data['spek_kategori_bangunan'] as $kategoriIndex => $kategori) { foreach ($request->input('nama_bangunan') as $index => $buildingName) {
// if (isset($data['spek_bangunan'][$kategori])) { if (empty($buildingName)) continue; // Skip if building name is empty
// $bangunanData['kategori'][] = [
// 'kategori' => $kategori, $buildingData = [];
// 'spesifikasi' => $data['spek_bangunan'][$kategori] $buildingData['bagunan'] = $buildingName;
// ];
// } $specCategories = $request->input('spek_kategori_bangunan');
// } $buildingData['spek_kategori_bangunan'] = [];
if (!empty($specCategories)) {
foreach ($specCategories as $category) {
if (empty($category)) continue; // Skip empty categories
$specs = $request->input("spek_bangunan.{$index}.{$category}", []);
// Only add category if it has specifications
if (!empty($specs)) {
$buildingData['spek_kategori_bangunan'][$category] = $specs;
}
}
}
// Only add building data if it has specifications
if (!empty($buildingData['spek_kategori_bangunan'])) {
$result[] = $buildingData;
}
}
// $result[] = $bangunanData;
// }
return [ return [
'bangunan' => [ 'bangunan' => [
@@ -1630,8 +1606,8 @@ class SurveyorController extends Controller
'fakta_negatif' => $data['fakta_negatif'] ?? null, 'fakta_negatif' => $data['fakta_negatif'] ?? null,
'rute_menuju' => $data['rute_menuju'] ?? null, 'rute_menuju' => $data['rute_menuju'] ?? null,
'batas_batas' => $this->mapArrayWithInputs( 'batas_batas' => $this->mapArrayWithInputs(
$data['batas_batas'] ?? null, $data['batas_batas'] ?? [],
$data['batas_batas_input'] ?? null $data['batas_batas_input'] ?? []
), ),
'kondisi_lingkungan' => $data['kondisi_lingkungan'] ?? null, 'kondisi_lingkungan' => $data['kondisi_lingkungan'] ?? null,
'kondisi_lain_bangunan' => $data['kondisi_lain_bangunan'] ?? null, 'kondisi_lain_bangunan' => $data['kondisi_lain_bangunan'] ?? null,

View File

@@ -133,7 +133,7 @@ class TenderController extends Controller
} }
if ($penawaran1->status != 'tender') { if ($penawaran1->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
// dd($penawaran1->id); // dd($penawaran1->id);
@@ -169,7 +169,7 @@ class TenderController extends Controller
if ($penawaran->status != 'tender') { if ($penawaran->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
$status = StatusPermohonan::all(); $status = StatusPermohonan::all();
@@ -289,7 +289,7 @@ class TenderController extends Controller
} }
if ($penawaran->status != 'tender') { if ($penawaran->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
// Kalau tidak ada dokumen jaminan maka di arahkan ke halaman dokumen jaminan // Kalau tidak ada dokumen jaminan maka di arahkan ke halaman dokumen jaminan
@@ -334,7 +334,7 @@ class TenderController extends Controller
} }
if ($penawaran->status != 'tender') { if ($penawaran->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
// Kalau tidak ada dokumen jaminan maka di arahkan ke halaman dokumen jaminan // Kalau tidak ada dokumen jaminan maka di arahkan ke halaman dokumen jaminan
@@ -532,7 +532,7 @@ class TenderController extends Controller
$permohonan = Permohonan::where('nomor_registrasi', '=', $noreg)->first(); $permohonan = Permohonan::where('nomor_registrasi', '=', $noreg)->first();
if ($penawaran->status != 'tender') { if ($penawaran->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
foreach ($permohonan->debiture->documents as $document) { foreach ($permohonan->debiture->documents as $document) {
@@ -560,7 +560,7 @@ class TenderController extends Controller
$permohonan = Permohonan::where('nomor_registrasi', '=', $noreg)->first(); $permohonan = Permohonan::where('nomor_registrasi', '=', $noreg)->first();
if ($penawaran->status != 'tender') { if ($penawaran->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
foreach ($permohonan->debiture->documents as $document) { foreach ($permohonan->debiture->documents as $document) {
@@ -599,7 +599,7 @@ class TenderController extends Controller
} }
if ($penawaran->status != 'tender') { if ($penawaran->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
if ($permohonan->debiture->documents->isEmpty()) { if ($permohonan->debiture->documents->isEmpty()) {
@@ -676,7 +676,7 @@ class TenderController extends Controller
} }
if ($penawaran->status != 'tender') { if ($penawaran->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
if ($permohonan->debiture->documents->isEmpty()) { if ($permohonan->debiture->documents->isEmpty()) {
@@ -874,7 +874,7 @@ class TenderController extends Controller
} }
if ($penawaran->status != 'tender') { if ($penawaran->status != 'tender') {
return redirect()->route('spk.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk SPK tidak bisa masuk penawaran lagi!'); return redirect()->route('otorisasitender.penawaran.index')->with('error', 'Penawaran dengan nomor registrasi ini sudah masuk Otorisasi Tender tidak bisa masuk penawaran lagi!');
} }
if ($permohonan->debiture->documents->isEmpty()) { if ($permohonan->debiture->documents->isEmpty()) {

View File

@@ -104,9 +104,13 @@ class FormSurveyorRequest extends FormRequest
'kondisi_bangunan' => 'nullable', 'kondisi_bangunan' => 'nullable',
'sifat_bangunan' => 'required|array', 'sifat_bangunan' => 'required|array',
'sifat_bangunan_input' => 'nullable|array', 'sifat_bangunan_input' => 'nullable|array',
'nama_bagunan' => 'required|nullable',
'spek_kategori_bangunan.*' => 'required',
'spek_bangunan.*' => 'required', 'nama_bangunan.*' => 'required|string|max:255',
'spek_kategori_bangunan.*' => 'nullable|string',
'spek_bangunan.*.*' => 'array',
'spek_bangunan.*.*.*' => 'string',
'sarana_pelengkap' => 'required', 'sarana_pelengkap' => 'required',
'sarana_pelengkap_input' => 'nullable|array', 'sarana_pelengkap_input' => 'nullable|array',
]; ];
@@ -528,11 +532,11 @@ class FormSurveyorRequest extends FormRequest
'hub_cadeb_penghuni_sesuai' => 'nullable', 'hub_cadeb_penghuni_sesuai' => 'nullable',
'hub_cadeb_penghuni_tidak_sesuai' => 'nullable', 'hub_cadeb_penghuni_tidak_sesuai' => 'nullable',
'nama_jalan' => 'nullable', 'address' => 'nullable',
'desa_kelurahan' => 'nullable', 'village_code' => 'nullable',
'kecamatan' => 'nullable', 'district_code' => 'nullable',
'kota_kabupaten' => 'nullable', 'city_code' => 'nullable',
'provinsi' => 'nullable', 'province_code' => 'nullable',
'kordinat_lng' => 'nullable', 'kordinat_lng' => 'nullable',
'kordinat_lat' => 'nullable', 'kordinat_lat' => 'nullable',
]; ];
@@ -549,7 +553,7 @@ class FormSurveyorRequest extends FormRequest
'fakta_positif' => 'nullable|array', 'fakta_positif' => 'nullable|array',
'fakta_negatif' => 'nullable|array', 'fakta_negatif' => 'nullable|array',
'rute_menuju' => 'nullable', 'rute_menuju' => 'nullable',
'batas_batas' => 'nullable|array', 'batas_batas' => 'required|array',
'batas_batas_input' => 'nullable|array', 'batas_batas_input' => 'nullable|array',
'kondisi_lingkungan' => 'nullable|array', 'kondisi_lingkungan' => 'nullable|array',
'kondisi_lain_bangunan' => 'nullable|array', 'kondisi_lain_bangunan' => 'nullable|array',

View File

@@ -32,11 +32,6 @@ class Penilaian extends Model
return $this->belongsTo(Teams::class, 'teams_id', 'id'); return $this->belongsTo(Teams::class, 'teams_id', 'id');
} }
public function users()
{
return $this->belongsTo(User::class, 'user_id', 'id');
}
public function userPenilai() public function userPenilai()
{ {
return $this->hasMany(PenilaianTeam::class, 'penilaian_id', 'id'); return $this->hasMany(PenilaianTeam::class, 'penilaian_id', 'id');

View File

@@ -32,9 +32,9 @@ class TeamsUsers extends Model
return $this->belongsTo(User::class, 'user_id', 'id'); return $this->belongsTo(User::class, 'user_id', 'id');
} }
public function penilaian() public function penilaianTeam()
{ {
return $this->belongsTo(Penilaian::class, 'teams_id', 'id'); return $this->belongsTo(PenilaianTeam::class, 'team_id', 'id');
} }
} }

View File

@@ -12,7 +12,7 @@ class ArahMataAnginSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
ArahMataAngin::insert([ $arah_mata_angin = [
[ [
'name' => 'Utara', 'name' => 'Utara',
], ],
@@ -37,6 +37,10 @@ class ArahMataAnginSeeder extends Seeder
[ [
'name' => 'Barat Laut', 'name' => 'Barat Laut',
], ],
]); ];
foreach ($arah_mata_angin as $arah) {
ArahMataAngin::insert($arah);
}
} }
} }

View File

@@ -19,9 +19,210 @@ class BranchSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1, ],
'updated_by' => 1 [
] 'code' => 'C02',
'name' => 'Kwitang',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'C03',
'name' => 'Artha Gading',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'C04',
'name' => 'HOS. Cokroaminoto',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'C05',
'name' => 'Manado Sam Ratulangi',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'C06',
'name' => 'SAM',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'C07',
'name' => 'Subdit Appraisal',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'C08',
'name' => 'Admin Kredit',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010001',
'name' => 'PT. Bank Artha Graha',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010002',
'name' => 'SURYOPRANOTO - KC',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010003',
'name' => 'PURI INDAH - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010005',
'name' => 'ARTHA GADING - KC',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010006',
'name' => 'MANGGA DUA HARCO - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010008',
'name' => 'KPO SUDIRMAN',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010009',
'name' => 'MELAWAI - KC',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010010',
'name' => 'SUNTER - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010011',
'name' => 'TANAH ABANG - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010012',
'name' => 'BINTARO - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010015',
'name' => 'MANGGA BESAR - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010016',
'name' => 'BOROBUDUR - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010017',
'name' => 'TANGERANG - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010018',
'name' => 'BURSA EFEK IND - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010020',
'name' => 'P. JAYAKARTA - KC',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010022',
'name' => 'CINERE - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010023',
'name' => 'MENARA GLOBAL - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010025',
'name' => 'KLP GADING BLVD - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010026',
'name' => 'MG DUA PSR PAGI - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010028',
'name' => 'KWITANG - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010029',
'name' => 'COKROAMINOTO - KCP',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'ID0010030',
'name' => 'ASIA AFRIKA BDG - KC',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
]); ]);
} }
} }

View File

@@ -19,9 +19,7 @@ class CurrencySeeder extends Seeder
'decimal_places' => 2, 'decimal_places' => 2,
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'MYR', 'code' => 'MYR',
@@ -29,9 +27,7 @@ class CurrencySeeder extends Seeder
'decimal_places' => 2, 'decimal_places' => 2,
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'SAR', 'code' => 'SAR',
@@ -39,9 +35,7 @@ class CurrencySeeder extends Seeder
'decimal_places' => 2, 'decimal_places' => 2,
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
] ]
]); ]);
} }

View File

@@ -3,6 +3,7 @@
namespace Modules\Lpj\Database\Seeders; namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\Debiture; use Modules\Lpj\Models\Debiture;
class DebitureSeeder extends Seeder class DebitureSeeder extends Seeder
@@ -12,147 +13,6 @@ class DebitureSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
Debiture::insert([ DB::unprepared(file_get_contents(__DIR__ . '/debitures.sql'));
[
'branch_id' => 1,
'cif' => '1234567890',
'name' => 'Willy',
'npwp' => '123455432109876',
'email' => 'w@gmail.com',
'phone' => '08113242341',
'nomor_rekening' => '1081666666',
'province_code' => '31',
'city_code' => '31.74',
'district_code' => '31.74.09',
'village_code' => '31.74.09.1003',
'postal_code' => '12630',
'address' => null,
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'branch_id' => 1,
'cif' => '0987654321',
'name' => 'Antonius Ginting',
'npwp' => '234567890123456',
'email' => 'x@gmail.com',
'phone' => '081234567891',
'nomor_rekening' => '987654310',
'province_code' => '31',
'city_code' => '31.71',
'district_code' => '31.71.06',
'village_code' => '31.71.06.1001',
'postal_code' => '10310',
'address' => 'Jl. Menteng Tengah No.66',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'branch_id' => 1,
'cif' => '1518467',
'name' => 'PT ABCD SEJATI',
'npwp' => '001852600023342',
'email' => 'abcd@ag.co.id',
'phone' => '081111555',
'nomor_rekening' => '0082346',
'province_code' => '31',
'city_code' => '31.74',
'district_code' => '31.74.04',
'village_code' => '31.74.04.1005',
'postal_code' => '10420',
'address' => 'Jl. Raya Kwitang No. 105, Senen, Kwitang, Jakarta Pusat',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'branch_id' => 1,
'cif' => '12345',
'name' => 'Testing',
'npwp' => '102928018391211',
'email' => 'testing@email.com',
'phone' => '098172386',
'nomor_rekening' => '12345',
'province_code' => '11',
'city_code' => '11.01',
'district_code' => '11.01.01',
'village_code' => '11.01.01.2001',
'postal_code' => '23773',
'address' => 'alamat',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'branch_id' => 1,
'cif' => '0000000000',
'name' => 'Gartika Pertiwi',
'npwp' => '123456789101112',
'email' => 'Gartika_Pertiwi@gmail.com',
'phone' => '1234567',
'nomor_rekening' => '1234567',
'province_code' => '31',
'city_code' => '31.71',
'district_code' => '31.71.04',
'village_code' => '31.71.04.1005',
'postal_code' => '10420',
'address' => null,
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'branch_id' => 1,
'cif' => '1235464575',
'name' => 'Fleming',
'npwp' => '123455432109876',
'email' => 'x@gmail.com',
'phone' => '08113242341',
'nomor_rekening' => '1081666666',
'province_code' => '31',
'city_code' => '31.74',
'district_code' => '31.74.09',
'village_code' => '31.74.09.1001',
'postal_code' => '12620',
'address' => 'testt',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'branch_id' => 1,
'cif' => '1234689743',
'name' => 'Testing 2',
'npwp' => '1234689743418451',
'email' => 'testing@mail.com',
'phone' => '081385777611',
'nomor_rekening' => '3575467279562',
'province_code' => '31',
'city_code' => '31.71',
'district_code' => '31.71.06',
'village_code' => '31.71.06.1001',
'postal_code' => '10310',
'address' => 'Jl. Menteng Raya no. 13',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
]);
} }
} }

View File

@@ -3,6 +3,7 @@
namespace Modules\Lpj\Database\Seeders; namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\DokumenJaminan; use Modules\Lpj\Models\DokumenJaminan;
class DokumenJaminanSeeder extends Seeder class DokumenJaminanSeeder extends Seeder
@@ -12,23 +13,6 @@ class DokumenJaminanSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
DokumenJaminan::insert([ DB::unprepared(file_get_contents(__DIR__ . '/dokumen_jaminan.sql'));
[
'debiture_id' => 1,
'jenis_jaminan_id' => 1,
'pemilik_jaminan_id' => 3,
'province_code' => '32',
'city_code' => '32.75',
'district_code' => '32.75.03',
'village_code' => '32.75.03.1001',
'postal_code' => '17125',
'address' => 'Jl. Apel No. 9',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
]
]);
} }
} }

View File

@@ -0,0 +1,57 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Basicdata\Models\HolidayCalendar;
class HolidayCalendarSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$holiday = [
[
'date' => '2024-12-25',
'description' => 'Hari Raya Natal',
'type' => 'national_holiday',
'created_at' => now(),
'updated_at' => now()
],
[
'date' => '2024-12-26',
'description' => 'Cuti Bersama Hari Raya Natal',
'type' => 'collective_leave',
'created_at' => now(),
'updated_at' => now()
],
[
'date' => '2025-01-01',
'description' => 'Tahun Baru Masehi',
'type' => 'national_holiday',
'created_at' => now(),
'updated_at' => now()
],
[
'date' => '2025-01-27',
'description' => 'Isra Mi\'raj',
'type' => 'national_holiday',
'created_at' => now(),
'updated_at' => now()
],
[
'date' => '2025-01-28',
'description' => 'Cuti Bersama Tahun Baru Imlek',
'type' => 'collective_leave',
'created_at' => now(),
'updated_at' => now()
]
];
foreach ($holiday as $item) {
HolidayCalendar::create($item);
}
}
}

View File

@@ -12,7 +12,7 @@ class HubunganPemilikJaminanSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
HubunganPemilikJaminan::insert([ $hubungan_pemilik_jaminan = [
[ [
'name' => 'Milik Pribadi' 'name' => 'Milik Pribadi'
], ],
@@ -31,6 +31,10 @@ class HubunganPemilikJaminanSeeder extends Seeder
[ [
'name' => 'Ibu' 'name' => 'Ibu'
] ]
]); ];
foreach ($hubungan_pemilik_jaminan as $hpj) {
HubunganPemilikJaminan::insert($hpj);
}
} }
} }

View File

@@ -12,7 +12,7 @@ class HubunganPenghuniJaminanSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
HubunganPenghuniJaminan::insert([ $hubungan_penghuni_jaminan = [
[ [
'name' => 'Suami/Istri', 'name' => 'Suami/Istri',
], ],
@@ -28,6 +28,10 @@ class HubunganPenghuniJaminanSeeder extends Seeder
[ [
'name' => 'Kontrak/Kost' 'name' => 'Kontrak/Kost'
] ]
]); ];
foreach ($hubungan_penghuni_jaminan as $hpj) {
HubunganPenghuniJaminan::insert($hpj);
}
} }
} }

View File

@@ -33,7 +33,35 @@ class IjinUsahaSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now() 'updated_at' => now()
] ],
[
'code' => 'IU004',
'name' => 'Properti Sederhana',
'status' => 1,
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'IU005',
'name' => 'Kep Men Keu RI Nomor 104/KM.1/2018',
'status' => 1,
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'IU006',
'name' => 'Kep Men Keu RI Nomor 174/KM.1/2018',
'status' => 1,
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'IU007',
'name' => 'Kep Men Keu RI Nomor 368/KM.1/2020',
'status' => 1,
'created_at' => now(),
'updated_at' => now()
],
]); ]);
} }
} }

View File

@@ -15,54 +15,68 @@ class JenisDokumenSeeder extends Seeder
JenisDokumen::insert([ JenisDokumen::insert([
[ [
'name' => 'Sertifikat', 'name' => 'Sertifikat',
'max_size' => 15, 'max_size' => 30,
'description' => 'Foto copy Sertifikat sesuai dengan asli', 'description' => 'Foto copy Sertifikat sesuai dengan asli',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'PBB/NJOP', 'name' => 'PBB/NJOP',
'max_size' => 15, 'max_size' => 20,
'description' => 'Foto Copy PBB/NJOP Tahun Terakhir', 'description' => 'Foto Copy PBB/NJOP Tahun Terakhir',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'NPWP Perorangan/Perusahaan', 'name' => 'NPWP Perorangan/Perusahaan',
'max_size' => 10, 'max_size' => 20,
'description' => 'Copy NPWP Perorangan/Perusahaan', 'description' => 'Copy NPWP Perorangan/Perusahaan',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Siteplan', 'name' => 'Siteplan',
'max_size' => 10, 'max_size' => 20,
'description' => 'Siteplan', 'description' => 'Siteplan',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Surat Pernyataan Kebenaran Data', 'name' => 'Surat Pernyataan Kebenaran Data',
'max_size' => 5, 'max_size' => 20,
'description' => 'Surat Pernyataan Kebenaran Data (Surat Representasi)', 'description' => 'Surat Pernyataan Kebenaran Data (Surat Representasi)',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1, ],
'updated_by' => 1 [
] 'name' => 'IMB',
'max_size' => 50,
'description' => 'IMB',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'name' => 'Bukti Bayar Appraisal',
'max_size' => 20,
'description' => 'Bukti pembayaran appraisal',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'name' => 'BPKB',
'max_size' => 100000,
'description' => 'BPKB',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
]); ]);
} }
} }

View File

@@ -18,72 +18,56 @@ class JenisFasilitasKreditSeeder extends Seeder
'name' => 'KPR FLPP', 'name' => 'KPR FLPP',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JFK002', 'code' => 'JFK002',
'name' => 'KPR KERJASAMA', 'name' => 'KPR KERJASAMA',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JFK003', 'code' => 'JFK003',
'name' => 'KPR ≤ 500 JT', 'name' => 'KPR ≤ 500 JT',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JFK004', 'code' => 'JFK004',
'name' => 'KPR > 500 JT', 'name' => 'KPR > 500 JT',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JFK005', 'code' => 'JFK005',
'name' => 'KKB', 'name' => 'KKB',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JFK006', 'code' => 'JFK006',
'name' => 'KPA', 'name' => 'KPA',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JFK007', 'code' => 'JFK007',
'name' => 'MODAL KERJA', 'name' => 'MODAL KERJA',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JFK008', 'code' => 'JFK008',
'name' => 'INVESTASI', 'name' => 'INVESTASI',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now()
'created_by' => 1,
'updated_by' => 1
], ],
]); ]);
} }

View File

@@ -17,56 +17,181 @@ class JenisJaminanSeeder extends Seeder
'code' => 'JJ001', 'code' => 'JJ001',
'name' => 'Tanah', 'name' => 'Tanah',
'slug' => 'tanah', 'slug' => 'tanah',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ004","JLJ005","JLJ006"]', 'form_kategori' => '["tanah", "lingkungan", "fakta"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ004","JLJ005","JLJ006","JLJ022"]',
'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'authorized_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JJ002', 'code' => 'JJ002',
'name' => 'Rumah Tinggal / Ruko (Unit) / Apartemen (Unit) / Gudang', 'name' => 'Unit Apartemen',
'slug' => 'rumah-tinggal-ruko-unit-apartemen-unit-gudang', 'slug' => 'unit-apartemen',
'jenis_legalitas_jaminan_id' => null, 'form_kategori' => '["apartemen-kantor", "lingkungan", "fakta", "informasi"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ004","JLJ006","JLJ007","JLJ022","JLJ024"]',
'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'authorized_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JJ003', 'code' => 'JJ003',
'name' => 'Kawasan Industrial / Komersil / Residensial - Perumahan', 'name' => 'Kawasan Industrial / Komersil / Residensial - Perumahan',
'slug' => 'kawasan-industrial-komersil-residensial-perumahan', 'slug' => 'kawasan-industrial-komersil-residensial-perumahan',
'jenis_legalitas_jaminan_id' => null, 'form_kategori' => '["tanah", "bangunan", "lingkungan", "fakta", "informasi"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ004","JLJ006","JLJ007","JLJ008","JLJ022"]',
'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'authorized_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JJ004', 'code' => 'JJ004',
'name' => 'Gedung Apartement / Kantor / Condotel (Strata Tittle)', 'name' => 'Mall',
'slug' => 'gedung-apartement-kantor-condotel-strata-tittle', 'slug' => 'mall',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ002"]', 'form_kategori' => 'null',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ004","JLJ006","JLJ007","JLJ009","JLJ012","JLJ013","JLJ014","JLJ015","JLJ021","JLJ022"]',
'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'authorized_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'JJ005', 'code' => 'JJ005',
'name' => 'Mall', 'name' => 'Pabrik',
'slug' => 'mall', 'slug' => 'pabrik',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ006"]', 'form_kategori' => 'null',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ004","JLJ006","JLJ007","JLJ009","JLJ011"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ006',
'name' => 'Emas dan Perak',
'slug' => 'emas-dan-perak',
'form_kategori' => 'null',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ007","JLJ014","JLJ022"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ007',
'name' => 'Alat Berat',
'slug' => 'alat-berat',
'form_kategori' => 'null',
'jenis_legalitas_jaminan_id' => '["JLJ004"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ008',
'name' => 'Rumah Tinggal',
'slug' => 'rumah-tinggal',
'form_kategori' => '["tanah", "bangunan", "lingkungan", "fakta", "informasi"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ004","JLJ006","JLJ007","JLJ009","JLJ024"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ009',
'name' => 'Pabrik',
'slug' => 'pabrik',
'form_kategori' => '["tanah", "bangunan", "lingkungan", "fakta", "informasi"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ006","JLJ007","JLJ009"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ010',
'name' => 'Gudang',
'slug' => 'gudang',
'form_kategori' => '["tanah", "bangunan", "lingkungan", "fakta", "informasi"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ007","JLJ009","JLJ024"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ011',
'name' => 'Unit Kios',
'slug' => 'unit-kios',
'form_kategori' => '["apartemen-kantor", "lingkungan", "fakta", "informasi"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ007","JLJ009","JLJ024"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ012',
'name' => 'Gedung Mall',
'slug' => 'gedung-mall',
'form_kategori' => '["tanah", "bangunan", "lingkungan", "fakta", "informasi"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ007","JLJ009"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ013',
'name' => 'Tanah Bangunan',
'slug' => 'tanah-bangunan',
'form_kategori' => '["tanah", "bangunan"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ005","JLJ007","JLJ009","JLJ022","JLJ024"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ014',
'name' => 'Apartemen',
'slug' => 'apartemen',
'form_kategori' => '["apartemen-kantor", "lingkungan", "fakta", "informasi"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ022","JLJ024"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ015',
'name' => 'Ruko',
'slug' => 'ruko',
'form_kategori' => '["tanah", "bangunan"]',
'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ007","JLJ022"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ016',
'name' => 'Mesin Tekstil',
'slug' => 'mesin-tekstil',
'form_kategori' => '["mesin"]',
'jenis_legalitas_jaminan_id' => '["JLJ011","JLJ022"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ017',
'name' => 'Mesin',
'slug' => 'mesin',
'form_kategori' => '["mesin"]',
'jenis_legalitas_jaminan_id' => '["JLJ011","JLJ022"]',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'JJ018',
'name' => 'Mesin Tenun Tekstil',
'slug' => 'mesin-tenun-tekstil',
'form_kategori' => '["mesin"]',
'jenis_legalitas_jaminan_id' => '["JLJ011","JLJ022"]',
'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'authorized_at' => null,
'created_by' => 1,
'updated_by' => 1
] ]
]); ]);
} }

View File

@@ -3,6 +3,7 @@
namespace Modules\Lpj\Database\Seeders; namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\JenisLegalitasJaminan; use Modules\Lpj\Models\JenisLegalitasJaminan;
class JenisLegalitasJaminanSeeder extends Seeder class JenisLegalitasJaminanSeeder extends Seeder
@@ -12,105 +13,6 @@ class JenisLegalitasJaminanSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
JenisLegalitasJaminan::insert([ DB::unprepared(file_get_contents(__DIR__ . '/jenis_legalitas_jaminan.sql'));
[
'code' => 'JLJ001',
'name' => 'Sertifikat',
'slug' => 'sertifikat',
'custom_field' => 'Luas Tanah',
'custom_field_type' => 'number',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
],
[
'code' => 'JLJ002',
'name' => 'SHGB',
'slug' => 'shgb',
'custom_field' => null,
'custom_field_type' => null,
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'deleted_at' => now(),
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => 1
],
[
'code' => 'JLJ003',
'name' => 'Copy PBB / NJOP Tahun Terakhir (Jika Ada)',
'slug' => 'copy-pbb-njop-tahun-terakhir-jika-ada',
'custom_field' => null,
'custom_field_type' => null,
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
],
[
'code' => 'JLJ004',
'name' => 'Copy NPWP Perusahaan/Perorangan',
'slug' => 'copy-npwp-perusahaanperorangan',
'custom_field' => null,
'custom_field_type' => null,
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
],
[
'code' => 'JLJ005',
'name' => 'Siteplan',
'slug' => 'siteplan',
'custom_field' => null,
'custom_field_type' => null,
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
],
[
'code' => 'JLJ006',
'name' => 'Surat Pernyataan Kebenaran Data (Surat Representasi)',
'slug' => 'surat-pernyataan-kebenaran-data-surat-representasi',
'custom_field' => null,
'custom_field_type' => null,
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
],
[
'code' => 'JLJ007',
'name' => 'IMB',
'slug' => 'imb',
'custom_field' => 'Luas Bangunan',
'custom_field_type' => 'number',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
]
]);
} }
} }

View File

@@ -12,7 +12,7 @@ class JenisPenilaianSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
JenisPenilaian::insert([ $jenis_penilaian = [
[ [
'code' => 'JP1', 'code' => 'JP1',
'name' => 'Internal', 'name' => 'Internal',
@@ -25,6 +25,10 @@ class JenisPenilaianSeeder extends Seeder
'created_at' => now(), 'created_at' => now(),
'updated_at' => now() 'updated_at' => now()
], ],
]); ];
foreach ($jenis_penilaian as $value) {
JenisPenilaian::insert($value);
}
} }
} }

View File

@@ -2,8 +2,8 @@
namespace Modules\Lpj\Database\Seeders; namespace Modules\Lpj\Database\Seeders;
use Modules\Lpj\Models\KJPP;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class KJPPSeeder extends Seeder class KJPPSeeder extends Seeder
{ {
@@ -12,91 +12,6 @@ class KJPPSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
KJPP::insert([ DB::unprepared(file_get_contents(__DIR__ . '/kjpp.sql'));
[
'code' => 'K000101',
'name' => 'Bank Anda',
'jenis_kantor' => 'Kantor Pusat',
'nomor_ijin_usaha' => 'IU001',
'province_code' => '32',
'city_code' => '32.75',
'district_code' => '32.75.03',
'village_code' => '32.75.03.1001',
'address' => 'Jl. Apel no. 1',
'postal_code' => '17125',
'nomor_telepon_kantor' => '0219976896',
'email_kantor' => 'bankanda@bankanda.id',
'nama_pimpinan' => 'Ida Royani',
'nomor_hp_pimpinan' => '081800908070',
'nama_pic_reviewer' => 'Beno',
'nomor_hp_pic_reviewer' => '081765489070',
'nama_pic_admin' => 'Dani',
'nomor_hp_pic_admin' => '081278786666',
'nama_pic_marketing' => 'Feni',
'nomor_hp_pic_marketing' => '087867590801',
'ijin_usaha_id' => '["IU001","IU002"]',
'jenis_aset_id' => '["JJ001","JJ002","JJ003"]',
'attachment' => 'default.pdf',
'status' => 1,
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'K000201',
'name' => 'Bank Juri',
'jenis_kantor' => 'Kantor Pusat',
'nomor_ijin_usaha' => 'IU001',
'province_code' => '12',
'city_code' => '12.04',
'district_code' => '12.04.11',
'village_code' => '12.04.11.2005',
'address' => 'Jl. Mangga no. 1',
'postal_code' => '22876',
'nomor_telepon_kantor' => '0219976890',
'email_kantor' => 'bankjuri@bankjuri.id',
'nama_pimpinan' => 'Arif Simbolo bolo',
'nomor_hp_pimpinan' => '089643475023',
'nama_pic_reviewer' => 'Beno Harefa',
'nomor_hp_pic_reviewer' => '081765489080',
'nama_pic_admin' => 'Dani Harefa',
'nomor_hp_pic_admin' => '081278786667',
'nama_pic_marketing' => 'Feni Harefa',
'nomor_hp_pic_marketing' => '081765489075',
'ijin_usaha_id' => '["IU001","IU002","IU003"]',
'jenis_aset_id' => '["JJ001","JJ004","JJ003"]',
'attachment' => 'default.pdf',
'status' => 1,
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'K000301',
'name' => 'Bank Gantra',
'jenis_kantor' => 'Kantor Pusat',
'nomor_ijin_usaha' => 'IU001',
'province_code' => '12',
'city_code' => '12.21',
'district_code' => '12.21.05',
'village_code' => '12.21.05.2005',
'address' => 'Jl. Apel no. 1',
'postal_code' => '22776',
'nomor_telepon_kantor' => '0219976889',
'email_kantor' => 'bankgantra@bankgantra.id',
'nama_pimpinan' => 'Arif Simantra',
'nomor_hp_pimpinan' => '089643475020',
'nama_pic_reviewer' => 'Beno Aditya',
'nomor_hp_pic_reviewer' => '081765489079',
'nama_pic_admin' => 'Dani Maulana',
'nomor_hp_pic_admin' => '081278786680',
'nama_pic_marketing' => 'Feni Rose',
'nomor_hp_pic_marketing' => '081890901234',
'ijin_usaha_id' => '["IU001","IU002","IU003"]',
'jenis_aset_id' => '["JJ001","JJ002","JJ005"]',
'attachment' => 'default.pdf',
'status' => 1,
'created_at' => now(),
'updated_at' => now()
]
]);
} }
} }

View File

@@ -12,31 +12,32 @@ class LpjDatabaseSeeder extends Seeder
public function run(): void public function run(): void
{ {
$this->call([ $this->call([
// BranchSeeder::class, BranchSeeder::class,
// CurrencySeeder::class, CurrencySeeder::class,
// JenisFasilitasKreditSeeder::class, HolidayCalendarSeeder::class,
// JenisLegalitasJaminanSeeder::class, JenisFasilitasKreditSeeder::class,
// JenisJaminanSeeder::class, JenisLegalitasJaminanSeeder::class,
// JenisDokumenSeeder::class, JenisJaminanSeeder::class,
// TujuanPenilaianSeeder::class, JenisDokumenSeeder::class,
// NilaiPlatformSeeder::class, TujuanPenilaianSeeder::class,
// HubunganPemilikJaminanSeeder::class, NilaiPlatformSeeder::class,
// HubunganPenghuniJaminanSeeder::class, HubunganPemilikJaminanSeeder::class,
// ArahMataAnginSeeder::class, HubunganPenghuniJaminanSeeder::class,
// StatusPermohonanSeeder::class, ArahMataAnginSeeder::class,
// RegionSeeder::class, StatusPermohonanSeeder::class,
// TeamsSeeder::class, RegionSeeder::class,
// TeamUsersSeeder::class, TeamsSeeder::class,
// JenisPenilaianSeeder::class, TeamUsersSeeder::class,
// TujuanPenilaianKJPPSeeder::class, JenisPenilaianSeeder::class,
// IjinUsahaSeeder::class, IjinUsahaSeeder::class,
// JenisLaporanSeeder::class, TujuanPenilaianKJPPSeeder::class,
// DebitureSeeder::class, KJPPSeeder::class,
// PermohonanSeeder::class, JenisLaporanSeeder::class,
DebitureSeeder::class,
PemilikJaminanSeeder::class, PemilikJaminanSeeder::class,
// DokumenJaminanSeeder::class, DokumenJaminanSeeder::class,
// DetailDokumenJaminanSeeder::class, DetailDokumenJaminanSeeder::class,
// KJPPSeeder::class, PermohonanSeeder::class,
// PenawaranSeeder::class, // PenawaranSeeder::class,
// DetailPenawaranSeeder::class, // DetailPenawaranSeeder::class,
// PenilaianSeeder::class, // PenilaianSeeder::class,

View File

@@ -12,15 +12,13 @@ class NilaiPlatformSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
NilaiPlafond::insert([ $nilai_platfond = [
[ [
'code' => 'NP001', 'code' => 'NP001',
'name' => '5 M - 10 M', 'name' => '5 M - 10 M',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'NP002', 'code' => 'NP002',
@@ -28,8 +26,6 @@ class NilaiPlatformSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'code' => 'NP003', 'code' => 'NP003',
@@ -37,9 +33,18 @@ class NilaiPlatformSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1, ],
'updated_by' => 1 [
'code' => 'NP004',
'name' => '> 10 M',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
] ]
]); ];
foreach ($nilai_platfond as $np) {
NilaiPlafond::insert($np);
}
} }
} }

View File

@@ -3,6 +3,7 @@
namespace Modules\Lpj\Database\Seeders; namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\PemilikJaminan; use Modules\Lpj\Models\PemilikJaminan;
class PemilikJaminanSeeder extends Seeder class PemilikJaminanSeeder extends Seeder
@@ -12,107 +13,6 @@ class PemilikJaminanSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
PemilikJaminan::insert([ DB::unprepared(file_get_contents(__DIR__ . '/pemilik_jaminan.sql'));
[
'debiture_id' => 2,
'hubungan_pemilik_jaminan_id' => 1,
'name' => 'Antonius Ginting',
'npwp' => '234567890123456',
'nomor_id' => '13144213123',
'email' => 'x@gmail.com',
'phone' => '081234567891',
'province_code' => '31',
'city_code' => '31.71',
'district_code' => '31.71.06',
'village_code' => '31.71.06.1001',
'postal_code' => '10310',
'address' => 'Jl. Menteng Tengah No.66',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'debiture_id' => 7,
'hubungan_pemilik_jaminan_id' => 1,
'name' => 'Rahmat Rafli',
'npwp' => '1234689743418451',
'nomor_id' => '32754590325823',
'email' => 'testing@mail.com',
'phone' => '081385777611',
'province_code' => '32',
'city_code' => '32.75',
'district_code' => '32.75.03',
'village_code' => '32.75.03.1001',
'postal_code' => '10310',
'address' => 'Jl. Apel 1 no. 9',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'debiture_id' => 1,
'hubungan_pemilik_jaminan_id' => 1,
'name' => 'Willy',
'npwp' => '123455432109876',
'nomor_id' => null,
'email' => 'w@gmail.com',
'phone' => '08113242341',
'province_code' => '31',
'city_code' => '31.74',
'district_code' => '31.74.09',
'village_code' => '31.74.09.1003',
'postal_code' => '12630',
'address' => null,
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'debiture_id' => 4,
'hubungan_pemilik_jaminan_id' => 1,
'name' => 'Testing',
'npwp' => '1029280183912111',
'nomor_id' => null,
'email' => 'testing@email.com',
'phone' => '098172386',
'province_code' => '11',
'city_code' => '11.01',
'district_code' => '11.01.01',
'village_code' => '11.01.01.2001',
'postal_code' => '23773',
'address' => 'alamat',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
],
[
'debiture_id' => 7,
'hubungan_pemilik_jaminan_id' => 1,
'name' => 'Testing 2',
'npwp' => '1234689743418451',
'nomor_id' => null,
'email' => 'testing@mail.com',
'phone' => '081385777611',
'province_code' => '31',
'city_code' => '31.71',
'district_code' => '31.71.06',
'village_code' => '31.71.06.1001',
'postal_code' => '10310',
'address' => 'Jl. Menteng Raya no. 13',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
]
]);
} }
} }

View File

@@ -3,6 +3,7 @@
namespace Modules\Lpj\Database\Seeders; namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\Permohonan; use Modules\Lpj\Models\Permohonan;
class PermohonanSeeder extends Seeder class PermohonanSeeder extends Seeder
@@ -12,115 +13,6 @@ class PermohonanSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
Permohonan::insert([ DB::unprepared(file_get_contents(__DIR__ . '/permohonan.sql'));
[
'nomor_registrasi' => 'REG0000002',
'tanggal_permohonan' => '2024-09-11',
'user_id' => 1,
'branch_id' => 1,
'tujuan_penilaian_id' => 1,
'debiture_id' => 1,
'status' => 'registered',
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1,
'jenis_fasilitas_kredit_id' => 1,
'nilai_plafond_id' => 1,
'status_bayar' => 'sudah_bayar',
'nilai_njop' => 'KJM3413259230951024',
'jenis_penilaian_id' => 2
],
[
'nomor_registrasi' => 'REG0000003',
'tanggal_permohonan' => '2024-09-13',
'user_id' => 1,
'branch_id' => 1,
'tujuan_penilaian_id' => 1,
'debiture_id' => 1,
'status' => 'registered',
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1,
'jenis_fasilitas_kredit_id' => 1,
'nilai_plafond_id' => 1,
'status_bayar' => 'sudah_bayar',
'nilai_njop' => 'KJM3413259230951025',
'jenis_penilaian_id' => 2
],
[
'nomor_registrasi' => 'REG0000006',
'tanggal_permohonan' => '2024-10-18',
'user_id' => 1,
'branch_id' => 1,
'tujuan_penilaian_id' => 1,
'debiture_id' => 2,
'status' => 'registered',
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1,
'jenis_fasilitas_kredit_id' => 4,
'nilai_plafond_id' => 1,
'status_bayar' => 'sudah_bayar',
'nilai_njop' => '23425654765868',
'jenis_penilaian_id' => 2
],
[
'nomor_registrasi' => 'REG0000007',
'tanggal_permohonan' => '2024-10-28',
'user_id' => 1,
'branch_id' => 1,
'tujuan_penilaian_id' => 7,
'debiture_id' => 4,
'status' => 'done',
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1,
'jenis_fasilitas_kredit_id' => 7,
'nilai_plafond_id' => 1,
'status_bayar' => 'sudah_bayar',
'nilai_njop' => '421354365747658',
'jenis_penilaian_id' => 2
],
[
'nomor_registrasi' => 'REG0000008',
'tanggal_permohonan' => '2024-10-28',
'user_id' => 1,
'branch_id' => 1,
'tujuan_penilaian_id' => 1,
'debiture_id' => 7,
'status' => 'done',
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1,
'jenis_fasilitas_kredit_id' => 7,
'nilai_plafond_id' => 2,
'status_bayar' => 'sudah_bayar',
'nilai_njop' => '421354365747659',
'jenis_penilaian_id' => 2
],
[
'nomor_registrasi' => 'REG0000010',
'tanggal_permohonan' => '2024-10-28',
'user_id' => 1,
'branch_id' => 1,
'tujuan_penilaian_id' => 5,
'debiture_id' => 7,
'status' => 'done',
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1,
'jenis_fasilitas_kredit_id' => 4,
'nilai_plafond_id' => 1,
'status_bayar' => 'sudah_bayar',
'nilai_njop' => '421354365747660',
'jenis_penilaian_id' => 2
]
]);
} }
} }

View File

@@ -12,7 +12,7 @@ class RegionSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
Regions::insert([ $region = [
[ [
'code' => 'R01', 'code' => 'R01',
'name' => 'Region 1', 'name' => 'Region 1',
@@ -24,7 +24,29 @@ class RegionSeeder extends Seeder
'name' => 'Region 2', 'name' => 'Region 2',
'created_at' => now(), 'created_at' => now(),
'updated_at' => now() 'updated_at' => now()
],
[
'code' => 'R03',
'name' => 'Region 3',
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'R04',
'name' => 'Region 4',
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'R05',
'name' => 'Region 5',
'created_at' => now(),
'updated_at' => now()
] ]
]); ];
foreach ($region as $value) {
Regions::insert($value);
}
} }
} }

View File

@@ -12,7 +12,7 @@ class StatusPermohonanSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
StatusPermohonan::insert([ $status_permohonan = [
[ [
'name' => 'Order', 'name' => 'Order',
'slug' => 'order', 'slug' => 'order',
@@ -20,8 +20,6 @@ class StatusPermohonanSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Revisi', 'name' => 'Revisi',
@@ -30,8 +28,6 @@ class StatusPermohonanSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Register', 'name' => 'Register',
@@ -40,8 +36,6 @@ class StatusPermohonanSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Assign', 'name' => 'Assign',
@@ -50,8 +44,6 @@ class StatusPermohonanSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Survey', 'name' => 'Survey',
@@ -60,8 +52,6 @@ class StatusPermohonanSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Proses Laporan', 'name' => 'Proses Laporan',
@@ -70,8 +60,6 @@ class StatusPermohonanSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Approved', 'name' => 'Approved',
@@ -80,8 +68,6 @@ class StatusPermohonanSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Delivered', 'name' => 'Delivered',
@@ -90,39 +76,43 @@ class StatusPermohonanSeeder extends Seeder
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Registered', 'name' => 'Preregistered',
'slug' => 'registered', 'slug' => 'preregistered',
'description' => 'abc', 'description' => null,
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Tender', 'name' => 'Tender',
'slug' => 'tender', 'slug' => 'tender',
'description' => 'abc', 'description' => 'Data Penawaran ke KJPP',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
], ],
[ [
'name' => 'Done', 'name' => 'Proses Penawaran',
'slug' => 'done', 'slug' => 'proses-penawaran',
'description' => 'abc', 'description' => 'Approval Penawaran/Otorisasi Tender',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'created_by' => 1, ],
'updated_by' => 1 [
] 'name' => 'Registrasi Final',
]); 'slug' => 'registrasi-final',
'description' => 'Registrasi Final',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
],
];
foreach ($status_permohonan as $value) {
StatusPermohonan::create($value);
}
} }
} }

View File

@@ -15,14 +15,14 @@ class TeamUsersSeeder extends Seeder
TeamsUsers::insert([ TeamsUsers::insert([
[ [
'teams_id' => 1, 'teams_id' => 1,
'user_id' => 3, 'user_id' => 6,
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now() 'updated_at' => now()
], ],
[ [
'teams_id' => 2, 'teams_id' => 1,
'user_id' => 4, 'user_id' => 5,
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now() 'updated_at' => now()

View File

@@ -16,14 +16,7 @@ class TeamsSeeder extends Seeder
[ [
'regions_id' => 1, 'regions_id' => 1,
'code' => 'T01', 'code' => 'T01',
'name' => 'Penilai 1', 'name' => 'Team 1',
'created_at' => now(),
'updated_at' => now()
],
[
'regions_id' => 2,
'code' => 'T02',
'name' => 'Penilai 2',
'created_at' => now(), 'created_at' => now(),
'updated_at' => now() 'updated_at' => now()
] ]

View File

@@ -20,9 +20,6 @@ class TujuanPenilaianSeeder extends Seeder
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'deleted_at' => null, 'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
], ],
[ [
'code' => 'TP0002', 'code' => 'TP0002',
@@ -31,64 +28,38 @@ class TujuanPenilaianSeeder extends Seeder
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'deleted_at' => null, 'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
], ],
[ [
'code' => 'TP0003', 'code' => 'TP0003',
'name' => 'Review',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'deleted_at' => now(),
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => 1
],
[
'code' => 'TP0004',
'name' => 'Lelang', 'name' => 'Lelang',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'deleted_at' => null, 'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
], ],
[ [
'code' => 'TP0005', 'code' => 'TP0004',
'name' => 'RAP', 'name' => 'RAP',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'deleted_at' => null, 'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
], ],
[ [
'code' => 'TP0006', 'code' => 'TP0005',
'name' => 'Revaluasi Aset', 'name' => 'Revaluasi Aset',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'deleted_at' => null, 'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
], ],
[ [
'code' => 'TP0007', 'code' => 'TP0006',
'name' => 'Asuransi', 'name' => 'Asuransi',
'status' => 1, 'status' => 1,
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
'deleted_at' => null, 'deleted_at' => null,
'created_by' => 1,
'updated_by' => 1,
'deleted_by' => null
] ]
]); ]);
} }

View File

@@ -0,0 +1,6 @@
--
-- Dumping data for table `debitures`
--
INSERT INTO `debitures` (`id`, `branch_id`, `cif`, `name`, `registered_at`, `npwp`, `nomor_id`, `email`, `phone`, `nomor_rekening`, `province_code`, `city_code`, `district_code`, `village_code`, `postal_code`, `address`, `status`, `created_at`, `updated_at`, `authorized_at`, `authorized_status`, `deleted_at`, `created_by`, `updated_by`, `deleted_by`, `authorized_by`) VALUES
(1, 1, '6481479735', 'Asep', NULL, '5236592157614215', NULL, 'asep@gmail.com', '081743541243', '572036750125602156', '32', '32.73', '32.73.07', '32.73.07.1001', '40161', 'Jl. Sukamaju no. 1', 1, '2024-12-05 21:23:52', '2024-12-05 21:23:52', NULL, NULL, NULL, NULL, NULL, NULL, NULL);

View File

@@ -0,0 +1,13 @@
--
-- Dumping data for table `detail_dokumen_jaminan`
--
INSERT INTO `detail_dokumen_jaminan` (`id`, `name`, `dokumen_jaminan_id`, `details`, `jenis_legalitas_jaminan_id`, `dokumen_jaminan`, `dokumen_nomor`, `keterangan`, `status`, `created_at`, `updated_at`, `authorized_at`, `authorized_status`, `deleted_at`, `created_by`, `updated_by`, `deleted_by`, `authorized_by`) VALUES
(1, 'Sertifikat', 1, '{\"luas_tanah\":\"50\"}', 1, '[\"jaminan\\/1\\/1\\/Test.pdf\"]', '[\"111111\"]', 'Ini adalah Sertifikat Rumah', 1, '2024-12-06 02:38:19', '2024-12-06 02:38:19', NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(2, 'Copy PBB / NJOP Tahun Terakhir (Jika Ada)', 1, '', 3, '[\"jaminan\\/1\\/1\\/Test.pdf\"]', '[\"222222\"]', 'Ini Fotocopy PBB Rumah', 1, '2024-12-06 02:38:19', '2024-12-06 02:38:19', NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(3, 'Copy NPWP Perusahaan/Perorangan', 1, '', 4, '[\"jaminan\\/1\\/1\\/Test.pdf\"]', '[\"333333\"]', 'Ini Fotocopy NPWP Rumah', 1, '2024-12-06 02:38:19', '2024-12-06 02:38:19', NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(4, 'Surat Pernyataan Kebenaran Data (Surat Representasi)', 1, '', 6, '[\"jaminan\\/1\\/1\\/Test.pdf\"]', '[\"444444\"]', 'Ini Surat Pernyataan Kebenaran Data Rumah', 1, '2024-12-06 02:38:19', '2024-12-06 02:38:19', NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5, 'IMB', 1, '{\"luas_bangunan\":\"70\"}', 7, '[\"jaminan\\/1\\/1\\/Test.pdf\"]', '[\"555555\"]', 'Ini IMB Rumah', 1, '2024-12-06 02:38:19', '2024-12-06 02:38:19', NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(6, 'Blue Print (Layout Bangunan)', 1, '', 9, '[\"jaminan\\/1\\/1\\/Test.pdf\"]', '[\"666666\"]', 'Ini Blue Print Rumah', 1, '2024-12-06 02:38:19', '2024-12-06 02:38:19', NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(7, 'PPJB', 1, '', 23, '[\"jaminan\\/1\\/1\\/Test.pdf\"]', '[\"777777\"]', 'ini PPJB Rumah', 1, '2024-12-06 02:38:19', '2024-12-06 02:38:19', NULL, NULL, NULL, NULL, NULL, NULL, NULL);

View File

@@ -0,0 +1,6 @@
--
-- Dumping data for table `dokumen_jaminan`
--
INSERT INTO `dokumen_jaminan` (`id`, `debiture_id`, `permohonan_id`, `jenis_jaminan_id`, `pemilik_jaminan_id`, `province_code`, `city_code`, `district_code`, `village_code`, `postal_code`, `address`, `status`, `created_at`, `updated_at`, `authorized_at`, `authorized_status`, `deleted_at`, `created_by`, `updated_by`, `deleted_by`, `authorized_by`) VALUES
(1, 1, NULL, 8, 1, '32', '32.73', '32.73.07', '32.73.07.1001', '40161', 'Jl. Sukamaju no. 1', 1, '2024-12-06 02:38:18', '2024-12-06 02:38:18', NULL, NULL, NULL, NULL, NULL, NULL, NULL);

View File

@@ -0,0 +1,24 @@
INSERT INTO `jenis_legalitas_jaminan` (`code`, `created_at`, `custom_field`, `custom_field_type`, `deleted_at`, `name`, `slug`, `status`, `updated_at`) VALUES
('JLJ001', '2024-12-06 09:04:50', 'luas_tanah', 'text', NULL, 'Sertifikat', 'sertifikat', 1, '2024-12-06 09:04:50'),
('JLJ002', '2024-12-06 09:04:50', NULL, NULL, NULL, 'SHGB', 'shgb', 1, '2024-12-06 09:04:50'),
('JLJ003', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Copy PBB / NJOP Tahun Terakhir (Jika Ada)', 'copy-pbb-njop-tahun-terakhir-jika-ada', 1, '2024-12-06 09:04:50'),
('JLJ004', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Copy NPWP Perusahaan/Perorangan', 'copy-npwp-perusahaanperorangan', 1, '2024-12-06 09:04:50'),
('JLJ005', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Siteplan', 'siteplan', 1, '2024-12-06 09:04:50'),
('JLJ006', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Surat Pernyataan Kebenaran Data (Surat Representasi)', 'surat-pernyataan-kebenaran-data-surat-representasi', 1, '2024-12-06 09:04:50'),
('JLJ007', '2024-12-06 09:04:50', 'luas_bangunan', 'text', NULL, 'IMB', 'imb', 1, '2024-12-06 09:04:50'),
('JLJ008', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Daftar Inventaris', 'daftar-inventaris', 1, '2024-12-06 09:04:50'),
('JLJ009', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Blue Print (Layout Bangunan)', 'blue-print-layout-bangunan', 1, '2024-12-06 09:04:50'),
('JLJ010', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Invoice lift, genset dan prasaranan lainnya (jika ada)', 'invoice-lift-genset-dan-prasaranan-lainnya-jika-ada', 1, '2024-12-06 09:04:50'),
('JLJ011', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Invoice Mesin dan Peralatan (Jika Dijaminkan)', 'invoice-mesin-dan-peralatan-jika-dijaminkan', 1, '2024-12-06 09:04:50'),
('JLJ012', '2024-12-06 09:04:50', NULL, NULL, NULL, 'RAB Mall', 'rab-mall', 1, '2024-12-06 09:04:50'),
('JLJ013', '2024-12-06 09:04:50', NULL, NULL, NULL, 'List Tenant (Harga Sewa) beserta Luasan', 'list-tenant-harga-sewa-beserta-luasan', 1, '2024-12-06 09:04:50'),
('JLJ014', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Fixed Aset', 'fixed-aset', 1, '2024-12-06 09:04:50'),
('JLJ015', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Laporan keuangan 5 tahun terakhir', 'laporan-keuangan-5-tahun-terakhir', 1, '2024-12-06 09:04:50'),
('JLJ016', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Copy Stock Opname', 'copy-stock-opname', 1, '2024-12-06 09:04:50'),
('JLJ017', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Occupancy', 'occupancy', 1, '2024-12-06 09:04:50'),
('JLJ018', '2024-12-06 09:04:50', NULL, NULL, NULL, 'BOQ (Bill of Quantity)', 'boq-bill-of-quantity', 1, '2024-12-06 09:04:50'),
('JLJ019', '2024-12-06 09:04:50', NULL, NULL, NULL, 'MICE (Meeting, Incentives, Conventions and Exhibitions)', 'mice-meeting-incentives-conventions-and-exhibitions', 1, '2024-12-06 09:04:50'),
('JLJ020', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Rate Kamar pertipe, Jumlah Kamar, Luas Kamar Pertipe', 'rate-kamar-pertipe-jumlah-kamar-luas-kamar-pertipe', 1, '2024-12-06 09:04:50'),
('JLJ021', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Analisis Kompetitor', 'analisis-kompetitor', 1, '2024-12-06 09:04:50'),
('JLJ022', '2024-12-06 09:04:50', NULL, NULL, NULL, 'Bukti Bayar', 'bukti-bayar', 1, '2024-12-06 09:04:50'),
('JLJ024', '2024-12-06 09:04:50', NULL, NULL, NULL, 'PPJB', 'ppjb', 1, '2024-12-06 09:04:50');

33
database/seeders/kjpp.sql Normal file
View File

@@ -0,0 +1,33 @@
--
-- Dumping data for table `kjpp`
--
INSERT INTO `kjpp` (`id`, `code`, `name`, `jenis_kantor`, `nomor_ijin_usaha`, `province_code`, `city_code`, `district_code`, `village_code`, `address`, `postal_code`, `nomor_telepon_kantor`, `email_kantor`, `detail_email_kantor`, `nama_pimpinan`, `detail_nama_pimpinan`, `nomor_hp_pimpinan`, `detail_nomor_hp_pimpinan`, `nama_pic_reviewer`, `detail_nama_pic_reviewer`, `nomor_hp_pic_reviewer`, `detail_nomor_hp_pic_reviewer`, `nama_pic_admin`, `detail_nama_pic_admin`, `nomor_hp_pic_admin`, `detail_nomor_hp_pic_admin`, `nama_pic_marketing`, `detail_nama_pic_marketing`, `nomor_hp_pic_marketing`, `detail_nomor_hp_pic_marketing`, `ijin_usaha_id`, `jenis_aset_id`, `attachment`, `status`, `authorized_status`, `authorized_at`, `authorized_by`, `deleted_at`, `deleted_by`, `created_at`, `updated_at`) VALUES
(1, 'K000101', 'Abdullah Fitriantoro dan Rekan', 'Kantor Pusat', '674/KM.1/2009', '31', '31.74', '31.74.06', '31.74.06.1004', 'Komp. Golden Plaza Blok G43-44, Jl. RS. Fatmawati No. 15', '12420', '0217659717', 'admin@kjpp-afr.com', '[]', 'Ir. Abdullah Fitriantoro, M.Sc', '[]', '0811182414', '[]', 'Ir. Agus Hartoyo', '[{\"nama_pic_reviewer\":\"Dwitya Adhi Widagdho, S.T\"},{\"nama_pic_reviewer\":\"Fardia Paramita, S.T, Mec. Dev\"},{\"nama_pic_reviewer\":\"Nurhery Firmansyah, S.P\"}]', '08128099909', '[{\"nomor_hp_pic_reviewer\":\"08174976079\"},{\"nomor_hp_pic_reviewer\":\"08119961910\"},{\"nomor_hp_pic_reviewer\":\"081324783344\"}]', 'Maria Ulfah', '[]', '0811936969', '[]', 'M. Fajar Aristya, S.T', '[]', '085284497868', '[]', '[\"IU002\"]', '[\"JJ013\",\"JJ015\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 16:28:32', '2024-12-05 16:28:32'),
(2, 'K000102', 'Abdullah Fitriantoro dan Rekan', 'Kantor Cabang', '1493/KM.1/2012', '35', '35.78', '35.78.07', '35.78.07.1002', 'Komplek Andhika Plaza A7 Jalan Simpang Dukuh No. 38-40', '60275', '0315473634', 'kjppabdullahsby@yahoo.co.id', '[]', 'Rudi Ardiyanto, S.T', '[]', '08123275094', '[]', 'Joko Wahyudi, S.T', '[]', '081331939212', '[]', 'Maharani Rahma Wati, S.Hum.', '[]', '082335629625', '[]', 'Riski Wulandari Priyantiningrum, S.T.', '[]', '0818377055', '[]', '[\"IU002\"]', '[\"JJ001\",\"JJ008\",\"JJ015\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 16:33:01', '2024-12-05 16:33:01'),
(3, 'K000105', 'Abdullah Fitriantoro dan Rekan', 'Kantor Cabang', '515/KM.1/2014', '12', '12.71', '12.71.02', '12.71.02.1005', 'Jl. Setia Budi Kompk NCC No. 2 C', '20122', '0614155488', 'kjppafr.cabmedan@gmail.com', '[]', 'Juliardi, S.E, MMPP', '[]', '081361522780', '[]', 'Siti Mutiah Hasibuan', '[]', '085297396860', '[]', 'Devi Ruwaidah', '[]', '085358085569', '[]', 'Desti', '[]', '081375743148', '[]', '[\"IU002\"]', '[\"JJ013\",\"JJ007\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 18:26:56', '2024-12-05 18:26:56'),
(4, 'K000106', 'Abdullah Fitriantoro dan Rekan', 'Kantor Cabang', '143/KM.1/2016', '73', '73.71', '73.71.12', '73.71.12.1004', 'Jl. Nipa-Nipa Raya Poros UVRI Ruko Baruga Mas No. 1', '90234', '0411491588', 'addconsulting_mksr@yahoo.co.id', '[]', 'Abdullah Najang, S.Si,', '[]', '082194763932', '[]', 'Erniwati, S.Pd', '[]', '085256101921', '[]', 'Isnaini Chaidir', '[]', '081333595964', '[]', 'Abdullah Najang, S.Si,', '[]', '082194763932', '[]', '[\"IU002\"]', '[\"JJ007\",\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 18:32:21', '2024-12-05 18:32:21'),
(5, 'K000110', 'Abdullah Fitriantoro dan Rekan', 'Kantor Cabang', '159/KM.1/2016', '16', '16.71', '16.71.15', '16.71.15.1003', 'Jl. Drs. H. Achmad Dahlan HY Blok DD No. 11 Rt. 65 Rw. 01', '30151', '0711445110', 'kjppafr_plm@yahoo.co.id', '[{\"email_kantor\":\"palembang@kjpp-afr.com\"}]', 'Jemmy Firdaus, SE,MM', '[]', '081318301479', '[]', 'Danang Pramono Aji, ST', '[]', '082377486639', '[]', 'Mega Ilmiah Nawati, A.Md', '[]', '081367640200', '[]', 'Jemmy Firdaus, SE,MM', '[]', '081318301479', '[]', '[\"IU002\"]', '[\"JJ013\",\"JJ007\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 18:35:34', '2024-12-05 18:35:34'),
(6, 'K000119', 'Abdullah Fitriantoro dan Rekan', 'Kantor Cabang', '1497/KM.1/2012', '14', '14.71', NULL, NULL, 'Jalan T. Tambusai, Komp. Puri Nangka Indah Blok A No. 10', NULL, '0761571351', 'pekanbaru@kjpp-afr.com', '[]', 'Ir. Veny Rinalny', '[]', '081363479523', '[]', 'Benny Mulyono, ST', '[]', '085274482081', '[]', 'Elia Febrina Anggraini, S.IP', '[]', '087899129698', '[]', 'Elia Febrina Anggraini, S.IP', '[]', '087899129698', '[]', '[\"IU002\"]', '[\"JJ007\",\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 18:44:13', '2024-12-05 18:44:13'),
(7, 'K000120', 'Abdullah Fitriantoro dan Rekan', 'Kantor Cabang', '55/KM.1/2018', '15', '15.71', '15.71.02', '15.71.02.1006', 'Jl. Barau-barau II No. 41 RT. 22', '36132', '07413061855', 'afrjambi@gmail.com', '[]', 'Firdaus, SP', '[]', '08126747065', '[]', 'Andri Amzar, S. Kom', '[]', '082375537953', '[]', 'Sri Wahyuni, SE', '[]', '082307799192', '[]', 'Sri Wahyuni, SE', '[]', '082307799192', '[]', '[\"IU004\"]', '[\"JJ007\",\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 18:48:02', '2024-12-05 18:49:43'),
(8, 'K000121', 'Abdullah Fitriantoro dan Rekan', 'Kantor Cabang', '415/KM.1/2016', '13', '13.71', '13.71.02', '13.71.02.1002', 'Jalan Kamang No 22', '25129', '07514774117', 'afrpadang@gmail.com', '[]', 'Abdi Mukhlis, ST', '[]', '082114633346', '[]', 'Veerdes Riyantika', '[]', '082111313667', '[]', 'Nova Novianty', '[]', '082392339144', '[]', 'Desma Sari', '[]', '0811660203', '[]', '[\"IU004\"]', '[\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 18:55:18', '2024-12-05 18:55:18'),
(9, 'K000132', 'Abdullah Fitriantoro dan Rekan', 'Kantor Cabang', '23/KM.1/2023', '81', '81.71', '81.71.04', '81.71.04.2007', 'Dusun Air Sakula Negeri Laha', '97236', '02198259023', 'ambon@kjpp-afr.com', '[]', 'Tri Wawan Setiawan Syarif, S.E', '[]', '085757323769', '[]', 'Tri Wawan Setiawan Syarif, S.E', '[]', '085757323769', '[]', 'Tri Wawan Setiawan Syarif, S.E', '[]', '085757323769', '[]', 'Tri Wawan Setiawan Syarif, S.E', '[]', '085757323769', '[]', '[\"IU004\"]', '[\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 18:58:08', '2024-12-05 18:58:08'),
(10, 'K000201', 'Aksa Nelson dan Rekan', 'Kantor Pusat', 'No. 2.09.0026 SK. Menkeu RI No. 362/KM.1/2009', '31', '31.74', '31.74.05', '31.74.05.1003', 'Asfa Graha, Komp. Cipulir Center Blok A 7, Jl Cildedug Raya No.77', '12230', '0217244222', 'kjpp.aksa.nelson@gmail.com', '[]', 'Aksa Nurdin, SE, MM, MAPPI (Cert)', '[]', '08161383445', '[]', 'Faisal Luthfi S.Kom', '[]', '087883095288', '[]', 'Muhreza Pamungkas', '[]', '081221705542', '[]', 'Herlinda Yunus', '[]', '081288767079', '[]', '[\"IU002\"]', '[\"JJ013\",\"JJ014\",\"JJ015\",\"JJ007\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:03:08', '2024-12-05 19:03:08'),
(11, 'K000214', 'Aksa Nelson dan Rekan', 'Kantor Cabang', 'SK. Menkeu RI No. 642/KM.1/2017', '21', '21.71', '21.71.10', '21.71.10.1005', 'Komp. Ruko Permata Niaga Blok E No. 25', '29432', '07783720003', 'batam.kjpp.anr@gmail.com', '[]', 'Fakhry Natsir Muhammad, SE, MAPPI (Cert)', '[]', '081314108580', '[]', 'Wiwing Novia Eka Putri', '[]', '082283391410', '[]', 'Maylisa Zulfiani', '[]', '085364586465', '[]', 'Herlinda Yunus', '[]', '081288767079', '[]', '[\"IU002\"]', '[\"JJ013\",\"JJ014\",\"JJ015\",\"JJ007\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:06:38', '2024-12-05 19:06:38'),
(12, 'K000216', 'Aksa Nelson dan Rekan', 'Kantor Cabang', 'SK. Menkeu RI No. 921/KM.1/2017', '64', '64.72', '64.72.08', '64.72.08.1004', 'Jl. K.H Damanhuri II Gg. Al Haw No.19 A', '75119', '05412831411', 'kjppaksanelsonsmd@gmail.com', '[]', 'Tajudin Nur, ST, MAPPI (Cert)', '[]', '081347333309', '[]', 'Juhairyan Noor', '[]', '085247072425', '[]', 'Ali Muhidin', '[]', '081251771158', '[]', 'Herlinda Yunus', '[]', '081288767079', '[]', '[\"IU004\"]', '[\"JJ013\",\"JJ014\",\"JJ015\",\"JJ007\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:17:27', '2024-12-05 19:17:27'),
(13, 'K000233', 'Aksa Nelson dan Rekan', 'Kantor Cabang', 'SK. Menkeu RI No. 334/KM.1/2018', '35', '35.25', NULL, NULL, 'Perum. Bakti Pertiwi Kulon, Jl Ikan Belanak 3 No.2', NULL, '0313983014', 'kjppanr.sby@gmail.com', '[]', 'Indar Mardhika, ST, MAPPI (Cert)', '[]', '085257834770', '[]', 'Ir. Umardani', '[]', '08123266552', '[]', 'Maulidiyah Aliefia Rachma', '[]', '0895340839413', '[]', 'Herlinda Yunus', '[]', '081288767079', '[]', '[\"IU004\"]', '[\"JJ013\",\"JJ014\",\"JJ015\",\"JJ007\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:22:14', '2024-12-05 19:22:14'),
(14, 'K000301', 'Andi Tiffani dan Rekan', 'Kantor Pusat', 'No. Izin KJPP : 2.19.0157 d/h KMK No 40/KM.1/2019 KM1 No 322 Tahun 2020', '31', '31.75', '31.75.06', '31.75.06.1004', 'Rukan Avenue No. 8-179 Jakarta Garden City', '13910', '02122133629', 'kjppandi01@gmai.com', '[]', 'Andi Iswitardiyanto, S.E., M.Ec.Dev., MAPPI (Cert.)', '[]', '081328477774', '[]', 'Dodi Kristianjati', '[]', '081227600936', '[]', 'Noni Ulpa', '[]', '081293870505', '[]', 'Dodi Kristianjati', '[]', '081227600936', '[]', '[\"IU002\"]', '[\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:31:41', '2024-12-05 19:31:41'),
(15, 'K000302', 'Andi Tiffani dan Rekan', 'Kantor Cabang', 'KM1 No 325 Tahun 2020', '35', '35.78', '35.78.04', '35.78.04.1004', 'Jalan Ngagel Tirto Gg.IV nomor 73 B RT.007 RW.003', '60245', '082135058849', 'kjppatr.sby@gmail.com', '[]', 'Johannes Indarga Hary Pratomo, S.H., MAPPI (Cert.)', '[]', '082135058849', '[]', 'M Isa Syaiful', '[]', '081327538844', '[]', 'Thressia Ika W', '[]', '082225199128', '[]', 'M Isa Syaiful', '[]', '081327538844', '[]', '[\"IU002\"]', '[\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:34:34', '2024-12-05 19:34:34'),
(16, 'K000304', 'Andi Tiffani dan Rekan', 'Kantor Cabang', 'KM1 No 323 Tahun 2020', '33', '33.74', '33.74.08', '33.74.08.1003', 'Jalan Dr. Wahidin No. 1 RT 1/RW 04', '50253', '02176425015', 'kjppatr.smg@gmail.com', '[]', 'Ruly Ayu Permatasari, S.Pd., MAPPI (Cert.)', '[]', '082231163596', '[]', 'Tyas Sulaksito', '[]', '082134565313', '[]', 'Farida Muryani', '[]', '085713418165', '[]', 'Dionysius Novian Adri Wicaksana', '[]', '082133938636', '[]', '[\"IU002\"]', '[\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:37:27', '2024-12-05 19:37:27'),
(17, 'K000313', 'Andi Tiffani dan Rekan', 'Kantor Cabang', 'KM1 No 324 Tahun 2020', '34', '34.04', '34.04.07', '34.04.07.2002', 'Jalan Raya Tajem No. 57 Dusun Tajem RT 03/RW 31', '55282', '02744362632', 'kjppatr.yk@gmail.com', '[]', 'Caecilia Tiffani Hindriyana Putri, S.E., M.Ec.Dev., MAPPI (Cert.)', '[]', '081383027001', '[]', 'Agung Irfan Asyari', '[]', '085328446961', '[]', 'Uul Fatayatun', '[]', '085725804171', '[]', 'Makky Roihan', '[]', '085726669797', '[]', '[\"IU002\"]', '[\"JJ013\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:40:10', '2024-12-05 19:40:10'),
(18, 'K000401', 'Anton dan Rekan', 'Kantor Pusat', '2.18.0151', '32', NULL, NULL, NULL, 'Jl Pasir Impun Atas No.3', '40195', '02287788405', 'kjpp.anton@gmail.com', '[]', 'Anton Debianto, ST,M.Ec.Dev., MAPPI (Cert.)', '[]', '081220022015', '[]', 'Sangadi Nur Widayat, ST', '[]', '089657419435', '[]', 'Diggy Saputra', '[]', '08180900444', '[]', 'Hendra Setiawan S, SE.', '[]', '082216029465', '[]', '[\"IU005\"]', '[\"JJ016\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 19:47:32', '2024-12-05 20:14:54'),
(19, 'K000422', 'Anton dan Rekan', 'Kantor Cabang', '174/Km.1/2018', '32', '32.78', '32.78.02', '32.78.02.1004', 'Jl Ahmad Yani Perum. Bumi Resik Indah Blok B 8 No.15', '46131', '02657528671', 'kjpp.anton.tasimalaya@gmail.com', '[]', 'Taufik Toharli, S.Pd, MAPPI (Cert.)', '[]', '0817624840', '[]', 'Taufik Toharli, S.Pd, MAPPI (Cert.)', '[]', '0817624840', '[]', 'Devi Permadi, S.M.', '[]', '087722121221', '[]', 'Bambang Setiawan, SE.', '[]', '082240083003', '[]', '[\"IU006\"]', '[]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 20:19:39', '2024-12-05 20:19:56'),
(20, 'K000423', 'Anton dan Rekan', 'Kantor Cabang', '368/Km.1/2020', '32', '32.09', '32.09.15', '32.09.15.1011', 'Perum. Taman Kemantren Blok II No.11', '45611', '02318823411', 'kjpp.anton.cirebon@gmail.com', '[]', 'Yudi Yolandi, ST, MAPPI (Cert.)', '[]', '0811221783', '[]', 'Yudi Yolandi, ST, MAPPI (Cert.)', '[]', '0811221783', '[]', 'Aceng Basar', '[]', '082268665958', '[]', 'Dodi Ahdiyat, SE', '[]', '0811200994', '[]', '[\"IU007\"]', '[\"JJ018\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 20:27:05', '2024-12-05 20:27:05'),
(21, 'K000501', 'Ayon Suherman dan Rekan', 'Kantor Pusat', '2.09.0028', '31', '31.74', '31.74.04', '31.74.04.1006', 'Rukan Pejaten, Jl. Pejaten Raya Kav. 2 No. 11', '12510', '02179195004', 'admin.jkt@kjppasr.co.id', '[]', 'Ayon Suherman, S.E., M.Ec.Dev., MAPPI (Cert.)', '[]', '08159160690', '[]', 'Mahpudin', '[{\"nama_pic_reviewer\":\"Ujang Solahudin\"}]', '085778183213', '[{\"nomor_hp_pic_reviewer\":\"081387108382\"}]', 'Anisha', '[]', '0895364631339', '[]', 'Felia', '[]', '089662365885', '[]', '[\"IU002\"]', '[\"JJ007\",\"JJ010\",\"JJ014\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 20:31:25', '2024-12-05 20:31:25'),
(22, 'K000502', 'Ayon Suherman dan Rekan', 'Kantor Cabang', '2.09.0028', '35', '35.78', '35.78.25', '35.78.25.1004', 'Jl. Gunung Anyar Emas III Blok B-15, RT. 001 RW. 008', '60294', '03158283803', 'admin.surabaya@kjppasr.co.id', '[]', 'Nova Naldi Susanto Uga, S.T., MAPPI (Cert.)', '[]', '081230392453', '[]', 'I Putu Bayu Pramita', '[{\"nama_pic_reviewer\":\"Amin Saifudin\"}]', '087853425134', '[{\"nomor_hp_pic_reviewer\":\"081217677294\"}]', 'Dina Nur Alifa', '[]', '083856910791', '[]', 'Heru Kustiawan', '[]', '085230283000', '[]', '[\"IU002\"]', '[\"JJ015\",\"JJ002\",\"JJ011\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 20:35:18', '2024-12-05 20:35:18'),
(23, 'K000503', 'Ayon Suherman dan Rekan', 'Kantor Cabang', '2.09.0028', '32', '32.73', '32.73.22', '32.73.22.1003', 'Jl. Margabaru III No. 4, RT. 004 RW. 005', '40287', '0227503275', 'admin.bandung@kjppasr.co.id', '[]', 'Wawan Trisnawan, S.T., M.T., MAPPI (Cert.)', '[]', '08122128647', '[]', 'Dody Budiman', '[]', '08122152781', '[]', 'Wawan Trisnawan', '[]', '08122128647', '[]', 'Dody Budiman', '[]', '08122152781', '[]', '[\"IU002\"]', '[\"JJ002\",\"JJ011\",\"JJ015\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 20:38:02', '2024-12-05 20:38:02'),
(24, 'K000505', 'Ayon Suherman dan Rekan', 'Kantor Cabang', '2.09.0028', '12', '12.07', '12.07.21', '12.07.21.2007', 'Jl. Pertahanan, Komp. Villa Permata Indah Blok F No. 12', '20361', '06142788492', 'admin.mdn@kjppasr.co.id', '[]', 'Yusrizal, S.T., MAPPI (Cert.)', '[]', '08116246622', '[]', 'Ade Rangga', '[]', '081361331782', '[]', 'M. Aldwin Surya', '[]', '081376153599', '[]', NULL, '[]', NULL, '[]', '[\"IU002\"]', '[\"JJ008\",\"JJ015\",\"JJ002\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 20:40:47', '2024-12-05 20:40:47'),
(25, 'K000507', 'Ayon Suherman dan Rekan', 'Kantor Cabang', '2.09.0028', '51', '51.71', '51.71.01', '51.71.01.2007', 'Jl. Tukad Petanu Residence Blok B.1', '80224', '03814487466', 'admin.denpasar@kjppasr.co.id', '[]', 'Mahrizal Ependi, S.E., MAPPI (Cert.)', '[]', '08129922061', '[]', 'Octaverra', '[{\"nama_pic_reviewer\":\"Okky Rahman\"}]', '087739227060', '[{\"nomor_hp_pic_reviewer\":\"085792333292\"}]', 'Kiki Amalia', '[]', '082236128815', '[]', NULL, '[]', NULL, '[]', '[\"IU002\"]', '[\"JJ015\",\"JJ011\",\"JJ008\",\"JJ014\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 20:57:28', '2024-12-05 20:57:28'),
(26, 'K000516', 'Ayon Suherman dan Rekan', 'Kantor Cabang', '2.09.0028', '64', '64.72', '64.72.05', '64.72.05.1002', 'Pandanwangi Mansion, Pandanwangi 5 Blok S1 No. 5, Cluster Signature, Jl. Abdul Wahab Syahrani RT. 23 RW. 11', '75119', '05412526864', 'kjpp.asr.samarinda@gmail.com', '[]', 'Achmad Fa\'izin, S.T., M.M., MAPPI (Cert.)', '[]', '081381597919', '[]', 'Wahyu Henny K Sapardi', '[]', '085858021626', '[]', 'Putri Aprilia', '[]', '085348234886', '[]', 'Eka Khoirunnisa', '[]', '082156990526', '[]', '[\"IU002\"]', '[\"JJ010\",\"JJ008\",\"JJ015\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 21:00:37', '2024-12-05 21:00:37'),
(27, 'K000534', 'Ayon Suherman dan Rekan', 'Kantor Cabang', '2.09.0028', '32', '32.76', '32.76.05', '32.76.05.1010', 'Ruko Anggrek Blok C1 No. 39, Jalan Boulevard Grand Depok City', '16412', '02177838880', 'admin.dp@kjppasr.co.id', '[{\"email_kantor\":\"admdpk5@gmail.com\"}]', 'Dwi Rohmawati, S.P., MAPPI (Cert.)', '[]', '081315226390', '[]', 'Taufan Bachtiar', '[{\"nama_pic_reviewer\":\"Rusman Maulana\"},{\"nama_pic_reviewer\":\"Eko Haryanto\"}]', '081318979535', '[{\"nomor_hp_pic_reviewer\":\"081336609045\"},{\"nomor_hp_pic_reviewer\":\"085720414543\"}]', 'Dewi Triyana', '[{\"nama_pic_admin\":\"Nur Aini\"}]', '087877666696', '[{\"nomor_hp_pic_admin\":\"08558777790\"}]', 'Ice Rahmawati', '[]', '081284479900', '[]', '[\"IU002\"]', '[\"JJ011\",\"JJ015\",\"JJ014\",\"JJ008\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 21:05:01', '2024-12-05 21:05:01'),
(28, 'K000600', 'Billy Anthony Lie dan Rekan', 'Kantor Pusat', '2.10.0082', '31', '31.71', NULL, NULL, 'Komplek Harmoni Plaza Blok B No. 20-21', NULL, '02163868190', 'kjppbilly@gmail.com', '[{\"email_kantor\":\"bhn@cbn.net.id\"}]', 'Billy Anthony Lie', '[]', '0816848328', '[]', 'Ady Chandra', '[]', '081340432850', '[]', 'Dewi Puspita R', '[]', '085692634080', '[]', 'Poltak Hutajulu', '[{\"nama_pic_marketing\":\"Davin\"},{\"nama_pic_marketing\":\"Reny Asriyani\"}]', '089654423468', '[{\"nomor_hp_pic_marketing\":\"081807900364\"},{\"nomor_hp_pic_marketing\":\"085880205411\"}]', '[\"IU002\"]', '[\"JJ007\",\"JJ005\"]', 'default.pdf', 1, NULL, NULL, NULL, NULL, NULL, '2024-12-05 21:10:47', '2024-12-05 21:10:47');

View File

@@ -0,0 +1,7 @@
--
-- Dumping data for table `pemilik_jaminan`
--
INSERT INTO `pemilik_jaminan` (`id`, `debiture_id`, `hubungan_pemilik_jaminan_id`, `name`, `detail_sertifikat`, `npwp`, `nomor_id`, `email`, `phone`, `province_code`, `city_code`, `district_code`, `village_code`, `postal_code`, `address`, `status`, `created_at`, `updated_at`, `authorized_at`, `authorized_status`, `deleted_at`, `created_by`, `updated_by`, `deleted_by`, `authorized_by`) VALUES
(1, 1, 1, 'Asep', '[]', '5236592157614215', '3275111142341234', 'asep@gmail.com', '081743541243', '32', '32.73', '32.73.07', '32.73.07.1001', '40161', 'Jl. Sukamaju no. 1', 1, '2024-12-05 21:26:22', '2024-12-05 21:26:22', NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(2, 1, 2, 'Nini Karlina', '[]', '5236592157614215', '3275111142341235', 'asep@gmail.com', '081743541243', '32', '32.73', '32.73.01', '32.73.01.1001', '40152', 'Jl. Sukmajaya no. 2', 1, '2024-12-05 21:27:49', '2024-12-05 21:27:49', NULL, NULL, NULL, NULL, NULL, NULL, NULL);

View File

@@ -0,0 +1,6 @@
--
-- Dumping data for table `permohonan`
--
INSERT INTO `permohonan` (`id`, `nomor_registrasi`, `tanggal_permohonan`, `user_id`, `branch_id`, `tujuan_penilaian_id`, `debiture_id`, `status`, `dokumen`, `keterangan`, `created_at`, `updated_at`, `authorized_at`, `authorized_status`, `deleted_at`, `created_by`, `updated_by`, `deleted_by`, `authorized_by`, `jenis_fasilitas_kredit_id`, `nilai_plafond_id`, `status_bayar`, `nilai_njop`, `registrasi_catatan`, `registrasi_by`, `registrasi_at`, `jenis_penilaian_id`, `region_id`, `sla`) VALUES
(1, 'REG0000001', '2024-12-06', 10, 1, 6, 1, 'order', NULL, NULL, '2024-12-06 02:55:14', '2024-12-06 02:55:14', NULL, NULL, NULL, 10, 10, NULL, NULL, 7, 1, 'sudah_bayar', '421354365747659', NULL, NULL, NULL, NULL, NULL, NULL);

View File

@@ -49,11 +49,11 @@
<div data-accordion="true"> <div data-accordion="true">
@php @php
$sortedTeamsActivity = $teamsActivity->sortBy(function ($item) { $sortedTeamsActivity = $teamsActivity->sortBy(function ($item) {
return $item->team->regions->penilaiTeam return $item->team->regions->penilaiTeam
->filter(function ($penilaiTeam) use ($item) { ->filter(function ($penilaiTeam) {
return $penilaiTeam->user_id == $item->user->id; $permohonan = optional($penilaiTeam->penilaian)->permohonan;
return $permohonan !== null;
}) })
->count(); ->count();
}); });

View File

@@ -132,20 +132,20 @@
@if (is_object($details)) @if (is_object($details))
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Tanah' && $detail->jenisLegalitasJaminan->custom_field === 'luas_tanah' &&
isset($details->{'Luas Tanah'}) && isset($details->{'luas_tanah'}) &&
is_numeric($details->{'Luas Tanah'})) is_numeric($details->{'luas_tanah'}))
@php @php
$luas_tanah = $details->{'Luas Tanah'}; $luas_tanah = $details->{'luas_tanah'};
@endphp @endphp
@endif @endif
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Bangunan' && $detail->jenisLegalitasJaminan->custom_field === 'luas_bangunan' &&
isset($details->{'Luas Bangunan'}) && isset($details->{'luas_bangunan'}) &&
is_numeric($details->{'Luas Bangunan'})) is_numeric($details->{'luas_bangunan'}))
@php @php
$luas_bangunan = $details->{'Luas Bangunan'}; $luas_bangunan = $details->{'luas_bangunan'};
@endphp @endphp
@endif @endif
@endif @endif

View File

@@ -134,20 +134,20 @@
@if (is_object($details)) @if (is_object($details))
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Tanah' && $detail->jenisLegalitasJaminan->custom_field === 'luas_tanah' &&
isset($details->{'Luas Tanah'}) && isset($details->{'luas_tanah'}) &&
is_numeric($details->{'Luas Tanah'})) is_numeric($details->{'luas_tanah'}))
@php @php
$luas_tanah = $details->{'Luas Tanah'}; $luas_tanah = $details->{'luas_tanah'};
@endphp @endphp
@endif @endif
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Bangunan' && $detail->jenisLegalitasJaminan->custom_field === 'luas_bangunan' &&
isset($details->{'Luas Bangunan'}) && isset($details->{'luas_bangunan'}) &&
is_numeric($details->{'Luas Bangunan'})) is_numeric($details->{'luas_bangunan'}))
@php @php
$luas_bangunan = $details->{'Luas Bangunan'}; $luas_bangunan = $details->{'luas_bangunan'};
@endphp @endphp
@endif @endif
@endif @endif

View File

@@ -117,20 +117,20 @@
@if (is_object($details)) @if (is_object($details))
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Tanah' && $detail->jenisLegalitasJaminan->custom_field === 'luas_tanah' &&
isset($details->{'Luas Tanah'}) && isset($details->{'luas_tanah'}) &&
is_numeric($details->{'Luas Tanah'})) is_numeric($details->{'luas_tanah'}))
@php @php
$luas_tanah = $details->{'Luas Tanah'}; $luas_tanah = $details->{'luas_tanah'};
@endphp @endphp
@endif @endif
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Bangunan' && $detail->jenisLegalitasJaminan->custom_field === 'luas_bangunan' &&
isset($details->{'Luas Bangunan'}) && isset($details->{'luas_bangunan'}) &&
is_numeric($details->{'Luas Bangunan'})) is_numeric($details->{'luas_bangunan'}))
@php @php
$luas_bangunan = $details->{'Luas Bangunan'}; $luas_bangunan = $details->{'luas_bangunan'};
@endphp @endphp
@endif @endif
@endif @endif

View File

@@ -132,20 +132,20 @@
@if (is_object($details)) @if (is_object($details))
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Tanah' && $detail->jenisLegalitasJaminan->custom_field === 'luas_tanah' &&
isset($details->{'Luas Tanah'}) && isset($details->{'luas_tanah'}) &&
is_numeric($details->{'Luas Tanah'})) is_numeric($details->{'luas_tanah'}))
@php @php
$luas_tanah = $details->{'Luas Tanah'}; $luas_tanah = $details->{'luas_tanah'};
@endphp @endphp
@endif @endif
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Bangunan' && $detail->jenisLegalitasJaminan->custom_field === 'luas_bangunan' &&
isset($details->{'Luas Bangunan'}) && isset($details->{'luas_bangunan'}) &&
is_numeric($details->{'Luas Bangunan'})) is_numeric($details->{'luas_bangunan'}))
@php @php
$luas_bangunan = $details->{'Luas Bangunan'}; $luas_bangunan = $details->{'luas_bangunan'};
@endphp @endphp
@endif @endif
@endif @endif

View File

@@ -115,20 +115,20 @@
@if (is_object($details)) @if (is_object($details))
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Tanah' && $detail->jenisLegalitasJaminan->custom_field === 'luas_tanah' &&
isset($details->{'Luas Tanah'}) && isset($details->{'luas_tanah'}) &&
is_numeric($details->{'Luas Tanah'})) is_numeric($details->{'luas_tanah'}))
@php @php
$luas_tanah = $details->{'Luas Tanah'}; $luas_tanah = $details->{'luas_tanah'};
@endphp @endphp
@endif @endif
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Bangunan' && $detail->jenisLegalitasJaminan->custom_field === 'luas_bangunan' &&
isset($details->{'Luas Bangunan'}) && isset($details->{'luas_bangunan'}) &&
is_numeric($details->{'Luas Bangunan'})) is_numeric($details->{'luas_bangunan'}))
@php @php
$luas_bangunan = $details->{'Luas Bangunan'}; $luas_bangunan = $details->{'luas_bangunan'};
@endphp @endphp
@endif @endif
@endif @endif

View File

@@ -134,20 +134,20 @@
@if (is_object($details)) @if (is_object($details))
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Tanah' && $detail->jenisLegalitasJaminan->custom_field === 'luas_tanah' &&
isset($details->{'Luas Tanah'}) && isset($details->{'luas_tanah'}) &&
is_numeric($details->{'Luas Tanah'})) is_numeric($details->{'luas_tanah'}))
@php @php
$luas_tanah = $details->{'Luas Tanah'}; $luas_tanah = $details->{'luas_tanah'};
@endphp @endphp
@endif @endif
@if ( @if (
$detail->jenisLegalitasJaminan->custom_field === 'Luas Bangunan' && $detail->jenisLegalitasJaminan->custom_field === 'luas_bangunan' &&
isset($details->{'Luas Bangunan'}) && isset($details->{'luas_bangunan'}) &&
is_numeric($details->{'Luas Bangunan'})) is_numeric($details->{'luas_bangunan'}))
@php @php
$luas_bangunan = $details->{'Luas Bangunan'}; $luas_bangunan = $details->{'luas_bangunan'};
@endphp @endphp
@endif @endif
@endif @endif

View File

@@ -0,0 +1,176 @@
@extends('layouts.main')
@section('breadcrumbs')
{{-- {{ Breadcrumbs::render(request()->route()->getName()) }}
--}}
Standard
@endsection
@section('content')
@include('lpj::assetsku.includenya')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card min-w-full">
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Data Jaminan
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('penilai.show', $permohonan->id) }}" class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back
</a>
</div>
</div>
<div class="card-body grid gap-5 grid-cols-2">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Nama Debitur</label>
<div class="flex flex-wrap items-baseline w-full">
@if (isset($permohonan->debiture))
<p class="text-2sm text-gray-700">{{ $permohonan->debiture->name }}</p>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Alamat Object</label>
<div class="flex flex-wrap items-baseline w-full">
@foreach ($permohonan->debiture->documents as $dokumen)
<span class="text-2sm text-gray-700">
{{formatAlamat($dokumen->pemilik)}}
</span>
@endforeach
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Nomor Registrasi</label>
<div class="flex flex-wrap items-base line w-full">
<p class="text-2sm text-gray-700">{{ $permohonan->nomor_registrasi }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Cab/Direktorat</label>
<div class="flex flex-wrap items-baseline w-full">
@if (isset($permohonan->branch))
<p class="text-2sm text-gray-700">{{ $permohonan->branch->name }}</p>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Nomor Laporan</label>
<div class="flex flex-wrap items-base line w-full">
<p class="text-2sm text-gray-700">{{ $permohonan->nomor_registrasi }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">AO</label>
<div class="flex flex-wrap items-baseline w-full">
@if (isset($permohonan->user))
<p class="text-2sm text-gray-700">{{ $permohonan->user->name }}</p>
@endif
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<h3 class="card-title uppercase">
Identitas Cadeb/Debitur
</h3>
</div>
<div class="card-body">
</div>
</div>
<div class="card">
<div class="card-header">
<h3 class="card-title uppercase">
Deskripsi dan Alamat Aset
</h3>
</div>
<div class="card-body">
</div>
</div>
<div class="card">
<div class="card-header">
<h3 class="card-title uppercase">
dokumen
</h3>
</div>
<div class="card-body">
</div>
</div>
<div class="card">
<div class="card-header">
<h3 class="card-title uppercase">
Hubungan Cadeb/Debitur dengan pemilik dan penghuni
</h3>
</div>
<div class="card-body">
</div>
</div>
@include('lpj::surveyor.components.tanah')
@include('lpj::surveyor.components.bangunan')
@include('lpj::surveyor.components.lingkungan')
@include('lpj::surveyor.components.fakta')
@include('lpj::surveyor.components.informasi')
<div class="card">
<div class="card-header">
<h3 class="card-title uppercase">
Informasi dan pembanding
</h3>
</div>
<div class="card-body">
</div>
</div>
<div class="card">
<div class="card-header">
<h3 class="card-title uppercase">
total nilai pasar wajar
</h3>
</div>
<div class="card-body">
</div>
</div>
<div class="card">
<div class="card-header">
<h3 class="card-title uppercase">
nilai asuransi
</h3>
</div>
<div class="card-body">
</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="submitData()">
<span id="saveButtonText">Save</span>
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;"
id="saveButtonSpinner">
</div>
</button>
</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

View File

@@ -155,12 +155,12 @@
<div class="flex items-center justify-between mt-5"> <div class="flex items-center justify-between mt-5">
<div class="grid gap-5"> <div class="grid gap-5">
<h2 class=" font-semibold text-xl"> <h2 class=" font-semibold text-xl">
{{ $item['nama_objek'] }} {{ $item['name_objek'] }}
</h2> </h2>
<div class="flex items-center"> <div class="flex items-center">
<img src="{{ Storage::url($item['foto_object']) }}" alt=""> <img src="{{ Storage::url($item['foto_objek']) }}" alt="">
</div> </div>
</div> </div>

View File

@@ -22,13 +22,15 @@
Nomor Registrasi Nomor Registrasi
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->nomor_registrasi }}</p> <p class="flex w-full text-gray-600 font-medium text-sm">
{{ isset($permohonan->nomor_registrasi) ? $permohonan->nomor_registrasi : '' }}</p>
</div> </div>
<label class="form-label max-w-56"> <label class="form-label max-w-56">
Nama Debitur Nama Debitur
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->debiture->name }}</p> <p class="flex w-full text-gray-600 font-medium text-sm">
{{ isset($permohonan->debiture->name) ? $permohonan->debiture->name : '' }}</p>
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
@@ -36,16 +38,16 @@
Cabang Cabang
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->branch->name }}</p> <p class="flex w-full text-gray-600 font-medium text-sm">
{{ isset($permohonan->branch->name) ? $permohonan->branch->name : '' }}</p>
</div> </div>
<label class="form-label max-w-56"> <label class="form-label max-w-56">
Alamat Jaminan Alamat Jaminan
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->debiture->address }}, Kel. <p class="flex w-full text-gray-600 font-medium text-sm">
{{ $permohonan->debiture->village->name }}, Kec. {{ $permohonan->debiture->district->name }}, {{ formatAlamat($permohonan->debiture) }}
{{ ucwords(strtolower($permohonan->debiture->city->name)) }}, Kode Pos. </p>
{{ $permohonan->debiture->postal_code }}</p>
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
@@ -53,14 +55,16 @@
Nama AO/Pemohon Nama AO/Pemohon
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->user->name }}</p> <p class="flex w-full text-gray-600 font-medium text-sm">
{{ isset($permohonan->user->name) ? $permohonan->user->name : '' }}</p>
</div> </div>
<label class="form-label max-w-56"> <label class="form-label max-w-56">
Fasilitas Kredit Fasilitas Kredit
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm"> <p class="flex w-full text-gray-600 font-medium text-sm">
{{ $permohonan->jenisFasilitasKredit->name }}</p> {{ isset($permohonan->jenisFasilitasKredit->name) ? $permohonan->jenisFasilitasKredit->name : '' }}
</p>
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
@@ -76,7 +80,7 @@
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm"> <p class="flex w-full text-gray-600 font-medium text-sm">
{{ $permohonan->debiture->cif }}</p> {{ isset($permohonan->debiture->cif) ? $permohonan->debiture->cif : '' }}</p>
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
@@ -91,6 +95,8 @@
</div> </div>
</div> </div>
@foreach ($permohonan->debiture->documents as $dokumen) @foreach ($permohonan->debiture->documents as $dokumen)
<div class="card"> <div class="card">
<div class="card-body grid gap-5"> <div class="card-body grid gap-5">
@@ -105,17 +111,20 @@
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $surveyor->userPenilaiTeam->name }} <p class="flex w-full text-gray-600 font-medium text-sm">
{{ $surveyor->userPenilaiTeam->name }}
</p> </p>
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->region->name }}</p> <p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->region->name }}
</p>
</div> </div>
<label class="form-label max-w-56"> <label class="form-label max-w-56">
Penilai Penilai
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $penilai->userPenilaiTeam->name }} <p class="flex w-full text-gray-600 font-medium text-sm">
{{ $penilai->userPenilaiTeam->name }}
</p> </p>
<p class="flex w-full text-gray-600 font-medium text-sm"> <p class="flex w-full text-gray-600 font-medium text-sm">
@@ -162,7 +171,7 @@
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm"> <p class="flex w-full text-gray-600 font-medium text-sm">
PJ/001/001</p> </p>
</div> </div>
</div> </div>
@@ -190,7 +199,7 @@
<div class="dropdown-content w-full max-w-56 py-2"> <div class="dropdown-content w-full max-w-56 py-2">
<div class="menu menu-default flex flex-col w-full"> <div class="menu menu-default flex flex-col w-full">
<div class="menu-item"> <div class="menu-item">
<a class="menu-link" href="#"> <a class="menu-link" href="{{ route('penilai.memo', $permohonan->id) }}">
<span class="menu-icon"> <span class="menu-icon">
<i class="ki-outline ki-badge"> <i class="ki-outline ki-badge">
</i> </i>
@@ -201,7 +210,7 @@
</a> </a>
</div> </div>
<div class="menu-item"> <div class="menu-item">
<a class="menu-link" href="#"> <a class="menu-link" href="{{ route('penilai.resume', $permohonan->id) }}">
<span class="menu-icon"> <span class="menu-icon">
<i class="ki-outline ki-profile-circle"> <i class="ki-outline ki-profile-circle">
</i> </i>
@@ -258,6 +267,7 @@
</div> </div>
@endforeach @endforeach
</div> </div>
@@ -308,9 +318,9 @@
denyButtonText: 'No', denyButtonText: 'No',
}).then((result) => { }).then((result) => {
if (result.isConfirmed) { if (result.isConfirmed) {
window.location.href = "{{ route('penilai.standard', $permohonan->id) }}";
} else if (result.isDenied) { } else if (result.isDenied) {
Swal.fire('Changes are not saved', '', 'info') window.location.href = "{{ route('penilai.sederhana', $permohonan->id) }}";
} }
}) })
} }

View File

@@ -1,12 +1,12 @@
@include('lpj::surveyor.components.header') @include('lpj::surveyor.components.header')
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden"> <div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
<div class="card-body"> <div class="card-header">
<h3 class="card-title uppercase">
Analisa Unit
<div class=" py-4 "> </h3>
<h1 class="text-md font-medium text-gray-900">Analisa Unit</h1>
</div> </div>
<div class="card-body">
<div class="grid gap-5"> <div class="grid gap-5">
<!-- Luas tanah --> <!-- Luas tanah -->
@@ -60,8 +60,8 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-2"> <div class="flex flex-col items-start gap-2">
@if (isset($kondisiBangunan)) @if (isset($basicData['kondisiBangunan']))
@foreach ($kondisiBangunan as $item) @foreach ($basicData['kondisiBangunan'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="kondisi_unit[]" type="checkbox" <input class="checkbox" name="kondisi_unit[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -82,8 +82,8 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-2"> <div class="flex flex-col items-start gap-2">
@if (isset($posisiUnit)) @if (isset($basicData['posisiUnit']))
@foreach ($posisiUnit as $item) @foreach ($basicData['posisiUnit'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="posisi_unit[]" type="checkbox" <input class="checkbox" name="posisi_unit[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -103,8 +103,8 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($lantai)) @if (isset($basicData['lantai']))
@foreach ($lantai as $item) @foreach ($basicData['lantai'] as $item)
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <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"> <label class="form-label max-w-56 gap-2.5" style="width: 500px">
<input class="checkbox" name="lantai[]" type="checkbox" <input class="checkbox" name="lantai[]" type="checkbox"
@@ -130,8 +130,8 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-2"> <div class="flex flex-col items-start gap-2">
@if (isset($viewUnit)) @if (isset($basicDdata['viewUnit']))
@foreach ($viewUnit as $item) @foreach ($basicDdata['viewUnit'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="view[]" type="checkbox" <input class="checkbox" name="view[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -151,8 +151,8 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-2"> <div class="flex flex-col items-start gap-2">
@if (isset($bentukUnit)) @if (isset($basicData['bentukUnit']))
@foreach ($bentukUnit as $item) @foreach ($basicData['bentukUnit'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="bentuk_unit[]" type="checkbox" <input class="checkbox" name="bentuk_unit[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"

View File

@@ -1,8 +1,10 @@
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden"> <div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
<div class="card-body"> <div class="card-header">
<div class=""> <h3 class="card-title uppercase">
<h1 class="text-md font-medium text-gray-900">Analisa Bangunan</h1> Analisa Bangunan
</h3>
</div> </div>
<div class="card-body">
<div class="grid gap-5"> <div class="grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Luas Bagunan</label> <label class="form-label max-w-56">Luas Bagunan</label>
@@ -61,8 +63,8 @@
<label class="form-label max-w-56">Jenis Bangunan</label> <label class="form-label max-w-56">Jenis Bangunan</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($jenisBangunan)) @if (isset($basicData['jenisBangunan']))
@foreach ($jenisBangunan as $item) @foreach ($basicData['jenisBangunan'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="jenis_bangunan[]" type="checkbox" <input class="checkbox" name="jenis_bangunan[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -89,8 +91,8 @@
<label class="form-label max-w-56">Kondisi Bangunan</label> <label class="form-label max-w-56">Kondisi Bangunan</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($kondisiBangunan)) @if (isset($basicData['kondisiBangunan']))
@foreach ($kondisiBangunan as $item) @foreach ($basicData['kondisiBangunan'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="kondisi_bangunan[]" type="checkbox" <input class="checkbox" name="kondisi_bangunan[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -122,8 +124,8 @@
<label class="form-label max-w-56">Sifat Bangunan</label> <label class="form-label max-w-56">Sifat Bangunan</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($sifatBangunan)) @if (isset($basicData['sifatBangunan']))
@foreach ($sifatBangunan as $item) @foreach ($basicData['sifatBangunan'] as $item)
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <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"> <label class="form-label max-w-56 gap-2.5" style="width: 500px">
<input class="checkbox" name="sifat_bangunan[]" type="checkbox" <input class="checkbox" name="sifat_bangunan[]" type="checkbox"
@@ -142,30 +144,81 @@
</div> </div>
</div> </div>
<!-- Spek Bangunan --> <!-- Spek Bangunan -->
<div class="gap-2.5"> <div class="gap-2.5">
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Spek Bangunan</label> <label class="form-label max-w-56">Spek Bangunan</label>
<div class="flex flex-wrap items-baseline w-full" id="spek-bangunan-container"> <div class="flex flex-wrap items-baseline w-full" id="spek-bangunan-container">
@if (isset($forminspeksi['bangunan']) && is_array($forminspeksi['bangunan']))
@foreach ($forminspeksi['bangunan']['spesifikasi_bangunan'] as $index => $bangunan)
<div class="spek-bangunan w-full gap-4 mt-5"> <div class="spek-bangunan w-full gap-4 mt-5">
<input type="hidden" name="nama_bagunan[]" value="Bangunan"> <input type="hidden" name="nama_bangunan[]"
<label class="building-label form-label">Bangunan 1</label> value="{{ isset($bangunan['bagunan']) ? $bangunan['bagunan'] : 'Bangunan ' . ($index + 1) }}"
required>
<label
class="building-label form-label">{{ isset($bangunan['bagunan']) ? $bangunan['bagunan'] : 'Bangunan ' . ($index + 1) }}</label>
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2 w-full"> <div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2 w-full">
@if (@isset($spekKategoriBagunan)) @if (@isset($basicData['spekKategoriBangunan']))
@foreach ($spekKategoriBagunan as $item) @foreach ($basicData['spekKategoriBangunan'] as $item)
<div> <div>
<input type="hidden" name="spek_kategori_bangunan[]" <input type="hidden" name="spek_kategori_bangunan[]"
value="{{ $item->name }}"> value="{{ $item->name }}">
<label <label
class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label> class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4" style="margin-top: 10px"> <div class="flex flex-col items-start gap-4"
@foreach ($spekBangunan as $spek) style="margin-top: 10px">
@foreach ($basicData['spekBangunan'] as $spek)
@if ($spek->spek_kategori_bangunan_id == $item->id)
<label
class="form-label flex items-center gap-2.5">
<input class="checkbox"
name="spek_bangunan[{{ $index }}][{{ $item->name }}][]"
type="checkbox"
value="{{ $spek->name }}"
{{ isset($bangunan['spek_kategori_bangunan'][$item->name]) &&
in_array($spek->name, $bangunan['spek_kategori_bangunan'][$item->name])
? 'checked'
: '' }} />
{{ $spek->name }}
</label>
@endif
@endforeach
</div>
<em id="error-spek_bangunan_{{ $item->name }}"
class="alert text-danger text-sm"></em>
</div>
</div>
@endforeach
@endif
</div>
<button type="button"
class="mt-2 btn btn-danger btn-outline btn-xs delete-button"
style="display: none;">Hapus</button>
</div>
@endforeach
@else
<!-- Default empty building form when no data exists -->
<div class="spek-bangunan w-full gap-4 mt-5">
<input type="text" name="nama_bangunan[]" value="Bangunan 1" required>
<label class="building-label form-label">Bangunan 1</label>
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2 w-full">
@if (@isset($basicData['spekKategoriBangunan']))
@foreach ($basicData['spekKategoriBangunan'] as $item)
<div>
<input type="hidden" name="spek_kategori_bangunan[]"
value="{{ $item->name }}">
<label
class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"
style="margin-top: 10px">
@foreach ($basicData['spekBangunan'] as $spek)
@if ($spek->spek_kategori_bangunan_id == $item->id) @if ($spek->spek_kategori_bangunan_id == $item->id)
<label class="form-label flex items-center gap-2.5"> <label class="form-label flex items-center gap-2.5">
<input class="checkbox" <input class="checkbox"
name="spek_bangunan[{{ $item->name }}][]" name="spek_bangunan[0][{{ $item->name }}][]"
type="checkbox" value="{{ $spek->name }}" /> type="checkbox"
value="{{ $spek->name }}" />
{{ $spek->name }} {{ $spek->name }}
</label> </label>
@endif @endif
@@ -181,6 +234,7 @@
<button type="button" class="mt-2 btn btn-danger btn-outline btn-xs delete-button" <button type="button" class="mt-2 btn btn-danger btn-outline btn-xs delete-button"
style="display: none;">Hapus</button> style="display: none;">Hapus</button>
</div> </div>
@endif
</div> </div>
</div> </div>
@@ -198,8 +252,8 @@
<label class="form-label max-w-56">Sarana pelengkap</label> <label class="form-label max-w-56">Sarana pelengkap</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($saranaPelengkap)) @if (isset($basicData['saranaPelengkap']))
@foreach ($saranaPelengkap as $item) @foreach ($basicData['saranaPelengkap'] as $item)
@php @php
$isChecked = false; $isChecked = false;
$inputValue = ''; $inputValue = '';
@@ -243,11 +297,8 @@
function updateDeleteButtonsVisibility() { function updateDeleteButtonsVisibility() {
const allDeleteButtons = spekBangunanContainer.querySelectorAll('.delete-button'); const allDeleteButtons = spekBangunanContainer.querySelectorAll('.delete-button');
allDeleteButtons.forEach(button => { allDeleteButtons.forEach(button => {
if (spekBangunanContainer.querySelectorAll('.spek-bangunan').length > 1) { button.style.display = spekBangunanContainer.querySelectorAll('.spek-bangunan').length > 1 ?
button.style.display = 'inline-block'; 'inline-block' : 'none';
} else {
button.style.display = 'none';
}
}); });
} }
@@ -255,65 +306,81 @@
const allSpekBangunan = spekBangunanContainer.querySelectorAll('.spek-bangunan'); const allSpekBangunan = spekBangunanContainer.querySelectorAll('.spek-bangunan');
allSpekBangunan.forEach((div, index) => { allSpekBangunan.forEach((div, index) => {
const label = div.querySelector('.building-label'); const label = div.querySelector('.building-label');
const nameInput = div.querySelector('input[name^="nama_bangunan"]');
if (label) { if (label) {
label.textContent = `Bangunan ${index + 1}`; const buildingName = `Bangunan ${index + 1}`;
label.textContent = buildingName;
if (nameInput) {
nameInput.value = buildingName;
}
}
});
}
function updateInputNames(container, index) {
container.querySelectorAll('input').forEach(input => {
if (input.name) {
if (input.name.includes('[')) {
if (input.name.startsWith('spek_bangunan')) {
// Handle spek_bangunan inputs
const matches = input.name.match(/spek_bangunan\[\d+\]\[(.*?)\]/);
if (matches) {
input.name = `spek_bangunan[${index}][${matches[1]}][]`;
}
} else {
// Handle other array inputs
input.name = input.name.replace(/\[\d*\]/, `[${index}]`);
}
}
} }
}); });
} }
document.getElementById('addBagunan').addEventListener('click', function() { document.getElementById('addBagunan').addEventListener('click', function() {
const newDiv = spekBangunanContainer.querySelector('.spek-bangunan').cloneNode(true); const newDiv = spekBangunanContainer.querySelector('.spek-bangunan').cloneNode(true);
const newIndex = spekBangunanContainer.querySelectorAll('.spek-bangunan').length;
// Update input fields // Reset and update inputs
newDiv.querySelectorAll('select, input').forEach((input, index) => { newDiv.querySelectorAll('input').forEach(input => {
if (input.type === 'checkbox' || input.type === 'radio') { if (input.type === 'checkbox') {
input.checked = false; input.checked = false;
} else { } else {
input.value = ''; input.value = '';
} }
// Update name attribute
if (input.name) {
const baseName = input.name.split('[')[0]; // Get the base name
const count = spekBangunanContainer.querySelectorAll('.spek-bangunan').length + 1;
input.name = `${baseName}[${count}]`;
}
}); });
// Append the cloned div // Update input names
updateInputNames(newDiv, newIndex);
// Add delete button handler
const deleteButton = newDiv.querySelector('.delete-button');
deleteButton.addEventListener('click', function() {
newDiv.remove();
updateDeleteButtonsVisibility();
updateBuildingLabels();
});
// Append and update UI
spekBangunanContainer.appendChild(newDiv); spekBangunanContainer.appendChild(newDiv);
// Add event listener to the delete button in the cloned div
newDiv.querySelector('.delete-button').addEventListener('click', function() {
spekBangunanContainer.removeChild(newDiv);
updateDeleteButtonsVisibility(); updateDeleteButtonsVisibility();
updateBuildingLabels(); updateBuildingLabels();
}); });
// Update UI // Initialize on page load
updateDeleteButtonsVisibility();
updateBuildingLabels();
});
// Initial setup: Ensure "Bangunan 1" is labeled
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
updateDeleteButtonsVisibility(); updateDeleteButtonsVisibility();
updateBuildingLabels(); // Ensure the first label is set updateBuildingLabels();
});
// Add delete functionality to the initial form // Add delete handlers to existing buttons
spekBangunanContainer.querySelectorAll('.delete-button').forEach(button => { spekBangunanContainer.querySelectorAll('.delete-button').forEach(button => {
button.addEventListener('click', function() { button.addEventListener('click', function() {
const spekBangunan = this.closest('.spek-bangunan');
// Make sure not to delete the last remaining form
if (spekBangunanContainer.querySelectorAll('.spek-bangunan').length > 1) { if (spekBangunanContainer.querySelectorAll('.spek-bangunan').length > 1) {
spekBangunan.remove(); this.closest('.spek-bangunan').remove();
updateDeleteButtonsVisibility(); updateDeleteButtonsVisibility();
updateBuildingLabels(); // Update the labels after removing updateBuildingLabels();
} }
}); });
}); });
});
</script> </script>
@endpush @endpush

View File

@@ -65,11 +65,8 @@
src="{{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? asset('storage/' . $fotoForm['object_jaminan'][0]['foto_objek']) : '' }}" src="{{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? asset('storage/' . $fotoForm['object_jaminan'][0]['foto_objek']) : '' }}"
class="max-w-[200px] {{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? '' : 'hidden' }}" class="max-w-[200px] {{ isset($fotoForm['object_jaminan'][0]['foto_objek']) ? '' : 'hidden' }}"
alt="Uploaded Image"> alt="Uploaded Image">
<input type="file" <input type="file" name="foto_objek" class="file-input"
name="foto_objek" accept="image/*" onchange="previewImage(this, 'uploadedImage1')">
class="file-input"
accept="image/*"
onchange="previewImage(this, 'uploadedImage1')">
</div> </div>
</td> </td>
@@ -95,7 +92,9 @@
<select name="jenis_aset" class="select"> <select name="jenis_aset" class="select">
<option value="">Pilih Jenis Aset</option> <option value="">Pilih Jenis Aset</option>
@foreach ($data['jenisJaminan'] as $item) @foreach ($data['jenisJaminan'] as $item)
<option value="{{ $item->name }}" {{ ($inspectionData['asset']['jenis_asset']['sesuai'] ?? '') == $item->name ? 'selected' : '' }}>{{ $item->name }}</option> <option value="{{ $item->name }}"
{{ ($inspectionData['asset']['jenis_asset']['sesuai'] ?? '') == $item->name ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach @endforeach
</select> </select>
@@ -104,7 +103,9 @@
<select name="jenis_aset_pembanding[]" class="select"> <select name="jenis_aset_pembanding[]" class="select">
<option value="">Pilih Jenis Aset</option> <option value="">Pilih Jenis Aset</option>
@foreach ($data['jenisJaminan'] as $item) @foreach ($data['jenisJaminan'] as $item)
<option value="{{ $item->name }}" {{ ($inspectionData['jenis_aset'] ?? '') == $item->name ? 'selected' : '' }}>{{ $item->name }}</option> <option value="{{ $item->name }}"
{{ ($inspectionData['jenis_aset'] ?? '') == $item->name ? 'selected' : '' }}>
{{ $item->name }}</option>
@endforeach @endforeach
</select> </select>
</td> </td>
@@ -189,54 +190,180 @@
<tr> <tr>
<td class="px-4 py-2">Alamat</td> <td class="px-4 py-2">Alamat</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<textarea name="alamat" class="input" rows="2">{{ $inspectionData['alamat'] ?? '' }}</textarea> @php
$statusAlamat = isset($inspectionData['asset']['alamat']['sesuai'])
? 'sesuai'
: 'tidak sesuai';
$address =
$inspectionData['asset']['alamat'][$statusAlamat]['address'] ??
null;
@endphp
<textarea name="address" class="input py-2" rows="2">{{ $address }}</textarea>
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<textarea name="alamat_pembanding[]" class="input" rows="2"></textarea> <textarea name="address_pembanding[]" class="input py-2" rows="2"></textarea>
</td>
</tr>
<tr>
<td class="px-4 py-2">Desa/Kelurahan</td>
<td class="px-4 py-2">
<input type="text" name="desa" class="input"
value="{{ $inspectionData['desa'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="desa_pembanding[]" class="input">
</td>
</tr>
<tr>
<td class="px-4 py-2">Kecamatan</td>
<td class="px-4 py-2">
<input type="text" name="kecamatan" class="input"
value="{{ $inspectionData['kecamatan'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="kecamatan_pembanding[]" class="input">
</td>
</tr>
<tr>
<td class="px-4 py-2">Kabupaten/Kota</td>
<td class="px-4 py-2">
<input type="text" name="kabupaten" class="input"
value="{{ $inspectionData['kabupaten'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="kabupaten_pembanding[]" class="input">
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Provinsi</td> <td class="px-4 py-2">Provinsi</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="provinsi" class="input" <select id="province_code" name="province_code" class="input w-full">
value="{{ $inspectionData['provinsi'] ?? '' }}"> @php
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
? 'sesuai'
: 'tidak sesuai';
$address =
$inspectionData['asset']['alamat'][$statusKey][
'province_code'
] ?? null;
@endphp
<option value="">Select Province</option>
@foreach ($provinces as $province)
@php
$statusKey = isset(
$inspectionData['asset']['alamat']['sesuai'],
)
? 'sesuai'
: 'tidak sesuai';
$selectedProvince =
$inspectionData['asset']['alamat'][$statusKey][
'province_code'
] ?? null;
@endphp
<option value="{{ $province->code }}"
{{ $selectedProvince == $province->code ? 'selected' : '' }}>
{{ $province->name }}
</option>
@endforeach
</select>
</td> </td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="provinsi_pembanding[]" class="input"> <select id="province_code_pembanding" name="province_code_pembanding[]"
class="input w-full">
<option value="">Select Province</option>
@foreach ($provinces as $province)
<option value="{{ $province->code }}"
{{ $selectedProvince == $province->code ? 'selected' : '' }}>
{{ $province->name }}
</option>
@endforeach
</select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="px-4 py-2">Harga (Rp)</td> <td class="px-4 py-2">Kabupaten/Kota</td>
<td class="px-4 py-2">
<select id="city_code" name="city_code" class="select w-full">
@php
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
? 'sesuai'
: 'tidak sesuai';
$selectedCity =
$inspectionData['asset']['alamat'][$statusKey][
'city_code'
] ?? null;
@endphp
<option value="">Pilih Kota/Kabupaten</option>
@if (isset($selectedCity))
@foreach ($cities as $city)
<option value="{{ $city->code }}"
{{ $selectedCity == $city->code ? 'selected' : '' }}>
{{ $city->name }}
</option>
@endforeach
@endif
</select>
</td>
<td class="px-4 py-2">
<select id="city_code_pembanding" name="city_code_pembanding[]"
class="input w-full">
<option value="">Pilih Kota/Kabupaten</option>
</select>
</td>
</tr>
<tr>
<td class="px-4 py-2">Kecamatan</td>
<td class="px-4 py-2">
<select id="district_code" name="district_code" class="select w-full">
@php
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
? 'sesuai'
: 'tidak sesuai';
$selectedDisrict =
$inspectionData['asset']['alamat'][$statusKey][
'district_code'
] ?? null;
@endphp
<option value="">Pilih Kecamatan</option>
@if (isset($selectedDisrict))
@foreach ($districts as $district)
<option value="{{ $district->code }}"
{{ $selectedDisrict == $district->code ? 'selected' : '' }}>
{{ $district->name }}
</option>
@endforeach
@endif
</select>
</td>
<td class="px-4 py-2">
<select id="district_code_pembanding" name="district_code_pembanding[]"
class="input w-full">
<option value="">Pilih Kecamatan</option>
</select>
</td>
</tr>
<tr>
<td class="px-4 py-2">Desa/Kelurahan</td>
<td class="px-4 py-2">
<select id="village_code" name="village_code" class="select w-full">
@php
$statusKey = isset($inspectionData['asset']['alamat']['sesuai'])
? 'sesuai'
: 'tidak sesuai';
$selectedDesa =
$inspectionData['asset']['alamat'][$statusKey][
'village_code'
] ?? null;
@endphp
<option value="">Pilih Kecamatan</option>
@if (isset($selectedDesa))
@foreach ($villages as $village)
<option value="{{ $village->code }}"
{{ $selectedDesa == $village->code ? 'selected' : '' }}>
{{ $village->name }}
</option>
@endforeach
@endif
</select>
</td>
<td class="px-4 py-2">
<select id="village_code_pembanding" name="village_code_pembanding[]"
class="input w-full">
<option value="">Pilih Kecamatan</option>
</select>
</td>
</tr>
<tr class="bg-gray-100">
<td colspan="3" class="px-4 py-2 font-semibold">Harga Per Meter</td>
</tr>
<tr>
<td class="px-4 py-2">Harga</td>
<td class="px-4 py-2"> <td class="px-4 py-2">
<input type="text" name="harga" class="input currency-format" <input type="text" name="harga" class="input currency-format"
value="{{ $inspectionData['harga'] ?? '' }}"> value="{{ $inspectionData['harga'] ?? '' }}">
@@ -246,6 +373,39 @@
class="input currency-format"> class="input currency-format">
</td> </td>
</tr> </tr>
<tr>
<td class="px-4 py-2">Diskon</td>
<td class="px-4 py-2">
<input type="text" name="harga" class="input currency-format"
value="{{ $inspectionData['diskon'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="diskon_pembanding[]"
class="input currency-format">
</td>
</tr>
<tr>
<td class="px-4 py-2">Total</td>
<td class="px-4 py-2">
<input type="text" name="total" class="input currency-format"
value="{{ $inspectionData['total'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="total_pembanding[]"
class="input currency-format">
</td>
</tr>
<tr>
<td class="px-4 py-2">Harga Setelah Diskon</td>
<td class="px-4 py-2">
<input type="text" name="harga_diskon" class="input currency-format"
value="{{ $inspectionData['harga_diskon'] ?? '' }}">
</td>
<td class="px-4 py-2">
<input type="text" name="harga_diskon_pembanding[]"
class="input currency-format">
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@@ -253,7 +413,7 @@
<div class="card-footer"> <div class="card-footer">
<div class="flex justify-end gap-2"> <div class="flex justify-end gap-2">
<button type="submit" class="btn btn-primary"> <button type="button" onclick="submitData()" class="btn btn-primary">
<i class="ki-duotone ki-save-2 fs-2"></i> <i class="ki-duotone ki-save-2 fs-2"></i>
Simpan Simpan
</button> </button>
@@ -262,7 +422,7 @@
</div> </div>
</form> </form>
</div> </div>
</div </div> </div>
</div> </div>
<!-- Loading Overlay --> <!-- Loading Overlay -->
@@ -278,55 +438,6 @@
<script> <script>
let columnCount = 1; let columnCount = 1;
function fillObjekPenilaian(data) {
if (!data) return;
// Helper function untuk mengisi nilai input dengan aman
function setInputValue(selector, value) {
const element = document.querySelector(selector);
if (element) {
element.value = value || '';
}
}
// Isi data koordinat
if (data.asset) {
setInputValue('input[name="kordinat_lat"]', data.asset.kordinat_lat);
setInputValue('input[name="kordinat_lng"]', data.asset.kordinat_lng);
}
// Isi data tanah
if (data.tanah) {
const luasTanah = data.tanah.luas_tanah?.sesuai ||
data.tanah.luas_tanah?.['tidak sesuai'] || '';
setInputValue('input[name="luas_tanah"]', luasTanah);
}
// Isi data bangunan
if (data.bangunan) {
const luasBangunan = data.bangunan.luas_tanah_bagunan?.sesuai ||
data.bangunan.luas_tanah_bagunan?.['tidak sesuai'] || '';
setInputValue('input[name="luas_tanah_bagunan"]', luasBangunan);
}
console.log("tee", data.asset.alamat.sesuai.nama_jalan);
// Isi data umum
setInputValue('input[name="alamat"]', data.asset.alamat.sesuai.nama_jalan);
setInputValue('input[name="desa"]', data.desa);
setInputValue('input[name="kecamatan"]', data.kecamatan);
setInputValue('input[name="kabupaten"]', data.kabupaten);
setInputValue('input[name="provinsi"]', data.provinsi);
setInputValue('input[name="nama_nara_sumber"]', data.nama_nara_sumber);
setInputValue('input[name="harga"]', data.harga);
// Set jenis aset dengan pengecekan
const jenisAsetSelect = document.querySelector('select[name="jenis_aset"]');
if (jenisAsetSelect && data.jenis_aset) {
jenisAsetSelect.value = data.jenis_aset;
}
}
function fillPembandingData(data, index) { function fillPembandingData(data, index) {
if (!data) return; if (!data) return;
@@ -334,9 +445,21 @@
function setArrayInputValue(name, value, index) { function setArrayInputValue(name, value, index) {
const element = document.getElementsByName(name)[index]; const element = document.getElementsByName(name)[index];
if (element) { if (element) {
if (element.tagName === "SELECT") {
// Jika elemen adalah select, set selected value
const options = Array.from(element.options);
const optionToSelect = options.find(option => option.value === value);
if (optionToSelect) {
optionToSelect.selected = true;
} else {
element.selectedIndex = 0; // Pilih default jika tidak ditemukan
}
} else {
// Jika elemen bukan select, langsung set value
element.value = value || ''; element.value = value || '';
} }
} }
}
// Isi data pembanding // Isi data pembanding
const inputs = { const inputs = {
@@ -347,12 +470,16 @@
'nama_nara_sumber_pembanding[]': data.nama_nara_sumber, 'nama_nara_sumber_pembanding[]': data.nama_nara_sumber,
'kordinat_lat_pembanding[]': data.kordinat_lat, 'kordinat_lat_pembanding[]': data.kordinat_lat,
'kordinat_lng_pembanding[]': data.kordinat_lng, 'kordinat_lng_pembanding[]': data.kordinat_lng,
'alamat_pembanding[]': data.alamat, 'address_pembanding[]': data.address,
'desa_pembanding[]': data.desa, 'village_code_pembanding[]': data.village_code,
'kecamatan_pembanding[]': data.kecamatan, 'district_code_pembanding[]': data.district_code,
'kabupaten_pembanding[]': data.kabupaten, 'city_code_pembanding[]': data.city_code,
'provinsi_pembanding[]': data.provinsi, 'province_code_pembanding[]': data.province_code,
'harga_pembanding[]': data.harga 'harga_pembanding[]': data.harga,
'harga_diskon_pembanding[]': data.harga_diskon,
'total_pembanding[]': data.total,
'diskon_pembanding[]': data.diskon,
}; };
// Isi semua input fields // Isi semua input fields
@@ -365,30 +492,22 @@
const imageId = `uploadedImage${index + 2}`; const imageId = `uploadedImage${index + 2}`;
const preview = document.getElementById(imageId); const preview = document.getElementById(imageId);
if (preview) { if (preview) {
preview.src = `/storage/pembanding/${data.foto_objek}`; preview.src = `/storage/${data.foto_objek}`;
preview.classList.remove('hidden'); preview.classList.remove('hidden');
} }
} }
} }
// Event listener dengan pengecekan data // Event listener dengan pengecekan data
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
try { try {
const inspectionData = {!! isset($inspectionData) ? json_encode($inspectionData) : 'null' !!}; const inspectionData = {!! isset($inspectionData) ? json_encode($inspectionData) : 'null' !!};
const comparisons = {!! isset($comparisons) ? json_encode($comparisons) : '' !!}; const comparisons = {!! isset($comparisons) ? json_encode($comparisons) : 'null' !!};
console.log('Inspection Data:', inspectionData); // Debug
console.log('Comparisons:', comparisons); // Debug
if (inspectionData) {
fillObjekPenilaian(inspectionData);
}
if (comparisons) { if (comparisons) {
console.log("comparisons", comparisons);
comparisons.data_pembanding.forEach((comparison, index) => { comparisons.data_pembanding.forEach((comparison, index) => {
if (index > 0) { // Skip kolom pertama karena sudah ada di template if (index > 0) {
addColumn(); addColumn();
} }
fillPembandingData(comparison, index); fillPembandingData(comparison, index);
@@ -428,7 +547,7 @@
// Update IDs and names for the new cell // Update IDs and names for the new cell
const inputs = newCell.querySelectorAll('input, select, textarea'); const inputs = newCell.querySelectorAll('input, select, textarea');
inputs.forEach(input => { inputs.forEach((input, index) => {
if (input.type === 'file') { if (input.type === 'file') {
const newImageId = `uploadedImage${columnCount + 1}`; const newImageId = `uploadedImage${columnCount + 1}`;
const preview = newCell.querySelector('img'); const preview = newCell.querySelector('img');
@@ -441,11 +560,20 @@
}; };
} }
} }
if (input.id) {
input.id = updateDynamicId(input.id, columnCount);
}
// Clear values // Clear values
if (input.type !== 'file') { if (input.type !== 'file') {
input.value = ''; input.value = '';
} }
loadIdSelectAddres(input.id);
}); });
} }
row.appendChild(newCell); row.appendChild(newCell);
}); });
@@ -454,6 +582,10 @@
reinitializeEventListeners(); reinitializeEventListeners();
} }
function updateDynamicId(currentId, columnCount) {
return `${currentId.split('_')[0]}_${'code_pembanding'}_${columnCount}`;
}
function removeColumn() { function removeColumn() {
if (columnCount > 1) { if (columnCount > 1) {
const table = document.getElementById('dataTable'); const table = document.getElementById('dataTable');
@@ -522,7 +654,6 @@
document.getElementById('removeColumnBtn').addEventListener('click', removeColumn); document.getElementById('removeColumnBtn').addEventListener('click', removeColumn);
// Form submission // Form submission
document.getElementById('dataPembandingForm').addEventListener('submit', handleSubmit);
reinitializeEventListeners(); reinitializeEventListeners();
} }
@@ -543,14 +674,14 @@
}); });
} }
function handleSubmit(e) { function submitData() {
e.preventDefault();
const loadingOverlay = document.getElementById('loadingOverlay'); const loadingOverlay = document.getElementById('loadingOverlay');
loadingOverlay.classList.remove('hidden'); loadingOverlay.classList.remove('hidden');
loadingOverlay.classList.add('flex'); loadingOverlay.classList.add('flex');
const form = document.querySelector('form');
const formData = new FormData(form);
const formData = new FormData(e.target); console.log('Form data entries:', Array.from(formData.entries()));
$.ajax({ $.ajax({
url: '{{ route('surveyor.storeDataPembanding') }}', url: '{{ route('surveyor.storeDataPembanding') }}',
@@ -573,6 +704,8 @@
window.location.href = window.location.href =
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}'; '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
} }
console.log(result);
}); });
} else { } else {
Swal.fire({ Swal.fire({
@@ -598,6 +731,124 @@
} }
}); });
} }
function loadIdSelectAddres(inputs) {
const data = [
'province_code_pembanding',
'city_code_pembanding',
'district_code_pembanding',
'village_code_pembanding'
]
}
document.addEventListener('DOMContentLoaded', function() {
// Memuat data provinsi saat halaman dimuat
loadProvinces();
// Event listener untuk perubahan pada dropdown Province
document.getElementById('province_code_pembanding').addEventListener('change', function() {
const provinceId = this.value;
if (provinceId) {
getCity(provinceId); // Kirimkan provinceId ke fungsi getCity
} else {
resetDropdown('city_code_pembanding', 'Select City');
resetDropdown('district_code_pembanding', 'Select District');
resetDropdown('village_code_pembanding', 'Select Village');
}
});
// Event listener untuk perubahan pada dropdown City
document.getElementById('city_code_pembanding').addEventListener('change', function() {
const cityId = this.value;
if (cityId) {
getDistrict(cityId);
} else {
resetDropdown('district_code_pembanding', 'Select District');
resetDropdown('village_code_pembanding', 'Select Village');
}
});
// Event listener untuk perubahan pada dropdown District
document.getElementById('district_code_pembanding').addEventListener('change', function() {
const districtId = this.value;
if (districtId) {
getVillage(districtId);
} else {
resetDropdown('village_code_pembanding', 'Select Village');
}
});
});
function loadProvinces() {
const provinces =
@json($provinces); // Using Laravel's Blade templating to pass the provinces array to JS
const provinceDropdown = document.getElementById('province_code_pembanding');
provinceDropdown.innerHTML = '<option value="">Select Province</option>';
provinces.forEach(province => {
provinceDropdown.innerHTML += `<option value="${province.code}">${province.name}</option>`;
});
}
async function getCity(provinceId) {
try {
const response = await fetch(
`/locations/cities/province/${provinceId}`); // Assuming this is still your API
const data = await response.json();
const cityDropdown = document.getElementById('city_code_pembanding');
cityDropdown.innerHTML = '<option value="">Select City</option>';
data.forEach(city => {
cityDropdown.innerHTML += `<option value="${city.code}">${city.name}</option>`;
});
} catch (error) {
console.error('Error fetching cities:', error);
}
}
async function getDistrict(cityId) {
try {
const response = await fetch(`/locations/districts/city/${cityId}`);
const data = await response.json();
const districtDropdown = document.getElementById('district_code_pembanding');
districtDropdown.innerHTML = '<option value="">Select District</option>';
data.forEach(district => {
districtDropdown.innerHTML += `<option value="${district.code}">${district.name}</option>`;
});
} catch (error) {
console.error('Error fetching districts:', error);
}
}
async function getVillage(districtId) {
try {
const response = await fetch(`/locations/villages/district/${districtId}`);
const data = await response.json();
const villageDropdown = document.getElementById('village_code_pembanding');
villageDropdown.innerHTML = '<option value="">Select Village</option>';
data.forEach(village => {
villageDropdown.innerHTML += `<option value="${village.code}">${village.name}</option>`;
});
} catch (error) {
console.error('Error fetching villages:', error);
}
}
function resetDropdown(elementId, placeholder) {
const dropdown = document.getElementById(elementId);
dropdown.innerHTML = `<option value="">${placeholder}</option>`;
}
</script> </script>
<style> <style>

View File

@@ -1,9 +1,12 @@
{{-- analisa fakta --}} {{-- analisa fakta --}}
<div class="card bg-white rounded-lg overflow-hidden"> <div class="card bg-white rounded-lg overflow-hidden">
<div class="card-body"> <div class="card-header">
<div class=" py-4 "> <h3 class="card-title uppercase">
<h1 class="text-md font-medium text-gray-900">Analisis Fakta</h1> Analisis Fakta
</h3>
</div> </div>
<div class="card-body">
<div class="grid gap-5"> <div class="grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Faktor Positif</label> <label class="form-label max-w-56">Faktor Positif</label>
@@ -76,8 +79,8 @@
<label class="form-label max-w-56">Batas batas</label> <label class="form-label max-w-56">Batas batas</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="grid grid-cols-1 gap-4 items-center w-full"> <div class="grid grid-cols-1 gap-4 items-center w-full">
@if (isset($arahMataAngin)) @if (isset($basicData['arahMataAngin']))
@foreach ($arahMataAngin as $item) @foreach ($basicData['arahMataAngin'] as $item)
@php @php
$isChecked = false; $isChecked = false;
$inputValue = ''; $inputValue = '';

View File

@@ -14,8 +14,7 @@
Data Jaminan Data Jaminan
</h3> </h3>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<a href="{{ route('surveyor.show', ['id' => request('foto')]) }}" <a href="{{ route('surveyor.show', ['id' => request('foto')]) }}" class="btn btn-xs btn-info">
class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back <i class="ki-filled ki-exit-left"></i> Back
</a> </a>
</div> </div>
@@ -34,12 +33,7 @@
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
@foreach ($permohonan->debiture->documents as $dokumen) @foreach ($permohonan->debiture->documents as $dokumen)
<span class="text-2sm text-gray-700"> <span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->address ?? '' }}, {{formatAlamat($dokumen->pemilik)}}
{{ $dokumen->pemilik->village->name ?? '' }},
{{ $dokumen->pemilik->district->name ?? '' }},
{{ $dokumen->pemilik->city->name ?? '' }},
{{ $dokumen->pemilik->province->name ?? '' }} -
{{ $dokumen->pemilik->village->postal_code ?? '' }}
</span> </span>
@endforeach @endforeach
</div> </div>
@@ -99,7 +93,7 @@
<div class="flex w-full items-center justify-center gap-4 mb-4" <div class="flex w-full items-center justify-center gap-4 mb-4"
id="photoContainer-{{ $index }}"> id="photoContainer-{{ $index }}">
<label class="form-label max-w-56"> <label class="form-label max-w-56">
<span class="form-label">Foto Rute Menuju Lokasi</span> <span class="form-label">Foto Rute Menuju Lokasi {{ $index + 1 }}</span>
</label> </label>
<div class="input-group w-full flex flex-col gap-2"> <div class="input-group w-full flex flex-col gap-2">
<div class="preview-container"> <div class="preview-container">
@@ -188,23 +182,25 @@
</div> </div>
<div id="ruteLainnya" style="margin-top: 10px"> <div id="ruteLainnya" style="margin-top: 10px">
@if (isset($formFoto['foto_rute_lainnya']) && is_array($formFoto['foto_rute_lainnya'])) @if (isset($formFoto['foto_rute_lainnya']) && is_array($formFoto['foto_rute_lainnya']))
@foreach ($formFoto['foto_rute_lainnya'] as $Index => $photo) @foreach ($formFoto['foto_rute_lainnya'] as $index => $photo)
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mb-5" <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mb-5"
id="photoContainer"> id="photoContainer">
<label class="form-label max-w-56"> <label class="form-label max-w-56">
Masukkan nama rute lainnya Masukkan nama rute lainnya {{ $index + 1 }}
</label> </label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<img id="foto_rute_lainnya-preview-{{ $index }}"
src="{{ asset('storage/' . $photo['foto_rute_lainnya']) }}"
alt="Foto Rute " class="mt-2 max-w-full h-auto"
style="width: 30rem;">
<div class="flex flex-col lg:flex-row gap-2 w-full"> <div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="flex flex-wrap items-baseline px-2"> <div class="flex flex-wrap items-baseline px-2">
<input class="input" type="text" name="name_rute_lainnya[]" <input class="input" type="text" name="name_rute_lainnya[]"
value="{{ $photo['name_rute_lainnya'] }}"> value="{{ $photo['name_rute_lainnya'] }}">
</div> </div>
<div class="input-group w-full flex flex-col gap-2"> <div class="input-group w-full flex flex-col gap-2">
<img id="foto_rute_lainnya-preview-"
src="{{ asset('storage/' . $photo['foto_rute_lainnya']) }}"
alt="Foto Rute " class="mt-2 max-w-full h-auto"
style="width: 30rem;">
<div class="input-group w-full flex gap-2"> <div class="input-group w-full flex gap-2">
<input type="file" name="foto_rute_lainnya[]" <input type="file" name="foto_rute_lainnya[]"
class="file-input file-input-bordered w-full" class="file-input file-input-bordered w-full"
@@ -342,13 +338,16 @@
name="name_objek[]" value="{{ $view['label'] }}" /> name="name_objek[]" value="{{ $view['label'] }}" />
<div class="w-full grid gap-5"> <div class="w-full grid gap-5">
<img id="foto_object_jaminan_preview_{{ $view['index'] }}" <img id="foto_object_jaminan_preview_{{ $view['index'] }}"
src="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_object']) ? asset('storage/' . $formFoto['object_jaminan'][$view['index']]['foto_object']) : '' }}" src="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_objek']) ? asset('storage/' . $formFoto['object_jaminan'][$view['index']]['foto_objek']) : '' }}"
alt="{{ $view['label'] }}" class="mb-2 w-48 h-auto" alt="{{ $view['label'] }}" class="mb-2 h-auto"
style="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_object']) ? '' : 'display: none;' }} width: 30rem;">
style="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_objek']) ? 'width: 30rem;' : 'display: none;' }}"
onerror="this.style.display='none';" />
<div class="input-group w-full flex gap-2"> <div class="input-group w-full flex gap-2">
<input type="file" name="foto_objek[]" <input type="file" name="foto_objek[]"
class="file-input file-input-bordered w-full" class="file-input file-input-bordered w-full"
accept="image/*" capture="camera"> accept="image/*" capture="camera"
onchange="previewImage(this, 'foto_object_jaminan_preview_{{ $view['index'] }}')">
<button type="button" id="btnCamera" <button type="button" id="btnCamera"
class="btn btn-light" class="btn btn-light"
data-modal-toggle="#cameraModal"> data-modal-toggle="#cameraModal">
@@ -391,7 +390,7 @@
<label class="form-label max-w-56"> <label class="form-label max-w-56">
<span class="form-label">Foto Lantai 1</span> <span class="form-label">Foto Lantai 1</span>
</label> </label>
<div class="w-full grid gap-5"> <div class="input-group w-full grid gap-5">
<img src="{{ asset('storage/' . old('foto_lantai_unit', $item['foto_lantai_unit'])) }}" <img src="{{ asset('storage/' . old('foto_lantai_unit', $item['foto_lantai_unit'])) }}"
alt="Gambar Pendamping" style="width: 30rem;"> alt="Gambar Pendamping" style="width: 30rem;">
<input type="hidden" name="name_lantai_unit[]" value="lantai"> <input type="hidden" name="name_lantai_unit[]" value="lantai">
@@ -448,13 +447,16 @@
onchange="previewImage(this, 'foto_basement_preview')"> onchange="previewImage(this, 'foto_basement_preview')">
<div class="input-group w-full flex gap-2"> <div class="input-group w-full flex gap-2">
<input id="inputBasement" type="file" name="foto_basement" <input id="inputBasement" type="file" name="foto_basement"
class="file-input file-input-bordered w-full" accept="image/*" capture="camera"> class="file-input file-input-bordered w-full" accept="image/*"
<button type="button" id="btnCamera" class="btn btn-light" data-modal-toggle="#cameraModal"> capture="camera">
<button type="button" id="btnCamera" class="btn btn-light"
data-modal-toggle="#cameraModal">
<i class="ki-outline ki-abstract-33"></i> Camera <i class="ki-outline ki-abstract-33"></i> Camera
</button> </button>
</div> </div>
</div> </div>
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;" id="btnDelete"> <button type="button" class="btn btn-danger btn-sm delete-btn"
style="display: none;" id="btnDelete">
<i class="ki-filled ki-trash"></i> <i class="ki-filled ki-trash"></i>
</button> </button>
</div> </div>
@@ -484,10 +486,10 @@
@if (isset($formFoto['lingkungan']) && is_array($formFoto['lingkungan']) && count($formFoto['lingkungan']) > 0) @if (isset($formFoto['lingkungan']) && is_array($formFoto['lingkungan']) && count($formFoto['lingkungan']) > 0)
@foreach ($formFoto['lingkungan'] as $key => $item) @foreach ($formFoto['lingkungan'] as $key => $item)
<div id="inputContainerLingkungan_{{ $key }}" style="margin-top: 10px"> <div id="inputContainerLingkungan" style="margin-top: 10px">
<div class="flex w-full items-center justify-center gap-4 mb-4"> <div class="flex w-full items-center justify-center gap-4 mb-4">
<label class="form-label max-w-56"> <label class="form-label max-w-56">
<span class="form-label">Lingkungan</span> <span class="form-label">Lingkungan {{ $key + 1 }}</span>
</label> </label>
<div class="w-full grid gap-5"> <div class="w-full grid gap-5">
<img id="foto_lingkungan_preview_{{ $key }}" <img id="foto_lingkungan_preview_{{ $key }}"
@@ -495,13 +497,16 @@
alt="Gambar Lingkungan" style="width: 30rem;"> alt="Gambar Lingkungan" style="width: 30rem;">
<input type="hidden" name="name_lingkungan[]" value="lingkungan"> <input type="hidden" name="name_lingkungan[]" value="lingkungan">
<div class="input-group w-full flex gap-2"> <div class="input-group w-full flex gap-2">
<input id="inputLingkungan_{{ $key }}" type="file" name="foto_lingkungan[]" <input id="inputLingkungan_{{ $key }}" type="file"
class="file-input file-input-bordered w-full" accept="image/*" capture="camera"> name="foto_lingkungan[]" class="file-input file-input-bordered w-full"
<button type="button" id="btnCamera" class="btn btn-light" data-modal-toggle="#cameraModal"> accept="image/*" capture="camera">
<button type="button" id="btnCamera" class="btn btn-light"
data-modal-toggle="#cameraModal">
<i class="ki-outline ki-abstract-33"></i> Camera <i class="ki-outline ki-abstract-33"></i> Camera
</button> </button>
</div> </div>
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;" id="btnDelete"> <button type="button" class="btn btn-danger btn-sm delete-btn"
style="display: none;" id="btnDelete">
<i class="ki-filled ki-trash"></i> <i class="ki-filled ki-trash"></i>
</button> </button>
</div> </div>
@@ -510,7 +515,7 @@
</div> </div>
@endforeach @endforeach
@else @else
<div id="inputContainerLingkungan_0" style="margin-top: 10px"> <div id="inputContainerLingkungan" style="margin-top: 10px">
<div class="flex w-full items-center justify-center gap-4 mb-4"> <div class="flex w-full items-center justify-center gap-4 mb-4">
<label class="form-label max-w-56"> <label class="form-label max-w-56">
<span class="form-label">Lingkungan</span> <span class="form-label">Lingkungan</span>
@@ -519,11 +524,13 @@
<input type="hidden" name="name_lingkungan[]" value="lingkungan"> <input type="hidden" name="name_lingkungan[]" value="lingkungan">
<input id="inputLingkungan_0" type="file" name="foto_lingkungan[]" <input id="inputLingkungan_0" type="file" name="foto_lingkungan[]"
class="file-input file-input-bordered w-full" accept="image/*" capture="camera"> class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
<button type="button" id="btnCamera" class="btn btn-light" data-modal-toggle="#cameraModal"> <button type="button" id="btnCamera" class="btn btn-light"
data-modal-toggle="#cameraModal">
<i class="ki-outline ki-abstract-33"></i> Camera <i class="ki-outline ki-abstract-33"></i> Camera
</button> </button>
</div> </div>
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;" id="btnDelete"> <button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;"
id="btnDelete">
<i class="ki-filled ki-trash"></i> <i class="ki-filled ki-trash"></i>
</button> </button>
</div> </div>
@@ -532,6 +539,7 @@
@endif @endif
</div> </div>
</div> </div>
<div class="card bg-white rounded-lg shadow-md"> <div class="card bg-white rounded-lg shadow-md">
<div class="card-body"> <div class="card-body">
<div class=" text-white py-4 flex items-center justify-between"> <div class=" text-white py-4 flex items-center justify-between">
@@ -631,9 +639,11 @@
confirmButtonText: 'OK' confirmButtonText: 'OK'
}).then((response) => { }).then((response) => {
if (response.isConfirmed) { if (response.isConfirmed) {
window.location.href = // window.location.href =
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}'; // '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
} }
console.log(response);
}); });
} else { } else {
Swal.fire({ Swal.fire({
@@ -693,7 +703,3 @@
} }
} }
</style> </style>

View File

@@ -1,8 +1,6 @@
<div class=" card w-full bg-white rounded-lg shadow-md "> <div class=" card w-full bg-white rounded-lg shadow-md ">
<div class="card-header"> <div class="card-header">
<h3 class="card-title"> <h3 class="card-title uppercase">
Form Inspeksi Form Inspeksi
</h3> </h3>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
@@ -11,9 +9,6 @@
</a> </a>
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="py-4"> <div class="py-4">
<h1 class="text-md font-medium text-gray-900">Order Penilaian</h1> <h1 class="text-md font-medium text-gray-900">Order Penilaian</h1>
@@ -100,7 +95,7 @@
<h1 class="text-md font-medium text-gray-900">Deskripsi Aset jaminan</h1> <h1 class="text-md font-medium text-gray-900">Deskripsi Aset jaminan</h1>
</div> </div>
<div class="grid gap-5"> <div class="grid gap-5 w-full">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Jenis Aset</label> <label class="form-label max-w-56">Jenis Aset</label>
<div> <div>
@@ -127,13 +122,17 @@
<span class="ml-2">Tidak</span> <span class="ml-2">Tidak</span>
</label> </label>
<!-- Select dropdown untuk "Tidak Sesuai" --> <!-- Select dropdown untuk "Tidak Sesuai" -->
@php
$statusKey = isset($forminspeksi['asset']['jenis_asset']['sesuai']) ? 'sesuai' : 'tidak sesuai';
$selectedValue = $forminspeksi['asset']['jenis_asset'][$statusKey] ?? null;
@endphp
<div id="jenis_asset" class="flex items-baseline gap-2" <div id="jenis_asset" class="flex items-baseline gap-2"
style="{{ isset($forminspeksi['asset']['jenis_asset']['tidak sesuai']) ? '' : 'display: none;' }}"> style="{{ isset($selectedValue) === 'tidak sesuai' ? '' : 'display: none;' }}">
<select id="jenis_asset_tidak_sesuai" class="input w-full" <select id="jenis_asset_tidak_sesuai" class="input w-full"
name="jenis_asset_tidak_sesuai"> name="jenis_asset_tidak_sesuai">
<option value="">Select Jenis asset</option> <option value="">Select Jenis asset</option>
@if (isset($jenisJaminan)) @if (isset($basicData['jenisJaminan']))
@foreach ($jenisJaminan as $item) @foreach ($basicData['jenisJaminan'] as $item)
<option value="{{ $item->id }}" <option value="{{ $item->id }}"
{{ old('jenis_asset_tidak_sesuai', $forminspeksi['asset']['jenis_asset_tidak_sesuai'] ?? '') == $item->name ? 'selected' : '' }}> {{ old('jenis_asset_tidak_sesuai', $forminspeksi['asset']['jenis_asset_tidak_sesuai'] ?? '') == $item->name ? 'selected' : '' }}>
{{ $item->name }} {{ $item->name }}
@@ -153,7 +152,7 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Alamat</label> <label class="form-label max-w-56">Alamat</label>
<div> <div class="w-full">
@foreach ($permohonan->debiture->documents as $dokumen) @foreach ($permohonan->debiture->documents as $dokumen)
<span class="text-2sm text-gray-700"> <span class="text-2sm text-gray-700">
{{ formatAlamat($dokumen) }} {{ formatAlamat($dokumen) }}
@@ -163,22 +162,14 @@
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2"> <div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2">
<label class="form-label flex items-center gap-3 text-nowrap"> <label class="form-label flex items-center gap-3 text-nowrap">
<input <input onclick="updateAlamatFields('sesuai')" type="radio" class="radio"
onclick="updateAlamatFields('sesuai')" name="alamat_sesuai" value="sesuai"
type="radio"
class="radio"
name="alamat_sesuai"
value="sesuai"
{{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['sesuai'])) ? 'checked' : '' }}> {{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['sesuai'])) ? 'checked' : '' }}>
<span class="ml-2">Ya</span> <span class="ml-2">Ya</span>
</label> </label>
<label class="form-label flex items-center gap-3 text-nowrap"> <label class="form-label flex items-center gap-3 text-nowrap">
<input <input onclick="updateAlamatFields('tidak sesuai')" type="radio" class="radio"
onclick="updateAlamatFields('tidak sesuai')" name="alamat_sesuai" value="tidak sesuai"
type="radio"
class="radio"
name="alamat_sesuai"
value="tidak sesuai"
{{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['tidak sesuai'])) ? 'checked' : '' }}> {{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['tidak sesuai'])) ? 'checked' : '' }}>
<span class="ml-2">Tidak</span> <span class="ml-2">Tidak</span>
</label> </label>
@@ -186,69 +177,124 @@
<em id="error-alamat" class="alert text-danger text-sm"></em> <em id="error-alamat" class="alert text-danger text-sm"></em>
</div> </div>
<div id="alamat_form" class="grid gap-2 mt-5">
@php @php
$fields = [ $statusKey = isset($forminspeksi['asset']['alamat']['sesuai']) ? 'sesuai' : 'tidak sesuai';
[ $address = $forminspeksi['asset']['alamat'][$statusKey] ?? null;
'label' => 'Jl.',
'name' => 'nama_jalan',
'id' => 'nama_jalan',
'readonly' => false,
],
[
'label' => 'Provinsi',
'name' => 'provinsi',
'id' => 'provinsi',
'type' => 'select',
'options' => $provinces,
],
[
'label' => 'Kota/Kabupaten',
'name' => 'kota_kabupaten',
'id' => 'kota_kabupaten',
'type' => 'select',
'options' => $provinces,
],
[
'label' => 'Kecamatan',
'name' => 'kecamatan',
'id' => 'kecamatan',
'type' => 'select',
'options' => $provinces,
],
[
'label' => 'Kelurahan',
'name' => 'desa_kelurahan',
'id' => 'desa_kelurahan',
'type' => 'select',
'options' => $provinces,
],
];
@endphp @endphp
@foreach ($fields as $field) <div id="alamat_form" class="grid gap-2 mt-5"
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> style="{{ isset($address) ? '' : 'display: none;' }}">
<label class="form-label max-w-56">{{ $field['label'] }}</label> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="address" class="form-label max-w-56">Jl.</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
@if (isset($field['type']) && $field['type'] === 'select') <input type="text" id="address" name="address" class="input w-full"
<select id="{{ $field['id'] }}" name="{{ $field['name'] }}" class="select w-full"> placeholder="Masukkan Jl."
<option value="">{{ $field['label'] }}</option> value="{{ isset($forminspeksi['asset']['alamat']['tidak sesuai']['address'])
@foreach ($field['options'] as $option) ? $forminspeksi['asset']['alamat']['tidak sesuai']['address']
<option value="{{ $option->code }}">{{ $option->name }}</option> : (isset($forminspeksi['asset']['alamat']['sesuai']['address'])
@endforeach ? $forminspeksi['asset']['alamat']['sesuai']['address']
</select> : old('address')) }}">
@else
<input type="text" id="{{ $field['id'] }}" name="{{ $field['name'] }}" class="input"
{{ $field['readonly'] ? 'readonly' : '' }}>
@endif
</div> </div>
</div> </div>
@endforeach
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="province_code" class="form-label max-w-56">Provinsi</label>
<div class="flex flex-wrap items-baseline w-full">
<select id="province_code" name="province_code" class="input w-full">
<option value="">Select Province</option>
@foreach ($provinces as $province)
@if (isset($debitur))
<option value="{{ $province->code }}"
{{ isset($debitur->province_code) && $debitur->province_code == $province->code ? 'selected' : '' }}>
{{ $province->name }}
</option>
@else
<option value="{{ $province->code }}">
{{ $province->name }}
</option>
@endif
@endforeach
</select>
</div> </div>
</div> </div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="city_code" class="form-label max-w-56">Kota/Kabupaten</label>
<div class="flex flex-wrap items-baseline w-full">
<select id="city_code" name="city_code" class="select w-full">
<option value="">Pilih Kota/Kabupaten</option>
@if (isset($cities))
@foreach ($cities as $city)
@if (isset($debitur))
<option value="{{ $city->code }}"
{{ isset($debitur->city_code) && $debitur->city_code == $city->code ? 'selected' : '' }}>
{{ $city->name }}
</option>
@else
<option value="{{ $city->code }}">
{{ $city->name }}
</option>
@endif
@endforeach
@endif
</select>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="district_code" class="form-label max-w-56">Kecamatan</label>
<div class="flex flex-wrap items-baseline w-full">
<select id="district_code" name="district_code" class="select w-full">
<option value="">Pilih Kecamatan</option>
@if (isset($data['districts']))
@foreach ($districts as $district)
@if (isset($debitur))
<option value="{{ $district->code }}"
{{ isset($debitur->district_code) && $debitur->district_code == $district->code ? 'selected' : '' }}>
{{ $district->name }}
</option>
@else
<option value="{{ $district->code }}">
{{ $district->name }}
</option>
@endif
@endforeach
@endif
</select>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label for="village_code" class="form-label max-w-56">Kelurahan</label>
<div class="flex flex-wrap items-baseline w-full">
<select id="village_code" name="village_code" class="select w-full">
<option value="">Pilih Kelurahan</option>
@if (isset($villages))
@foreach ($villages as $village)
@if (isset($debitur))
<option value="{{ $village->code }}"
{{ isset($debitur->village_code) && $debitur->village_code == $village->code ? 'selected' : '' }}>
{{ $village->name }}
</option>
@else
<option value="{{ $village->code }}">
{{ $village->name }}
</option>
@endif
@endforeach
@endif
</select>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -403,13 +449,19 @@
<span class="ml-2">Tidak</span> <span class="ml-2">Tidak</span>
</label> </label>
<!-- Select dropdown untuk "Tidak Sesuai" --> <!-- Select dropdown untuk "Tidak Sesuai" -->
@php
$statusKey = isset($forminspeksi['asset']['hub_cadeb']['sesuai'])
? 'sesuai'
: 'tidak sesuai';
$selectedData = $forminspeksi['asset']['hub_cadeb'][$statusKey] ?? null;
@endphp
<select id="hub_cadeb_tidak_sesuai" <select id="hub_cadeb_tidak_sesuai"
class="input w-full class="input w-full
name="hub_cadeb_tidak_sesuai" name="hub_cadeb_tidak_sesuai"
style="{{ old('hub_cadeb', $forminspeksi['asset']['hub_cadeb'] ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}"> style="{{ old('hub_cadeb', $selectedData ?? '') == 'tidak sesuai' ? '' : 'display: none;' }}">
<option value="">Select Hubungan Cadeb</option> <option value="">Select Hubungan Cadeb</option>
@if (isset($hubCadeb)) @if (isset($basicData['hubCadeb']))
@foreach ($hubCadeb as $item) @foreach ($basicData['hubCadeb'] as $item)
<option value="{{ $item->name }}" <option value="{{ $item->name }}"
{{ old('hub_cadeb_tidak_sesuai', $forminspeksi['asset']['hub_cadeb_tidak_sesuai'] ?? '') == $item->name ? 'selected' : '' }}> {{ old('hub_cadeb_tidak_sesuai', $forminspeksi['asset']['hub_cadeb_tidak_sesuai'] ?? '') == $item->name ? 'selected' : '' }}>
{{ $item->name }} {{ $item->name }}
@@ -458,13 +510,19 @@
<span class="ml-2">Tidak</span> <span class="ml-2">Tidak</span>
</label> </label>
<!-- Select dropdown untuk "Tidak Sesuai" --> <!-- Select dropdown untuk "Tidak Sesuai" -->
@php
$statusKey = isset($forminspeksi['asset']['hub_cadeb_penghuni']['sesuai'])
? 'sesuai'
: 'tidak sesuai';
$selectedData = $forminspeksi['asset']['hub_cadeb_penghuni'][$statusKey] ?? null;
@endphp
<select id="hub_cadeb_Penghuni_tidak_sesuai" <select id="hub_cadeb_Penghuni_tidak_sesuai"
class="input w-full class="input w-full
name="hub_cadeb_Penghuni_tidak_sesuai" name="hub_cadeb_Penghuni_tidak_sesuai"
style="{{ old('hub_cadeb', isset($forminspeksi['asset']['hub_cadeb_penghuni']['tidak sesuai'])) ? '' : 'display: none;' }}"> style="{{ old('hub_cadeb', $selectedData) ? '' : 'display: none;' }}">
<option value="">Select Hubungan Cadeb</option> <option value="">Select Hubungan Cadeb</option>
@if (isset($hubPenghuni)) @if (isset($basicData['hubPenghuni']))
@foreach ($hubPenghuni as $item) @foreach ($basicData['hubPenghuni'] as $item)
<option value="{{ $item->name }}" <option value="{{ $item->name }}"
{{ old('hub_cadeb_Penghuni_tidak_sesuai', $forminspeksi['asset']['hub_cadeb_Penghuni_tidak_sesuai'] ?? '') == $item->name ? 'selected' : '' }}> {{ old('hub_cadeb_Penghuni_tidak_sesuai', $forminspeksi['asset']['hub_cadeb_Penghuni_tidak_sesuai'] ?? '') == $item->name ? 'selected' : '' }}>
{{ $item->name }} {{ $item->name }}

View File

@@ -1,13 +1,13 @@
<!-- Informasi Tata Ruang --> <!-- Informasi Tata Ruang -->
<div class="card w-full bg-white"> <div class="card w-full bg-white">
<div class="card-body"> <div class="card-header">
<div class="py-4"> <h3 class="card-title uppercase">
<h1 class="text-md font-medium text-gray-900">Informasi Dinas Tata Ruang</h1> Informasi Dinas Tata Ruang
</h3>
</div> </div>
<div class="card-body">
<!-- Informasi Tata Ruang Form --> <!-- Informasi Tata Ruang Form -->
<div class="grid gap-5"> <div class="grid gap-5">
@php @php
$inputDinasTata = [ $inputDinasTata = [
[ [

View File

@@ -52,26 +52,59 @@
</div> </div>
</div> </div>
@endsection @endsection
@push('scripts') @push('scripts')
<script type="text/javascript"> <script type="text/javascript">
function updateAlamatFields(type) { function updateAlamatFields(status) {
if (type === 'sesuai') { // Ambil elemen formulir
// Update nilai form dengan data sesuai const addressForm = document.getElementById('alamat_form');
document.getElementById('nama_jalan').value = "{{ $dokumen->address ?? '' }}"; const inputs = addressForm.querySelectorAll('input, select');
document.getElementById('provinsi').value = "{{ $dokumen->province->code ?? '' }}"; const addressInput = document.getElementById('address');
document.getElementById('kota_kabupaten').value = "{{ $dokumen->city->code ?? '' }}";
document.getElementById('kecamatan').value = "{{ $dokumen->district->code ?? '' }}"; if (status === 'sesuai') {
document.getElementById('desa_kelurahan').value = "{{ $dokumen->village->code ?? '' }}"; addressInput.value = "{{ $dokumen->address ?? '' }}";
} else if (type === 'tidak sesuai') { inputs.forEach(element => {
// Reset nilai form untuk input manual if (element.tagName === 'INPUT') {
document.getElementById('nama_jalan').value = ''; element.setAttribute('readonly', true);
document.getElementById('provinsi').value = ''; } else if (element.tagName === 'SELECT') {
document.getElementById('kota_kabupaten').value = ''; element.setAttribute('disabled', true);
document.getElementById('kecamatan').value = ''; element.classList.add('disabled-input')
document.getElementById('desa_kelurahan').value = ''; }
});
addressForm.style.display = 'grid';
addressForm.disabled = true;
addressForm.classList.add('disabled-input')
} else if (status === 'tidak sesuai') {
addressForm.style.display = 'grid';
addressForm.removeAttribute('disabled');
addressForm.classList.remove('disabled-input')
const formInspeksi = @json($forminspeksi);
const addressInput = document.getElementById('address');
if (formInspeksi && formInspeksi.asset && formInspeksi.asset.alamat) {
if (formInspeksi.asset.alamat['tidak sesuai'] && formInspeksi.asset.alamat['tidak sesuai'].address) {
addressInput.value = formInspeksi.asset.alamat['tidak sesuai'].address;
} else if (formInspeksi.asset.alamat['sesuai'] && formInspeksi.asset.alamat['sesuai'].address) {
addressInput.value = formInspeksi.asset.alamat['sesuai'].address;
} else {
addressInput.value = "";
} }
} }
inputs.forEach(element => {
if (element.tagName === 'INPUT') {
element.removeAttribute('readonly');
} else if (element.tagName === 'SELECT') {
element.removeAttribute('disabled');
element.classList.remove('disabled-input')
}
});
}
}
function toggleFieldVisibility(fieldName, inputId, visibleValues = []) { function toggleFieldVisibility(fieldName, inputId, visibleValues = []) {
const selectedValue = $(`[name="${fieldName}"]:checked`).val(); const selectedValue = $(`[name="${fieldName}"]:checked`).val();
@@ -149,8 +182,10 @@
loadingOverlay.classList.remove('hidden'); loadingOverlay.classList.remove('hidden');
loadingOverlay.classList.add('flex'); loadingOverlay.classList.add('flex');
const formElement = $('#formInspeksi')[0]; const form = document.querySelector('form');
const formData = new FormData(formElement); const formData = new FormData(form);
console.log('Form data entries:', Array.from(formData.entries()));
$.ajax({ $.ajax({
url: '{{ route('surveyor.store') }}', url: '{{ route('surveyor.store') }}',
@@ -170,8 +205,8 @@
confirmButtonText: 'OK' confirmButtonText: 'OK'
}).then((response) => { }).then((response) => {
if (response.isConfirmed) { if (response.isConfirmed) {
window.location.href = // window.location.href =
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}'; // '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
} }
}); });
} else { } else {
@@ -319,12 +354,21 @@
} }
} }
.scrollable-x-auto { div[disabled] {
overflow-x: auto; background-color: #f5f5f5;
max-width: 100%; color: #a0a0a0;
border: 1px solid #d1d1d1;
cursor: not-allowed;
pointer-events: none;
}
div[disabled]:hover {
background-color: #e8e8e8;
} }
.table { div.disabled-input {
min-width: 100%; opacity: 0.6;
transition: opacity 0.3s ease;
} }
</style> </style>

View File

@@ -1,11 +1,10 @@
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden"> <div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
<div class="card-header">
<div class="card-body"> <h3 class="card-title uppercase">
Analisa Lingkungan
</h3>
<div class=" text-white py-4">
<h1 class="text-md font-medium text-gray-900">Analisis Lingkungan</h1>
</div> </div>
<div class="card-body">
<div class="grid gap-5"> <div class="grid gap-5">
<!-- Jarak dari Objek Utama --> <!-- Jarak dari Objek Utama -->
<div class=" rounded-lg"> <div class=" rounded-lg">
@@ -45,8 +44,8 @@
<label class="form-label max-w-56">Perkerasan Jalan</label> <label class="form-label max-w-56">Perkerasan Jalan</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($perkerasanJalan)) @if (isset($basicData['perkerasanJalan']))
@foreach ($perkerasanJalan as $item) @foreach ($basicData['perkerasanJalan'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="perkerasan_jalan[]" type="checkbox" <input class="checkbox" name="perkerasan_jalan[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -71,8 +70,8 @@
<label class="form-label max-w-56">Lalu Lintas Depan Lokasi</label> <label class="form-label max-w-56">Lalu Lintas Depan Lokasi</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($laluLintasLokasi)) @if (isset($basicData['laluLintasLokasi']))
@foreach ($laluLintasLokasi as $item) @foreach ($basicData['laluLintasLokasi'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="lalu_lintas[]" type="checkbox" <input class="checkbox" name="lalu_lintas[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -92,8 +91,8 @@
<label class="form-label max-w-56">Golongan Masy Sekitar</label> <label class="form-label max-w-56">Golongan Masy Sekitar</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($golMasySekitar)) @if (isset($basicData['golMasySekitar']))
@foreach ($golMasySekitar as $item) @foreach ($basicData['golMasySekitar'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="gol_mas_sekitar[]" type="checkbox" <input class="checkbox" name="gol_mas_sekitar[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -113,8 +112,8 @@
<label class="form-label max-w-56">Tingkat Keramaian</label> <label class="form-label max-w-56">Tingkat Keramaian</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($tingkatKeramaian)) @if (isset($basicData['tingkatKeramaian']))
@foreach ($tingkatKeramaian as $item) @foreach ($basicData['tingkatKeramaian'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="tingkat_keramaian[]" type="checkbox" <input class="checkbox" name="tingkat_keramaian[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -134,8 +133,8 @@
<label class="form-label max-w-56">Terletak Di Area</label> <label class="form-label max-w-56">Terletak Di Area</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($terletakDiArea)) @if (isset($basicData['terletakDiArea']))
@foreach ($terletakDiArea as $item) @foreach ($basicData['terletakDiArea'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="terletak_diarea[]" type="checkbox" <input class="checkbox" name="terletak_diarea[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -312,8 +311,8 @@
<label class="form-label max-w-56">Merupakan daerah</label> <label class="form-label max-w-56">Merupakan daerah</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($merupakanDaerah)) @if (isset($basicData['merupakanDaerah']))
@foreach ($merupakanDaerah as $item) @foreach ($basicData['merupakanDaerah'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="merupakan_daerah[]" type="checkbox" <input class="checkbox" name="merupakan_daerah[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -333,8 +332,8 @@
<label class="form-label max-w-56">Fasilitas Umum dekat Object</label> <label class="form-label max-w-56">Fasilitas Umum dekat Object</label>
<div class="flex flex-wrap items-baseline w-full"> <div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($fasilitasObjek)) @if (isset($basicData['fasilitasObjek']))
@foreach ($fasilitasObjek as $item) @foreach ($basicData['fasilitasObjek'] as $item)
@php @php
$selectedFasilitas = is_array( $selectedFasilitas = is_array(

View File

@@ -1,12 +1,12 @@
@include('lpj::surveyor.components.header') @include('lpj::surveyor.components.header')
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden"> <div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
<div class="card-body"> <div class="card-header">
<h3 class="card-title uppercase">
Analisa Tanah
<div class="py-4 "> </h3>
<h1 class="text-md font-medium text-gray-900">Analisa Tanah</h1>
</div> </div>
<div class="card-body">
<div class="grid gap-5"> <div class="grid gap-5">
<!-- Luas tanah --> <!-- Luas tanah -->
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
@@ -52,8 +52,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- Hadap Mata Angin -->
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Hadap Mata Angin</label> <label class="form-label max-w-56">Hadap Mata Angin</label>
<div class="mt-2"> <div class="mt-2">
@@ -62,9 +61,12 @@
@php @php
$luas = $item->detail; $luas = $item->detail;
$details = json_decode($luas[0]->details, true); $details = json_decode($luas[0]->details, true);
$hadap_mata_angin = isset($details['hadap_mata_angin']) ? $details['hadap_mata_angin'] : 'N/A'; $hadap_mata_angin = isset($details['hadap_mata_angin'])
? $details['hadap_mata_angin']
: 'N/A';
@endphp @endphp
<input type="hidden" name="hadap_mata_angin_sesuai" class="input" value="{{ $hadap_mata_angin }}"> <input type="hidden" name="hadap_mata_angin_sesuai" class="input"
value="{{ $hadap_mata_angin }}">
<p class="text-2sm text-gray-700">{{ $hadap_mata_angin }} m<sup>2</sup></p> <p class="text-2sm text-gray-700">{{ $hadap_mata_angin }} m<sup>2</sup></p>
@endforeach @endforeach
@endif @endif
@@ -85,17 +87,25 @@
</label> </label>
<!-- Select dropdown untuk "Tidak Sesuai" --> <!-- Select dropdown untuk "Tidak Sesuai" -->
<div id="hadap_mata_angin_tidak_sesuai" class="flex items-baseline gap-2" <div id="hadap_mata_angin_tidak_sesuai" class="flex items-baseline gap-2"
style="{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? '' : 'display: none;' }}"> style="{{ old('hadap_mata_angin', isset($forminspeksi['tanah']['hadap_mata_angin']['tidak sesuai'])) ? '' : 'display: none;' }}">
<select class="input w-full <select
class="input w-full
id="hadap_matangin_tidak_sesuai" id="hadap_matangin_tidak_sesuai"
name="analisa_tanah_hadap_mata_angin_tidak_sesuai"> name="analisa_tanah_hadap_mata_angin_tidak_sesuai">
@php
$statusKey = isset($forminspeksi['tanah']['hadap_mata_angin']['sesuai'])
? 'sesuai'
: 'tidak sesuai';
$selectedData =
$forminspeksi['tanah']['hadap_mata_angin'][$statusKey] ??
null;
@endphp
<option value="">Select Hadap Mata Angin</option> <option value="">Select Hadap Mata Angin</option>
@if (isset($arahMataAngin)) @if (isset($basicData['arahMataAngin']))
@foreach ($arahMataAngin as $item) @foreach ($basicData['arahMataAngin'] as $item)
<option value="{{ $item->name }}" <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', $selectedData ?? '') == $item->name ? 'selected' : '' }}>
{{ $item->name }} {{ $item->name }}
</option> </option>
@endforeach @endforeach
@@ -108,16 +118,13 @@
</div> </div>
</div> </div>
</div> </div>
<!-- Bentuk Tanah --> <!-- Bentuk Tanah -->
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Bentuk Tanah</label> <label class="form-label max-w-56">Bentuk Tanah</label>
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($bentukTanah)) @if (isset($basicData['bentukTanah']))
@foreach ($bentukTanah as $item) @foreach ($basicData['bentukTanah'] as $item)
<div class="flex items-center"> <div class="flex items-center">
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="bentuk_tanah[]" type="checkbox" <input class="checkbox" name="bentuk_tanah[]" type="checkbox"
@@ -149,8 +156,8 @@
<label class="form-label max-w-56">Kontur Tanah</label> <label class="form-label max-w-56">Kontur Tanah</label>
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($konturTanah)) @if (isset($basicData['konturTanah']))
@foreach ($konturTanah as $item) @foreach ($basicData['konturTanah'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="kontur_tanah[]" type="checkbox" <input class="checkbox" name="kontur_tanah[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -163,15 +170,13 @@
<em id="error-kontur_tanah" class="alert text-danger text-sm"></em> <em id="error-kontur_tanah" class="alert text-danger text-sm"></em>
</div> </div>
</div> </div>
<!-- Beda Ketinggian Dengan Jalan --> <!-- Beda Ketinggian Dengan Jalan -->
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Beda Ketinggian Dengan Jalan</label> <label class="form-label max-w-56">Beda Ketinggian Dengan Jalan</label>
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($ketinggianTanah)) @if (isset($basicData['ketinggianTanah']))
@foreach ($ketinggianTanah as $item) @foreach ($basicData['ketinggianTanah'] as $item)
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="ketinggian_jalan[]" type="checkbox" <input class="checkbox" name="ketinggian_jalan[]" type="checkbox"
@@ -199,10 +204,6 @@
<em id="error-ketinggian_jalan" class="alert text-danger text-sm"></em> <em id="error-ketinggian_jalan" class="alert text-danger text-sm"></em>
</div> </div>
</div> </div>
<!-- Kontur Jalan Depan Objek --> <!-- Kontur Jalan Depan Objek -->
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Kontur Jalan Depan Objek</label> <label class="form-label max-w-56">Kontur Jalan Depan Objek</label>
@@ -223,13 +224,12 @@
</div> </div>
</div> </div>
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Posisi Kavling</label> <label class="form-label max-w-56">Posisi Kavling</label>
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($posisiKavling)) @if (isset($basicData['posisiKavling']))
@foreach ($posisiKavling as $item) @foreach ($basicData['posisiKavling'] as $item)
<div class="flex items-center"> <div class="flex items-center">
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="posisi_kavling[]" type="checkbox" <input class="checkbox" name="posisi_kavling[]" type="checkbox"
@@ -241,7 +241,8 @@
@if (strcasecmp($item->name, 'Lainnya') == 0) @if (strcasecmp($item->name, 'Lainnya') == 0)
<input id="posisi_kavling_lainnya" type="text" style="display: none;" <input id="posisi_kavling_lainnya" type="text" style="display: none;"
name="posisi_kavling_lainnya" class="input w-full mt-2" name="posisi_kavling_lainnya" class="input w-full mt-2"
placeholder="Masukkan Posisi Kavling lainnya..." value="{{ old('posisi_kavling_lainnya', $forminspeksi['tanah']['posisi_kavling']['lainnya'] ?? '') }}" /> placeholder="Masukkan Posisi Kavling lainnya..."
value="{{ old('posisi_kavling_lainnya', $forminspeksi['tanah']['posisi_kavling']['lainnya'] ?? '') }}" />
@endif @endif
</div> </div>
@endforeach @endforeach
@@ -250,8 +251,6 @@
<em id="error-posisi_kavling" class="alert text-danger text-sm"></em> <em id="error-posisi_kavling" class="alert text-danger text-sm"></em>
</div> </div>
</div> </div>
<!-- Tusuk Sate --> <!-- Tusuk Sate -->
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5"> <div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tusuk Sate</label> <label class="form-label max-w-56">Tusuk Sate</label>
@@ -297,8 +296,8 @@
<label class="form-label max-w-56">Kondisi Fisik Tanah</label> <label class="form-label max-w-56">Kondisi Fisik Tanah</label>
<div class="flex-wrap items-stretch"> <div class="flex-wrap items-stretch">
<div class="flex flex-col items-start gap-4"> <div class="flex flex-col items-start gap-4">
@if (isset($kondisiFisikTanah)) @if (isset($basicData['kondisiFisikTanah']))
@foreach ($kondisiFisikTanah as $item) @foreach ($basicData['kondisiFisikTanah'] as $item)
<label class="form-label flex items-center gap-2.5 text-nowrap"> <label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="kondisi_fisik_tanah[]" type="checkbox" <input class="checkbox" name="kondisi_fisik_tanah[]" type="checkbox"
value="{{ $item->name }}" value="{{ $item->name }}"
@@ -322,6 +321,7 @@
<em id="error-kondisi_fisik_tanah" class="alert text-danger text-sm"></em> <em id="error-kondisi_fisik_tanah" class="alert text-danger text-sm"></em>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -202,8 +202,13 @@
function setupInputHandlers(containerId, buttonId, labelText, inputDataClass, buttonDeleteClass) { function setupInputHandlers(containerId, buttonId, labelText, inputDataClass, buttonDeleteClass) {
const inputContainer = document.getElementById(containerId);
const addButton = document.getElementById(buttonId); const addButton = document.getElementById(buttonId);
const inputContainer = document.getElementById(containerId);
if (!addButton || !inputContainer) {
console.error(`Element with ID ${containerId} or ${buttonId} not found.`);
return;
}
function updateLabels() { function updateLabels() {
const labels = inputContainer.querySelectorAll('.form-label span'); const labels = inputContainer.querySelectorAll('.form-label span');
@@ -221,27 +226,37 @@
function createNewInput() { function createNewInput() {
const newDiv = inputContainer.children[0].cloneNode(true); const newDiv = inputContainer.children[0].cloneNode(true);
// Reset semua input dalam elemen baru
const inputFile = newDiv.querySelector(`.${inputDataClass}`); const inputFile = newDiv.querySelector(`.${inputDataClass}`);
inputFile.id = `inputRute-${inputContainer.children.length}`;
// Reset input file value
if (inputFile) { if (inputFile) {
inputFile.value = ''; inputFile.id = `inputLingkungan-${inputContainer.children.length}`;
} inputFile.value = ''; // Reset input file
// Update the camera button to set currentInputField // Tambahkan event listener untuk preview
const cameraButton = newDiv.querySelector('#btnCamera'); inputFile.addEventListener('change', function () {
if (cameraButton) { const file = this.files[0];
cameraButton.addEventListener('click', function(e) { if (file) {
e.preventDefault(); const reader = new FileReader();
currentInputField = inputFile; // Set current input field to the new input reader.onload = function (e) {
modal.classList.remove('hidden'); const img = document.getElementById(
modal.classList.add('modal-open'); `foto_lingkungan_preview_${inputFile.id}`
editor.startCamera(); );
img.src = e.target.result;
img.style.display = 'block';
};
reader.readAsDataURL(file);
}
}); });
} }
// Add delete button functionality // Tambahkan logika reset untuk elemen preview
const imgPreview = newDiv.querySelector('img');
if (imgPreview) {
imgPreview.src = '';
imgPreview.style.display = 'none';
}
const deleteBtn = newDiv.querySelector(`.${buttonDeleteClass}`); const deleteBtn = newDiv.querySelector(`.${buttonDeleteClass}`);
if (deleteBtn) { if (deleteBtn) {
deleteBtn.addEventListener('click', function () { deleteBtn.addEventListener('click', function () {
@@ -251,21 +266,23 @@
}); });
} }
// Update preview container // Tambahkan container preview jika tidak ada
const previewContainer = document.createElement('div'); let previewContainer = newDiv.querySelector('.preview-container');
if (!previewContainer) {
previewContainer = document.createElement('div');
previewContainer.className = 'preview-container'; previewContainer.className = 'preview-container';
const img = document.createElement('img'); const img = document.createElement('img');
img.id = `foto_rute-preview-${inputFile.id}`; img.id = `foto_lingkungan_preview_${inputFile.id}`;
img.src = ''; img.src = '';
img.className = 'mt-2 h-auto'; img.className = 'mt-2 h-auto';
img.style.display = 'none'; img.style.display = 'none';
img.style.width = '30rem'; img.style.width = '30rem';
previewContainer.appendChild(img); previewContainer.appendChild(img);
// Append preview container to the new input group
const inputGroup = newDiv.querySelector('.input-group'); const inputGroup = newDiv.querySelector('.input-group');
inputGroup.appendChild(previewContainer); inputGroup.appendChild(previewContainer);
}
newDiv.style.marginTop = '10px'; newDiv.style.marginTop = '10px';
inputContainer.appendChild(newDiv); inputContainer.appendChild(newDiv);
@@ -273,13 +290,14 @@
handleDeleteButtons(); handleDeleteButtons();
} }
if (addButton) {
addButton.addEventListener('click', createNewInput); addButton.addEventListener('click', createNewInput);
}
const firstDeleteBtn = inputContainer.children[0].querySelector(`.${buttonDeleteClass}`); // Terapkan event listener pada elemen yang sudah ada
if (firstDeleteBtn) { const existingInputs = inputContainer.querySelectorAll(`.${inputDataClass}`);
firstDeleteBtn.addEventListener('click', function() { existingInputs.forEach((input, index) => {
const deleteBtn = input.closest('.flex').querySelector(`.${buttonDeleteClass}`);
if (deleteBtn) {
deleteBtn.addEventListener('click', function () {
if (inputContainer.children.length > 1) { if (inputContainer.children.length > 1) {
inputContainer.removeChild(this.closest('.flex')); inputContainer.removeChild(this.closest('.flex'));
handleDeleteButtons(); handleDeleteButtons();
@@ -288,8 +306,28 @@
}); });
} }
updateLabels(); input.addEventListener('change', function () {
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function (e) {
const img = document.getElementById(
`foto_lingkungan_preview_${index}`
);
img.src = e.target.result;
img.style.display = 'block';
};
reader.readAsDataURL(file);
} }
});
});
updateLabels();
handleDeleteButtons();
}
setupInputHandlers('inputContainerRute', 'btnRute', 'Foto Rute Menuju Lokasi', 'file-input', setupInputHandlers('inputContainerRute', 'btnRute', 'Foto Rute Menuju Lokasi', 'file-input',
'delete-btn'); 'delete-btn');

View File

@@ -380,7 +380,7 @@
}); });
Breadcrumbs::for('tender.penawaran.show', function (BreadcrumbTrail $trail, $noreg) { Breadcrumbs::for('tender.penawaran.show', function (BreadcrumbTrail $trail, $noreg) {
$trail->parent('tender'); $trail->parent('tender.penawaran.ulang');
$trail->push('Detail Penawaran', route('tender.penawaran.show', $noreg)); $trail->push('Detail Penawaran', route('tender.penawaran.show', $noreg));
}); });
@@ -390,22 +390,23 @@
}); });
Breadcrumbs::for('tender.penawaran.editPenawaran', function (BreadcrumbTrail $trail, $noreg) { Breadcrumbs::for('tender.penawaran.editPenawaran', function (BreadcrumbTrail $trail, $noreg) {
$trail->parent('tender.penawaran'); $trail->parent('tender.penawaran.ulang');
$trail->push('Penawaran Ulang', route('tender.penawaran.editPenawaran', $noreg)); $trail->push('Penawaran Ulang', route('tender.penawaran.editPenawaran', $noreg));
}); });
Breadcrumbs::for('tender.penawaran.showSuratTender', function (BreadcrumbTrail $trail, $noreg) { Breadcrumbs::for('tender.penawaran.showSuratTender', function (BreadcrumbTrail $trail, $noreg) {
$trail->parent('tender.penawaran'); $trail->parent('tender.penawaran.ulang');
$trail->push('Penawaran Ulang', route('tender.penawaran.editPenawaran', $noreg));
$trail->push('Surat Tender', route('tender.penawaran.showSuratTender', $noreg)); $trail->push('Surat Tender', route('tender.penawaran.showSuratTender', $noreg));
}); });
Breadcrumbs::for('tender.penawaran.suratTenderKJPP', function (BreadcrumbTrail $trail, $noreg, $id) { Breadcrumbs::for('tender.penawaran.suratTenderKJPP', function (BreadcrumbTrail $trail, $noreg, $id) {
$trail->parent('tender.penawaran'); $trail->parent('tender.penawaran.showKirimEmail', ['noreg' => $noreg]);
$trail->push('Surat Tender KJPP', route('tender.penawaran.suratTenderKJPP', ['noreg' => $noreg, 'id' => $id])); $trail->push('Surat Tender KJPP', route('tender.penawaran.suratTenderKJPP', ['noreg' => $noreg, 'id' => $id]));
}); });
Breadcrumbs::for('tender.penawaran.showKirimEmail', function (BreadcrumbTrail $trail, $noreg) { Breadcrumbs::for('tender.penawaran.showKirimEmail', function (BreadcrumbTrail $trail, $noreg) {
$trail->parent('tender.penawaran'); $trail->parent('tender.penawaran.ulang');
$trail->push('Show Kirim Email Penawaran', route('tender.penawaran.showKirimEmail', $noreg)); $trail->push('Show Kirim Email Penawaran', route('tender.penawaran.showKirimEmail', $noreg));
}); });
@@ -418,10 +419,6 @@
Breadcrumbs::for('surveyor', function (BreadcrumbTrail $trail) { Breadcrumbs::for('surveyor', function (BreadcrumbTrail $trail) {
$trail->push('Surveyor', route('surveyor.index')); $trail->push('Surveyor', route('surveyor.index'));
}); });
Breadcrumbs::for('surveyor.inspeksi', function (BreadcrumbTrail $trail) {
$trail->parent('surveyor');
$trail->push('Form Inspeksi');
});
Breadcrumbs::for('surveyor.show', function (BreadcrumbTrail $trail) { Breadcrumbs::for('surveyor.show', function (BreadcrumbTrail $trail) {
$trail->parent('surveyor'); $trail->parent('surveyor');
@@ -478,12 +475,6 @@
'model-alat-berat' => 'Model Alat Berat', 'model-alat-berat' => 'Model Alat Berat',
'jenis-kapal' => 'Jenis kapal', 'jenis-kapal' => 'Jenis kapal',
'jenis-kendaraan' => 'Jenis kendaraan', 'jenis-kendaraan' => 'Jenis kendaraan',
'jenis-unit' => 'Jenis unit',
'terletak-area' => 'Terletak di Area',
'merupakan-daerah' => 'Merupakan Daerah',
'posisi-unit' => 'Posisi unit',
'bentuk-unit' => 'Bentuk unit',
'fasilitas-objek' => 'Fasilitas Umum Dekat Objek',
]; ];
@@ -565,12 +556,6 @@
$trail->push('Detail Penilai'); $trail->push('Detail Penilai');
}); });
Breadcrumbs::for('penilai.lampiran', function (BreadcrumbTrail $trail) {
$trail->parent('penilai');
$trail->push('Lampiran Foto dan Dokument');
});
Breadcrumbs::for('sla', function (BreadcrumbTrail $trail) { Breadcrumbs::for('sla', function (BreadcrumbTrail $trail) {
$trail->parent('basicdata'); $trail->parent('basicdata');
$trail->push('SLA', route('basicdata.sla.index')); $trail->push('SLA', route('basicdata.sla.index'));

View File

@@ -537,8 +537,13 @@ Route::middleware(['auth'])->group(function () {
Route::get('lampiran/{id}', [PenilaiController::class, 'lampiran'])->name('lampiran'); Route::get('lampiran/{id}', [PenilaiController::class, 'lampiran'])->name('lampiran');
Route::get('export/kertas-kerja', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja'); Route::get('export/kertas-kerja', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja');
Route::get('export/kertas-kerja', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja');
Route::get('export/kertas-kerja', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja');
Route::get('sederhana/{id}', [PenilaiController::class, 'sederhana'])->name('sederhana');
Route::get('standard/{id}', [PenilaiController::class, 'standard'])->name('standard');
Route::get('resume/{id}', [PenilaiController::class, 'standard'])->name('resume');
Route::get('memo/{id}', [PenilaiController::class, 'standard'])->name('memo');
}); });