Merge branch 'staging' into feature/senior-officer

This commit is contained in:
majid
2024-11-14 08:43:20 +07:00
11 changed files with 366 additions and 843 deletions

View File

@@ -383,7 +383,8 @@
public function bulkDownload()
{
$dokumenIds = request()->get('jaminan'); // Expecting an array of dokumen_jaminan_id
$documents = DetailDokumenJaminan::where('dokumen_jaminan_id', $dokumenIds)->get();
$documents = DokumenJaminan::where('id', $dokumenIds)->with(['jenisJaminan', 'detail','debiture'])->get();
if ($documents->isEmpty()) {
return redirect()->back()->with('error', 'No documents found for the provided IDs.');
}
@@ -394,18 +395,24 @@
if ($zip->open($zipFilePath, ZipArchive::CREATE) === true) {
foreach ($documents as $document) {
if($document->dokumen_jaminan) {
$files = is_array(json_decode($document->dokumen_jaminan)) ? json_decode(
$document->dokumen_jaminan,
) : [$document->dokumen_jaminan];
$jenisJaminan = $document->debiture->permohonan->nomor_registrasi ?? 'Uncategorized';
$folderName = $this->sanitizeFolderName($jenisJaminan);
foreach ($files as $file) {
$filePath = storage_path('app/public/' . $file);
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);
foreach ($document->detail as $detail) {
if($detail->dokumen_jaminan) {
$folderJaminanName = $this->sanitizeFolderName($detail->jenisLegalitasJaminan->name?? 'Uncategorized');
$files = is_array(json_decode($detail->dokumen_jaminan))
? json_decode($detail->dokumen_jaminan)
: [$detail->dokumen_jaminan];
foreach ($files as $file) {
$filePath = storage_path('app/public/' . $file);
if (file_exists($filePath)) {
$zip->addFile($filePath, $folderName . '/' .$folderJaminanName.'/'.basename($filePath));
} else {
// Log or display an error message for missing files
\Log::warning('File not found: ' . $filePath);
}
}
}
}
@@ -423,7 +430,13 @@
'Content-Type' => 'application/zip',
'Content-Disposition' => 'attachment; filename="' . $zipFileName . '"',
'Content-Length' => filesize($zipFilePath),
])->deleteFileAfterSend(false);
])->deleteFileAfterSend(true);
}
private function sanitizeFolderName($name)
{
// Remove any characters that are not allowed in folder names
return preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name);
}

View File

@@ -4,28 +4,14 @@
use App\Http\Controllers\Controller;
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\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
use Maatwebsite\Excel\Facades\Excel;
use Modules\Lpj\Models\JenisPenilaian;
use Modules\Lpj\Models\Permohonan;
use Modules\Lpj\Models\Regions;
class RegistrasiController extends Controller
{
@@ -43,7 +29,7 @@
}
// Retrieve data from the database
$query = Permohonan::query()->where('status','=','preregister');
$query = Permohonan::query()->where('status', '=', 'preregister');
// Apply search filter if provided
if ($request->has('search') && !empty($request->get('search'))) {
@@ -101,143 +87,132 @@
'data' => $data,
]);
}
public function edit($id)
{
return view('lpj::registrasi.edit', compact('id'));
}
public function setData(Request $request): JsonResponse
{
$data = array();
$datas = array();
public function setData(Request $request)
: JsonResponse {
$data = [];
$datas = [];
if (request()->ajax()) {
$id = $request->id;
$id = $request->id;
$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'] ['message_success'] = array("data successfully found");
$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'] ['message_success'] = ["data successfully found"];
} else {
$data['status'] = 'error';
$data['datas'] = null;
$data['message'] ['message_data'] = array("data not found");
$data['status'] = 'error';
$data['datas'] = null;
$data['message'] ['message_data'] = ["data not found"];
}
} else {
$data['status'] = 'error';
$data['message'] ['message_ajax'] = array("no ajax request");
$data['status'] = 'error';
$data['message'] ['message_ajax'] = ["no ajax request"];
}
return response()->json($data);
}
public function update(Request $request, $id): JsonResponse
{
public function update(Request $request, $id)
: JsonResponse {
// init
$data = array();
$dataku = array();
$data = [];
$dataku = [];
$tindakan = null;
if (request()->ajax()) {
$validator = RegistrasiController::rulesEditnya($request, $id);
if ($validator['fails']) {
$data['message'] = $validator['errors'];
$data['status'] = 'error';
}
else
{
$data['status'] = 'error';
} else {
try {
$tindakan = $request->tindakan;
$dataku = [
'registrasi_by' => Auth::id(),
'registrasi_at' => now(),
];
$tindakan=$request->tindakan;
$dataku = ['registrasi_by' => Auth::id(),
'registrasi_at' => now()
];
if($tindakan==0)
{
$dataku['jenis_penilaian_id'] =$request->jenis_penilaian;
$dataku['region_id'] =$request->region;
$dataku['status'] = 'registered';
if($request->catatan2)
$dataku['registrasi_catatan'] =$request->catatan2;
}
else
{
$dataku['registrasi_catatan'] =$request->catatan;
$dataku['status'] = 'revisi';
if ($tindakan == 0) {
$dataku['jenis_penilaian_id'] = $request->jenis_penilaian;
$dataku['region_id'] = $request->region;
$dataku['status'] = 'registered';
if ($request->catatan2) {
$dataku['registrasi_catatan'] = $request->catatan2;
}
} else {
$dataku['registrasi_catatan'] = $request->catatan;
$dataku['status'] = 'revisi';
}
$data['dataku'] =$dataku;
$data['dataku'] = $dataku;
$modal = Permohonan::find($id);
$modal->update($dataku);
//
$data['status'] = 'success';
$data['message'] ['message_success'] = array('Regitrasi '.$modal->nomor_registrasi.' successfully');
//
$data['status'] = 'success';
$data['message'] ['message_success'] = ['Regitrasi ' . $modal->nomor_registrasi . ' successfully'];
} catch (Exception $e) {
$data['status'] = 'error';
$data['message'] ['message_try_catch'] = array('Regitrasi updated failed.');
$data['status'] = 'error';
$data['message'] ['message_try_catch'] = ['Regitrasi updated failed.'];
}
}
} else {
$data['status'] = 'error';
$data['message'] ['message_ajax'] = array("no ajax request");
$data['status'] = 'error';
$data['message'] ['message_ajax'] = ["no ajax request"];
}
return response()->json($data);
}
public function rulesEditnya($request, $id)
{
$tindakan=null;
$jenis_penilaian=null;
$validate_catatan='';
$tindakan=$request->tindakan;
$jenis_penilaian=$request->jenis_penilaian;
$tindakan = null;
$jenis_penilaian = null;
$validate_catatan = '';
$tindakan = $request->tindakan;
$jenis_penilaian = $request->jenis_penilaian;
$validateIt = [
// 'name' diambil dari definisi parameter yang di kirim pada POST Data
'tindakan' => 'required',
];
$messageIt = [
'tindakan.required' => 'Silahkan pilih Tindakan'
'tindakan.required' => 'Silahkan pilih Tindakan',
];
if($tindakan==0)
{
$validateIt['jenis_penilaian'] = ['required'];
$messageIt ['jenis_penilaian.required']= 'Silahkan pilih Jenis Penilaian';
if ($tindakan == 0) {
$validateIt['jenis_penilaian'] = ['required'];
$messageIt ['jenis_penilaian.required'] = 'Silahkan pilih Jenis Penilaian';
// INTERNAL
if(1==$jenis_penilaian)
{
$validateIt['region'] = ['required'];
$messageIt ['region.required']= 'Silahkan pilih Region';
// INTERNAL
if (1 == $jenis_penilaian) {
$validateIt['region'] = ['required'];
$messageIt ['region.required'] = 'Silahkan pilih Region';
}
}
elseif($tindakan==1)
{
$validateIt['catatan'] = ['required'];
$messageIt ['catatan.required']= 'Silahkan isi Catatan';
} elseif ($tindakan == 1) {
$validateIt['catatan'] = ['required'];
$messageIt ['catatan.required'] = 'Silahkan isi Catatan';
}
$validator = Validator::make($request->all(), $validateIt, $messageIt);
$data['fails'] = $validator->fails();
$data['fails'] = $validator->fails();
$data['errors'] = $validator->errors();
return $data;
@@ -245,8 +220,8 @@
public function show($id)
{
$permohonan = Permohonan::find($id);
return view('lpj::registrasi.show', compact('id','permohonan'));
$permohonan = Permohonan::find($id);
return view('lpj::registrasi.show', compact('id', 'permohonan'));
}
}

View File

@@ -60,4 +60,8 @@
return $this->hasMany(DokumenJaminan::class);
}
public function permohonan(){
return $this->hasOne(Permohonan::class, 'debiture_id', 'id' );
}
}

View File

@@ -3,6 +3,7 @@
namespace Modules\Lpj\Models;
use Modules\Lpj\Database\Factories\PermohonanFactory;
use Modules\Lpj\Services\PermohonanHistoryService;
use Modules\Usermanagement\Models\User;
class Permohonan extends Base
@@ -38,8 +39,66 @@ class Permohonan extends Base
'registrasi_at',
'jenis_penilaian_id',
'region_id',
'attachment'
];
protected static function boot()
{
parent::boot();
static::creating(function ($permohonan) {
static::handleFileUpload($permohonan);
});
static::updating(function ($permohonan) {
static::handleFileUpload($permohonan);
});
static::created(function ($permohonan) {
static::createHistory($permohonan, 'created');
});
static::updated(function ($permohonan) {
static::createHistory($permohonan, 'updated');
});
}
protected static function handleFileUpload($permohonan)
{
if (request()->hasFile('attachment')) {
$file = request()->file('attachment');
$fileName = time() . '_' . $file->getClientOriginalName();
$filePath = $file->storeAs('permohonan_attachments', $fileName, 'public');
// Delete old file if it exists
if ($permohonan->attachment) {
Storage::disk('public')->delete($permohonan->attachment);
}
$permohonan->attachment = $filePath;
}
}
protected static function createHistory($permohonan, $action)
{
$historyService = app(PermohonanHistoryService::class);
$status = $permohonan->status;
$keterangan = request()->input('keterangan'); // Get keterangan from request
$beforeRequest = $action === 'updated' ? $permohonan->getOriginal() : [];
$afterRequest = $permohonan->toArray();
$file = $permohonan->attachment ? Storage::disk('public')->path($permohonan->attachment) : null;
$historyService->createHistory(
$permohonan,
$status,
$keterangan,
$beforeRequest,
$afterRequest,
$file
);
}
public function user()
{
return $this->belongsTo(User::class);

View File

@@ -1,3 +1,164 @@
<div class="card {{ isset($hidePermohonan) ? 'hidden' : '' }}">
<div class="card-header" id="advanced_settings_appearance">
<h3 class="card-title">
Data Permohonan
</h3>
<div class="flex items-center gap-2">
<a href="{{ route($backLink) }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body lg:py-7.5 grid grid-cols-3">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nomor Register Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nomor_registrasi }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Pemohon:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Tujan Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->tujuanPenilaian->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nilai Plafond:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nilaiPlafond->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Status Bayar:
</h3>
<span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
{{ str_replace('_',' ',$permohonan->status_bayar) }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nilai NJOP:
</h3>
<span class="text-md font-bold uppercase">
{{ formatRupiah($permohonan->niilai_njop) }}
</span>
</div>
</div>
</div>
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Detail Debitur
</h3>
</div>
<div class="card-table scrollable-x-auto pb-3">
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-2 text-gray-600 font-normal">
Name
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Email
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->email ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Phone
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->phone ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Address
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->address ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
&nbsp;
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
</td>
</tr>
</table>
</div>
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-3 text-gray-600 font-normal">
Cabang
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->branch->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
CIF
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->cif ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Nomor Rekening
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->nomor_rekening ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
NPWP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->npwp ?? "" }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">

View File

@@ -22,145 +22,7 @@
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card">
<div class="card-header" id="advanced_settings_appearance">
<h3 class="card-title">
Data Permohonan
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('penilaian.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i>
Back</a>
</div>
</div>
<div class="card-body lg:py-7.5 grid grid-cols-3">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nomor Register Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nomor_registrasi }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Pemohon:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Tujan Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->tujuanPenilaian->name }}
</span>
</div>
</div>
</div>
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Detail Debutur
</h3>
</div>
<div class="card-table scrollable-x-auto pb-3">
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-2 text-gray-600 font-normal">
Name
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->name ?? '' }}
</td>
</tr>
<tr>
<td class="py-3">
Email
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->email ?? '' }}
</td>
</tr>
<tr>
<td class="py-3">
Phone
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->phone ?? '' }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Address
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->address ?? '' }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
&nbsp;
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->village->name ?? '' }},
{{ $permohonan->debiture->district->name ?? '' }},
{{ $permohonan->debiture->city->name ?? '' }},
{{ $permohonan->debiture->province->name ?? '' }} -
{{ $permohonan->debiture->village->postal_code ?? '' }}
</td>
</tr>
</table>
</div>
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-3 text-gray-600 font-normal">
Cabang
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->branch->name ?? '' }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
CIF
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->cif ?? '' }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Nomor Rekening
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->nomor_rekening ?? '' }}
</td>
</tr>
<tr>
<td class="py-3">
NPWP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->npwp ?? '' }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
@include('lpj::component.detail-jaminan')
@include('lpj::component.detail-jaminan',['backLink' => 'penilaian.index'])
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
@@ -451,7 +313,7 @@
<button type="button" data-modal-toggle="#modal_revisi" class="btn btn-warning ml-3">
Revisi
</button>
</div>
</form>
</div>

View File

@@ -6,155 +6,7 @@
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card">
<div class="card-header" id="advanced_settings_appearance">
<h3 class="card-title">
Data Permohonan
</h3>
</div>
<div class="card-body lg:py-7.5 grid grid-cols-3">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nomor Register Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nomor_registrasi }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Pemohon:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Tujan Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->tujuanPenilaian->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nilai Plafond:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nilaiPlafond->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Status Bayar:
</h3>
<span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
{{ str_replace('_',' ',$permohonan->status_bayar) }}
</span>
</div>
</div>
</div>
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Detail Debutur
</h3>
</div>
<div class="card-table scrollable-x-auto pb-3">
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-2 text-gray-600 font-normal">
Name
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Email
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->email ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Phone
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->phone ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Address
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->address ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
&nbsp;
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
</td>
</tr>
</table>
</div>
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-3 text-gray-600 font-normal">
Cabang
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->branch->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
CIF
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->cif ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Nomor Rekening
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->nomor_rekening ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
NPWP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->npwp ?? "" }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
@include('lpj::component.detail-jaminan')
@include('lpj::component.detail-jaminan',['backLink' => 'authorization.index'])
<div class="card">
<form action="{{ route('authorization.update', $permohonan->id) }}" method="POST" id="authorizationForm">

View File

@@ -6,173 +6,7 @@
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="flex gap-5 flex-row w-full">
<div class="card flex-1">
<div class="card-header" id="advanced_settings_appearance">
<h3 class="card-title">
Data Permohonan
</h3>
</div>
<div class="card-body lg:py-7.5 grid grid-cols-3">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nomor Register Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nomor_registrasi }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Pemohon:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Tujan Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->tujuanPenilaian->name }}
</span>
</div>
</div>
</div>
<div class="card flex-1">
<div class="card-header" id="advanced_settings_appearance">
<h3 class="card-title">
Fasilitas Kredit
</h3>
</div>
<div class="card-body lg:py-7.5 grid grid-cols-3">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Jenis Fasilitas
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->jenisFasilitasKredit->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nilai Plafond:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nilaiPlafond->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nilai NJOP:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nilai_njop }}
</span>
</div>
</div>
</div>
</div>
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Detail Debutur
</h3>
</div>
<div class="card-table scrollable-x-auto pb-3">
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-2 text-gray-600 font-normal">
Name
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Email
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->email ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Phone
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->phone ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Address
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->address ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
&nbsp;
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
</td>
</tr>
</table>
</div>
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-3 text-gray-600 font-normal">
Cabang
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->branch->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
CIF
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->cif ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Nomor Rekening
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->nomor_rekening ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
NPWP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->npwp ?? "" }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
@include('lpj::component.detail-jaminan')
@include('lpj::component.detail-jaminan',['backLink' => 'prmohonan.index'])
<div class="card">
<form action="{{ route('permohonan.print', $permohonan->id) }}" method="GET">

View File

@@ -10,185 +10,14 @@
@endphp
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<div class="card">
<div class="card-header" id="advanced_settings_appearance">
<h3 class="card-title">
Data Permohonan
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('registrasi.edit', $id) }}" class="btn btn-xs btn-primary hidden" title="Register"><i class="ki-filled ki-arrow-circle-right"></i> Registrasi</a>
<a href="{{ route('registrasi.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body lg:py-7.5 grid grid-cols-3">
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nomor Register Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nomor_registrasi }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Pemohon:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Tujan Permohonan:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->tujuanPenilaian->name }}
</span>
</div>
</div>
</div>
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Detail Debutur
</h3>
</div>
<div class="card-table scrollable-x-auto pb-3">
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-2 text-gray-600 font-normal">
Name
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Email
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->email ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Phone
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->phone ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Address
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->address ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
&nbsp;
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
</td>
</tr>
</table>
</div>
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-3 text-gray-600 font-normal">
Cabang
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->branch->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
CIF
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->cif ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Nomor Rekening
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->nomor_rekening ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
NPWP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->npwp ?? "" }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
@include('lpj::component.detail-jaminan')
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Data Biaya
</h3>
</div>
<div class="card-table scrollable-x-auto pb-3">
<div class="grid grid-cols-1 xl:grid-cols-1 gap-5 lg:gap-7.5">
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td width="10%" class="py-2 text-gray-600 font-normal">
Status Bayar
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ strtoupper(str_replace('_',' ',$permohonan->status_bayar)) }}
</td>
</tr>
<tr>
<td class="py-3">
Nilai NJOP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->nilai_njop }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
@include('lpj::component.detail-jaminan',['backLink' => 'registrasi.index'])
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
Registrasi
</h3>
<div class="flex items-center gap-2 hidden">
<a href="{{ route('registrasi.show', $id) }}" class="btn btn-xs btn-primary" title="Detail"><i class="ki-filled ki-abstract-26"></i> Detail</a>
<a href="{{ route('registrasi.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
</div>
</div>
<div class="card-body lg:py-7.5">
<form id="{{$route[0]}}_form" name="{{$route[0]}}_form" method="POST">
@@ -240,7 +69,7 @@
<option></option>
</select>
<em id="{{$route[0]}}_region_msg" class="alert text-danger text-sm"></em>
</div>
</div>
</div><br />
<div id="{{ $route[0] }}_div_catatan2" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">

View File

@@ -48,103 +48,37 @@
{{ $permohonan->tujuanPenilaian->name }} {!! $permohonan->dokumen !!}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nilai Plafond:
</h3>
<span class="text-2sm text-gray-700">
{{ $permohonan->nilaiPlafond->name }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Status Bayar:
</h3>
<span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
{{ str_replace('_',' ',$permohonan->status_bayar) }}
</span>
</div>
<div class="mb-5">
<h3 class="text-md font-medium text-gray-900">
Nilai NJOP:
</h3>
<span class="text-md font-bold uppercase">
{{ formatRupiah($permohonan->niilai_njop) }}
</span>
</div>
</div>
</div>
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Detail Debutur
</h3>
</div>
<div class="card-table scrollable-x-auto pb-3">
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-2 text-gray-600 font-normal">
Name
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Email
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->email ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
Phone
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->phone ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Address
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->address ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
&nbsp;
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
</td>
</tr>
</table>
</div>
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td class="py-3 text-gray-600 font-normal">
Cabang
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->branch->name ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
CIF
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->cif ?? "" }}
</td>
</tr>
<tr>
<td class="py-3 text-gray-600 font-normal">
Nomor Rekening
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->nomor_rekening ?? "" }}
</td>
</tr>
<tr>
<td class="py-3">
NPWP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->npwp ?? "" }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
@include('lpj::component.detail-jaminan')
@include('lpj::component.detail-jaminan',['backLink' => 'registrasifinal.index','hidePermohonan'=>true])
</div>
@endsection

View File

@@ -58,7 +58,7 @@
</div>
</div>
@include('lpj::component.detail-jaminan')
@include('lpj::component.detail-jaminan',['backLink'=>'surveyor.index'])
<div class="card min-w-full py-2 px-2">
<div class="card-header" id="basic_settings">