fixed path added javascript

This commit is contained in:
2022-11-29 00:15:26 +01:00
parent aca7505ae9
commit 4988f0eebd
2 changed files with 28 additions and 1 deletions
+25
View File
@@ -145,6 +145,31 @@ function save(partID) {
perform_query();
}
function report_missing(partID, missing){
var data = new FormData();
data.append('partID', partID);
if(missing){
data.append('missing', 'missing')
}else{
data.append('missing', 'found')
}
$.ajax({
url: rootURL + 'report_missing',
type: 'POST',
data: data,
cache: false,
contentType: false,
processData: false,
success: function(data) {
alert("Thank you for reporting part as " + missing ".");
},
error: function() {
alert("Couldn't update the part information. Please retry.");
}
});
}
function text_filter(string) {
if (string != null)
return string;