🔧 refactor(laporan): kontrol akses role, optimasi query, dan perbaikan UI
- Tambah role `pemohon-ao` & `pemohon-eo` untuk upload lampiran di LampiranDokumen.php - Implementasi kontrol akses role di lampiran-dokumen.blade.php & laporan/index.blade.php (logika khusus nilai_liquidasi) - Modifikasi query di LaporanController.php: hapus filter approval_eo_at & optimasi kondisi WHERE - Perbaikan formatting query dengan indentasi lebih rapi & maintainable - Standardisasi urutan class CSS di beberapa Blade (activity/index, penilaian/otorisator/index-sla & index) - Pisahkan logika generateLaporanButton jadi function terpisah di laporan/index.blade.php - Perbaikan tampilan tombol laporan berbasis role + cleanup baris kosong & indentasi - Konsistensi UI/UX: responsive design lebih baik, interface clean & styling konsisten dengan Tailwind - Tingkatkan security & maintainability: granular role access, query lebih efisien, code lebih terstruktur
This commit is contained in:
@@ -43,15 +43,15 @@
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card border border-agi-100 pb-2.5">
|
||||
<div class="grid gap-5 mx-auto w-full lg:gap-7.5">
|
||||
<div class="pb-2.5 border card border-agi-100">
|
||||
<div class="card-header bg-agi-50" id="basic_settings">
|
||||
<div class="card-title flex flex-row gap-1.5">
|
||||
<div class="flex flex-row gap-1.5 card-title">
|
||||
Activity
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-header bg-agi-50 py-5 flex-wrap">
|
||||
<div class="flex-wrap py-5 card-header bg-agi-50">
|
||||
|
||||
<div class="flex flex-wrap gap-2 lg:gap-5">
|
||||
<div class="flex">
|
||||
@@ -64,30 +64,30 @@
|
||||
|
||||
<div class="dropdown" data-dropdown="true" data-dropdown-trigger="click">
|
||||
<button
|
||||
class="dropdowns-toggle btn btn-sm btn-light inline-flex justify-between w-full items-center">
|
||||
class="inline-flex justify-between items-center w-full dropdowns-toggle btn btn-sm btn-light">
|
||||
Pilih Status
|
||||
<i class="ki-outline ki-down dropdown-open:hidden">
|
||||
</i>
|
||||
<i class="ki-outline ki-up hidden dropdown-open:block">
|
||||
<i class="hidden ki-outline ki-up dropdown-open:block">
|
||||
</i>
|
||||
</button>
|
||||
<div
|
||||
class="dropdowns-content w-full max-w-56 py-2 absolute mt-2 origin-top-right z-50 bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5">
|
||||
<div class="menu menu-default flex flex-col w-full">
|
||||
class="absolute z-50 py-2 mt-2 w-full bg-white rounded-md ring-1 ring-black ring-opacity-5 shadow-lg origin-top-right dropdowns-content max-w-56">
|
||||
<div class="flex flex-col w-full menu menu-default">
|
||||
<!-- Checkbox untuk All Status -->
|
||||
<div class="menu-item">
|
||||
<label class="menu-link flex items-center px-4 py-2 text-sm text-gray-700">
|
||||
<label class="flex items-center px-4 py-2 text-sm text-gray-700 menu-link">
|
||||
<input id="select-all" type="checkbox"
|
||||
class="form-checkbox h-4 w-4 text-blue-600">
|
||||
class="w-4 h-4 text-blue-600 form-checkbox">
|
||||
<span class="ml-2">All Status</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- Dinamis Status dari Backend -->
|
||||
@foreach ($status_permohonan as $item)
|
||||
<div class="menu-item">
|
||||
<label class="menu-link flex items-center px-4 py-2 text-sm text-gray-700">
|
||||
<label class="flex items-center px-4 py-2 text-sm text-gray-700 menu-link">
|
||||
<input type="checkbox"
|
||||
class="form-checkbox status-checkbox h-4 w-4 text-blue-600"
|
||||
class="w-4 h-4 text-blue-600 form-checkbox status-checkbox"
|
||||
value="{{ strtolower($item->name) }}">
|
||||
<span class="ml-2">{{ $item->name }}</span>
|
||||
</label>
|
||||
@@ -105,12 +105,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-grid min-w-full" data-datatable="false" data-datatable-page-size="10"
|
||||
<div class="min-w-full card-grid" data-datatable="false" data-datatable-page-size="10"
|
||||
data-datatable-state-save="false" id="permohonan-table" data-api-url="{{ route('activity.datatables') }}">
|
||||
|
||||
<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"
|
||||
<table class="table text-sm font-medium text-gray-700 align-middle table-auto table-border"
|
||||
data-datatable-table="true">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -158,13 +158,13 @@
|
||||
</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">
|
||||
class="flex-col gap-3 justify-center font-medium text-gray-600 card-footer md:justify-between md:flex-row text-2sm">
|
||||
<div class="flex gap-2 items-center">
|
||||
Show
|
||||
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per
|
||||
<select class="w-16 select select-sm" data-datatable-size="true" name="perpage"> </select> per
|
||||
page
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="flex gap-4 items-center">
|
||||
<span data-datatable-info="true"></span>
|
||||
<div class="pagination" data-datatable-pagination="true"></div>
|
||||
</div>
|
||||
@@ -275,10 +275,10 @@
|
||||
['survey', 'done', 'proses-laporan', 'laporan', 'paparan'].includes(status) ?
|
||||
dokumenjaminan.map(dokumen => {
|
||||
return `
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-info" href="surveyor/print-out-inspeksi/${data.id}/${dokumen.id}/${dokumen.jenis_jaminan_id}" title="Print Inspeksi Permohonan">
|
||||
<i class="ki-outline ki-printer"></i>
|
||||
</a>
|
||||
`;
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-info" href="surveyor/print-out-inspeksi/${data.id}/${dokumen.id}/${dokumen.jenis_jaminan_id}" title="Print Inspeksi Permohonan">
|
||||
<i class="ki-outline ki-printer"></i>
|
||||
</a>
|
||||
`;
|
||||
}).join('') : ''
|
||||
}
|
||||
</div>
|
||||
@@ -291,8 +291,6 @@
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||
|
||||
function highlightFreezeRows() {
|
||||
|
||||
Reference in New Issue
Block a user