this commit is uploaded for testing only, no api calls are made

This commit is contained in:
2025-09-09 17:28:48 +04:00
parent f89dbd0c23
commit 33e3ae059d
3 changed files with 190 additions and 1 deletions
+27 -1
View File
@@ -709,6 +709,32 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
<script src="parts.js"></script>
<script src="tracking.js"></script>
<script>
$(document).on("click", ".export-lims-btn", function () {
let rowId = $(this).data("row");
let idDataDb = $(this).data("iddatadb");
$.ajax({
url: "export_to_lims.php",
method: "POST",
data: { iddatadb: idDataDb },
dataType: "json",
beforeSend: function () {
alert("Export started in background for row " + rowId);
},
success: function (response) {
if (response.success) {
alert("✅ CommessaWeb created. ID: " + response.commessaId);
} else {
alert("❌ Error: " + response.message);
}
},
error: function (xhr, status, error) {
alert("❌ AJAX error: " + error);
}
});
});
document.addEventListener("DOMContentLoaded", function() {
console.log("Page loaded, initializing event listeners");
@@ -1068,4 +1094,4 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
</script>
</body>
</html>
</html>