feat(inventory): list operations in Entradas/Salidas/Traspasos/Ajustes tabs
- Add GET /operations endpoint with filtering by type, pagination, date range - Join with inventory, employees, branches for rich display - Add tbody IDs and footer/pagination IDs to operation tables in HTML - Add loadOperations() JS function with renderOperationRow() per type - Integrate loadOperations into switchTab for auto-load on tab change - Update recordPurchase/Adjustment/Transfer to refresh respective lists - Expose loadOperations globally for HTML inline script access
This commit is contained in:
@@ -377,13 +377,13 @@
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody id="entradasTableBody">
|
||||
<!-- Populated by JS -->
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-footer">
|
||||
<span></span>
|
||||
<div class="pagination"></div>
|
||||
<span id="entradasFooter"></span>
|
||||
<div class="pagination" id="entradasPagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -422,13 +422,13 @@
|
||||
<th>Autorizó</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody id="salidasTableBody">
|
||||
<!-- Populated by JS -->
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-footer">
|
||||
<span></span>
|
||||
<div class="pagination"></div>
|
||||
<span id="salidasFooter"></span>
|
||||
<div class="pagination" id="salidasPagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -472,13 +472,13 @@
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody id="traspasosTableBody">
|
||||
<!-- Populated by JS -->
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-footer">
|
||||
<span></span>
|
||||
<div class="pagination"></div>
|
||||
<span id="traspasosFooter"></span>
|
||||
<div class="pagination" id="traspasosPagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -517,13 +517,13 @@
|
||||
<th>Autorizó</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody id="ajustesTableBody">
|
||||
<!-- Populated by JS -->
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-footer">
|
||||
<span></span>
|
||||
<div class="pagination"></div>
|
||||
<span id="ajustesFooter"></span>
|
||||
<div class="pagination" id="ajustesPagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -652,6 +652,11 @@
|
||||
|
||||
// Scroll panels container back to top
|
||||
document.getElementById('tab-panels').scrollTop = 0;
|
||||
|
||||
// Load operations data for non-stock tabs
|
||||
if (name !== 'stock' && name !== 'alertas' && name !== 'conteos' && window.loadOperations) {
|
||||
window.loadOperations(name, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user