query='select c.name as container, l.name as name, l.id, c.id as container_id from locations as l inner join containers as c on l.container_id = c.id order by container, name;'
query='select c.name as container, l.name as name, l.id, c.id as container_id from locations as l inner join containers as c on l.container_id = c.id order by container, name;'
s='select p.id,partno,description,notes, c.name || l.name as location_descriptor, location_id, container_id, datasheet from parts as p inner join locations as l on p.location_id = l.id inner join containers as c on l.container_id = c.id where p.id = :id;'
r=db_engine.execute(text(s),id=partID)
@ -132,7 +166,7 @@ def get_part_info(partID):
r.close()
returnjson.dumps(l[0])
@app.route('/parts/query/<filter_dummy>/<query>')# TODO: maybe change AND to OR or maybe not
@app.route(baseURL+'/query/<filter_dummy>/<query>')# TODO: maybe change AND to OR or maybe not
defquery(filter_dummy,query):
filter=request.args.to_dict()
keywords=query.split()# Default splits with spaces
alert("Couldn't update the user information. Please retry.");
}
});
end_edit();
$('#edit-button').click(function(){
init_edit(userID);
});
}
functiondeleteUser(userID){
if(userID<0){
alert('Congratulations! You found the secret UI bug easter egg! This button should not be here, yet I left it specifically because I wanted an easter egg and not because of any other reasons! Good for you!')
return;
}
if(!confirm('Delete the selected user? ')){
return;
}
$.ajax({
url:rootURL+'deleteUser/'+userID,
type:'GET',
cache:false,
contentType:false,
processData:false,
success:function(){
alert("User removed.");
overlay_out();
location.reload();
},
fail:function(){
console.log('An error occurred while deleting the entry');
@ -5,14 +5,19 @@ ELABs custom inventory system for locating components.
The system allows searching for parts in ELAB by part name or a description text and returns the location of the part - a drawer or other compartment name and a map illustration. Finding obscure, outdated ICs was never this easy!