Commit f22c34b6 authored by Oliver Feldt's avatar Oliver Feldt
Browse files

Fixed history not displaying properly on scan

parent d9146c14
......@@ -86,6 +86,25 @@ $("#search_form").on("submit", function(e) {
$("#radio .modal-header").removeClass(angel === null ? "info" : "success");
$("#radio_header").html(radio.name);
$("#radio").modal("show");
$("#checkouts tbody").empty();
$.getJSON(
"/checkouts",
{ radio_id: radio.name },
function(response) {
var checkouts = response;
var source = $("#checkout-template").html();
var template = Handlebars.compile(source);
$("#checkouts tbody").empty();
for (var index = 0; index < checkouts.length; index++) {
var context = {
angel: checkouts[index].angel,
checkout: checkouts[index]
};
$("#checkouts tbody").append(template(context));
}
}
);
}
}
).always(function() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment