Skip to content
Snippets Groups Projects
Commit e0ff5910 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

filtering by voucher type added

parent 0edbc003
No related branches found
No related tags found
1 merge request!138list of vouchers with possibility to filter and sort
......@@ -215,6 +215,7 @@ function createTable(params) {
var flying_teams_url = params.flying_teams_url;
var appointment_types_url = params.appointment_types_url;
var subjects_url = params.subjects_url;
var voucher_types_url = params.voucher_types_url;
var columnsDefinition = params.columns;
tableElement.appendChild(createHeader(columnsDefinition));
......@@ -274,6 +275,17 @@ function createTable(params) {
});
});
$(tableElement).find('tfoot div[name="voucher_type_filter"]').each(function () {
var obj = $(this);
obj.html('<select style="width:80px"><option value selected="selected">---</option></select>');
var select = $('select', obj);
$.get(voucher_types_url, function (content) {
$.each(content.data, function (index, voucher_type) {
select.append('<option value="' + voucher_type.id + '">' + voucher_type.code + '</option>');
});
});
});
$(tableElement).find('tfoot div[name="flying_team_filter"]').each(function () {
var obj = $(this);
obj.html('<select style="width:80px"><option value selected="selected">---</option></select>');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment