add log file function
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<title>Edit Invoice</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/invoice.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style1.css') }}">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
</head>
|
||||
|
||||
@@ -204,15 +205,17 @@
|
||||
type: "POST",
|
||||
url: $(this).attr("action"),
|
||||
data: $(this).serialize(),
|
||||
dataType: 'json', // ensure JSON is returned
|
||||
success: function (response) {
|
||||
if (response.status === "success") {
|
||||
$("#invoiceSuccessAlert").fadeIn().delay(3000).fadeOut();
|
||||
alert("Invoice updated successfully!"); // <-- Popup alert
|
||||
}
|
||||
|
||||
// ✅ Redirect to Add Invoice page (table part visible)
|
||||
window.location.href = "{{ url_for('invoice.add_invoice') }}#addTable";
|
||||
}
|
||||
},
|
||||
error: function (xhr) {
|
||||
alert("Error: " + xhr.responseJSON.message);
|
||||
alert("Error: " + xhr.responseJSON?.message || "Something went wrong!");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user