diff --git a/app/Exports/BranchExport.php b/app/Exports/BranchExport.php deleted file mode 100644 index 1de8ebf..0000000 --- a/app/Exports/BranchExport.php +++ /dev/null @@ -1,49 +0,0 @@ -id, - $row->code, - $row->name, - $row->created_at - ]; - } - - public function headings() - : array - { - return [ - 'ID', - 'Code', - 'Name', - 'Created At' - ]; - } - - public function columnFormats() - : array - { - return [ - 'A' => NumberFormat::FORMAT_NUMBER, - 'D' => NumberFormat::FORMAT_DATE_DATETIME - ]; - } - } diff --git a/app/Exports/CurrencyExport.php b/app/Exports/CurrencyExport.php deleted file mode 100644 index 27a73cb..0000000 --- a/app/Exports/CurrencyExport.php +++ /dev/null @@ -1,54 +0,0 @@ -id, - $row->code, - $row->name, - $row->decimal_places, - $row->updated_at, - $row->deleted_at, - $row->created_at - ]; - } - - public function headings() - : array - { - return [ - 'ID', - 'Code', - 'Name', - 'Decimal Places', - 'Created At' - ]; - } - - public function columnFormats() - : array - { - return [ - 'A' => NumberFormat::FORMAT_NUMBER, - 'B' => NumberFormat::FORMAT_NUMBER, - 'E' => NumberFormat::FORMAT_DATE_DATETIME - ]; - } - } diff --git a/app/Http/Controllers/AuthorizationController.php b/app/Http/Controllers/AuthorizationController.php deleted file mode 100644 index 5f6d270..0000000 --- a/app/Http/Controllers/AuthorizationController.php +++ /dev/null @@ -1,200 +0,0 @@ -get()); - return view('lpj::authorization.index'); - } - - public function store(BranchRequest $request) - { - $validate = $request->validated(); - - if ($validate) { - try { - // Save to database - Branch::create($validate); - return redirect() - ->route('basicdata.branch.index') - ->with('success', 'Branch created successfully'); - } catch (Exception $e) { - return redirect() - ->route('basicdata.branch.create') - ->with('error', 'Failed to create branch'); - } - } - } - - public function create() - { - return view('lpj::branch.create'); - } - - public function edit($id) - { - $branch = Branch::find($id); - return view('lpj::branch.create', compact('branch')); - } - - public function update(BranchRequest $request, $id) - { - $validate = $request->validated(); - - if ($validate) { - try { - // Update in database - $branch = Branch::find($id); - $branch->update($validate); - return redirect() - ->route('basicdata.branch.index') - ->with('success', 'Branch updated successfully'); - } catch (Exception $e) { - return redirect() - ->route('basicdata.branch.edit', $id) - ->with('error', 'Failed to update branch'); - } - } - } - - public function destroy($id) - { - try { - // Delete from database - $branch = Branch::find($id); - $branch->delete(); - - echo json_encode(['success' => true, 'message' => 'Branch deleted successfully']); - } catch (Exception $e) { - echo json_encode(['success' => false, 'message' => 'Failed to delete branch']); - } - } - - public function dataForDatatables(Request $request) - { - // if (is_null($this->user) || !$this->user->can('branch.view')) { - //abort(403, 'Sorry! You are not allowed to view users.'); - // } - - // Retrieve data from the database - $query = Permohonan::query(); - // Get the total count of records - $totalRecords = $query->count(); - - // Apply pagination if provided - if ($request->has('page') && $request->has('size')) { - $page = $request->get('page'); - $size = $request->get('size'); - $offset = ($page - 1) * $size; // Calculate the offset - - $query->skip($offset)->take($size); - } - - // Get the filtered count of records - $filteredRecords = $query->count(); - - // Get the data for the current page - // $data = $query->get(); - $data = $query->select('permohonan.id', 'permohonan.nomor_registrasi' - , 'branches.name AS branche_name' - , 'debitures.name AS debiture_name' - // , 'tujuan_penilaian.name AS debiture_name' - , DB::raw("CONCAT(tujuan_penilaian.code,' - ', tujuan_penilaian.name) AS nama_tujuan_penilaian") - , 'users.name AS account_officer') - ->leftJoin('branches', 'branches.id', '=', 'permohonan.branch_id') - ->leftJoin('debitures', 'debitures.id', '=', 'permohonan.debiture_id') - ->leftJoin('tujuan_penilaian', 'tujuan_penilaian.id', '=', 'permohonan.tujuan_penilaian_id') - ->leftJoin('users', 'users.id', '=', 'permohonan.user_id') - ->get(); - // Calculate the page count - $pageCount = ceil($totalRecords / $request->get('size')); - - // Calculate the current page number - $currentPage = 0 + 1; - - // Return the response data as a JSON object - return response()->json([ - 'draw' => $request->get('draw'), - 'recordsTotal' => $totalRecords, - 'recordsFiltered' => $filteredRecords, - 'pageCount' => $pageCount, - 'page' => $currentPage, - 'totalCount' => $totalRecords, - 'data' => $data, - ]); - /* - // Apply search filter if provided - if ($request->has('search') && !empty($request->get('search'))) { - $search = $request->get('search'); - $query->where(function ($q) use ($search) { - $q->where('code', 'LIKE', "%$search%"); - $q->orWhere('name', 'LIKE', "%$search%"); - }); - } - - // Apply sorting if provided - if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { - $order = $request->get('sortOrder'); - $column = $request->get('sortField'); - $query->orderBy($column, $order); - } - - // Get the total count of records - $totalRecords = $query->count(); - - // Apply pagination if provided - if ($request->has('page') && $request->has('size')) { - $page = $request->get('page'); - $size = $request->get('size'); - $offset = ($page - 1) * $size; // Calculate the offset - - $query->skip($offset)->take($size); - } - - // Get the filtered count of records - $filteredRecords = $query->count(); - - // Get the data for the current page - $data = $query->get(); - - // Calculate the page count - $pageCount = ceil($totalRecords / $request->get('size')); - - // Calculate the current page number - $currentPage = 0 + 1; - - // Return the response data as a JSON object - return response()->json([ - 'draw' => $request->get('draw'), - 'recordsTotal' => $totalRecords, - 'recordsFiltered' => $filteredRecords, - 'pageCount' => $pageCount, - 'page' => $currentPage, - 'totalCount' => $totalRecords, - 'data' => $data, - ]); - */ - } - - public function export() - { - return Excel::download(new BranchExport, 'branch.xlsx'); - } - } diff --git a/app/Http/Controllers/BranchController.php b/app/Http/Controllers/BranchController.php deleted file mode 100644 index a7c20ee..0000000 --- a/app/Http/Controllers/BranchController.php +++ /dev/null @@ -1,150 +0,0 @@ -validated(); - - if ($validate) { - try { - // Save to database - Branch::create($validate); - return redirect() - ->route('basicdata.branch.index') - ->with('success', 'Branch created successfully'); - } catch (Exception $e) { - return redirect() - ->route('basicdata.branch.create') - ->with('error', 'Failed to create branch'); - } - } - } - - public function create() - { - return view('lpj::branch.create'); - } - - public function edit($id) - { - $branch = Branch::find($id); - return view('lpj::branch.create', compact('branch')); - } - - public function update(BranchRequest $request, $id) - { - $validate = $request->validated(); - - if ($validate) { - try { - // Update in database - $branch = Branch::find($id); - $branch->update($validate); - return redirect() - ->route('basicdata.branch.index') - ->with('success', 'Branch updated successfully'); - } catch (Exception $e) { - return redirect() - ->route('basicdata.branch.edit', $id) - ->with('error', 'Failed to update branch'); - } - } - } - - public function destroy($id) - { - try { - // Delete from database - $branch = Branch::find($id); - $branch->delete(); - - echo json_encode(['success' => true, 'message' => 'Branch deleted successfully']); - } catch (Exception $e) { - echo json_encode(['success' => false, 'message' => 'Failed to delete branch']); - } - } - - public function dataForDatatables(Request $request) - { - if (is_null($this->user) || !$this->user->can('branch.view')) { - //abort(403, 'Sorry! You are not allowed to view users.'); - } - - // Retrieve data from the database - $query = Branch::query(); - - // Apply search filter if provided - if ($request->has('search') && !empty($request->get('search'))) { - $search = $request->get('search'); - $query->where(function ($q) use ($search) { - $q->where('code', 'LIKE', "%$search%"); - $q->orWhere('name', 'LIKE', "%$search%"); - }); - } - - // Apply sorting if provided - if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { - $order = $request->get('sortOrder'); - $column = $request->get('sortField'); - $query->orderBy($column, $order); - } - - // Get the total count of records - $totalRecords = $query->count(); - - // Apply pagination if provided - if ($request->has('page') && $request->has('size')) { - $page = $request->get('page'); - $size = $request->get('size'); - $offset = ($page - 1) * $size; // Calculate the offset - - $query->skip($offset)->take($size); - } - - // Get the filtered count of records - $filteredRecords = $query->count(); - - // Get the data for the current page - $data = $query->get(); - - // Calculate the page count - $pageCount = ceil($totalRecords / $request->get('size')); - - // Calculate the current page number - $currentPage = 0 + 1; - - // Return the response data as a JSON object - return response()->json([ - 'draw' => $request->get('draw'), - 'recordsTotal' => $totalRecords, - 'recordsFiltered' => $filteredRecords, - 'pageCount' => $pageCount, - 'page' => $currentPage, - 'totalCount' => $totalRecords, - 'data' => $data, - ]); - } - - public function export() - { - return Excel::download(new BranchExport, 'branch.xlsx'); - } - } diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php deleted file mode 100644 index 042e7af..0000000 --- a/app/Http/Controllers/CurrencyController.php +++ /dev/null @@ -1,150 +0,0 @@ -validated(); - - if ($validate) { - try { - // Save to database - Currency::create($validate); - return redirect() - ->route('basicdata.currency.index') - ->with('success', 'Currency created successfully'); - } catch (Exception $e) { - return redirect() - ->route('basicdata.currency.create') - ->with('error', 'Failed to create currency'); - } - } - } - - public function create() - { - return view('lpj::currency.create'); - } - - public function edit($id) - { - $currency = Currency::find($id); - return view('lpj::currency.create', compact('currency')); - } - - public function update(CurrencyRequest $request, $id) - { - $validate = $request->validated(); - - if ($validate) { - try { - // Update in database - $currency = Currency::find($id); - $currency->update($validate); - return redirect() - ->route('basicdata.currency.index') - ->with('success', 'Currency updated successfully'); - } catch (Exception $e) { - return redirect() - ->route('basicdata.currency.edit', $id) - ->with('error', 'Failed to update currency'); - } - } - } - - public function destroy($id) - { - try { - // Delete from database - $currency = Currency::find($id); - $currency->delete(); - - echo json_encode(['success' => true, 'message' => 'Currency deleted successfully']); - } catch (Exception $e) { - echo json_encode(['success' => false, 'message' => 'Failed to delete currency']); - } - } - - public function dataForDatatables(Request $request) - { - if (is_null($this->user) || !$this->user->can('currency.view')) { - //abort(403, 'Sorry! You are not allowed to view users.'); - } - - // Retrieve data from the database - $query = Currency::query(); - - // Apply search filter if provided - if ($request->has('search') && !empty($request->get('search'))) { - $search = $request->get('search'); - $query->where(function ($q) use ($search) { - $q->where('code', 'LIKE', "%$search%"); - $q->orWhere('name', 'LIKE', "%$search%"); - }); - } - - // Apply sorting if provided - if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { - $order = $request->get('sortOrder'); - $column = $request->get('sortField'); - $query->orderBy($column, $order); - } - - // Get the total count of records - $totalRecords = $query->count(); - - // Apply pagination if provided - if ($request->has('page') && $request->has('size')) { - $page = $request->get('page'); - $size = $request->get('size'); - $offset = ($page - 1) * $size; // Calculate the offset - - $query->skip($offset)->take($size); - } - - // Get the filtered count of records - $filteredRecords = $query->count(); - - // Get the data for the current page - $data = $query->get(); - - // Calculate the page count - $pageCount = ceil($totalRecords / $request->get('size')); - - // Calculate the current page number - $currentPage = 0 + 1; - - // Return the response data as a JSON object - return response()->json([ - 'draw' => $request->get('draw'), - 'recordsTotal' => $totalRecords, - 'recordsFiltered' => $filteredRecords, - 'pageCount' => $pageCount, - 'page' => $currentPage, - 'totalCount' => $totalRecords, - 'data' => $data, - ]); - } - - public function export() - { - return Excel::download(new CurrencyExport, 'currency.xlsx'); - } - } diff --git a/app/Http/Controllers/DokumenJaminanController.php b/app/Http/Controllers/DokumenJaminanController.php index e33d1c4..dc4ac6e 100644 --- a/app/Http/Controllers/DokumenJaminanController.php +++ b/app/Http/Controllers/DokumenJaminanController.php @@ -14,9 +14,11 @@ use Modules\Lpj\Models\Debiture; use Modules\Lpj\Models\DetailDokumenJaminan; use Modules\Lpj\Models\DokumenJaminan; + use Modules\Lpj\Models\HubunganPemilikJaminan; use Modules\Lpj\Models\JenisJaminan; use Modules\Lpj\Models\JenisLegalitasJaminan; use Modules\Lpj\Models\PemilikJaminan; + use ZipArchive; class DokumenJaminanController extends Controller { @@ -86,6 +88,7 @@ 'dokumen_jaminan' => 'jaminan/' . $debitur->id . '/' . $document->id . '/' . $file_name, 'name' => $request->name[$key], 'keterangan' => $request->keterangan[$key], + 'details' => isset($request->custom_field[$key]) ? json_encode($request->custom_field[$key]) : '', ]; DetailDokumenJaminan::create($detail); } catch (Exception $e) { @@ -124,10 +127,18 @@ $jenisJaminan = JenisJaminan::all(); $jenisLegalitasJaminan = JenisLegalitasJaminan::all(); $pemilikJaminan = PemilikJaminan::where('debiture_id', $id)->get(); + $hubunganPemilik = HubunganPemilikJaminan::all(); return view( 'lpj::debitur.jaminan', - compact('debitur', 'provinces', 'jenisJaminan', 'jenisLegalitasJaminan', 'pemilikJaminan'), + compact( + 'debitur', + 'provinces', + 'jenisJaminan', + 'jenisLegalitasJaminan', + 'pemilikJaminan', + 'hubunganPemilik', + ), ); } @@ -141,6 +152,52 @@ DB::beginTransaction(); $validate['debiture_id'] = $id; + if ($validate['pemilik_jaminan_id'] == 00) { + $pemilik_jaminan = [ + 'hubungan_pemilik_jaminan_id' => request()->get('hubungan_pemilik_jaminan_id'), + 'province_code' => $debitur->province_code, + 'city_code' => $debitur->city_code, + 'district_code' => $debitur->district_code, + 'village_code' => $debitur->village_code, + 'postal_code' => $debitur->postal_code, + 'address' => $debitur->address, + 'nomor_id' => request()->get('nomor_id'), + 'name' => request()->get('pemilik_name'), + ]; + + $detailSertifikat = []; + $names = request()->input('detail_sertifikat.name', []); + $nomorIds = request()->input('detail_sertifikat.nomor_id', []); + + foreach ($names as $index => $name) { + if (isset($nomorIds[$index])) { + $detailSertifikat[] = [ + 'name' => $name, + 'nomor_id' => $nomorIds[$index], + ]; + } + } + + $pemilik_jaminan['detail_sertifikat'] = json_encode($detailSertifikat); + + //dd($pemilik_jaminan); + + try { + $pemilikJaminan = PemilikJaminan::updateOrCreate([ + 'debiture_id' => $id, + 'name' => request()->get('pemilik_name'), + ], $pemilik_jaminan); + } catch (Exception $e) { + return redirect()->route('debitur.jaminan.index', $id)->with( + 'error', + 'Gagal update pemilik jaminan: ' . $e->getMessage(), + ); + } + + $validate['pemilik_jaminan_id'] = $pemilikJaminan->id; + } + + if ($validate['pemilik_jaminan_id'] == 0) { $pemilik_jaminan = [ 'hubungan_pemilik_jaminan_id' => 1, @@ -159,11 +216,14 @@ 'debiture_id' => $id, 'name' => $debitur->name, ], $pemilik_jaminan); + + $validate['pemilik_jaminan_id'] = $pemilikJaminan->id; } $document = DokumenJaminan::find($jaminan); $document->update($validate); + if ($request->detail_dokumen_jaminan_id) { foreach ($request->detail_dokumen_jaminan_id as $key => $value) { if (isset($request->dokumen_jaminan[$key])) { @@ -238,6 +298,7 @@ $jenisJaminan = JenisJaminan::all(); $jenisLegalitasJaminan = JenisLegalitasJaminan::all(); $pemilikJaminan = PemilikJaminan::where('debiture_id', $document->debiture_id)->get(); + $hubunganPemilik = HubunganPemilikJaminan::all(); return view( 'lpj::debitur.jaminan', @@ -252,6 +313,7 @@ 'districts', 'villages', 'pemilikJaminan', + 'hubunganPemilik', ), ); } @@ -274,6 +336,45 @@ } } + public function bulkDownload() + { + $dokumenIds = request()->get('jaminan'); // Expecting an array of dokumen_jaminan_id + $documents = DetailDokumenJaminan::where('dokumen_jaminan_id', $dokumenIds)->get(); + if ($documents->isEmpty()) { + return redirect()->back()->with('error', 'No documents found for the provided IDs.'); + } + + $zip = new ZipArchive; + $zipFileName = 'documents_jaminan_' . $dokumenIds . '.zip'; + $zipFilePath = storage_path('app/public/' . $zipFileName); + + if ($zip->open($zipFilePath, ZipArchive::CREATE) === true) { + foreach ($documents as $document) { + $filePath = storage_path('app/public/' . $document->dokumen_jaminan); + if (file_exists($filePath)) { + $zip->addFile($filePath, basename($filePath)); + } else { + // Log or display an error message for missing files + return redirect()->back()->with('error', 'File not found: ' . $filePath); + } + } + $zip->close(); + + if (!file_exists($zipFilePath)) { + return redirect()->back()->with('error', 'Failed to create ZIP file.'); + } + } else { + return redirect()->back()->with('error', 'Failed to create ZIP file.'); + } + + return response()->download($zipFilePath, $zipFileName, [ + 'Content-Type' => 'application/zip', + 'Content-Disposition' => 'attachment; filename="' . $zipFileName . '"', + 'Content-Length' => filesize($zipFilePath), + ])->deleteFileAfterSend(false); + } + + public function download() { $dokumen = request()->get('dokumen'); diff --git a/app/Http/Controllers/JenisFasilitasKreditController.php b/app/Http/Controllers/JenisFasilitasKreditController.php index 8d8a886..36ba491 100644 --- a/app/Http/Controllers/JenisFasilitasKreditController.php +++ b/app/Http/Controllers/JenisFasilitasKreditController.php @@ -13,7 +13,6 @@ class JenisFasilitasKreditController extends Controller { - use LpjHelpers; // <---- Using the LpjHelpers Trait public $user; public function index() @@ -28,12 +27,6 @@ if ($validate) { try { // Save to database - // andy add - $lastNumberCodeJFK = LpjHelpers::onLastCodeJFK(); - - $validate['name'] =strtoupper($request->name); - $validate['code'] =$lastNumberCodeJFK; - // andy add JenisFasilitasKredit::create($validate); return redirect() diff --git a/app/Http/Controllers/LaporanController.php b/app/Http/Controllers/LaporanController.php new file mode 100644 index 0000000..ec4cf45 --- /dev/null +++ b/app/Http/Controllers/LaporanController.php @@ -0,0 +1,34 @@ +select('penawaran.*',DB::raw("CONCAT(DATE_FORMAT(penawaran.start_date, '%d %M %Y'), ' - ', DATE_FORMAT(penawaran.end_date, '%d %M %Y')) AS date_range"), 'tujuan_penilaian_kjpp.name as tujuan_penilaian_kjpp_name') ->leftJoin('tujuan_penilaian_kjpp', 'tujuan_penilaian_kjpp.id','=','penawaran.tujuan_penilaian_kjpp_id') - ->where('penawaran.status','=','persetujuan-penawaran') - ->withCount('penawarandetails'); - + ->where('penawaran.status','=','proposal-tender') + ->withCount('penawarandetails'); + // Apply search filter if provided if ($request->has('search') && !empty($request->get('search'))) { $search = $request->get('search'); $query->where(function ($q) use ($search) { $q->where('nomor_registrasi', 'LIKE', '%' . $search . '%'); $q->orWhere('tanggal_permohonan', 'LIKE', '%' . $search . '%'); - + $q->orWhere('status', 'LIKE', '%' . $search . '%'); }); } @@ -114,19 +114,19 @@ class OtorisasiPenawaranController extends Controller if (request()->ajax()) { $id = $request->id; - $penawaran = PenawaranTender::where('status','=','persetujuan-penawaran')->find($id); - + $penawaran = PenawaranTender::where('status','=','proposal-tender')->find($id); + if ($penawaran) { $penawarandetailLogs = PenawaranDetailTenderLog::where('penawaran_id',$id) - ->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran_logs.kjpp_rekanan_id') + ->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran_logs.kjpp_rekanan_id') ->select('detail_penawaran_logs.*', DB::raw("DATE_FORMAT(detail_penawaran_logs.created_at, '%d-%m-%Y %H:%i') AS created_at2"),'kjpp.code AS kjpp_code', 'kjpp.name AS kjpp_name') ->get(); $penawrandetails = PenawaranDetailTender::where('penawaran_id','=',$id) - ->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran.kjpp_rekanan_id') + ->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran.kjpp_rekanan_id') ->select('detail_penawaran.*', 'kjpp.code AS kjpp_code', 'kjpp.name AS kjpp_name') ->where('detail_penawaran.status','=',1) ->get(); - + if(sizeof($penawarandetailLogs)>0) { $h=0; @@ -139,8 +139,8 @@ class OtorisasiPenawaranController extends Controller } $h++; } - - } + + } $i=0; foreach($penawrandetails as $obj) @@ -149,17 +149,17 @@ class OtorisasiPenawaranController extends Controller { $penawrandetails_path = Storage::url($obj->dokumen_persetujuan); $penawrandetails[$i]->dokumen_persetujuan = $penawrandetails_path; - + } $i++; } - + $penawaranString = ""; if($penawaran->status) { $penawaranString = convertSlug($penawaran->status); $penawaran->status = $penawaranString; - } + } $kjpp=null; $kjpp = KJPP::pluck('name', 'id'); @@ -202,11 +202,11 @@ class OtorisasiPenawaranController extends Controller // update status Penawaran menjadi SPK // update status Permohonan menjadi SPK // insert detail_permohonan_log - + PenawaranDetailTender::where('status', 1) ->where('penawaran_id', $request->penawaran_id) ->whereNotIn('id', [$id]) - ->update(['status' => 2, + ->update(['status' => 2, 'updated_by' => Auth::id(), 'updated_at' => now() ]); @@ -228,12 +228,12 @@ class OtorisasiPenawaranController extends Controller 'updated_by' => Auth::id(), 'updated_at' => now() ]); - + // log $detailPenawaran = PenawaranDetailTender::where('penawaran_id', $request->penawaran_id)->get(); if(sizeof($detailPenawaran)>0) { - + foreach ($detailPenawaran as $model) { array_push($dataDetailPenawaranLog, [ 'detail_penawaran_id' =>$model->id, @@ -248,12 +248,12 @@ class OtorisasiPenawaranController extends Controller 'authorized_at' =>$model->authorized_at, 'created_at' =>$model->created_at, 'updated_at' =>$model->updated_at, - 'deleted_at' =>$model->deleted_at, + 'deleted_at' =>$model->deleted_at, 'created_by' =>$model->created_by, 'updated_by' =>$model->updated_by, 'deleted_by' =>$model->deleted_by ]); - + } PenawaranDetailTenderLog::insert($dataDetailPenawaranLog); diff --git a/app/Http/Controllers/PemilikJaminanController.php b/app/Http/Controllers/PemilikJaminanController.php index 7c38601..b8e0ecd 100644 --- a/app/Http/Controllers/PemilikJaminanController.php +++ b/app/Http/Controllers/PemilikJaminanController.php @@ -63,6 +63,7 @@ public function update(PemilikJaminanRequest $request, $id, $pemilik) { $validate = $request->validated(); + if ($validate) { try { $pemilik = PemilikJaminan::find($pemilik); @@ -88,6 +89,7 @@ $districts = District::where('city_code', $pemilik->city_code)->get(); $villages = Village::where('district_code', $pemilik->district_code)->get(); $hubunganPemilik = HubunganPemilikJaminan::all(); + $detailSertifikat = $pemilik->detail_sertifikat; return view( 'lpj::pemilik_jaminan.form', @@ -99,6 +101,7 @@ 'villages', 'hubunganPemilik', 'pemilik', + 'detailSertifikat' ), ); } diff --git a/app/Http/Controllers/PenilaiController.php b/app/Http/Controllers/PenilaiController.php new file mode 100644 index 0000000..6b2a0c0 --- /dev/null +++ b/app/Http/Controllers/PenilaiController.php @@ -0,0 +1,135 @@ +find($id); + + return view('lpj::penilai.show', compact('permohonan')); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit($id) + { + return view('lpj::edit'); + } + + /** + * Update the specified resource in storage. + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + */ + public function destroy($id) + { + // + } + + public function dataForDatatables(Request $request) + { + if (is_null($this->user) || !$this->user->can('penilai.view')) { + //abort(403, 'Sorry! You are not allowed to view users.'); + } + + // Retrieve data from the database + $query = Permohonan::query()->where('status', '=', 'done'); + + // Apply search filter if provided + if ($request->has('search') && !empty($request->get('search'))) { + $search = $request->get('search'); + $query->where(function ($q) use ($search) { + $q->where('nomor_registrasi', 'LIKE', '%' . $search . '%'); + $q->orWhereRelation('debiture', 'name', 'LIKE', '%' . $search . '%'); + $q->orWhereRelation('branch', 'name', 'LIKE', '%' . $search . '%'); + $q->orWhereRelation('user', 'name', 'LIKE', '%' . $search . '%'); + $q->orWhereRelation('tujuanPenilaian', 'name', 'LIKE', '%' . $search . '%'); + $q->orWhereRelation('jenisfasilitasKredit', 'name', 'LIKE', '%' . $search . '%'); + }); + } + + // Apply sorting if provided + if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { + $order = $request->get('sortOrder'); + $column = $request->get('sortField'); + $query->orderBy($column, $order); + } + + // Get the total count of records + $totalRecords = $query->count(); + + // Apply pagination if provided + if ($request->has('page') && $request->has('size')) { + $page = $request->get('page'); + $size = $request->get('size'); + $offset = ($page - 1) * $size; // Calculate the offset + + $query->skip($offset)->take($size); + } + + // Get the filtered count of records + $filteredRecords = $query->count(); + + // Get the data for the current page + $data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian', 'jenisfasilitasKredit'])->get(); + + // Calculate the page count + $pageCount = ceil($totalRecords / $request->get('size')); + + // Calculate the current page number + $currentPage = 0 + 1; + + // Return the response data as a JSON object + return response()->json([ + 'draw' => $request->get('draw'), + 'recordsTotal' => $totalRecords, + 'recordsFiltered' => $filteredRecords, + 'pageCount' => $pageCount, + 'page' => $currentPage, + 'totalCount' => $totalRecords, + 'data' => $data, + ]); + } +} diff --git a/app/Http/Controllers/PermohonanController.php b/app/Http/Controllers/PermohonanController.php index 2cd35d0..e2a3da4 100644 --- a/app/Http/Controllers/PermohonanController.php +++ b/app/Http/Controllers/PermohonanController.php @@ -3,6 +3,7 @@ namespace Modules\Lpj\Http\Controllers; use App\Http\Controllers\Controller; + use Barryvdh\DomPDF\Facade\Pdf; use Exception; use Illuminate\Http\Request; use Maatwebsite\Excel\Facades\Excel; @@ -304,4 +305,19 @@ return redirect()->route('authorization.index')->with('success', 'Permohonan updated successfully'); } + + public function show($id) + { + $permohonan = Permohonan::find($id); + + return view('lpj::permohonan.show', compact('permohonan')); + } + + public function print($id){ + $permohonan = Permohonan::find($id); + return view('lpj::permohonan.print', compact('permohonan')); + +// $pdf = Pdf::loadView('lpj::permohonan.print', compact('permohonan')); + // return $pdf->stream(); + } } diff --git a/app/Http/Controllers/ProsesPenawaranController.php b/app/Http/Controllers/ProsesPenawaranController.php index a37669b..d8a5e9b 100644 --- a/app/Http/Controllers/ProsesPenawaranController.php +++ b/app/Http/Controllers/ProsesPenawaranController.php @@ -75,7 +75,7 @@ class ProsesPenawaranController extends Controller // Get the data for the current page //$data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian'])->get(); - $data = $query->with(['tujuanPenilaianKJPP'])->get(); + $data = $query->with(['tujuanPenilaianKJPP','permohonan','permohonan.debiture'])->get(); // Calculate the page count $pageCount = ceil($totalRecords / $request->get('size')); @@ -110,13 +110,13 @@ class ProsesPenawaranController extends Controller $id = $request->id; $penawaran = PenawaranTender::find($id); $penawrandetails = PenawaranDetailTender::where('penawaran_id','=',$id) - ->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran.kjpp_rekanan_id') + ->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran.kjpp_rekanan_id') ->select('detail_penawaran.*', 'kjpp.code AS kjpp_code', 'kjpp.name AS kjpp_name') ->where('detail_penawaran.status','=',1) ->get(); - + if ($penawaran) { - + $i=0; foreach($penawrandetails as $obj) { @@ -156,11 +156,11 @@ class ProsesPenawaranController extends Controller $dataPenawaranDetail = array(); if (request()->ajax()) { $validator = ProsesPenawaranController::rulesEditnya($request, $id); - + if ($validator['fails']) { $data['message'] = $validator['errors']; $data['status'] = 'error'; - } + } else { try { @@ -174,9 +174,9 @@ class ProsesPenawaranController extends Controller { $file_tmp = $request->file('dokumen_persetujuan'); $folderPath = 'uploads/penawaran/'; - if ($file_tmp->isValid()) + if ($file_tmp->isValid()) { - $myFile=$file_tmp->getClientOriginalName(); // nama file with extension + $myFile=$file_tmp->getClientOriginalName(); // nama file with extension $file_name = pathinfo($myFile, PATHINFO_FILENAME); // nama file without extension $extension = $file_tmp->getClientOriginalExtension(); @@ -205,16 +205,16 @@ class ProsesPenawaranController extends Controller { $data['status'] = 'error'; $data['message'] ['check_file'] = array("Silahkan upload file"); - + } - + } catch (Exception $e) { - + $data['status'] = 'error'; $data['message'] ['message_error_try_catch'] = array('Proses Penawarn KJPP failed.'); } } - + } else { $data['status'] = 'error'; $data['message'] ['message_ajax'] = array("no ajax request"); @@ -257,57 +257,52 @@ class ProsesPenawaranController extends Controller $dataPenawaran = array(); $penawaran = PenawaranTender::find($id); $checkActiveDateRange = checkActiveDateRangePenawaran($id); - + // cek masa aktif penawaran if($checkActiveDateRange) { - - $checkKelengkapanDetailKJPP = checkKelengkapanDetailKJPP($id); + + $checkKelengkapanDetailKJPP = checkKelengkapanDetailKJPP($id); if($checkKelengkapanDetailKJPP) { DB::beginTransaction(); try { - $dataPenawaran = ['status' => 'persetujuan-penawaran', + $_updatestatus = ['status' => 'proposal-tender', 'updated_by' => Auth::id(), 'updated_at' => now() ]; - - $dataPermohonan = ['status' => 'persetujuan-penawaran', - 'updated_by' => Auth::id(), - 'updated_at' => now() - ]; - + $permohonan = Permohonan::where('nomor_registrasi','=', $penawaran->nomor_registrasi)->first(); - - $penawaran->update($dataPenawaran); - $permohonan->update($dataPermohonan); - + + $penawaran->update($_updatestatus); + $permohonan->update($_updatestatus); + DB::commit(); - + $data['message'] ['message_success'] = array('Sukses melakukan Proses Penawaran'); $data['status'] = 'success'; - + } catch (Exception $e) { DB::rollBack(); // dd($e); $data['message'] ['message_error_try_catch'] = array("Gagal melakukan Proses Penawaran"); $data['status'] = 'error'; } - + } else { $data['message'] ['cek_kelengkapan_data'] = array("Silahkan lengkapi data KJPP"); $data['status'] = 'error'; } - + } else { $data['message'] ['active_date_range'] = array("Penawaran sudah di tutup"); $data['status'] = 'error'; } - + return response()->json($data); } @@ -326,12 +321,12 @@ class ProsesPenawaranController extends Controller 'updated_at' => now() ]; - $detailpenawaran->update($dataDetailPenawaran); + $detailpenawaran->update($dataDetailPenawaran); $data['status'] = 'success'; $data['message'] ['message_success'] = array('Sukses delete Penawaran KJPP '.$request->kjppName); } catch (Exception $e) { - + $data['status'] = 'error'; $data['message'] ['message_error_try_catch'] = array("Gagal delete Penawaran KJPP ".$request->kjppName); } diff --git a/app/Http/Controllers/ProsesPenawaranUlangController.php b/app/Http/Controllers/ProsesPenawaranUlangController.php index f34ee70..c6aa41b 100644 --- a/app/Http/Controllers/ProsesPenawaranUlangController.php +++ b/app/Http/Controllers/ProsesPenawaranUlangController.php @@ -41,16 +41,16 @@ class ProsesPenawaranUlangController extends Controller $query =PenawaranTender::query() ->select('penawaran.*',DB::raw("CONCAT(DATE_FORMAT(penawaran.start_date, '%d %M %Y'), ' - ', DATE_FORMAT(penawaran.end_date, '%d %M %Y')) AS date_range"), 'tujuan_penilaian_kjpp.name as tujuan_penilaian_kjpp_name') ->leftJoin('tujuan_penilaian_kjpp', 'tujuan_penilaian_kjpp.id','=','penawaran.tujuan_penilaian_kjpp_id') - ->where('penawaran.status','=','persetujuan-penawaran') - ->withCount('penawarandetails'); - + ->where('penawaran.status','=','proposal-tender') + ->withCount('penawarandetails'); + // Apply search filter if provided if ($request->has('search') && !empty($request->get('search'))) { $search = $request->get('search'); $query->where(function ($q) use ($search) { $q->where('nomor_registrasi', 'LIKE', '%' . $search . '%'); $q->orWhere('tanggal_permohonan', 'LIKE', '%' . $search . '%'); - + $q->orWhere('status', 'LIKE', '%' . $search . '%'); }); } @@ -118,11 +118,11 @@ class ProsesPenawaranUlangController extends Controller if (request()->ajax()) { $id = $request->id; - $penawaran = PenawaranTender::where('status','=','persetujuan-penawaran')->find($id); - + $penawaran = PenawaranTender::where('status','=','proposal-tender')->find($id); + if ($penawaran) { $penawrandetails = PenawaranDetailTender::where('penawaran_id','=',$id) - ->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran.kjpp_rekanan_id') + ->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran.kjpp_rekanan_id') ->select('detail_penawaran.*', 'kjpp.code AS kjpp_code', 'kjpp.name AS kjpp_name') ->where('detail_penawaran.status','=',1) ->get(); @@ -143,7 +143,7 @@ class ProsesPenawaranUlangController extends Controller { $penawaranString = convertSlug($penawaran->status); $penawaran->status = $penawaranString; - } + } $data['penawaran'] = $penawaran; $data['penawrandetails'] = $penawrandetails; @@ -176,7 +176,7 @@ class ProsesPenawaranUlangController extends Controller if ($validator['fails']) { $data['message'] = $validator['errors']; $data['status'] = 'error'; - } + } else { // cek masa aktif penawaran @@ -187,7 +187,7 @@ class ProsesPenawaranUlangController extends Controller { DB::beginTransaction(); try { - + $dataDetailPenawaranLog = [ 'detail_penawaran_id' =>$detailpenawaran->id, 'kjpp_rekanan_id' =>$detailpenawaran->kjpp_rekanan_id, @@ -201,15 +201,15 @@ class ProsesPenawaranUlangController extends Controller 'authorized_at' =>$detailpenawaran->authorized_at, 'created_at' =>$detailpenawaran->created_at, 'updated_at' =>$detailpenawaran->updated_at, - 'deleted_at' =>$detailpenawaran->deleted_at, + 'deleted_at' =>$detailpenawaran->deleted_at, 'created_by' =>$detailpenawaran->created_by, 'updated_by' =>$detailpenawaran->updated_by, 'deleted_by' =>$detailpenawaran->deleted_by ]; - + PenawaranDetailTenderLog::create($dataDetailPenawaranLog); - + $biaya_penawaran=""; if($request->biaya_penawaran) $biaya_penawaran= str_replace(".","",$request->biaya_penawaran); @@ -222,9 +222,9 @@ class ProsesPenawaranUlangController extends Controller { $file_tmp = $request->file('dokumen_persetujuan'); $folderPath = 'uploads/penawaran/'; - if ($file_tmp->isValid()) + if ($file_tmp->isValid()) { - $myFile=$file_tmp->getClientOriginalName(); // nama file with extension + $myFile=$file_tmp->getClientOriginalName(); // nama file with extension $file_name = pathinfo($myFile, PATHINFO_FILENAME); // nama file without extension $extension = $file_tmp->getClientOriginalExtension(); @@ -247,9 +247,9 @@ class ProsesPenawaranUlangController extends Controller { $data['status'] = 'error'; $data['message']['check_file'] = array("Silahkan upload file"); - + } - + $detailpenawaran->update($dataDetailPenawaran); if($pleaseCommit) @@ -279,7 +279,7 @@ class ProsesPenawaranUlangController extends Controller $data['status'] = 'error'; $data['message']['active_date_range'] = array("Penawaran sudah di tutup"); } - + } } else { @@ -288,7 +288,7 @@ class ProsesPenawaranUlangController extends Controller } return response()->json($data); - } + } // delete KJPP di detail_penawaran (status di buat 0) public function updateKJPPStatus(Request $request, $id): JsonResponse @@ -316,16 +316,16 @@ class ProsesPenawaranUlangController extends Controller 'authorized_at' =>$model->authorized_at, 'created_at' =>$model->created_at, 'updated_at' =>$model->updated_at, - 'deleted_at' =>$model->deleted_at, + 'deleted_at' =>$model->deleted_at, 'created_by' =>$model->created_by, 'updated_by' =>$model->updated_by, 'deleted_by' =>$model->deleted_by ]; - + PenawaranDetailTenderLog::create($dataDetailPenawaranLog); // log - + $data['id']=$id; $dataku = ['status' => '0', @@ -333,7 +333,7 @@ class ProsesPenawaranUlangController extends Controller 'updated_at' => now() ]; - $model->update($dataku); + $model->update($dataku); DB::commit(); $data['status'] = 'success'; diff --git a/app/Http/Controllers/ResumeController.php b/app/Http/Controllers/ResumeController.php new file mode 100644 index 0000000..ed85d1a --- /dev/null +++ b/app/Http/Controllers/ResumeController.php @@ -0,0 +1,29 @@ +first(); + + // Kalau tidak ketemu nomor registrasi dengan tabel penawaran + if (!$penawaran) { + return redirect()->route('tender.penawaran.createPenawaran', ['noreg' => $noreg]) + ->with('error', 'Anda Belum Membuat Penawaran. Silahkan isi terlebih dahulu!'); + } + // Jika batas tanggal penawaran sudah lewat + if ($penawaran->end_date < date('Y-m-d')) { + return redirect()->route('tender.penawaran.editPenawaran', ['noreg' => $noreg]) + ->with('error', 'Sudah Kadaluarsa. Silahkan perpanjang tanggal penawaran terlebih dahulu!'); + } + + return view('lpj::penawaran.surat_tender', compact('penawaran', 'noreg')); } public function datatablesPenawaran(Request $request) diff --git a/app/Http/Requests/BranchRequest.php b/app/Http/Requests/BranchRequest.php deleted file mode 100644 index ddc2978..0000000 --- a/app/Http/Requests/BranchRequest.php +++ /dev/null @@ -1,40 +0,0 @@ - 'required|string|max:255', - 'status' => 'nullable|boolean', - 'authorized_at' => 'nullable|datetime', - 'authorized_status' => 'nullable|string|max:1', - 'authorized_by' => 'nullable|exists:users,id', - ]; - - if ($this->method() == 'PUT') { - $rules['code'] = 'required|string|max:3|unique:branches,code,' . $this->id; - } else { - $rules['code'] = 'required|string|max:3|unique:branches,code'; - } - - return $rules; - } - - /** - * Determine if the user is authorized to make this request. - */ - public function authorize() - : bool - { - return true; - } - } diff --git a/app/Http/Requests/CurrencyRequest.php b/app/Http/Requests/CurrencyRequest.php deleted file mode 100644 index fded635..0000000 --- a/app/Http/Requests/CurrencyRequest.php +++ /dev/null @@ -1,41 +0,0 @@ - 'required|string|max:255', - 'decimal_places' => 'nullable|integer|between:0,3', - 'status' => 'nullable|boolean', - 'authorized_at' => 'nullable|datetime', - 'authorized_status' => 'nullable|string|max:1', - 'authorized_by' => 'nullable|exists:users,id', - ]; - - if ($this->method() == 'PUT') { - $rules['code'] = 'required|string|max:3|unique:currencies,code,' . $this->id; - } else { - $rules['code'] = 'required|string|max:3|unique:currencies,code'; - } - - return $rules; - } - - /** - * Determine if the user is authorized to make this request. - */ - public function authorize() - : bool - { - return true; - } - } diff --git a/app/Http/Requests/DebitureRequest.php b/app/Http/Requests/DebitureRequest.php index 7f83fbb..40b608e 100644 --- a/app/Http/Requests/DebitureRequest.php +++ b/app/Http/Requests/DebitureRequest.php @@ -4,6 +4,7 @@ use Illuminate\Foundation\Http\FormRequest; use Modules\Lpj\Rules\UniqueCifExceptZero; + use Modules\Lpj\Rules\UniqueExcept; class DebitureRequest extends FormRequest { diff --git a/app/Http/Requests/JenisLegalitasJaminanRequest.php b/app/Http/Requests/JenisLegalitasJaminanRequest.php index 1d5d98c..82fb205 100644 --- a/app/Http/Requests/JenisLegalitasJaminanRequest.php +++ b/app/Http/Requests/JenisLegalitasJaminanRequest.php @@ -15,9 +15,11 @@ : array { return [ - 'code' => 'required|max:6', - 'name' => 'required|max:255', - 'slug' => 'required|max:255', + 'code' => 'required|max:6', + 'name' => 'required|max:255', + 'slug' => 'required|max:255', + 'custom_field' => 'nullable|max:255', + 'custom_field_type' => 'nullable|max:255', ]; } @@ -32,7 +34,7 @@ public function prepareForValidation() { - if($this->method() == 'POST' && $this->code == null) { + if ($this->method() == 'POST' && $this->code == null) { $this->merge([ 'code' => IdGenerator::generate( ['table' => 'jenis_legalitas_jaminan', 'length' => 6, 'prefix' => 'JLJ', 'field' => 'code'], @@ -41,7 +43,7 @@ ]); } else { $this->merge([ - 'slug' => Str::slug($this->name), + 'slug' => Str::slug($this->name), ]); } } diff --git a/app/Http/Requests/PemilikJaminanRequest.php b/app/Http/Requests/PemilikJaminanRequest.php index b6e267d..e139f55 100644 --- a/app/Http/Requests/PemilikJaminanRequest.php +++ b/app/Http/Requests/PemilikJaminanRequest.php @@ -26,6 +26,7 @@ 'address' => 'nullable|string', 'postal_code' => 'nullable|string|max:10', 'status' => 'nullable|boolean', + 'detail_sertifikat' => 'nullable|string|max:255', ]; //$rules['nomor_id'] = 'nullable|max:16|unique:pemilik_jaminan,nomor_id,debiture_id,' . $this->debiture_id; @@ -41,4 +42,24 @@ { return true; } + + public function prepareForValidation() { + + $detailSertifikat = []; + $names = $this->input('detail_sertifikat.name', []); + $nomorIds = $this->input('detail_sertifikat.nomor_id', []); + + foreach ($names as $index => $name) { + if (isset($nomorIds[$index])) { + $detailSertifikat[] = [ + 'name' => $name, + 'nomor_id' => $nomorIds[$index] + ]; + } + } + + $this->merge([ + 'detail_sertifikat' => json_encode($detailSertifikat), + ]); + } } diff --git a/app/Http/Requests/PermohonanRequest.php b/app/Http/Requests/PermohonanRequest.php index 868498f..8d6ef20 100644 --- a/app/Http/Requests/PermohonanRequest.php +++ b/app/Http/Requests/PermohonanRequest.php @@ -20,7 +20,7 @@ 'branch_id' => 'required|exists:branches,id', 'tujuan_penilaian_id' => 'required|exists:tujuan_penilaian,id', 'debiture_id' => 'required|exists:debitures,id', - 'status' => 'required|string|default:order', + 'status' => 'required|string', 'jenis_fasilitas_kredit_id' => 'required|exists:jenis_fasilitas_kredit,id', 'nilai_plafond_id' => 'required|exists:nilai_plafond,id', 'status_bayar' => 'required|string', diff --git a/app/Http/Requests/TenderPenawaranRequest.php b/app/Http/Requests/TenderPenawaranRequest.php index 6472638..85e66a5 100644 --- a/app/Http/Requests/TenderPenawaranRequest.php +++ b/app/Http/Requests/TenderPenawaranRequest.php @@ -63,13 +63,17 @@ class TenderPenawaranRequest extends FormRequest $endDate = strtotime($this->input('end_date')); $today = strtotime(date('Y-m-d')); + // Jika dalam keadaan tambah penawaran maka munculkan pesan ini + if ($this->method() !== 'PUT') { + if ($startDate < $today) { + $validator->errors()->add('start_date', 'Tanggal Awal tidak boleh sebelum hari ini.'); + } + } + if ($endDate < $startDate) { $validator->errors()->add('end_date', 'Tanggal Akhir tidak boleh lebih awal dari Tanggal Awal.'); } - if ($startDate < $today) { - $validator->errors()->add('start_date', 'Tanggal Awal tidak boleh sebelum hari ini.'); - } // Validasi minimal 3 pilihan pada nama_kjpp $namaKjpp = $this->input('kjpp', []); diff --git a/app/Models/Branch.php b/app/Models/Branch.php index 834b5cc..ccc208d 100644 --- a/app/Models/Branch.php +++ b/app/Models/Branch.php @@ -2,13 +2,10 @@ namespace Modules\Lpj\Models; -use Modules\Lpj\Database\Factories\BranchFactory; +use Modules\Basicdata\Models\Branch as BasicdataBranch; -class Branch extends Base +class Branch extends BasicdataBranch { - protected $table = 'branches'; - protected $fillable = ['code', 'name', 'status', 'authorized_at', 'authorized_status', 'authorized_by']; - public function debitures() { return $this->hasMany(Debiture::class, 'branch_id', 'id'); diff --git a/app/Models/Currency.php b/app/Models/Currency.php deleted file mode 100644 index 454c834..0000000 --- a/app/Models/Currency.php +++ /dev/null @@ -1,20 +0,0 @@ -hasMany(PenawaranTender::class, 'jenis_laporan_id', 'id'); + } } diff --git a/app/Models/JenisLegalitasJaminan.php b/app/Models/JenisLegalitasJaminan.php index 2d7567c..dd8f840 100644 --- a/app/Models/JenisLegalitasJaminan.php +++ b/app/Models/JenisLegalitasJaminan.php @@ -7,5 +7,5 @@ class JenisLegalitasJaminan extends Base { protected $table = 'jenis_legalitas_jaminan'; - protected $fillable = ['code', 'name','slug']; + protected $fillable = ['code', 'name','slug','custom_field','custom_field_type']; } diff --git a/app/Models/PemilikJaminan.php b/app/Models/PemilikJaminan.php index d92dc0c..6f0addc 100644 --- a/app/Models/PemilikJaminan.php +++ b/app/Models/PemilikJaminan.php @@ -30,7 +30,8 @@ class PemilikJaminan extends Base 'status', 'authorized_at', 'authorized_status', - 'authorized_by' + 'authorized_by', + 'detail_sertifikat', ]; public function province() diff --git a/app/Models/PenawaranTender.php b/app/Models/PenawaranTender.php index be2b5a8..4ae1496 100644 --- a/app/Models/PenawaranTender.php +++ b/app/Models/PenawaranTender.php @@ -36,4 +36,14 @@ class PenawaranTender extends Model { return $this->hasMany(TujuanPenilaianKJPP::class, 'id', 'tujuan_penilaian_kjpp_id'); } + + public function permohonan() + { + return $this->belongsTo(Permohonan::class, 'nomor_registrasi', 'nomor_registrasi'); + } + + public function jenisLaporan() + { + return $this->belongsTo(JenisLaporan::class, 'jenis_laporan_id', 'id'); + } } diff --git a/app/Models/Permohonan.php b/app/Models/Permohonan.php index 8e4676b..ae61e24 100644 --- a/app/Models/Permohonan.php +++ b/app/Models/Permohonan.php @@ -2,16 +2,12 @@ namespace Modules\Lpj\Models; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Modules\Lpj\Database\Factories\PermohonanFactory; use Modules\Usermanagement\Models\User; -use Modules\Lpj\Models\TujuanPenilaian; -use Modules\Lpj\Models\JenisFasilitasKredit; class Permohonan extends Base { - protected $table = 'permohonan'; + protected $table = 'permohonan'; protected $fillable = [ 'nomor_registrasi', 'tanggal_permohonan', @@ -41,7 +37,7 @@ class Permohonan extends Base 'registrasi_by', 'registrasi_at', 'jenis_penilaian_id', - 'region_id' + 'region_id', ]; public function user() @@ -81,6 +77,11 @@ class Permohonan extends Base public function penilaian() { - return $this->belongsTo(Penilaian::class, 'nomor_registrasi', 'nomor_registrasi'); + return $this->belongsTo(Penilaian::class, 'nomor_registrasi', 'nomor_registrasi'); + } + + public function penawaranTender() + { + return $this->hasMany(PenawaranTender::class, 'nomor_registrasi'); } } diff --git a/app/Models/SLA.php b/app/Models/SLA.php new file mode 100644 index 0000000..3646abf --- /dev/null +++ b/app/Models/SLA.php @@ -0,0 +1,18 @@ +id = $id; - } + protected $id; - public function validate($attribute, $value, $fail): void - { - if (Debiture::where($attribute, $value) - ->where('id', '!=', $this->id) - ->where($attribute, '!=', '0000000000') - ->exists()) { - $fail('The :attribute field must be uniquse.'.$this->id); + public function __construct($id = null) + { + $this->id = $id; + } + + /** + * Run the validation rule. + */ + public function validate(string $attribute, mixed $value, Closure $fail) + : void { + if ($value !== '0000000000' && $value !== null && Debiture::query()->where($attribute, $value)->when( + $this->id, + function ($query) { + $query->where('id', '!=', $this->id); + }, + )->exists()) { + $fail('The :attribute field must be unique.'); + } } } -} diff --git a/database/migrations/2024_10_28_095337_create_s_l_as_table.php b/database/migrations/2024_10_28_095337_create_s_l_as_table.php new file mode 100644 index 0000000..bf5549c --- /dev/null +++ b/database/migrations/2024_10_28_095337_create_s_l_as_table.php @@ -0,0 +1,27 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('sla'); + } +}; diff --git a/database/migrations/2024_11_01_023117_update_debitures_table.php b/database/migrations/2024_11_01_023117_update_debitures_table.php new file mode 100644 index 0000000..cadf6b0 --- /dev/null +++ b/database/migrations/2024_11_01_023117_update_debitures_table.php @@ -0,0 +1,28 @@ +dropUnique(['cif']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('debitures', function (Blueprint $table) { + $table->string('cif')->unique()->change(); + }); + } +}; diff --git a/database/migrations/2024_11_01_083625_update_pemilik_jaminan_table.php b/database/migrations/2024_11_01_083625_update_pemilik_jaminan_table.php new file mode 100644 index 0000000..ec38fd5 --- /dev/null +++ b/database/migrations/2024_11_01_083625_update_pemilik_jaminan_table.php @@ -0,0 +1,28 @@ +string('detail_sertifikat')->nullable()->after('name'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('pemilik_jaminan', function (Blueprint $table) { + $table->dropColumn('detail_sertifikat'); + }); + } +}; diff --git a/database/migrations/2024_11_04_080443_update_jenis_legalitas_jaminan_table.php b/database/migrations/2024_11_04_080443_update_jenis_legalitas_jaminan_table.php new file mode 100644 index 0000000..e8e93e6 --- /dev/null +++ b/database/migrations/2024_11_04_080443_update_jenis_legalitas_jaminan_table.php @@ -0,0 +1,30 @@ +string('custom_field')->nullable()->after('slug'); + $table->string('custom_field_type')->nullable()->after('custom_field'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('jenis_legalitas_jaminan', function (Blueprint $table) { + $table->dropColumn('custom_field'); + $table->dropColumn('custom_field_type'); + }); + } +}; diff --git a/database/migrations/2024_11_04_083227_update_detail_dokumen_jaminan_table.php b/database/migrations/2024_11_04_083227_update_detail_dokumen_jaminan_table.php new file mode 100644 index 0000000..ad58fbf --- /dev/null +++ b/database/migrations/2024_11_04_083227_update_detail_dokumen_jaminan_table.php @@ -0,0 +1,28 @@ +string('details')->nullable()->after('dokumen_jaminan_id'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('detail_dokumen_jaminan', function (Blueprint $table) { + $table->dropColumn('details'); + }); + } +}; diff --git a/database/seeders/ArahMataAnginSeeder.php b/database/seeders/ArahMataAnginSeeder.php new file mode 100644 index 0000000..1e012ea --- /dev/null +++ b/database/seeders/ArahMataAnginSeeder.php @@ -0,0 +1,42 @@ + 'Utara', + ], + [ + 'name' => 'Timur Laut', + ], + [ + 'name' => 'Timur', + ], + [ + 'name' => 'Tenggara', + ], + [ + 'name' => 'Selatan', + ], + [ + 'name' => 'Barat Daya', + ], + [ + 'name' => 'Barat', + ], + [ + 'name' => 'Barat Laut', + ], + ]); + } +} diff --git a/database/seeders/BranchSeeder.php b/database/seeders/BranchSeeder.php new file mode 100644 index 0000000..65a64a1 --- /dev/null +++ b/database/seeders/BranchSeeder.php @@ -0,0 +1,27 @@ + 'C01', + 'name' => 'KPNO', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/CurrencySeeder.php b/database/seeders/CurrencySeeder.php new file mode 100644 index 0000000..c2cd553 --- /dev/null +++ b/database/seeders/CurrencySeeder.php @@ -0,0 +1,48 @@ + 'IDR', + 'name' => 'Rupiah', + 'decimal_places' => 2, + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'MYR', + 'name' => 'Ringgit', + 'decimal_places' => 2, + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'SAR', + 'name' => 'Riyadh', + 'decimal_places' => 2, + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/DebitureSeeder.php b/database/seeders/DebitureSeeder.php new file mode 100644 index 0000000..d8f57c1 --- /dev/null +++ b/database/seeders/DebitureSeeder.php @@ -0,0 +1,158 @@ + 1, + 'cif' => '1234567890', + 'name' => 'Willy', + 'npwp' => '123455432109876', + 'email' => 'w@gmail.com', + 'phone' => '08113242341', + 'nomor_rekening' => '1081666666', + 'province_code' => '31', + 'city_code' => '31.74', + 'district_code' => '31.74.09', + 'village_code' => '31.74.09.1003', + 'postal_code' => '12630', + 'address' => null, + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'branch_id' => 1, + 'cif' => '0987654321', + 'name' => 'Antonius Ginting', + 'npwp' => '234567890123456', + 'email' => 'x@gmail.com', + 'phone' => '081234567891', + 'nomor_rekening' => '987654310', + 'province_code' => '31', + 'city_code' => '31.71', + 'district_code' => '31.71.06', + 'village_code' => '31.71.06.1001', + 'postal_code' => '10310', + 'address' => 'Jl. Menteng Tengah No.66', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'branch_id' => 1, + 'cif' => '1518467', + 'name' => 'PT ABCD SEJATI', + 'npwp' => '001852600023342', + 'email' => 'abcd@ag.co.id', + 'phone' => '081111555', + 'nomor_rekening' => '0082346', + 'province_code' => '31', + 'city_code' => '31.74', + 'district_code' => '31.74.04', + 'village_code' => '31.74.04.1005', + 'postal_code' => '10420', + 'address' => 'Jl. Raya Kwitang No. 105, Senen, Kwitang, Jakarta Pusat', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'branch_id' => 1, + 'cif' => '12345', + 'name' => 'Testing', + 'npwp' => '102928018391211', + 'email' => 'testing@email.com', + 'phone' => '098172386', + 'nomor_rekening' => '12345', + 'province_code' => '11', + 'city_code' => '11.01', + 'district_code' => '11.01.01', + 'village_code' => '11.01.01.2001', + 'postal_code' => '23773', + 'address' => 'alamat', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'branch_id' => 1, + 'cif' => '0000000000', + 'name' => 'Gartika Pertiwi', + 'npwp' => '123456789101112', + 'email' => 'Gartika_Pertiwi@gmail.com', + 'phone' => '1234567', + 'nomor_rekening' => '1234567', + 'province_code' => '31', + 'city_code' => '31.71', + 'district_code' => '31.71.04', + 'village_code' => '31.71.04.1005', + 'postal_code' => '10420', + 'address' => null, + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'branch_id' => 1, + 'cif' => '1235464575', + 'name' => 'Fleming', + 'npwp' => '123455432109876', + 'email' => 'x@gmail.com', + 'phone' => '08113242341', + 'nomor_rekening' => '1081666666', + 'province_code' => '31', + 'city_code' => '31.74', + 'district_code' => '31.74.09', + 'village_code' => '31.74.09.1001', + 'postal_code' => '12620', + 'address' => 'testt', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'branch_id' => 1, + 'cif' => '1234689743', + 'name' => 'Testing 2', + 'npwp' => '1234689743418451', + 'email' => 'testing@mail.com', + 'phone' => '081385777611', + 'nomor_rekening' => '3575467279562', + 'province_code' => '31', + 'city_code' => '31.71', + 'district_code' => '31.71.06', + 'village_code' => '31.71.06.1001', + 'postal_code' => '10310', + 'address' => 'Jl. Menteng Raya no. 13', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + ]); + } +} diff --git a/database/seeders/DetailDokumenJaminanSeeder.php b/database/seeders/DetailDokumenJaminanSeeder.php new file mode 100644 index 0000000..0fb3f84 --- /dev/null +++ b/database/seeders/DetailDokumenJaminanSeeder.php @@ -0,0 +1,73 @@ + 'Tanah Bangunan', + 'dokumen_jaminan_id' => 1, + 'jenis_legalitas_jaminan_id' => 1, + 'dokumen_jaminan' => 'jaminan/1/1/Test.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Tanah Bangunan', + 'dokumen_jaminan_id' => 1, + 'jenis_legalitas_jaminan_id' => 3, + 'dokumen_jaminan' => 'jaminan/1/1/Test.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Tanah Bangunan', + 'dokumen_jaminan_id' => 1, + 'jenis_legalitas_jaminan_id' => 4, + 'dokumen_jaminan' => 'jaminan/1/1/Test.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Tanah Bangunan', + 'dokumen_jaminan_id' => 1, + 'jenis_legalitas_jaminan_id' => 5, + 'dokumen_jaminan' => 'jaminan/1/1/Test.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Tanah Bangunan', + 'dokumen_jaminan_id' => 1, + 'jenis_legalitas_jaminan_id' => 6, + 'dokumen_jaminan' => 'jaminan/1/1/Test.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/DetailPenawaranSeeder.php b/database/seeders/DetailPenawaranSeeder.php new file mode 100644 index 0000000..de38595 --- /dev/null +++ b/database/seeders/DetailPenawaranSeeder.php @@ -0,0 +1,54 @@ + 1, + 'penawaran_id' => 1, + 'biaya_penawaran' => 15000000, + 'attachment' => 'Test.pdf', + 'dokumen_persetujuan' => 'uploads/penawaran/1_1_Test_2_1729826174.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'kjpp_rekanan_id' => 2, + 'penawaran_id' => 1, + 'biaya_penawaran' => 30000000, + 'attachment' => 'Test.pdf', + 'dokumen_persetujuan' => 'uploads/penawaran/2_2_Test_2_1729826198.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'kjpp_rekanan_id' => 3, + 'penawaran_id' => 1, + 'biaya_penawaran' => 20000000, + 'attachment' => 'Test.pdf', + 'dokumen_persetujuan' => 'uploads/penawaran/3_3_Test_2_1729826215.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/DokumenJaminanSeeder.php b/database/seeders/DokumenJaminanSeeder.php new file mode 100644 index 0000000..17f53c6 --- /dev/null +++ b/database/seeders/DokumenJaminanSeeder.php @@ -0,0 +1,34 @@ + 1, + 'jenis_jaminan_id' => 1, + 'pemilik_jaminan_id' => 3, + 'province_code' => '32', + 'city_code' => '32.75', + 'district_code' => '32.75.03', + 'village_code' => '32.75.03.1001', + 'postal_code' => '17125', + 'address' => 'Jl. Apel No. 9', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/HubunganPemilikJaminanSeeder.php b/database/seeders/HubunganPemilikJaminanSeeder.php new file mode 100644 index 0000000..662d7ee --- /dev/null +++ b/database/seeders/HubunganPemilikJaminanSeeder.php @@ -0,0 +1,36 @@ + 'Milik Pribadi' + ], + [ + 'name' => 'Suami/Istri' + ], + [ + 'name' => 'Anak' + ], + [ + 'name' => 'Saudara Kandung' + ], + [ + 'name' => 'Ayah' + ], + [ + 'name' => 'Ibu' + ] + ]); + } +} diff --git a/database/seeders/HubunganPenghuniJaminanSeeder.php b/database/seeders/HubunganPenghuniJaminanSeeder.php new file mode 100644 index 0000000..74abbc8 --- /dev/null +++ b/database/seeders/HubunganPenghuniJaminanSeeder.php @@ -0,0 +1,33 @@ + 'Suami/Istri', + ], + [ + 'name' => 'Anak', + ], + [ + 'name' => 'Saudara Kandung', + ], + [ + 'name' => 'Orang Tua', + ], + [ + 'name' => 'Kontrak/Kost' + ] + ]); + } +} diff --git a/database/seeders/IjinUsahaSeeder.php b/database/seeders/IjinUsahaSeeder.php new file mode 100644 index 0000000..10ccc2a --- /dev/null +++ b/database/seeders/IjinUsahaSeeder.php @@ -0,0 +1,39 @@ + 'IU001', + 'name' => 'Bisnis', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'IU002', + 'name' => 'Properti', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'IU003', + 'name' => 'Personal Properti', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ] + ]); + } +} diff --git a/database/seeders/JenisDokumenSeeder.php b/database/seeders/JenisDokumenSeeder.php new file mode 100644 index 0000000..6535c47 --- /dev/null +++ b/database/seeders/JenisDokumenSeeder.php @@ -0,0 +1,68 @@ + 'Sertifikat', + 'max_size' => 15, + 'description' => 'Foto copy Sertifikat sesuai dengan asli', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'PBB/NJOP', + 'max_size' => 15, + 'description' => 'Foto Copy PBB/NJOP Tahun Terakhir', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'NPWP Perorangan/Perusahaan', + 'max_size' => 10, + 'description' => 'Copy NPWP Perorangan/Perusahaan', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Siteplan', + 'max_size' => 10, + 'description' => 'Siteplan', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Surat Pernyataan Kebenaran Data', + 'max_size' => 5, + 'description' => 'Surat Pernyataan Kebenaran Data (Surat Representasi)', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/JenisFasilitasKreditSeeder.php b/database/seeders/JenisFasilitasKreditSeeder.php new file mode 100644 index 0000000..27512b4 --- /dev/null +++ b/database/seeders/JenisFasilitasKreditSeeder.php @@ -0,0 +1,90 @@ + 'JFK001', + 'name' => 'KPR FLPP', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JFK002', + 'name' => 'KPR KERJASAMA', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JFK003', + 'name' => 'KPR ≤ 500 JT', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JFK004', + 'name' => 'KPR > 500 JT', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JFK005', + 'name' => 'KKB', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JFK006', + 'name' => 'KPA', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JFK007', + 'name' => 'MODAL KERJA', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JFK008', + 'name' => 'INVESTASI', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + ]); + } +} diff --git a/database/seeders/JenisJaminanSeeder.php b/database/seeders/JenisJaminanSeeder.php new file mode 100644 index 0000000..1f79185 --- /dev/null +++ b/database/seeders/JenisJaminanSeeder.php @@ -0,0 +1,73 @@ + 'JJ001', + 'name' => 'Tanah', + 'slug' => 'tanah', + 'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ003","JLJ004","JLJ005","JLJ006"]', + 'created_at' => now(), + 'updated_at' => now(), + 'authorized_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JJ002', + 'name' => 'Rumah Tinggal / Ruko (Unit) / Apartemen (Unit) / Gudang', + 'slug' => 'rumah-tinggal-ruko-unit-apartemen-unit-gudang', + 'jenis_legalitas_jaminan_id' => null, + 'created_at' => now(), + 'updated_at' => now(), + 'authorized_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JJ003', + 'name' => 'Kawasan Industrial / Komersil / Residensial - Perumahan', + 'slug' => 'kawasan-industrial-komersil-residensial-perumahan', + 'jenis_legalitas_jaminan_id' => null, + 'created_at' => now(), + 'updated_at' => now(), + 'authorized_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JJ004', + 'name' => 'Gedung Apartement / Kantor / Condotel (Strata Tittle)', + 'slug' => 'gedung-apartement-kantor-condotel-strata-tittle', + 'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ002"]', + 'created_at' => now(), + 'updated_at' => now(), + 'authorized_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'JJ005', + 'name' => 'Mall', + 'slug' => 'mall', + 'jenis_legalitas_jaminan_id' => '["JLJ001","JLJ006"]', + 'created_at' => now(), + 'updated_at' => now(), + 'authorized_at' => null, + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/JenisLaporanSeeder.php b/database/seeders/JenisLaporanSeeder.php new file mode 100644 index 0000000..b979f74 --- /dev/null +++ b/database/seeders/JenisLaporanSeeder.php @@ -0,0 +1,32 @@ + 'JL001', + 'name' => 'Short Report', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'JL002', + 'name' => 'Full Report', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ] + ]); + } +} diff --git a/database/seeders/JenisLegalitasJaminanSeeder.php b/database/seeders/JenisLegalitasJaminanSeeder.php new file mode 100644 index 0000000..fa45d3a --- /dev/null +++ b/database/seeders/JenisLegalitasJaminanSeeder.php @@ -0,0 +1,90 @@ + 'JLJ001', + 'name' => 'Sertifikat', + 'slug' => 'sertifikat', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'JLJ002', + 'name' => 'SHGB', + 'slug' => 'shgb', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => now(), + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => 1 + ], + [ + 'code' => 'JLJ003', + 'name' => 'Copy PBB / NJOP Tahun Terakhir (Jika Ada)', + 'slug' => 'copy-pbb-njop-tahun-terakhir-jika-ada', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'JLJ004', + 'name' => 'Copy NPWP Perusahaan/Perorangan', + 'slug' => 'copy-npwp-perusahaanperorangan', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'JLJ005', + 'name' => 'Siteplan', + 'slug' => 'siteplan', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'JLJ006', + 'name' => 'Surat Pernyataan Kebenaran Data (Surat Representasi)', + 'slug' => 'surat-pernyataan-kebenaran-data-surat-representasi', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + ]); + } +} diff --git a/database/seeders/JenisPenilaianSeeder.php b/database/seeders/JenisPenilaianSeeder.php new file mode 100644 index 0000000..2534811 --- /dev/null +++ b/database/seeders/JenisPenilaianSeeder.php @@ -0,0 +1,30 @@ + 'JP1', + 'name' => 'Internal', + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'JP2', + 'name' => 'External', + 'created_at' => now(), + 'updated_at' => now() + ], + ]); + } +} diff --git a/database/seeders/KJPPSeeder.php b/database/seeders/KJPPSeeder.php new file mode 100644 index 0000000..97a583f --- /dev/null +++ b/database/seeders/KJPPSeeder.php @@ -0,0 +1,102 @@ + 'K000101', + 'name' => 'Bank Anda', + 'jenis_kantor' => 'Kantor Pusat', + 'nomor_ijin_usaha' => 'IU001', + 'province_code' => '32', + 'city_code' => '32.75', + 'district_code' => '32.75.03', + 'village_code' => '32.75.03.1001', + 'address' => 'Jl. Apel no. 1', + 'postal_code' => '17125', + 'nomor_telepon_kantor' => '0219976896', + 'email_kantor' => 'bankanda@bankanda.id', + 'nama_pimpinan' => 'Ida Royani', + 'nomor_hp_pimpinan' => '081800908070', + 'nama_pic_reviewer' => 'Beno', + 'nomor_hp_pic_reviewer' => '081765489070', + 'nama_pic_admin' => 'Dani', + 'nomor_hp_pic_admin' => '081278786666', + 'nama_pic_marketing' => 'Feni', + 'nomor_hp_pic_marketing' => '087867590801', + 'ijin_usaha_id' => '["IU001","IU002"]', + 'jenis_aset_id' => '["JJ001","JJ002","JJ003"]', + 'attachment' => 'default.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'K000201', + 'name' => 'Bank Juri', + 'jenis_kantor' => 'Kantor Pusat', + 'nomor_ijin_usaha' => 'IU001', + 'province_code' => '12', + 'city_code' => '12.04', + 'district_code' => '12.04.11', + 'village_code' => '12.04.11.2005', + 'address' => 'Jl. Mangga no. 1', + 'postal_code' => '22876', + 'nomor_telepon_kantor' => '0219976890', + 'email_kantor' => 'bankjuri@bankjuri.id', + 'nama_pimpinan' => 'Arif Simbolo bolo', + 'nomor_hp_pimpinan' => '089643475023', + 'nama_pic_reviewer' => 'Beno Harefa', + 'nomor_hp_pic_reviewer' => '081765489080', + 'nama_pic_admin' => 'Dani Harefa', + 'nomor_hp_pic_admin' => '081278786667', + 'nama_pic_marketing' => 'Feni Harefa', + 'nomor_hp_pic_marketing' => '081765489075', + 'ijin_usaha_id' => '["IU001","IU002","IU003"]', + 'jenis_aset_id' => '["JJ001","JJ004","JJ003"]', + 'attachment' => 'default.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'K000301', + 'name' => 'Bank Gantra', + 'jenis_kantor' => 'Kantor Pusat', + 'nomor_ijin_usaha' => 'IU001', + 'province_code' => '12', + 'city_code' => '12.21', + 'district_code' => '12.21.05', + 'village_code' => '12.21.05.2005', + 'address' => 'Jl. Apel no. 1', + 'postal_code' => '22776', + 'nomor_telepon_kantor' => '0219976889', + 'email_kantor' => 'bankgantra@bankgantra.id', + 'nama_pimpinan' => 'Arif Simantra', + 'nomor_hp_pimpinan' => '089643475020', + 'nama_pic_reviewer' => 'Beno Aditya', + 'nomor_hp_pic_reviewer' => '081765489079', + 'nama_pic_admin' => 'Dani Maulana', + 'nomor_hp_pic_admin' => '081278786680', + 'nama_pic_marketing' => 'Feni Rose', + 'nomor_hp_pic_marketing' => '081890901234', + 'ijin_usaha_id' => '["IU001","IU002","IU003"]', + 'jenis_aset_id' => '["JJ001","JJ002","JJ005"]', + 'attachment' => 'default.pdf', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ] + ]); + } +} diff --git a/database/seeders/LpjDatabaseSeeder.php b/database/seeders/LpjDatabaseSeeder.php index 242ef68..d81021d 100644 --- a/database/seeders/LpjDatabaseSeeder.php +++ b/database/seeders/LpjDatabaseSeeder.php @@ -1,17 +1,45 @@ call([]); - } + $this->call([ + BranchSeeder::class, + CurrencySeeder::class, + JenisFasilitasKreditSeeder::class, + JenisLegalitasJaminanSeeder::class, + JenisJaminanSeeder::class, + JenisDokumenSeeder::class, + TujuanPenilaianSeeder::class, + NilaiPlatformSeeder::class, + HubunganPemilikJaminanSeeder::class, + HubunganPenghuniJaminanSeeder::class, + ArahMataAnginSeeder::class, + StatusPermohonanSeeder::class, + RegionSeeder::class, + TeamsSeeder::class, + TeamUsersSeeder::class, + JenisPenilaianSeeder::class, + TujuanPenilaianKJPPSeeder::class, + IjinUsahaSeeder::class, + JenisLaporanSeeder::class, + KJPPSeeder::class, + DebitureSeeder::class, + PermohonanSeeder::class, + PemilikJaminanSeeder::class, + DokumenJaminanSeeder::class, + DetailDokumenJaminanSeeder::class, + PenawaranSeeder::class, + DetailPenawaranSeeder::class, + PenilaianSeeder::class, + ]); } +} diff --git a/database/seeders/NilaiPlatformSeeder.php b/database/seeders/NilaiPlatformSeeder.php new file mode 100644 index 0000000..5631324 --- /dev/null +++ b/database/seeders/NilaiPlatformSeeder.php @@ -0,0 +1,45 @@ + 'NP001', + 'name' => '5 M - 10 M', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'NP002', + 'name' => '2 M - 5 M', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'NP003', + 'name' => '< 2M', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/PemilikJaminanSeeder.php b/database/seeders/PemilikJaminanSeeder.php new file mode 100644 index 0000000..57e1c09 --- /dev/null +++ b/database/seeders/PemilikJaminanSeeder.php @@ -0,0 +1,118 @@ + 2, + 'hubungan_pemilik_jaminan_id' => 1, + 'name' => 'Antonius Ginting', + 'npwp' => '234567890123456', + 'nomor_id' => '13144213123', + 'email' => 'x@gmail.com', + 'phone' => '081234567891', + 'province_code' => '31', + 'city_code' => '31.71', + 'district_code' => '31.71.06', + 'village_code' => '31.71.06.1001', + 'postal_code' => '10310', + 'address' => 'Jl. Menteng Tengah No.66', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'debiture_id' => 7, + 'hubungan_pemilik_jaminan_id' => 1, + 'name' => 'Rahmat Rafli', + 'npwp' => '1234689743418451', + 'nomor_id' => '32754590325823', + 'email' => 'testing@mail.com', + 'phone' => '081385777611', + 'province_code' => '32', + 'city_code' => '32.75', + 'district_code' => '32.75.03', + 'village_code' => '32.75.03.1001', + 'postal_code' => '10310', + 'address' => 'Jl. Apel 1 no. 9', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'debiture_id' => 1, + 'hubungan_pemilik_jaminan_id' => 1, + 'name' => 'Willy', + 'npwp' => '123455432109876', + 'nomor_id' => null, + 'email' => 'w@gmail.com', + 'phone' => '08113242341', + 'province_code' => '31', + 'city_code' => '31.74', + 'district_code' => '31.74.09', + 'village_code' => '31.74.09.1003', + 'postal_code' => '12630', + 'address' => null, + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'debiture_id' => 4, + 'hubungan_pemilik_jaminan_id' => 1, + 'name' => 'Testing', + 'npwp' => '1029280183912111', + 'nomor_id' => null, + 'email' => 'testing@email.com', + 'phone' => '098172386', + 'province_code' => '11', + 'city_code' => '11.01', + 'district_code' => '11.01.01', + 'village_code' => '11.01.01.2001', + 'postal_code' => '23773', + 'address' => 'alamat', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'debiture_id' => 7, + 'hubungan_pemilik_jaminan_id' => 1, + 'name' => 'Testing 2', + 'npwp' => '1234689743418451', + 'nomor_id' => null, + 'email' => 'testing@mail.com', + 'phone' => '081385777611', + 'province_code' => '31', + 'city_code' => '31.71', + 'district_code' => '31.71.06', + 'village_code' => '31.71.06.1001', + 'postal_code' => '10310', + 'address' => 'Jl. Menteng Raya no. 13', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/PenawaranSeeder.php b/database/seeders/PenawaranSeeder.php new file mode 100644 index 0000000..3c20c12 --- /dev/null +++ b/database/seeders/PenawaranSeeder.php @@ -0,0 +1,46 @@ + 'NP001', + 'nomor_registrasi' => 'REG0000002', + 'tujuan_penilaian_kjpp_id' => 3, + 'jenis_laporan_id' => 2, + 'start_date' => '2024-10-21', + 'end_date' => '2024-10-28', + 'catatan' => 'Hai', + 'status' => 'tender', + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'code' => 'NP002', + 'nomor_registrasi' => 'REG0000003', + 'tujuan_penilaian_kjpp_id' => 1, + 'jenis_laporan_id' => 1, + 'start_date' => '2024-10-28', + 'end_date' => '2024-10-31', + 'catatan' => null, + 'status' => 'tender', + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/PenilaianSeeder.php b/database/seeders/PenilaianSeeder.php new file mode 100644 index 0000000..efed9ea --- /dev/null +++ b/database/seeders/PenilaianSeeder.php @@ -0,0 +1,51 @@ + 2, + 'teams_id' => 2, + 'tanggal_kunjungan' => now(), + 'keterangan' => 'Hai', + 'status' => 'done', + 'nomor_registrasi' => 'REG0000010', + 'penilaian_id' => 2, + 'surveyor_id' => 1, + 'penilai_surveyor_id' => 1 + ], + [ + 'jenis_penilaian_id' => 2, + 'teams_id' => 1, + 'tanggal_kunjungan' => now(), + 'keterangan' => 'Hello', + 'status' => 'done', + 'nomor_registrasi' => 'REG0000008', + 'penilaian_id' => 2, + 'surveyor_id' => 1, + 'penilai_surveyor_id' => 1 + ], + [ + 'jenis_penilaian_id' => 2, + 'teams_id' => 2, + 'tanggal_kunjungan' => now(), + 'keterangan' => 'Hello', + 'status' => 'done', + 'nomor_registrasi' => 'REG0000007', + 'penilaian_id' => 1, + 'surveyor_id' => 1, + 'penilai_surveyor_id' => 1 + ] + ]); + } +} diff --git a/database/seeders/PermohonanSeeder.php b/database/seeders/PermohonanSeeder.php new file mode 100644 index 0000000..f43aafb --- /dev/null +++ b/database/seeders/PermohonanSeeder.php @@ -0,0 +1,126 @@ + 'REG0000002', + 'tanggal_permohonan' => '2024-09-11', + 'user_id' => 1, + 'branch_id' => 1, + 'tujuan_penilaian_id' => 1, + 'debiture_id' => 1, + 'status' => 'persetujuan-penawaran', + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1, + 'jenis_fasilitas_kredit_id' => 1, + 'nilai_plafond_id' => 1, + 'status_bayar' => 'sudah_bayar', + 'nilai_njop' => 'KJM3413259230951024', + 'jenis_penilaian_id' => 2 + ], + [ + 'nomor_registrasi' => 'REG0000003', + 'tanggal_permohonan' => '2024-09-13', + 'user_id' => 1, + 'branch_id' => 1, + 'tujuan_penilaian_id' => 1, + 'debiture_id' => 1, + 'status' => 'tender', + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1, + 'jenis_fasilitas_kredit_id' => 1, + 'nilai_plafond_id' => 1, + 'status_bayar' => 'sudah_bayar', + 'nilai_njop' => 'KJM3413259230951025', + 'jenis_penilaian_id' => 2 + ], + [ + 'nomor_registrasi' => 'REG0000006', + 'tanggal_permohonan' => '2024-10-18', + 'user_id' => 1, + 'branch_id' => 1, + 'tujuan_penilaian_id' => 1, + 'debiture_id' => 2, + 'status' => 'registered', + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1, + 'jenis_fasilitas_kredit_id' => 4, + 'nilai_plafond_id' => 1, + 'status_bayar' => 'sudah_bayar', + 'nilai_njop' => '23425654765868', + 'jenis_penilaian_id' => 2 + ], + [ + 'nomor_registrasi' => 'REG0000007', + 'tanggal_permohonan' => '2024-10-28', + 'user_id' => 1, + 'branch_id' => 1, + 'tujuan_penilaian_id' => 7, + 'debiture_id' => 4, + 'status' => 'done', + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1, + 'jenis_fasilitas_kredit_id' => 7, + 'nilai_plafond_id' => 1, + 'status_bayar' => 'sudah_bayar', + 'nilai_njop' => '421354365747658', + 'jenis_penilaian_id' => 2 + ], + [ + 'nomor_registrasi' => 'REG0000008', + 'tanggal_permohonan' => '2024-10-28', + 'user_id' => 1, + 'branch_id' => 1, + 'tujuan_penilaian_id' => 1, + 'debiture_id' => 7, + 'status' => 'done', + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1, + 'jenis_fasilitas_kredit_id' => 7, + 'nilai_plafond_id' => 2, + 'status_bayar' => 'sudah_bayar', + 'nilai_njop' => '421354365747659', + 'jenis_penilaian_id' => 2 + ], + [ + 'nomor_registrasi' => 'REG0000010', + 'tanggal_permohonan' => '2024-10-28', + 'user_id' => 1, + 'branch_id' => 1, + 'tujuan_penilaian_id' => 5, + 'debiture_id' => 7, + 'status' => 'done', + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1, + 'jenis_fasilitas_kredit_id' => 4, + 'nilai_plafond_id' => 1, + 'status_bayar' => 'sudah_bayar', + 'nilai_njop' => '421354365747660', + 'jenis_penilaian_id' => 2 + ] + ]); + } +} diff --git a/database/seeders/RegionSeeder.php b/database/seeders/RegionSeeder.php new file mode 100644 index 0000000..9b118a3 --- /dev/null +++ b/database/seeders/RegionSeeder.php @@ -0,0 +1,30 @@ + 'R01', + 'name' => 'Region 1', + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'R02', + 'name' => 'Region 2', + 'created_at' => now(), + 'updated_at' => now() + ] + ]); + } +} diff --git a/database/seeders/StatusPermohonanSeeder.php b/database/seeders/StatusPermohonanSeeder.php new file mode 100644 index 0000000..1cd6526 --- /dev/null +++ b/database/seeders/StatusPermohonanSeeder.php @@ -0,0 +1,128 @@ + 'Order', + 'slug' => 'order', + 'description' => 'Status pengisian pengajuan dari AO sampai dengan approval dari BD atau EO Pemohon', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Revisi', + 'slug' => 'revisi', + 'description' => 'Back to pemohon dari admin', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Register', + 'slug' => 'register', + 'description' => 'pengajuan pemohon yang sudah diperiksa admin dan diproses ke SO', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Assign', + 'slug' => 'assign', + 'description' => 'posisi dari SO ke penilai setelah penunjukkan penilai', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Survey', + 'slug' => 'survey', + 'description' => 'tanggal kunjungan yang sudah ditentukan', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Proses Laporan', + 'slug' => 'proses-laporan', + 'description' => 'posisi penginputan yang dilakukan oleh penilai, dengan indikator tanggal kunjungan sampai laporan selesai (sesuai SLA)', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Approved', + 'slug' => 'approved', + 'description' => 'Laporan atau resume selesai', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Delivered', + 'slug' => 'delivered', + 'description' => 'Sudah isi nilai likuidasi', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Registered', + 'slug' => 'registered', + 'description' => 'abc', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Tender', + 'slug' => 'tender', + 'description' => 'abc', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ], + [ + 'name' => 'Done', + 'slug' => 'done', + 'description' => 'abc', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'created_by' => 1, + 'updated_by' => 1 + ] + ]); + } +} diff --git a/database/seeders/TeamUsersSeeder.php b/database/seeders/TeamUsersSeeder.php new file mode 100644 index 0000000..959c1e4 --- /dev/null +++ b/database/seeders/TeamUsersSeeder.php @@ -0,0 +1,32 @@ + 1, + 'user_id' => 3, + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'teams_id' => 2, + 'user_id' => 4, + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ] + ]); + } +} diff --git a/database/seeders/TeamsSeeder.php b/database/seeders/TeamsSeeder.php new file mode 100644 index 0000000..a3f2595 --- /dev/null +++ b/database/seeders/TeamsSeeder.php @@ -0,0 +1,32 @@ + 1, + 'code' => 'T01', + 'name' => 'Penilai 1', + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'regions_id' => 2, + 'code' => 'T02', + 'name' => 'Penilai 2', + 'created_at' => now(), + 'updated_at' => now() + ] + ]); + } +} diff --git a/database/seeders/TujuanPenilaianKJPPSeeder.php b/database/seeders/TujuanPenilaianKJPPSeeder.php new file mode 100644 index 0000000..4e36cf6 --- /dev/null +++ b/database/seeders/TujuanPenilaianKJPPSeeder.php @@ -0,0 +1,46 @@ + 'TPK01', + 'name' => 'Transaksi Jual Beli Aset', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'TPK02', + 'name' => 'Penjaminan Utang atau Pembiayaan', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'TPK03', + 'name' => 'Pelaporan Keuangan', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ], + [ + 'code' => 'TPK04', + 'name' => 'Pengambilalihan atau Merger dan Akuisisi (M&A)', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now() + ] + ]); + } +} diff --git a/database/seeders/TujuanPenilaianSeeder.php b/database/seeders/TujuanPenilaianSeeder.php new file mode 100644 index 0000000..75f3a76 --- /dev/null +++ b/database/seeders/TujuanPenilaianSeeder.php @@ -0,0 +1,95 @@ + 'TP0001', + 'name' => 'Penilaian Baru', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'TP0002', + 'name' => 'Penilaian Ulang', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'TP0003', + 'name' => 'Review', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => now(), + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => 1 + ], + [ + 'code' => 'TP0004', + 'name' => 'Lelang', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'TP0005', + 'name' => 'RAP', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'TP0006', + 'name' => 'Revaluasi Aset', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ], + [ + 'code' => 'TP0007', + 'name' => 'Asuransi', + 'status' => 1, + 'created_at' => now(), + 'updated_at' => now(), + 'deleted_at' => null, + 'created_by' => 1, + 'updated_by' => 1, + 'deleted_by' => null + ] + ]); + } +} diff --git a/module.json b/module.json index 63e608d..02a4f14 100644 --- a/module.json +++ b/module.json @@ -6,9 +6,7 @@ "keywords": [], "priority": 0, "providers": ["Modules\\Lpj\\Providers\\LpjServiceProvider"], - "files": [ - "app/Helpers/Lpj.php" - ], + "files": ["app/Helpers/Lpj.php"], "menu": { "main": [ { @@ -193,7 +191,7 @@ "classes": "", "attributes": [], "permission": "", - "roles": ["ssenior-officero"] + "roles": ["senior-officer"] } ] }, @@ -214,16 +212,70 @@ "classes": "", "attributes": [], "permission": "", - "roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin","surveyor"] + "roles": [ + "administrator", + "pemohon-ao", + "pemohon-eo", + "admin", + "surveyor" + ] + }, + { + "title": "Penilai", + "path": "penilai", + "icon": "ki-filled ki-brush text-lg", + "classes": "", + "attributes": [], + "permission": "", + "roles": ["surveyor"] }, { "title": "Laporan", - "path": "", + "path": "laporan", "icon": "ki-filled ki-filter-tablet text-lg", "classes": "", "attributes": [], "permission": "", - "roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin", "senior-officer"] + "roles": [ + "administrator", + "pemohon-ao", + "pemohon-eo", + "admin", + "senior-officer" + ], + "sub": [ + { + "title": "Sederhana", + "path": "laporan.sederhana", + "classes": "", + "attributes": [], + "permission": "", + "roles": ["administrator", "admin"] + }, + { + "title": "Standard", + "path": "laporan.standard", + "classes": "", + "attributes": [], + "permission": "", + "roles": [ + "administrator", + "pemohon-ao", + "pemohon-eo", + "admin", + "senior-officer" + ] + } + ] + }, + { + "title": "Resume", + "path": "resume", + "icon": "ki-filled ki-questionnaire-tablet text-lg", + "classes": "", + "attributes": [], + "permission": "", + "roles": ["administrator", "pemohon-ao", "pemohon-eo"] } ], "master": [ @@ -234,24 +286,14 @@ "classes": "", "attributes": [], "permission": "", - "roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin", "surveyor"], + "roles": [ + "administrator", + "pemohon-ao", + "pemohon-eo", + "admin", + "surveyor" + ], "sub": [ - { - "title": "Cabang", - "path": "basicdata.branch", - "classes": "", - "attributes": [], - "permission": "", - "roles": ["administrator", "pemohon-ao", "pemohon-eo"] - }, - { - "title": "Mata Uang", - "path": "basicdata.currency", - "classes": "", - "attributes": [], - "permission": "", - "roles": ["administrator", "pemohon-ao", "pemohon-eo"] - }, { "title": "Jenis Fasilitas Kredit", "path": "basicdata.jenis-fasilitas-kredit", @@ -388,6 +430,14 @@ "permission": "", "roles": ["administrator", "admin"] }, + { + "title": "SLA", + "path": "basicdata.sla", + "classes": "", + "attributes": [], + "permission": "", + "roles": ["administrator", "admin"] + }, { "title": "Bentuk Tanah", "path": "basicdata.bentuk-tanah", @@ -395,73 +445,72 @@ "attributes": [], "permission": "", "roles": ["surveyor"] - }, - { + }, + { "title": "Kontur Tanah", "path": "basicdata.kontur-tanah", "classes": "", "attributes": [], "permission": "", "roles": ["surveyor"] - }, - { + }, + { "title": "Posisi Kavling", "path": "basicdata.posisi-kavling", "classes": "", "attributes": [], "permission": "", "roles": ["surveyor"] - }, - { + }, + { "title": "Ketinggian Tanah", "path": "basicdata.ketinggian-tanah", "classes": "", "attributes": [], "permission": "", "roles": ["surveyor"] - }, - { + }, + { "title": "Kondisi Fisik Tanah", "path": "basicdata.kondisi-fisik-tanah", "classes": "", "attributes": [], "permission": "", "roles": ["surveyor"] - }, - { + }, + { "title": "Jenis Bangunan", "path": "basicdata.jenis-bangunan", "classes": "", "attributes": [], "permission": "", "roles": ["surveyor"] - }, - { + }, + { "title": "Kondisi Bangunan", "path": "basicdata.kondisi-bangunan", "classes": "", "attributes": [], "permission": "", "roles": ["surveyor"] - }, - { + }, + { "title": "Sifat Bangunan", "path": "basicdata.sifat-bangunan", "classes": "", "attributes": [], "permission": "", "roles": ["surveyor"] - }, + }, - { + { "title": "Sarana Pelengkap", "path": "basicdata.sarana-pelengkap", "classes": "", "attributes": [], "permission": "", "roles": ["surveyor"] - } - + } ] } ], diff --git a/resources/views/SLA/index.blade.php b/resources/views/SLA/index.blade.php new file mode 100644 index 0000000..8fc628d --- /dev/null +++ b/resources/views/SLA/index.blade.php @@ -0,0 +1,8 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render('sla') }} +@endsection + +@section('content') +@endsection diff --git a/resources/views/branch/create.blade.php b/resources/views/branch/create.blade.php deleted file mode 100644 index f9cb3b7..0000000 --- a/resources/views/branch/create.blade.php +++ /dev/null @@ -1,58 +0,0 @@ -@extends('layouts.main') - -@section('breadcrumbs') - {{ Breadcrumbs::render(request()->route()->getName()) }} -@endsection - -@section('content') -
- @if(isset($branch->id)) -
- - @method('PUT') - @else - - @endif - @csrf -
-
-

- {{ isset($branch->id) ? 'Edit' : 'Tambah' }} Branch -

-
- Back -
-
-
-
- -
- - @error('code') - {{ $message }} - @enderror -
-
-
- -
- - @error('name') - {{ $message }} - @enderror -
-
-
- -
-
-
-
-
-@endsection diff --git a/resources/views/branch/index.blade.php b/resources/views/branch/index.blade.php deleted file mode 100644 index ff5a9e5..0000000 --- a/resources/views/branch/index.blade.php +++ /dev/null @@ -1,147 +0,0 @@ -@extends('layouts.main') - -@section('breadcrumbs') - {{ Breadcrumbs::render('basicdata.branch') }} -@endsection - -@section('content') -
-
-
-

- Daftar Cabang -

- -
-
-
- - - - - - - - - -
- - - Code - - - Cabang - - Action
-
- -
-
-
-@endsection - -@push('scripts') - - -@endpush - diff --git a/resources/views/component/detail-jaminan.blade.php b/resources/views/component/detail-jaminan.blade.php index 716ab06..bc2ee80 100644 --- a/resources/views/component/detail-jaminan.blade.php +++ b/resources/views/component/detail-jaminan.blade.php @@ -16,7 +16,9 @@ + - - -@endsection - -@push('scripts') - - -@endpush - diff --git a/resources/views/debitur/components/dokumen.blade.php b/resources/views/debitur/components/dokumen.blade.php index 1e5eed3..b3038ed 100644 --- a/resources/views/debitur/components/dokumen.blade.php +++ b/resources/views/debitur/components/dokumen.blade.php @@ -22,9 +22,10 @@
- + @if(isset($pemilikJaminan)) @foreach($pemilikJaminan as $pemilik) @if(isset($document)) @@ -39,19 +40,71 @@ @endforeach @endif - @if(isset($document->id)) - - Tambah Pemilik Jaminan - - @else - - Tambah Pemilik Jaminan - - @endif
@error('pemilik_jaminan_id') {{ $message }} @enderror +
@@ -112,6 +165,18 @@
+ @if($detail->details) + @php $custom_field = json_decode($detail->details,true) @endphp +
+ +
+ +
+
+ @endif +
-
+
+ @if (isset($penawaran->nomor_registrasi)) + + Surat Tender + + @endif diff --git a/resources/views/penawaran/edit.blade.php b/resources/views/penawaran/edit.blade.php index 364ac76..d49a6bd 100644 --- a/resources/views/penawaran/edit.blade.php +++ b/resources/views/penawaran/edit.blade.php @@ -195,7 +195,12 @@
-
+
+ @if (isset($penawaran->nomor_registrasi)) + + Surat Tender + + @endif diff --git a/resources/views/penawaran/surat_tender.blade.php b/resources/views/penawaran/surat_tender.blade.php new file mode 100644 index 0000000..ee65e8c --- /dev/null +++ b/resources/views/penawaran/surat_tender.blade.php @@ -0,0 +1,56 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render(request()->route()->getName(), request()->route('noreg')) }} +@endsection + +@section('content') +
+
+
+

+ Surat Tender +

+
+ @if (isset($penawaran->nomor_registrasi)) + Back + @else + Back + @endif +
+
+
+

Dear + {{ ucwords(auth()->user()->name) ?? 'Tidak Ada' }} +

+

Mohon untuk dibuatkan proposal jasa appraisal atas nama {{ ucwords($penawaran->permohonan->user->name) }}, tujuan penilaian + untuk + @foreach ($penawaran->tujuanPenilaianKJPP as $tujuanPenilaianKJPP) + {{ $tujuanPenilaianKJPP->name }} + @endforeach + , laporan dalam bentuk {{ $penawaran->jenisLaporan->name }}, + dengan data-data sebagai berikut :

+
    +
  • Aset Jaminan: [otomasi dari tabel permohonan]
  • +
  • Lokasi Jaminan: [otomasi dari tabel permohonan]
  • +
  • LT / LB: [otomasi dari tabel permohonan]
  • +
+

Harap proposal dibuat dengan harga yang minimal sehingga tidak perlu tawar menawar lagi.

+

Mohon proposal dapat saya terima segera, sebelum + {{ formatTanggalIndonesia($penawaran->end_date) }} pukul 17.00 WIB +

+

Best Regards, + [otomasi dari nama dan tanda tangan user penginput] + Sub Direktorat Appraisal +

+

PT. Bank Artha Graha Internasional, Tbk.
+ Gedung Bank Artha Graha, Lantai 3
+ Jl. Kwiitang Raya No 24-26, Jakarta Pusat - 10420.
+ Telp. 021 - 3903040 (H)

+
+
+
+@endsection diff --git a/resources/views/penilai/index.blade.php b/resources/views/penilai/index.blade.php new file mode 100644 index 0000000..196b6c3 --- /dev/null +++ b/resources/views/penilai/index.blade.php @@ -0,0 +1,200 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render('penilai') }} +@endsection + +@section('content') +
+
+
+
+

+ Penilai +

+
+
+ +
+ +
+
+ +
+
+ + + + + + + + + + + + + + + +
+ + + Nomor Registrasi + + + Debitur + + + Pemohon(Cabang/Direktorat) + + + AO + + + Tujuan Penilaian + + + Fasilitas Kredit + + + Tanggal Survei + + + Due Date SLA + + Action
+
+ +
+
+
+
+@endsection + + +@push('scripts') + + +@endpush diff --git a/resources/views/penilai/show.blade.php b/resources/views/penilai/show.blade.php new file mode 100644 index 0000000..107256e --- /dev/null +++ b/resources/views/penilai/show.blade.php @@ -0,0 +1,160 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render(request()->route()->getName()) }} +@endsection + +@section('content') +
+
+
+

+ Detail Penilai +

+
+ + Back +
+
+
+
+ +
+

{{ $permohonan->nomor_registrasi }}

+
+ +
+

{{ $permohonan->debiture->name }}

+
+
+
+ +
+

{{ $permohonan->branch->name }}

+
+ +
+

{{ $permohonan->debiture->address }}, Kel. + {{ $permohonan->debiture->village->name }}, Kec. {{ $permohonan->debiture->district->name }}, + {{ ucwords(strtolower($permohonan->debiture->city->name)) }}, Kode Pos. + {{ $permohonan->debiture->postal_code }}

+
+
+
+ +
+

{{ $permohonan->user->name }}

+
+ +
+

+ {{ $permohonan->jenisFasilitasKredit->name }}

+
+
+
+ +
+

+ {{ formatTanggalIndonesia($permohonan->created_at) }}

+
+ +
+

+ {{ $permohonan->debiture->cif }}

+
+
+
+ +
+

+ {{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}

+
+
+
+ +
+

+ {{ $permohonan->penilaian->userSurveyor->name }}

+

+ Region 1

+
+ +
+

+ @foreach ($permohonan->penilaian->teams->teamsUsers as $index => $penilaian) + {{ $penilaian->user->name }}{{ $index + 1 < count($permohonan->penilaian->teams->teamsUsers) ? ', ' : '' }} + @endforeach +

+

+ {{ $permohonan->penilaian->teams->regions->name }} +

+
+
+
+ +

+ {{ $permohonan->tujuanPenilaian->name }}

+ +

+ @foreach ($permohonan->debiture->documents as $document) + {{ $document->jenisjaminan->name }} + @endforeach +

+
+
+ +
+

+ {{ formatTanggalIndonesia($permohonan->created_at) }}

+
+
+
+ +
+

+ {{ formatTanggalIndonesia($permohonan->created_at) }}

+
+
+
+ +
+

+ PJ/001/001

+
+
+
+
+
+@endsection diff --git a/resources/views/penilaian/resume/index.blade.php b/resources/views/penilaian/resume/index.blade.php deleted file mode 100644 index e69de29..0000000 diff --git a/resources/views/permohonan/authorization/show.blade.php b/resources/views/permohonan/authorization/show.blade.php index 41b247c..e8564e1 100644 --- a/resources/views/permohonan/authorization/show.blade.php +++ b/resources/views/permohonan/authorization/show.blade.php @@ -148,7 +148,7 @@ Catatan
- +
diff --git a/resources/views/permohonan/form.blade.php b/resources/views/permohonan/form.blade.php index 7c82edd..cfb066b 100644 --- a/resources/views/permohonan/form.blade.php +++ b/resources/views/permohonan/form.blade.php @@ -155,38 +155,15 @@ @enderror - -
- -
- - @error('status') - {{ $message }} - @enderror + @if($permohonan->status=='revisi') +
+ Catatan :
+ {{ $permohonan->keterangan }}
-
- - + @endif
diff --git a/resources/views/permohonan/index.blade.php b/resources/views/permohonan/index.blade.php index 3f12a4f..15819c7 100644 --- a/resources/views/permohonan/index.blade.php +++ b/resources/views/permohonan/index.blade.php @@ -63,6 +63,10 @@ Status + + Keterangan + + Action @@ -158,7 +162,10 @@ debitur_id: { title: 'Debitur', render: (item, data) => { - return `${data.debiture.name}`; + if(data.debiture) { + return `${data.debiture.name}`; + } + return "-"; }, }, tujuan_penilaian_id: { @@ -170,11 +177,20 @@ status: { title: 'Status' }, + keterangan: { + title: 'Keterangan' + }, actions: { - title: 'Status', + title: 'Actions', render: (item, data) => { - return ` -
+ var actionHtml = ` +
`; + if(data.status !== 'order'){ + actionHtml += ` + + `; + } + actionHtml += ` @@ -182,6 +198,8 @@
`; + + return actionHtml; }, } }, diff --git a/resources/views/permohonan/print.blade.php b/resources/views/permohonan/print.blade.php new file mode 100644 index 0000000..4c6e47f --- /dev/null +++ b/resources/views/permohonan/print.blade.php @@ -0,0 +1,221 @@ +@extends('layouts.auth') +@section('content') +
+
+
+
+
+
+

+ Nomor Register Permohonan +

+ + : {{ $permohonan->nomor_registrasi }} + +
+ +
+

+ Pemohon +

+ + : {{ $permohonan->user->nik }} | {{ $permohonan->user->name }} + +
+ +
+

+ Tujan Permohonan +

+ + : {{ $permohonan->tujuanPenilaian->name }} + +
+
+
+
+

+ Status Permohonan +

+ + : {{ ucwords($permohonan->status) }} + +
+ +
+

+ Cabang Pemohon +

+ + : {{ $permohonan->user->branch->name }} + +
+ +
+

+ Tanggal Permohonan +

+ + : {{ formatTanggalIndonesia($permohonan->created_at) }} + +
+
+
+
+
+
+
+
+
+

+ 1. Fasilitas Kredit +

+
+
+
+

+ Jenis Fasilitas +

+ + : {{ $permohonan->jenisFasilitasKredit->name }} + +
+ +
+

+ Nilai Plafond +

+ + : {{ $permohonan->nilaiPlafond->name }} + +
+ +
+

+ Nilai NJOP +

+ + : {{ $permohonan->nilai_njop }} + +
+
+
+ +
+
+

+ 2. Identitas Debutur +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Name + + {{ $permohonan->debiture->name ?? "" }} +
+ Cabang + + {{ $permohonan->debiture->branch->name ?? "" }} +
+ CIF + + {{ $permohonan->debiture->cif ?? "" }} +
+ Address + + {{ $permohonan->debiture->address ?? "" }} +
+   + + {{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }} +
+
+
+
+
+
+
+
+
+

+ Data Jaminan +

+
+
+ @foreach($permohonan->debiture->documents as $dokumen) +
+ + Jaminan {{ $loop->index + 1 }} + + +
+

+ Pemilik Jaminan +

+ + : {{ $dokumen->pemilik->name?? "" }} + +
+
+

+ Jenis Jaminan: +

+ + : {{ $dokumen->jenisJaminan->name?? "" }} + +
+
+

+ Hubungan Pemilik Jaminan: +

+ + : {{ $dokumen->pemilik->hubungan_pemilik->name?? "" }} + +
+
+

+ Alamat Pemilik Jaminan: +

+ + : {{ $dokumen->pemilik->address ?? ""}}, +
{{ $dokumen->pemilik->village->name ?? "" }}, {{ $dokumen->pemilik->district->name ?? "" }}, {{ $dokumen->pemilik->city->name ?? "" }}, {{ $dokumen->pemilik->province->name ?? "" }} - {{ $dokumen->pemilik->village->postal_code ?? "" }} +
+
+
+ @endforeach +
+
+
+
+@endsection + +@push('scripts') + +@endpush diff --git a/resources/views/permohonan/show.blade.php b/resources/views/permohonan/show.blade.php new file mode 100644 index 0000000..d1de6f8 --- /dev/null +++ b/resources/views/permohonan/show.blade.php @@ -0,0 +1,189 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render(request()->route()->getName()) }} +@endsection + +@section('content') +
+
+
+
+

+ Data Permohonan +

+
+
+
+

+ Nomor Register Permohonan: +

+ + {{ $permohonan->nomor_registrasi }} + +
+ +
+

+ Pemohon: +

+ + {{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }} + +
+ +
+

+ Tujan Permohonan: +

+ + {{ $permohonan->tujuanPenilaian->name }} + +
+ +
+
+ +
+
+

+ Fasilitas Kredit +

+
+
+
+

+ Jenis Fasilitas +

+ + {{ $permohonan->jenisFasilitasKredit->name }} + +
+ +
+

+ Nilai Plafond: +

+ + {{ $permohonan->nilaiPlafond->name }} + +
+ +
+

+ Nilai NJOP: +

+ + {{ $permohonan->nilai_njop }} + +
+
+
+
+
+
+

+ Detail Debutur +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Name + + {{ $permohonan->debiture->name ?? "" }} +
+ Email + + {{ $permohonan->debiture->email ?? "" }} +
+ Phone + + {{ $permohonan->debiture->phone ?? "" }} +
+ Address + + {{ $permohonan->debiture->address ?? "" }} +
+   + + {{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }} +
+
+
+ + + + + + + + + + + + + + + + + +
+ Cabang + + {{ $permohonan->debiture->branch->name ?? "" }} +
+ CIF + + {{ $permohonan->debiture->cif ?? "" }} +
+ Nomor Rekening + + {{ $permohonan->debiture->nomor_rekening ?? "" }} +
+ NPWP + + {{ $permohonan->debiture->npwp ?? "" }} +
+
+
+
+
+ @include('lpj::component.detail-jaminan') + +
+
+ + @csrf + +
+
+
+@endsection diff --git a/resources/views/prosespenawaran/index.blade.php b/resources/views/prosespenawaran/index.blade.php index 67e4ccb..88ca76f 100644 --- a/resources/views/prosespenawaran/index.blade.php +++ b/resources/views/prosespenawaran/index.blade.php @@ -38,8 +38,8 @@ Nomor Registrasi - - Kode Penawaran + + Nama Debitur @@ -132,8 +132,16 @@ 'nomor_registrasi': { title: 'Nomor Registrasi', }, - code: { - title: 'Kode Penawaran', + debiture: { + title: 'Nama Debitur', + render: (item, data) => { + if(data.permohonan) { + return `${data.permohonan.debiture.name}`; + } + return "-"; + } + + }, start_date: { title: 'Tanggal Penawaran', diff --git a/resources/views/prosespenawaran/js/editjs.blade.php b/resources/views/prosespenawaran/js/editjs.blade.php index 58dd528..34a98c6 100644 --- a/resources/views/prosespenawaran/js/editjs.blade.php +++ b/resources/views/prosespenawaran/js/editjs.blade.php @@ -1,19 +1,19 @@ @push('scripts') @include('lpj::assetsku.includenya') - @include('lpj::prosespenawaran.js.editextjs') - -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/prosespenawaranulang/js/editjs.blade.php b/resources/views/prosespenawaranulang/js/editjs.blade.php index 7d8d9da..0bde8e5 100644 --- a/resources/views/prosespenawaranulang/js/editjs.blade.php +++ b/resources/views/prosespenawaranulang/js/editjs.blade.php @@ -1,19 +1,19 @@ @push('scripts') @include('lpj::assetsku.includenya') - @include('lpj::prosespenawaranulang.js.editextjs') - -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/resume/index.blade.php b/resources/views/resume/index.blade.php new file mode 100644 index 0000000..839710b --- /dev/null +++ b/resources/views/resume/index.blade.php @@ -0,0 +1,486 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render('resume') }} +@endsection + +@section('content') + + +
+
+
+
+
+ + @csrf + +
+
+ +
+ + @error('cadeb') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('aset') + {{ $message }} + @enderror +
+
+
+ +
+
+ +
+ + @error('kredit') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('alamat') + {{ $message }} + @enderror +
+
+
+ +
+
+ +
+ + @error('cabang') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('ao') + {{ $message }} + @enderror +
+
+
+ +
+ +
+ +
+ + @error('surveyor') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('penilai') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('tanggal_survey') + {{ $message }} + @enderror +
+
+ +
+
+ +
+ + @error('nomor_resume') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('tanggal_resume') + {{ $message }} + @enderror +
+
+
+ +
+ +
+ +
+ + @error('faktor_positif') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('faktor_negatif') + {{ $message }} + @enderror +
+
+ +
+ + + +
+ +
+
+
+ + @error('sertifikat') + {{ $message }} + @enderror +
+ +
+ + + @error('luas_tanah') + {{ $message }} + @enderror +
+ +
+ + + @error('luas_bangunan') + {{ $message }} + @enderror +
+ +
+ Rp + + @error('pasar_wajar') + {{ $message }} + @enderror +
+
+
+
+ +
+ +
+
+
+ + @error('sertifikat') + {{ $message }} + @enderror +
+ +
+ + + @error('luas_tanah') + {{ $message }} + @enderror +
+ +
+ + + @error('luas_bangunan') + {{ $message }} + @enderror +
+ +
+ Rp + + @error('pasar_wajar') + {{ $message }} + @enderror +
+
+
+
+ +
+ +
+
+
+ + @error('sertifikat') + {{ $message }} + @enderror +
+ +
+ + + @error('luas_tanah') + {{ $message }} + @enderror +
+ +
+ + + @error('luas_bangunan') + {{ $message }} + @enderror +
+ +
+ Rp + + @error('pasar_wajar') + {{ $message }} + @enderror +
+
+
+
+ +
+ +
+ +
+ + @error('catatan') + {{ $message }} + @enderror +
+
+ +
+ +
+ +
+
    +
  1. Laporan Resume ini dikeluarkan dikarenakan belum dilakukannya pembayaran biaya + penilaian jaminan
  2. +
  3. Laporan Resume ini tidak bisa dijadikan sebagai dasar pengajuan dan atau pencairan + kredit, laporan yang digunakan tetap wajib berupa Laporan Penilaian Jaminan (LPJ) +
  4. +
  5. Detail per meter tanah dan bangunan, sarana pelengkap dll akan tercatat di Laporan + Penilaian Jaminan (LPJ) nanti
  6. +
  7. Laporan Resume ini hanya digunakan untuk kepentingan internal bagi
  8. +
  9. Laporan resume ini hanya berlaku 14 hari kerja + terhitung dari tanggal resume ini dibuat sesuai aturan yang berlaku, apabila lewat + maka harus dilakukan order ulang sesuai prosedur yang berlaku
  10. +
  11. Apabila sudah melewati 6 bulan, maka harus penilaian ulang kembali
  12. +
+
+
+ +
+ + + +
+
+ + +
+
+ +
+ +
+
+
+
+
+ + {{--
+
+ + +
+
+ +
+ + @error('code') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('name') + {{ $message }} + @enderror +
+
+ +
+ +
+
+
+
--}} +
+@endsection diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php index 0f54909..0083e10 100644 --- a/routes/breadcrumbs.php +++ b/routes/breadcrumbs.php @@ -3,9 +3,11 @@ use Diglactic\Breadcrumbs\Breadcrumbs; use Diglactic\Breadcrumbs\Generator as BreadcrumbTrail; -Breadcrumbs::for('basicdata', function (BreadcrumbTrail $trail) { - $trail->push('Basic Data'); -}); +if (!Breadcrumbs::exists('basicdata')) { + Breadcrumbs::for('basicdata', function (BreadcrumbTrail $trail) { + $trail->push('Basic Data'); + }); +} Breadcrumbs::for('basicdata.jenis-fasilitas-kredit', function (BreadcrumbTrail $trail) { $trail->parent('basicdata'); @@ -113,36 +115,6 @@ Breadcrumbs::for('basicdata.jenis-dokumen.edit', function (BreadcrumbTrail $trai }); -Breadcrumbs::for('basicdata.currency', function (BreadcrumbTrail $trail) { - $trail->parent('basicdata'); - $trail->push('Mata Uang', route('basicdata.currency.index')); -}); - -Breadcrumbs::for('basicdata.currency.create', function (BreadcrumbTrail $trail) { - $trail->parent('basicdata.currency'); - $trail->push('Tambah Mata Uang', route('basicdata.currency.create')); -}); - -Breadcrumbs::for('basicdata.currency.edit', function (BreadcrumbTrail $trail) { - $trail->parent('basicdata.currency'); - $trail->push('Edit Mata Uang'); -}); - -Breadcrumbs::for('basicdata.branch', function (BreadcrumbTrail $trail) { - $trail->parent('basicdata'); - $trail->push('Cabang', route('basicdata.branch.index')); -}); - -Breadcrumbs::for('basicdata.branch.create', function (BreadcrumbTrail $trail) { - $trail->parent('basicdata.branch'); - $trail->push('Tambah Cabang', route('basicdata.branch.create')); -}); - -Breadcrumbs::for('basicdata.branch.edit', function (BreadcrumbTrail $trail) { - $trail->parent('basicdata.branch'); - $trail->push('Edit Cabang'); -}); - Breadcrumbs::for('basicdata.nilai-plafond', function (BreadcrumbTrail $trail) { $trail->parent('basicdata'); $trail->push('Nilai Plafond', route('basicdata.nilai-plafond.index')); @@ -305,6 +277,12 @@ Breadcrumbs::for('permohonan.index', function (BreadcrumbTrail $trail) { $trail->push('Permohonan', route('permohonan.index')); }); +Breadcrumbs::for('permohonan.show', function (BreadcrumbTrail $trail) { + $trail->parent('permohonan.index'); + $trail->push('Show Permohonan'); +}); + + Breadcrumbs::for('permohonan.create', function (BreadcrumbTrail $trail) { $trail->parent('permohonan.index'); $trail->push('Tambah Permohonan', route('permohonan.create')); @@ -416,6 +394,11 @@ Breadcrumbs::for('tender.penawaran.editPenawaran', function (BreadcrumbTrail $tr $trail->push('Penawaran Ulang', route('tender.penawaran.editPenawaran', $noreg)); }); +Breadcrumbs::for('tender.penawaran.showSuratTender', function (BreadcrumbTrail $trail, $noreg) { + $trail->parent('tender.penawaran'); + $trail->push('Surat Tender', route('tender.penawaran.showSuratTender', $noreg)); +}); + Breadcrumbs::for('tender.penawaran.ulang', function (BreadcrumbTrail $trail) { $trail->parent('tender'); @@ -543,3 +526,40 @@ Breadcrumbs::for('otorisator.pelaporan.index', function (BreadcrumbTrail $trail) $trail->parent('otorisator'); $trail->push('Otorisator', route('otorisator.pelaporan.index')); }); + +Breadcrumbs::for('laporan', function (BreadcrumbTrail $trail) { + $trail->push('Laporan', route('laporan.sederhana.index')); +}); + +Breadcrumbs::for('laporan.sederhana.index', function (BreadcrumbTrail $trail) { + $trail->parent('laporan'); + $trail->push('Sederhana', route('laporan.sederhana.index')); +}); + +Breadcrumbs::for('laporan.standard.index', function (BreadcrumbTrail $trail) { + $trail->parent('laporan'); + $trail->push('Standard', route('laporan.standard.index')); +}); + +Breadcrumbs::for('resume', function (BreadcrumbTrail $trail) { + $trail->push('Resume', route('resume.index')); +}); + +Breadcrumbs::for('resume.show', function (BreadcrumbTrail $trail) { + $trail->parent('resume'); + $trail->push('Detail'); +}); + +Breadcrumbs::for('penilai', function (BreadcrumbTrail $trail) { + $trail->push('Penilai', route('penilai.index')); +}); + +Breadcrumbs::for('penilai.show', function (BreadcrumbTrail $trail) { + $trail->parent('penilai'); + $trail->push('Detail Penilai'); +}); + +Breadcrumbs::for('sla', function (BreadcrumbTrail $trail) { + $trail->parent('basicdata'); + $trail->push('SLA', route('basicdata.sla.index')); +}); diff --git a/routes/web.php b/routes/web.php index eadf6f9..b606cda 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,34 +1,37 @@ group(function () { Route::get('export', [JenisDokumenController::class, 'export'])->name('export'); }); Route::resource('jenis-dokumen', JenisDokumenController::class); - Route::name('currency.')->prefix('mata-uang')->group(function () { - Route::get('restore/{id}', [CurrencyController::class, 'restore'])->name('restore'); - Route::get('datatables', [CurrencyController::class, 'dataForDatatables'])->name('datatables'); - Route::get('export', [CurrencyController::class, 'export'])->name('export'); - }); - Route::name('branch.')->prefix('cabang')->group(function () { - Route::get('restore/{id}', [BranchController::class, 'restore'])->name('restore'); - Route::get('datatables', [BranchController::class, 'dataForDatatables'])->name('datatables'); - Route::get('export', [BranchController::class, 'export'])->name('export'); - }); - - Route::resource('cabang', BranchController::class, [ - 'names' => [ - 'index' => 'branch.index', - 'show' => 'branch.show', - 'create' => 'branch.create', - 'store' => 'branch.store', - 'edit' => 'branch.edit', - 'update' => 'branch.update', - 'destroy' => 'branch.destroy', - ], - ]); Route::name('nilai-plafond.')->prefix('nilai-plafond')->group(function () { Route::get('restore/{id}', [NilaiPlafondController::class, 'restore'])->name('restore'); @@ -214,35 +195,6 @@ Route::middleware(['auth'])->group(function () { ], ]); - Route::resource('mata-uang', CurrencyController::class, [ - 'names' => [ - 'index' => 'currency.index', - 'show' => 'currency.show', - 'create' => 'currency.create', - 'store' => 'currency.store', - 'edit' => 'currency.edit', - 'update' => 'currency.update', - 'destroy' => 'currency.destroy', - ], - ]); - - Route::name('branch.')->prefix('cabang')->group(function () { - Route::get('restore/{id}', [BranchController::class, 'restore'])->name('restore'); - Route::get('datatables', [BranchController::class, 'dataForDatatables'])->name('datatables'); - Route::get('export', [BranchController::class, 'export'])->name('export'); - }); - - Route::resource('cabang', BranchController::class, [ - 'names' => [ - 'index' => 'branch.index', - 'show' => 'branch.show', - 'create' => 'branch.create', - 'store' => 'branch.store', - 'edit' => 'branch.edit', - 'update' => 'branch.update', - 'destroy' => 'branch.destroy', - ], - ]); Route::name('nilai-plafond.')->prefix('nilai-plafond')->group(function () { Route::get('restore/{id}', [NilaiPlafondController::class, 'restore'])->name('restore'); @@ -319,6 +271,12 @@ Route::middleware(['auth'])->group(function () { Route::put('updateData/{type}/{id}', [SurveyorController::class, 'updateData'])->name('updateData'); Route::delete('deleteData/{id}/{type}', [SurveyorController::class, 'destroy'])->name('deleteData'); + // Start Activity SLA route + Route::name('sla.')->prefix('sla')->group(function () { + Route::get('/', [SLAController::class, 'index'])->name('index'); + }); + // End Activity SLA route + $headers = [ 'bentuk-tanah' => 'Bentuk Tanah', 'kontur-tanah' => 'Kontur Tanah', @@ -348,6 +306,7 @@ Route::middleware(['auth'])->group(function () { Route::name('jaminan.')->prefix('{id}/jaminan')->group(function () { Route::get('download', [DokumenJaminanController::class, 'download'])->name('download'); + Route::get('bulk-download', [DokumenJaminanController::class, 'bulkDownload'])->name('bulk.download'); Route::get('/', [DokumenJaminanController::class, 'index'])->name('index'); Route::get('create', [DokumenJaminanController::class, 'create'])->name('create'); Route::get('{jaminan}/edit', [DokumenJaminanController::class, 'edit'])->name('edit'); @@ -368,11 +327,24 @@ Route::middleware(['auth'])->group(function () { Route::resource('debitur', DebitureController::class); + Route::name('laporan.')->prefix('laporan')->group(function () { + Route::get('sederhana', [LaporanController::class, 'sederhana_index'])->name('sederhana.index'); + Route::get('standard', [LaporanController::class, 'standard_index'])->name('standard.index'); + }); + + Route::name('resume.')->prefix('resume')->group(function () { + Route::get('/', [ResumeController::class, 'index'])->name('index'); + Route::get('{id}/show', [ResumeController::class, 'show'])->name('show'); + Route::post('store', [ResumeController::class, 'store'])->name('store'); + Route::get('datatables', [ResumeController::class, 'dataForDatatables'])->name('datatables'); + }); + Route::name('permohonan.')->prefix('permohonan')->group(function () { Route::get('{id}/create', [PermohonanController::class, 'createPermohonan'])->name('create.debitur'); Route::get('restore/{id}', [PermohonanController::class, 'restore'])->name('restore'); Route::get('datatables', [PermohonanController::class, 'dataForDatatables'])->name('datatables'); Route::get('export', [PermohonanController::class, 'export'])->name('export'); + Route::get('print/{id}', [PermohonanController::class, 'print'])->name('print'); }); Route::get('authorization', [PermohonanController::class, 'authorization'])->name('authorization.index'); @@ -412,6 +384,9 @@ Route::middleware(['auth'])->group(function () { Route::get('penawaran/datatables', [TenderController::class, 'datatablesPenawaran'])->name( 'penawaran.datatables', ); + Route::get('penawaran/{noreg}/suratTender', [TenderController::class, 'showSuratTender'])->name( + 'penawaran.showSuratTender' + ); // Penawaran Ulang Route::get('penawaran/ulang', [TenderController::class, 'penawaran_ulang_index'])->name( @@ -487,6 +462,12 @@ Route::middleware(['auth'])->group(function () { Route::get('data-pembanding/{id}', [SurveyorController::class, 'dataPembanding'])->name('data-pembanding'); Route::put('submitSurveyor/{id}', [SurveyorController::class, 'submitSurveyor'])->name('submitSurveyor'); }); + + Route::name('penilai.')->prefix('penilai')->group(function () { + Route::get('/', [PenilaiController::class, 'index'])->name('index'); + Route::get('/{id}/show', [PenilaiController::class, 'show'])->name('show'); + Route::get('datatables', [PenilaiController::class, 'dataForDatatables'])->name('dataForTables'); + }); }); require __DIR__ . '/registrasi.php';