perabaikan team activity, form inspeksi rap,laporan memo, rap, resume dan penambahan basic data perizinan

This commit is contained in:
majid
2025-01-03 16:49:20 +07:00
parent 64ba6cf71e
commit b7767fbc92
26 changed files with 2401 additions and 478 deletions

View File

@@ -287,14 +287,26 @@ function holidays()
function countPermohonanForUser($userId)
{
return Penilaian::whereHas('userPenilai', function ($query) use ($userId) {
$validStatuses = ['assign', 'proses-laporan', 'done'];
$result = Penilaian::whereHas('userPenilai', function ($query) use ($userId) {
$query->where('user_id', $userId);
})
->whereHas('permohonan', function ($query) {
$query->where('status', 'assign');
})
->count();
->whereHas('permohonan', function ($query) use ($validStatuses) {
$query->whereIn('status', $validStatuses);
})
->get()
->groupBy(function ($item) {
// Pastikan mengakses properti dari model yang valid
return $item->userPenilai->first()->user_id . '-' . $item->permohonan->id;
})
->map(function ($group) {
return [
'statuses' => $group->pluck('permohonan.status')->unique()->values()->all(),
];
});
return $result->count();
}

View File

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

View File

@@ -22,7 +22,6 @@ use Illuminate\Support\Facades\App;
use App\Helpers\Lpj;
use Modules\Lpj\Http\Requests\FormSurveyorRequest;
class PenilaiController extends Controller
{
public $user;
@@ -68,13 +67,7 @@ class PenilaiController extends Controller
return view('lpj::create');
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
public function sederhana(Request $request, $id)
{
@@ -143,46 +136,48 @@ class PenilaiController extends Controller
if ($resume) {
$resumeData = json_decode($resume->resume, true);
}
$forminspeksi = null;
return view('lpj::penilai.components.resume', compact('permohonan', 'resumeData'));
if ($inspeksi) {
$forminspeksi = json_decode($inspeksi->data_form, true);
}
return view('lpj::penilai.components.resume', compact('permohonan', 'resumeData','forminspeksi'));
}
public function memo(Request $request)
{
$permohonanId = $request->query('permohonanId');
$documentId = $request->query('documentId');
$inspeksiId = $request->query('inspeksiId');
$jaminanId = $request->query('jaminanId');
$req = $this->getRequestQueryId($request);
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
$penilai = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
$data = $this->getDataPermohonanWithPenilaiAndInspeksi($req['permohonanId'], $req['documentId'], $req['jaminanId']);
$permohonan = $data['permohonan'];
$inspeksi = Inspeksi::where('permohonan_id', $req['permohonanId'])->where('dokument_id', $req['documentId'])->first();
$penilai = Penilai::where('permohonan_id', $req['permohonanId'])->where('dokument_id', $req['documentId'])->firstska();
$provinces = Province::all();
$basicData = $this->surveyorController->getCommonData();
$formFoto = $formPeta = $cities = $districts = $villages= $memo = null;
$formFoto = $formPeta = $cities = $districts = $villages = $memo = null;
if ($inspeksi) {
$formFoto = json_decode($inspeksi->foto_form, true);
$formPeta = json_decode($inspeksi->data_form, true);
if(isset($penilai->memo)) {
if (isset($penilai->memo)) {
$memo = json_decode($penilai->memo);
}
if(isset($memo->lokasi->province_code)){
if (isset($memo->lokasi->province_code)) {
$cities = City::where('province_code', $memo->lokasi->province_code)->get();
}
if(isset($memo->lokasi->city_code)){
if (isset($memo->lokasi->city_code)) {
$districts = District::where('city_code', $memo->lokasi->city_code)->get();
}
if(isset($memo->lokasi->district_code)) {
if (isset($memo->lokasi->district_code)) {
$villages = Village::where('district_code', $memo->lokasi->district_code)->get();
}
}
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta', 'provinces', 'basicData','memo','cities', 'districts', 'villages'));
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta', 'provinces', 'basicData', 'memo', 'cities', 'districts', 'villages'));
}
@@ -193,6 +188,7 @@ class PenilaiController extends Controller
{
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian', 'documents.inspeksi'])->find($id);
// return response()->json(['permohonan' => $permohonan]);
return view('lpj::penilai.show', compact('permohonan'));
}
@@ -231,8 +227,26 @@ class PenilaiController extends Controller
public function rap(Request $request)
{
$permohonanId = $request->query('permohonanId');
return view('lpj::penilai.components.paparan');
$documentId = $request->query('documentId');
$inspeksiId = $request->query('inspeksiId');
$jaminanId = $request->query('jaminanId');
$provinces = Province::all();
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
$resume = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
$lpjData = null;
$rap = null;
$forminspeksi= null;
if ($resume) {
$forminspeksi = json_decode($inspeksi->data_form, true);
$rap = json_decode($resume->rap, true);
}
return view('lpj::penilai.components.rap-penilai', compact('permohonan', 'rap', 'provinces','forminspeksi'));
}
@@ -480,7 +494,7 @@ class PenilaiController extends Controller
return response()->json([
'success' => true,
'message' => 'Berhasil menyimpan penilaian'
'message' => 'Berhasil Megirim reported ke so'
], 200);
} catch (\Exception $e) {
@@ -640,6 +654,8 @@ class PenilaiController extends Controller
public function print_out(Request $request)
{
$documentId = $request->query('documentId');
$jaminanId = $request->query('jaminanId');
$permohonanId = $request->query('permohonanId');
@@ -677,6 +693,7 @@ class PenilaiController extends Controller
if ($lpj) {
$lpjData = json_decode($lpj->lpj, true);
$memo = json_decode($lpj->memoe, true);
}
$inputAddress = $forminspeksi['asset']['alamat']['sesuai'] ?? $forminspeksi['asset']['alamat']['tidak sesuai'];
@@ -689,36 +706,25 @@ class PenilaiController extends Controller
'province_code' => $this->getWilayahName($inputAddress['province_code'] ?? null, 'province')
];
$laporan = $lpj->type == 'sederhana' ? true : false;
['sederhana', 'resume'];
['memo'];
['rap'];
// $laporan = $lpj->type == ;
// $laporanPenilai = $lpj
$viewLaporan = null;
if ($laporan) {
$viewLaporan = 'penilai.components.print-out-sederhana';
} else {
$viewLaporan = 'penilai.components.print-out-standard';
}
// $viewLaporan = 'penilai.components.print-out-sederhana';
// $viewLaporan = 'penilai.components.print-out-standard';
// $viewLaporan = 'penilai.components.print-resume';
// $viewLaporan = 'penilai.components.print-memo';
// $viewLaporan = 'penilai.components.print-rap';
try {
if ($statusLpj) {
$pdf= PDF::loadView('lpj::' . $viewLaporan, compact(
'permohonan',
'forminspeksi',
'lpjData',
'formFoto',
'basicData',
'inspeksi',
'lpj',
'statusLpj',
'alamat',
'dataPembanding',
'nomorLaporan'
));
$pdf->setPaper('A4', 'portrait');
return $pdf->stream();
} else {
$pdf = PDF::loadView('lpj::' . $viewLaporan, compact(
'permohonan',
'forminspeksi',
@@ -734,7 +740,28 @@ class PenilaiController extends Controller
));
$pdf->setPaper('A4', 'portrait');
return $pdf->download('laporan.pdf');
return $pdf->stream();
} else {
$pdf = view('lpj::' . $viewLaporan, compact(
// $pdf = PDF::loadView('lpj::' . $viewLaporan, compact(
'permohonan',
'forminspeksi',
'lpjData',
'formFoto',
'basicData',
'inspeksi',
'lpj',
'statusLpj',
'alamat',
'dataPembanding',
'nomorLaporan',
'memo'
));
return $pdf;
// $pdf->setPaper('A4', 'portrait');
// return $pdf->download('laporan.pdf');
}
} catch (\Exception $e) {
@@ -779,4 +806,26 @@ class PenilaiController extends Controller
}
// mengambil data dari fungsi permohonan di surveyor, dan table
// penilai, inspeksi
private function getDataPermohonanWithPenilaiAndInspeksi($permohonanId, $documentId, $jaminanId)
{
return [
'permohonan' => $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId),
'penilai' => Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first(),
'inspeksi' => Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first()
];
}
// pengunaan request query by id permohonan, dokument, jaminan , inspeksi
protected function getRequestQueryId(Request $request)
{
return [
'permohonanId' => $request->query('permohonanId'),
'documentId' => $request->query('documentId'),
'jaminanId' => $request->query('jaminanId'),
'inspeksiId' => $request->query('inspeksiId')
];
}
}

View File

@@ -27,6 +27,7 @@ use Modules\Location\Models\Village;
use Modules\Lpj\Models\PosisiKavling;
use Modules\Lpj\Models\KondisiFisikTanah;
use Modules\Lpj\Models\FotoObjekJaminan;
use Modules\Lpj\Models\Perizinan;
use Modules\Lpj\Models\KetinggianTanah;
use Modules\Lpj\Models\SifatBangunan;
use Modules\Lpj\Models\JenisJaminan;
@@ -114,7 +115,18 @@ class SurveyorController extends Controller
$bentukTanah = BentukTanah::all();
// Get all inspeksi data for this permohonan
$inspeksiData = Inspeksi::where('permohonan_id', $id)
if (strtolower($permohonan->tujuanPenilaian->name) == 'rap') {
$inspeksiData = Inspeksi::where('permohonan_id', $id)
->get()
->keyBy('dokument_id')
->map(function ($item) {
return [
'data_form' => json_decode($item->data_form, true),
'foto_form' => json_decode($item->foto_form, true)
];
});
} else {
$inspeksiData = Inspeksi::where('permohonan_id', $id)
->get()
->keyBy('dokument_id')
->map(function ($item) {
@@ -125,7 +137,7 @@ class SurveyorController extends Controller
'data_pembanding' => json_decode($item->data_pembanding, true),
];
});
}
return view('lpj::surveyor.detail', compact(
'permohonan',
@@ -192,12 +204,13 @@ class SurveyorController extends Controller
'pesawat' => 'getPesawatData',
'alat-berat' => 'getAlatBeratData',
'lingkungan' => 'getLingkunganData',
'fakta' => 'getFactData'
'fakta' => 'getFactData',
'rap' => 'getRapData',
];
$rules = [];
$hasAssetDescriptionRules = false;
$hasFactaDat = false;
$pisah = array_filter(
explode(',', $action),
function ($act) use ($allowedActions) {
@@ -212,15 +225,23 @@ class SurveyorController extends Controller
$actionRules = $this->$method($data, $request);
$rules = array_merge($rules, $actionRules);
if (in_array($act, ['apartemen-kantor', 'tanah', 'bangunan'])) {
if (in_array($act, ['apartemen-kantor', 'tanah', 'bangunan', 'rap'])) {
$hasAssetDescriptionRules = true;
}
if (in_array($act, ['rap'])) {
$hasFactaData = true;
}
}
if ($hasAssetDescriptionRules) {
$rules = array_merge($rules, $this->getAssetData($data));
}
if ($hasFactaData) {
$rules = array_merge($rules, $this->getFactData($data, $request));
}
return $rules;
}
@@ -388,73 +409,73 @@ class SurveyorController extends Controller
}
/**
* Process a photo
* Process a photo
*/
protected function processFotoLantaiUnit(Request $request, &$formatFotojson)
{
// Pastikan foto_lantai_unit sudah ada di formatFotojson
if (!isset($formatFotojson['foto_lantai_unit'])) {
$formatFotojson['foto_lantai_unit'] = [];
}
// Ambil nama-nama lantai dari request
$lantaiNama = $request->input('lantai_nama', []);
// Tambahan: gunakan lantai_index jika tersedia
$lantaiIndex = $request->input('lantai_index', null);
// Cek apakah ada file foto lantai yang diunggah
$lantaiFiles = $request->file('foto_lantai_unit', []);
// Proses setiap file foto lantai
foreach ($lantaiFiles as $index => $files) {
// Pastikan $files adalah array
if (!is_array($files)) {
$files = [$files];
}
// Gunakan lantai_index jika tersedia, jika tidak gunakan cara sebelumnya
$lantaiNomor = $lantaiIndex ?? ($index + 1);
// Inisialisasi array untuk lantai ini jika belum ada
if (!isset($formatFotojson['foto_lantai_unit'][$lantaiNomor])) {
$formatFotojson['foto_lantai_unit'][$lantaiNomor] = [];
}
foreach ($files as $fileIndex => $file) {
// Validasi file
if (!$file->isValid()) {
continue; // Lewati file yang tidak valid
}
// Generate nama file unik
$uniqueFileName = 'lantai_unit_' . $lantaiNomor . '_' . $fileIndex . '_' . Str::random(10) . '.' . $file->getClientOriginalExtension();
// Simpan file dengan nama asli
$path = $file->storeAs(
'surveyor/lantai_unit',
$uniqueFileName . '/' . time() . '_' . $file->getClientOriginalName(),
'public'
);
// Buat nama foto
$fotoName = "Foto Lantai {$lantaiNomor} - " . ($fileIndex + 1);
// Tambahkan detail foto ke array
$fotoDetail = [
'path' => $path,
'name' => $fotoName
];
// Tambahkan ke array foto lantai unit sesuai struktur
$formatFotojson['foto_lantai_unit'][$lantaiNomor][] = $fotoDetail;
}
}
return $formatFotojson;
}
protected function processFotoLantaiUnit(Request $request, &$formatFotojson)
{
// Pastikan foto_lantai_unit sudah ada di formatFotojson
if (!isset($formatFotojson['foto_lantai_unit'])) {
$formatFotojson['foto_lantai_unit'] = [];
}
// Ambil nama-nama lantai dari request
$lantaiNama = $request->input('lantai_nama', []);
// Tambahan: gunakan lantai_index jika tersedia
$lantaiIndex = $request->input('lantai_index', null);
// Cek apakah ada file foto lantai yang diunggah
$lantaiFiles = $request->file('foto_lantai_unit', []);
// Proses setiap file foto lantai
foreach ($lantaiFiles as $index => $files) {
// Pastikan $files adalah array
if (!is_array($files)) {
$files = [$files];
}
// Gunakan lantai_index jika tersedia, jika tidak gunakan cara sebelumnya
$lantaiNomor = $lantaiIndex ?? ($index + 1);
// Inisialisasi array untuk lantai ini jika belum ada
if (!isset($formatFotojson['foto_lantai_unit'][$lantaiNomor])) {
$formatFotojson['foto_lantai_unit'][$lantaiNomor] = [];
}
foreach ($files as $fileIndex => $file) {
// Validasi file
if (!$file->isValid()) {
continue; // Lewati file yang tidak valid
}
// Generate nama file unik
$uniqueFileName = 'lantai_unit_' . $lantaiNomor . '_' . $fileIndex . '_' . Str::random(10) . '.' . $file->getClientOriginalExtension();
// Simpan file dengan nama asli
$path = $file->storeAs(
'surveyor/lantai_unit',
$uniqueFileName . '/' . time() . '_' . $file->getClientOriginalName(),
'public'
);
// Buat nama foto
$fotoName = "Foto Lantai {$lantaiNomor} - " . ($fileIndex + 1);
// Tambahkan detail foto ke array
$fotoDetail = [
'path' => $path,
'name' => $fotoName
];
// Tambahkan ke array foto lantai unit sesuai struktur
$formatFotojson['foto_lantai_unit'][$lantaiNomor][] = $fotoDetail;
}
}
return $formatFotojson;
}
private function handleFileUpload(Request $request, $paramName, &$formatFotojson)
{
@@ -670,10 +691,10 @@ class SurveyorController extends Controller
{
$permohonanId = $request->permohonan_id;
$dokumentId = $request->dokument_id;
// Normalisasi path foto
$cleanRequestPath = str_replace(['storage/', 'surveyor/'], '', $request->foto_path);
$inspeksi = Inspeksi::firstOrNew(
['permohonan_id' => $permohonanId, 'dokument_id' => $dokumentId]
);
@@ -681,7 +702,7 @@ class SurveyorController extends Controller
// Konversi lantai ke string untuk konsistensi
$lantai = (string)$request->lantai;
// Cek apakah lantai ada di array
$pat = null;
if (isset($fotoLantaiUnit['foto_lantai_unit'][$lantai])) {
@@ -691,7 +712,7 @@ class SurveyorController extends Controller
function ($foto) use ($cleanRequestPath) {
// Normalisasi path foto yang tersimpan
$storedPath = str_replace(['storage/', 'surveyor/'], '', $foto['path']);
// Jika path cocok, hapus file dari storage
if ($storedPath === $cleanRequestPath) {
// Hapus file dari storage dengan berbagai kemungkinan path
@@ -701,14 +722,14 @@ class SurveyorController extends Controller
'storage/' . $cleanRequestPath,
$cleanRequestPath
];
foreach ($possiblePaths as $path) {
if (Storage::disk('public')->exists($path)) {
Storage::disk('public')->delete($path);
break;
}
}
return false; // Hapus dari array
}
return true;
@@ -717,28 +738,28 @@ class SurveyorController extends Controller
// Reset index array
$fotoLantaiUnit['foto_lantai_unit'][$lantai] = array_values($fotoLantaiUnit['foto_lantai_unit'][$lantai]);
// Hapus lantai jika tidak ada foto
if (empty($fotoLantaiUnit['foto_lantai_unit'][$lantai])) {
unset($fotoLantaiUnit['foto_lantai_unit'][$lantai]);
}
// Update inspeksi
$inspeksi->foto_form = json_encode($fotoLantaiUnit);
$inspeksi->save();
return response()->json([
'success' => true,
'foto_lantai_unit' => $pat
]);
}
return response()->json([
'success' => false,
'message' => 'gagal menghapus'
], 404);
}
private function processPhotoLainnya(Request $request, array $fields, array $existingPhotos = [])
{
$result = $existingPhotos; // Start with existing photos
@@ -869,30 +890,40 @@ class SurveyorController extends Controller
return response()->json(['buttonDisable' => true]);
}
$rapComplete = false;
foreach ($inspeksiRecords as $inspeksi) {
$dataForm = json_decode($inspeksi->data_form, true);
$fotoForm = json_decode($inspeksi->foto_form, true);
$denahForm = json_decode($inspeksi->denah_form, true);
$dataPembanding = json_decode($inspeksi->data_pembanding, true);
if (strtolower($inspeksi->name) === 'rap') {
$dataForm = json_decode($inspeksi->data_form, true);
$fotoForm = json_decode($inspeksi->foto_form, true);
$isInvalid = empty($dataForm) &&
empty($fotoForm);
if ($isInvalid) {
return response()->json(['buttonDisable' => true]);
}
} else {
$dataForm = json_decode($inspeksi->data_form, true);
$fotoForm = json_decode($inspeksi->foto_form, true);
$denahForm = json_decode($inspeksi->denah_form, true);
$dataPembanding = json_decode($inspeksi->data_pembanding, true);
$jenisJaminan = $inspeksi->dokument->jenisJaminan->name ?? '';
$jenisJaminan = $inspeksi->dokument->jenisJaminan->name ?? '';
$isTanahBangunan = !in_array(
strtoupper($jenisJaminan->name ?? ''),
['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT']
);
$isTanahBangunan = !in_array(
strtoupper($jenisJaminan->name ?? ''),
['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT']
);
$isInvalid =
empty($dataForm) ||
empty($fotoForm) ||
(($isTanahBangunan && empty($denahForm)) ||
empty($dataPembanding));
$isInvalid =
empty($dataForm) ||
empty($fotoForm) ||
(($isTanahBangunan && empty($denahForm)) ||
empty($dataPembanding));
if ($isInvalid) {
return response()->json(['buttonDisable' => true]);
if ($isInvalid) {
return response()->json(['buttonDisable' => true]);
}
}
}
// If we get here, all checks passed
return response()->json(['buttonDisable' => false]);
@@ -1880,6 +1911,7 @@ class SurveyorController extends Controller
'Merupakan Daerah' => MerupakanDaerah::class,
'Jenis unit' => JenisUnit::class,
'Foto Objek Jaminan' => FotoObjekJaminan::class,
'Perizinan' => Perizinan::class,
];
@@ -2023,7 +2055,8 @@ class SurveyorController extends Controller
'merupakan-daerah' => MerupakanDaerah::class,
'jenis-unit' => JenisUnit::class,
'perkerasan-jalan' => PerkerasanJalan::class,
'foto-objek-jaminan' => FotoObjekJaminan::class
'foto-objek-jaminan' => FotoObjekJaminan::class,
'perizinan' => Perizinan::class
];
@@ -2065,12 +2098,11 @@ class SurveyorController extends Controller
'hubPenghuni' => HubunganPenghuniJaminan::all(),
'perkerasanJalan' => PerkerasanJalan::all(),
'terletakDiArea' => TerletakArea::all(),
'tujuanPenilaian' => TujuanPenilaian::all()
'tujuanPenilaian' => TujuanPenilaian::all(),
'perizinan' => Perizinan::all()
];
}
private const HEADERS = [
'bentuk-tanah' => ['Bentuk Tanah', 'bentuk-tanah'],
'kontur-tanah' => ['Kontur Tanah', 'kontur-tanah'],
@@ -2100,6 +2132,7 @@ class SurveyorController extends Controller
'bentuk-unit' => ['Bentuk unit', 'bentuk-unit'],
'fasilitas-objek' => ['Fasilitas Umum Dekat Objek', 'fasilitas-objek'],
'foto-objek-jaminan' => ['Foto Objek Jaminan', 'foto-objek-jaminan'],
'perizinan' => ['Perizinan', 'perizinan'],
];
private function getAssetData(array $data): array
@@ -2338,6 +2371,39 @@ class SurveyorController extends Controller
return $factData;
}
private function getRapData($data, $request): array
{
$rapData = [
'perizinan' => $data['perizinan'] ?? null,
'perizinan_file' => $data['perizinan_file'] ?? null,
'brosur_price_list' => $data['brosur_price_list'] ?? null,
'brosur_price_file' => $data['brosur_price_file'] ?? null,
'pengalaman_developer' => $data['pengalaman_developer'] ?? null,
'developer_anggota' => $data['developer_anggota'] ?? null,
'lainnya_developer' => $data['lainnya_developer'] ?? null,
'kapan_mulai_dibangun' => $data['kapan_mulai_dibangun'] ?? null,
'kondisi_perumahan' => $data['kondisi_perumahan'] ?? null,
'progres_pembangunan' => $data['progres_pembangunan'] ?? null,
'kontraktor' => $data['kontraktor'] ?? null,
'lingkungan_sekitar' => $data['lingkungan_sekitar'] ?? null,
'komplek_disekitar' => $data['komplek_disekitar'] ?? null,
'pusat_keramaian' => $data['pusat_keramaian'] ?? null,
'transportasi_umum' => $data['transportasi_umum'] ?? null,
'lainnya_kondisi' => $data['lainnya_kondisi'] ?? null,
'partisi' => $data['partisi'] ?? null,
'jumlah_unit' => $data['jumlah_unit'] ?? null,
'batas_batas_perumahan' => $data['batas_batas_perumahan'] ?? null,
'fasus_fasum' => $data['fasus_fasum'] ?? null,
'progres_penjualan' => $data['progres_penjualan'] ?? null,
'harga_unit' => $data['harga_unit'] ?? null,
'target_market' => $data['target_market'] ?? null,
'kerjasama_dengan_bank' => $data['kerjasama_dengan_bank'] ?? null,
'rute_menuju_lokasi' => $data['rute_menuju_lokasi'] ?? null,
];
return $rapData;
}
private function updateOrDeleteFile($data, $request, $fileKey)
{
if ($request->hasFile($fileKey)) {

View File

@@ -43,6 +43,7 @@ class FormSurveyorRequest extends FormRequest
'apartemen-kantor' => $this->getUnitRules(),
'lingkungan' => $this->getLinkunganRules(),
'fakta' => $this->getCommonRules(),
'rap' => $this->getRapRules()
];
$rules = [];
@@ -51,7 +52,7 @@ class FormSurveyorRequest extends FormRequest
foreach ($pisah as $act) {
if (isset($allRules[$act])) {
$rules = array_merge($rules, $allRules[$act]);
if ($act == 'tanah' || $act == 'bangunan' || $act == 'apartemen-kantor') {
if ($act == 'tanah' || $act == 'bangunan' || $act == 'apartemen-kantor' || $act == 'rap') {
$hasAssetDescriptionRules = true;
}
}
@@ -580,4 +581,51 @@ class FormSurveyorRequest extends FormRequest
];
}
private function getRapRules()
{
return [
'perizinan.*' => 'required',
'perizinan_file.*' => 'required',
'brosur_price_list.*' => 'required',
'brosur_price_file.*' => 'required',
'pengalaman_developer' => 'nullable',
'developer_anggota' => 'nullable',
'lainnya_developer.*' => 'nullable',
'kapan_mulai_dibangun' => 'nullable',
'kondisi_perumahan' => 'nullable',
'progres_pembangunan' => 'nullable',
'kontraktor' => 'nullable',
'lingkungan_sekitar' => 'nullable',
'komplek_disekitar' => 'nullable',
'pusat_keramaian' => 'nullable',
'transportasi_umum' => 'nullable',
'lainnya_kondisi.*' => 'nullable',
'partisi_.*' => 'nullable',
'jumlah_unit.*' => 'nullable',
'batas_batas_perumahan' => 'nullable',
'fasus_fasum.*' => 'nullable',
'progres_penjualan.*' => 'nullable',
'harga_unit.*' => 'nullable',
'target_market.*' => 'nullable',
'kerjasama_dengan_bank' => 'nullable',
'rute_menuju_lokasi' => 'nullable',
'kdb' => 'nullable',
'kdh' => 'nullable',
'gsb' => 'nullable',
'max_lantai' => 'nullable',
'klb' => 'nullable',
'gss' => 'nullable',
'pelebaran_jalan' => 'nullable',
'nama_petugas' => 'nullable',
'lat' => 'nullable|numeric',
'lng' => 'nullable|numeric',
'foto_gistaru' => 'nullable',
'foto_bhumi' => 'nullable',
'foto_argis_region' => 'nullable',
'foto_tempat' => 'nullable',
'keterangan' => 'nullable|array',
];
}
}

View File

@@ -39,6 +39,7 @@ class SurveyorRequest extends FormRequest
'fasilitas-objek' => 'fasilitas_objek',
'perkerasan-jalan' => 'perkerasan_jalan',
'foto-objek-jaminan' => 'foto_objek_jaminan',
'perizinan' => 'perizinan'
];
/**

25
app/Models/Perizinan.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
namespace Modules\Lpj\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
// use Modules\Lpj\Database\Factories\PerizinanFactory;
class Perizinan extends Model
{
use HasFactory;
protected $table = 'perizinan';
/**
* The attributes that are mass assignable.
*/
protected $guarded = ['id'];
// protected static function newFactory(): PerizinanFactory
// {
// // return PerizinanFactory::new();
// }
}

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('perizinan', function (Blueprint $table) {
$table->id();
$table->string('code')->unique()->index();
$table->string('name');
$table->boolean('status')->default(true);
$table->char('authorized_status', 1)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
$table->softDeletes();
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('perizinan');
}
};

View File

@@ -827,6 +827,17 @@
"administrator",
"admin"
]
},
{
"title": "Perizinan",
"path": "basicdata.perizinan",
"classes": "",
"attributes": [],
"permission": "",
"roles": [
"administrator",
"admin"
]
}
]
}

View File

@@ -204,7 +204,9 @@
},
progress: {
title: 'Progress',
render: (item, data) => `${data.progress || ''}`,
render: (item, data) => {
return `<span class="badge badge-xs badge-default uppercase flex justify-center ">${data.permohonan.status}</span>`;
}
},
due_date: {
title: 'Due Date',

View File

@@ -1,154 +1,121 @@
<div>
@if (isset($formFoto['rute_menuju_lokasi']['rute_menuju_lokasi']))
@foreach ($formFoto['rute_menuju_lokasi']['rute_menuju_lokasi'][0] as $index => $item)
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $item['name'] . ' ' . $loop->index + 1 }}
</h2>
@php
$photoSections = [
'rute_menuju_lokasi' => [
'key' => 'rute_menuju_lokasi',
'name_prefix' => '',
'nested' => true
],
'foto_rute_lainnya' => [
'key' => 'name_rute_lainnya',
'name_prefix' => '',
'nested' => false
],
'object_jaminan' => [
'key' => 'name_objek',
'name_prefix' => '',
'nested' => false
],
'foto_lantai_unit' => [
'key' => 'name',
'name_prefix' => 'Foto Lantai',
'nested' => true
],
'foto_lingkungan' => [
'key' => 'foto_lingkungan',
'name_prefix' => '',
'nested' => true
],
'single_photos' => [
'foto_basement' => 'Basement',
'foto_gerbang' => 'Gerbang',
'pendamping' => 'Pendamping'
]
];
@php
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image">
@endif
</div>
@endforeach
@endif
@if (isset($formFoto['foto_rute_lainnya']))
@foreach ($formFoto['foto_rute_lainnya'] as $index => $item)
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $item['name_rute_lainnya'] }}
</h2>
@php
$imagePath = storage_path('app/public/' . $item['foto_rute_lainnya']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['foto_rute_lainnya'])))
<img src="{{ $imagePath }}" alt="{{ $item['foto_rute_lainnya'] }}" class="photo-image">
@endif
</div>
@endforeach
@endif
@if (!empty($formFoto['object_jaminan']))
@foreach ($formFoto['object_jaminan'] as $item)
@php
$nameObjek = trim($item['name_objek'] ?? '');
$fotoObjek = trim($item['foto_objek'] ?? '');
$imagePath = storage_path('app/public/' . $fotoObjek);
@endphp
@if (!empty($nameObjek) || !empty($fotoObjek))
<div class="border photo-item">
@if (!empty($nameObjek))
<h2 class="text-gray-600 font-semibold text-xl">
{{ $nameObjek }}
</h2>
@endif
@if ($statusLpj || (!empty($fotoObjek) && file_exists($imagePath)))
<img src="{{ $imagePath }}" alt="{{ $nameObjek ?: 'Objek Foto' }}" class="photo-image">
@else
<p class="text-gray-500 italic">Foto tidak tersedia</p>
@endif
</div>
@endif
@endforeach
@else
<p class="text-gray-500 text-center italic">Tidak ada objek jaminan yang ditemukan</p>
@endif
@if (isset($formFoto['foto_lantai_unit']))
@foreach ($formFoto['foto_lantai_unit'] as $index => $floorPhotos)
@foreach ($floorPhotos as $index => $item)
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $item['name'] ?? 'Foto Lantai ' . $floorNumber . ' - ' . ($index + 1) }}
</h2>
$hasPhotos = false;
@endphp
@foreach ($photoSections as $sectionKey => $sectionConfig)
@if ($sectionKey === 'single_photos')
@foreach ($sectionConfig as $photoKey => $photoName)
@if (isset($formFoto[$photoKey]) && !empty($formFoto[$photoKey]))
@php
$imagePath = storage_path('app/public/' . $item['path']);
$imagePath = storage_path('app/public/' . $formFoto[$photoKey]);
$hasPhotos = true;
@endphp
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $photoName }}
</h2>
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image">
@endif
</div>
@endforeach
@endforeach
@endif
@if (isset($formFoto['foto_lingkungan']['foto_lingkungan']))
@foreach ($formFoto['foto_lingkungan']['foto_lingkungan'][0] as $index => $item)
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $item['name'] . ' ' . $loop->index + 1 }}
</h2>
@php
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image">
@if ($statusLpj || file_exists($imagePath))
<img src="{{ $imagePath }}" alt="{{ $photoName }}" class="photo-image">
@endif
</div>
@endif
</div>
@endforeach
@endif
@if (isset($formFoto['foto_basement']))
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
Basement
</h2>
@endforeach
@else
@php
$imagePath = storage_path('app/public/' . $formFoto['foto_basement']);
$sectionData = $formFoto[$sectionKey] ?? null;
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['foto_basement'])))
<img src="{{ $imagePath }}" alt="{{ $formFoto['foto_basement'] }}" class="photo-image">
@if (!empty($sectionData))
@if ($sectionConfig['nested'])
@if (isset($sectionData[$sectionConfig['key']][0]))
@foreach ($sectionData[$sectionConfig['key']][0] as $index => $item)
@php
$imagePath = storage_path('app/public/' . $item['path']);
$hasPhotos = true;
@endphp
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
{{ $sectionConfig['name_prefix'] ?
($sectionConfig['name_prefix'] . ' ' . ($index + 1)) :
($item['name'] ?? 'Foto ' . ($index + 1))
}}
</h2>
@if ($statusLpj || file_exists($imagePath))
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image">
@endif
</div>
@endforeach
@endif
@else
@foreach ($sectionData as $index => $item)
@php
$name = $item[$sectionConfig['key']] ?? '';
$photoPath = $sectionKey === 'object_jaminan' ?
($item['foto_objek'] ?? '') :
($item['foto_rute_lainnya'] ?? '');
$imagePath = storage_path('app/public/' . $photoPath);
@endphp
@if (!empty($name) || !empty($photoPath))
@php $hasPhotos = true; @endphp
<div class="border photo-item">
@if (!empty($name))
<h2 class="text-gray-600 font-semibold text-xl">
{{ $name }}
</h2>
@endif
@if ($statusLpj || (file_exists($imagePath) && !empty($photoPath)))
<img src="{{ $imagePath }}" alt="{{ $name ?: 'Foto' }}" class="photo-image">
@endif
</div>
@endif
@endforeach
@endif
@endif
</div>
@endif
@endif
@endforeach
@if (isset($formFoto['foto_gerbang']))
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
Gerbang
</h2>
@php
$imagePath = storage_path('app/public/' . $formFoto['foto_gerbang']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['foto_gerbang'])))
<img src="{{ $imagePath }}" alt="{{ $formFoto['foto_gerbang'] }}" class="photo-image">
@endif
</div>
@endif
@if (isset($formFoto['pendamping']))
<div class="border photo-item">
<h2 class="text-gray-600 font-semibold text-xl">
Pendamping
</h2>
@php
$imagePath = storage_path('app/public/' . $formFoto['pendamping']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['pendamping'])))
<img src="{{ $imagePath }}" alt="{{ $formFoto['pendamping'] }}" class="photo-image">
@endif
@if (!$hasPhotos)
<div class="text-center py-6 bg-gray-100 rounded-lg">
<p class="text-gray-500 italic">Tidak ada foto yang tersedia</p>
</div>
@endif
</div>

View File

@@ -1,3 +1,4 @@
@if (isset($formFoto['rute_menuju_lokasi']['rute_menuju_lokasi']))
<div class="card">
<div class="card-header bg-agi-50" id="basic_settings">
<h3 class="card-title">
@@ -22,6 +23,7 @@
@endif
</div>
</div>
@endif
@if (isset($formFoto['foto_rute_lainnya']))
<div class="card">
@@ -50,6 +52,7 @@
</div>
@endif
@if (isset($formFoto['object_jaminan']))
<div class="card">
<div class="card-header bg-agi-50" id="basic_settings">
<h3 class="card-title">
@@ -74,10 +77,11 @@
@endif
</div>
</div>
@endif
@if (isset($formFoto['foto_lantai_unit']))
<div class="card">
<div class="card-header" id="basic_settings">
<div class="card-header bg-agi-50" id="basic_settings">
<h3 class="card-title">Lantai</h3>
</div>
<div class="card-body">
@@ -90,7 +94,7 @@
<h3 class="text-gray-600 font-semibold text-lg">
{{ $item['name'] ?? 'Foto Lantai ' . ($floorIndex + 1) . ' - ' . ($index + 1) }}
</h3>
<div class="flex items-center">
<div class="flex items-center ">
<img src="{{ Storage::url($item['path']) }}"
alt="Gambar {{ $floorIndex + 1 }}-{{ $index + 1 }}"
class="w-full h-auto object-cover">
@@ -106,6 +110,7 @@
</div>
@endif
@if (isset($formFoto['foto_lingkungan']['foto_lingkungan']))
<div class="card">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
@@ -128,8 +133,8 @@
@endforeach
@endif
</div>
</div>
@endif
@if (isset($formFoto['foto_basement']))
<div class="card">
@@ -147,7 +152,7 @@
<div class="flex items-center">
<img src="{{ Storage::url($formFoto['foto_basement']) }}" alt="">
<img src="{{ Storage::url($formFoto['foto_basement']) }}" alt="" class="w-full h-auto object-cover">
</div>
</div>
@@ -202,7 +207,7 @@
<div class="flex items-center">
<img src="{{ Storage::url($formFoto['foto_gerbang']) }}" alt="">
<img src="{{ Storage::url($formFoto['foto_gerbang']) }}" alt="" class="w-full h-auto object-cover">
</div>
</div>
@@ -231,7 +236,7 @@
<div class="flex items-center">
<img src="{{ Storage::url($formFoto['pendamping']) }}" alt="">
<img src="{{ Storage::url($formFoto['pendamping']) }}" alt="" class="w-full h-auto object-cover">
</div>
</div>
@@ -267,7 +272,7 @@ $adaFoto = false;
</h3>
</div>
<div class="card-body">
<div>
@if (isset($forminspeksi))
@forelse ($fotoTypes as $type)
@@ -278,7 +283,7 @@ $adaFoto = false;
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
<img src="{{ Storage::url($imagePath) }}" alt="{{ $type }}"
class="photo-image">
class="w-full h-auto object-cover">
@endif
<p class="mt-2 text-sm">{{ Str::title(str_replace('_', ' ', $type)) }}</p>
</div>
@@ -289,4 +294,4 @@ $adaFoto = false;
</div>
</div>
</div>
@endif
@endif

View File

@@ -0,0 +1,344 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Laporan Penilai Jaminan</title>
<style>
* {
font-size: 6px;
}
h2 {
font-size: 10px
}
/** Define the header rules **/
@page {
margin-top: 120px;
/* Ruang untuk header */
margin-bottom: 50px;
/* Ruang untuk footer */
}
#header {
/* position: fixed; */
/* top: -100px; */
/* Posisi header di luar konten */
left: 0;
right: 0;
height: 90px;
text-align: center;
padding-bottom: 10px;
}
.header-logo {
position: absolute;
left: 20px;
top: 10px;
max-height: 80px;
max-width: 150px;
}
.header-title {
margin-top: 20px;
}
#footer {
position: fixed;
bottom: -50px;
left: 0;
right: 0;
height: 50px;
text-align: center;
border-top: 1px solid #ddd;
padding-top: 10px;
}
.page-number:after {
content: counter(page) " dari " counter(pages);
}
.content {
margin-top: 20px;
}
.page-break {
page-break-after: always;
}
footer {
position: fixed;
bottom: 0cm;
left: 0cm;
right: 0cm;
}
body {
margin-top: 3cm;
/* Tambahkan margin top sedikit lebih besar dari tinggi header */
margin-bottom: 120px;
position: relative;
z-index: 1;
/* Pastikan konten berada di bawah header */
}
.border {
border: 1px solid #000;
}
.photo-item {
text-align: center;
margin-bottom: 20px;
}
.photo-image {
max-width: 80%;
height: auto;
display: block;
margin: 0 auto;
}
</style>
</head>
<body style="width: 80%; margin: auto">
<header id="header">
<table style="width: 100%; border: none;">
<tr>
<td style="width: 20%; text-align: left;" class="header-left">
@include('lpj::component.logo-bag')
</td>
</tr>
</table>
</header>
<main class="content">
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">MEMO ANTAR KANTOR</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td style="width: 10%">Kepada</td>
<td>:</td>
<td>{{ $memo['kepada'] ?? '' }}</td>
</tr>
<tr>
<td>Dari</td>
<td>:</td>
<td>{{ $memo['dari'] ?? '' }}</td>
</tr>
<tr>
<td>No</td>
<td>:</td>
<td>{{ $memo['nomor_memo'] ?? '' }}</td>
</tr>
<tr>
<td>Tanggal</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Perihal</td>
<td>:</td>
<td>{{ $memo['perihal'] ?? '' }}</td>
</tr>
</table>
<table>
<tr>
<td>
Menindak lanjuti permintann penilaian jaminan dari {{ $permohonan->user->name }} AO Cabang Ternate
tanggal , dapat di sampaikan sebagai berikut:
</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">Identitas Deitur & Hubungan dan Penghuni</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td style="width: 10%">Nama Calon Debiture</td>
<td>:</td>
<td >{{ $permohonan->debiture->name ?? '' }}</td>
</tr>
@if (@isset($dokumen))
@foreach ($dokumen->detail as $details)
<tr>
<td>{{ $details->jenisLegalitasJaminan->name ?? '' }}
</td>
<td>:</td>
<td>
@if (isset($detail->dokumen_jaminan))
@php
$dokumen_nomor = is_array(json_decode($detail->dokumen_nomor))
? json_decode($detail->dokumen_nomor)
: ($detail->dokumen_nomor
? [$detail->dokumen_nomor]
: []);
@endphp
@foreach ($dokumen_jaminan as $index => $dokumen)
<div>
@if (!empty($dokumen_nomor))
<span>
{{ $dokumen_nomor[$index] }}</span>
@endif
</div>
<br>
@endforeach
@endif
</td>
</tr>
@endforeach
@endif
<tr>
<td>Atas Nama</td>
<td>:</td>
<td>{{ $permohonan->debiture->name ?? '' }}</td>
</tr>
<tr>
<td>Tanggal Terbit Sertifikat</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Surat Ukur No</td>
<td>:</td>
<td></td>
</tr>
<tr>
@php
$cekLuas = isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai']) ? 'tidak sesuai' : 'sesuai';
$luas = $forminspeksi['tanah']['luas_tanah'][$cekLuas] ?? null;
@endphp
<td >Luas Tanah</td>
<td >:</td>
<td >{{ $luas ?? '' }}</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">Loaksi Jaminan</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td width="10%">Terletak di</td>
<td>:</td>
<td> {{ $alamat['address'] ?? '' }}</td>
</tr>
<tr>
<td>Kelurahan</td>
<td>:</td>
<td>{{ $alamat['village_code'] ?? '' }}</td>
</tr>
<tr>
<td>Kecamatan</td>
<td>:</td>
<td>{{ $alamat['district_code'] ?? '' }}</td>
</tr>
<tr>
<td>Kota</td>
<td>:</td>
<td> {{ $alamat['city_code'] ?? '' }}</td>
</tr>
<tr>
<td>Propinsi</td>
<td>:</td>
<td>{{ $alamat['province_code'] ?? '' }}</td>
</tr>
<tr>
<td>Titik Kordinat</td>
<td>:</td>
<td>{{ $alamat['province_code'] ?? '' }}</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">HASIL INSPEKSI</h2>
</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">KESIMPULAN DAN SARAN</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td>Demikian Kami Sampaikan, aatas perhatiannya kami ucapkan terimakasih</td>
</tr>
<tr>
<table style="width: 100%; text-align: center;" border="1">
<tr>
<td style="height: 50px"></td>
<td style="height: 50px"></td>
<td style="height: 50px"></td>
<td style="height: 50px"></td>
</tr>
<tr>
<td>{{ $penilai->userPenilaiTeam->name ?? '' }}</br>
Appraisal
</td>
<td> {{ $senior_officer->name ?? '' }}</br>
SO Region
</td>
<td> {{ $senior_officer->name ?? '' }}</br>
EO Appraisal
</td>
<td> {{ $senior_officer->name ?? '' }}</br>
Deputy Director
</td>
</tr>
</table>
</tr>
</table>
<div class="page-break"></div>
<table style="width: 100%">
<tr>
<td style=" width: 100%; padding: 2px; border: 1px solid #000; text-align: center">FOTO JAMINAN</td>
</tr>
<tr>
<td>
@include('lpj::penilai.components.foto-jaminan')
</td>
</tr>
</table>
</main>
<footer>
</footer>
</body>
</html>

View File

@@ -0,0 +1,344 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Laporan Penilai Jaminan</title>
<style>
* {
font-size: 6px;
}
h2 {
font-size: 10px
}
/** Define the header rules **/
@page {
margin-top: 120px;
/* Ruang untuk header */
margin-bottom: 50px;
/* Ruang untuk footer */
}
#header {
/* position: fixed; */
/* top: -100px; */
/* Posisi header di luar konten */
left: 0;
right: 0;
height: 90px;
text-align: center;
padding-bottom: 10px;
}
.header-logo {
position: absolute;
left: 20px;
top: 10px;
max-height: 80px;
max-width: 150px;
}
.header-title {
margin-top: 20px;
}
#footer {
position: fixed;
bottom: -50px;
left: 0;
right: 0;
height: 50px;
text-align: center;
border-top: 1px solid #ddd;
padding-top: 10px;
}
.page-number:after {
content: counter(page) " dari " counter(pages);
}
.content {
margin-top: 20px;
}
.page-break {
page-break-after: always;
}
footer {
position: fixed;
bottom: 0cm;
left: 0cm;
right: 0cm;
}
body {
margin-top: 3cm;
/* Tambahkan margin top sedikit lebih besar dari tinggi header */
margin-bottom: 120px;
position: relative;
z-index: 1;
/* Pastikan konten berada di bawah header */
}
.border {
border: 1px solid #000;
}
.photo-item {
text-align: center;
margin-bottom: 20px;
}
.photo-image {
max-width: 80%;
height: auto;
display: block;
margin: 0 auto;
}
</style>
</head>
<body style="width: 80%; margin: auto">
<header id="header">
<table style="width: 100%; border: none;">
<tr>
<td style="width: 20%; text-align: left;" class="header-left">
@include('lpj::component.logo-bag')
</td>
</tr>
</table>
</header>
<main class="content">
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">MEMO ANTAR KANTOR</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td style="width: 10%">Kepada</td>
<td>:</td>
<td>{{ $memo['kepada'] ?? '' }}</td>
</tr>
<tr>
<td>Dari</td>
<td>:</td>
<td>{{ $memo['dari'] ?? '' }}</td>
</tr>
<tr>
<td>No</td>
<td>:</td>
<td>{{ $memo['nomor_memo'] ?? '' }}</td>
</tr>
<tr>
<td>Tanggal</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Perihal</td>
<td>:</td>
<td>{{ $memo['perihal'] ?? '' }}</td>
</tr>
</table>
<table>
<tr>
<td>
Menindak lanjuti permintann penilaian jaminan dari {{ $permohonan->user->name }} AO Cabang Ternate
tanggal , dapat di sampaikan sebagai berikut:
</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">Identitas Deitur & Hubungan dan Penghuni</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td style="width: 10%">Nama Calon Debiture</td>
<td>:</td>
<td >{{ $permohonan->debiture->name ?? '' }}</td>
</tr>
@if (@isset($dokumen))
@foreach ($dokumen->detail as $details)
<tr>
<td>{{ $details->jenisLegalitasJaminan->name ?? '' }}
</td>
<td>:</td>
<td>
@if (isset($detail->dokumen_jaminan))
@php
$dokumen_nomor = is_array(json_decode($detail->dokumen_nomor))
? json_decode($detail->dokumen_nomor)
: ($detail->dokumen_nomor
? [$detail->dokumen_nomor]
: []);
@endphp
@foreach ($dokumen_jaminan as $index => $dokumen)
<div>
@if (!empty($dokumen_nomor))
<span>
{{ $dokumen_nomor[$index] }}</span>
@endif
</div>
<br>
@endforeach
@endif
</td>
</tr>
@endforeach
@endif
<tr>
<td>Atas Nama</td>
<td>:</td>
<td>{{ $permohonan->debiture->name ?? '' }}</td>
</tr>
<tr>
<td>Tanggal Terbit Sertifikat</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Surat Ukur No</td>
<td>:</td>
<td></td>
</tr>
<tr>
@php
$cekLuas = isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai']) ? 'tidak sesuai' : 'sesuai';
$luas = $forminspeksi['tanah']['luas_tanah'][$cekLuas] ?? null;
@endphp
<td >Luas Tanah</td>
<td >:</td>
<td >{{ $luas ?? '' }}</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">Loaksi Jaminan</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td width="10%">Terletak di</td>
<td>:</td>
<td> {{ $alamat['address'] ?? '' }}</td>
</tr>
<tr>
<td>Kelurahan</td>
<td>:</td>
<td>{{ $alamat['village_code'] ?? '' }}</td>
</tr>
<tr>
<td>Kecamatan</td>
<td>:</td>
<td>{{ $alamat['district_code'] ?? '' }}</td>
</tr>
<tr>
<td>Kota</td>
<td>:</td>
<td> {{ $alamat['city_code'] ?? '' }}</td>
</tr>
<tr>
<td>Propinsi</td>
<td>:</td>
<td>{{ $alamat['province_code'] ?? '' }}</td>
</tr>
<tr>
<td>Titik Kordinat</td>
<td>:</td>
<td>{{ $alamat['province_code'] ?? '' }}</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">HASIL INSPEKSI</h2>
</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">KESIMPULAN DAN SARAN</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td>Demikian Kami Sampaikan, aatas perhatiannya kami ucapkan terimakasih</td>
</tr>
<tr>
<table style="width: 100%; text-align: center;" border="1">
<tr>
<td style="height: 50px"></td>
<td style="height: 50px"></td>
<td style="height: 50px"></td>
<td style="height: 50px"></td>
</tr>
<tr>
<td>{{ $penilai->userPenilaiTeam->name ?? '' }}</br>
Appraisal
</td>
<td> {{ $senior_officer->name ?? '' }}</br>
SO Region
</td>
<td> {{ $senior_officer->name ?? '' }}</br>
EO Appraisal
</td>
<td> {{ $senior_officer->name ?? '' }}</br>
Deputy Director
</td>
</tr>
</table>
</tr>
</table>
<div class="page-break"></div>
<table style="width: 100%">
<tr>
<td style=" width: 100%; padding: 2px; border: 1px solid #000; text-align: center">FOTO JAMINAN</td>
</tr>
<tr>
<td>
@include('lpj::penilai.components.foto-jaminan')
</td>
</tr>
</table>
</main>
<footer>
</footer>
</body>
</html>

View File

@@ -0,0 +1,301 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Laporan Penilai Jaminan</title>
<style>
* {
font-size: 6px;
}
h2 {
font-size: 10px
}
/** Define the header rules **/
@page {
margin-top: 120px;
/* Ruang untuk header */
margin-bottom: 50px;
/* Ruang untuk footer */
}
#header {
/* position: fixed; */
/* top: -100px; */
/* Posisi header di luar konten */
left: 0;
right: 0;
height: 90px;
text-align: center;
padding-bottom: 10px;
}
.header-logo {
position: absolute;
left: 20px;
top: 10px;
max-height: 80px;
max-width: 150px;
}
.header-title {
margin-top: 20px;
}
#footer {
position: fixed;
bottom: -50px;
left: 0;
right: 0;
height: 50px;
text-align: center;
border-top: 1px solid #ddd;
padding-top: 10px;
}
.page-number:after {
content: counter(page) " dari " counter(pages);
}
.content {
margin-top: 20px;
}
.page-break {
page-break-after: always;
}
footer {
position: fixed;
bottom: 0cm;
left: 0cm;
right: 0cm;
}
body {
margin-top: 3cm;
/* Tambahkan margin top sedikit lebih besar dari tinggi header */
margin-bottom: 120px;
position: relative;
z-index: 1;
/* Pastikan konten berada di bawah header */
}
.border {
border: 1px solid #000;
}
.photo-item {
text-align: center;
margin-bottom: 20px;
}
.photo-image {
max-width: 80%;
height: auto;
display: block;
margin: 0 auto;
}
</style>
</head>
<body style="width: 80%; margin: auto">
<header id="header">
<table style="width: 100%; border: none;">
<tr>
<td style="width: 20%; text-align: left;" class="header-left">
@include('lpj::component.logo-bag')
</td>
</tr>
</table>
</header>
<main class="content">
<table style="width: 100%">
<tr>
<td>
<h2 style="text-decoration: underline; text-transform: uppercase; text-align: center;">Resume
Penilaian
</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td style="width: 10%">Pemohon</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Atas Nama Cadeb</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Aset</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Lokasi Objek</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Dokumen</td>
<td>:</td>
<td>
<table>
@if (@isset($dokumen))
@foreach ($dokumen->detail as $details)
<tr>
<td>{{ $details->jenisLegalitasJaminan->name ?? '' }}
@if (isset($detail->dokumen_jaminan))
@php
$dokumen_nomor = is_array(json_decode($detail->dokumen_nomor))
? json_decode($detail->dokumen_nomor)
: ($detail->dokumen_nomor
? [$detail->dokumen_nomor]
: []);
@endphp
@foreach ($dokumen_jaminan as $index => $dokumen)
<div>
@if (!empty($dokumen_nomor))
<span>
{{ $dokumen_nomor[$index] }}</span>
@endif
</div>
<br>
@endforeach
@endif
</td>
</tr>
@endforeach
@endif
</table>
</td>
</tr>
<tr>
<td>Luas Tanah</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Tanggal Kunjungan</td>
<td>:</td>
<td></td>
</tr>
<tr>
<td>Luast Lahan</td>
<td>:</td>
<td></td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">Faktor Positif</h2>
</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">Faktor negatif</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td>
<h2 style=" text-transform: uppercase;">Nilai Pasar Wajar</h2>
</td>
</tr>
</table>
<table border="1" style="width: 100%">
<tr>
<td>
Keterangan
</td>
<td>
Nilai Pasar Wajar
</td>
<td>
Nilai Likudasi
</td>
</tr>
<tr>
<td>
</td>
<td>
Nilai Pasar Wajar
</td>
<td>
Nilai Likudasi
</td>
</tr>
</table>
<table>
<tr>
<td>
<h2 style=" text-transform: uppercase;">lain lain</h2>
</td>
</tr>
</table>
<table style="width: 100%">
<tr>
<td>Demikian Kami Sampaikan, atas perhatiannya kami ucapkan terimakasih</td>
</tr>
<tr>
<table style="width: 100%; text-align: center;" >
<tr>
<td style="height: 50px"></td>
<td style="height: 50px"></td>
</tr>
<tr>
<td>{{ $penilai->userPenilaiTeam->name ?? '' }}</br>
Appraisal
</td>
<td> {{ $senior_officer->name ?? '' }}</br>
SO Region
</td>
</tr>
</table>
</tr>
</table>
<div class="page-break"></div>
<table style="width: 100%">
<tr>
<td style=" width: 100%; padding: 2px; border: 1px solid #000; text-align: center">FOTO JAMINAN</td>
</tr>
<tr>
<td>
@include('lpj::penilai.components.foto-jaminan')
</td>
</tr>
</table>
</main>
<footer>
</footer>
</body>
</html>

View File

@@ -0,0 +1,15 @@
@extends('layouts.main')
@section('breadcrumbs')
{{-- {{ Breadcrumbs::render(request()->route()->getName()) }}
--}}
RAP
@endsection
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
@include('lpj::assetsku.includenya')
@include('lpj::surveyor.components.header')
@include('lpj::surveyor.components.rap')
</div>
@endsection

View File

@@ -228,8 +228,7 @@
</span>
</a>
</div>
{{-- untuk laporan standart itu non kerjasama tapi sederhanan in kerjasama --}}
<div class="menu-item">
<a class="menu-link"
onclick="seletSederhanaStandart('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
@@ -240,7 +239,7 @@
</a>
</div>
{{-- <div class="menu-item">
<div class="menu-item">
<a class="menu-link"
onclick="rap('{{ $permohonan->id }}', '{{ $dokumen->id }}', '{{ $inspeksiId }}', {{ $dokumen->jenis_jaminan_id }})">
<span class="menu-icon">
@@ -251,7 +250,7 @@
RAP
</span>
</a>
</div> --}}
</div>
</div>
</div>
</div>
@@ -516,6 +515,10 @@
}
function checkLaporan(){
}
</script>
@include('lpj::surveyor.js.utils')

View File

@@ -1,4 +1,7 @@
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5 lg:gap-7.5">
@foreach ($permohonan->debiture->documents as $dokumen)
@php
$jaminanId = $dokumen->id;
@@ -6,27 +9,28 @@
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT'];
$href = [
[
'label' => 'form inspeksi',
'url' => route('surveyor.inspeksi', [
'id' => $permohonan->id,
]) . "?form=create-inspeksi&inspeksi={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
'url' =>
route('surveyor.inspeksi', [
'id' => $permohonan->id,
]) .
"?form=create-inspeksi&inspeksi={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
'show' => true,
'icon' => !empty($currentInspeksi['data_form']),
],
];
if (!in_array(strtoupper($dokumen->jenisJaminan->name), $tanahBangunanTypes)) {
$denahLabel = strtoupper($dokumen->jenisJaminan->name);
$href[] = [
'label' => 'denah ' . $denahLabel,
'url' => route('surveyor.denah', [
'id' => $permohonan->id
]) . "?form=create-denah&denah={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
'url' =>
route('surveyor.denah', [
'id' => $permohonan->id,
]) .
"?form=create-denah&denah={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
'show' => true,
'icon' => !empty($currentInspeksi['denah_form']),
];
@@ -35,36 +39,43 @@
$href = array_merge($href, [
[
'label' => 'foto',
'url' => route('surveyor.foto', [
'id' => $permohonan->id
]) . "?form=create-foto&foto={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
'url' =>
route('surveyor.foto', [
'id' => $permohonan->id,
]) .
"?form=create-foto&foto={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
'show' => true,
'icon' => !empty($currentInspeksi['foto_form']),
],
[
'label' => 'data pembanding',
'url' => route('surveyor.data-pembanding', [
'id' => $permohonan->id
]) . "?form=data-pembanding&pembanding={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
'url' =>
route('surveyor.data-pembanding', [
'id' => $permohonan->id,
]) .
"?form=data-pembanding&pembanding={$permohonan->id}&dokument={$jaminanId}&jenisjaminan={$dokumen->jenisJaminan->id}",
'show' => true,
'icon' => !empty($currentInspeksi['data_pembanding']),
],
]);
@endphp
<div class="card border border-agi-100 border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg grid gap-5"
style="padding: 20px">
<div class="card-group flex items-center flex-wrap sm:flex-nowrap justify-between py-4 gap-2.5">
<div class="flex items-center gap-3.5">
<div class="relative size-[50px] shrink-0">
<svg class="w-full h-full stroke-brand-clarity fill-light" fill="none" height="48"
viewBox="0 0 44 48" width="44" xmlns="http://www.w3.org/2000/svg">
<path d="M16 2.4641C19.7128 0.320509 24.2872 0.320508 28 2.4641L37.6506 8.0359C41.3634 10.1795 43.6506 14.141 43.6506 18.4282V29.5718C43.6506 33.859 41.3634 37.8205 37.6506 39.9641L28 45.5359C24.2872 47.6795 19.7128 47.6795 16 45.5359L6.34937 39.9641C2.63655 37.8205 0.349365 33.859 0.349365 29.5718V18.4282C0.349365 14.141 2.63655 10.1795 6.34937 8.0359L16 2.4641Z" fill=""></path>
<path d="M16.25 2.89711C19.8081 0.842838 24.1919 0.842837 27.75 2.89711L37.4006 8.46891C40.9587 10.5232 43.1506 14.3196 43.1506 18.4282V29.5718C43.1506 33.6804 40.9587 37.4768 37.4006 39.5311L27.75 45.1029C24.1919 47.1572 19.8081 47.1572 16.25 45.1029L6.59937 39.5311C3.04125 37.4768 0.849365 33.6803 0.849365 29.5718V18.4282C0.849365 14.3196 3.04125 10.5232 6.59937 8.46891L16.25 2.89711Z" stroke=""></path>
</svg>
<div class="absolute leading-none left-2/4 top-2/4 -translate-y-2/4 -translate-x-2/4">
<i class="ki-filled ki-additem text-2xl text-brand"></i>
</div>
viewBox="0 0 44 48" width="44" xmlns="http://www.w3.org/2000/svg">
<path
d="M16 2.4641C19.7128 0.320509 24.2872 0.320508 28 2.4641L37.6506 8.0359C41.3634 10.1795 43.6506 14.141 43.6506 18.4282V29.5718C43.6506 33.859 41.3634 37.8205 37.6506 39.9641L28 45.5359C24.2872 47.6795 19.7128 47.6795 16 45.5359L6.34937 39.9641C2.63655 37.8205 0.349365 33.859 0.349365 29.5718V18.4282C0.349365 14.141 2.63655 10.1795 6.34937 8.0359L16 2.4641Z"
fill=""></path>
<path
d="M16.25 2.89711C19.8081 0.842838 24.1919 0.842837 27.75 2.89711L37.4006 8.46891C40.9587 10.5232 43.1506 14.3196 43.1506 18.4282V29.5718C43.1506 33.6804 40.9587 37.4768 37.4006 39.5311L27.75 45.1029C24.1919 47.1572 19.8081 47.1572 16.25 45.1029L6.59937 39.5311C3.04125 37.4768 0.849365 33.6803 0.849365 29.5718V18.4282C0.849365 14.3196 3.04125 10.5232 6.59937 8.46891L16.25 2.89711Z"
stroke=""></path>
</svg>
<div class="absolute leading-none left-2/4 top-2/4 -translate-y-2/4 -translate-x-2/4">
<i class="ki-filled ki-additem text-2xl text-brand"></i>
</div>
</div>
</div>
<div class="flex items-center gap-2.5">
@@ -74,27 +85,80 @@
</div>
</div>
@foreach ($href as $item)
@if ($item['show'])
<a href="{{ $item['url'] }}"
class="flex items-center justify-between border border-gray-200 rounded-xl gap-2 px-4 py-4 btn-outline {{ $item['icon'] ? 'btn-success' : 'btn-primary' }} hover:btn-light">
<div class="flex items-center gap-3.5">
<div class="flex flex-col">
<h1 class="text-sm font-medium text-gray-900 mb-px uppercase">
{{ $item['label'] }}
</h1>
@if (strtolower($permohonan->tujuanPenilaian->name) == 'rap')
<a href="{{ route('surveyor.inspeksi', ['id' => $permohonan->id]) .
'?' .
http_build_query([
'form' => 'create-inspeksi',
'inspeksi' => $permohonan->id,
'dokument' => $jaminanId,
'jenisjaminan' => $dokumen->jenisJaminan->id,
]) }}"
class="flex items-center justify-between border border-gray-200 rounded-xl gap-2 px-4 py-4 btn-outline {{ !empty($currentInspeksi['data_form']) ? 'btn-success' : 'btn-primary' }} hover:btn-light">
<div class="flex items-center gap-3.5">
<div class="flex flex-col">
<h1 class="text-sm font-medium text-gray-900 mb-px uppercase">
Form Inspeksi RAP
</h1>
</div>
</div>
<div class="flex items-center gap-5">
<div class="flex gap-0.5">
<div class="btn btn-sm btn-icon btn-clear {{ !empty($currentInspeksi['data_form']) ? '' : 'btn-light' }}">
<i class="ki-filled {{ !empty($currentInspeksi['data_form']) ? 'ki-check-circle' : 'ki-notepad-edit' }}"></i>
</div>
</div>
<div class="flex items-center gap-5">
<div class="flex gap-0.5">
<div class="btn btn-sm btn-icon btn-clear {{ $item['icon'] ? '' : 'btn-light' }}">
<i class="ki-filled {{ $item['icon'] ? 'ki-check-circle' : 'ki-notepad-edit'}}"></i>
</div>
</a>
<a href="{{ route('surveyor.foto', ['id' => $permohonan->id]) .
'?' .
http_build_query([
'form' => 'create-foto',
'foto' => $permohonan->id,
'dokument' => $jaminanId,
'jenisjaminan' => $dokumen->jenisJaminan->id,
]) }}"
class="flex items-center justify-between border border-gray-200 rounded-xl gap-2 px-4 py-4 btn-outline {{ !empty($currentInspeksi['foto_form']) ? 'btn-success' : 'btn-primary' }} hover:btn-light">
<div class="flex items-center gap-3.5">
<div class="flex flex-col">
<h1 class="text-sm font-medium text-gray-900 mb-px uppercase">
Foto
</h1>
</div>
</div>
<div class="flex items-center gap-5">
<div class="flex gap-0.5">
<div class="btn btn-sm btn-icon btn-clear {{ !empty($currentInspeksi['foto_form']) ? '' : 'btn-light' }}">
<i class="ki-filled {{ !empty($currentInspeksi['foto_form']) ? 'ki-check-circle' : 'ki-notepad-edit' }}"></i>
</div>
</div>
</div>
</a>
@else
@foreach ($href as $item)
@if ($item['show'])
<a href="{{ $item['url'] }}"
class="flex items-center justify-between border border-gray-200 rounded-xl gap-2 px-4 py-4 btn-outline {{ $item['icon'] ? 'btn-success' : 'btn-primary' }} hover:btn-light">
<div class="flex items-center gap-3.5">
<div class="flex flex-col">
<h1 class="text-sm font-medium text-gray-900 mb-px uppercase">
{{ $item['label'] }}
</h1>
</div>
</div>
</div>
</a>
@endif
@endforeach
<div class="flex items-center gap-5">
<div class="flex gap-0.5">
<div class="btn btn-sm btn-icon btn-clear {{ $item['icon'] ? '' : 'btn-light' }}">
<i
class="ki-filled {{ $item['icon'] ? 'ki-check-circle' : 'ki-notepad-edit' }}"></i>
</div>
</div>
</div>
</a>
@endif
@endforeach
@endif
</div>
@endforeach
</div>

View File

@@ -616,14 +616,6 @@
},
error: function(xhr, status, error) {
console.error('Gagal memuat foto:', error);
// Tampilkan pesan error
Swal.fire({
icon: 'error',
title: 'Gagal Memuat Foto',
text: 'Terjadi kesalahan saat mengambil foto. Silakan coba lagi.',
confirmButtonText: 'OK'
});
},
complete: function() {
// Sembunyikan loading indicator

View File

@@ -1,18 +1,27 @@
<div class=" card w-full bg-white rounded-lg shadow-md ">
<div class="card-header bg-agi-50">
@php
$title = $title ?? 'Form Inspeksi';
@endphp
<h3 class="card-title uppercase">
Form Inspeksi
{{ $title }}
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('surveyor.show', ['id' => request('inspeksi')]) }}" class="btn btn-xs btn-info">
@if (isset($id))
<a href="{{ route($backLink, ['id' => $id]) }}" class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back
</a>
@else
<a href="{{ url()->previous() }}" class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back
</a>
@endif
{{-- <a href="{{ route('surveyor.show', ['id' => request('inspeksi')]) }}" class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back
</a>
</a> --}}
</div>
</div>
<div class="card-body">
<div class="py-4">
<h1 class="text-md font-medium text-gray-900">Order Penilaian</h1>
</div>
<div class="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">Tujuan Penilaian</label>

View File

@@ -122,7 +122,8 @@
<input class="name_rute" type="hidden" name="name_rute" value="rute">
<div class="w-full">
<input id="inputGistaru" type="file" name="foto_gistaru"
class="file-input file-input-bordered w-full" accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
class="file-input file-input-bordered w-full"
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
onchange="previewImage(this, 'gistaru-preview')">
<img id="gistaru-preview"
@@ -149,7 +150,8 @@
<input id="inputBhumi" type="file" name="foto_bhumi"
class="file-input file-input-bordered w-full " accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
class="file-input file-input-bordered w-full "
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
onchange="previewImage(this, 'bhumi-preview')">
<img id="bhumi-preview"
src="{{ asset('storage/' . (isset($forminspeksi['foto_bhumi']) ? $forminspeksi['foto_bhumi'] : '')) }}"
@@ -171,7 +173,8 @@
<input class="name_rute" type="hidden" name="name_rute" value="rute">
<div class="w-full">
<input id="inputArgisRegion" type="file" name="foto_argis_region"
class="file-input file-input-bordered w-full" accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
class="file-input file-input-bordered w-full"
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
onchange="previewImage(this, 'argis-region-preview')">
<img id="argis-region-preview"
src="{{ asset('storage/' . (isset($forminspeksi['foto_argis_region']) ? $forminspeksi['foto_argis_region'] : '')) }}"
@@ -194,7 +197,8 @@
<div class="w-full grid gap-5">
<div class="input-group w-full flex gap-2">
<input id="foto_tempat" type="file" name="foto_tempat"
class="file-input file-input-bordered w-full" accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
class="file-input file-input-bordered w-full"
accept=".jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.svg"
onchange="previewImage(this, 'foto_tempat-preview')">
<button type="button" id="btnCamera" class="btn btn-light" data-modal-toggle="#cameraModal">
<i class="ki-outline ki-abstract-33"></i> Camera
@@ -213,8 +217,9 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
<label class="form-label lg:form-label max-w-56 ">Catatan yang Perlu Diperhatikan
</label>
<div id="keterangan-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
</label>
<div class="w-full">
<div id="keterangan-container" class="flex items-baseline flex-wrap gap-2.5 w-full">
@if (!empty($forminspeksi['fakta']['keterangan']) && is_array($forminspeksi['fakta']['keterangan']))
@foreach ($forminspeksi['fakta']['keterangan'] as $index => $item)
<div class="keterangan flex items-center gap-2 mt-2 textarea-group w-full">
@@ -234,11 +239,12 @@
<em id="error-keterangan" class="alert text-danger text-sm"></em>
</div>
@endif
<button type="button" onclick="addClonableItem('keterangan-container', 'keterangan')"
class="btn btn-primary btn-sm mt-5 ">
<i class="ki-outline ki-plus"></i>
</div>
<button type="button" onclick="addClonableItem('keterangan-container', 'keterangan')"
class="btn btn-primary btn-sm mt-5 ">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
</div>
</div>
</div>

View File

@@ -11,6 +11,13 @@
@csrf
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
<input type="hidden" name="dokument_id" value="{{ request('dokument') }}">
@if (strtolower($permohonan->tujuanPenilaian->name) == 'rap')
<input type="hidden" name="action" value="rap">
<input type="hidden" name="type" value="rap">
@include('lpj::surveyor.components.header')
@include('lpj::surveyor.components.rap')
@else
@foreach ($permohonan->debiture->documents as $dokumen)
@if ($dokumen->jenisJaminan)
@php
@@ -36,8 +43,7 @@
@endif
@endif
@endforeach
@endif
<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>

View File

@@ -0,0 +1,615 @@
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
Perizinan
</h3>
</div>
<div class="card-body">
<div class="grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label class="form-label max-w-56">Perizininan Lainnya</label>
<div class="flex-wrap items-stretch w-full">
<div class="flex flex-col items-start gap-4 w-full">
@if (isset($basicData['perizinan']))
@foreach ($basicData['perizinan'] as $item)
<div class="flex items-center w-full">
<label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="perizinan[]" type="checkbox">
{{ $item->name }}
</label>
<input class="file-input" name="perizinan_file[]" type="file" />
</div>
@endforeach
@endif
</div>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label class="form-label max-w-56">Brosur & Pricelist</label>
<div class="flex-wrap items-stretch w-full">
<div class="flex flex-col items-start gap-4 w-full">
<div class="flex items-center w-full">
<label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="brosur_price_list[]" type="checkbox">
Brosur
</label>
<input class="file-input" name="brosur_price_list[]" type="file" />
</div>
<div class="flex items-center w-full">
<label class="form-label flex items-center gap-2.5 text-nowrap">
<input class="checkbox" name="brosur_price_list_file[]" type="checkbox">
Pricelist
</label>
<input class="file-input" name="brosur_price_list_file[]" type="file" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
Deskripsi developer
</h3>
</div>
<div class="card-body">
<div class="grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Pengalaman Developer & Proyek Yang Pernah Dibuat</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['pengalaman_developer']))
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="pengalaman_developer" rows="3">{{ old('pengalaman_developer', $forminspeksi['pengalaman_developer']) }}</textarea>
</div>
@else
<div class="pengalaman_developer flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="pengalaman_developer" rows="3">{{ old('pengalaman_developer') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Apakah Developer Anggota REI</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['developer_anggota']))
<div class="developer_anggota flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="developer_anggota" rows="3">{{ old('developer_anggota', $forminspeksi['developer_anggota']) }}</textarea>
</div>
@else
<div class="developer_anggota flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="developer_anggota" rows="3">{{ old('developer_anggota') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Lainnya</label>
<div class="w-full">
<div id="lainnya_developer-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['lainnya_developer']))
@foreach ($forminspeksi['lainnya_developer'] as $item)
<div class="lainnya_developer flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="lainnya_developer[]" rows="3">{{ old("lainnya_developer.$index", $positif) }}</textarea>
</div>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
@endforeach>
@else
<div class="lainnya_developer flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="lainnya_developer[]" rows="3">{{ old('lainnya_developer.0', '') }}</textarea>
</div>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
@endif
</div>
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('lainnya_developer-container', 'lainnya_developer')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
KONDISI, LINGKUNGAN DAN PROGRESS PEMBANGUNAN
</h3>
</div>
<div class="card-body">
<div class="grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Kapan Mulai Dibangun & Target Penyelesaian</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['kapan_mulai_dibangun']))
<div class="kapan_mulai_dibangun flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kapan_mulai_dibangun" rows="3">{{ old('kapan_mulai_dibangun', $forminspeksi['kapan_mulai_dibangun']) }}</textarea>
</div>
@else
<div class="kapan_mulai_dibangun flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kapan_mulai_dibangun" rows="3">{{ old('kapan_mulai_dibangun') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Kondisi Perumahan Saat Ini</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['kondisi_perumahan']))
<div class="kondisi_perumahan flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kondisi_perumahan" rows="3">{{ old('kondisi_perumahan', $forminspeksi['kondisi_perumahan']) }}</textarea>
</div>
@else
<div class="kondisi_perumahan flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kondisi_perumahan" rows="3">{{ old('kondisi_perumahan') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Progress Pembangunan</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['progres_pembangunan']))
<div class="progres_pembangunan flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="progres_pembangunan" rows="3">{{ old('progres_pembangunan', $forminspeksi['progres_pembangunan']) }}</textarea>
</div>
@else
<div class="progres_pembangunan flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="progres_pembangunan" rows="3">{{ old('progres_pembangunan') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Kontraktor (internal/eksternal)</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['kontraktor']))
<div class="kontraktor flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kontraktor" rows="3">{{ old('kontraktor', $forminspeksi['kontraktor']) }}</textarea>
</div>
@else
<div class="kontraktor flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kontraktor" rows="3">{{ old('kontraktor') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Lingkungan Sekitar</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['lingkungan_sekitar']))
<div class="lingkungan_sekitar flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="lingkungan_sekitar" rows="3">{{ old('lingkungan_sekitar', $forminspeksi['lingkungan_sekitar']) }}</textarea>
</div>
@else
<div class="lingkungan_sekitar flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="lingkungan_sekitar" rows="3">{{ old('lingkungan_sekitar') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Komplek Lain Disekitar Lokasi</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['komplek_disekitar']))
<div class="komplek_disekitar flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="komplek_disekitar" rows="3">{{ old('komplek_disekitar', $forminspeksi['komplek_disekitar']) }}</textarea>
</div>
@else
<div class="komplek_disekitar flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="komplek_disekitar" rows="3">{{ old('komplek_disekitar') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Pusat Keramaian Dekat Lokasi</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['pusat_keramaian']))
<div class="pusat_keramaian flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="pusat_keramaian" rows="3">{{ old('pusat_keramaian', $forminspeksi['pusat_keramaian']) }}</textarea>
</div>
@else
<div class="pusat_keramaian flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="pusat_keramaian" rows="3">{{ old('pusat_keramaian') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Transportasi Umum Yang Tersedia</label>
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['transportasi_umum']))
<div class="transportasi_umum flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="transportasi_umum" rows="3">{{ old('transportasi_umum', $forminspeksi['transportasi_umum']) }}</textarea>
</div>
@else
<div class="transportasi_umum flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="transportasi_umum" rows="3">{{ old('transportasi_umum') }}</textarea>
</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Lainnya</label>
<div id="lainnya-kondisi-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['lainnya_kondisi']))
@foreach ($forminspeksi['lainnya_kondisi'] as $index => $positif)
<div class="lainnya_kondisi flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="lainnya_kondisi[]" rows="3">{{ old("lainnya_kondisi.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button"
style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="lainnya_kondisi flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="lainnya_kondisi[]" rows="3">{{ old('lainnya_kondisi.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('lainnya-kondisi-container', 'lainnya_kondisi')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
PARTISI BANGUNAN
</h3>
</div>
<div class="card-body">
<div class="grid gap-2.5">
@if (isset($basicData['spekKategoriBangunan']))
@foreach ($basicData['spekKategoriBangunan'] as $item)
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">{{ $item->name }}</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="partisi_{{ $item->name }}" class="input"
placeholder="Masukkan {{ $item->name }}">
@error($item->name)
<em class="alert text-danger text-sm"></em>
@enderror
</div>
</div>
@endforeach
@endif
</div>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
JUMLAH UNIT, BLOK, TYPE DAN LUAS BANGUNAN
</h3>
</div>
<div class="card-body">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<div id="jumlah-unit" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['jumlah_unit']))
@foreach ($forminspeksi['jumlah_unit'] as $index => $positif)
<div class="jumlah_unit flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="jumlah_unit[]" rows="3">{{ old("jumlah_unit.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="jumlah_unit flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="jumlah_unit[]" rows="3">{{ old('jumlah_unit.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
</div>
</div>
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('jumlah-unit', 'jumlah_unit')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
BATAS-BATAS PERUMAHAN
</h3>
</div>
<div class="card-body">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<div id="bata-perumahan-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['batas_batas_perumahan']))
@foreach ($forminspeksi['batas_batas_perumahan'] as $index => $positif)
<div class="batas_batas_perumahan flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="batas_batas_perumahan[]" rows="3">{{ old("batas_batas_perumahan.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="batas_batas_perumahan flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="batas_batas_perumahan[]" rows="3">{{ old('batas_batas_perumahan.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
</div>
</div>
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('bata-perumahan-container', 'batas_batas_perumahan')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
FASOS/FASUM
</h3>
</div>
<div class="card-body">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<div id="fasos-fasum-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['fasus_fasum']))
@foreach ($forminspeksi['fasus_fasum'] as $index => $positif)
<div class="fasus_fasum flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="fasus_fasum[]" rows="3">{{ old("fasus_fasum.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="fasus_fasum flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="fasus_fasum[]" rows="3">{{ old('fasus_fasum.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
</div>
</div>
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('fasos-fasum-container', 'fasus_fasum')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
PROGRES PENJUALAN SAAT INI
</h3>
</div>
<div class="card-body">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<div id="progres-penjualan-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['progres_penjualan']))
@foreach ($forminspeksi['progres_penjualan'] as $index => $positif)
<div class="progres_penjualan flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="progres_penjualan[]" rows="3">{{ old("progres_penjualan.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="progres_penjualan flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="progres_penjualan[]" rows="3">{{ old('progres_penjualan.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
</div>
</div>
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('progres-penjualan-container', 'progres_penjualan')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
HARGA UNIT
</h3>
</div>
<div class="card-body">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<div id="harga-unit-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['harga_unit']))
@foreach ($forminspeksi['harga_unit'] as $index => $positif)
<div class="harga_unit flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="harga_unit[]" rows="3">{{ old("harga_unit.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="harga_unit flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="harga_unit[]" rows="3">{{ old('harga_unit.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
</div>
</div>
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('harga-unit-container', 'harga_unit')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
TARGET MARKET
</h3>
</div>
<div class="card-body">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<div id="target_market-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['target_market']))
@foreach ($forminspeksi['target_market'] as $index => $positif)
<div class="target_market flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="target_market[]" rows="3">{{ old("target_market.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="target_market flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="target_market[]" rows="3">{{ old('target_market.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
</div>
</div>
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('target_market-container', 'target_market')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
KERJASAMA DENGAN BANK LAIN
</h3>
</div>
<div class="card-body">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<div id="kerjasama_dengan_bank-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['kerjasama_dengan_bank']))
@foreach ($forminspeksi['kerjasama_dengan_bank'] as $index => $positif)
<div class="kerjasama_dengan_bank flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kerjasama_dengan_bank[]" rows="3">{{ old("kerjasama_dengan_bank.$index", $positif) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endforeach
@else
<div class="kerjasama_dengan_bank flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="kerjasama_dengan_bank[]" rows="3">{{ old('kerjasama_dengan_bank.0', '') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
</div>
</div>
<button type="button" class="btn btn-primary btn-sm mt-5"
onclick="addClonableItem('kerjasama_dengan_bank-container', 'kerjasama_dengan_bank')">
<i class="ki-outline ki-plus"></i>
</button>
</div>
</div>
<div class="card border border-agi-100 w-full rounded-lg shadow-md overflow-hidden">
<div class="card-header bg-agi-50">
<h3 class="card-title uppercase">
RUTE MENUJU LOKASI
</h3>
</div>
<div class="card-body">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
@if (!empty($forminspeksi['rute_menuju_lokasi']))
<div class="rute_menuju_lokasi flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="rute_menuju_lokasi" rows="3">{{ old("rute_menuju_lokasi", $forminspeksi['rute_menuju_lokasi']) }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@else
<div class="rute_menuju_lokasi flex items-center gap-2 mt-2 textarea-group w-full">
<textarea class="textarea mt-2" name="rute_menuju_lokasi" rows="3">{{ old('rute_menuju_lokasi') }}</textarea>
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
<i class="ki-outline ki-trash"></i>
</button>
</div>
@endif
</div>
</div>
</div>
</div>
@include('lpj::surveyor.components.informasi')

View File

@@ -4,9 +4,6 @@
{{ Breadcrumbs::render('surveyor') }}
@endsection
@section('content')
@push('styles')
@endpush
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card border border-agi-100 card-grid min-w-full" data-datatable="false" data-datatable-page-size="10"
data-datatable-state-save="false" id="permohonan-table" data-api-url="{{ route('surveyor.datatables') }}">
@@ -94,6 +91,98 @@
</div>
</div>
<div class="modal" data-modal="true" id="modal_jadwal">
<div class="modal-content modal-center-y max-w-[600px]">
<div class="modal-header">
<h3 class="modal-title">Kunjungan</h3>
<button class="btn btn-xs btn-icon btn-light" data-modal-dismiss="true">
<i class="ki-outline ki-cross"></i>
</button>
</div>
<div class="modal-body">
<form action="{{ route('surveyor.storeJadwal') }}" method="POST" enctype="multipart/form-data"
id="revisiForm">
@method('put')
@csrf
<input id="ids" type="hidden" name="id">
<div class="pl-1 grid gap-2.5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tanggal Kunjungan</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('waktu_penilaian') border-danger bg-danger-light @enderror"
type="datetime-local" name="waktu_penilaian" value="">
@error('waktu_penilaian')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Catatan</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea id="deskripsi_penilaian"
class="textarea @error('deskripsi_penilaian') border-danger bg-danger-light @enderror" rows="3"
name="deskripsi_penilaian"></textarea>
@error('deskripsi_penilaian')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<div class="modal-footer justify-end mt-2">
<div class="flex gap-4">
<button type="button" class="btn btn-light" data-modal-dismiss="true">Cancel</button>
<button id="btnSubmit" type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="modal" data-modal="true" id="modal_freeze">
<div class="modal-content modal-center-y max-w-[600px]">
<div class="modal-header">
<h3 class="modal-title">Freeze Surveyor</h3>
<button class="btn btn-xs btn-icon btn-light" data-modal-dismiss="true">
<i class="ki-outline ki-cross"></i>
</button>
</div>
<div class="modal-body">
<form action="{{ route('surveyor.storeFreeze') }}" method="POST" enctype="multipart/form-data"
id="freezeSurveyor">
@method('put')
@csrf
<input id="ids" type="hidden" name="id">
<div class="pl-1 grid gap-2.5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Catatan</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea id="deskripsi_penilaian"
class="textarea @error('deskripsi_penilaian') border-danger bg-danger-light @enderror" rows="3"
name="deskripsi_penilaian"></textarea>
@error('deskripsi_penilaian')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<div class="modal-footer justify-end mt-2">
<div class="flex gap-4">
<button type="button" class="btn btn-light" data-modal-dismiss="true">Cancel</button>
<button id="btnSubmit" type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection
@@ -165,16 +254,16 @@
if (data.penilaian.waktu_penilaian == null && data.penilaian.authorized_status == null) {
actionHtml += `
<a class="btn btn-sm btn-icon btn-clear btn-primary" data-modal-toggle="#modal_jadwal" onclick="jadwal(${data.penilaian.id})">
<a class="btn btn-sm btn-icon btn-clear btn-primary" data-modal-toggle="#modal_jadwal" onclick="jadwal(${data.penilaian.id})" title="Buat Jadwal Kunjungan">
<i class="ki-filled ki-calendar-edit"></i>
</a>
`;
} else {
actionHtml += `
<a class="btn btn-sm btn-icon btn-clear btn-warning" href="surveyor/${data.id}/show?form=inspeksi">
<a class="btn btn-sm btn-icon btn-clear btn-warning" href="surveyor/${data.id}/show?form=inspeksi" title="Lihat Form Inspeksi">
<i class="ki-outline ki-eye"></i>
</a>
<button type="button" class="btn btn-sm btn-icon btn-clear btn-info" onclick="freezeInputSurveyor(${data.id})" data-modal-toggle="#modal_freeze">
<button type="button" class="btn btn-sm btn-icon btn-clear btn-info" onclick="freezeInputSurveyor(${data.id})" data-modal-toggle="#modal_freeze" title="Freeze Survey">
<i class="ki-filled ki-arrow-circle-right"></i>
</button>
@@ -212,94 +301,3 @@
</script>
@endpush
<div class="modal" data-modal="true" id="modal_jadwal">
<div class="modal-content modal-center-y max-w-[600px]">
<div class="modal-header">
<h3 class="modal-title">Kunjungan</h3>
<button class="btn btn-xs btn-icon btn-light" data-modal-dismiss="true">
<i class="ki-outline ki-cross"></i>
</button>
</div>
<div class="modal-body">
<form action="{{ route('surveyor.storeJadwal') }}" method="POST" enctype="multipart/form-data"
id="revisiForm">
@method('put')
@csrf
<input id="ids" type="hidden" name="id">
<div class="pl-1 grid gap-2.5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Tanggal Kunjungan</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('waktu_penilaian') border-danger bg-danger-light @enderror"
type="datetime-local" name="waktu_penilaian" value="">
@error('waktu_penilaian')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Catatan</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea id="deskripsi_penilaian"
class="textarea @error('deskripsi_penilaian') border-danger bg-danger-light @enderror" rows="3"
name="deskripsi_penilaian"></textarea>
@error('deskripsi_penilaian')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<div class="modal-footer justify-end mt-2">
<div class="flex gap-4">
<button type="button" class="btn btn-light" data-modal-dismiss="true">Cancel</button>
<button id="btnSubmit" type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="modal" data-modal="true" id="modal_freeze">
<div class="modal-content modal-center-y max-w-[600px]">
<div class="modal-header">
<h3 class="modal-title">Freeze Surveyor</h3>
<button class="btn btn-xs btn-icon btn-light" data-modal-dismiss="true">
<i class="ki-outline ki-cross"></i>
</button>
</div>
<div class="modal-body">
<form action="{{ route('surveyor.storeFreeze') }}" method="POST" enctype="multipart/form-data"
id="freezeSurveyor">
@method('put')
@csrf
<input id="ids" type="hidden" name="id">
<div class="pl-1 grid gap-2.5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Catatan</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea id="deskripsi_penilaian"
class="textarea @error('deskripsi_penilaian') border-danger bg-danger-light @enderror" rows="3"
name="deskripsi_penilaian"></textarea>
@error('deskripsi_penilaian')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<div class="modal-footer justify-end mt-2">
<div class="flex gap-4">
<button type="button" class="btn btn-light" data-modal-dismiss="true">Cancel</button>
<button id="btnSubmit" type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>

View File

@@ -496,6 +496,7 @@
'bentuk-unit' => 'Bentuk unit',
'fasilitas-objek' => 'Fasilitas Umum Dekat Objek',
'foto-objek-jaminan' => 'Foto Objek Jaminan',
'perizinan' => 'Perizinan',
];

View File

@@ -313,6 +313,7 @@ Route::middleware(['auth'])->group(function () {
'bentuk-unit' => 'Bentuk unit',
'fasilitas-objek' => 'Fasilitas Umum Dekat Objek',
'foto-objek-jaminan' => 'Foto Objek Jaminan',
'perizinan' => 'Perizinan'
];