Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender
This commit is contained in:
@@ -383,7 +383,8 @@
|
|||||||
public function bulkDownload()
|
public function bulkDownload()
|
||||||
{
|
{
|
||||||
$dokumenIds = request()->get('jaminan'); // Expecting an array of dokumen_jaminan_id
|
$dokumenIds = request()->get('jaminan'); // Expecting an array of dokumen_jaminan_id
|
||||||
$documents = DetailDokumenJaminan::where('dokumen_jaminan_id', $dokumenIds)->get();
|
$documents = DokumenJaminan::where('id', $dokumenIds)->with(['jenisJaminan', 'detail','debiture'])->get();
|
||||||
|
|
||||||
if ($documents->isEmpty()) {
|
if ($documents->isEmpty()) {
|
||||||
return redirect()->back()->with('error', 'No documents found for the provided IDs.');
|
return redirect()->back()->with('error', 'No documents found for the provided IDs.');
|
||||||
}
|
}
|
||||||
@@ -394,18 +395,24 @@
|
|||||||
|
|
||||||
if ($zip->open($zipFilePath, ZipArchive::CREATE) === true) {
|
if ($zip->open($zipFilePath, ZipArchive::CREATE) === true) {
|
||||||
foreach ($documents as $document) {
|
foreach ($documents as $document) {
|
||||||
if($document->dokumen_jaminan) {
|
$jenisJaminan = $document->debiture->permohonan->nomor_registrasi ?? 'Uncategorized';
|
||||||
$files = is_array(json_decode($document->dokumen_jaminan)) ? json_decode(
|
$folderName = $this->sanitizeFolderName($jenisJaminan);
|
||||||
$document->dokumen_jaminan,
|
|
||||||
) : [$document->dokumen_jaminan];
|
foreach ($document->detail as $detail) {
|
||||||
|
if($detail->dokumen_jaminan) {
|
||||||
|
$folderJaminanName = $this->sanitizeFolderName($detail->jenisLegalitasJaminan->name?? 'Uncategorized');
|
||||||
|
$files = is_array(json_decode($detail->dokumen_jaminan))
|
||||||
|
? json_decode($detail->dokumen_jaminan)
|
||||||
|
: [$detail->dokumen_jaminan];
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$filePath = storage_path('app/public/' . $file);
|
$filePath = storage_path('app/public/' . $file);
|
||||||
if (file_exists($filePath)) {
|
if (file_exists($filePath)) {
|
||||||
$zip->addFile($filePath, basename($filePath));
|
$zip->addFile($filePath, $folderName . '/' .$folderJaminanName.'/'.basename($filePath));
|
||||||
} else {
|
} else {
|
||||||
// Log or display an error message for missing files
|
// Log or display an error message for missing files
|
||||||
return redirect()->back()->with('error', 'File not found: ' . $filePath);
|
\Log::warning('File not found: ' . $filePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -423,7 +430,13 @@
|
|||||||
'Content-Type' => 'application/zip',
|
'Content-Type' => 'application/zip',
|
||||||
'Content-Disposition' => 'attachment; filename="' . $zipFileName . '"',
|
'Content-Disposition' => 'attachment; filename="' . $zipFileName . '"',
|
||||||
'Content-Length' => filesize($zipFilePath),
|
'Content-Length' => filesize($zipFilePath),
|
||||||
])->deleteFileAfterSend(false);
|
])->deleteFileAfterSend(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function sanitizeFolderName($name)
|
||||||
|
{
|
||||||
|
// Remove any characters that are not allowed in folder names
|
||||||
|
return preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -225,6 +225,10 @@
|
|||||||
|
|
||||||
// Get the total count of records
|
// Get the total count of records
|
||||||
$totalRecords = $query->count();
|
$totalRecords = $query->count();
|
||||||
|
$size = $request->get('size', 10);
|
||||||
|
if ($size == 0) {
|
||||||
|
$size = 10;
|
||||||
|
}
|
||||||
|
|
||||||
// Apply pagination if provided
|
// Apply pagination if provided
|
||||||
if ($request->has('page') && $request->has('size')) {
|
if ($request->has('page') && $request->has('size')) {
|
||||||
@@ -239,13 +243,13 @@
|
|||||||
$filteredRecords = $query->count();
|
$filteredRecords = $query->count();
|
||||||
|
|
||||||
// Get the data for the current page
|
// Get the data for the current page
|
||||||
$data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian'])->get();
|
$data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian','penilaian'])->get();
|
||||||
|
|
||||||
// Calculate the page count
|
// Calculate the page count
|
||||||
$pageCount = ceil($totalRecords / $request->get('size'));
|
$pageCount = ceil($totalRecords / $size);
|
||||||
|
|
||||||
// Calculate the current page number
|
// Calculate the current page number
|
||||||
$currentPage = 0 + 1;
|
$currentPage = max(1, $request->get('page', 1));
|
||||||
|
|
||||||
// Return the response data as a JSON object
|
// Return the response data as a JSON object
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|||||||
@@ -4,28 +4,14 @@
|
|||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
|
||||||
// use Modules\Location\Models\City;
|
|
||||||
// use Modules\Location\Models\District;
|
|
||||||
// use Modules\Location\Models\Province;
|
|
||||||
// use Modules\Location\Models\Village;
|
|
||||||
// use Modules\Lpj\Exports\DebitureExport;
|
|
||||||
// use Modules\Lpj\Http\Requests\DebitureRequest;
|
|
||||||
// use Modules\Lpj\Http\Requests\DokumenJaminanRequest;
|
|
||||||
// use Modules\Lpj\Models\Branch;
|
|
||||||
// use Modules\Lpj\Models\Debiture;
|
|
||||||
// use Modules\Lpj\Models\DokumenJaminan;
|
|
||||||
// use Modules\Lpj\Models\JenisJaminan;
|
|
||||||
// use Modules\Lpj\Models\JenisLegalitasJaminan;
|
|
||||||
// use Modules\Lpj\Models\PemilikJaminan;
|
|
||||||
use Modules\Lpj\Models\Permohonan;
|
|
||||||
use Modules\Lpj\Models\JenisPenilaian;
|
|
||||||
use Modules\Lpj\Models\Regions;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use Modules\Lpj\Models\JenisPenilaian;
|
||||||
|
use Modules\Lpj\Models\Permohonan;
|
||||||
|
use Modules\Lpj\Models\Regions;
|
||||||
|
|
||||||
class RegistrasiController extends Controller
|
class RegistrasiController extends Controller
|
||||||
{
|
{
|
||||||
@@ -43,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve data from the database
|
// Retrieve data from the database
|
||||||
$query = Permohonan::query()->where('status','=','preregister');
|
$query = Permohonan::query()->where('status', '=', 'preregister');
|
||||||
|
|
||||||
// Apply search filter if provided
|
// Apply search filter if provided
|
||||||
if ($request->has('search') && !empty($request->get('search'))) {
|
if ($request->has('search') && !empty($request->get('search'))) {
|
||||||
@@ -107,44 +93,44 @@
|
|||||||
return view('lpj::registrasi.edit', compact('id'));
|
return view('lpj::registrasi.edit', compact('id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setData(Request $request): JsonResponse
|
public function setData(Request $request)
|
||||||
{
|
: JsonResponse {
|
||||||
$data = array();
|
$data = [];
|
||||||
$datas = array();
|
$datas = [];
|
||||||
|
|
||||||
if (request()->ajax()) {
|
if (request()->ajax()) {
|
||||||
$id = $request->id;
|
$id = $request->id;
|
||||||
$datas = Permohonan::find($id);
|
$datas = Permohonan::find($id);
|
||||||
|
|
||||||
if ($datas) {
|
if ($datas) {
|
||||||
$jenisPenilaians=null;
|
$jenisPenilaians = null;
|
||||||
$regions=null;
|
$regions = null;
|
||||||
$regions=Regions::pluck('name', 'id');
|
$regions = Regions::pluck('name', 'id');
|
||||||
$jenisPenilaians=JenisPenilaian::pluck('name', 'id');
|
$jenisPenilaians = JenisPenilaian::pluck('name', 'id');
|
||||||
|
|
||||||
$data['status'] = 'success';
|
$data['status'] = 'success';
|
||||||
$data['regions'] = $regions;
|
$data['regions'] = $regions;
|
||||||
$data['jenisPenilaians'] = $jenisPenilaians;
|
$data['jenisPenilaians'] = $jenisPenilaians;
|
||||||
$data['datas'] = $datas;
|
$data['datas'] = $datas;
|
||||||
$data['message'] ['message_success'] = array("data successfully found");
|
$data['message'] ['message_success'] = ["data successfully found"];
|
||||||
} else {
|
} else {
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
$data['datas'] = null;
|
$data['datas'] = null;
|
||||||
$data['message'] ['message_data'] = array("data not found");
|
$data['message'] ['message_data'] = ["data not found"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
$data['message'] ['message_ajax'] = array("no ajax request");
|
$data['message'] ['message_ajax'] = ["no ajax request"];
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json($data);
|
return response()->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(Request $request, $id): JsonResponse
|
public function update(Request $request, $id)
|
||||||
{
|
: JsonResponse {
|
||||||
// init
|
// init
|
||||||
$data = array();
|
$data = [];
|
||||||
$dataku = array();
|
$dataku = [];
|
||||||
$tindakan = null;
|
$tindakan = null;
|
||||||
if (request()->ajax()) {
|
if (request()->ajax()) {
|
||||||
$validator = RegistrasiController::rulesEditnya($request, $id);
|
$validator = RegistrasiController::rulesEditnya($request, $id);
|
||||||
@@ -152,61 +138,54 @@
|
|||||||
if ($validator['fails']) {
|
if ($validator['fails']) {
|
||||||
$data['message'] = $validator['errors'];
|
$data['message'] = $validator['errors'];
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
|
$tindakan = $request->tindakan;
|
||||||
$tindakan=$request->tindakan;
|
$dataku = [
|
||||||
$dataku = ['registrasi_by' => Auth::id(),
|
'registrasi_by' => Auth::id(),
|
||||||
'registrasi_at' => now()
|
'registrasi_at' => now(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if($tindakan==0)
|
if ($tindakan == 0) {
|
||||||
{
|
$dataku['jenis_penilaian_id'] = $request->jenis_penilaian;
|
||||||
$dataku['jenis_penilaian_id'] =$request->jenis_penilaian;
|
$dataku['region_id'] = $request->region;
|
||||||
$dataku['region_id'] =$request->region;
|
|
||||||
$dataku['status'] = 'registered';
|
$dataku['status'] = 'registered';
|
||||||
if($request->catatan2)
|
if ($request->catatan2) {
|
||||||
$dataku['registrasi_catatan'] =$request->catatan2;
|
$dataku['registrasi_catatan'] = $request->catatan2;
|
||||||
}
|
}
|
||||||
else
|
} else {
|
||||||
{
|
$dataku['registrasi_catatan'] = $request->catatan;
|
||||||
$dataku['registrasi_catatan'] =$request->catatan;
|
|
||||||
$dataku['status'] = 'revisi';
|
$dataku['status'] = 'revisi';
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['dataku'] =$dataku;
|
$data['dataku'] = $dataku;
|
||||||
|
|
||||||
$modal = Permohonan::find($id);
|
$modal = Permohonan::find($id);
|
||||||
|
|
||||||
$modal->update($dataku);
|
$modal->update($dataku);
|
||||||
//
|
//
|
||||||
$data['status'] = 'success';
|
$data['status'] = 'success';
|
||||||
$data['message'] ['message_success'] = array('Regitrasi '.$modal->nomor_registrasi.' successfully');
|
$data['message'] ['message_success'] = ['Regitrasi ' . $modal->nomor_registrasi . ' successfully'];
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
$data['message'] ['message_try_catch'] = array('Regitrasi updated failed.');
|
$data['message'] ['message_try_catch'] = ['Regitrasi updated failed.'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
$data['message'] ['message_ajax'] = array("no ajax request");
|
$data['message'] ['message_ajax'] = ["no ajax request"];
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json($data);
|
return response()->json($data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rulesEditnya($request, $id)
|
public function rulesEditnya($request, $id)
|
||||||
{
|
{
|
||||||
$tindakan=null;
|
$tindakan = null;
|
||||||
$jenis_penilaian=null;
|
$jenis_penilaian = null;
|
||||||
$validate_catatan='';
|
$validate_catatan = '';
|
||||||
$tindakan=$request->tindakan;
|
$tindakan = $request->tindakan;
|
||||||
$jenis_penilaian=$request->jenis_penilaian;
|
$jenis_penilaian = $request->jenis_penilaian;
|
||||||
|
|
||||||
$validateIt = [
|
$validateIt = [
|
||||||
// 'name' diambil dari definisi parameter yang di kirim pada POST Data
|
// 'name' diambil dari definisi parameter yang di kirim pada POST Data
|
||||||
@@ -214,25 +193,21 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
$messageIt = [
|
$messageIt = [
|
||||||
'tindakan.required' => 'Silahkan pilih Tindakan'
|
'tindakan.required' => 'Silahkan pilih Tindakan',
|
||||||
];
|
];
|
||||||
|
|
||||||
if($tindakan==0)
|
if ($tindakan == 0) {
|
||||||
{
|
|
||||||
$validateIt['jenis_penilaian'] = ['required'];
|
$validateIt['jenis_penilaian'] = ['required'];
|
||||||
$messageIt ['jenis_penilaian.required']= 'Silahkan pilih Jenis Penilaian';
|
$messageIt ['jenis_penilaian.required'] = 'Silahkan pilih Jenis Penilaian';
|
||||||
|
|
||||||
// INTERNAL
|
// INTERNAL
|
||||||
if(1==$jenis_penilaian)
|
if (1 == $jenis_penilaian) {
|
||||||
{
|
|
||||||
$validateIt['region'] = ['required'];
|
$validateIt['region'] = ['required'];
|
||||||
$messageIt ['region.required']= 'Silahkan pilih Region';
|
$messageIt ['region.required'] = 'Silahkan pilih Region';
|
||||||
}
|
}
|
||||||
}
|
} elseif ($tindakan == 1) {
|
||||||
elseif($tindakan==1)
|
|
||||||
{
|
|
||||||
$validateIt['catatan'] = ['required'];
|
$validateIt['catatan'] = ['required'];
|
||||||
$messageIt ['catatan.required']= 'Silahkan isi Catatan';
|
$messageIt ['catatan.required'] = 'Silahkan isi Catatan';
|
||||||
}
|
}
|
||||||
|
|
||||||
$validator = Validator::make($request->all(), $validateIt, $messageIt);
|
$validator = Validator::make($request->all(), $validateIt, $messageIt);
|
||||||
@@ -246,7 +221,7 @@
|
|||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
$permohonan = Permohonan::find($id);
|
$permohonan = Permohonan::find($id);
|
||||||
return view('lpj::registrasi.show', compact('id','permohonan'));
|
return view('lpj::registrasi.show', compact('id', 'permohonan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -19,75 +19,50 @@ class FormSurveyorRequest extends FormRequest
|
|||||||
*/
|
*/
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
$commonRules = $this->getBangunanRules();
|
|
||||||
$actionSpecificRules = $this->getActionSpecificRules();
|
$actionSpecificRules = $this->getActionSpecificRules();
|
||||||
|
|
||||||
return array_merge($commonRules, $actionSpecificRules);
|
|
||||||
return $actionSpecificRules;
|
return $actionSpecificRules;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get common rules that apply to all actions.
|
|
||||||
*/
|
|
||||||
private function getCommonRules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'fakta_positif' => 'nullable|array',
|
|
||||||
'fakta_negatif' => 'nullable|array',
|
|
||||||
'rute_menuju' => 'nullable',
|
|
||||||
'batas_batas' => 'nullable|array',
|
|
||||||
'kondisi_linkungan' => 'nullable|array',
|
|
||||||
'kondisi_lain_bangunan' => 'nullable|array',
|
|
||||||
'informasi_dokument' => 'nullable',
|
|
||||||
'peruntukan' => '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',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get rules specific to the action.
|
* Get rules specific to the action.
|
||||||
*/
|
*/
|
||||||
private function getActionSpecificRules(): array
|
private function getActionSpecificRules(): array
|
||||||
{
|
{
|
||||||
$action = $this->input('action');
|
$action = $this->input('action');
|
||||||
|
$pisah = explode(',', $action);
|
||||||
|
|
||||||
switch ($action) {
|
$allRules = [
|
||||||
case 'tanah':
|
'tanah' => $this->getTanahRules(),
|
||||||
return $this->getTanahRules();
|
'bangunan' => $this->getBangunanRules(),
|
||||||
case 'unit':
|
'kapal' => $this->getKapalRules(),
|
||||||
return $this->getUnitRules();
|
'kendaraan' => $this->getKendaraanRules(),
|
||||||
case 'kapal':
|
'mesin' => $this->getMesinRules(),
|
||||||
return $this->getUnitRules();
|
'pesawat' => $this->getLinkunganRules(),
|
||||||
case 'kendaraan':
|
'alat-berat' => $this->getLinkunganRules(),
|
||||||
return $this->getUnitRules();
|
'apartemen-kantor' => $this->getUnitRules(),
|
||||||
case 'mesin':
|
'lingkungan' => $this->getLinkunganRules(),
|
||||||
return $this->getUnitRules();
|
'fakta' => $this->getCommonRules(),
|
||||||
case 'bangunan':
|
];
|
||||||
return $this->getTanahBangunanRules();
|
|
||||||
case 'tanah_bangunan':
|
|
||||||
return array_merge($this->getAssetDescriptionRules(),$this->getTanahRules(), $this->getBangunanRules(), $this->getLinkunganRules(), $this->getCommonRules());
|
|
||||||
|
|
||||||
case 'alat-berat':
|
$rules = [];
|
||||||
return $this->getUnitRules();
|
$hasAssetDescriptionRules = false;
|
||||||
default:
|
|
||||||
return [];
|
foreach ($pisah as $act) {
|
||||||
|
if (isset($allRules[$act])) {
|
||||||
|
$rules = array_merge($rules, $allRules[$act]);
|
||||||
|
if ($act == 'tanah' || $act == 'bangunan') {
|
||||||
|
$hasAssetDescriptionRules = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($hasAssetDescriptionRules) {
|
||||||
|
$rules = array_merge($rules, $this->getAssetDescriptionRules());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $rules;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Get rules specific to tanah action.
|
* Get rules specific to tanah action.
|
||||||
*/
|
*/
|
||||||
@@ -164,7 +139,7 @@ class FormSurveyorRequest extends FormRequest
|
|||||||
'jarak_cbd_point' => 'nullable',
|
'jarak_cbd_point' => 'nullable',
|
||||||
'nama_cbd_point' => 'nullable',
|
'nama_cbd_point' => 'nullable',
|
||||||
'lebar_perkerasan_jalan' => 'nullable',
|
'lebar_perkerasan_jalan' => 'nullable',
|
||||||
'perkerasan_jalan' => 'nullable',
|
'perkerasan_jalan.*' => 'nullable',
|
||||||
'lalu_lintas' => 'nullable',
|
'lalu_lintas' => 'nullable',
|
||||||
'gol_mas_sekitar' => 'nullable',
|
'gol_mas_sekitar' => 'nullable',
|
||||||
'tingkat_keramaian' => 'nullable',
|
'tingkat_keramaian' => 'nullable',
|
||||||
@@ -223,7 +198,7 @@ class FormSurveyorRequest extends FormRequest
|
|||||||
|
|
||||||
|
|
||||||
private function getAssetDescriptionRules(): array
|
private function getAssetDescriptionRules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'permohonan_id' => 'required',
|
'permohonan_id' => 'required',
|
||||||
'type' => 'required',
|
'type' => 'required',
|
||||||
@@ -240,7 +215,40 @@ class FormSurveyorRequest extends FormRequest
|
|||||||
'kordinat_lng' => 'nullable',
|
'kordinat_lng' => 'nullable',
|
||||||
'kordinat_lat' => 'nullable',
|
'kordinat_lat' => 'nullable',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get common rules that apply to all actions.
|
||||||
|
*/
|
||||||
|
private function getCommonRules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'fakta_positif' => 'nullable|array',
|
||||||
|
'fakta_negatif' => 'nullable|array',
|
||||||
|
'rute_menuju' => 'nullable',
|
||||||
|
'batas_batas' => 'nullable|array',
|
||||||
|
'kondisi_lingkungan' => 'nullable|array',
|
||||||
|
'kondisi_lain_bangunan' => 'nullable|array',
|
||||||
|
'informasi_dokument' => 'nullable',
|
||||||
|
'peruntukan' => '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',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
'name' => 'required|max:255',
|
'name' => 'required|max:255',
|
||||||
'slug' => 'required|max:255',
|
'slug' => 'required|max:255',
|
||||||
'jenis_legalitas_jaminan_id' => 'nullable',
|
'jenis_legalitas_jaminan_id' => 'nullable',
|
||||||
|
'form_kategori.*' => 'required',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,4 +60,8 @@
|
|||||||
return $this->hasMany(DokumenJaminan::class);
|
return $this->hasMany(DokumenJaminan::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function permohonan(){
|
||||||
|
return $this->hasOne(Permohonan::class, 'debiture_id', 'id' );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,17 @@ class Inspeksi extends Model
|
|||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*/
|
*/
|
||||||
protected $fillable = ['data_form', 'foto_form', 'denah_form','permohonan_id', 'name', 'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_by', 'updated_by', 'deleted_by'];
|
protected $fillable = ['data_form', 'foto_form', 'denah_form','permohonan_id', 'name', 'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_by', 'updated_by', 'deleted_by','jenis_jaminan_id'];
|
||||||
|
|
||||||
|
public function permohonan()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Permohonan::class, 'permohonan_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function jenis_jaminan()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(JenisJaminan::class, 'jenis_jaminan_id');
|
||||||
|
}
|
||||||
|
|
||||||
// protected static function newFactory(): InspeksiFactory
|
// protected static function newFactory(): InspeksiFactory
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ namespace Modules\Lpj\Models;
|
|||||||
class JenisJaminan extends Base
|
class JenisJaminan extends Base
|
||||||
{
|
{
|
||||||
protected $table = 'jenis_jaminan';
|
protected $table = 'jenis_jaminan';
|
||||||
protected $fillable = ['code', 'name', 'slug', 'jenis_legalitas_jaminan_id'];
|
protected $fillable = ['code', 'name', 'slug', 'jenis_legalitas_jaminan_id', 'form_kategori'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class Penilaian extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'jenis_penilaian_id', 'penilaian_id', 'tanggal_kunjungan', 'keterangan','nomor_registrasi',
|
'jenis_penilaian_id', 'penilaian_id', 'tanggal_kunjungan', 'keterangan','nomor_registrasi',
|
||||||
'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_at',
|
'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_at',
|
||||||
'created_by', 'updated_at', 'updated_by', 'deleted_at', 'deleted_by'
|
'created_by', 'updated_at', 'updated_by', 'deleted_at', 'deleted_by','waktu_penilaian', 'deskripsi_penilaian'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function jenis_penilaian()
|
public function jenis_penilaian()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace Modules\Lpj\Models;
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
use Modules\Lpj\Database\Factories\PermohonanFactory;
|
use Modules\Lpj\Database\Factories\PermohonanFactory;
|
||||||
|
use Modules\Lpj\Services\PermohonanHistoryService;
|
||||||
use Modules\Usermanagement\Models\User;
|
use Modules\Usermanagement\Models\User;
|
||||||
|
|
||||||
class Permohonan extends Base
|
class Permohonan extends Base
|
||||||
@@ -38,8 +39,66 @@ class Permohonan extends Base
|
|||||||
'registrasi_at',
|
'registrasi_at',
|
||||||
'jenis_penilaian_id',
|
'jenis_penilaian_id',
|
||||||
'region_id',
|
'region_id',
|
||||||
|
'attachment'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected static function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
|
||||||
|
static::creating(function ($permohonan) {
|
||||||
|
static::handleFileUpload($permohonan);
|
||||||
|
});
|
||||||
|
|
||||||
|
static::updating(function ($permohonan) {
|
||||||
|
static::handleFileUpload($permohonan);
|
||||||
|
});
|
||||||
|
|
||||||
|
static::created(function ($permohonan) {
|
||||||
|
static::createHistory($permohonan, 'created');
|
||||||
|
});
|
||||||
|
|
||||||
|
static::updated(function ($permohonan) {
|
||||||
|
static::createHistory($permohonan, 'updated');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function handleFileUpload($permohonan)
|
||||||
|
{
|
||||||
|
if (request()->hasFile('attachment')) {
|
||||||
|
$file = request()->file('attachment');
|
||||||
|
$fileName = time() . '_' . $file->getClientOriginalName();
|
||||||
|
$filePath = $file->storeAs('permohonan_attachments', $fileName, 'public');
|
||||||
|
|
||||||
|
// Delete old file if it exists
|
||||||
|
if ($permohonan->attachment) {
|
||||||
|
Storage::disk('public')->delete($permohonan->attachment);
|
||||||
|
}
|
||||||
|
|
||||||
|
$permohonan->attachment = $filePath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function createHistory($permohonan, $action)
|
||||||
|
{
|
||||||
|
$historyService = app(PermohonanHistoryService::class);
|
||||||
|
|
||||||
|
$status = $permohonan->status;
|
||||||
|
$keterangan = request()->input('keterangan'); // Get keterangan from request
|
||||||
|
$beforeRequest = $action === 'updated' ? $permohonan->getOriginal() : [];
|
||||||
|
$afterRequest = $permohonan->toArray();
|
||||||
|
$file = $permohonan->attachment ? Storage::disk('public')->path($permohonan->attachment) : null;
|
||||||
|
|
||||||
|
$historyService->createHistory(
|
||||||
|
$permohonan,
|
||||||
|
$status,
|
||||||
|
$keterangan,
|
||||||
|
$beforeRequest,
|
||||||
|
$afterRequest,
|
||||||
|
$file
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(User::class);
|
return $this->belongsTo(User::class);
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?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::table('jenis_jaminan', function (Blueprint $table) {
|
||||||
|
$table->json('form_kategori')->after('slug')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('jenis_jaminan', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('form_kategori');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?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::table('penilaian', function (Blueprint $table) {
|
||||||
|
$table->datetime('waktu_penilaian')->nullable();
|
||||||
|
$table->text('deskripsi_penilaian')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('penilaian', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('waktu_penilaian');
|
||||||
|
$table->dropColumn('deskripsi_penilaian');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?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::table('inspeksi', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('jenis_jaminan_id')->nullable()->after('permohonan_id');
|
||||||
|
$table->foreign('jenis_jaminan_id')->references('id')->on('jenis_jaminan')->onDelete('cascade');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('inspeksi', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('jenis_jaminan_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,3 +1,164 @@
|
|||||||
|
<div class="card {{ isset($hidePermohonan) ? 'hidden' : '' }}">
|
||||||
|
<div class="card-header" id="advanced_settings_appearance">
|
||||||
|
<h3 class="card-title">
|
||||||
|
Data Permohonan
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<a href="{{ route($backLink) }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body lg:py-7.5 grid grid-cols-3">
|
||||||
|
<div class="mb-5">
|
||||||
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
|
Nomor Register Permohonan:
|
||||||
|
</h3>
|
||||||
|
<span class="text-2sm text-gray-700">
|
||||||
|
{{ $permohonan->nomor_registrasi }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
|
Pemohon:
|
||||||
|
</h3>
|
||||||
|
<span class="text-2sm text-gray-700">
|
||||||
|
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
|
Tujan Permohonan:
|
||||||
|
</h3>
|
||||||
|
<span class="text-2sm text-gray-700">
|
||||||
|
{{ $permohonan->tujuanPenilaian->name }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
|
Nilai Plafond:
|
||||||
|
</h3>
|
||||||
|
<span class="text-2sm text-gray-700">
|
||||||
|
{{ $permohonan->nilaiPlafond->name }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
|
Status Bayar:
|
||||||
|
</h3>
|
||||||
|
<span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
||||||
|
{{ str_replace('_',' ',$permohonan->status_bayar) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
|
Nilai NJOP:
|
||||||
|
</h3>
|
||||||
|
<span class="text-md font-bold uppercase">
|
||||||
|
{{ formatRupiah($permohonan->niilai_njop) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card min-w-full">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">
|
||||||
|
Detail Debitur
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-table scrollable-x-auto pb-3">
|
||||||
|
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
||||||
|
<div class="col-span-1">
|
||||||
|
<table class="table align-middle text-sm text-gray-500">
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 text-gray-600 font-normal">
|
||||||
|
Name
|
||||||
|
</td>
|
||||||
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||||
|
{{ $permohonan->debiture->name ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-3">
|
||||||
|
Email
|
||||||
|
</td>
|
||||||
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||||
|
{{ $permohonan->debiture->email ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-3">
|
||||||
|
Phone
|
||||||
|
</td>
|
||||||
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||||
|
{{ $permohonan->debiture->phone ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="py-3 text-gray-600 font-normal">
|
||||||
|
Address
|
||||||
|
</td>
|
||||||
|
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||||
|
{{ $permohonan->debiture->address ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-3 text-gray-600 font-normal">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||||
|
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-1">
|
||||||
|
<table class="table align-middle text-sm text-gray-500">
|
||||||
|
<tr>
|
||||||
|
<td class="py-3 text-gray-600 font-normal">
|
||||||
|
Cabang
|
||||||
|
</td>
|
||||||
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||||
|
{{ $permohonan->debiture->branch->name ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-3 text-gray-600 font-normal">
|
||||||
|
CIF
|
||||||
|
</td>
|
||||||
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||||
|
{{ $permohonan->debiture->cif ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-3 text-gray-600 font-normal">
|
||||||
|
Nomor Rekening
|
||||||
|
</td>
|
||||||
|
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||||
|
{{ $permohonan->debiture->nomor_rekening ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-3">
|
||||||
|
NPWP
|
||||||
|
</td>
|
||||||
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||||
|
{{ $permohonan->debiture->npwp ?? "" }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card min-w-full">
|
<div class="card min-w-full">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">
|
||||||
|
|||||||
@@ -66,6 +66,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Form Kategori</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('form_kategori') border-danger bg-danger-light @enderror select2"
|
||||||
|
name="form_kategori[]" multiple="multiple">
|
||||||
|
|
||||||
|
<option value="">Pilih Form</option>
|
||||||
|
@foreach (['tanah', 'bangunan', 'kapal', 'kendaraan', 'mesin', 'pesawat', 'alat-berat', 'apartemen-kantor','lingkungan', 'fakta'] as $item)
|
||||||
|
<option value="{{ $item }}"
|
||||||
|
@if (isset($jenisJaminan->form_kategori) && in_array($item, json_decode($jenisJaminan->form_kategori, true))) {{ 'selected' }} @endif>
|
||||||
|
{{ $item }}
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
@error('form_kategori')
|
||||||
|
<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">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
Jenis Legalitas Jaminan
|
Jenis Legalitas Jaminan
|
||||||
|
|||||||
@@ -22,145 +22,7 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
<div class="card">
|
@include('lpj::component.detail-jaminan',['backLink' => 'penilaian.index'])
|
||||||
<div class="card-header" id="advanced_settings_appearance">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Data Permohonan
|
|
||||||
</h3>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<a href="{{ route('penilaian.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i>
|
|
||||||
Back</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-body lg:py-7.5 grid grid-cols-3">
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Nomor Register Permohonan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->nomor_registrasi }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Pemohon:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Tujan Permohonan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->tujuanPenilaian->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card min-w-full">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Detail Debutur
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-table scrollable-x-auto pb-3">
|
|
||||||
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 text-gray-600 font-normal">
|
|
||||||
Name
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->name ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Email
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->email ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Phone
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->phone ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Address
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->address ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->village->name ?? '' }},
|
|
||||||
{{ $permohonan->debiture->district->name ?? '' }},
|
|
||||||
{{ $permohonan->debiture->city->name ?? '' }},
|
|
||||||
{{ $permohonan->debiture->province->name ?? '' }} -
|
|
||||||
{{ $permohonan->debiture->village->postal_code ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Cabang
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->branch->name ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
CIF
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->cif ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Nomor Rekening
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->nomor_rekening ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
NPWP
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->npwp ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('lpj::component.detail-jaminan')
|
|
||||||
|
|
||||||
<div class="card pb-2.5">
|
<div class="card pb-2.5">
|
||||||
<div class="card-header" id="basic_settings">
|
<div class="card-header" id="basic_settings">
|
||||||
|
|||||||
@@ -6,155 +6,7 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
<div class="card">
|
@include('lpj::component.detail-jaminan',['backLink' => 'authorization.index'])
|
||||||
<div class="card-header" id="advanced_settings_appearance">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Data Permohonan
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body lg:py-7.5 grid grid-cols-3">
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Nomor Register Permohonan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->nomor_registrasi }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Pemohon:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Tujan Permohonan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->tujuanPenilaian->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Nilai Plafond:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->nilaiPlafond->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Status Bayar:
|
|
||||||
</h3>
|
|
||||||
<span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
|
||||||
{{ str_replace('_',' ',$permohonan->status_bayar) }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card min-w-full">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Detail Debutur
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-table scrollable-x-auto pb-3">
|
|
||||||
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 text-gray-600 font-normal">
|
|
||||||
Name
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->name ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Email
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->email ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Phone
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->phone ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Address
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->address ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Cabang
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->branch->name ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
CIF
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->cif ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Nomor Rekening
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->nomor_rekening ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
NPWP
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->npwp ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('lpj::component.detail-jaminan')
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form action="{{ route('authorization.update', $permohonan->id) }}" method="POST" id="authorizationForm">
|
<form action="{{ route('authorization.update', $permohonan->id) }}" method="POST" id="authorizationForm">
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
debitur_id: {
|
debitur_id: {
|
||||||
title: 'Debitur',
|
title: 'Debitur',
|
||||||
render: (item, data) => {
|
render: (item, data) => {
|
||||||
if(data.debiture) {
|
if (data.debiture) {
|
||||||
return `${data.debiture.name}`;
|
return `${data.debiture.name}`;
|
||||||
}
|
}
|
||||||
return "-";
|
return "-";
|
||||||
@@ -183,13 +183,25 @@
|
|||||||
actions: {
|
actions: {
|
||||||
title: 'Actions',
|
title: 'Actions',
|
||||||
render: (item, data) => {
|
render: (item, data) => {
|
||||||
var actionHtml = `
|
let actionHtml = `<div class="flex flex-nowrap justify-center gap-1.5">`;
|
||||||
<div class="flex flex-nowrap justify-center gap-1.5">`;
|
|
||||||
if(data.status !== 'order'){
|
if (data && data.penilaian && data.penilaian.waktu_penilaian !== null && data.status !==
|
||||||
actionHtml += `<a class="btn btn-sm btn-outline btn-success" href="permohonan/${data.id}">
|
'done') {
|
||||||
<i class="ki-filled ki-document"></i>
|
actionHtml += `
|
||||||
</a>`;
|
<a class="btn btn-sm btn-outline btn-primary" href="surveyor/storeAproved/${data.penilaian.id}">
|
||||||
|
<i class="ki-filled ki-calendar-edit"></i>
|
||||||
|
</a>
|
||||||
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.status !== 'order') {
|
||||||
|
actionHtml += `
|
||||||
|
<a class="btn btn-sm btn-outline btn-success" href="permohonan/${data.id}">
|
||||||
|
<i class="ki-filled ki-document"></i>
|
||||||
|
</a>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
actionHtml += `
|
actionHtml += `
|
||||||
<a class="btn btn-sm btn-outline btn-info" href="permohonan/${data.id}/edit">
|
<a class="btn btn-sm btn-outline btn-info" href="permohonan/${data.id}/edit">
|
||||||
<i class="ki-outline ki-notepad-edit"></i>
|
<i class="ki-outline ki-notepad-edit"></i>
|
||||||
@@ -214,3 +226,4 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
|||||||
@@ -6,173 +6,7 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
<div class="flex gap-5 flex-row w-full">
|
@include('lpj::component.detail-jaminan',['backLink' => 'prmohonan.index'])
|
||||||
<div class="card flex-1">
|
|
||||||
<div class="card-header" id="advanced_settings_appearance">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Data Permohonan
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body lg:py-7.5 grid grid-cols-3">
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Nomor Register Permohonan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->nomor_registrasi }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Pemohon:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Tujan Permohonan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->tujuanPenilaian->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card flex-1">
|
|
||||||
<div class="card-header" id="advanced_settings_appearance">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Fasilitas Kredit
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-body lg:py-7.5 grid grid-cols-3">
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Jenis Fasilitas
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->jenisFasilitasKredit->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Nilai Plafond:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->nilaiPlafond->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Nilai NJOP:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->nilai_njop }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card min-w-full">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Detail Debutur
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-table scrollable-x-auto pb-3">
|
|
||||||
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 text-gray-600 font-normal">
|
|
||||||
Name
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->name ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Email
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->email ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Phone
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->phone ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Address
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->address ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Cabang
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->branch->name ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
CIF
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->cif ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Nomor Rekening
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->nomor_rekening ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
NPWP
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->npwp ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@include('lpj::component.detail-jaminan')
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form action="{{ route('permohonan.print', $permohonan->id) }}" method="GET">
|
<form action="{{ route('permohonan.print', $permohonan->id) }}" method="GET">
|
||||||
|
|||||||
@@ -10,185 +10,14 @@
|
|||||||
@endphp
|
@endphp
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
<div class="card">
|
|
||||||
<div class="card-header" id="advanced_settings_appearance">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Data Permohonan
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="flex items-center gap-2">
|
@include('lpj::component.detail-jaminan',['backLink' => 'registrasi.index'])
|
||||||
<a href="{{ route('registrasi.edit', $id) }}" class="btn btn-xs btn-primary hidden" title="Register"><i class="ki-filled ki-arrow-circle-right"></i> Registrasi</a>
|
|
||||||
<a href="{{ route('registrasi.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-body lg:py-7.5 grid grid-cols-3">
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Nomor Register Permohonan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->nomor_registrasi }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Pemohon:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Tujan Permohonan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $permohonan->tujuanPenilaian->name }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card min-w-full">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Detail Debutur
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-table scrollable-x-auto pb-3">
|
|
||||||
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 text-gray-600 font-normal">
|
|
||||||
Name
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->name ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Email
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->email ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Phone
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->phone ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Address
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->address ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Cabang
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->branch->name ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
CIF
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->cif ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Nomor Rekening
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->nomor_rekening ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
NPWP
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->npwp ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('lpj::component.detail-jaminan')
|
|
||||||
|
|
||||||
<div class="card min-w-full">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Data Biaya
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="card-table scrollable-x-auto pb-3">
|
|
||||||
<div class="grid grid-cols-1 xl:grid-cols-1 gap-5 lg:gap-7.5">
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td width="10%" class="py-2 text-gray-600 font-normal">
|
|
||||||
Status Bayar
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ strtoupper(str_replace('_',' ',$permohonan->status_bayar)) }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Nilai NJOP
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->nilai_njop }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card pb-2.5">
|
<div class="card pb-2.5">
|
||||||
<div class="card-header" id="basic_settings">
|
<div class="card-header" id="basic_settings">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">
|
||||||
Registrasi
|
Registrasi
|
||||||
</h3>
|
</h3>
|
||||||
<div class="flex items-center gap-2 hidden">
|
|
||||||
<a href="{{ route('registrasi.show', $id) }}" class="btn btn-xs btn-primary" title="Detail"><i class="ki-filled ki-abstract-26"></i> Detail</a>
|
|
||||||
<a href="{{ route('registrasi.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body lg:py-7.5">
|
<div class="card-body lg:py-7.5">
|
||||||
<form id="{{$route[0]}}_form" name="{{$route[0]}}_form" method="POST">
|
<form id="{{$route[0]}}_form" name="{{$route[0]}}_form" method="POST">
|
||||||
|
|||||||
@@ -48,103 +48,37 @@
|
|||||||
{{ $permohonan->tujuanPenilaian->name }} {!! $permohonan->dokumen !!}
|
{{ $permohonan->tujuanPenilaian->name }} {!! $permohonan->dokumen !!}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card min-w-full">
|
<div class="mb-5">
|
||||||
<div class="card-header">
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
<h3 class="card-title">
|
Nilai Plafond:
|
||||||
Detail Debutur
|
|
||||||
</h3>
|
</h3>
|
||||||
|
<span class="text-2sm text-gray-700">
|
||||||
|
{{ $permohonan->nilaiPlafond->name }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-table scrollable-x-auto pb-3">
|
|
||||||
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 text-gray-600 font-normal">
|
|
||||||
Name
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->name ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Email
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->email ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
Phone
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->phone ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<div class="mb-5">
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
Address
|
Status Bayar:
|
||||||
</td>
|
</h3>
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
<span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
||||||
{{ $permohonan->debiture->address ?? "" }}
|
{{ str_replace('_',' ',$permohonan->status_bayar) }}
|
||||||
</td>
|
</span>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="col-span-1">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Cabang
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->branch->name ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
CIF
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $permohonan->debiture->cif ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 text-gray-600 font-normal">
|
|
||||||
Nomor Rekening
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
||||||
{{ $permohonan->debiture->nomor_rekening ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3">
|
|
||||||
NPWP
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $permohonan->debiture->npwp ?? "" }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<h3 class="text-md font-medium text-gray-900">
|
||||||
|
Nilai NJOP:
|
||||||
|
</h3>
|
||||||
|
<span class="text-md font-bold uppercase">
|
||||||
|
{{ formatRupiah($permohonan->niilai_njop) }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include('lpj::component.detail-jaminan')
|
@include('lpj::component.detail-jaminan',['backLink' => 'registrasifinal.index','hidePermohonan'=>true])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -17,12 +17,12 @@
|
|||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||||
<input type="radio" class="radio" name="luas" value="sesuai"
|
<input type="radio" class="radio" name="luas_unit" value="sesuai"
|
||||||
{{ old('luas', isset($analisa) && optional($analisa)->luas) == 'sesuai' ? 'checked' : '' }}>
|
{{ old('luas', isset($analisa) && optional($analisa)->luas) == 'sesuai' ? 'checked' : '' }}>
|
||||||
<span class="ml-2">Sesuai</span>
|
<span class="ml-2">Sesuai</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input type="radio" class="radio" name="luas" value="tidak sesuai"
|
<input type="radio" class="radio" name="luas_unit" value="tidak sesuai"
|
||||||
{{ old('luas', isset($analisa) && optional($analisa)->luas) == 'tidak sesuai' ? 'checked' : '' }}>
|
{{ old('luas', isset($analisa) && optional($analisa)->luas) == 'tidak sesuai' ? 'checked' : '' }}>
|
||||||
<span class="ml-2">Tidak Sesuai</span>
|
<span class="ml-2">Tidak Sesuai</span>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
|
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="">
|
<div class="">
|
||||||
@@ -34,10 +33,8 @@
|
|||||||
@foreach ($jenisBangunan as $item)
|
@foreach ($jenisBangunan as $item)
|
||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="jenis_bangunan[]" type="checkbox"
|
<input class="checkbox" name="jenis_bangunan[]" type="checkbox"
|
||||||
|
value="{{ $item->name }}"
|
||||||
value="{{ $item->name }}" {{
|
{{ old('jenis_bangunan') == $item->name || isset($forminspeksi['jenis_bangunan']) == $item->name ? 'checked' : '' }} />
|
||||||
old('jenis_bangunan') == $item->name || isset($forminspeksi['jenis_bangunan']) == $item->name ? 'checked' : ''
|
|
||||||
}}/>
|
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@if (strcasecmp($item->name, 'lainnya') == 0)
|
@if (strcasecmp($item->name, 'lainnya') == 0)
|
||||||
@@ -47,8 +44,8 @@
|
|||||||
value="{{ $item->name }}" />
|
value="{{ $item->name }}" />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="jenis_bangunan" class="input mt-2" id="bentukTanahInput"
|
<input type="text" name="jenis_bangunan" class="input mt-2"
|
||||||
placeholder="Masukkan Jenis Bangunan...">
|
id="bentukTanahInput" placeholder="Masukkan Jenis Bangunan...">
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -69,18 +66,20 @@
|
|||||||
@foreach ($kondisiBangunan as $item)
|
@foreach ($kondisiBangunan as $item)
|
||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="kondisi_bangunan[]" type="checkbox"
|
<input class="checkbox" name="kondisi_bangunan[]" type="checkbox"
|
||||||
value="{{ $item->name }}" {{ in_array($item->name, old('kondisi_bangunan', $forminspeksi['kondisi_bangunan'] ?? [])) ? 'checked' : '' }} />
|
value="{{ $item->name }}"
|
||||||
|
{{ in_array($item->name, old('kondisi_bangunan', $forminspeksi['kondisi_bangunan'] ?? [])) ? 'checked' : '' }} />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@if (strcasecmp($item->name, 'lainnya') == 0)
|
@if (strcasecmp($item->name, 'lainnya') == 0)
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="kondisi_bangunan[]" type="checkbox"
|
<input class="checkbox" name="kondisi_bangunan[]" type="checkbox"
|
||||||
value="{{ $item->name }}" {{ in_array($item->name, old('kondisi_bangunan', $forminspeksi['kondisi_bangunan'] ?? [])) ? 'checked' : '' }} />
|
value="{{ $item->name }}"
|
||||||
|
{{ in_array($item->name, old('kondisi_bangunan', $forminspeksi['kondisi_bangunan'] ?? [])) ? 'checked' : '' }} />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="kondisi_bangunan_lainnya" class="input mt-2" id="bentukTanahInput"
|
<input type="text" name="kondisi_bangunan_lainnya" class="input mt-2"
|
||||||
placeholder="Masukkan Kondisi Bangunan..."
|
id="bentukTanahInput" placeholder="Masukkan Kondisi Bangunan..."
|
||||||
value="{{ old('kondisi_bangunan_lainnya', $forminspeksi['kondisi_bangunan_lainnya'] ?? '') }}">
|
value="{{ old('kondisi_bangunan_lainnya', $forminspeksi['kondisi_bangunan_lainnya'] ?? '') }}">
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -101,11 +100,12 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||||
<input class="checkbox" name="sifat_bangunan[]" type="checkbox"
|
<input class="checkbox" name="sifat_bangunan[]" type="checkbox"
|
||||||
value="{{ $item->name }}" {{ in_array($item->name, old('sifat_bangunan', $forminspeksi['sifat_bangunan'] ?? [])) ? 'checked' : '' }} />
|
value="{{ $item->name }}"
|
||||||
|
{{ in_array($item->name, old('sifat_bangunan', $forminspeksi['sifat_bangunan'] ?? [])) ? 'checked' : '' }} />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="sifat_bangunan_input[]" class="input w-full" id="sifat_bangunan"
|
<input type="text" name="sifat_bangunan_input[]" class="input w-full"
|
||||||
placeholder="Masukkan {{ $item->name }}..."
|
id="sifat_bangunan" placeholder="Masukkan {{ $item->name }}..."
|
||||||
value="{{ old('sifat_bangunan_input.' . $loop->index, $forminspeksi['sifat_bangunan_input'][$loop->index] ?? '') }}">
|
value="{{ old('sifat_bangunan_input.' . $loop->index, $forminspeksi['sifat_bangunan_input'][$loop->index] ?? '') }}">
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -128,7 +128,8 @@
|
|||||||
@if (@isset($spekKategoriBagunan))
|
@if (@isset($spekKategoriBagunan))
|
||||||
@foreach ($spekKategoriBagunan as $item)
|
@foreach ($spekKategoriBagunan as $item)
|
||||||
<div>
|
<div>
|
||||||
<input type="hidden" name="spek_kategori_bangunan[]" value="{{ $item->name }}">
|
<input type="hidden" name="spek_kategori_bangunan[]"
|
||||||
|
value="{{ $item->name }}">
|
||||||
<label
|
<label
|
||||||
class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
|
class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
@@ -136,7 +137,8 @@
|
|||||||
@foreach ($spekBangunan as $spek)
|
@foreach ($spekBangunan as $spek)
|
||||||
@if ($spek->spek_kategori_bangunan_id == $item->id)
|
@if ($spek->spek_kategori_bangunan_id == $item->id)
|
||||||
<label class="form-label flex items-center gap-2.5">
|
<label class="form-label flex items-center gap-2.5">
|
||||||
<input class="checkbox" name="spek_bangunan_{{ $item->name }}[]"
|
<input class="checkbox"
|
||||||
|
name="spek_bangunan_{{ $item->name }}[]"
|
||||||
type="checkbox" value="{{ $spek->name }}" />
|
type="checkbox" value="{{ $spek->name }}" />
|
||||||
{{ $spek->name }}
|
{{ $spek->name }}
|
||||||
</label>
|
</label>
|
||||||
@@ -144,7 +146,8 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<em id="error-spek_bangunan_{{ $item->name }}" class="alert text-danger text-sm"></em>
|
<em id="error-spek_bangunan_{{ $item->name }}"
|
||||||
|
class="alert text-danger text-sm"></em>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -175,11 +178,12 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||||
<input class="checkbox" name="sarana_pelengkap[]" type="checkbox"
|
<input class="checkbox" name="sarana_pelengkap[]" type="checkbox"
|
||||||
value="{{ $item->name }}" {{ in_array($item->name, old('sarana_pelengkap', $forminspeksi['sarana_pelengkap'] ?? [])) ? 'checked' : '' }} />
|
value="{{ $item->name }}"
|
||||||
|
{{ in_array($item->name, old('sarana_pelengkap', $forminspeksi['sarana_pelengkap'] ?? [])) ? 'checked' : '' }} />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="sarana_pelengkap_input[]" class="input w-full" id="bentukTanahInput"
|
<input type="text" name="sarana_pelengkap_input[]" class="input w-full"
|
||||||
placeholder="Masukkan {{ $item->name }}..."
|
id="bentukTanahInput" placeholder="Masukkan {{ $item->name }}..."
|
||||||
value="{{ old('sarana_pelengkap_input.' . $loop->index, $forminspeksi['sarana_pelengkap_input'][$loop->index] ?? '') }}">
|
value="{{ old('sarana_pelengkap_input.' . $loop->index, $forminspeksi['sarana_pelengkap_input'][$loop->index] ?? '') }}">
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -188,8 +192,9 @@
|
|||||||
<em id="error-sarana_pelengkap" class="alert text-danger text-sm"></em>
|
<em id="error-sarana_pelengkap" class="alert text-danger text-sm"></em>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
const spekBangunanContainer = document.getElementById('spek-bangunan-container');
|
const spekBangunanContainer = document.getElementById('spek-bangunan-container');
|
||||||
|
|||||||
@@ -1,122 +1,5 @@
|
|||||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5 lg:gap-7.5">
|
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5 lg:gap-7.5">
|
||||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
@php
|
|
||||||
$jenisAnalisa = null;
|
|
||||||
$perbandingan = null;
|
|
||||||
if (request()->has('form') && request('form') === 'denah' && isset($denah)) {
|
|
||||||
$denahIds = [];
|
|
||||||
$permohonaDenahId = [];
|
|
||||||
foreach ($denah as $item) {
|
|
||||||
$denahIds[] = $item->jenis_jaminan_id;
|
|
||||||
$permohonaDenahId[] = $item->permohonan_id;
|
|
||||||
}
|
|
||||||
$perbandingan =
|
|
||||||
in_array($dokumen->jenisJaminan->id, $denahIds) && in_array($permohonan->id, $permohonaDenahId);
|
|
||||||
} elseif (request()->has('form') && request('form') === 'foto' && isset($fotojaminan)) {
|
|
||||||
$fotoIds = [];
|
|
||||||
$permohonanFotoId = [];
|
|
||||||
foreach ($fotojaminan as $item) {
|
|
||||||
$fotoIds[] = $item->jenis_jaminan_id;
|
|
||||||
$permohonanFotoId[] = $item->permohonan_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
} elseif (request()->has('form') && request('form') === 'inspeksi' && isset($analisa)) {
|
|
||||||
$jenisIds = [];
|
|
||||||
foreach ($analisa as $item) {
|
|
||||||
$jenisIds[] = $item->jenis_jaminan_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@endphp
|
|
||||||
@if ($perbandingan)
|
|
||||||
<div class="card flex flex-col gap-5 p-5 lg:p-7.5">
|
|
||||||
<div class="flex items-center flex-wrap justify-between gap-1">
|
|
||||||
<div class="flex items-center gap-2.5">
|
|
||||||
<div class="relative size-[44px] shrink-0">
|
|
||||||
<svg class="w-full h-full stroke-primary-clarity fill-primary-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-add-files text-1.5xl text-primary"></i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="menu inline-flex" data-menu="true">
|
|
||||||
<div class="flex flex-nowrap justify-center gap-1.5">
|
|
||||||
|
|
||||||
@php
|
|
||||||
$formTypes = [
|
|
||||||
'denah' => [
|
|
||||||
'model' => $denah,
|
|
||||||
'route' => 'surveyor.denah',
|
|
||||||
'update' => 'update-denah',
|
|
||||||
],
|
|
||||||
'foto' => [
|
|
||||||
'model' => $fotojaminan,
|
|
||||||
'route' => 'surveyor.foto',
|
|
||||||
'update' => 'update-foto',
|
|
||||||
],
|
|
||||||
'inspeksi' => [
|
|
||||||
'model' => $analisa,
|
|
||||||
'route' => 'surveyor.inspeksi',
|
|
||||||
'update' => 'update-inspeksi',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
$currentForm = request('form');
|
|
||||||
$formConfig = $formTypes[$currentForm] ?? null;
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
@if ($formConfig && isset($formConfig['model']))
|
|
||||||
<a href="{{ route($formConfig['route'], ['id' => $permohonan->id, 'jaminanId' => $dokumen->jenisJaminan->id]) }}?form={{ $formConfig['update'] }}&{{ $currentForm }}={{ $permohonan->id }}&jenis_jaminan={{ $dokumen->jenisJaminan->id }}"
|
|
||||||
class="btn btn-sm btn-icon btn-outline btn-info">
|
|
||||||
<i class="ki-outline ki-notepad-edit"></i>
|
|
||||||
</a>
|
|
||||||
@endif
|
|
||||||
{{-- <a class="delete btn btn-sm btn-icon btn-outline btn-danger">
|
|
||||||
<i class="ki-outline ki-trash"></i>
|
|
||||||
</a> --}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="grid">
|
|
||||||
{{-- Display your analisa data here --}}
|
|
||||||
<div class="flex items-center justify-between flex-wrap mb-3.5 gap-2"><span
|
|
||||||
class="text-2xs text-gray-600uppercase">Tipe Analisa</span>
|
|
||||||
<p class="text-2xs text-gray-600 text-right max-w-[250px]">
|
|
||||||
{{-- {{ $analisa->type }} --}}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
{{-- Add more fields as needed --}}
|
|
||||||
|
|
||||||
{{-- @endif
|
|
||||||
@if ($analisa->analisaLingkungan) --}}
|
|
||||||
<div class="border-t border-gray-300 border-dashed"></div>
|
|
||||||
<div class="flex items-start justify-between flex-wrap my-2.5 gap-2">
|
|
||||||
<span class="text-2xs text-gray-600 uppercase">Analisa Lingkungan</span>
|
|
||||||
<p class="text-2xs text-gray-600 text-right max-w-[250px]">
|
|
||||||
{{-- Display relevant analisaLingkungan data --}}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
{{-- @endif --}}
|
|
||||||
{{-- @if ($analisa->analisaFakta) --}}
|
|
||||||
<div class="border-t border-gray-300 border-dashed"></div>
|
|
||||||
<div class="flex items-start justify-between flex-wrap my-2.5 gap-2">
|
|
||||||
<span class="text-2xs text-gray-600 uppercase">Analisa Fakta</span>
|
|
||||||
<p class="text-2xs text-gray-600 text-right max-w-[250px]">{{-- Display relevant analisaFakta data --}}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
{{-- @endif --}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@else
|
|
||||||
@if (request()->has('form') && request('form') === 'denah')
|
@if (request()->has('form') && request('form') === 'denah')
|
||||||
<a class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg"
|
<a class="card border-2 border-dashed border-brand-clarity bg-center bg-[length:600px] bg-no-repeat add-new-bg"
|
||||||
href="{{ route('surveyor.denah', ['id' => $permohonan->id, 'jaminanId' => $dokumen->jenisJaminan->id]) }}?form=create-denah&denah={{ $permohonan->id }}&jenis_jaminan={{ $dokumen->jenisJaminan->id }}">
|
href="{{ route('surveyor.denah', ['id' => $permohonan->id, 'jaminanId' => $dokumen->jenisJaminan->id]) }}?form=create-denah&denah={{ $permohonan->id }}&jenis_jaminan={{ $dokumen->jenisJaminan->id }}">
|
||||||
@@ -148,16 +31,44 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col text-center">
|
<div class="flex flex-col text-center">
|
||||||
<span class="text-lg font-semibold text-gray-900 hover:text-primary-active mb-px">
|
<span class="text-lg font-semibold text-gray-900 hover:text-primary-active mb-px">
|
||||||
Tambah {{ request('form') }}
|
@php
|
||||||
|
$formType = request()->input('form');
|
||||||
|
$formData = null;
|
||||||
|
$formAction = 'Tambah';
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if ($formType === 'inspeksi')
|
||||||
|
@php
|
||||||
|
$formData = $forminspeksi ?? null;
|
||||||
|
@endphp
|
||||||
|
@elseif ($formType === 'foto')
|
||||||
|
@php
|
||||||
|
$formData = $formFoto ?? null;
|
||||||
|
@endphp
|
||||||
|
@elseif ($formType === 'denah')
|
||||||
|
@php
|
||||||
|
$formData = $formDenah ?? null;
|
||||||
|
@endphp
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($formData)
|
||||||
|
@php
|
||||||
|
$formAction = 'Update';
|
||||||
|
@endphp
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{ $formAction }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ request('form') }}
|
||||||
</span>
|
</span>
|
||||||
<span class="text-2sm font-normal text-gray-600">
|
<span class="text-2sm font-normal text-gray-600">
|
||||||
Inspeksi {{ $dokumen->jenisJaminan->name ?? '' }}
|
{{ $dokumen->jenisJaminan->name ?? '' }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200"
|
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200"
|
||||||
data-accordion-item="true" id="accordion_1_item_1">
|
data-accordion-item="true" id="accordion_1_item_1">
|
||||||
<button class="accordion-toggle py-4 group mx-8" data-accordion-toggle="#accoordion_detail_jaminan_{{ $loop->index }}">
|
<button class="accordion-toggle py-4 group mx-8"
|
||||||
|
data-accordion-toggle="#accoordion_detail_jaminan_{{ $loop->index }}">
|
||||||
<span class="text-base text-gray-900 font-medium">
|
<span class="text-base text-gray-900 font-medium">
|
||||||
Jaminan {{ $loop->index + 1 }}
|
Jaminan {{ $loop->index + 1 }}
|
||||||
</span>
|
</span>
|
||||||
@@ -117,9 +118,8 @@
|
|||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form
|
|
||||||
action="{{ isset($debitur->id) ? route('debitur.update', $debitur->id) : route('surveyor.storeDenah') }}"
|
<form id="formDenah" method="POST" class="grid gap-5" enctype="multipart/form-data">
|
||||||
method="POST" class="grid gap-5" enctype="multipart/form-data">
|
|
||||||
@if (isset($debitur->id))
|
@if (isset($debitur->id))
|
||||||
<input type="hidden" name="id" value="{{ $debitur->id }}">
|
<input type="hidden" name="id" value="{{ $debitur->id }}">
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
@@ -138,14 +138,23 @@
|
|||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
<span class="form-label">Upload Denah</span>
|
<span class="form-label">Upload Denah</span>
|
||||||
</label>
|
</label>
|
||||||
|
<div class="w-full grid gap-5">
|
||||||
|
<img id="foto_denah"
|
||||||
|
src="{{ isset($formFoto['foto_denah']) ? asset('storage/' . old('foto_denah', $formFoto['foto_denah'])) : '#' }}"
|
||||||
|
alt="Gambar foto_denah" style="width: 30rem;">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="input-group w-full flex gap-2">
|
||||||
<input type="file"
|
<input type="file"
|
||||||
value="{{ old('foto_denah', isset($denah->foto_denah) ? $denah->foto_denah : '') }}"
|
value="{{ old('foto_denah', isset($formDenah['foto_denah']) ? $formDenah['foto_denah'] : '') }}"
|
||||||
name="foto_denah" class="file-input file-input-bordered w-full " accept="image/*">
|
name="foto_denah" class="file-input file-input-bordered w-full "
|
||||||
|
accept="image/*">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@error('foto_denah')
|
</div>
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
</div>
|
||||||
@enderror
|
<em id="error-foto_denah" class="alert text-danger text-sm"></em>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -160,7 +169,7 @@
|
|||||||
<span class="form-label">Masukkan total luas tanah</span>
|
<span class="form-label">Masukkan total luas tanah</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="luas" class="input w-full "
|
<input type="text" name="luas" class="input w-full "
|
||||||
value="{{ old('luas', isset($denah->luas) ? $denah->luas : '') }}">
|
value="{{ old('luas', isset($formDenah['luas']) ? $formDenah['luas'] : '') }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -170,15 +179,70 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||||
<button type="submit" class="btn btn-success">
|
<button type="button" class="btn btn-success" id="saveButton" onclick="submitDenah()">
|
||||||
Save
|
<span id="saveButtonText">Save</span>
|
||||||
|
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;"
|
||||||
|
id="saveButtonSpinner">
|
||||||
|
<span class="visually-hidden">Loading...</span>
|
||||||
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
@push('scripts')
|
||||||
|
<script>
|
||||||
|
function submitDenah() {
|
||||||
|
|
||||||
|
const formElement = $('#formDenah')[0];
|
||||||
|
const formData = new FormData(formElement);
|
||||||
|
|
||||||
|
// Disable the button and show the spinner
|
||||||
|
$('#saveButton').prop('disabled', true);
|
||||||
|
$('#saveButtonText').hide();
|
||||||
|
$('#saveButtonSpinner').show();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '{{ route('surveyor.storeDenah') }}',
|
||||||
|
type: 'POST',
|
||||||
|
data: formData,
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
if (response.success) {
|
||||||
|
window.location.href =
|
||||||
|
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=denah';
|
||||||
|
}
|
||||||
|
console.log(response);
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
let errors = xhr.responseJSON?.errors;
|
||||||
|
$('.alert').text('');
|
||||||
|
if (errors) {
|
||||||
|
$.each(errors, function(key, value) {
|
||||||
|
$(`#error-${key}`).text(value[0]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.error('Terjadi error:', error); // Menampilkan pesan error di konsol
|
||||||
|
console.log('Status:', status);
|
||||||
|
console.log('Response:', xhr.responseText);
|
||||||
|
console.log(errors);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
// Re-enable the button and hide the spinner
|
||||||
|
$('#saveButton').prop('disabled', false);
|
||||||
|
$('#saveButtonText').show();
|
||||||
|
$('#saveButtonSpinner').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal' && $analisaType != 'kendaraan' && $analisaType != 'pesawat')
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Rute Menuju</label>
|
<label class="form-label max-w-56">Rute Menuju</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
@@ -84,9 +84,9 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Kondisi lain terkait lingkungan</label>
|
<label class="form-label max-w-56">Kondisi lain terkait lingkungan</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<textarea class="textarea mt-2" name="kondisi_linkungan[]" rows="3">{{ old('kondisi_linkungan.0', $forminspeksi['kondisi_linkungan'][0] ?? '') }}</textarea>
|
<textarea class="textarea mt-2" name="kondisi_lingkungan[]" rows="3">{{ old('kondisi_lingkungan.0', $forminspeksi['kondisi_lingkungan'][0] ?? '') }}</textarea>
|
||||||
|
|
||||||
<em id="error-kondisi_linkungan" class="alert text-danger text-sm"></em>
|
<em id="error-kondisi_lingkungan" class="alert text-danger text-sm"></em>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary btn-sm mt-5 ">
|
<button class="btn btn-primary btn-sm mt-5 ">
|
||||||
@@ -121,14 +121,14 @@
|
|||||||
<i class="ki-outline ki-plus"></i>
|
<i class="ki-outline ki-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Informasi Tata Ruang -->
|
<!-- Informasi Tata Ruang -->
|
||||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal' && $analisaType != 'kendaraan' && $analisaType != 'pesawat')
|
|
||||||
<div class="card w-full bg-white">
|
<div class="card w-full bg-white">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="py-4">
|
<div class="py-4">
|
||||||
@@ -315,6 +315,7 @@
|
|||||||
|
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<input id="foto_tempat" type="file" name="foto_tempat"
|
<input id="foto_tempat" type="file" name="foto_tempat"
|
||||||
|
|
||||||
class="file-input file-input-bordered w-full" accept="image/*"
|
class="file-input file-input-bordered w-full" accept="image/*"
|
||||||
onchange="previewImage(this, 'argis-region-preview')">
|
onchange="previewImage(this, 'argis-region-preview')">
|
||||||
<img id="argis-region-preview"
|
<img id="argis-region-preview"
|
||||||
@@ -335,7 +336,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
<script>
|
<script>
|
||||||
function previewImage(input, previewId) {
|
function previewImage(input, previewId) {
|
||||||
if (input.files && input.files[0]) {
|
if (input.files && input.files[0]) {
|
||||||
|
|||||||
@@ -83,48 +83,12 @@
|
|||||||
{{-- <div class="card">
|
{{-- <div class="card">
|
||||||
<div class="card-body"> --}}
|
<div class="card-body"> --}}
|
||||||
<form id="formFoto" method="POST" class="grid gap-5" enctype="multipart/form-data">
|
<form id="formFoto" method="POST" class="grid gap-5" enctype="multipart/form-data">
|
||||||
@if (isset($fotoJaminan->id))
|
|
||||||
<input type="hidden" name="id" value="{{ $fotoJaminan->id }}">
|
|
||||||
@method('PUT')
|
|
||||||
@endif
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||||
|
|
||||||
|
|
||||||
@php
|
|
||||||
$data = [
|
|
||||||
'tanah' => 'Tanah',
|
|
||||||
'unit_rumah' => 'Rumah Tinggal / Ruko (Unit) / Apartemen (Unit) / Gudang',
|
|
||||||
'tanah_bangunan' => 'Kawasan Industrial / Komersil / Residensial - Perumahan',
|
|
||||||
'unit_gedung' => 'Gedung Apartement / Kantor / Condotel (Strata Title)',
|
|
||||||
'tanah_bangunan' => 'Mall',
|
|
||||||
];
|
|
||||||
|
|
||||||
$analisaType = 'tanah';
|
|
||||||
if (isset($analisa->id)) {
|
|
||||||
$analisaType = $analisa->type ?? 'unknown';
|
|
||||||
} else {
|
|
||||||
foreach ($data as $key => $value) {
|
|
||||||
if (
|
|
||||||
isset($jenisJaminanData) &&
|
|
||||||
trim(strtolower($jenisJaminanData)) === trim(strtolower($value))
|
|
||||||
) {
|
|
||||||
$analisaType = $key;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($analisaType === 'tanah') {
|
|
||||||
$analisaType = 'tanah_bangunan';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($analisaType === 'unit_rumah' || $analisaType === 'unit_gedung') {
|
|
||||||
$analisaType = 'unit';
|
|
||||||
}
|
|
||||||
@endphp
|
|
||||||
<input type="hidden" name="analisa_type" value="{{ $analisaType }}">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card bg-white rounded-lg shadow-md">
|
<div class="card bg-white rounded-lg shadow-md">
|
||||||
@@ -136,57 +100,57 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (isset($fotoJaminan))
|
@if (isset($formFoto['rute_menuju_lokasi']))
|
||||||
@foreach ($fotoJaminan->ruteJaminan as $item)
|
@foreach ($formFoto['rute_menuju_lokasi'] as $index => $photo)
|
||||||
@if (isset($item->foto_rute))
|
|
||||||
<img src="{{ asset('storage/' . old('foto_rute', $item->foto_rute)) }}"
|
|
||||||
alt="Gambar Pendamping" style="width: 12rem;">
|
|
||||||
@endif
|
|
||||||
<div id="inputContainerRute" style="margin-top: 10px">
|
<div id="inputContainerRute" style="margin-top: 10px">
|
||||||
<div class="flex w-full items-center justify-center gap-4 mb-4">
|
<div class="flex w-full items-center justify-center gap-4 mb-4"
|
||||||
|
id="photoContainer-{{ $index }}">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
<span class="form-label">Foto Rute Menuju Lokasi</span>
|
<span class="form-label">Foto Rute Menuju Lokasi</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="w-full grid gap-5">
|
<div class="input-group w-full flex flex-col gap-2">
|
||||||
|
<img id="foto_rute-preview-{{ $index }}"
|
||||||
|
src="{{ asset('storage/' . $photo['foto_rute']) }}"
|
||||||
|
alt="Foto Rute {{ $index }}" class="mt-2 h-auto"
|
||||||
|
style="display: block; width: 30rem;">
|
||||||
|
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full gap-2">
|
||||||
<input class="name_rute" type="hidden" name="name_rute[]" value="rute">
|
<input class="name_rute" type="hidden" name="name_rute[]"
|
||||||
<input id="inputRute" type="file" name="foto_rute[]"
|
value="rute_{{ $index }}">
|
||||||
|
<input id="inputRute-{{ $index }}" type="file" name="foto_rute[]"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*"
|
class="file-input file-input-bordered w-full" accept="image/*"
|
||||||
capture="camera">
|
capture="camera"
|
||||||
<button type="button" id="btnCamera" class="btn btn-light"
|
onchange="previewImage(this, 'foto_rute-preview-{{ $index }}')">
|
||||||
|
|
||||||
|
|
||||||
|
<button type="button" id="btnCamera-{{ $index }}" class="btn btn-light"
|
||||||
data-modal-toggle="#cameraModal">
|
data-modal-toggle="#cameraModal">
|
||||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Delete button to remove photo -->
|
||||||
<button type="button" class="btn btn-danger btn-sm delete-btn"
|
<button type="button" class="btn btn-danger btn-sm delete-btn"
|
||||||
style="display: none;" id="btnDelete">
|
onclick="deletePhoto('{{ $index }}')">
|
||||||
<i class="ki-filled ki-trash"></i>
|
<i class="ki-filled ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@error('foto_rute.*')
|
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
@error('name_rute.*')
|
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
</div>
|
||||||
@else
|
@else
|
||||||
|
|
||||||
|
|
||||||
<div id="inputContainerRute" style="margin-top: 10px">
|
<div id="inputContainerRute" style="margin-top: 10px">
|
||||||
<div class="flex w-full items-center justify-center gap-4 mb-4">
|
<div class="flex w-full items-center justify-center gap-4 mb-4">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
<span class="form-label">Foto Rute Menuju Lokasi</span>
|
<span class="form-label">Foto Rute Menuju Lokasi</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex flex-col gap-2">
|
||||||
|
|
||||||
|
<img id="foto_rute-preview" src="" alt="Foto Rute" class="mt-2 h-auto"
|
||||||
|
style="display: none; width: 30rem;">
|
||||||
|
<div class="input-group w-full gap-2">
|
||||||
<input class="name_rute" type="hidden" name="name_rute[]" value="rute">
|
<input class="name_rute" type="hidden" name="name_rute[]" value="rute">
|
||||||
{{-- <img id="foto_rute-preview" src="" alt="Foto Argis Region"
|
|
||||||
class="mt-2 max-w-full h-auto" style="display: none;"> --}}
|
|
||||||
<input id="inputRute" type="file" name="foto_rute[]"
|
<input id="inputRute" type="file" name="foto_rute[]"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*" capture="camera"
|
class="file-input file-input-bordered w-full" accept="image/*" capture="camera"
|
||||||
onchange="previewImage(this, 'foto_rute-preview')">
|
onchange="previewImage(this, 'foto_rute-preview')">
|
||||||
@@ -195,31 +159,27 @@
|
|||||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;"
|
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;"
|
||||||
id="btnDelete">
|
id="btnDelete">
|
||||||
<i class="ki-filled ki-trash"></i>
|
<i class="ki-filled ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@error('foto_rute.*')
|
<span class="alert text-danger text-sm"></span>
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
@error('name_rute.*')
|
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
<div id="inputContainerRute" style="margin-top: 10px">
|
<div id="inputContainerRute" style="margin-top: 10px">
|
||||||
<div class="flex w-full items-center justify-center gap-4 mb-4">
|
<div class="flex w-full items-center justify-center gap-4 mb-4">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
<span class="form-label">Foto Gerbang & Nama Perumahan</span>
|
<span class="form-label">Foto Gerbang & Nama Perumahan</span>
|
||||||
</label>
|
</label>
|
||||||
|
<div class="input-group w-full flex flex-col gap-2">
|
||||||
<div class="input-group w-full flex gap-2">
|
|
||||||
<input class="name_gerbang" type="hidden" name="name_gerbang" value="rute">
|
<input class="name_gerbang" type="hidden" name="name_gerbang" value="rute">
|
||||||
{{-- <img id="foto_gerbang-preview" src="" alt="Foto Gerbong"
|
<img id="foto_gerbang-preview"
|
||||||
class="mt-2 max-w-full h-auto" style="display: none;"> --}}
|
src="{{ isset($formFoto['gerbang']) ? asset('storage/' . $formFoto['gerbang']) : '' }}"
|
||||||
|
alt="Foto Gerbong" class="mt-2 max-w-full h-auto"
|
||||||
|
style="{{ isset($formFoto['gerbang']) ? '' : 'display: none;' }} width: 30rem;">
|
||||||
|
<div class="input-group w-full flex gap-2">
|
||||||
<input id="inputRute" type="file" name="foto_gerbang"
|
<input id="inputRute" type="file" name="foto_gerbang"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*" capture="camera"
|
class="file-input file-input-bordered w-full" accept="image/*" capture="camera"
|
||||||
onchange="previewImage(this, 'foto_gerbang-preview')">
|
onchange="previewImage(this, 'foto_gerbang-preview')">
|
||||||
@@ -229,11 +189,11 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<span class="alert text-danger text-sm"></span>
|
<span class="alert text-danger text-sm"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="ruteLainnya" style="margin-top: 10px">
|
<div id="ruteLainnya" style="margin-top: 10px">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="button" class="btn btn-primary btn-sm" id="btnAddMore" style="margin-top: 10px">
|
<button type="button" class="btn btn-primary btn-sm" id="btnAddMore" style="margin-top: 10px">
|
||||||
@@ -248,15 +208,30 @@
|
|||||||
<div class=" text-white py-4 px-6 flex items-center justify-between">
|
<div class=" text-white py-4 px-6 flex items-center justify-between">
|
||||||
<h1 class="text-md font-medium text-gray-900">Objek Jaminan</h1>
|
<h1 class="text-md font-medium text-gray-900">Objek Jaminan</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
|
@if ($dokumen->jenisJaminan)
|
||||||
|
@php
|
||||||
|
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
||||||
|
@endphp
|
||||||
|
@if (isset($formKategori) && $formKategori)
|
||||||
|
<input type="hidden" name="action"
|
||||||
|
value="{{ is_array($formKategori) ? implode(',', $formKategori) : $formKategori }}">
|
||||||
|
<input type="hidden" name="type"
|
||||||
|
value="{{ is_array($formKategori) ? implode(',', $formKategori) : $formKategori }}">
|
||||||
|
@if (is_array($formKategori))
|
||||||
|
@foreach ($formKategori as $kategori)
|
||||||
|
@if ($kategori === 'tanah' || $kategori === 'bangunan')
|
||||||
@php
|
@php
|
||||||
$objekViews = [];
|
|
||||||
if ($analisaType === 'tanah_bangunan') {
|
|
||||||
$objekViews = [
|
$objekViews = [
|
||||||
['label' => 'Tampak Samping Kiri', 'index' => 0],
|
['label' => 'Tampak Samping Kiri', 'index' => 0],
|
||||||
['label' => 'Tampak Samping Kanan', 'index' => 1],
|
['label' => 'Tampak Samping Kanan', 'index' => 1],
|
||||||
['label' => 'Nomor Rumah/Unit', 'index' => 2],
|
['label' => 'Nomor Rumah/Unit', 'index' => 2],
|
||||||
];
|
];
|
||||||
} elseif ($analisaType === 'unit') {
|
@endphp
|
||||||
|
@elseif ($kategori === 'apartemen-kantor')
|
||||||
|
@php
|
||||||
$objekViews = [
|
$objekViews = [
|
||||||
['label' => 'Tampak Loby', 'index' => 0],
|
['label' => 'Tampak Loby', 'index' => 0],
|
||||||
['label' => 'Tampak Lift', 'index' => 1],
|
['label' => 'Tampak Lift', 'index' => 1],
|
||||||
@@ -265,50 +240,78 @@
|
|||||||
['label' => 'Tampak Depan Unit', 'index' => 4],
|
['label' => 'Tampak Depan Unit', 'index' => 4],
|
||||||
['label' => 'Nomor Unit', 'index' => 5],
|
['label' => 'Nomor Unit', 'index' => 5],
|
||||||
];
|
];
|
||||||
}
|
|
||||||
@endphp
|
@endphp
|
||||||
|
@elseif ($kategori === 'kendaraan')
|
||||||
|
@php
|
||||||
|
$objekViews = [
|
||||||
|
['label' => 'Tampak Depan Objek', 'index' => 0],
|
||||||
|
['label' => 'Tampak Kanan Objek', 'index' => 1],
|
||||||
|
['label' => 'Tampak Samping Kiri Objek', 'index' => 2],
|
||||||
|
['label' => 'Tampak Belakang Objek', 'index' => 3],
|
||||||
|
['label' => 'Tampak Bagian Dalam', 'index' => 4],
|
||||||
|
['label' => 'Nomor Panel Instrument', 'index' => 5],
|
||||||
|
['label' => 'Tampak Odometer', 'index' => 6],
|
||||||
|
['label' => 'Tampak Aksesoris Tambahan', 'index' => 7],
|
||||||
|
['label' => 'Tampak Nomor Rangka', 'index' => 8],
|
||||||
|
['label' => 'Tampak Nomor Mesin', 'index' => 9],
|
||||||
|
['label' => 'Tampak Penilai dan Pendamping di lapangan', 'index' => 10],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
@elseif ($kategori === 'kapal')
|
||||||
|
@php
|
||||||
|
$objekViews = [
|
||||||
|
['label' => 'Tampak Depan', 'index' => 0],
|
||||||
|
['label' => 'Tampak Kanan', 'index' => 1],
|
||||||
|
['label' => 'Tampak Samping Kiri', 'index' => 2],
|
||||||
|
['label' => 'Tampak Belakang', 'index' => 3],
|
||||||
|
['label' => 'Tampak Bagian Dalam', 'index' => 4],
|
||||||
|
['label' => 'Nomor Panel Instrument', 'index' => 5],
|
||||||
|
['label' => 'Tampak Hours Meters', 'index' => 6],
|
||||||
|
['label' => 'Tampak Aksesoris Tambahan', 'index' => 7],
|
||||||
|
['label' => 'Tampak Nomor Rangka', 'index' => 8],
|
||||||
|
['label' => 'Tampak Nomor Mesin', 'index' => 9],
|
||||||
|
['label' => 'Tampak Penilai dan Pendamping di lapangan', 'index' => 10],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
@if (count($objekViews) > 0)
|
@if (count($objekViews) > 0)
|
||||||
@foreach ($objekViews as $view)
|
@foreach ($objekViews as $view)
|
||||||
<div class="flex flex-wrap gap-4 {{ !$loop->first ? 'mt-2' : '' }}">
|
<div class="flex flex-wrap gap-4 {{ !$loop->first ? 'mt-2' : '' }}">
|
||||||
<div class="flex w-full gap-4">
|
<div class="flex w-full gap-4">
|
||||||
<label class="form-label max-w-56"><span
|
<label class="form-label max-w-56"><span class="form-label">{{ $view['label'] }}</span>
|
||||||
class="form-label">{{ $view['label'] }}</span>
|
|
||||||
</label>
|
</label>
|
||||||
<input type="hidden" class="form-control" name="name_objek[]"
|
<input type="hidden" class="form-control" name="name_objek[]"
|
||||||
value="{{ $view['label'] }}" />
|
value="{{ $view['label'] }}" />
|
||||||
<div class="w-full grid gap-5">
|
<div class="w-full grid gap-5">
|
||||||
@if (isset($fotoJaminan) && isset($fotoJaminan->objekJaminan[$view['index']]))
|
<img id="foto_object_jaminan_preview_{{ $view['index'] }}"
|
||||||
<img src="{{ asset('storage/' . $fotoJaminan->objekJaminan[$view['index']]->foto_objek) }}"
|
src="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_object']) ? asset('storage/' . $formFoto['object_jaminan'][$view['index']]['foto_object']) : '' }}"
|
||||||
alt="{{ $view['label'] }}" class="mb-2 w-48 h-auto"
|
alt="{{ $view['label'] }}" class="mb-2 w-48 h-auto"
|
||||||
style="width: 12rem;">
|
onchange="previewImage(this, 'foto_object_jaminan_preview_{{ $view['index'] }}')"
|
||||||
@endif
|
style="{{ isset($formFoto['foto_object']) ? '' : 'display: none;' }} width: 30rem;">
|
||||||
|
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex gap-2">
|
||||||
<input type="file" name="foto_objek[]"
|
<input type="file" name="foto_objek[]"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*"
|
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
||||||
capture="camera">
|
|
||||||
<button type="button" id="btnCamera" class="btn btn-light"
|
<button type="button" id="btnCamera" class="btn btn-light"
|
||||||
data-modal-toggle="#cameraModal">
|
data-modal-toggle="#cameraModal">
|
||||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<textarea name="deskripsi_objek[]" class="textarea" rows="3" placeholder="Deskripsi">{{ isset($fotoJaminan) && isset($fotoJaminan->objekJaminan[$view['index']]) ? str_replace($view['label'] . ': ', '', $fotoJaminan->objekJaminan[$view['index']]->name_objek) : '' }}</textarea>
|
<textarea name="deskripsi_objek[]" class="textarea" rows="3" placeholder="Deskripsi">{{ isset($formFoto) && isset($formFoto['object_jaminan'][$view['index']]) ? str_replace($view['label'] . ': ', '', $formFoto['object_jaminan'][$view['index']]['deskripsi_objek']) : '' }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@error('foto_objek.' . $view['index'])
|
<span class="alert text-danger text-sm"></span>
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
@error('name_objek.' . $view['index'])
|
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@else
|
|
||||||
<div class="p-4">
|
|
||||||
<p class="text-gray-500">Tipe analisa tidak valid atau belum dipilih.</p>
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
<div class="flex flex-wrap gap-4 w-full">
|
<div class="flex flex-wrap gap-4 w-full">
|
||||||
@@ -322,21 +325,17 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (isset($fotoJaminan))
|
@if (isset($formFoto['foto_lantai_unit']))
|
||||||
@foreach ($fotoJaminan->lantaiUnit as $item)
|
@foreach ($formFoto['foto_lantai_unit'] as $item)
|
||||||
<div id="inputContainerLantai" class="w-full">
|
<div id="inputContainerLantai" class="w-full">
|
||||||
|
|
||||||
<div class="flex w-full items-center justify-center gap-4">
|
<div class="flex w-full items-center justify-center gap-4">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
<span class="form-label">Foto Lantai 1</span>
|
<span class="form-label">Foto Lantai 1</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="w-full grid gap-5">
|
<div class="w-full grid gap-5">
|
||||||
@if (isset($fotoJaminan))
|
|
||||||
<img src="{{ asset('storage/' . old('foto_lantai_unit', $item->foto_lantai_unit)) }}"
|
|
||||||
alt="Gambar Pendamping" style="width: 12rem;">
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
|
<img src="{{ asset('storage/' . old('foto_lantai_unit', $item['foto_lantai_unit'])) }}"
|
||||||
|
alt="Gambar Pendamping" style="width: 30rem;">
|
||||||
<input type="hidden" name="name_lantai_unit[]" value="lantai">
|
<input type="hidden" name="name_lantai_unit[]" value="lantai">
|
||||||
<input id="inputLantai" type="file" name="foto_lantai_unit[]"
|
<input id="inputLantai" type="file" name="foto_lantai_unit[]"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*"
|
class="file-input file-input-bordered w-full" accept="image/*"
|
||||||
@@ -356,8 +355,6 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
<div id="inputContainerLantai" class="w-full">
|
<div id="inputContainerLantai" class="w-full">
|
||||||
|
|
||||||
|
|
||||||
<div class="flex w-full items-center justify-center gap-4">
|
<div class="flex w-full items-center justify-center gap-4">
|
||||||
|
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
@@ -366,15 +363,14 @@
|
|||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex gap-2">
|
||||||
<input type="hidden" name="name_lantai_unit[]" value="lantai">
|
<input type="hidden" name="name_lantai_unit[]" value="lantai">
|
||||||
<input id="inputLantai" type="file" name="foto_lantai_unit[]"
|
<input id="inputLantai" type="file" name="foto_lantai_unit[]"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*"
|
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
||||||
capture="camera">
|
|
||||||
<button type="button" id="btnCamera" class="btn btn-light"
|
<button type="button" id="btnCamera" class="btn btn-light"
|
||||||
data-modal-toggle="#cameraModal">
|
data-modal-toggle="#cameraModal">
|
||||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-danger btn-sm delete-btn"
|
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;"
|
||||||
style="display: none;" id="btnDelete">
|
id="btnDelete">
|
||||||
<i class="ki-filled ki-trash"></i>
|
<i class="ki-filled ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -386,12 +382,17 @@
|
|||||||
|
|
||||||
<div id="inputContainerBasement" class="w-full" style="margin-top: 10px">
|
<div id="inputContainerBasement" class="w-full" style="margin-top: 10px">
|
||||||
<div class="flex w-full items-center justify-center gap-4">
|
<div class="flex w-full items-center justify-center gap-4">
|
||||||
|
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
<span class="form-label">Basement</span>
|
<span class="form-label">Basement</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex flex-col gap-2">
|
||||||
<input type="hidden" name="name_basement" value="basement">
|
<input type="hidden" name="name_basement" value="basement">
|
||||||
|
|
||||||
|
<img id="basement"
|
||||||
|
src="{{ isset($formFoto['basement']) ? asset('storage/' . old('basement', $formFoto['basement'])) : '#' }}"
|
||||||
|
alt="Gambar basement" style="width: 30rem;" onerror="this.style.display='none';"
|
||||||
|
onchange="previewImage(this, 'basement')">
|
||||||
|
<div class="input-group w-full flex gap-2">
|
||||||
<input id="inputLantai" type="file" name="foto_basement"
|
<input id="inputLantai" type="file" name="foto_basement"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
||||||
<button type="button" id="btnCamera" class="btn btn-light"
|
<button type="button" id="btnCamera" class="btn btn-light"
|
||||||
@@ -399,6 +400,7 @@
|
|||||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;"
|
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;"
|
||||||
id="btnDelete">
|
id="btnDelete">
|
||||||
<i class="ki-filled ki-trash"></i>
|
<i class="ki-filled ki-trash"></i>
|
||||||
@@ -428,8 +430,6 @@
|
|||||||
|
|
||||||
<div class="card bg-white rounded-lg shadow-md">
|
<div class="card bg-white rounded-lg shadow-md">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
<div class=" text-white py-4 px-6 flex items-center justify-between">
|
<div class=" text-white py-4 px-6 flex items-center justify-between">
|
||||||
<h1 class="text-md font-medium text-gray-900">Lingkungan</h1>
|
<h1 class="text-md font-medium text-gray-900">Lingkungan</h1>
|
||||||
<button id="btnLingkungan" type="button" class="btn btn-primary btn-sm">
|
<button id="btnLingkungan" type="button" class="btn btn-primary btn-sm">
|
||||||
@@ -437,40 +437,34 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (isset($fotoJaminan))
|
@if (isset($formFoto['lingkungan']))
|
||||||
@foreach ($fotoJaminan->lingkungan as $item)
|
@foreach ($formFoto['lingkungan'] as $item)
|
||||||
<div id="inputContainerLingkungan" style="margin-top: 10px">
|
<div id="inputContainerLingkungan" style="margin-top: 10px">
|
||||||
<div class="flex w-full items-center justify-center gap-4 mb-4">
|
<div class="flex w-full items-center justify-center gap-4 mb-4">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
<span class="form-label">Lingkungan</span>
|
<span class="form-label">Lingkungan</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="w-full grid gap-5">
|
<div class="w-full grid gap-5">
|
||||||
@if (isset($fotoJaminan))
|
<img src="{{ asset('storage/' . old('foto_lingkungan', $item['foto_lingkungan'])) }}"
|
||||||
<img src="{{ asset('storage/' . old('foto_lingkungan', $item->foto_lingkungan)) }}"
|
alt="Gambar Pendamping" style="width: 30rem;">
|
||||||
alt="Gambar Pendamping" style="width: 12rem;">
|
|
||||||
@endif
|
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex gap-2">
|
||||||
<input type="hidden" name="name_lingkungan[]" value="lingkungan">
|
<input type="hidden" name="name_lingkungan[]" value="lingkungan">
|
||||||
<input id="inputLingkungan" type="file" name="foto_lingkungan[]"
|
<input id="inputLingkungan" type="file" name="foto_lingkungan[]"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*"
|
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
||||||
capture="camera">
|
|
||||||
<button type="button" id="btnCamera" class="btn btn-light"
|
<button type="button" id="btnCamera" class="btn btn-light"
|
||||||
data-modal-toggle="#cameraModal">
|
data-modal-toggle="#cameraModal">
|
||||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-danger btn-sm delete-btn"
|
<button type="button" class="btn btn-danger btn-sm delete-btn" style="display: none;"
|
||||||
style="display: none;" id="btnDelete">
|
id="btnDelete">
|
||||||
<i class="ki-filled ki-trash"></i>
|
<i class="ki-filled ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@error('foto_lingkungan.*')
|
<span class="alert text-danger text-sm"></span>
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
@error('name_lingkungan.*')
|
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
@@ -495,12 +489,7 @@
|
|||||||
<i class="ki-filled ki-trash"></i>
|
<i class="ki-filled ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@error('foto_lingkungan.*')
|
<span class="alert text-danger text-sm"></span>
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
@error('name_lingkungan.*')
|
|
||||||
<span class="alert text-danger text-sm">{{ $message }}</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -520,10 +509,13 @@
|
|||||||
<span class="form-label">Pendamping</span>
|
<span class="form-label">Pendamping</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="w-full grid gap-5">
|
<div class="w-full grid gap-5">
|
||||||
@if (isset($fotoJaminan))
|
|
||||||
<img src="{{ asset('storage/' . old('pendamping', $fotoJaminan->pendamping)) }}"
|
<img id="pendamping"
|
||||||
alt="Gambar Pendamping" style="width: 12rem;">
|
src="{{ isset($formFoto['pendamping']) ? asset('storage/' . old('pendamping', $formFoto['pendamping'])) : '#' }}"
|
||||||
@endif
|
alt="Gambar Pendamping" style="width: 30rem;" onerror="this.style.display='none';"
|
||||||
|
onchange="previewImage(this, 'pendamping')">
|
||||||
|
|
||||||
|
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex gap-2">
|
||||||
<input id="inputPendamping" type="file" name="pendamping"
|
<input id="inputPendamping" type="file" name="pendamping"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
class="file-input file-input-bordered w-full" accept="image/*" capture="camera">
|
||||||
@@ -695,10 +687,10 @@
|
|||||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
// if (response.success) {
|
if (response.success) {
|
||||||
// window.location.href =
|
window.location.href =
|
||||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=foto';
|
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}?form=foto';
|
||||||
// }
|
}
|
||||||
console.log(response);
|
console.log(response);
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div class="card min-w-full">
|
<div class="card min-w-full">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">
|
||||||
Data Jaminan
|
Form Inspeksi
|
||||||
</h3>
|
</h3>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<a href="{{ route('surveyor.show', ['id' => request('inspeksi')]) }}?form=inspeksi"
|
<a href="{{ route('surveyor.show', ['id' => request('inspeksi')]) }}?form=inspeksi"
|
||||||
@@ -19,107 +19,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@php
|
|
||||||
$jenisJaminanData = null;
|
|
||||||
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<div data-accordion="true">
|
|
||||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
|
||||||
@php
|
|
||||||
$jenisJaminanData = $dokumen->jenisJaminan->name ?? '';
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200"
|
|
||||||
data-accordion-item="true" id="accordion_1_item_1">
|
|
||||||
<button class="accordion-toggle py-4 group mx-8"
|
|
||||||
data-accordion-toggle="#accordion_detail_jaminan_{{ $loop->index }}">
|
|
||||||
<span class="text-base text-gray-900 font-medium">
|
|
||||||
Jaminan {{ $loop->index + 1 }}
|
|
||||||
</span>
|
|
||||||
<i class="ki-outline ki-plus text-gray-600 text-2sm accordion-active:hidden block">
|
|
||||||
</i>
|
|
||||||
<i class="ki-outline ki-minus text-gray-600 text-2sm accordion-active:block hidden">
|
|
||||||
</i>
|
|
||||||
</button>
|
|
||||||
<div class="accordion-content hidden" id="accordion_detail_jaminan_{{ $loop->index }}">
|
|
||||||
<div class="card-body lg:py-7.5 grid grid-cols-2">
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Pemilik Jaminan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $dokumen->pemilik->name ?? '' }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Jenis Jaminan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $dokumen->jenisJaminan->name ?? '' }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Hubungan Pemilik Jaminan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $dokumen->pemilik->hubungan_pemilik->name ?? '' }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="mb-5">
|
|
||||||
<h3 class="text-md font-medium text-gray-900">
|
|
||||||
Alamat Pemilik Jaminan:
|
|
||||||
</h3>
|
|
||||||
<span class="text-2sm text-gray-700">
|
|
||||||
{{ $dokumen->pemilik->address ?? '' }},
|
|
||||||
<br> {{ $dokumen->pemilik->village->name ?? '' }},
|
|
||||||
{{ $dokumen->pemilik->district->name ?? '' }},
|
|
||||||
{{ $dokumen->pemilik->city->name ?? '' }},
|
|
||||||
{{ $dokumen->pemilik->province->name ?? '' }} -
|
|
||||||
{{ $dokumen->pemilik->village->postal_code ?? '' }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-table scrollable-x-auto pb-3">
|
|
||||||
<table class="table align-middle text-sm text-gray-500">
|
|
||||||
@foreach ($dokumen->detail as $detail)
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 text-gray-600 font-normal max-w-[100px]">
|
|
||||||
{{ $loop->index + 1 }}. {{ $detail->jenisLegalitasJaminan->name }}
|
|
||||||
</td>
|
|
||||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
||||||
{{ $detail->name ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 max-w-[100px]">
|
|
||||||
Dokumen Jaminan
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
@if (isset($detail->dokumen_jaminan))
|
|
||||||
<a href="{{ route('debitur.jaminan.download', ['id' => $permohonan->debiture->id, 'dokumen' => $detail->id]) }}"
|
|
||||||
class="badge badge-sm badge-outline mt-2">{{ basename($detail->dokumen_jaminan) }}
|
|
||||||
<i class="ki-filled ki-cloud-download"></i></a>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 max-w-[100px]">
|
|
||||||
Keterangan
|
|
||||||
</td>
|
|
||||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
||||||
{{ $detail->keterangan ?? '' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -128,82 +27,39 @@
|
|||||||
{{-- <div class="card">
|
{{-- <div class="card">
|
||||||
<div class="card-body"> --}}
|
<div class="card-body"> --}}
|
||||||
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||||
@if (isset($analisa->id))
|
|
||||||
<input type="hidden" name="id" value="{{ $analisa->id }}">
|
|
||||||
@method('PUT')
|
|
||||||
@endif
|
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||||
<input type="hidden" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
<input type="text
|
||||||
|
" name="jenis_jaminan_id" value="{{ request('jenis_jaminan') }}">
|
||||||
|
|
||||||
|
|
||||||
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
|
@if ($dokumen->jenisJaminan)
|
||||||
@php
|
@php
|
||||||
$analisaType = 'unknown';
|
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
||||||
$data = [
|
|
||||||
'tanah' => 'Tanah',
|
|
||||||
'unit_rumah' => 'Rumah Tinggal / Ruko (Unit) / Apartemen (Unit) / Gudang',
|
|
||||||
'tanah_bangunan' => 'Kawasan Industrial / Komersil / Residensial - Perumahan',
|
|
||||||
'unit_gedung' => 'Gedung Apartement / Kantor / Condotel (Strata Title)',
|
|
||||||
'tanah_bangunan' => 'Mall',
|
|
||||||
];
|
|
||||||
|
|
||||||
if (isset($analisa->id)) {
|
|
||||||
$analisaType = $analisa->type;
|
|
||||||
} else {
|
|
||||||
foreach ($data as $key => $value) {
|
|
||||||
if (
|
|
||||||
isset($jenisJaminanData) &&
|
|
||||||
trim(strtolower($jenisJaminanData)) === trim(strtolower($value))
|
|
||||||
) {
|
|
||||||
$analisaType = $key;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($analisaType === 'tanah') {
|
|
||||||
$analisaType = 'tanah_bangunan';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($analisaType === 'unit_rumah' || $analisaType === 'unit_gedung') {
|
|
||||||
$analisaType = 'unit';
|
|
||||||
}
|
|
||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
|
@if (isset($formKategori) && $formKategori)
|
||||||
<input type="hidden" name="action" value="{{ $analisaType }}">
|
<input type="hidden" name="action"
|
||||||
<input type="hidden" name="type" value="{{ $analisaType }}">
|
value="{{ is_array($formKategori) ? implode(',', $formKategori) : $formKategori }}">
|
||||||
|
<input type="hidden" name="type"
|
||||||
@if ($analisaType == 'tanah_bangunan')
|
value="{{ is_array($formKategori) ? implode(',', $formKategori) : $formKategori }}">
|
||||||
@include('lpj::surveyor.components.tanah')
|
@if (is_array($formKategori))
|
||||||
@elseif($analisaType == 'unit')
|
@foreach ($formKategori as $kategori)
|
||||||
@include('lpj::surveyor.components.apartemen-kantor')
|
@include('lpj::surveyor.components.' . str_replace('-', '-', $kategori), [
|
||||||
@elseif($analisaType == 'alat-berat')
|
'dokumen' => $dokumen,
|
||||||
@include('lpj::surveyor.components.alat-berat')
|
])
|
||||||
@elseif($analisaType == 'mesin')
|
@endforeach
|
||||||
@include('lpj::surveyor.components.mesin')
|
|
||||||
@elseif($analisaType == 'kapal')
|
|
||||||
@include('lpj::surveyor.components.kapal')
|
|
||||||
@elseif($analisaType == 'kendaraan')
|
|
||||||
@include('lpj::surveyor.components.kendaraan')
|
|
||||||
@elseif($analisaType == 'pesawat')
|
|
||||||
@include('lpj::surveyor.components.pesawat')
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($analisaType == 'tanah_bangunan')
|
|
||||||
@include('lpj::surveyor.components.bangunan')
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($analisaType != 'mesin' && $analisaType != 'kapal' && $analisaType != 'kendaraan' && $analisaType != 'pesawat')
|
|
||||||
@include('lpj::surveyor.components.lingkungan')
|
|
||||||
@endif
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
@include('lpj::surveyor.components.fakta')
|
|
||||||
|
|
||||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
<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()">
|
<button type="button" class="btn btn-success" id="saveButton" onclick="submitData()">
|
||||||
<span id="saveButtonText">Save</span>
|
<span id="saveButtonText">Save</span>
|
||||||
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;" id="saveButtonSpinner">
|
<div class="spinner-border spinner-border-sm text-light" role="status" style="display: none;"
|
||||||
|
id="saveButtonSpinner">
|
||||||
<span class="visually-hidden">Loading...</span>
|
<span class="visually-hidden">Loading...</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
@@ -212,7 +68,6 @@
|
|||||||
{{-- </div>
|
{{-- </div>
|
||||||
</div> --}}
|
</div> --}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -48,7 +48,9 @@
|
|||||||
@if (isset($perkerasanJalan))
|
@if (isset($perkerasanJalan))
|
||||||
@foreach ($perkerasanJalan as $item)
|
@foreach ($perkerasanJalan as $item)
|
||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="perkerasan_jalan" type="checkbox" value="{{ $item->name }}" />
|
<input class="checkbox" name="perkerasan_jalan[]" type="checkbox"
|
||||||
|
value="{{ $item->name }}"
|
||||||
|
{{ in_array($item->name, isset($forminspeksi['perkerasan_jalan']) ? $forminspeksi['perkerasan_jalan'] : []) ? 'checked' : '' }} />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -68,7 +70,9 @@
|
|||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="lalu_lintas[]" type="checkbox"
|
<input class="checkbox" name="lalu_lintas[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ in_array($item->name, explode(',', old('lalu_lintas', $forminspeksi['lalu_lintas'] ?? ''))) ? 'checked' : '' }} />
|
{{ isset($forminspeksi['lalu_lintas']) && in_array($item->name, explode(',', is_array(old('lalu_lintas', $forminspeksi['lalu_lintas'] ?? '')) ? implode(',', old('lalu_lintas', $forminspeksi['lalu_lintas'] ?? '')) : old('lalu_lintas', $forminspeksi['lalu_lintas'] ?? ''))) ? 'checked' : '' }} />
|
||||||
|
|
||||||
|
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -87,7 +91,8 @@
|
|||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="gol_mas_sekitar[]" type="checkbox"
|
<input class="checkbox" name="gol_mas_sekitar[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ in_array($item->name, explode(',', old('gol_mas_sekitar', $forminspeksi['gol_mas_sekitar'] ?? ''))) ? 'checked' : '' }} />
|
{{ isset($forminspeksi['gol_mas_sekitar']) && in_array($item->name, explode(',', is_array(old('gol_mas_sekitar', $forminspeksi['gol_mas_sekitar'] ?? '')) ? implode(',', old('gol_mas_sekitar', $forminspeksi['gol_mas_sekitar'] ?? '')) : old('gol_mas_sekitar', $forminspeksi['gol_mas_sekitar'] ?? ''))) ? 'checked' : '' }} />
|
||||||
|
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -107,7 +112,8 @@
|
|||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="tingkat_keramaian[]" type="checkbox"
|
<input class="checkbox" name="tingkat_keramaian[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ in_array($item->name, explode(',', old('tingkat_keramaian', $forminspeksi['tingkat_keramaian'] ?? ''))) ? 'checked' : '' }} />
|
{{ isset($forminspeksi['tingkat_keramaian']) && in_array($item->name, explode(',', is_array(old('tingkat_keramaian', $forminspeksi['tingkat_keramaian'] ?? '')) ? implode(',', old('tingkat_keramaian', $forminspeksi['tingkat_keramaian'] ?? '')) : old('tingkat_keramaian', $forminspeksi['tingkat_keramaian'] ?? ''))) ? 'checked' : '' }} />
|
||||||
|
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -127,7 +133,8 @@
|
|||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="terletak_diarea[]" type="checkbox"
|
<input class="checkbox" name="terletak_diarea[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ in_array($item->name, explode(',', old('terletak_diarea', $forminspeksi['terletak_diarea'] ?? ''))) ? 'checked' : '' }} />
|
{{ isset($forminspeksi['terletak_diarea']) && in_array($item->name, explode(',', is_array(old('terletak_diarea', $forminspeksi['terletak_diarea'] ?? '')) ? implode(',', old('terletak_diarea', $forminspeksi['terletak_diarea'] ?? '')) : old('terletak_diarea', $forminspeksi['terletak_diarea'] ?? ''))) ? 'checked' : '' }} />
|
||||||
|
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -220,7 +227,7 @@
|
|||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="merupakan_daerah[]" type="checkbox"
|
<input class="checkbox" name="merupakan_daerah[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ in_array($item->name, explode(',', old('merupakan_daerah', $forminspeksi['merupakan_daerah'] ?? []))) ? 'checked' : '' }} />
|
{{ in_array($item->name, isset($forminspeksi['merupakan_daerah']) ? $forminspeksi['merupakan_daerah'] : []) ? 'checked' : '' }} />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -255,7 +262,15 @@
|
|||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="fasilitas_dekat_object[]" type="checkbox"
|
<input class="checkbox" name="fasilitas_dekat_object[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ in_array($item->name, $selectedFasilitas) ? 'checked' : '' }} />
|
{{ in_array(
|
||||||
|
$item->name,
|
||||||
|
is_array(old('fasilitas_dekat_object', $forminspeksi['fasilitas_dekat_object'] ?? ''))
|
||||||
|
? old('fasilitas_dekat_object', $forminspeksi['fasilitas_dekat_object'] ?? [])
|
||||||
|
: explode(',', old('fasilitas_dekat_object', $forminspeksi['fasilitas_dekat_object'] ?? '')),
|
||||||
|
)
|
||||||
|
? 'checked'
|
||||||
|
: '' }} />
|
||||||
|
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="kontur_tanah[]" type="checkbox"
|
<input class="checkbox" name="kontur_tanah[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ in_array($item->name, old('kontur_tanah', $forminspeksi['kontur_tanah'] ?? [])) ? 'checked' : '' }} />
|
{{ in_array($item->name, old('kontur_tanah', isset($forminspeksi['kontur_tanah']) ? $forminspeksi['kontur_tanah'] : [])) ? 'checked' : '' }} />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include('lpj::component.detail-jaminan')
|
@include('lpj::component.detail-jaminan',['backLink'=>'surveyor.index'])
|
||||||
|
|
||||||
<div class="card min-w-full py-2 px-2">
|
<div class="card min-w-full py-2 px-2">
|
||||||
<div class="card-header" id="basic_settings">
|
<div class="card-header" id="basic_settings">
|
||||||
@@ -92,23 +92,75 @@
|
|||||||
@endIf
|
@endIf
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (request()->has('form') && request('form') !== 'data-pembanding')
|
<div class="card-footer ">
|
||||||
<div class="card-footer">
|
<div class="flex gap-5">
|
||||||
<form action="{{ route('surveyor.submitSurveyor', $surveyor ) }}" method="POST">
|
<button type="button" id="btnProses" class="btn btn-success">
|
||||||
@csrf
|
Proses
|
||||||
@method('PUT')
|
</button>
|
||||||
<button type="submit" class="btn btn-primary " {{ $buttonDisable ? 'disabled' : '' }}>
|
<button type="button" id="btnSubmit" class="btn btn-primary">
|
||||||
Submit
|
Submit
|
||||||
</button>
|
</button>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
checkButtonStatus();
|
||||||
|
|
||||||
|
document.getElementById('btnProses').addEventListener('click', onProses);
|
||||||
|
document.getElementById('btnSubmit').addEventListener('click', onSubmit);
|
||||||
|
});
|
||||||
|
|
||||||
|
function checkButtonStatus() {
|
||||||
|
$.ajax({
|
||||||
|
url: "{{ route('surveyor.checkButtonStatus', ['id' => $surveyor]) }}",
|
||||||
|
type: "GET",
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
if (response.buttonDisable) {
|
||||||
|
$('#btnProses, #btnSubmit').prop('disabled', true);
|
||||||
|
} else {
|
||||||
|
$('#btnProses, #btnSubmit').prop('disabled', false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.log('Error checking button status:', error, status, xhr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onProses() {
|
||||||
|
return alert('Are you sure you want to submit?');
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSubmit() {
|
||||||
|
$.ajax({
|
||||||
|
url: "{{ route('surveyor.submitSurveyor', ['id' => $surveyor]) }}",
|
||||||
|
type: "GET",
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
if (response.success) {
|
||||||
|
window.location.href = "{{ route('surveyor.index') }}";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.log('Error checking button status:', error, status, xhr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('.card-title a').on('click', function(e) {
|
$('.card-title a').on('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var url = $(this).attr('href');
|
var url = $(this).attr('href');
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
{{ Breadcrumbs::render('surveyor') }}
|
{{ Breadcrumbs::render('surveyor') }}
|
||||||
@endsection
|
@endsection
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@push('styles')
|
||||||
@push('styles')
|
|
||||||
<style>
|
<style>
|
||||||
.modal {
|
.modal {
|
||||||
|
|
||||||
@@ -19,7 +18,7 @@
|
|||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
<div class="card pb-2.5">
|
<div class="card pb-2.5">
|
||||||
@@ -113,70 +112,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-modal="true" id="modal_revisi" data-backdrop="static" data-keyboard="false">
|
|
||||||
<div class="modal-content">
|
|
||||||
<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=""
|
|
||||||
method="POST" enctype="multipart/form-data" id="revisiForm">
|
|
||||||
@csrf
|
|
||||||
@method('PUT')
|
|
||||||
|
|
||||||
<input type="hidden" name="action" value="revisi">
|
|
||||||
{{-- <input type="hidden" name="nomor_registrasi"
|
|
||||||
value="{{ $penilaian->nomor_registrasi ?? $permohonan->nomor_registrasi }}"> --}}
|
|
||||||
|
|
||||||
<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('tanggal_kunjungan') border-danger bg-danger-light @enderror"
|
|
||||||
type="datetime-local" name="tanggal_kunjungan"
|
|
||||||
value="">
|
|
||||||
@error('tanggal_kunjungan')
|
|
||||||
<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="keterangan" class="textarea @error('keterangan') border-danger bg-danger-light @enderror"
|
|
||||||
rows="3" name="keterangan"></textarea>
|
|
||||||
@error('keterangan')
|
|
||||||
<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>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="module">
|
<script>
|
||||||
|
function jadwal(id){
|
||||||
|
document.getElementById('ids').value = id ;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="module">
|
||||||
|
|
||||||
const element = document.querySelector('#permohonan-table');
|
const element = document.querySelector('#permohonan-table');
|
||||||
const searchInput = document.getElementById('search');
|
const searchInput = document.getElementById('search');
|
||||||
const statusFilter = document.getElementById('status-filter'); // Dropdown filter element
|
const statusFilter = document.getElementById('status-filter');
|
||||||
|
|
||||||
const apiUrl = element.getAttribute('data-api-url');
|
const apiUrl = element.getAttribute('data-api-url');
|
||||||
const dataTableOptions = {
|
const dataTableOptions = {
|
||||||
apiEndpoint: apiUrl,
|
apiEndpoint: apiUrl,
|
||||||
@@ -184,8 +133,7 @@
|
|||||||
order: [{
|
order: [{
|
||||||
column: 'nomor_registrasi',
|
column: 'nomor_registrasi',
|
||||||
dir: 'asc'
|
dir: 'asc'
|
||||||
} // Default order by 'nomor_registrasi' ascending
|
}], // Default order by 'nomor_registrasi' ascending
|
||||||
],
|
|
||||||
columns: {
|
columns: {
|
||||||
select: {
|
select: {
|
||||||
render: (item, data, context) => {
|
render: (item, data, context) => {
|
||||||
@@ -202,12 +150,7 @@
|
|||||||
},
|
},
|
||||||
tanggal_permohonan: {
|
tanggal_permohonan: {
|
||||||
title: 'Tanggal Assigned',
|
title: 'Tanggal Assigned',
|
||||||
// render: (item, data) => {
|
|
||||||
// const createdAt = convertDate(data.penilaian.created_at);
|
|
||||||
// return createdAt;
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
user_id: {
|
user_id: {
|
||||||
title: 'User Pemohon',
|
title: 'User Pemohon',
|
||||||
render: (item, data) => `${data.user.name}`,
|
render: (item, data) => `${data.user.name}`,
|
||||||
@@ -230,14 +173,26 @@
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: 'Action',
|
title: 'Action',
|
||||||
render: (item, data) => `
|
render: (item, data) => {
|
||||||
<div class="flex flex-nowrap justify-center">
|
let actionHtml = '';
|
||||||
|
|
||||||
|
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})">
|
||||||
|
<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">
|
||||||
<i class="ki-outline ki-eye"></i>
|
<i class="ki-outline ki-eye"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>`,
|
`;
|
||||||
|
}
|
||||||
|
return actionHtml;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let dataTable = new KTDataTable(element, dataTableOptions);
|
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||||
@@ -258,7 +213,58 @@
|
|||||||
const month = String(createdAt.getMonth() + 1).padStart(2, '0');
|
const month = String(createdAt.getMonth() + 1).padStart(2, '0');
|
||||||
const year = createdAt.getFullYear();
|
const year = createdAt.getFullYear();
|
||||||
return `${day}-${month}-${year}`;
|
return `${day}-${month}-${year}`;
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
<div class="modal fade" data-modal="true" id="modal_jadwal" data-backdrop="static" data-keyboard="false">
|
||||||
|
<div class="modal-content">
|
||||||
|
<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="text" 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>
|
||||||
|
|||||||
@@ -462,13 +462,17 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('{id}/show', [SurveyorController::class, 'show'])->name('show');
|
Route::get('{id}/show', [SurveyorController::class, 'show'])->name('show');
|
||||||
Route::post('store', [SurveyorController::class, 'store'])->name('store');
|
Route::post('store', [SurveyorController::class, 'store'])->name('store');
|
||||||
Route::post('storeDenah', [SurveyorController::class, 'storeDenah'])->name('storeDenah');
|
Route::post('storeDenah', [SurveyorController::class, 'storeDenah'])->name('storeDenah');
|
||||||
|
Route::put('storeJadwal', [SurveyorController::class, 'storeJadwal'])->name('storeJadwal');
|
||||||
|
Route::get('storeAproved/{id}', [SurveyorController::class, 'storeAproved'])->name('storeAproved');
|
||||||
Route::post('storeFoto', [SurveyorController::class, 'storeFoto'])->name('storeFoto');
|
Route::post('storeFoto', [SurveyorController::class, 'storeFoto'])->name('storeFoto');
|
||||||
|
Route::get('checkButtonStatus/{id}', [SurveyorController::class, 'checkButtonStatus'])->name('checkButtonStatus');
|
||||||
|
|
||||||
Route::get('datatables', [SurveyorController::class, 'dataForDatatables'])->name('datatables');
|
Route::get('datatables', [SurveyorController::class, 'dataForDatatables'])->name('datatables');
|
||||||
Route::get('inspeksi/{id}/{jaminanId}', [SurveyorController::class, 'formInspeksi'])->name('inspeksi');
|
Route::get('inspeksi/{id}/{jaminanId}', [SurveyorController::class, 'formInspeksi'])->name('inspeksi');
|
||||||
Route::get('denah/{id}/{jaminanId}', [SurveyorController::class, 'denah'])->name('denah');
|
Route::get('denah/{id}/{jaminanId}', [SurveyorController::class, 'denah'])->name('denah');
|
||||||
Route::get('foto/{id}/{jaminanId}', [SurveyorController::class, 'foto'])->name('foto');
|
Route::get('foto/{id}/{jaminanId}', [SurveyorController::class, 'foto'])->name('foto');
|
||||||
Route::get('data-pembanding/{id}', [SurveyorController::class, 'dataPembanding'])->name('data-pembanding');
|
Route::get('data-pembanding/{id}', [SurveyorController::class, 'dataPembanding'])->name('data-pembanding');
|
||||||
Route::put('submitSurveyor/{id}', [SurveyorController::class, 'submitSurveyor'])->name('submitSurveyor');
|
Route::get('submitSurveyor/{id}', [SurveyorController::class, 'submitSurveyor'])->name('submitSurveyor');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::name('penilai.')->prefix('penilai')->group(function () {
|
Route::name('penilai.')->prefix('penilai')->group(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user