Commit 7fc5c742 by Damien Moulard Committed by Alexis Aoun

fix remove supplier

parent 01c2a5b5
......@@ -881,7 +881,7 @@ function display_suppliers() {
$("#suppliers_container").empty();
$(".remove_supplier_icon").off();
for (supplier of selected_suppliers) {
for (let supplier of selected_suppliers) {
let template = $("#templates #supplier_pill_template");
template.find(".pill_supplier_name").text(supplier.display_name);
......@@ -894,10 +894,10 @@ function display_suppliers() {
const el_id = $(this).attr('id')
.split('_');
const supplier_id = el_id[el_id.length-1];
const clicked_supplier = selected_suppliers.find(s => s.id == supplier_id);
let modal_remove_supplier = $('#templates #modal_remove_supplier');
modal_remove_supplier.find(".supplier_name").text(supplier.display_name);
modal_remove_supplier.find(".supplier_name").text(clicked_supplier.display_name);
openModal(
modal_remove_supplier.html(),
......
Markdown is supported
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