Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender

This commit is contained in:
2025-03-10 10:48:25 +07:00
4 changed files with 88 additions and 41 deletions

View File

@@ -380,7 +380,12 @@ function getNomorLaporan($permohonanId, $documentId, $type = 'nomor_laporan')
'permohonan_id' => $permohonanId,
'dokumen_jaminan_id' => $documentId,
])->first();
return $type == 'nomor_laporan' ? $laporan->nomor_laporan : $laporan->created_at ?? "-";
if (!$laporan) {
return $type == 'nomor_laporan' ? '-' : null;
}
return $type == 'nomor_laporan' ? $laporan->nomor_laporan : $laporan->created_at;
}
function getCustomField($param)

View File

@@ -305,7 +305,7 @@ class PenilaiController extends Controller
*/
public function show($id)
{
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian', 'documents.inspeksi'])->find($id);
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian', 'documents.inspeksi','jenisPenilaian','laporanExternal'])->find($id);
// return response()->json(['permohonan' => $permohonan]);

View File

@@ -235,4 +235,9 @@
{
return $this->hasMany(LampiranDokumen::class);
}
public function laporanExternal()
{
return $this->belongsTo(LaporanExternal::class,'id','permohonan_id');
}
}

View File

@@ -85,7 +85,6 @@
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
@@ -323,6 +322,45 @@
</div>
</div>
</div>
@if($permohonan->jenisPenilaian->name=="External")
@if(isset($permohonan->laporanExternal->file_resume) || isset($permohonan->laporanExternal->file_laporan))
<div class="dropdown" data-dropdown="true" data-dropdown-trigger="click">
<button class="dropdown-toggle btn btn-primary">
Laporan External
</button>
<div class="dropdown-content w-full max-w-56 py-2 !ml-[200px] !mt-[-20px]">
<div class="menu menu-default flex flex-col w-full">
@if(isset($permohonan->laporanExternal->file_resume) && !empty($permohonan->laporanExternal->file_resume))
<div class="menu-item">
<a class="menu-link" onclick="viewPDF('{{ Storage::url($permohonan->laporanExternal->file_resume) }}')">
<span class="menu-icon">
<i class="ki-outline ki-badge"></i>
</span>
<span class="menu-title">
Resume
</span>
</a>
</div>
@endif
@if(isset($permohonan->laporanExternal->file_laporan) && !empty($permohonan->laporanExternal->file_laporan))
<div class="menu-item">
<a class="menu-link" onclick="viewPDF('{{ Storage::url($permohonan->laporanExternal->file_laporan) }}')">
<span class="menu-icon">
<i class="ki-outline ki-setting-2"></i>
</span>
<span class="menu-title">
Laporan
</span>
</a>
</div>
@endif
</div>
</div>
</div>
@endif
@endif
</div>
<div class="flex justify-end gap-5">
@@ -362,8 +400,6 @@
</div>
</div>
@@ -412,7 +448,8 @@
<div class="flex justify-center items-center gap-2">
<input type="file" id="kertas_kerja" class="file-input">
<button type="button" class="btn btn-outline btn-success"
onclick="uploadKertasKerja({{ $permohonan->id }}, '{{ $documentId }}', '{{ $inspeksiId }}', '{{ $jenisJaminanId }}')">Upload</button>
onclick="uploadKertasKerja({{ $permohonan->id }}, '{{ $documentId }}', '{{ $inspeksiId }}', '{{ $jenisJaminanId }}')">Upload
</button>
</div>
</div>
<div class="flex justify-between items-center">