FEAT: correccion IVA y Boletas, filtro categorias, vista previa evidencia y proveedor de servicios
This commit is contained in:
@@ -167,5 +167,29 @@
|
||||
});
|
||||
</script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
<!-- Modal Vista Previa -->
|
||||
<div id="previewModal" style="display:none; position:fixed; z-index:9999; left:0; top:0; width:100%; height:100%; overflow:auto; background-color:rgba(0,0,0,0.8); align-items:center; justify-content:center;">
|
||||
<div style="background:#fff; margin:auto; padding:20px; border-radius:8px; width:80%; max-width:800px; max-height:90vh; display:flex; flex-direction:column; position:relative;">
|
||||
<span onclick="closePreview()" style="position:absolute; right:15px; top:10px; font-size:24px; cursor:pointer; font-weight:bold;">×</span>
|
||||
<h3 id="previewTitle" style="margin-top:0;">Vista Previa</h3>
|
||||
<div id="previewContent" style="flex:1; overflow:hidden; display:flex; justify-content:center; align-items:center; min-height:400px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function openPreview(url, title) {
|
||||
document.getElementById("previewTitle").innerText = "Evidencia: " + title;
|
||||
let contentDiv = document.getElementById("previewContent");
|
||||
if(url.toLowerCase().endsWith(".pdf")) {
|
||||
contentDiv.innerHTML = "<iframe src=\"" + url + "\" style=\"width:100%; height:100%; min-height:600px; border:none;\"></iframe>";
|
||||
} else {
|
||||
contentDiv.innerHTML = "<img src=\"" + url + "\" style=\"max-width:100%; max-height:600px; object-fit:contain;\">";
|
||||
}
|
||||
document.getElementById("previewModal").style.display = "flex";
|
||||
}
|
||||
function closePreview() {
|
||||
document.getElementById("previewModal").style.display = "none";
|
||||
document.getElementById("previewContent").innerHTML = "";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user