diff --git a/app/controllers/settings/menu_item_instances_controller.rb b/app/controllers/settings/menu_item_instances_controller.rb index 0d276602..fbe1b672 100644 --- a/app/controllers/settings/menu_item_instances_controller.rb +++ b/app/controllers/settings/menu_item_instances_controller.rb @@ -55,7 +55,7 @@ class Settings::MenuItemInstancesController < ApplicationController sets = ItemSet.find(params[:menu_item_instance][:item_sets]) if sets.count > 0 - @settings_menu_item.item_sets = sets + @settings_menu_item_instances.item_sets = sets end end @@ -92,7 +92,7 @@ class Settings::MenuItemInstancesController < ApplicationController sets = ItemSet.find(params[:menu_item_instance][:item_sets]) if sets.count > 0 - @settings_menu_item.item_sets = sets + @settings_menu_item_instances.item_sets = sets end end diff --git a/app/controllers/settings/set_menu_items_controller.rb b/app/controllers/settings/set_menu_items_controller.rb index 4f451de5..a9e91a94 100644 --- a/app/controllers/settings/set_menu_items_controller.rb +++ b/app/controllers/settings/set_menu_items_controller.rb @@ -132,6 +132,6 @@ class Settings::SetMenuItemsController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def settings_menu_item_params - params.require(:set_menu_item).permit(:item_code, :name, :alt_name, :type, :image_path, :menu_category_id,:account_id , :item_attributes, :item_options, :min_qty, :is_sub_item, :is_available, :created_by, :item_sets) + params.require(:set_menu_item).permit(:item_code, :name, :alt_name, :type, :image_path, :menu_category_id,:account_id , :item_attributes, :item_options, :min_qty, :is_sub_item, :is_available, :created_by, :item_sets, :unit) end end diff --git a/app/controllers/settings/simple_menu_items_controller.rb b/app/controllers/settings/simple_menu_items_controller.rb index 4cf9318c..418cc2b8 100644 --- a/app/controllers/settings/simple_menu_items_controller.rb +++ b/app/controllers/settings/simple_menu_items_controller.rb @@ -154,6 +154,6 @@ class Settings::SimpleMenuItemsController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def settings_menu_item_params - params.require(:simple_menu_item).permit(:item_code, :name, :alt_name, :type, :image_path, :menu_category_id, :account_id, :item_attributes, :item_options, :min_qty, :is_sub_item, :is_available, :created_by, :item_sets) + params.require(:simple_menu_item).permit(:item_code, :name, :alt_name, :type, :image_path, :menu_category_id, :account_id, :item_attributes, :item_options, :min_qty, :is_sub_item, :is_available, :created_by, :item_sets, :unit) end end diff --git a/app/pdf/crm_order_pdf.rb b/app/pdf/crm_order_pdf.rb index a7f85098..22a381ca 100644 --- a/app/pdf/crm_order_pdf.rb +++ b/app/pdf/crm_order_pdf.rb @@ -1,8 +1,8 @@ class CrmOrderPdf < Prawn::Document attr_accessor :receipt_width,:price_column_width,:p_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_column_width,:item_description_width def initialize(booking,order_items,printer_settings) - self.page_width = PrintSetting.where("name = ?","CRM Order").first.page_width - self.page_height = PrintSetting.where("name = ?","CRM Order").first.page_height + self.page_width = printer_settings.page_width + self.page_height = printer_settings.page_height self.margin = 10 # self.price_width = self.p_width / 2 self.price_width=80 diff --git a/app/pdf/order_item_pdf.rb b/app/pdf/order_item_pdf.rb index 7b2e350b..64df3adb 100644 --- a/app/pdf/order_item_pdf.rb +++ b/app/pdf/order_item_pdf.rb @@ -2,8 +2,8 @@ class OrderItemPdf < Prawn::Document include ActionView::Helpers::NumberHelper attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width def initialize(print_settings,order_item, print_status, options, alt_name) - self.page_width = PrintSetting.where("name = ?","OrderItemPdf").first.page_width - self.page_height = PrintSetting.where("name = ?","OrderItemPdf").first.page_height + self.page_width = print_settings.page_width + self.page_height = print_settings.page_height self.margin = 0 self.price_width = 40 # No Need for item self.qty_width = 40 diff --git a/app/pdf/order_summary_pdf.rb b/app/pdf/order_summary_pdf.rb index 902c68ad..d23f2677 100644 --- a/app/pdf/order_summary_pdf.rb +++ b/app/pdf/order_summary_pdf.rb @@ -2,8 +2,8 @@ class OrderSummaryPdf < Prawn::Document include ActionView::Helpers::NumberHelper attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width def initialize(print_settings,order, print_status, order_items = nil,alt_name) - self.page_width = PrintSetting.where("name = ?","Order Summary").first.page_width - self.page_height = PrintSetting.where("name = ?","Order Summary").first.page_height + self.page_width = print_settings.page_width + self.page_height = print_settings.page_height self.margin = 0 self.price_width = 40 # No Need for item self.qty_width = 40 diff --git a/app/pdf/queue_no_pdf.rb b/app/pdf/queue_no_pdf.rb index cda410ca..49e13bd9 100644 --- a/app/pdf/queue_no_pdf.rb +++ b/app/pdf/queue_no_pdf.rb @@ -1,8 +1,8 @@ class QueueNoPdf < Prawn::Document attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width def initialize(printer_settings, queue) - self.page_width = PrintSetting.where("name = ?","Queue No").first.page_width - self.page_height = PrintSetting.where("name = ?","Queue No").first.page_height + self.page_width = printer_settings.page_width + self.page_height = printer_settings.page_height self.margin = 5 self.price_width = 35 self.qty_width = 20 diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 809f7678..1d9b3f4d 100644 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -2,8 +2,8 @@ class ReceiptBillPdf < Prawn::Document include ActionView::Helpers::NumberHelper attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width, :description_width, :price_num_width def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status) - self.page_width = PrintSetting.where("name = ?","Receipt Bill").first.page_width - self.page_height = PrintSetting.where("name = ?","Receipt Bill").first.page_height + self.page_width = printer_settings.page_width + self.page_height = printer_settings.page_height self.margin = 5 self.price_width = 40 self.qty_width = 20 diff --git a/app/views/api/restaurant/menu/_menu_item.json.jbuilder b/app/views/api/restaurant/menu/_menu_item.json.jbuilder index cd8648db..7a450850 100644 --- a/app/views/api/restaurant/menu/_menu_item.json.jbuilder +++ b/app/views/api/restaurant/menu/_menu_item.json.jbuilder @@ -35,6 +35,7 @@ json.account_id item.account_id json.min_qty item.min_qty json.is_available item.is_available json.is_sub_item item.is_sub_item +json.unit item.unit json.item_sets item.item_sets json.attributes attr_format json.options item.item_options diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index 025cfae9..08991091 100644 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -251,7 +251,7 @@ font-weight: 400; text-transform: uppercase; transition: color 0.3s ease; - line-height: 48px; + /*line-height: 48px;*/ } .card .card-content { @@ -259,7 +259,7 @@ border-radius: 0 0 2px 2px; background-clip: padding-box; box-sizing: border-box; - height: 120px; + /*height: 120px;*/ transition: color 0.3s ease; text-align: center; } diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index a79c1ce1..2ac36c48 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -310,39 +310,39 @@ - -
- + +
+ - - - <% if @dining.bookings.length >= 1 %> - - <% if @status_order == 'order' && @status_sale != 'sale' %> - - - - - - - - - <% else %> - - - - - - - - - - <% end %> - + + + <% if @dining.bookings.length >= 1 %> + <% if @status_order == 'order' && @status_sale != 'sale' %> + + + + + + + + + + <% else %> + + + + + + + + + + <% end %> + - - <% end %> -
+ + <% end %> +