1. added homepage for laporan audit in operasi.

2. bug fix when table 0 marhun must cannot press papar margin.
3. bug fix when in papar margin display must cannot press daftar marhun.
4. change bersih to bersih in editmarhun
This commit is contained in:
Hafifie PKB
2026-03-12 12:20:40 +08:00
parent 79ee2be97e
commit 46c7cc08a7
7 changed files with 410 additions and 4 deletions
+19 -2
View File
@@ -107,8 +107,8 @@
<th>Nilai Marhun</th>
<th>Margin Teller (%)</th>
<th>Margin PC (%)</th>
<th>Nilai Marhun Teller</th>
<th>Nilai Marhun PC</th>
<th>Pembiayaan Teller</th>
<th>Pembiayaan PC</th>
</tr>
</thead>
<tbody id="marginTableBody">
@@ -1915,18 +1915,35 @@
$('#toggleTableBtn').on('click', function() {
if (!isMarginTableVisible) {
// Check if main table has data before showing margin table
let tableData = $('#myTable').DataTable().data();
if (tableData.length === 0) {
Swal.fire({
icon: 'warning',
title: 'Amaran!',
text: 'Tiada data marhun untuk papar margin. Sila daftar marhun terlebih dahulu.'
});
return;
}
// Show margin table, hide main table
$('#myTable_wrapper').hide();
$('#marginTable').show();
$(this).html('<i class="fas fa-exchange-alt"></i> Papar Marhun');
loadMarginData();
isMarginTableVisible = true;
// Disable Daftar Marhun button when margin table is visible
$('button[data-target="#daftar_marhun"]').prop('disabled', true);
} else {
// Show main table, hide margin table
$('#marginTable_wrapper').hide();
$('#myTable_wrapper').show();
$(this).html('<i class="fas fa-exchange-alt"></i> Papar Margin');
isMarginTableVisible = false;
// Enable Daftar Marhun button when main table is visible
$('button[data-target="#daftar_marhun"]').prop('disabled', false);
}
});