StringFellow commited on
Commit
3a269b6
·
verified ·
1 Parent(s): 32eab3f

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +0 -3
app.js CHANGED
@@ -35,7 +35,6 @@ async function login() {
35
  document.getElementById('app-view').classList.remove('d-none');
36
  document.getElementById('user-role-badge').innerText = `Role: ${state.role}`;
37
 
38
- // Make 'Baru' button visible, but handle enablement
39
  const btnAdd = document.getElementById('btn-add-new');
40
  btnAdd.classList.remove('d-none');
41
  if (state.role === 'Viewer') {
@@ -59,7 +58,6 @@ function logout() {
59
  }
60
 
61
  async function loadInitialData() {
62
- // Show Loading indicator in table body
63
  document.getElementById('tableBody').innerHTML = `<tr><td colspan="17" class="text-center py-4"><span class="spinner-border spinner-border-sm text-warning me-2"></span>Loading data...</td></tr>`;
64
 
65
  const result = await apiCall('getData');
@@ -127,7 +125,6 @@ function renderTable() {
127
  pageHTML += `<li class="page-item ${state.currentPage === totalPages || totalPages === 0 ? 'disabled' : ''}"><button class="page-link" onclick="changePage(${state.currentPage + 1})">›</button></li>`;
128
  document.getElementById('paginationNav').innerHTML = pageHTML;
129
 
130
- // Action column header is always rendered
131
  let headHTML = `<tr>
132
  <th>Nama Supplier</th><th>Tgl Kedatangan</th><th>No. SJ Supplier</th>
133
  <th>Item</th><th>Qty Awal</th><th>Qty Reject</th><th>Qty Nett</th>
 
35
  document.getElementById('app-view').classList.remove('d-none');
36
  document.getElementById('user-role-badge').innerText = `Role: ${state.role}`;
37
 
 
38
  const btnAdd = document.getElementById('btn-add-new');
39
  btnAdd.classList.remove('d-none');
40
  if (state.role === 'Viewer') {
 
58
  }
59
 
60
  async function loadInitialData() {
 
61
  document.getElementById('tableBody').innerHTML = `<tr><td colspan="17" class="text-center py-4"><span class="spinner-border spinner-border-sm text-warning me-2"></span>Loading data...</td></tr>`;
62
 
63
  const result = await apiCall('getData');
 
125
  pageHTML += `<li class="page-item ${state.currentPage === totalPages || totalPages === 0 ? 'disabled' : ''}"><button class="page-link" onclick="changePage(${state.currentPage + 1})">›</button></li>`;
126
  document.getElementById('paginationNav').innerHTML = pageHTML;
127
 
 
128
  let headHTML = `<tr>
129
  <th>Nama Supplier</th><th>Tgl Kedatangan</th><th>No. SJ Supplier</th>
130
  <th>Item</th><th>Qty Awal</th><th>Qty Reject</th><th>Qty Nett</th>