move table

This commit is contained in:
Nweni
2017-06-21 17:53:44 +06:30
parent b889603ce6
commit 64210f30ac
16 changed files with 218 additions and 40 deletions

View File

@@ -81,7 +81,20 @@
<% @orders.each do |order| %>
<div class="card orders red text-white" data-id = "<%= order.order_id %>">
<div class="card-block">
<%= order.order_id %>
<%
order_status = ""
sale_order = SaleOrder.find_by_order_id(order)
if sale_order
sale = Sale.find(sale_order.sale_id)
order_status = sale.sale_status
if order_status == 'new'
order_status = order.status
end
else
order_status = order.status
end
%>
<%= order.order_id %> | <%= order_status %>
</div>
</div>
<% end %>
@@ -137,10 +150,8 @@
<td class='item-attr'><%= sale_item.price %></td>
</tr>
<%
end
end
%>
</tbody>
</table>
@@ -165,6 +176,9 @@
<!-- Column Three -->
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
<% if @sale_status != 'completed' %>
<button type="button" class="btn btn-primary btn-block" id='move'>MOVE</button>
<% end %>
<button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button>
</div>
</div>
@@ -193,5 +207,8 @@ $('#pay').on('click',function() {
});
$('#back').on('click',function(){
window.location.href = '/origami/';
})
$('#move').on('click',function(){
})
</script>