Merge branch 'staging' into feature/senior-officer

This commit is contained in:
majid
2024-11-05 08:38:22 +07:00
130 changed files with 8934 additions and 2169 deletions

View File

@@ -1,49 +0,0 @@
<?php
namespace Modules\Lpj\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
use Modules\Lpj\Models\Branch;
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
class BranchExport implements WithColumnFormatting, WithHeadings, FromCollection, withMapping
{
public function collection()
{
return Branch::all();
}
public function map($row)
: array
{
return [
$row->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
];
}
}

View File

@@ -1,54 +0,0 @@
<?php
namespace Modules\Lpj\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
use Modules\Lpj\Models\Currency;
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
class CurrencyExport implements WithColumnFormatting, WithHeadings, FromCollection, withMapping
{
public function collection()
{
return Currency::all();
}
public function map($row)
: array
{
return [
$row->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
];
}
}

View File

@@ -1,6 +1,8 @@
<?php
use Carbon\Carbon;
use Modules\Lpj\Models\PenawaranDetailTender;
use Modules\Lpj\Models\PenawaranTender;
function formatTanggalIndonesia($date)
{
@@ -39,3 +41,70 @@ function formatAlamat($alamat)
(isset($alamat->province) ? $alamat->province->name . ', ' : '') .
($alamat->postal_code ?? '');
}
// andy add
function checkActiveDateRangePenawaran($id)
{
$penawaran = PenawaranTender::find($id);
$start_date = strtotime($penawaran->start_date);
$end_date = strtotime($penawaran->end_date);
$todays_date = strtotime(now());
$allow = true;
if ($todays_date >= $start_date && $todays_date <= $end_date) {
//Penawaran dibuka
$allow = true;
} else {
if ($todays_date < $start_date) {
//Penawaran Belum dibuka
$allow = true;
} else {
//Penawaran sudah ditutup
$allow = false;
}
}
return $allow;
}
function checkKelengkapanDetailKJPP($id)
{
$allow = true;
// DB::enableQueryLog();
// detail_penawaran apakah isian biaya_penawaran, attachment, dokumen_persetujuan sudah lengkap?
$query = PenawaranDetailTender::select('id')
->where('penawaran_id', '=', $id)
->where(function ($query) {
$query->orWhere('biaya_penawaran', '', "");
$query->orWhereNull('biaya_penawaran');
$query->orWhere('attachment', '', "");
$query->orWhereNull('attachment');
$query->orWhere('dokumen_persetujuan', '', "");
$query->orWhereNull('dokumen_persetujuan');
})->get();
// $sql = DB::getQueryLog();
if (sizeof($query) > 0) {
$allow = false;
}
return $allow;
}
// convert
function convertSlug($slug) {
$words = explode('-', $slug);
foreach ($words as $index => $word) {
$words[$index] = strtoupper($word);
}
return implode(' ', $words);
}
// andy add

View File

@@ -1,200 +0,0 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Exception;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;
use Modules\Lpj\Exports\BranchExport;
use Modules\Lpj\Http\Requests\BranchRequest;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\Permohonan;
class AuthorizationController extends Controller
{
public $user;
public function index()
{// dd('hai');
// return view('lpj::branch.index');
// $permohonan = Permohonan::find(2);
// dd($permohonan->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');
}
}

View File

@@ -1,150 +0,0 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Exception;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;
use Modules\Lpj\Exports\BranchExport;
use Modules\Lpj\Http\Requests\BranchRequest;
use Modules\Lpj\Models\Branch;
class BranchController extends Controller
{
public $user;
public function index()
{
return view('lpj::branch.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 = 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');
}
}

View File

@@ -1,150 +0,0 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Exception;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;
use Modules\Lpj\Exports\CurrencyExport;
use Modules\Lpj\Http\Requests\CurrencyRequest;
use Modules\Lpj\Models\Currency;
class CurrencyController extends Controller
{
public $user;
public function index()
{
return view('lpj::currency.index');
}
public function store(CurrencyRequest $request)
{
$validate = $request->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');
}
}

View File

@@ -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])) {
@@ -217,16 +277,14 @@
'success',
'Dokumen Jaminan berhasil diubah',
);
} catch
(Exception $e) {
} catch (Exception $e) {
DB::rollBack();
return redirect()->route('debitur.jaminan.index', $id)->with('error', $e->getMessage());
}
}
}
public
function edit(
public function edit(
$id,
$jaminan,
) {
@@ -240,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',
@@ -254,20 +313,20 @@
'districts',
'villages',
'pemilikJaminan',
'hubunganPemilik',
),
);
}
public
function destroy(
public function destroy(
$id,
$jaminan_id,
) {
try {
$jaminan = DokumenJaminan::find($jaminan_id);
$details = DetailDokumenJaminan::where('dokumen_jaminan_id',$jaminan->id)->get();
foreach ($details as $detail){
Storage::delete('public/'. $detail->dokumen_jaminan);
$details = DetailDokumenJaminan::where('dokumen_jaminan_id', $jaminan->id)->get();
foreach ($details as $detail) {
Storage::delete('public/' . $detail->dokumen_jaminan);
$detail->delete();
}
$jaminan->delete();
@@ -277,11 +336,58 @@
}
}
public
function download(
$id,
) {
$document = DetailDokumenJaminan::find($id);
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');
$document = DetailDokumenJaminan::find($dokumen);
return response()->download(storage_path('app/public/' . $document->dokumen_jaminan));
}
public function legalitasJaminan($id, $jaminan)
{
$jenisJaminan = JenisJaminan::find($id);
$legalitasJaminan = $jenisJaminan->jenis_legalitas_jaminan_id;
$legalitas = JenisLegalitasJaminan::whereIn('code', json_decode($legalitasJaminan, true))->get();
echo json_encode($legalitas);
}
}

View File

@@ -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()

View File

@@ -0,0 +1,34 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class LaporanController extends Controller
{
public $user;
/**
* Display a listing of the resource.
*/
public function sederhana_index()
{
return view('lpj::laporan.sederhana_index');
}
public function standard_index()
{
return view('lpj::laporan.standard_index');
}
/**
* Show the specified resource.
*/
public function show($id) {}
/**
* Store form inspeksi.
*/
public function store(Request $request) {}
public function update(Request $request, $id) {}
}

View File

@@ -0,0 +1,290 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use Exception;
use Maatwebsite\Excel\Facades\Excel;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\KJPP;
use Modules\Lpj\Models\PenawaranDetailTender;
use Modules\Lpj\Models\PenawaranDetailTenderLog;
use Modules\Lpj\Models\PenawaranTender;
use Modules\Lpj\Models\Permohonan;
class OtorisasiPenawaranController extends Controller
{
public $user;
/**
* Display a listing of the resource.
*/
public function index()
{
// dd('hai otorisasi');
return view('lpj::otorisasipenawaran.index');
}
public function dataForDatatables(Request $request)
{
if (is_null($this->user) || !$this->user->can('debitur.view')) {
//abort(403, 'Sorry! You are not allowed to view users.');
}
// Retrieve data from the database
$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','=','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 . '%');
});
}
// 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'])->get();
$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 edit($id)
{
return view('lpj::otorisasipenawaran.edit', compact('id'));
}
public function setData(Request $request): JsonResponse
{
$data = array();
$penawaran = array();
$penawrandetails = array();
$penawarandetailLogs = array();
if (request()->ajax()) {
$id = $request->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')
->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')
->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;
foreach($penawarandetailLogs as $obj1)
{
if($obj1->dokumen_persetujuan && Storage::disk('public')->exists($obj1->dokumen_persetujuan))
{
$penawarandetailLogs_path = Storage::url($obj1->dokumen_persetujuan);
$penawarandetailLogs[$h]->dokumen_persetujuan = $penawarandetailLogs_path;
}
$h++;
}
}
$i=0;
foreach($penawrandetails as $obj)
{
if($obj->dokumen_persetujuan && Storage::disk('public')->exists($obj->dokumen_persetujuan))
{
$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');
$data['penawaran'] = $penawaran;
$data['penawrandetails'] = $penawrandetails;
$data['penawarandetailLogs'] = $penawarandetailLogs;
$data['status'] = 'success';
$data['message']['message_success'] = array("data successfully found");
} else {
$data['status'] = 'error';
$data['penawaran'] = null;
$data['penawrandetails'] = null;
$data['message']['message_data'] = array("data not found");
}
} else {
$data['status'] = 'error';
$data['message']['message_ajax'] = array("no ajax request");
}
return response()->json($data);
}
public function otorisasiPenawaranKJPP(Request $request, $id): JsonResponse
{
$data = array();
$dataDetailPenawaranLog=[];
if (request()->ajax()) {
// cek masa aktif penawaran
$detailpenawaran = PenawaranDetailTender::find($id);
$penawaran = PenawaranTender::findOrFail($detailpenawaran->penawaran_id);
$checkActiveDateRange = checkActiveDateRangePenawaran($detailpenawaran->penawaran_id);
// cek masa aktif penawaran
if($checkActiveDateRange)
{
DB::beginTransaction();
try {
// update status KJPP yg tidak terpilih menjadi 2 -> kalah
// 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,
'updated_by' => Auth::id(),
'updated_at' => now()
]);
PenawaranTender::where('id', $request->penawaran_id)
->update(['status'=>'spk',
'nama_kjpp_sebelumnya'=>$request->kjppName,
'biaya_kjpp_sebelumnya'=>$request->biaya_penawaran,
'tanggal_penilaian_sebelumnya'=>now(),
'authorized_status'=>1,
'authorized_at'=>now(),
'authorized_by'=>Auth::id(),
'updated_by' => Auth::id(),
'updated_at' => now()
]);
Permohonan::where('nomor_registrasi',$request->noReg)
->update(['status'=>'spk',
'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,
'kjpp_rekanan_id' =>$model->kjpp_rekanan_id,
'penawaran_id' =>$model->penawaran_id,
'biaya_penawaran' =>$model->biaya_penawaran,
'attachment' =>$model->attachment,
'dokumen_persetujuan' =>$model->dokumen_persetujuan,
'status' =>$model->status,
'authorized_status' =>$model->authorized_status,
'authorized_at' =>$model->authorized_at,
'authorized_at' =>$model->authorized_at,
'created_at' =>$model->created_at,
'updated_at' =>$model->updated_at,
'deleted_at' =>$model->deleted_at,
'created_by' =>$model->created_by,
'updated_by' =>$model->updated_by,
'deleted_by' =>$model->deleted_by
]);
}
PenawaranDetailTenderLog::insert($dataDetailPenawaranLog);
}
// log
DB::commit();
$data['status'] = 'success';
$data['message']['message_success'] = array('Otorisasi Penawaran KJPP '.$request->kjppName.' successfully');
} catch (Exception $e) {
DB::rollBack();
$data['status'] = 'error';
$data['message']['message_error'] = array("Otorisasi Penawaran KJPP failed..");
}
}
else
{
$data['status'] = 'error';
$data['message'] ['active_date_range'] = array("Penawaran sudah di tutup");
}
} else {
$data['status'] = 'error';
$data['message']['message_ajax'] = array("no ajax request");
}
return response()->json($data);
}
public function show($id)
{
$prosespenawaran = PenawaranTender::find($id);
return view('lpj::otorisasipenawaran.show', compact('id','prosespenawaran'));
}
}

View File

@@ -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'
),
);
}

View File

@@ -0,0 +1,135 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use Illuminate\Http\Request;
use Modules\Lpj\Models\Permohonan;
use App\Http\Controllers\Controller;
class PenilaiController extends Controller
{
public $user;
/**
* Display a listing of the resource.
*/
public function index()
{
return view('lpj::penilai.index');
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('lpj::create');
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Show the specified resource.
*/
public function show($id)
{
$permohonan = Permohonan::with('debiture.documents.jenisjaminan')->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,
]);
}
}

View File

@@ -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();
}
}

View File

@@ -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'));
@@ -108,37 +108,39 @@ class ProsesPenawaranController extends Controller
if (request()->ajax()) {
$id = $request->id;
$penawaran = PenawaranTender::findOrFail($id);
$penawrandetails = PenawaranDetailTender::where('penawaran_id', '=', $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();
$data['status'] = 'success';
$penawaran = PenawaranTender::find($id);
$penawrandetails = PenawaranDetailTender::where('penawaran_id','=',$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) {
// dd($obj->dokumen_persetujuan);
if ($obj->dokumen_persetujuan && Storage::disk('public')->exists($obj->dokumen_persetujuan)) {
$i=0;
foreach($penawrandetails as $obj)
{
if($obj->dokumen_persetujuan && Storage::disk('public')->exists($obj->dokumen_persetujuan))
{
$penawrandetails_path = Storage::url($obj->dokumen_persetujuan);
$penawrandetails[$i]->dokumen_persetujuan = $penawrandetails_path;
$i++;
$penawrandetails[$i]['dokumen_persetujuan']=$penawrandetails_path;
}
$i++;
}
$kjpp = null;
$kjpp = KJPP::pluck('name', 'id');
$data['penawaran'] = $penawaran;
$data['penawrandetails'] = $penawrandetails;
$data['message'] = 'data successfully found';
$data['status'] = 'success';
$data['message'] ['message_success'] = array("data successfully found");
} else {
$data['penawaran'] = null;
$data['penawrandetails'] = null;
$data['message'] = 'data not found';
$data['status'] = 'error';
$data['message'] ['message_data'] = array("data not found");
}
} else {
$data['status'] = 'error';
$data['message'] = 'no ajax request';
$data['message'] ['message_ajax'] = array("no ajax request");
}
return response()->json($data);
@@ -151,62 +153,71 @@ class ProsesPenawaranController extends Controller
{
// init
$data = array();
$dataku = array();
$tindakan = null;
$dataPenawaranDetail = array();
if (request()->ajax()) {
$validator = ProsesPenawaranController::rulesEditnya($request, $id);
if ($validator['fails']) {
$data['message'] = $validator['errors'];
$data['status'] = 'error';
} else {
}
else
{
try {
$dataku = [
'updated_by' => Auth::id(),
'updated_at' => now(),
'biaya_penawaran' => str_replace(".", "", $request->biaya_penawaran)
];
$dataPenawaranDetail = ['updated_by' => Auth::id(),
'updated_at' => now(),
'biaya_penawaran' => str_replace(".","",$request->biaya_penawaran)
];
if ($request->hasFile('dokumen_persetujuan')) {
if ($request->hasFile('dokumen_persetujuan'))
{
$file_tmp = $request->file('dokumen_persetujuan');
$folderPath = 'uploads/penawaran/';
if ($file_tmp->isValid()) {
$myFile = $file_tmp->getClientOriginalName(); // nama file with extension
if ($file_tmp->isValid())
{
$myFile=$file_tmp->getClientOriginalName(); // nama file with extension
$file_name = pathinfo($myFile, PATHINFO_FILENAME); // nama file without extension
$extension = $file_tmp->getClientOriginalExtension();
// kjppID_penawaranID_namaFile_userID_time
$newFileName = $request->kjpp_rekanan_id . '_' . $id . '_' . $file_name . '_' . Auth::user()->id . "_" . time() . '.' . $extension;
Storage::disk('public')->put($folderPath . '/' . $newFileName, file_get_contents($file_tmp));
$newFileName = $request->kjpp_rekanan_id.'_'.$id.'_'.$file_name.'_'.Auth::user()->id."_".time() .'.'. $extension;
Storage::disk('public')->put($folderPath.'/'.$newFileName,file_get_contents($file_tmp));
$newFileNameWithPath = $folderPath . $newFileName;
$dataku['attachment'] = $myFile;
$dataku['dokumen_persetujuan'] = $newFileNameWithPath;
$dataPenawaranDetail['attachment'] = $myFile;
$dataPenawaranDetail['dokumen_persetujuan'] = $newFileNameWithPath;
$model = PenawaranDetailTender::findOrFail($id);
$model->update($dataku);
$penawarandetail = PenawaranDetailTender::findOrFail($id);
$penawarandetail->update($dataPenawaranDetail);
$data['status'] = 'success';
$data['detailpenawaran_id'] = $id;
$data['message'] = 'Proses Penawarn KJPP successfully';
} else {
$data['status'] = 'error';
$data['message'] = 'Silahkan upload file pdf';
$data['status'] = 'success';
$data['message'] ['message_success'] = array('Proses Penawarn KJPP successfully');
}
else
{
$data['status'] = 'error';
$data['message'] ['check_file_jenis'] = array("Silahkan upload file pdf");
}
} else {
$data['status'] = 'error';
$data['message'] = 'Silahkan upload file';
}
else
{
$data['status'] = 'error';
$data['message'] ['check_file'] = array("Silahkan upload file");
}
} catch (Exception $e) {
$data['status'] = 'error';
$data['message'] = 'Proses Penawarn KJPP failed.';
$data['message'] ['message_error_try_catch'] = array('Proses Penawarn KJPP failed.');
}
}
} else {
$data['status'] = 'error';
$data['message'] = 'no ajax request';
$data['message'] ['message_ajax'] = array("no ajax request");
}
return response()->json($data);
@@ -240,134 +251,86 @@ class ProsesPenawaranController extends Controller
*/
public function updateAll(Request $request, $id): JsonResponse
{
// init
$data = array();
$dataku = array();
$model = PenawaranTender::findOrFail($id);
$checkActiveDateRange = $this->checkActiveDateRangePenawaran($model->start_date, $model->end_date);
// init
$data = array();
$dataPermohonan = array();
$dataPenawaran = array();
$penawaran = PenawaranTender::find($id);
$checkActiveDateRange = checkActiveDateRangePenawaran($id);
// cek masa aktif penawaran
if ($checkActiveDateRange) {
// cek masa aktif penawaran
if($checkActiveDateRange)
{
$checkKelengkapanDetailKJPP = $this->checkKelengkapanDetailKJPP($id);
if ($checkKelengkapanDetailKJPP) {
DB::beginTransaction();
try {
$dataku = [
'status' => 'tendered',
'updated_by' => Auth::id(),
'updated_at' => now()
];
$checkKelengkapanDetailKJPP = checkKelengkapanDetailKJPP($id);
if($checkKelengkapanDetailKJPP)
{
DB::beginTransaction();
try {
$_updatestatus = ['status' => 'proposal-tender',
'updated_by' => Auth::id(),
'updated_at' => now()
];
$dataPermohonan = [
'status' => 'tendered',
'updated_by' => Auth::id(),
'updated_at' => now()
];
$permohonan = Permohonan::where('nomor_registrasi','=', $penawaran->nomor_registrasi)->first();
$permohonan = Permohonan::where('nomor_registrasi', '=', $model->nomor_registrasi)->first();
$penawaran->update($_updatestatus);
$permohonan->update($_updatestatus);
$model->update($dataku);
$permohonan->update($dataPermohonan);
DB::commit();
DB::commit();
$data['message'] ['message_success'] = array('Sukses melakukan Proses Penawaran');
$data['status'] = 'success';
$data['message'] = "Sukses melakukan Proses Penawaran";
$data['status'] = 'success';
} catch (Exception $e) {
DB::rollBack();
// dd($e);
$data['message'] = "Gagal melakukan Proses Penawaran";
$data['status'] = 'error';
}
} else {
$data['message'] = "Silahkan lengkapi data KJPP";
$data['status'] = 'error';
}
} else {
$data['message'] = "Penawaran sudah di tutup";
$data['status'] = 'error';
}
} catch (Exception $e) {
DB::rollBack();
// dd($e);
$data['message'] ['message_error_try_catch'] = array("Gagal melakukan Proses Penawaran");
$data['status'] = 'error';
}
return response()->json($data);
}
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);
}
public function checkActiveDateRangePenawaran($start_date1, $end_date1)
{
$start_date = strtotime($start_date1);
$end_date = strtotime($end_date1);
$todays_date = strtotime(now());
$allow = true;
if ($todays_date >= $start_date && $todays_date <= $end_date) {
//Penawaran dibuka
$allow = true;
} else {
if ($todays_date < $start_date) {
//Penawaran Belum dibuka
$allow = true;
} else {
//Penawaran sudah ditutup
$allow = false;
}
}
return $allow;
}
public function checkKelengkapanDetailKJPP($id)
{
$allow = true;
// DB::enableQueryLog();
// detail_penawaran apakah isian biaya_penawaran, attachment, dokumen_persetujuan sudah lengkap?
$query = PenawaranDetailTender::select('id')
->where('penawaran_id', '=', $id)
->where(function ($query) {
$query->orWhere('biaya_penawaran', '', "");
$query->orWhereNull('biaya_penawaran');
$query->orWhere('attachment', '', "");
$query->orWhereNull('attachment');
$query->orWhere('dokumen_persetujuan', '', "");
$query->orWhereNull('dokumen_persetujuan');
})->get();
// $sql = DB::getQueryLog();
if (sizeof($query) > 0) {
$allow = false;
}
return $allow;
}
public function updateStatusPenawaranKJPP(Request $request, $id): JsonResponse
public function updateKJPPStatus(Request $request, $id): JsonResponse
{
// init
$data = array();
$dataku = array();
$dataDetailPenawaran = array();
try {
$model = PenawaranDetailTender::findOrFail($id);
$data['id'] = $id;
$detailpenawaran = PenawaranDetailTender::findOrFail($id);
$data['id']=$id;
$dataku = [
'status' => '0',
$dataDetailPenawaran = ['status' => '0',
'updated_by' => Auth::id(),
'updated_at' => now()
];
$model->update($dataku);
$detailpenawaran->update($dataDetailPenawaran);
$data['message'] = "Sukses delete Penawaran KJPP";
$data['status'] = 'success';
$data['message'] ['message_success'] = array('Sukses delete Penawaran KJPP '.$request->kjppName);
} catch (Exception $e) {
// dd($e);
$data['message'] = "Gagal delete Penawaran KJPP";
$data['status'] = 'error';
$data['message'] ['message_error_try_catch'] = array("Gagal delete Penawaran KJPP ".$request->kjppName);
}
return response()->json($data);
}

View File

@@ -0,0 +1,373 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use Exception;
use Maatwebsite\Excel\Facades\Excel;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\KJPP;
use Modules\Lpj\Models\PenawaranDetailTender;
use Modules\Lpj\Models\PenawaranDetailTenderLog;
use Modules\Lpj\Models\PenawaranTender;
use Modules\Lpj\Models\Permohonan;
class ProsesPenawaranUlangController extends Controller
{
public $user;
/**
* Display a listing of the resource.
*/
public function index()
{
return view('lpj::prosespenawaranulang.index');
}
public function dataForDatatables(Request $request)
{
if (is_null($this->user) || !$this->user->can('debitur.view')) {
//abort(403, 'Sorry! You are not allowed to view users.');
}
// Retrieve data from the database
$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','=','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 . '%');
});
}
// 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'])->get();
$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 edit($id)
{
return view('lpj::prosespenawaranulang.edit', compact('id'));
}
public function show($id)
{
$prosespenawaran = PenawaranTender::find($id);
return view('lpj::prosespenawaranulang.show', compact('id','prosespenawaran'));
}
public function setData(Request $request): JsonResponse
{
$data = array();
$penawaran = array();
$penawrandetails = array();
if (request()->ajax()) {
$id = $request->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')
->select('detail_penawaran.*', 'kjpp.code AS kjpp_code', 'kjpp.name AS kjpp_name')
->where('detail_penawaran.status','=',1)
->get();
$i=0;
foreach($penawrandetails as $obj)
{
if($obj->dokumen_persetujuan && Storage::disk('public')->exists($obj->dokumen_persetujuan))
{
$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;
}
$data['penawaran'] = $penawaran;
$data['penawrandetails'] = $penawrandetails;
$data['status'] = 'success';
$data['message']['message_success'] = array("data successfully found");
} else {
$data['status'] = 'error';
$data['penawaran'] = null;
$data['penawrandetails'] = null;
$data['message']['message_data'] = array("data not found");
}
} else {
$data['status'] = 'error';
$data['message']['message_ajax'] = array("no ajax request");
}
return response()->json($data);
}
public function update(Request $request, $id): JsonResponse
{
// init
$data = array();
$dataDetailPenawaranLog = array();
$dataDetailPenawaran = array();
$pleaseCommit= true;
if (request()->ajax()) {
$validator = ProsesPenawaranUlangController::rulesEditnya($request, $id);
if ($validator['fails']) {
$data['message'] = $validator['errors'];
$data['status'] = 'error';
}
else
{
// cek masa aktif penawaran
$detailpenawaran = PenawaranDetailTender::find($id);
$checkActiveDateRange = checkActiveDateRangePenawaran($detailpenawaran->penawaran_id);
// cek masa aktif penawaran
if($checkActiveDateRange)
{
DB::beginTransaction();
try {
$dataDetailPenawaranLog = [
'detail_penawaran_id' =>$detailpenawaran->id,
'kjpp_rekanan_id' =>$detailpenawaran->kjpp_rekanan_id,
'penawaran_id' =>$detailpenawaran->penawaran_id,
'biaya_penawaran' =>$detailpenawaran->biaya_penawaran,
'attachment' =>$detailpenawaran->attachment,
'dokumen_persetujuan' =>$detailpenawaran->dokumen_persetujuan,
'status' =>$detailpenawaran->status,
'authorized_status' =>$detailpenawaran->authorized_status,
'authorized_at' =>$detailpenawaran->authorized_at,
'authorized_at' =>$detailpenawaran->authorized_at,
'created_at' =>$detailpenawaran->created_at,
'updated_at' =>$detailpenawaran->updated_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);
$dataDetailPenawaran = ['updated_by' => Auth::id(),
'updated_at' => now(),
'biaya_penawaran' => $biaya_penawaran
];
if ($request->hasFile('dokumen_persetujuan'))
{
$file_tmp = $request->file('dokumen_persetujuan');
$folderPath = 'uploads/penawaran/';
if ($file_tmp->isValid())
{
$myFile=$file_tmp->getClientOriginalName(); // nama file with extension
$file_name = pathinfo($myFile, PATHINFO_FILENAME); // nama file without extension
$extension = $file_tmp->getClientOriginalExtension();
// kjppID_penawaranID_namaFile_userID_time
$newFileName = $request->kjpp_rekanan_id.'_'.$id.'_'.$file_name.'_'.Auth::user()->id."_".time() .'.'. $extension;
Storage::disk('public')->put($folderPath.'/'.$newFileName,file_get_contents($file_tmp));
$newFileNameWithPath = $folderPath . $newFileName;
$dataDetailPenawaran['attachment'] = $myFile;
$dataDetailPenawaran['dokumen_persetujuan'] = $newFileNameWithPath;
}
else
{
$pleaseCommit=false;
$data['status'] = 'error';
$data['message']['check_file_jenis'] = array("Silahkan upload file pdf");
}
}
else
{
$data['status'] = 'error';
$data['message']['check_file'] = array("Silahkan upload file");
}
$detailpenawaran->update($dataDetailPenawaran);
if($pleaseCommit)
{
DB::commit();
$data['id'] = $id;
$data['detailpenawaran'] = $detailpenawaran;
$data['status'] = 'success';
$data['message']['message_success'] = array('Proses Penawarn KJPP Ulang successfully');
}
else
{
DB::rollBack();
$data['status'] = 'error';
$data['message']['message_error'] = array("Proses Penawarn KJPP Ulang failed..");
}
} catch (Exception $e) {
DB::rollBack();
$data['status'] = 'error';
$data['message']['message_error_try_catch'] = array('Proses Penawarn KJPP Ulang failed.');
}
}
else
{
$data['status'] = 'error';
$data['message']['active_date_range'] = array("Penawaran sudah di tutup");
}
}
} else {
$data['status'] = 'error';
$data['message']['message_ajax'] = array("no ajax request");
}
return response()->json($data);
}
// delete KJPP di detail_penawaran (status di buat 0)
public function updateKJPPStatus(Request $request, $id): JsonResponse
{
// init
$data = array();
$dataku = array();
$dataDetailPenawaranLog = array();
DB::beginTransaction();
try {
$model = PenawaranDetailTender::findOrFail($id);
// log
$dataDetailPenawaranLog = [
'detail_penawaran_id' =>$model->id,
'kjpp_rekanan_id' =>$model->kjpp_rekanan_id,
'penawaran_id' =>$model->penawaran_id,
'biaya_penawaran' =>$model->biaya_penawaran,
'attachment' =>$model->attachment,
'dokumen_persetujuan' =>$model->dokumen_persetujuan,
'status' =>0,
'authorized_status' =>$model->authorized_status,
'authorized_at' =>$model->authorized_at,
'authorized_at' =>$model->authorized_at,
'created_at' =>$model->created_at,
'updated_at' =>$model->updated_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',
'updated_by' => Auth::id(),
'updated_at' => now()
];
$model->update($dataku);
DB::commit();
$data['status'] = 'success';
$data['message']['message_success'] = array('Sukses delete Penawaran KJPP '.$request->kjppName);
} catch (Exception $e) {
DB::rollBack();
// dd($e);
$data['status'] = 'error';
$data['message']['message_error_try_catch'] = array("Gagal delete Penawaran KJPP ".$request->kjppName);
}
return response()->json($data);
}
public function rulesEditnya($request, $id)
{
$validateIt = [
// 'name' diambil dari definisi parameter yang di kirim pada POST Data
'biaya_penawaran' => 'required',
'dokumen_persetujuan' => 'required|file|mimes:pdf'
];
$messageIt = [
'biaya_penawaran.required' => 'Silahkan isi Biaya Penawaran',
'dokumen_persetujuan.required' => 'Silahkan isi dokumen',
'dokumen_persetujuan.file' => 'Silahkan isi file',
'dokumen_persetujuan.mimes' => 'Silahkan upload pdf'
];
$validator = Validator::make($request->all(), $validateIt, $messageIt);
$data['fails'] = $validator->fails();
$data['errors'] = $validator->errors();
return $data;
}
}

View File

@@ -114,25 +114,27 @@
if (request()->ajax()) {
$id = $request->id;
$datas = Permohonan::findOrFail($id);
$data['status'] = 'success';
$datas = Permohonan::find($id);
if ($datas) {
$jenisPenilaians=null;
$regions=null;
$regions=Regions::pluck('name', 'id');
$jenisPenilaians=JenisPenilaian::pluck('name', 'id');
$data['status'] = 'success';
$data['regions'] = $regions;
$data['jenisPenilaians'] = $jenisPenilaians;
$data['datas'] = $datas;
$data['message'] = 'data successfully found';
$data['message'] ['message_success'] = array("data successfully found");
} else {
$data['status'] = 'error';
$data['datas'] = null;
$data['message'] = 'data not found';
$data['message'] ['message_data'] = array("data not found");
}
} else {
$data['status'] = 'error';
$data['message'] = 'no ajax request';
$data['message'] ['message_ajax'] = array("no ajax request");
}
return response()->json($data);
@@ -179,17 +181,17 @@
$modal->update($dataku);
//
$data['status'] = 'success';
$data['message'] = 'Regitrasi '.$modal->nomor_registrasi.' successfully';
$data['message'] ['message_success'] = array('Regitrasi '.$modal->nomor_registrasi.' successfully');
} catch (Exception $e) {
$data['status'] = 'error';
$data['message'] = 'Jenis Fasilitas Kredit updated failed.';
$data['message'] ['message_try_catch'] = array('Regitrasi updated failed.');
}
}
} else {
$data['status'] = 'error';
$data['message'] = 'no ajax request';
$data['message'] ['message_ajax'] = array("no ajax request");
}
return response()->json($data);
@@ -245,27 +247,4 @@
return view('lpj::registrasi.show', compact('id','permohonan'));
}
public function showData(Request $request): JsonResponse
{
$data = array();
$datas = array();
if (request()->ajax()) {
$id = $request->id;
$datas = Permohonan::findOrFail($id);
$data['status'] = 'success';
if ($datas) {
$data['datas'] = $datas;
$data['message'] = 'data successfully found';
} else {
$data['datas'] = null;
$data['message'] = 'data not found';
}
} else {
$data['status'] = 'error';
$data['message'] = 'no ajax request';
}
return response()->json($data);
}
}

View File

@@ -0,0 +1,268 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Carbon\Carbon;
use Exception;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;
// use Modules\Location\Models\City;
// use Modules\Location\Models\District;
// use Modules\Location\Models\Province;
// use Modules\Location\Models\Village;
// use Modules\Lpj\Exports\DebitureExport;
// use Modules\Lpj\Http\Requests\DebitureRequest;
// use Modules\Lpj\Http\Requests\DokumenJaminanRequest;
// use Modules\Lpj\Models\Branch;
// use Modules\Lpj\Models\Debiture;
// use Modules\Lpj\Models\DokumenJaminan;
// use Modules\Lpj\Models\JenisJaminan;
// use Modules\Lpj\Models\JenisLegalitasJaminan;
// use Modules\Lpj\Models\PemilikJaminan;
use Modules\Lpj\Models\Permohonan;
use Modules\Lpj\Models\JenisPenilaian;
use Modules\Lpj\Models\Regions;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Modules\Lpj\Models\PenawaranTender;
class RegistrasiFinalController extends Controller
{
public $user;
public function index()
{
return view('lpj::registrasifinal.index');
}
public function dataForDatatables(Request $request)
{
if (is_null($this->user) || !$this->user->can('debitur.view')) {
//abort(403, 'Sorry! You are not allowed to view users.');
}
// Retrieve data from the database
$query =PenawaranTender::query()
->select('penawaran.*', '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','=','spk')
->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 . '%');
});
}
// 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'])->get();
$data = $query->get();
// dd($data);
$i=0;
foreach($data as $obj)
{
if($obj->tanggal_penilaian_sebelumnya)
{
$data[$i]->tanggal_penilaian_sebelumnya = Carbon::parse($obj->tanggal_penilaian_sebelumnya)->format('d F Y H:i:s');
}
if($obj->biaya_kjpp_sebelumnya)
{
$data[$i]->biaya_kjpp_sebelumnya = formatRupiah($obj->biaya_kjpp_sebelumnya);
}
// date_range
if($obj->start_date && $obj->end_date)
{
$data[$i]->date_range = Carbon::parse($obj->start_date)->format('d M Y').' - '.Carbon::parse($obj->end_date)->format('d M Y');
}
$i++;
}
// 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 show($id)
{
$permohonan = Permohonan::find($id);
return view('lpj::registrasifinal.show', compact('id','permohonan'));
}
public function edit($id)
{
return view('lpj::registrasifinal.edit', compact('id'));
}
public function setData(Request $request): JsonResponse
{
$data = array();
$datas = array();
if (request()->ajax()) {
$id = $request->id;
$datas = Permohonan::find($id);
if ($datas) {
$penawaran=null;
$regions=null;
$regions=Regions::pluck('name', 'id');
$penawaran = PenawaranTender::where('nomor_registrasi','=',$datas->nomor_registrasi)->first();
$penawaranString = "";
if($penawaran->status)
{
$penawaranString = convertSlug($penawaran->status);
$penawaran->status = $penawaranString;
}
$data['status'] = 'success';
$data['regions'] = $regions;
$data['penawaran'] = $penawaran;
$data['datas'] = $datas;
$data['message']['message_success'] = array("data successfully found");
} else {
$data['status'] = 'error';
$data['datas'] = null;
$data['message']['message_data'] = array("data not found");
}
} else {
$data['status'] = 'error';
$data['message']['message_ajax'] = array("no ajax request");
}
return response()->json($data);
}
public function update(Request $request, $id): JsonResponse
{
// init
$data = array();
$dataPermohonan = array();
$dataPenawaran = array();
if (request()->ajax()) {
$validator = RegistrasiFinalController::rulesEditnya($request, $id);
if ($validator['fails']) {
$data['message'] = $validator['errors'];
$data['status'] = 'error';
}
else
{
DB::beginTransaction();
try {
// update table permohonan => status (registrasi-final), region_id, keterangan, authorized_at, authorized_status, authorized_by
// update table penawaran => status (registrasi-final)
$dataPermohonan = [
'status' => 'registrasi-final',
'region_id' => $request->region,
'keterangan' => $request->catatan,
'authorized_at' => now(),
'authorized_status' =>1,
'authorized_by' => Auth::id()
];
$dataPenawaran = ['status' => 'registrasi-final'];
$permohonan = Permohonan::find($id);
$penawaran = PenawaranTender::where('nomor_registrasi','=',$permohonan->nomor_registrasi)->first();
$permohonan->update($dataPermohonan);
$penawaran->update($dataPenawaran);
//
DB::commit();
$data['status'] = 'success';
$data['message']['message_success'] = array('Regitrasi Final '.$permohonan->nomor_registrasi.' successfully');
} catch (Exception $e) {
DB::rollBack();
$data['status'] = 'error';
$data['message']['message_try_catch'] = array('Regitrasi Final '.$permohonan->nomor_registrasi.' failed.');
}
}
} else {
$data['status'] = 'error';
$data['message']['message_ajax'] = array("no ajax request");
}
return response()->json($data);
}
public function rulesEditnya($request, $id)
{
$validate_catatan='';
$validateIt = [
// 'name' diambil dari definisi parameter yang di kirim pada POST Data
'region' => 'required',
'catatan' => 'required',
];
$messageIt = [
'region.required' => 'Silahkan pilih Region',
'catatan.required' => 'Silahkan isi Catatan'
];
$validator = Validator::make($request->all(), $validateIt, $messageIt);
$data['fails'] = $validator->fails();
$data['errors'] = $validator->errors();
return $data;
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ResumeController extends Controller
{
public $user;
/**
* Display a listing of the resource.
*/
public function index()
{
return view('lpj::resume.index');
}
/**
* Show the specified resource.
*/
public function show($id) {}
/**
* Store form inspeksi.
*/
public function store(Request $request) {}
public function update(Request $request, $id) {}
}

View File

@@ -0,0 +1,65 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class SLAController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('lpj::SLA.index');
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('lpj::create');
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('lpj::show');
}
/**
* 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)
{
//
}
}

View File

@@ -0,0 +1,28 @@
<?php
namespace Modules\Lpj\Http\Controllers;
use App\Http\Controllers\Controller;
use Exception;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;
// use Modules\Lpj\Exports\TujuanPenilaianExport;
// use Modules\Lpj\Http\Requests\TujuanPenilaianRequest;
// use Modules\Lpj\Models\TujuanPenilaian;
class SpkController extends Controller
{
public $user;
public function index()
{
return view('lpj::spk.index');
}
public function viewSpk()
{
// return Excel::download(new TujuanPenilaianExport, 'tujuan_penilaian.xlsx');
return view('lpj::spk.view');
}
}

View File

@@ -241,15 +241,25 @@ class TenderController extends Controller
}
/**
* Remove the specified resource from storage.
* Tampilkan Surat Tender
*/
public function destroy($id)
public function showSuratTender($noreg)
{
//
$penawaran = PenawaranTender::where('nomor_registrasi', '=', $noreg)->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)

View File

@@ -1,27 +0,0 @@
<?php
namespace Modules\Lpj\Http\Library;
use Modules\Lpj\Models\JenisFasilitasKredit;
use Illuminate\Support\Facades\DB;
trait LpjHelpers
{
public static function onLastCodeJFK(): string
{
// max(code)
$noUrutAkhir2 = JenisFasilitasKredit::withTrashed()->max('code');
$noUrutAkhir=sprintf("%06s", 1);
$noUrutAwal = 'JFK';
$noUrutAkhirString = $noUrutAkhir;
if($noUrutAkhir2){
$noUrutAkhir = substr($noUrutAkhir2, 3, 6);
// $noUrutAwal = substr($noUrutAkhir2, 0, 3);
$noUrutAkhirString = sprintf("%06s", abs($noUrutAkhir + 1));
}
return $noUrutAwal . $noUrutAkhirString;
}
}

View File

@@ -1,40 +0,0 @@
<?php
namespace Modules\Lpj\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class BranchRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*/
public function rules()
: array
{
$rules = [
'name' => '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;
}
}

View File

@@ -1,41 +0,0 @@
<?php
namespace Modules\Lpj\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CurrencyRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*/
public function rules()
: array
{
$rules = [
'name' => '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;
}
}

View File

@@ -4,6 +4,7 @@
use Illuminate\Foundation\Http\FormRequest;
use Modules\Lpj\Rules\UniqueCifExceptZero;
use Modules\Lpj\Rules\UniqueExcept;
class DebitureRequest extends FormRequest
{

View File

@@ -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),
]);
}
}

View File

@@ -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),
]);
}
}

View File

@@ -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', []);

View File

@@ -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');

View File

@@ -1,20 +0,0 @@
<?php
namespace Modules\Lpj\Models;
use Modules\Lpj\Database\Factories\CurrencyFactory;
class Currency extends Base
{
protected $table = 'currencies';
protected $fillable = [
'code',
'name',
'decimal_places',
'status',
'authorized_at',
'authorized_status',
'authorized_by'
];
}

View File

@@ -17,7 +17,7 @@
'name',
'dokumen_jaminan',
'keterangan',
'details',
'status',
'authorized_at',
'authorized_status',

View File

@@ -19,4 +19,9 @@ class JenisLaporan extends Model
protected $fillable = ['code', 'name'];
public function penawaran()
{
return $this->hasMany(PenawaranTender::class, 'jenis_laporan_id', 'id');
}
}

View File

@@ -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'];
}

View File

@@ -30,7 +30,8 @@ class PemilikJaminan extends Base
'status',
'authorized_at',
'authorized_status',
'authorized_by'
'authorized_by',
'detail_sertifikat',
];
public function province()

View File

@@ -0,0 +1,30 @@
<?php
namespace Modules\Lpj\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
// use Modules\Lpj\Database\Factories\PenawaranDetailTenderFactory;
class PenawaranDetailTenderLog extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $table = 'detail_penawaran_logs';
protected $guarded = ['id'];
public function penawaran(): BelongsTo
{
return $this->belongsTo(PenawaranTender::class, 'penawaran_id', 'id');
}
public function penawarandetail(): BelongsTo
{
return $this->belongsTo(PenawaranDetailTender::class, 'detail_penawaran_id', 'id');
}
}

View File

@@ -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');
}
}

View File

@@ -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,7 +77,12 @@ 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');
}
public function region()

18
app/Models/SLA.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
namespace Modules\Lpj\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class SLA extends Model
{
use HasFactory;
protected $table = 'sla';
/**
* The attributes that are mass assignable.
*/
protected $guarded = ['id'];
}

9
app/Models/Spk.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
namespace Modules\Lpj\Models;
class Spk extends Base
{
protected $table = 'arah_mata_angin';
protected $fillable = ['name','authorized_at','authorized_status','authorized_by'];
}

View File

@@ -1,25 +1,32 @@
<?php
namespace Modules\Lpj\Rules;
namespace Modules\Lpj\Rules;
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;
use Modules\Lpj\Models\Debiture;
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;
use Modules\Lpj\Models\Debiture;
class UniqueCifExceptZero implements ValidationRule
{
public function __construct($id = null)
class UniqueCifExceptZero implements ValidationRule
{
$this->id = $id;
}
protected $id;
public function validate($attribute, $value, $fail): void
{
if (Debiture::where($attribute, $value)
->where('id', '!=', $this->id)
->where($attribute, '!=', '000000')
->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.');
}
}
}
}

View File

@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('detail_penawaran_logs', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('detail_penawaran_id')->nullable();
$table->unsignedBigInteger('kjpp_rekanan_id')->nullable();
$table->unsignedBigInteger('penawaran_id')->nullable();
$table->string('biaya_penawaran')->nullable();
$table->string('attachment')->nullable();
$table->string('dokumen_persetujuan')->nullable();
$table->boolean('status')->nullable();
$table->char('authorized_status', 1)->nullable();
$table->timestamp('authorized_at')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
$table->timestamps();
$table->timestamp('deleted_at')->nullable();
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('detail_penawaran_logs');
}
};

View File

@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('sla', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sla');
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('debitures', function (Blueprint $table) {
$table->dropUnique(['cif']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('debitures', function (Blueprint $table) {
$table->string('cif')->unique()->change();
});
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('pemilik_jaminan', function (Blueprint $table) {
$table->string('detail_sertifikat')->nullable()->after('name');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('pemilik_jaminan', function (Blueprint $table) {
$table->dropColumn('detail_sertifikat');
});
}
};

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('jenis_legalitas_jaminan', function (Blueprint $table) {
$table->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');
});
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('detail_dokumen_jaminan', function (Blueprint $table) {
$table->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');
});
}
};

View File

@@ -0,0 +1,42 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\ArahMataAngin;
class ArahMataAnginSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
ArahMataAngin::insert([
[
'name' => 'Utara',
],
[
'name' => 'Timur Laut',
],
[
'name' => 'Timur',
],
[
'name' => 'Tenggara',
],
[
'name' => 'Selatan',
],
[
'name' => 'Barat Daya',
],
[
'name' => 'Barat',
],
[
'name' => 'Barat Laut',
],
]);
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Basicdata\Models\Branch;
class BranchSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Branch::insert([
[
'code' => 'C01',
'name' => 'KPNO',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
]
]);
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Basicdata\Models\Currency;
class CurrencySeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Currency::insert([
[
'code' => '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
]
]);
}
}

View File

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

View File

@@ -0,0 +1,73 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\DetailDokumenJaminan;
class DetailDokumenJaminanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DetailDokumenJaminan::insert([
[
'name' => '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
]
]);
}
}

View File

@@ -0,0 +1,54 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\PenawaranDetailTender;
class DetailPenawaranSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
PenawaranDetailTender::insert([
[
'kjpp_rekanan_id' => 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
]
]);
}
}

View File

@@ -0,0 +1,34 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\DokumenJaminan;
class DokumenJaminanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DokumenJaminan::insert([
[
'debiture_id' => 1,
'jenis_jaminan_id' => 1,
'pemilik_jaminan_id' => 3,
'province_code' => '32',
'city_code' => '32.75',
'district_code' => '32.75.03',
'village_code' => '32.75.03.1001',
'postal_code' => '17125',
'address' => 'Jl. Apel No. 9',
'status' => 1,
'created_at' => now(),
'updated_at' => now(),
'created_by' => 1,
'updated_by' => 1
]
]);
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\HubunganPemilikJaminan;
class HubunganPemilikJaminanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
HubunganPemilikJaminan::insert([
[
'name' => 'Milik Pribadi'
],
[
'name' => 'Suami/Istri'
],
[
'name' => 'Anak'
],
[
'name' => 'Saudara Kandung'
],
[
'name' => 'Ayah'
],
[
'name' => 'Ibu'
]
]);
}
}

View File

@@ -0,0 +1,33 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\HubunganPenghuniJaminan;
class HubunganPenghuniJaminanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
HubunganPenghuniJaminan::insert([
[
'name' => 'Suami/Istri',
],
[
'name' => 'Anak',
],
[
'name' => 'Saudara Kandung',
],
[
'name' => 'Orang Tua',
],
[
'name' => 'Kontrak/Kost'
]
]);
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\IjinUsaha;
class IjinUsahaSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
IjinUsaha::insert([
[
'code' => '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()
]
]);
}
}

View File

@@ -0,0 +1,68 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\JenisDokumen;
class JenisDokumenSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
JenisDokumen::insert([
[
'name' => '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
]
]);
}
}

View File

@@ -0,0 +1,90 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\JenisFasilitasKredit;
class JenisFasilitasKreditSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
JenisFasilitasKredit::insert([
[
'code' => '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
],
]);
}
}

View File

@@ -0,0 +1,73 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\JenisJaminan;
class JenisJaminanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
JenisJaminan::insert([
[
'code' => '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
]
]);
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\JenisLaporan;
class JenisLaporanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
JenisLaporan::insert([
[
'code' => '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()
]
]);
}
}

View File

@@ -0,0 +1,90 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\JenisLegalitasJaminan;
class JenisLegalitasJaminanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
JenisLegalitasJaminan::insert([
[
'code' => '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
],
]);
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\JenisPenilaian;
class JenisPenilaianSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
JenisPenilaian::insert([
[
'code' => 'JP1',
'name' => 'Internal',
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'JP2',
'name' => 'External',
'created_at' => now(),
'updated_at' => now()
],
]);
}
}

View File

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

View File

@@ -1,17 +1,45 @@
<?php
namespace Modules\Lpj\Database\Seeders;
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Database\Seeder;
class LpjDatabaseSeeder extends Seeder
class LpjDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
/**
* Run the database seeds.
*/
public function run()
: void
{
// $this->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,
]);
}
}

View File

@@ -0,0 +1,45 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\NilaiPlafond;
class NilaiPlatformSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
NilaiPlafond::insert([
[
'code' => '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
]
]);
}
}

View File

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

View File

@@ -0,0 +1,46 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\PenawaranTender;
class PenawaranSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
PenawaranTender::insert([
[
'code' => '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
]
]);
}
}

View File

@@ -0,0 +1,51 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\Penilaian;
class PenilaianSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Penilaian::insert([
[
'jenis_penilaian_id' => 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
]
]);
}
}

View File

@@ -0,0 +1,126 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\Permohonan;
class PermohonanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Permohonan::insert([
[
'nomor_registrasi' => '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
]
]);
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\Regions;
class RegionSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Regions::insert([
[
'code' => 'R01',
'name' => 'Region 1',
'created_at' => now(),
'updated_at' => now()
],
[
'code' => 'R02',
'name' => 'Region 2',
'created_at' => now(),
'updated_at' => now()
]
]);
}
}

View File

@@ -0,0 +1,128 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\StatusPermohonan;
class StatusPermohonanSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
StatusPermohonan::insert([
[
'name' => '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
]
]);
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\TeamsUsers;
class TeamUsersSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
TeamsUsers::insert([
[
'teams_id' => 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()
]
]);
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\Teams;
class TeamsSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
Teams::insert([
[
'regions_id' => 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()
]
]);
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\TujuanPenilaianKJPP;
class TujuanPenilaianKJPPSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
TujuanPenilaianKJPP::insert([
[
'code' => '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()
]
]);
}
}

View File

@@ -0,0 +1,95 @@
<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Lpj\Models\TujuanPenilaian;
class TujuanPenilaianSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
TujuanPenilaian::insert([
[
'code' => '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
]
]);
}
}

View File

@@ -6,9 +6,7 @@
"keywords": [],
"priority": 0,
"providers": ["Modules\\Lpj\\Providers\\LpjServiceProvider"],
"files": [
"app/Helpers/Lpj.php"
],
"files": ["app/Helpers/Lpj.php"],
"menu": {
"main": [
{
@@ -61,9 +59,45 @@
"attributes": [],
"permission": "",
"roles": ["administrator", "admin"]
},
{
"title": "Data Proses Penawaran Ulang",
"path": "tender.prosespenawaranulang",
"classes": "",
"attributes": [],
"permission": "",
"roles": ["administrator", "admin"]
}
]
},
{
"title": "Otorisasi Tender",
"path": "otorisasitender",
"icon": "ki-filled ki-category text-lg",
"classes": "",
"attributes": [],
"permission": "",
"roles": ["administrator", "admin"],
"sub": [
{
"title": "Otorisasi Penawaran",
"path": "otorisasitender.penawaran",
"classes": "",
"attributes": [],
"permission": "",
"roles": ["administrator", "admin"]
}
]
},
{
"title": "Registrasi Final",
"path": "registrasifinal",
"icon": "ki-filled ki-file-added text-lg",
"classes": "",
"attributes": [],
"permission": "",
"roles": ["administrator", "admin"]
},
{
"title": "Pembatalan",
"path": "",
@@ -149,6 +183,7 @@
"attributes": [],
"permission": "",
"roles": ["senior-officer"]
"roles": ["senior-officer"]
}
]
},
@@ -169,16 +204,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": [
@@ -189,24 +278,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",
@@ -325,7 +404,7 @@
"classes": "",
"attributes": [],
"permission": "",
"roles": ["Administrator", "admin"]
"roles": ["administrator", "admin"]
},
{
"title": "Tujuan Penilaian KJPP",
@@ -343,6 +422,14 @@
"permission": "",
"roles": ["administrator", "admin"]
},
{
"title": "SLA",
"path": "basicdata.sla",
"classes": "",
"attributes": [],
"permission": "",
"roles": ["administrator", "admin"]
},
{
"title": "Bentuk",
"path": "basicdata.bentuk-tanah",
@@ -350,65 +437,65 @@
"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": "",

View File

@@ -0,0 +1,8 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render('sla') }}
@endsection
@section('content')
@endsection

View File

@@ -1,4 +1,45 @@
<script>
<style>
.notification_success {
position: fixed;
top: 20px;
right: 20px;
background-color: #51a351;
color: white;
padding: 15px;
border-radius: 5px;
z-index: 1000;
transition: opacity 0.5s;
box-shadow: 0 0 12px #000;
cursor: pointer;
}
.notification_error {
position: fixed;
top: 20px;
right: 20px;
background-color: #AE342C;
color: white;
padding: 15px;
border-radius: 5px;
z-index: 1000;
transition: opacity 0.5s;
box-shadow: 0 0 12px #000;
cursor: pointer;
}
</style>
<div id="notificationSuccess" class="notification_success" style="display: none;">
<div style="display: flex; align-items: center;">
<img style="margin-right: 10px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==">
<span id="notification-message-success"></span>
</div>
</div>
<div id="notificationError" class="notification_error" style="display: none;">
<div style="display: flex; align-items: center;">
<img style="margin-right: 10px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=">
<span id="notification-message-error"></span>
</div>
</div>
<script tipe="module">
function removeErrorCssMsg() {
$(".inputku").removeClass("border-danger");
$("em").text('');
@@ -99,4 +140,56 @@ function numbersonly(ini, e){
}
}
function toastrku(flag, message)
{
$.each(message, function (key, value) {
var msg = '';
var lengthnya = value.length;
for (let i = 0; i < lengthnya; i++)
{
if(0!=i && (lengthnya-1)==i)
msg+=", ";
msg+=value[i];
}
if('success'==flag)
toastrSuccessBuild(msg);
else if('error' ==flag)
toastrErrorBuild(msg);
});
}
function toastrSuccessBuild(message) {
const notification = document.getElementById('notificationSuccess');
const messageElement = document.getElementById('notification-message-success');
messageElement.textContent = message;
notification.style.display = 'block';
notification.style.opacity = '1';
setTimeout(() => {
notification.style.opacity = '0';
setTimeout(() => {
notification.style.display = 'none';
}, 500);
}, 3000);
}
function toastrErrorBuild(message) {
const notification = document.getElementById('notificationError');
const messageElement = document.getElementById('notification-message-error');
messageElement.textContent = message;
notification.style.display = 'block';
notification.style.opacity = '1';
setTimeout(() => {
notification.style.opacity = '0';
setTimeout(() => {
notification.style.display = 'none';
}, 500);
}, 3000);
}
</script>

View File

@@ -1,58 +0,0 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render(request()->route()->getName()) }}
@endsection
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
@if(isset($branch->id))
<form action="{{ route('basicdata.branch.update', $branch->id) }}" method="POST">
<input type="hidden" name="id" value="{{ $branch->id }}">
@method('PUT')
@else
<form method="POST" action="{{ route('basicdata.branch.store') }}">
@endif
@csrf
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
{{ isset($branch->id) ? 'Edit' : 'Tambah' }} Branch
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('basicdata.branch.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Code
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text" name="code" value="{{ $branch->code ?? '' }}">
@error('code')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Name
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text" name="name" value="{{ $branch->name ?? '' }}">
@error('name')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
</button>
</div>
</div>
</div>
</form>
</div>
@endsection

View File

@@ -0,0 +1,101 @@
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Data Jaminan
</h3>
</div>
<div data-accordion="true">
@foreach($permohonan->debiture->documents as $dokumen)
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200" data-accordion-item="true" id="accordion_detail_jaminan">
<button class="accordion-toggle py-4 group mx-8" data-accordion-toggle="#accordion_detail_jaminan_{{ $loop->index }}">
<span class="text-base text-gray-900 font-medium">
Jaminan {{ $loop->index + 1 }}
</span>
<i class="ki-outline ki-plus text-gray-600 text-2sm accordion-active:hidden block">
</i>
<i class="ki-outline ki-minus text-gray-600 text-2sm accordion-active:block hidden">
</i>
</button>
<div class="accordion-content hidden" id="accordion_detail_jaminan_{{ $loop->index }}">
<div class="card-body lg:py-7.5 grid grid-cols-2">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Pemilik Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->name?? "" }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Jenis Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->jenisJaminan->name?? "" }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Hubungan Pemilik Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->hubungan_pemilik->name?? "" }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Alamat Pemilik Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->address ?? ""}},
<br> {{ $dokumen->pemilik->village->name ?? "" }}, {{ $dokumen->pemilik->district->name ?? "" }}, {{ $dokumen->pemilik->city->name ?? "" }}, {{ $dokumen->pemilik->province->name ?? "" }} - {{ $dokumen->pemilik->village->postal_code ?? "" }}
</span>
</div>
</div>
<div class="card-table scrollable-x-auto pb-3">
<a href="{{ route('debitur.jaminan.bulk.download',['id' => $permohonan->debiture->id,'jaminan' => $dokumen->id]) }}" class="ml-6 btn btn-dark dark:btn-light">
<i class="ki-outline ki-cloud-download"></i> Download Semua Dokumen
</a>
<table class="table align-middle text-sm text-gray-500">
@foreach($dokumen->detail as $detail)
<tr>
<td class="py-2 text-gray-600 font-normal max-w-[100px]">
{{ $loop->index + 1 }}. {{ $detail->jenisLegalitasJaminan->name }}
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $detail->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 max-w-[100px]">
Dokumen Jaminan
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
@if(isset($detail->dokumen_jaminan))
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
<a href="{{ route('debitur.jaminan.download',['id'=>$permohonan->debiture->id,'dokumen'=>$detail->id]) }}" class="badge badge-sm badge-outline mt-2 badge-info"><i class="ki-filled ki-cloud-download mr-2"></i> Download</a>
) @endif
<span class="badge badge-sm badge-outline badge-warning mt-2" onclick="viewPDF('{{ Storage::url($detail->dokumen_jaminan) }}')"><i class="ki-filled ki-eye mr-2"></i>Preview</span>
@endif
</td>
</tr>
<tr>
<td class="py-3 max-w-[100px]">
Keterangan
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $detail->keterangan ?? "" }}
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
@endforeach
</div>
</div>
@include('lpj::component.pdfviewer')

View File

@@ -0,0 +1,25 @@
<!-- Modal for PDF viewing -->
<div id="pdfModal" class="fixed inset-0 bg-gray-800 bg-opacity-75 flex items-center justify-center hidden w-full">
<div class="bg-white rounded-lg overflow-hidden shadow-xl transform transition-all min-w-3xl w-[1500px] h-[1200px]">
<div class="p-4 h-full">
<button onclick="closePDFModal()" class="float-right text-2xl">
<i class="ki-filled ki-cross-square text-red-600"></i>
</button>
<div id="pdfViewer" class="h-full"></div>
</div>
</div>
</div>
@push('scripts')
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.3.0/pdfobject.min.js"></script>
<script>
function viewPDF(url) {
PDFObject.embed(url, "#pdfViewer");
document.getElementById('pdfModal').classList.remove('hidden');
}
function closePDFModal() {
document.getElementById('pdfModal').classList.add('hidden');
}
</script>
@endpush

View File

@@ -1,69 +0,0 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render(request()->route()->getName()) }}
@endsection
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
@if(isset($currency->id))
<form action="{{ route('basicdata.currency.update', $currency->id) }}" method="POST">
<input type="hidden" name="id" value="{{ $currency->id }}">
@method('PUT')
@else
<form method="POST" action="{{ route('basicdata.currency.store') }}">
@endif
@csrf
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
{{ isset($currency->id) ? 'Edit' : 'Tambah' }} Currency
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('basicdata.currency.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Code
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text" name="code" value="{{ $currency->code ?? '' }}">
@error('code')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Name
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text" name="name" value="{{ $currency->name ?? '' }}">
@error('name')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Decimal Places
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('decimal_places') border-danger bg-danger-light @enderror" type="number" min="0" max="3" name="decimal_places" value="{{ $currency->decimal_places ?? '' }}">
@error('decimal_places')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
</button>
</div>
</div>
</div>
</form>
</div>
@endsection

View File

@@ -22,9 +22,10 @@
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="input-group w-full">
<select class="input tomselect w-full @error('branch_id') border-danger bg-danger-light @enderror" name="pemilik_jaminan_id" id="pemilik_jaminan_id">
<select onchange="changePemilikJaminan()" class="input tomselect w-full @error('branch_id') border-danger bg-danger-light @enderror" name="pemilik_jaminan_id" id="pemilik_jaminan_id">
<option value="">Pilih Pemilik Jaminan</option>
<option value="0">Sama Dengan Debitur</option>
<option value="00">Tidak Sama Dengan Debitur</option>
@if(isset($pemilikJaminan))
@foreach($pemilikJaminan as $pemilik)
@if(isset($document))
@@ -39,19 +40,71 @@
@endforeach
@endif
</select>
@if(isset($document->id))
<a href="{{ route('debitur.pemilik.create',$debitur->id) }}?from=update-document&document={{ $document->id }}" class="btn btn-light">
<i class="ki-outline ki-plus-squared"></i> Tambah Pemilik Jaminan
</a>
@else
<a href="{{ route('debitur.pemilik.create',$debitur->id) }}?from=create-document" class="btn btn-light">
<i class="ki-outline ki-plus-squared"></i> Tambah Pemilik Jaminan
</a>
@endif
</div>
@error('pemilik_jaminan_id')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
<fieldset id="pemilik_jaminan" class="hidden border border-solid border-gray-300 p-3 w-full mt-5 grid gap-5">
<legend class="text-sm">Pemilik Jaminan</legend>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Hubungan Pemilik Jaminan
</label>
<div class="flex flex-wrap items-baseline w-full">
<select class="input tomselect w-full @error('branch_id') border-danger bg-danger-light @enderror" name="hubungan_pemilik_jaminan_id" id="hubungan_pemilik_jaminan_id">
<option value="">Pilih Hubungan Pemilik Jaminan</option>
@if(isset($hubunganPemilik))
@foreach($hubunganPemilik as $hubungan)
@if(isset($pemilik))
<option value="{{ $hubungan->id }}" {{ isset($pemilik->hubungan_pemilik_jaminan_id) && $pemilik->hubungan_pemilik_jaminan_id == $hubungan->id?'selected' : '' }}>
{{ $hubungan->name }}
</option>
@else
<option value="{{ $hubungan->id }}">
{{ $hubungan->name }}
</option>
@endif
@endforeach
@endif
</select>
@error('hubungan_pemilik_jaminan_id')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama Lengkap
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('pemilik_name') border-danger bg-danger-light @enderror" type="text " id="pemilik_name" name="pemilik_name" value="{{ $pemilik->name ?? '' }}" placeholder="Nama Pemilik Jaminan">
@error('pemilik_name')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('nomor_id') border-danger bg-danger-light @enderror" type="number" name="nomor_id" value="{{ $debitur->nomor_id ?? '' }}" placeholder="Nomor ID/KTP">
@error('nomor_id')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
</div>
<div id="nama_sertifikat">
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
&nbsp;
</label>
<div class="flex flex-wrap items-baseline w-full">
<button type="button" id="tambah_sertifikat" class="btn btn-primary btn-xs">Tambah Nama di Sertifikat</button>
</div>
</div>
</fieldset>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
@@ -112,6 +165,18 @@
</div>
</div>
@if($detail->details)
@php $custom_field = json_decode($detail->details,true) @endphp
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56 capitalize">
{{ str_replace('_',' ',$detail->jenisLegalitasJaminan->custom_field) }}
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input" type="text" name="custom_field[][$detail->jenisLegalitasJaminan->custom_field]" value="{{ $custom_field[$detail->jenisLegalitasJaminan->custom_field] }}">
</div>
</div>
@endif
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Keterangan
@@ -244,14 +309,69 @@
</form>
@push('scripts')
{{--Pemilik Jaminan--}}
<script>
document.addEventListener("DOMContentLoaded", function() {
const namaSertifikatDiv = document.getElementById("nama_sertifikat");
// Function to add delete event listeners to existing buttons
function addDeleteListeners() {
document.querySelectorAll(".delete-button").forEach(button => {
button.addEventListener("click", function() {
this.closest(".flex.items-baseline.flex-wrap.lg\\:flex-nowrap.gap-2\\.5.mb-5").remove();
});
});
}
// Add delete listeners to existing buttons
addDeleteListeners();
document.getElementById("tambah_sertifikat").addEventListener("click", function() {
const newDiv = document.createElement("div");
newDiv.className = "flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mb-5";
newDiv.innerHTML = `
<label class="form-label max-w-56">
Nama Lengkap
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="flex flex-wrap items-baseline w-full">
<input class="input" type="text" name="detail_sertifikat[name][]" value="" placeholder="Nama Pemilik Jaminan">
</div>
<div class="flex flex-wrap items-baseline w-full">
<input class="input" type="number" name="detail_sertifikat[nomor_id][]" value="" placeholder="Nomor ID/KTP">
</div>
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
</div>
</div>
`;
namaSertifikatDiv.appendChild(newDiv);
// Add delete listener to the new button
addDeleteListeners();
});
});
function changePemilikJaminan() {
var pemilikJaminan = document.getElementById("pemilik_jaminan_id").value;
var fieldsetPemilikJaminan = document.getElementById("pemilik_jaminan");
if (pemilikJaminan === "00") {
fieldsetPemilikJaminan.classList.remove("hidden");
} else {
fieldsetPemilikJaminan.classList.add("hidden");
}
}
</script>
{{--Legalitas Jaminan--}}
<script>
function getLegalitasJaminan() {
var legalitasJaminan = document.getElementById('jenis_jaminan_id').value;
var url = '/basic-data/jenis-jaminan/legalitas/' + legalitasJaminan;
var legalitasJaminan = document.getElementById("jenis_jaminan_id").value;
var url = "/basic-data/jenis-jaminan/legalitas/" + legalitasJaminan;
fetch(url, {
method: 'GET',
method: "GET",
headers: {
'Content-Type': 'application/json'
"Content-Type": "application/json"
}
})
.then(response => {
@@ -261,9 +381,8 @@
return response.json();
})
.then(data => {
console.log(data);
var doctainer = document.getElementById('doctainer');
doctainer.innerHTML = '';
var doctainer = document.getElementById("doctainer");
doctainer.innerHTML = "";
data.forEach((item, index) => {
doctainer.innerHTML += `
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
@@ -291,6 +410,27 @@
</div>
</div>
${item.custom_field && item.custom_field.length > 0 ? `
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56 capitalize">
${item.custom_field.replace(/_/g, " ")}
</label>
<div class="flex flex-wrap items-baseline w-full">
${item.custom_field_type === "text" ? `
<input class="input" type="text" name="custom_field[][${item.custom_field}]">
` : item.custom_field_type === "number" ? `
<input class="input" type="number" name="custom_field[][${item.custom_field}]">
` : item.custom_field_type === "date" ? `
<input class="input" type="date" name="custom_field[][${item.custom_field}]">
` : item.custom_field_type === "textarea" ? `
<textarea class="textarea" rows="3" name="custom_field[][${item.custom_field}]"></textarea>
` : `
<input class="input" type="text" name="custom_field[][${item.custom_field}]">
`}
</div>
</div>
` : ""}
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Keterangan
@@ -299,10 +439,10 @@
<textarea class="textarea" rows="3" type="number" name="keterangan[]"></textarea>
</div>
</div>`;
})
});
})
.catch(error => {
console.error('Error:', error);
console.error("Error:", error);
// Handle the error here
});
}

View File

@@ -23,6 +23,11 @@
</div>
<div class="menu inline-flex" data-menu="true">
<div class="flex flex-nowrap justify-center gap-1.5">
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
<a href="{{ route('debitur.jaminan.bulk.download',['id' => $debitur->id,'jaminan' => $document->id]) }}" class="btn btn-sm btn-icon btn-dark">
<i class="ki-outline ki-cloud-download"></i>
</a>
@endif
<a href="{{ route('debitur.jaminan.edit',['id' => $debitur->id,'jaminan' => $document->id]) }}" class="btn btn-sm btn-icon btn-outline btn-info">
<i class="ki-outline ki-notepad-edit"></i>
</a>
@@ -65,7 +70,12 @@
<span class="text-2xs text-gray-600 uppercase">
{{ $loop->index+1 }}. {{ $detail->jenisLegalitasJaminan->name }}
</span>
<a href="{{ route('debitur.jaminan.download',['id'=>$debitur->id, 'dokumen'=>$detail->id]) }}" class="badge badge-sm badge-outline">{{ basename($detail->dokumen_jaminan) }} <i class="ki-filled ki-cloud-download"></i></a>
<div>
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
<a href="{{ route('debitur.jaminan.download',['id'=>$debitur->id,'dokumen'=>$detail->id]) }}" class="badge badge-sm badge-outline mt-2 badge-info"><i class="ki-filled ki-cloud-download mr-2"></i> Download</a>
@endif
<span class="badge badge-sm badge-outline badge-warning mt-2" onclick="viewPDF('{{ Storage::url($detail->dokumen_jaminan) }}')"><i class="ki-filled ki-eye mr-2"></i>Preview</span>
</div>
</div>
<div class="border-t border-gray-300 border-dashed">
</div>
@@ -126,6 +136,7 @@
</a>
</div>
@include('lpj::component.pdfviewer')
@push('scripts')
<script type="text/javascript">

View File

@@ -10,51 +10,83 @@
<form action="{{ route('basicdata.jenis-legalitas-jaminan.update', $jenisLegalitasJaminan->id) }}" method="POST">
<input type="hidden" name="id" value="{{ $jenisLegalitasJaminan->id }}">
@method('PUT')
@else
<form method="POST" action="{{ route('basicdata.jenis-legalitas-jaminan.store') }}">
@endif
@csrf
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
{{ isset($jenisLegalitasJaminan->id) ? 'Edit' : 'Tambah' }} Jenis Legalitas Jaminan
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('basicdata.jenis-legalitas-jaminan.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body grid gap-5">
@if(isset($jenisLegalitasJaminan->id))
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Code
</label>
<div class="flex flex-wrap items-baseline w-full">
<input readonly class="input border-warning bg-warning-light @error('code') border-danger bg-danger-light @enderror" type="text" name="code" value="{{ $jenisLegalitasJaminan->code ?? '' }}">
@error('code')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
@endif
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Name
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text" name="name" value="{{ $jenisLegalitasJaminan->name ?? '' }}">
@error('name')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
</button>
</div>
</div>
</div>
</form>
@else
<form method="POST" action="{{ route('basicdata.jenis-legalitas-jaminan.store') }}">
@endif
@csrf
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
{{ isset($jenisLegalitasJaminan->id) ? 'Edit' : 'Tambah' }} Jenis Legalitas Jaminan
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('basicdata.jenis-legalitas-jaminan.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body grid gap-5">
@if(isset($jenisLegalitasJaminan->id))
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Code
</label>
<div class="flex flex-wrap items-baseline w-full">
<input readonly class="input border-warning bg-warning-light @error('code') border-danger bg-danger-light @enderror" type="text" name="code" value="{{ $jenisLegalitasJaminan->code ?? '' }}">
@error('code')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
@endif
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Name
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text" name="name" value="{{ $jenisLegalitasJaminan->name ?? '' }}">
@error('name')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<!-- Tambahkan inputan custom_field -->
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Custom Field
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('custom_field') border-danger bg-danger-light @enderror" type="text" name="custom_field" value="{{ $jenisLegalitasJaminan->custom_field ?? '' }}">
@error('custom_field')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<!-- Tambahkan inputan custom_field_type -->
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Custom Field Type
</label>
<div class="flex flex-wrap items-baseline w-full">
<select class="input tomselect @error('custom_field_type') border-danger bg-danger-light @enderror" name="custom_field_type">
<option value="">Pilih Tipe</option>
<option value="text" {{ (isset($jenisLegalitasJaminan) && $jenisLegalitasJaminan->custom_field_type == 'text') ? 'selected' : '' }}>Text</option>
<option value="number" {{ (isset($jenisLegalitasJaminan) && $jenisLegalitasJaminan->custom_field_type == 'number') ? 'selected' : '' }}>Number</option>
<option value="date" {{ (isset($jenisLegalitasJaminan) && $jenisLegalitasJaminan->custom_field_type == 'date') ? 'selected' : '' }}>Date</option>
</select>
@error('custom_field_type')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
</button>
</div>
</div>
</div>
</form>
</div>
@endsection

View File

@@ -80,28 +80,8 @@
</div>
<label class="form-label max-w-56">Nomor Ijin Usaha</label>
<div class="flex flex-wrap items-baseline w-full">
<select id="nomor_ijin_usaha"
class="select w-full @error('nomor_ijin_usaha') border-danger @enderror"
name="nomor_ijin_usaha">
<option value="">Pilih Nomor Ijin Usaha</option>
@if (isset($ijin_usaha))
@if (isset($kjpp))
@foreach ($ijin_usaha as $branches)
<option value="{{ $branches->code }}"
{{ old('nomor_ijin_usaha', $kjpp->nomor_ijin_usaha) == $branches->code ? 'selected' : '' }}>
{{ $branches->code }}
</option>
@endforeach
@else
@foreach ($ijin_usaha as $branches)
<option value="{{ $branches->code }}"
{{ old('nomor_ijin_usaha') == $branches->code ? 'selected' : '' }}>
{{ $branches->code }}
</option>
@endforeach
@endif
@endif
</select>
<input class="input @error('nomor_ijin_usaha') border-danger @enderror" type="text"
name="nomor_ijin_usaha" value="{{ $kjpp->nomor_ijin_usaha ?? old('nomor_ijin_usaha') }}">
@error('nomor_ijin_usaha')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror

View File

@@ -0,0 +1,487 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render('laporan.sederhana.index') }}
@endsection
@section('content')
<style>
.input-group {
position: relative;
width: 100%;
}
.left-group {
padding-right: 2.5rem;
}
.right-group {
padding-left: 2.5rem;
}
.input-group .input-unit {
position: absolute;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
color: #6b7280;
}
.input-group .input-unit.left {
left: 0.75rem;
}
.input-group .input-unit.right {
right: 0.75rem;
}
</style>
<div class="grid">
<div class="card card-grid min-w-full" id="debitur-table">
<div class="card-header py-5 flex-wrap">
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<form action="" method="POST" class="grid gap-5">
<input type="hidden" name="id" value="">
@csrf
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
CADEB AN
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('cadeb') border-danger bg-danger-light @enderror"
type="text" name="cadeb" value="">
@error('cadeb')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Jenis Aset
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('aset') border-danger bg-danger-light @enderror"
type="text" name="aset" value="">
@error('aset')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Fasilitas Kredit
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('kredit') border-danger bg-danger-light @enderror"
type="text" name="kredit" value="">
@error('kredit')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Alamat Objek
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('alamat') border-danger bg-danger-light @enderror"
type="text" name="alamat" value="">
@error('alamat')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Cabang Pemohon
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('cabang') border-danger bg-danger-light @enderror"
type="text" name="cabang" value="">
@error('cabang')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
AO
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('ao') border-danger bg-danger-light @enderror" type="text"
name="ao" value="">
@error('ao')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<hr>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Surveyor
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('surveyor') border-danger bg-danger-light @enderror"
type="text" name="surveyor" value="">
@error('surveyor')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Penilai
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('penilai') border-danger bg-danger-light @enderror"
type="text" name="penilai" value="">
@error('penilai')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Tanggal Survey
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('tanggal_survey') border-danger bg-danger-light @enderror"
type="date" name="tanggal_survey" value="">
@error('tanggal_survey')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Nomor Resume
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('nomor_resume') border-danger bg-danger-light @enderror"
type="number" name="nomor_resume" value="">
@error('nomor_resume')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Tanggal Resume
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('tanggal_resume') border-danger bg-danger-light @enderror"
type="date" name="tanggal_resume" value="">
@error('tanggal_resume')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<hr>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Faktor Positif
</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea class="textarea @error('faktor_positif') border-danger bg-danger-light @enderror" rows="3"
type="number" id="faktor_positif" name="faktor_positif"></textarea>
@error('faktor_positif')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Faktor Negatif
</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea class="textarea @error('faktor_negatif') border-danger bg-danger-light @enderror" rows="3"
type="number" id="faktor_negatif" name="faktor_negatif"></textarea>
@error('faktor_negatif')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<hr>
<label class="form-label">Kesimpulan Nilai Pasar</label>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Sesuai Fisik
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="input-group w-full">
<input
class="input w-full @error('sertifikat') border-danger bg-danger-light @enderror"
type="text" name="sertifikat" placeholder="Sertifikat" value="">
@error('sertifikat')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_tanah') border-danger bg-danger-light @enderror"
type="number" name="luas_tanah" placeholder="Luas tanah" value="">
<span class="input-unit right"></span>
@error('luas_tanah')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_bangunan') border-danger bg-danger-light @enderror"
type="number" name="luas_bangunan" placeholder="Luas bangunan"
value="">
<span class="input-unit right"></span>
@error('luas_bangunan')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<span class="input-unit left">Rp</span>
<input
class="right-group input w-full pl-8 @error('pasar_wajar') border-danger bg-danger-light @enderror"
type="number" name="pasar_wajar" placeholder="Nilai pasar wajar"
value="">
@error('pasar_wajar')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Sesuai IMB
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="input-group w-full">
<input
class="input w-full @error('sertifikat') border-danger bg-danger-light @enderror"
type="text" name="sertifikat" placeholder="Sertifikat" value="">
@error('sertifikat')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_tanah') border-danger bg-danger-light @enderror"
type="number" name="luas_tanah" placeholder="Luas tanah" value="">
<span class="input-unit right"></span>
@error('luas_tanah')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_bangunan') border-danger bg-danger-light @enderror"
type="number" name="luas_bangunan" placeholder="Luas bangunan"
value="">
<span class="input-unit right"></span>
@error('luas_bangunan')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<span class="input-unit left">Rp</span>
<input
class="right-group input w-full pl-8 @error('pasar_wajar') border-danger bg-danger-light @enderror"
type="number" name="pasar_wajar" placeholder="Nilai pasar wajar"
value="">
@error('pasar_wajar')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Asumsi nilai terpotong jalan/GSB
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="input-group w-full">
<input
class="input w-full @error('sertifikat') border-danger bg-danger-light @enderror"
type="text" name="sertifikat" placeholder="Sertifikat" value="">
@error('sertifikat')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_tanah') border-danger bg-danger-light @enderror"
type="number" name="luas_tanah" placeholder="Luas tanah" value="">
<span class="input-unit right"></span>
@error('luas_tanah')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_bangunan') border-danger bg-danger-light @enderror"
type="number" name="luas_bangunan" placeholder="Luas bangunan"
value="">
<span class="input-unit right"></span>
@error('luas_bangunan')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<span class="input-unit left">Rp</span>
<input
class="right-group input w-full pl-8 @error('pasar_wajar') border-danger bg-danger-light @enderror"
type="number" name="pasar_wajar" placeholder="Nilai pasar wajar"
value="">
@error('pasar_wajar')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
</div>
<hr>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Catatan perlu diperhatikan
</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea class="textarea @error('catatan') border-danger bg-danger-light @enderror" rows="3" type="number"
id="catatan" name="catatan"></textarea>
@error('catatan')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<hr>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
DISCLAIMER
</label>
<div class="flex flex-wrap items-baseline w-full">
<ol>
<li>Laporan Resume ini dikeluarkan dikarenakan belum dilakukannya pembayaran biaya
penilaian jaminan</li>
<li>Laporan Resume ini tidak bisa dijadikan sebagai dasar pengajuan dan atau pencairan
kredit, laporan yang digunakan tetap wajib berupa Laporan Penilaian Jaminan (LPJ)
</li>
<li>Detail per meter tanah dan bangunan, sarana pelengkap dll akan tercatat di Laporan
Penilaian Jaminan (LPJ) nanti</li>
<li>Laporan Resume ini hanya digunakan untuk kepentingan internal bagi</li>
<li>Laporan resume ini hanya berlaku <span class="text-red-500">14 hari</span> kerja
terhitung dari tanggal resume ini dibuat sesuai aturan yang berlaku, apabila lewat
maka harus dilakukan order ulang sesuai prosedur yang berlaku</li>
<li>Apabila sudah melewati 6 bulan, maka harus penilaian ulang kembali</li>
</ol>
</div>
</div>
<hr>
<label class="form-label">Salam,</label>
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
PENILAI
</label>
<label class="form-label max-w-56 lg:w-32">
SENIOR OFICER
</label>
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
</button>
</div>
</form>
</div>
</div>
</div>
{{-- <form method="POST" action="">
<div class="card pb-2.5">
<input type="hidden" name="action" value="">
<div class="card-body grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Code
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text"
name="code" value="">
@error('code')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Name
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text"
name="name" value="">
@error('name')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
</button>
</div>
</div>
</div>
</form> --}}
</div>
@endsection

View File

@@ -0,0 +1,486 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render('laporan.standard.index') }}
@endsection
@section('content')
<style>
.input-group {
position: relative;
width: 100%;
}
.left-group {
padding-right: 2.5rem;
}
.right-group {
padding-left: 2.5rem;
}
.input-group .input-unit {
position: absolute;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
color: #6b7280;
}
.input-group .input-unit.left {
left: 0.75rem;
}
.input-group .input-unit.right {
right: 0.75rem;
}
</style>
<div class="grid">
<div class="card card-grid min-w-full" id="debitur-table">
<div class="card-header py-5 flex-wrap">
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<form action="" method="POST" class="grid gap-5">
<input type="hidden" name="id" value="">
@csrf
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
CADEB AN
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('cadeb') border-danger bg-danger-light @enderror"
type="text" name="cadeb" value="">
@error('cadeb')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Jenis Aset
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('aset') border-danger bg-danger-light @enderror"
type="text" name="aset" value="">
@error('aset')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Fasilitas Kredit
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('kredit') border-danger bg-danger-light @enderror"
type="text" name="kredit" value="">
@error('kredit')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Alamat Objek
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('alamat') border-danger bg-danger-light @enderror"
type="text" name="alamat" value="">
@error('alamat')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Cabang Pemohon
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('cabang') border-danger bg-danger-light @enderror"
type="text" name="cabang" value="">
@error('cabang')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
AO
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('ao') border-danger bg-danger-light @enderror" type="text"
name="ao" value="">
@error('ao')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<hr>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Surveyor
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('surveyor') border-danger bg-danger-light @enderror"
type="text" name="surveyor" value="">
@error('surveyor')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Penilai
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('penilai') border-danger bg-danger-light @enderror"
type="text" name="penilai" value="">
@error('penilai')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Tanggal Survey
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('tanggal_survey') border-danger bg-danger-light @enderror"
type="date" name="tanggal_survey" value="">
@error('tanggal_survey')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Nomor Resume
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('nomor_resume') border-danger bg-danger-light @enderror"
type="number" name="nomor_resume" value="">
@error('nomor_resume')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
Tanggal Resume
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('tanggal_resume') border-danger bg-danger-light @enderror"
type="date" name="tanggal_resume" value="">
@error('tanggal_resume')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
<hr>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Faktor Positif
</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea class="textarea @error('faktor_positif') border-danger bg-danger-light @enderror" rows="3"
type="number" id="faktor_positif" name="faktor_positif"></textarea>
@error('faktor_positif')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Faktor Negatif
</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea class="textarea @error('faktor_negatif') border-danger bg-danger-light @enderror" rows="3"
type="number" id="faktor_negatif" name="faktor_negatif"></textarea>
@error('faktor_negatif')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<hr>
<label class="form-label">Kesimpulan Nilai Pasar</label>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Sesuai Fisik
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="input-group w-full">
<input
class="input w-full @error('sertifikat') border-danger bg-danger-light @enderror"
type="text" name="sertifikat" placeholder="Sertifikat" value="">
@error('sertifikat')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_tanah') border-danger bg-danger-light @enderror"
type="number" name="luas_tanah" placeholder="Luas tanah" value="">
<span class="input-unit right"></span>
@error('luas_tanah')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_bangunan') border-danger bg-danger-light @enderror"
type="number" name="luas_bangunan" placeholder="Luas bangunan"
value="">
<span class="input-unit right"></span>
@error('luas_bangunan')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<span class="input-unit left">Rp</span>
<input
class="right-group input w-full pl-8 @error('pasar_wajar') border-danger bg-danger-light @enderror"
type="number" name="pasar_wajar" placeholder="Nilai pasar wajar"
value="">
@error('pasar_wajar')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Sesuai IMB
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="input-group w-full">
<input
class="input w-full @error('sertifikat') border-danger bg-danger-light @enderror"
type="text" name="sertifikat" placeholder="Sertifikat" value="">
@error('sertifikat')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_tanah') border-danger bg-danger-light @enderror"
type="number" name="luas_tanah" placeholder="Luas tanah" value="">
<span class="input-unit right"></span>
@error('luas_tanah')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_bangunan') border-danger bg-danger-light @enderror"
type="number" name="luas_bangunan" placeholder="Luas bangunan"
value="">
<span class="input-unit right"></span>
@error('luas_bangunan')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<span class="input-unit left">Rp</span>
<input
class="right-group input w-full pl-8 @error('pasar_wajar') border-danger bg-danger-light @enderror"
type="number" name="pasar_wajar" placeholder="Nilai pasar wajar"
value="">
@error('pasar_wajar')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Asumsi nilai terpotong jalan/GSB
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="input-group w-full">
<input
class="input w-full @error('sertifikat') border-danger bg-danger-light @enderror"
type="text" name="sertifikat" placeholder="Sertifikat" value="">
@error('sertifikat')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_tanah') border-danger bg-danger-light @enderror"
type="number" name="luas_tanah" placeholder="Luas tanah" value="">
<span class="input-unit right"></span>
@error('luas_tanah')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<input
class="left-group input w-full @error('luas_bangunan') border-danger bg-danger-light @enderror"
type="number" name="luas_bangunan" placeholder="Luas bangunan"
value="">
<span class="input-unit right"></span>
@error('luas_bangunan')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="input-group w-full">
<span class="input-unit left">Rp</span>
<input
class="right-group input w-full pl-8 @error('pasar_wajar') border-danger bg-danger-light @enderror"
type="number" name="pasar_wajar" placeholder="Nilai pasar wajar"
value="">
@error('pasar_wajar')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
</div>
</div>
<hr>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Catatan perlu diperhatikan
</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea class="textarea @error('catatan') border-danger bg-danger-light @enderror" rows="3" type="number"
id="catatan" name="catatan"></textarea>
@error('catatan')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<hr>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
DISCLAIMER
</label>
<div class="flex flex-wrap items-baseline w-full">
<ol>
<li>Laporan Resume ini dikeluarkan dikarenakan belum dilakukannya pembayaran biaya
penilaian jaminan</li>
<li>Laporan Resume ini tidak bisa dijadikan sebagai dasar pengajuan dan atau pencairan
kredit, laporan yang digunakan tetap wajib berupa Laporan Penilaian Jaminan (LPJ)
</li>
<li>Detail per meter tanah dan bangunan, sarana pelengkap dll akan tercatat di Laporan
Penilaian Jaminan (LPJ) nanti</li>
<li>Laporan Resume ini hanya digunakan untuk kepentingan internal bagi</li>
<li>Laporan resume ini hanya berlaku <span class="text-red-500">14 hari</span> kerja
terhitung dari tanggal resume ini dibuat sesuai aturan yang berlaku, apabila lewat
maka harus dilakukan order ulang sesuai prosedur yang berlaku</li>
<li>Apabila sudah melewati 6 bulan, maka harus penilaian ulang kembali</li>
</ol>
</div>
</div>
<hr>
<label class="form-label">Salam,</label>
<div class="flex flex-wrap lg:flex-nowrap gap-4">
<div class="flex items-center w-full lg:w-1/2 gap-2.5">
<label class="form-label max-w-56 lg:w-32">
PENILAI
</label>
<label class="form-label max-w-56 lg:w-32">
SENIOR OFICER
</label>
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
</button>
</div>
</form>
</div>
</div>
</div>
{{-- <form method="POST" action="">
<div class="card pb-2.5">
<input type="hidden" name="action" value="">
<div class="card-body grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Code
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text"
name="code" value="">
@error('code')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Name
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text"
name="name" value="">
@error('name')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Save
</button>
</div>
</div>
</div>
</form> --}}
</div>
@endsection

View File

@@ -0,0 +1,121 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render(request()->route()->getName()) }}
@endsection
@php
// $route = Route::currentRouteName();
// dd($route);
$route = explode('.', Route::currentRouteName());
@endphp
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<input type="hidden" id="id" name="id" value="{{ $id }}">
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
Tambah Data Otorisasi Penawaran
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('otorisasitender.penawaran.show', $id) }}" class="btn btn-xs btn-primary" title="Detail"><i class="ki-filled ki-abstract-26"></i> Detail</a>
<a href="{{ route('otorisasitender.penawaran.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body lg:py-7.5 grid grid-cols-3">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nomor Register Permohonan:
</h3>
<span class="text-2sm text-gray-700">
<label class="card-title" id="textReg">
No. registrasi
</label>
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Kode Penawaran:
</h3>
<span class="text-2sm text-gray-700">
<label class="card-title" id="textCodePenawaran">
Kode Penawaran
</label>
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Status Penawaran:
</h3>
<span class="text-2sm text-gray-700">
<label class="card-title" id="textStatusPenawaran">
Status
</label>
</span>
</div>
</div>
<div class="card-body grid gap-5">
<!-- datatables -->
<div class="grid">
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">Data KJPP</h3>
</div>
<div class="card-table scrollable-x-auto">
<table class="table table-border align-middle text-gray-700 font-medium text-sm">
<thead>
<tr>
<th class="w-14 text-center">No</th>
<th class="min-w-[250px]">KJPP</th>
<th>Biaya Penawaran</th>
<th>Dokumen Penawaran</th>
<th class="min-w-[50px] text-center">Action</th>
</tr>
</thead>
<tbody id="tbodyKJPP1">
</tbody>
</table>
</div>
</div>
</div>
<!-- datatables -->
<div class="flex justify-end">
&nbsp;
</div>
</div>
<div class="card-body grid gap-5">
<!-- datatables -->
<div class="grid">
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">Data KJPP Sebelumnya</h3>
</div>
<div class="card-table scrollable-x-auto">
<table class="table table-border align-middle text-gray-700 font-medium text-sm">
<thead>
<tr>
<th class="w-14 text-center">No</th>
<th class="min-w-[250px]">KJPP</th>
<th>Biaya Penawaran</th>
<th>Dokumen Penawaran</th>
<th>created_at</th>
</tr>
</thead>
<tbody id="tbodyKJPPLog">
</tbody>
</table>
</div>
</div>
</div>
<!-- datatables -->
<div class="flex justify-end">
&nbsp;
</div>
</div>
</div>
</div>
@endsection
@include('lpj::otorisasipenawaran.js.editjs')

View File

@@ -1,26 +1,25 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render('basicdata.currency') }}
{{ Breadcrumbs::render('otorisasitender.penawaran') }}
@endsection
@section('content')
<div class="grid">
<div class="card card-grid min-w-full" data-datatable="false" data-datatable-page-size="5" data-datatable-state-save="false" id="currency-table" data-api-url="{{ route('basicdata.currency.datatables') }}">
<div class="card card-grid min-w-full" data-datatable="false" data-datatable-page-size="5" data-datatable-state-save="false" id="otorisasipenawaran-table" data-api-url="{{ route('otorisasitender.penawaran.datatables') }}">
<div class="card-header py-5 flex-wrap">
<h3 class="card-title">
Daftar Mata Uang
Daftar Otorisasi Penawaran
</h3>
<div class="flex flex-wrap gap-2 lg:gap-5">
<div class="flex">
<label class="input input-sm"> <i class="ki-filled ki-magnifier"> </i>
<input placeholder="Search Currency" id="search" type="text" value="">
<input placeholder="Search Otorisasi penawaran" id="search" type="text" value="">
</label>
</div>
<div class="flex flex-wrap gap-2.5">
<div class="h-[24px] border border-r-gray-200"></div>
<a class="btn btn-sm btn-light" href="{{ route('basicdata.currency.export') }}"> Export to Excel </a>
<a class="btn btn-sm btn-primary" href="{{ route('basicdata.currency.create') }}"> Tambah Mata Uang </a>
<a class="btn btn-sm btn-light" href="#"> Export to Excel </a>
</div>
</div>
</div>
@@ -32,16 +31,28 @@
<th class="w-14">
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox"/>
</th>
<th class="min-w-[250px]" data-datatable-column="code">
<span class="sort"> <span class="sort-label"> Code </span>
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[250px]" data-datatable-column="name">
<span class="sort"> <span class="sort-label"> Mata Uang </span>
<th class="min-w-[150px]" data-datatable-column="code">
<span class="sort"> <span class="sort-label"> Kode Penawaran </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[50px]" data-datatable-column="decimal_places">
<span class="sort"> <span class="sort-label"> Decimal Places </span>
<th class="min-w-[150px]" data-datatable-column="start_date">
<span class="sort"> <span class="sort-label"> Tanggal Penawaran </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="tujuan_penilaian_kjpp_id">
<span class="sort"> <span class="sort-label"> Tujuan Penilaian </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="penawarandetails_count">
<span class="sort"> <span class="sort-label"> Total KJPP </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="status">
<span class="sort"> <span class="sort-label"> Status </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
@@ -67,39 +78,14 @@
@push('scripts')
<script type="text/javascript">
function deleteData(data) {
Swal.fire({
title: 'Are you sure?',
text: "You won't be able to revert this!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, delete it!'
}).then((result) => {
if (result.isConfirmed) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
}
});
$.ajax(`basic-data/mata-uang/${data}`, {
type: 'DELETE'
}).then((response) => {
swal.fire('Deleted!', 'User has been deleted.', 'success').then(() => {
window.location.reload();
});
}).catch((error) => {
console.error('Error:', error);
Swal.fire('Error!', 'An error occurred while deleting the file.', 'error');
});
}
})
function showOtorisasiPenawaranData(regId)
{
var url = "{{ url('otorisasitender/penawaran') }}/"+regId;
$(location).attr('href',url);
}
</script>
<script type="module">
const element = document.querySelector('#currency-table');
const element = document.querySelector('#otorisasipenawaran-table');
const searchInput = document.getElementById('search');
const apiUrl = element.getAttribute('data-api-url');
@@ -117,24 +103,36 @@
return checkbox.outerHTML.trim();
},
},
'nomor_registrasi': {
title: 'Nomor Registrasi',
},
code: {
title: 'Code',
title: 'Kode Penawaran',
},
name: {
title: 'Mata Uang',
date_range: {
title: 'Tanggal Penawaran',
},
decimal_places: {
title: 'Decimal Places',
tujuan_penilaian_kjpp_name: {
title: 'Tujuan Penilaian',
},
penawarandetails_count: {
title: 'Total KJPP',
createdCell(cell) {
cell.classList.add('text-center');
},
},
status: {
title: 'Status'
},
actions: {
title: 'Status',
render: (item, data) => {
return `<div class="flex flex-nowrap justify-center">
<a class="btn btn-sm btn-icon btn-clear btn-info" href="basic-data/mata-uang/${data.id}/edit">
<i class="ki-outline ki-notepad-edit"></i>
<a onclick="showOtorisasiPenawaranData(${data.id})" class="btn btn-sm btn-icon btn-clear btn-primary" title="Detail">
<i class="ki-outline ki-eye"></i>
</a>
<a onclick="deleteData(${data.id})" class="delete btn btn-sm btn-icon btn-clear btn-danger">
<i class="ki-outline ki-trash"></i>
<a class="btn btn-sm btn-icon btn-clear btn-info" title="Proses Penawaran" href="otorisasitender/penawaran/${data.id}/edit">
<i class="ki-outline ki-notepad-edit"></i>
</a>
</div>`;
},
@@ -151,4 +149,3 @@
});
</script>
@endpush

View File

@@ -0,0 +1,94 @@
<script tipe="module">
function switchProses(id)
{
removeErrorCssMsg();
let c = $('#{{$route[1]}}_check_'+id).val();
if($('input[name="{{$route[1]}}_check_'+id+'"]').is(':checked'))
{
// checked
// alert('aktif nih');
setActiveElement(id);
}else
{
// unchecked
//alert('tdk aktif nih');
setNonActiveElement(id);
}
}
function setActiveElement(id)
{
$('#{{$route[1]}}_biayaPenawaran_'+id).removeAttr('disabled');
$('#{{$route[1]}}_dokumenPersetujuan_'+id).removeAttr('disabled');
$('#{{$route[1]}}_icon_update_'+id).removeAttr('disabled');
$('#{{$route[1]}}_icon_delete_'+id).removeAttr('disabled');
}
function setNonActiveElement(id)
{
$('#{{$route[1]}}_biayaPenawaran_'+id).attr('disabled', 'disabled');
$('#{{$route[1]}}_dokumenPersetujuan_'+id).attr('disabled', 'disabled');
$('#{{$route[1]}}_icon_update_'+id).attr('disabled', 'disabled');
$('#{{$route[1]}}_icon_delete_'+id).attr('disabled', 'disabled');
}
function otorisasiKJPP(penawaran_id, id, kjpp_id, kjppName, biaya_penawaran) {
Swal.fire({
title: ' ',
text: "Yakin akan Otorisasi "+kjppName+"?",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes'
}).then((result) => {
if (result.isConfirmed) {
//define variable
let token = "{{ csrf_token() }}";
let useURL = "{{ route($route[0].'.'.$route[1].'.otorisasiPenawaranKJPP','') }}/"+id;
let noReg = $("#textReg").text();
var input_data = new Object();
input_data._token = token;
input_data.id =id;
input_data.penawaran_id =penawaran_id;
input_data.kjpp_id =kjpp_id;
input_data.kjppName =kjppName;
input_data.biaya_penawaran =biaya_penawaran;
input_data.noReg =noReg;
$.ajax({
url: useURL,
type: "PUT",
cache: false,
data: input_data,
dataType: "json",
success: function(response) {
console.log(response);
if('success' == response.status)
{
swal.fire('Sukses Otorisasi!', response.message.message_success[0], 'success').then(() => {
var url = "{{ route('otorisasitender.penawaran.index') }}";
$(location).attr('href',url);
});
}
else
{
Swal.fire('Error!', response.message.message_error_try_catch[0], 'error');
}
},
error: function(response, textStatus, errorThrown) {
// var errors = response.responseJSON.errors;
// console.log(errors);
console.log(response);
}
});
}
})
}
</script>

View File

@@ -0,0 +1,188 @@
@push('scripts')
@include('lpj::assetsku.includenya')
@include('lpj::otorisasipenawaran.js.editextjs')
<script type="module">
$(document).ready(function() {
prepareForm();
});
function prepareForm()
{
setData();
}
function setData()
{
let id = $("#id").val();
let token = "{{ csrf_token() }}";
// alert('token = ' + token);
var useURL = "{{ route('otorisasitender.penawaran.setData') }}";
var input_data = new Object();
input_data._token = token;
input_data.id = id;
$.ajax({
url: useURL,
type: "POST",
data: input_data,
dataType: "json",
beforeSend: function() {
// if ($("#myLoader").hasClass("pre-loader hidden")) {
// pleaseStartLoader();
// }
},
success: function(response) {
console.log(response);
if("success"==response.status)
{
var statusText = response.penawaran.status;
$("#textReg").text(response.penawaran.nomor_registrasi);
$("#textCodePenawaran").text(response.penawaran.code);
$("#textStatusPenawaran").text(statusText);
setTablesKJPP1(response.penawrandetails);
setTablesKJPPLog(response.penawarandetailLogs);
}
else
{
toastrError(response.message);
}
},
error: function(xhr) {
},
complete: function() {
}
});
}
function setTablesKJPP1(datas)
{
let i=1;
$.each(datas, function(key, value){
var kjppName = value.kjpp_code+' - '+value.kjpp_name;
var biaya_penawaran = value.biaya_penawaran;// alert(biaya_penawaran);
var htmlDokumenPersetujuanDownload='';
var dokumenPersetujuanDownload = value.dokumen_persetujuan;
if(dokumenPersetujuanDownload)
{
htmlDokumenPersetujuanDownload='<div class="flex items-center justify-between flex-wrap my-2.5 gap-2"><a href="'+value.dokumen_persetujuan+'" class="badge badge-sm badge-outline" download="'+value.attachment+'">'+value.attachment+' &nbsp;&nbsp;<i class="ki-filled ki-cloud-download"></i></a></div>';
}
// pengecekan kondisi format number
var biaya_penawaran_format = "";
if(biaya_penawaran)
biaya_penawaran_format=tandaPemisahTitik(biaya_penawaran);
var markup = '<tr>';
markup +='<td valign="top">'+i+'</td>';
markup +='<td valign="top"><label id="{{$route[1]}}_kjppName_'+value.id+'">'+kjppName+'</label></td>';
markup +='<td valign="top" align="right">Rp.'+biaya_penawaran_format+'</td>';
markup +='<td><em id="{{$route[1]}}_dokumenPersetujuan_msg_'+value.id+'" class="alert text-danger text-sm"></em>'+htmlDokumenPersetujuanDownload+'</td>';
markup +='<td><div class="flex flex-nowrap justify-center">';
markup +='<a class="btn btn-sm btn-icon btn-clear btn-success" href="javascript:void(0)" id="{{$route[1]}}_icon_update_'+value.id+'" title="Otorisasi Penawaran '+kjppName+'" onclick="otorisasiKJPP('+value.penawaran_id+','+value.id+','+value.kjpp_rekanan_id+',\''+kjppName+'\',\''+biaya_penawaran+'\')"><i class="ki-outline ki-notepad-edit"></i></a>';
markup += '</tr>';
$('#tbodyKJPP1').append(markup);
i++;
});
}
$(document).on("input", "input:file", function(e) {
let fileName = e.target.files[0].name;
let inputFile = e.target.id;
const myArray = inputFile.split("_");
let penawaranID = myArray[myArray.length-1];
let kjppName = $("#{{$route[1]}}_kjppName_"+penawaranID).text();
let upld = fileName.split(".").pop();
if(upld == "pdf" || upld =="PDF"){}
else{
removeErrorCssMsg();
$("#{{$route[1]}}_dokumenPersetujuan_"+penawaranID).addClass(" border-danger");
$("#{{$route[1]}}_dokumenPersetujuan_msg_"+penawaranID).text("Silahkan Masukan tipe file PDF Mas");
$("#"+inputFile).val("");
}
});
function setTablesKJPPLog(datas)
{
let i=1;
$.each(datas, function(key, value){
var kjppName = value.kjpp_code+' - '+value.kjpp_name;
var biaya_penawaran = value.biaya_penawaran;// alert(biaya_penawaran);
var htmlDokumenPersetujuanDownload='';
var dokumenPersetujuanDownload = value.dokumen_persetujuan;
if(dokumenPersetujuanDownload)
{
htmlDokumenPersetujuanDownload='<div class="flex items-center justify-between flex-wrap my-2.5 gap-2"><a href="'+value.dokumen_persetujuan+'" class="badge badge-sm badge-outline" download="'+value.attachment+'">'+value.attachment+' &nbsp;&nbsp;<i class="ki-filled ki-cloud-download"></i></a></div>';
}
// pengecekan kondisi format number
var biaya_penawaran_format = "";
if(biaya_penawaran)
biaya_penawaran_format=tandaPemisahTitik(biaya_penawaran);
var markup = '<tr>';
markup +='<td valign="top">'+i+'</td>';
markup +='<td valign="top"><label id="{{$route[1]}}_kjppName_'+value.id+'">'+kjppName+'</label></td>';
markup +='<td valign="top" align="right">Rp.'+biaya_penawaran_format+'</td>';
markup +='<td><em id="{{$route[1]}}_dokumenPersetujuan_msg_'+value.id+'" class="alert text-danger text-sm"></em>'+htmlDokumenPersetujuanDownload+'</td>';
markup +='<td valign="top"><label id="{{$route[1]}}_kjppName_'+value.id+'">'+value.created_at2+'</label></td>';
$('#tbodyKJPPLog').append(markup);
i++;
});
}
/*
// update proses penawaran ulang & permohonan status
$("#{{$route[1]}}_toEdit").click(function(e) {
e.preventDefault();
//define variable
let token = "{{ csrf_token() }}";
let useURL = "";
var input_data = new Object();
input_data._token = token;
input_data.id = "{{ $id }}";
$.ajax({
url: useURL,
type: "PUT",
cache: false,
data: input_data,
dataType: "json",
success: function(response) {
console.log(response);
if('success' == response.status)
{
// toastr.success(response.message);
toastrSuccess(response.message);
setTimeout(function () {
var url = "{{ route('tender.prosespenawaran.index') }}";
$(location).attr('href',url);
// window.location.href = "https://www.newurl.com";
}, 2000);
}
else
{
// toastr.error(response.message);
toastrError(response.message);
}
},
error: function(response, textStatus, errorThrown) {
// var errors = response.responseJSON.errors;
// console.log(errors);
console.log(response);
}
});
});
*/
</script>
@endpush

View File

@@ -0,0 +1,43 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render(request()->route()->getName()) }}
@endsection
@php
$route = explode('.', Route::currentRouteName());
@endphp
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
Detail Data Otorisasi Penawaran
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('otorisasitender.penawaran.edit', $id) }}" class="btn btn-xs btn-primary" title="Register"><i class="ki-filled ki-arrow-circle-right"></i> Otorisasi Penawaran</a>
<a href="{{ route('otorisasitender.penawaran.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body lg:py-7.5 grid grid-cols-3">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nomor Register Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $prosespenawaran->nomor_registrasi }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Kode Penawaran:
</h3>
<span class="text-2sm text-gray-700">
{{ $prosespenawaran->code }}
</span>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -79,7 +79,7 @@
@enderror
</div>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('nomor_id') border-danger bg-danger-light @enderror" type="number" name="nomor_id" value="{{ $debitur->nomor_id ?? '' }}" placeholder="Nomor ID/KTP">
<input class="input @error('nomor_id') border-danger bg-danger-light @enderror" type="number" name="nomor_id" value="{{ $pemilik->nomor_id ?? '' }}" placeholder="Nomor ID/KTP">
@error('nomor_id')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
@@ -88,7 +88,28 @@
</div>
</div>
<div id="nama_sertifikat">
@if(isset($detailSertifikat))
@foreach(json_decode($detailSertifikat) as $sertifikat)
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mb-5">
<label class="form-label max-w-56">
Nama Lengkap
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="flex flex-wrap items-baseline w-full">
<input class="input" type="text" id="name" name="detail_sertifikat[name][]" value="{{ $sertifikat->name }}" placeholder="Nama Pemilik Jaminan">
</div>
<div class="flex flex-wrap items-baseline w-full">
<input class="input" type="number" name="detail_sertifikat[nomor_id][]" value="{{ $sertifikat->nomor_id }}" placeholder="Nomor ID/KTP">
</div>
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
</div>
</div>
</div>
@endforeach
@endif
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
@@ -253,41 +274,46 @@
</div>
@endsection
@push('scripts')
<script>
document.getElementById('tambah_sertifikat').addEventListener('click', function() {
const namaSertifikatDiv = document.getElementById('nama_sertifikat');
const newDiv = document.createElement('div');
newDiv.innerHTML = `
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mb-5">
<label class="form-label max-w-56">
Nama Lengkap
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text" id="name" name="name[]" value="" placeholder="Nama Pemilik Jaminan">
@error('name')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('nomor_id') border-danger bg-danger-light @enderror" type="number" name="nomor_id[]" value="" placeholder="Nomor ID/KTP">
@error('nomor_id')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
</div>
</div>
</div>
`;
namaSertifikatDiv.appendChild(newDiv);
document.addEventListener("DOMContentLoaded", function() {
const namaSertifikatDiv = document.getElementById("nama_sertifikat");
// Event listener untuk tombol hapus
newDiv.querySelector('.delete-button').addEventListener('click', function() {
namaSertifikatDiv.removeChild(newDiv);
// Function to add delete event listeners to existing buttons
function addDeleteListeners() {
document.querySelectorAll(".delete-button").forEach(button => {
button.addEventListener("click", function() {
this.closest(".flex.items-baseline.flex-wrap.lg\\:flex-nowrap.gap-2\\.5.mb-5").remove();
});
});
}
// Add delete listeners to existing buttons
addDeleteListeners();
document.getElementById("tambah_sertifikat").addEventListener("click", function() {
const newDiv = document.createElement("div");
newDiv.className = "flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mb-5";
newDiv.innerHTML = `
<label class="form-label max-w-56">
Nama Lengkap
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col lg:flex-row gap-2 w-full">
<div class="flex flex-wrap items-baseline w-full">
<input class="input" type="text" name="detail_sertifikat[name][]" value="" placeholder="Nama Pemilik Jaminan">
</div>
<div class="flex flex-wrap items-baseline w-full">
<input class="input" type="number" name="detail_sertifikat[nomor_id][]" value="" placeholder="Nomor ID/KTP">
</div>
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
</div>
</div>
`;
namaSertifikatDiv.appendChild(newDiv);
// Add delete listener to the new button
addDeleteListeners();
});
});
</script>

View File

@@ -189,7 +189,12 @@
@enderror
</div>
</div>
<div class="flex justify-end">
<div class="flex justify-end gap-1.5">
@if (isset($penawaran->nomor_registrasi))
<a href="{{ route('tender.penawaran.showSuratTender', $noreg) }}" class="btn btn-primary">
Surat Tender
</a>
@endif
<button type="submit" class="btn btn-primary">
Save
</button>

View File

@@ -195,7 +195,12 @@
</div>
</div>
<div class="flex justify-end">
<div class="flex justify-end gap-1.5">
@if (isset($penawaran->nomor_registrasi))
<a href="{{ route('tender.penawaran.showSuratTender', $noreg) }}" class="btn btn-primary">
Surat Tender
</a>
@endif
<button type="submit" class="btn btn-primary">
Penawaran Ulang
</button>

View File

@@ -0,0 +1,56 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render(request()->route()->getName(), request()->route('noreg')) }}
@endsection
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
Surat Tender
</h3>
<div class="flex items-center gap-2">
@if (isset($penawaran->nomor_registrasi))
<a href="{{ route('tender.penawaran.editPenawaran', $noreg) }}" class="btn btn-xs btn-info"><i
class="ki-filled ki-exit-left"></i> Back</a>
@else
<a href="{{ route('tender.penawaran.createPenawaran', $noreg) }}" class="btn btn-xs btn-info"><i
class="ki-filled ki-exit-left"></i> Back</a>
@endif
</div>
</div>
<div class="card-body grid gap-5">
<p>Dear
<span class="font-bold">{{ ucwords(auth()->user()->name) ?? 'Tidak Ada' }}</span>
</p>
<p>Mohon untuk dibuatkan proposal jasa appraisal atas nama <span
class="font-bold">{{ ucwords($penawaran->permohonan->user->name) }}</span>, tujuan penilaian
untuk <span class="font-bold">
@foreach ($penawaran->tujuanPenilaianKJPP as $tujuanPenilaianKJPP)
{{ $tujuanPenilaianKJPP->name }}
@endforeach
</span>, laporan dalam bentuk <span class="font-bold">{{ $penawaran->jenisLaporan->name }}</span>,
dengan data-data sebagai berikut :</p>
<ul>
<li>Aset Jaminan: <span class="font-bold">[otomasi dari tabel permohonan]</span></li>
<li>Lokasi Jaminan: <span class="font-bold">[otomasi dari tabel permohonan]</span></li>
<li>LT / LB: <span class="font-bold">[otomasi dari tabel permohonan]</span></li>
</ul>
<p>Harap proposal dibuat dengan harga yang minimal sehingga tidak perlu tawar menawar lagi.</p>
<p>Mohon proposal dapat saya terima segera, sebelum
<span class="font-bold">{{ formatTanggalIndonesia($penawaran->end_date) }} pukul 17.00 WIB</span>
</p>
<p>Best Regards,
<span class="font-bold">[otomasi dari nama dan tanda tangan user penginput]</span>
Sub Direktorat Appraisal
</p>
<p>PT. Bank Artha Graha Internasional, Tbk.<br>
Gedung Bank Artha Graha, Lantai 3<br>
Jl. Kwiitang Raya No 24-26, Jakarta Pusat - 10420.<br>
Telp. 021 - 3903040 (H)</p>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,200 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render('penilai') }}
@endsection
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card pb-2.5">
<div class=" card-grid min-w-full" data-datatable="false" data-datatable-page-size="5"
data-datatable-state-save="false" id="penilai-table" data-api-url="{{ route('penilai.dataForTables') }}">
<div class="card-header py-5 flex-wrap">
<h3 class="card-title">
Penilai
</h3>
<div class="flex flex-wrap gap-2 lg:gap-5">
<div class="flex">
<label class="input input-sm"> <i class="ki-filled ki-magnifier"> </i>
<input placeholder="Search Penilai" id="search" type="text" value="">
</label>
</div>
<div class="flex flex-wrap gap-2.5">
<div class="h-[24px] border border-r-gray-200"></div>
<a class="btn btn-sm btn-light" href="#"> Export to Excel </a>
</div>
</div>
</div>
<div class="card-body">
<div class="scrollable-x-auto">
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"
data-datatable-table="true">
<thead>
<tr>
<th class="w-14">
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox" />
</th>
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="debitur_id">
<span class="sort"> <span class="sort-label"> Debitur </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="branch_id">
<span class="sort"> <span class="sort-label"> Pemohon(Cabang/Direktorat) </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="user_id">
<span class="sort"> <span class="sort-label"> AO </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="tujuan_penilaian_id">
<span class="sort"> <span class="sort-label"> Tujuan Penilaian </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="jenis_fasilitas_kredit_id">
<span class="sort"> <span class="sort-label"> Fasilitas Kredit </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="tanggal_survei">
<span class="sort"> <span class="sort-label"> Tanggal Survei </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[150px]" data-datatable-column="due_date_sla">
<span class="sort"> <span class="sort-label"> Due Date SLA </span>
<span class="sort-icon"> </span> </span>
</th>
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
</tr>
</thead>
</table>
</div>
<div
class="card-footer justify-center md:justify-between flex-col md:flex-row gap-3 text-gray-600 text-2sm font-medium">
<div class="flex items-center gap-2">
Show
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per
page
</div>
<div class="flex items-center gap-4">
<span data-datatable-info="true"> </span>
<div class="pagination" data-datatable-pagination="true">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script type="text/javascript">
function formatDate(date) {
const day = date.getDate().toString().padStart(2, '0');
const month = (date.getMonth() + 1).toString().padStart(2, '0');
// Months are 0-indexed
const year = date.getFullYear();
return `${day} ${getIndonesianMonth(month)} ${year}`;
}
function getIndonesianMonth(month) {
const months = ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni',
'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'
];
return months[month -
1];
}
</script>
<script type="module">
const element = document.querySelector('#penilai-table');
const searchInput = document.getElementById('search');
const apiUrl = element.getAttribute('data-api-url');
const dataTableOptions = {
apiEndpoint: apiUrl,
pageSize: 5,
columns: {
select: {
render: (item, data, context) => {
const checkbox = document.createElement('input');
checkbox.className = 'checkbox checkbox-sm';
checkbox.type = 'checkbox';
checkbox.value = data.id.toString();
checkbox.setAttribute('data-datatable-row-check', 'true');
return checkbox.outerHTML.trim();
},
},
nomor_registrasi: {
title: 'Nomor Registrasi',
},
debitur_id: {
title: 'Debitur',
render: (item, data) => {
return `${data.debiture.name}`;
},
},
branch_id: {
title: 'Cabang Pemohon',
render: (item, data) => {
return `${data.branch.name}`;
},
},
user_id: {
title: 'User Pemohon',
render: (item, data) => {
return `${data.user.name}`;
},
},
tujuan_penilaian_id: {
title: 'Tujuan Penilaian',
render: (item, data) => {
return `${data.tujuan_penilaian.name}`;
},
},
jenis_fasilitas_kredit_id: {
title: 'Fasilitas Kredit',
render: (item, data) => {
return `${data.jenisfasilitas_kredit.name}`;
},
},
tanggal_survei: {
title: 'Tanggal Survei',
render: (item, data) => {
return `${formatDate(new Date(data.created_at))}`;
},
},
due_date_sla: {
title: 'Due Date SLA',
render: (item, data) => {
return `${formatDate(new Date(data.created_at))}`;
},
},
actions: {
title: 'Action',
render: (item, data) => {
return `
<div class="flex flex-nowrap justify-center gap-1.5">
<a class="btn btn-sm btn-outline btn-info" href="penilai/${data.id}/show">
<i class="ki-outline ki-eye"></i>
</a>
</div>`;
},
}
},
};
let dataTable = new KTDataTable(element, dataTableOptions);
// Custom search functionality
searchInput.addEventListener('input', function() {
const searchValue = this.value.trim();
dataTable.search(searchValue, true);
});
</script>
@endpush

View File

@@ -0,0 +1,160 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render(request()->route()->getName()) }}
@endsection
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
Detail Penilai
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('penilai.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i>
Back</a>
</div>
</div>
<div class="card-body grid gap-5">
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nomor Registrasi
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->nomor_registrasi }}</p>
</div>
<label class="form-label max-w-56">
Nama Debitur
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->debiture->name }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Cabang
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->branch->name }}</p>
</div>
<label class="form-label max-w-56">
Alamat Jaminan
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->debiture->address }}, Kel.
{{ $permohonan->debiture->village->name }}, Kec. {{ $permohonan->debiture->district->name }},
{{ ucwords(strtolower($permohonan->debiture->city->name)) }}, Kode Pos.
{{ $permohonan->debiture->postal_code }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama AO/Pemohon
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $permohonan->user->name }}</p>
</div>
<label class="form-label max-w-56">
Fasilitas Kredit
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $permohonan->jenisFasilitasKredit->name }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Tanggal Permohonan
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ formatTanggalIndonesia($permohonan->created_at) }}</p>
</div>
<label class="form-label max-w-56">
CIF
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $permohonan->debiture->cif }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Tanggal Konfirmasi Kunjungan
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Surveyor
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $permohonan->penilaian->userSurveyor->name }}</p>
<p class="flex w-full text-gray-600 font-medium text-sm">
Region 1</p>
</div>
<label class="form-label max-w-56">
Penilai
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
@foreach ($permohonan->penilaian->teams->teamsUsers as $index => $penilaian)
{{ $penilaian->user->name }}{{ $index + 1 < count($permohonan->penilaian->teams->teamsUsers) ? ', ' : '' }}
@endforeach
</p>
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $permohonan->penilaian->teams->regions->name }}
</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Tujuan Penilaian
</label>
<p class="flex text-gray-600 font-medium text-sm w-full">
{{ $permohonan->tujuanPenilaian->name }}</p>
<label class="form-label max-w-56">
Jenis Jaminan
</label>
<p class="flex text-gray-600 font-medium text-sm w-full">
@foreach ($permohonan->debiture->documents as $document)
{{ $document->jenisjaminan->name }}
@endforeach
</p>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Tanggal Survei
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ formatTanggalIndonesia($permohonan->created_at) }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Tanggal Laporan
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ formatTanggalIndonesia($permohonan->created_at) }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
No. Laporan
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
PJ/001/001</p>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -160,104 +160,7 @@
</div>
</div>
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Laporan
</h3>
</div>
<div data-accordion="true">
@foreach ($permohonan->debiture->documents as $dokumen)
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200" data-accordion-item="true"
id="accordion_1_item_1">
<button class="accordion-toggle py-4 group mx-8" data-accordion-toggle="#accordion_1_content_1">
<span class="text-base text-gray-900 font-medium">
Jaminan {{ $loop->index + 1 }}
</span>
<i class="ki-outline ki-plus text-gray-600 text-2sm accordion-active:hidden block">
</i>
<i class="ki-outline ki-minus text-gray-600 text-2sm accordion-active:block hidden">
</i>
</button>
<div class="accordion-content hidden" id="accordion_1_content_1">
<div class="card-body lg:py-7.5 grid grid-cols-2">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Pemilik Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->name ?? '' }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Jenis Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->jenisJaminan->name ?? '' }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Hubungan Pemilik Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->hubungan_pemilik->name ?? '' }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Alamat Pemilik Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->address ?? '' }},
<br> {{ $dokumen->pemilik->village->name ?? '' }},
{{ $dokumen->pemilik->district->name ?? '' }},
{{ $dokumen->pemilik->city->name ?? '' }},
{{ $dokumen->pemilik->province->name ?? '' }} -
{{ $dokumen->pemilik->village->postal_code ?? '' }}
</span>
</div>
</div>
<div class="card-table scrollable-x-auto pb-3">
<table class="table align-middle text-sm text-gray-500">
@foreach ($dokumen->detail as $detail)
<tr>
<td class="py-2 text-gray-600 font-normal max-w-[100px]">
{{ $loop->index + 1 }}. {{ $detail->jenisLegalitasJaminan->name }}
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $detail->name ?? '' }}
</td>
</tr>
<tr>
<td class="py-3 max-w-[100px]">
Dokumen Jaminan
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
@if (isset($detail->dokumen_jaminan))
<a href="{{ route('debitur.jaminan.download', ['id' => $permohonan->debiture->id, 'dokumen' => $detail->id]) }}"
class="badge badge-sm badge-outline mt-2">{{ basename($detail->dokumen_jaminan) }}
<i class="ki-filled ki-cloud-download"></i></a>
@endif
</td>
</tr>
<tr>
<td class="py-3 max-w-[100px]">
Keterangan
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $detail->keterangan ?? '' }}
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
@endforeach
</div>
</div>
@include('lpj::component.detail-jaminan')
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">

Some files were not shown because too many files have changed in this diff Show More