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:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user