diff --git a/smash/web/static/js/smash.js b/smash/web/static/js/smash.js index dd85b76aa65986fb024b5c6e0f718c6ca5253277..45122991ee81b1341c86e6e665f1faf113e255d5 100644 --- a/smash/web/static/js/smash.js +++ b/smash/web/static/js/smash.js @@ -216,6 +216,7 @@ function createTable(params) { var appointment_types_url = params.appointment_types_url; var subjects_url = params.subjects_url; var voucher_types_url = params.voucher_types_url; + var voucher_partner_url = params.voucher_partner_url; var columnsDefinition = params.columns; tableElement.appendChild(createHeader(columnsDefinition)); @@ -286,6 +287,18 @@ function createTable(params) { }); }); + $(tableElement).find('tfoot div[name="voucher_partner_filter"]').each(function () { + var obj = $(this); + obj.html('<select style="width:80px"><option value selected="selected">---</option></select>'); + var select = $('select', obj); + $.get(voucher_partner_url, function (content) { + $.each(content.data, function (index, voucher_partner) { + select.append('<option value="' + voucher_partner.id + '">' + voucher_partner.first_name + ' ' + + voucher_partner.last_name + ' ' + '</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>');