Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var internal_supplier_list = @json($internal_supplier_list); // JSON Encode Data Laravel
- // Internal Supplier List :: BEGIN
- var $select_internal_supplier = $(`<select class="form-control form-control-sm aiz-selectpicker" data-id="${uniqueId}" name="orders[${uniqueId}][internal_supplier_id]"></select>`);
- var $defaultOption = $('<option></option>').attr('value', '').text('-- Select --');
- $select_internal_supplier.append($defaultOption);
- $.each(internal_supplier_list, function(index, item) {
- var $option = $(`<option></option>`).attr('value', item.user_id).text(item.name);
- $select_internal_supplier.append($option);
- });
- // Internal Supplier List :: END
- var orderRowHTML = `
- <tr>
- <input type="hidden" data-id="${uniqueId}" name="orders[${uniqueId}][product_id]" value="0">
- <td>${$select_internal_supplier.prop('outerHTML')}</td>
- </tr>
- `;
- $('#product_table tbody').append(orderRowHTML);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement