end of day commit
This commit is contained in:
@@ -98,7 +98,7 @@ root.Qsupplier=
|
||||
)
|
||||
|
||||
load_active_lists: () ->
|
||||
$.get('/supplier/active_lists.json?section_id='+($('#current_section_selector').val() || ''), (res) =>
|
||||
$.get('/supplier/active_lists.json?section_id='+($('#section_selector').val() || ''), (res) =>
|
||||
body = $('#active-lists-table tbody')
|
||||
body.find('tr').remove()
|
||||
foot = $('#active-lists-table tfoot')
|
||||
@@ -113,13 +113,11 @@ root.Qsupplier=
|
||||
)
|
||||
|
||||
load_active_orders: () ->
|
||||
$.get('/supplier/active_orders.json?section_id='+($('#current_section_selector').val() || ''), (res) =>
|
||||
$.get('/supplier/active_orders.json?section_id='+($('#section_selector').val() || ''), (res) =>
|
||||
body = $('#active-orders-table tbody')
|
||||
body.html('')
|
||||
foot = $('#active-orders-table tfoot')
|
||||
if(!res.orders && !res.orders.length)
|
||||
alert('No orders in list')
|
||||
return
|
||||
return unless res.orders
|
||||
for order in res.orders
|
||||
ord = new Order(order)
|
||||
body.append @mustache('#active-order-template', ord)
|
||||
|
||||
Reference in New Issue
Block a user