this commit is uploaded for testing only, no api calls are made
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user