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,2 +0,0 @@
|
||||
.page-header= title 'User history'
|
||||
p Todo
|
||||
@@ -35,6 +35,7 @@ html lang="en"
|
||||
li= link_to Table.model_name.human_plural, tables_path
|
||||
li= link_to Product.model_name.human_plural, products_path
|
||||
li= link_to List.model_name.human_plural, lists_path
|
||||
li= link_to Order.model_name.human_plural, orders_path
|
||||
li= link_to ProductCategory.model_name.human_plural, product_categories_path
|
||||
|
||||
.container
|
||||
|
||||
@@ -30,8 +30,8 @@ html lang="en"
|
||||
span.icon-bar
|
||||
a.brand href=supplier_root_path Qrammer
|
||||
ul.nav#top-navigation-list
|
||||
li= link_to t('supplier.menu.active_orders', orders: Order.model_name.human_plural), supplier_orders_path
|
||||
li= link_to t('supplier.menu.active_lists', lists: List.model_name.human_plural), supplier_lists_path
|
||||
li= link_to t('supplier.menu.active_orders', orders: Order.model_name.human_plural), supplier_active_orders_path
|
||||
li= link_to t('supplier.menu.active_lists', lists: List.model_name.human_plural), supplier_active_lists_path
|
||||
.container.nav-collapse
|
||||
|
||||
.container
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
.control-group class=(@list.errors[:table_id].any? ? 'error' : nil)
|
||||
= f.label :table_id, Table.model_name.human, class: 'control-label'
|
||||
.controls
|
||||
= f.select :table_id, options_for_select(@tables.map{|a| [a.number, a.id]}), include_blank: nil
|
||||
= f.collection_select :table_id, @tables, :id, :number, include_blank: nil
|
||||
.control-group class=(@list.errors[:supplier_id].any? ? 'error' : nil)
|
||||
= f.label :supplier_id, Supplier.model_name.human, class: 'control-label'
|
||||
.controls
|
||||
= f.collection_select :supplier_id, @suppliers, :id, :name, include_blank: nil
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
|
||||
@@ -9,6 +9,7 @@ div.page-header= title :index, model_class
|
||||
th= model_class.human_attribute_name(:needs_payment)
|
||||
th= model_class.human_attribute_name(:closed_at)
|
||||
th= Table.model_name.human
|
||||
th= Supplier.model_name.human
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
tbody
|
||||
@@ -19,6 +20,7 @@ div.page-header= title :index, model_class
|
||||
td= list.needs_payment
|
||||
td= list.closed_at
|
||||
td= link_to_if list.table.present?, list.table.try(:number), list.table
|
||||
td= link_to_if list.supplier.present?, list.supplier.try(:name), list.supplier
|
||||
td=l list.created_at, format: :short
|
||||
td
|
||||
= link_to t('helpers.links.edit'), [:edit, list], class: 'btn btn-mini'
|
||||
|
||||
@@ -13,6 +13,9 @@ dl.dl-horizontal.show-list
|
||||
- if @list.table.present?
|
||||
dt= Table.model_name.human
|
||||
dd= link_to @list.table.number, @list.table
|
||||
- if @list.supplier.present?
|
||||
dt= Supplier.model_name.human
|
||||
dd= link_to @list.supplier.name, @list.supplier
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), lists_path, class: 'btn'
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
.control-group class=(@order.errors[:supplier_id].any? ? 'error' : nil)
|
||||
= f.label :supplier_id, Supplier.model_name.human, class: 'control-label'
|
||||
.controls
|
||||
= f.select :supplier_id, options_for_select(@suppliers.map{|a| [a.name, a.id]}), include_blank: nil
|
||||
= f.collection_select :supplier_id, @suppliers, :id, :name, include_blank: nil
|
||||
.form-actions
|
||||
= f.submit nil, class: 'btn btn-primary'
|
||||
'
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ table#active-lists-table.table.table-striped
|
||||
javascript:
|
||||
var active_lists_interval;
|
||||
jQuery(function(){
|
||||
Qrammer.load_active_lists('#{@supplier.id}')
|
||||
active_lists_interval = setInterval( "Qrammer.load_active_lists('#{@supplier.id}')", 7500);
|
||||
Qrammer.load_active_lists()
|
||||
active_lists_interval = setInterval('Qrammer.load_active_lists()', 7500);
|
||||
});
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ table#active-orders-table.table
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
Qrammer.load_active_orders('#{@supplier.id}')
|
||||
setInterval( "Qrammer.load_active_orders('#{@supplier.id}')", 7500);
|
||||
Qrammer.load_active_orders()
|
||||
setInterval( 'Qrammer.load_active_orders()', 7500);
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
.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']
|
||||
= link_to t('helpers.links.place_order'), user_list_products_path, class: ['btn btn-primary']
|
||||
span#list-needs-payment-button
|
||||
span#list-needs-help-button
|
||||
table#active-list-table.table.table-striped
|
||||
@@ -0,0 +1,3 @@
|
||||
.page-header= title 'User list history'
|
||||
p Todo
|
||||
= render template: 'lists/show'
|
||||
@@ -0,0 +1,2 @@
|
||||
.page-header= title 'User list history'
|
||||
p Todo
|
||||
+1
-1
@@ -26,7 +26,7 @@ table#active-order-table.table.table-striped.hide
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
Qrammer.handle_active_user_list(function(){
|
||||
$.get('#{product_list_supplier_path(@supplier, format: :json).html_safe}', function(res){
|
||||
$.get('/user/product_list.json', function(res){
|
||||
window.products = res
|
||||
body = $('#products-table tbody')
|
||||
for(var category in window.products){
|
||||
Reference in New Issue
Block a user