end of day commit for users and suppliers authenticated handling
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
ul.nav.nav-tabs.nav-stacked
|
||||
- if list_open?
|
||||
li= link_to 'Place order', '/show_products?supplier_id=' + active_list.supplier.id
|
||||
li= link_to 'Active list', view_active_list_path
|
||||
li= link_to 'Place order', user_list_products_path(supplier_id: active_list.supplier.id)
|
||||
li= link_to 'Active list', user_active_list_path
|
||||
li= link_to 'Request bill', '#'
|
||||
li= link_to 'Move table', '#'
|
||||
li= link_to 'I have a question', '#'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.page-header= title 'Select Qr code'
|
||||
ul
|
||||
- for table in @tables
|
||||
li= link_to image_tag(url_for(qrcode_table_path(table, format: :png))), {action: :create_list, table_id: table.id}
|
||||
li= link_to image_tag(url_for(qrcode_table_path(table, format: :png))), user_create_list_path(table_id: table.id)
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
.page-header
|
||||
h4= t('user.show_products.title', products: Product.model_name.human_plural)
|
||||
= link_to t('helpers.links.show_active_list', list: List.model_name.human), user_active_list_path, class: ['btn btn']
|
||||
span#list-needs-help-button
|
||||
table#products-table.table.table-striped.table-hover
|
||||
tbody
|
||||
-# content_for :sidebar do
|
||||
table#active-order-table.table.table-striped.hide
|
||||
thead
|
||||
tr
|
||||
th Product
|
||||
th #
|
||||
th.currency Total
|
||||
th
|
||||
tbody
|
||||
tfoot
|
||||
tr
|
||||
td colspan=2
|
||||
button class="btn btn-primary" onClick="Qrammer.handle_active_user_list(function(){Qrammer.order_active_products_list('/order_active_products_list')})" Bestellen
|
||||
|
|
||||
button class="btn btn btn-warning" onClick="Qrammer.clear_active_list()" Clear
|
||||
td.currency
|
||||
strong#active-order-total
|
||||
td
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
Qrammer.handle_active_user_list(function(){
|
||||
$.get('#{product_list_supplier_path(@supplier, format: :json).html_safe}', function(res){
|
||||
window.products = res
|
||||
body = $('#products-table tbody')
|
||||
for(var category in window.products){
|
||||
body.append('<tr><td colspan="3"><h4>'+category+'<h4></td></tr>');
|
||||
var category_ref = window.products[category];
|
||||
for(var iproduct = 0; iproduct < window.products[category].length; iproduct++){
|
||||
var product = window.products[category][iproduct];
|
||||
row = $('<tr></tr>');
|
||||
button = $('<button class="btn btn-mini btn-primary">Add</button>');
|
||||
var callback = (function(prod){
|
||||
return function(){ Qrammer.add_product(prod) }
|
||||
})(product)
|
||||
button.click(callback);
|
||||
row.append('<td>'+product.name+'</td>');
|
||||
row.append('<td>'+Qrammer.currency(product.price)+'</td>');
|
||||
row.append($('<td></td>').append(button));
|
||||
body.append(row);
|
||||
}
|
||||
}
|
||||
})
|
||||
setInterval('Qrammer.handle_active_user_list()', 7500);
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
.page-header= title 'User history'
|
||||
p Todo
|
||||
@@ -1,18 +0,0 @@
|
||||
.page-header
|
||||
h4= t('user.active_list.title', list: List.model_name.human)
|
||||
= link_to t('helpers.links.place_order'), user_products_path, class: ['btn btn-primary']
|
||||
span#list-needs-payment-button
|
||||
span#list-needs-help-button
|
||||
table#active-list-table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= Order.model_name.human
|
||||
th.currency= Product.human_attribute_name(:price)
|
||||
tbody
|
||||
tfoot
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
Qrammer.active_user_list('#{session[:active_list_id]}')
|
||||
setInterval( "Qrammer.active_user_list('#{session[:active_list_id]}')", 7500);
|
||||
})
|
||||
Reference in New Issue
Block a user