change UI for all settings module
This commit is contained in:
@@ -6,7 +6,8 @@ class MenuCategory < ApplicationRecord
|
||||
belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true
|
||||
has_many :menu_items
|
||||
|
||||
validates_presence_of :name, :menu, :order_by
|
||||
validates_presence_of :code, :name, :menu, :order_by
|
||||
validates_uniqueness_of :code
|
||||
|
||||
default_scope { order('order_by asc') }
|
||||
scope :active, -> {where("is_available = 1")}
|
||||
|
||||
@@ -13,8 +13,9 @@ class MenuItem < ApplicationRecord
|
||||
has_many :menu_item_sets
|
||||
has_many :item_sets, through: :menu_item_sets
|
||||
|
||||
validates_presence_of :name, :type, :min_qty, :taxable,:account_id
|
||||
|
||||
validates_presence_of :item_code, :name, :type, :min_qty, :taxable,:account_id
|
||||
validates_uniqueness_of :item_code
|
||||
|
||||
default_scope { order('item_code asc') }
|
||||
|
||||
scope :simple_menu_item, -> { where(type: 'SimpleMenuItem') }
|
||||
|
||||
@@ -4,6 +4,8 @@ class MenuItemInstance < ApplicationRecord
|
||||
has_many :menu_instance_item_sets
|
||||
has_many :item_sets, through: :menu_instance_item_sets
|
||||
# before_create :generate_menu_item_instance_code
|
||||
validates_presence_of :item_instance_code
|
||||
# validates_uniqueness_of :item_instance_code
|
||||
|
||||
def self.findParentCategory(item)
|
||||
if item.menu_category_id
|
||||
|
||||
@@ -1,28 +1,32 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_form_for(@print_setting) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for(@print_setting) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :unique_code %>
|
||||
<%= f.input :template %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :api_settings %>
|
||||
<%= f.input :page_width %>
|
||||
<%= f.input :page_height %>
|
||||
<%= f.input :print_copies %>
|
||||
<%= f.input :precision %>
|
||||
<%= f.input :delimiter %>
|
||||
<%= f.input :heading_space %>
|
||||
</div>
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :unique_code %>
|
||||
<%= f.input :template %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :api_settings %>
|
||||
<%= f.input :page_width %>
|
||||
<%= f.input :page_height %>
|
||||
<%= f.input :print_copies %>
|
||||
<%= f.input :precision %>
|
||||
<%= f.input :delimiter %>
|
||||
<%= f.input :heading_space %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@settings_account]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :title ,:input_html=>{:class=>"col-md-10"},:required=>true%>
|
||||
<%= f.input :account_type, :collection => Lookup.collection_of("account_type"),:input_html=>{:class=>"col-md-10"},:required=>true %>
|
||||
<%= f.input :discount %>
|
||||
<%= f.input :point %>
|
||||
<%= f.input :bonus %>
|
||||
<%= f.input :rebate %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@settings_account]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :title ,:input_html=>{:class=>"col-md-10"},:required=>true%>
|
||||
<%= f.input :account_type, :collection => Lookup.collection_of("account_type"),:input_html=>{:class=>"col-md-10"},:required=>true %>
|
||||
<%= f.input :discount %>
|
||||
<%= f.input :point %>
|
||||
<%= f.input :bonus %>
|
||||
<%= f.input :rebate %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :is_currently_login %>
|
||||
<%= f.input :auto_print_receipt %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox form-group'%>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :font_size %>
|
||||
<%= f.input :show_tax %>
|
||||
<%= f.input :show_cashier %>
|
||||
<%= f.input :show_guest_info %>
|
||||
</div>
|
||||
<div class="form-inputs p-l-10">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :is_currently_login %>
|
||||
<%= f.input :auto_print_receipt %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox form-group'%>
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :font_size %>
|
||||
<%= f.input :show_tax %>
|
||||
<%= f.input :show_cashier %>
|
||||
<%= f.input :show_guest_info %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,57 +1,56 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<%= simple_form_for([:settings, @commissioner]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.label :emp_id, 'Employee' %>
|
||||
|
||||
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %>
|
||||
|
||||
<br/>
|
||||
|
||||
<%= f.label :commission_id, 'Commission'%>
|
||||
<%= f.select :commission_id, Commission.all.map {|l| [l.name, l.id]}, { :include_blank => 'Choose Commission Product', :selected => ''}, {class: 'form-control'} %>
|
||||
|
||||
<br/>
|
||||
<%= f.label :joined_date %><br/>
|
||||
<%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/>
|
||||
<%= f.label :resigned_date %><br/>
|
||||
<%= f.text_field :resigned_date, {class: 'form-control datepicker', id: 'resigned_date', readonly: true} %><br/>
|
||||
<%= f.input :is_active %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
<%= simple_form_for([:settings, @commissioner]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.label :emp_id, 'Employee' %>
|
||||
|
||||
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %>
|
||||
|
||||
<br/>
|
||||
|
||||
<%= f.label :commission_id, 'Commission'%>
|
||||
<%= f.select :commission_id, Commission.all.map {|l| [l.name, l.id]}, { :include_blank => 'Choose Commission Product', :selected => ''}, {class: 'form-control'} %>
|
||||
<br/>
|
||||
<%= f.label :joined_date %><br/>
|
||||
<%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/>
|
||||
<%= f.label :resigned_date %><br/>
|
||||
<%= f.text_field :resigned_date, {class: 'form-control datepicker', id: 'resigned_date', readonly: true} %><br/>
|
||||
<%= f.input :is_active %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
2) <%= t("views.right_panel.detail.employee") %> <%= t("views.right_panel.detail.name_txt2") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.employee") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.commission_type") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.commission_type_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.joined_date") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.joined_date_txt") %> <br>
|
||||
5) <%= t("views.right_panel.detail.resigned_date") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.resigned_date_txt") %> <br>
|
||||
6) <%= t("views.right_panel.detail.active") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.active_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.commissioner_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.commissioner_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.commissioner_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,39 +1,42 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="p-l-15">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<div class="p-l-15">
|
||||
<%= simple_form_for([:settings,@commission]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<%= simple_form_for([:settings,@commission]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<div class="form-inputs">
|
||||
<!--<%= f.label :product_code, 'Product' %>
|
||||
<%= f.collection_select :product_code, MenuItem.all.order('name asc'), :id, :name, {prompt: 'Select a Product'}, {class: 'form-control'} %><br/>-->
|
||||
<%= f.input :name %>
|
||||
<%= f.input :commission_type, :collection => ['Percentage','Net Amount'], prompt: 'Select Commission Type', class: 'form-control' %>
|
||||
<%= f.input :amount %>
|
||||
<%= f.input :is_active,:class => "filled-in" ,:id => "" %>
|
||||
<%= f.input :is_active,:class => "filled-in" ,:id => "" %>
|
||||
|
||||
</div><br>
|
||||
<div class="form-actions">
|
||||
<%= f.submit 'Submit', class: 'btn btn-primary wave-effects' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.product") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.commission_type") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.commission_type_txt") %> <br>
|
||||
3) <%= t("views.right_panel.detail.amount") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.amount_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.active") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.active_txt") %> <br>
|
||||
1) <%= t("views.right_panel.detail.product") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.commission_type") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.commission_type_txt") %> <br>
|
||||
3) <%= t("views.right_panel.detail.amount") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.amount_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.active") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.active_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.commission_txt") %> <br>
|
||||
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.commission_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@employee]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@employee]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
|
||||
<%= f.input :emp_id, :label => "Employee Numberic ID (*Unique)" %>
|
||||
<%= f.input :password %>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
|
||||
<%= f.input :emp_id, :label => "Employee Numberic ID (*Unique)" %>
|
||||
<%= f.input :password %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -2,20 +2,24 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@settings_item_set]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@settings_item_set]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :alt_name %>
|
||||
<%= f.input :min_selectable_qty,input_html: {value: f.object.min_selectable_qty || '0'} %>
|
||||
<%= f.input :max_selectable_qty,input_html: {value: f.object.max_selectable_qty || '0'} %>
|
||||
</div>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :alt_name %>
|
||||
<%= f.input :min_selectable_qty,input_html: {value: f.object.min_selectable_qty || '0'} %>
|
||||
<%= f.input :max_selectable_qty,input_html: {value: f.object.max_selectable_qty || '0'} %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings, @settings_menu_category]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings, @settings_menu_category]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :menu_id, as: :hidden %>
|
||||
<%= f.input :code, label: "Category Code" %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :alt_name %>
|
||||
<%= f.input :is_available %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.association :parent %>
|
||||
</div>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :menu_id, as: :hidden %>
|
||||
<%= f.input :code, label: "Category Code" %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :alt_name %>
|
||||
<%= f.input :is_available %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.association :parent %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings, @settings_menu_item_attribute]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings, @settings_menu_item_attribute]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :attribute_type,:input_html => { :class => "col-md-9" } %>
|
||||
<%= f.input :name,:input_html => { :class => "col-md-9" } %>
|
||||
<%= f.input :value,:input_html => { :class => "col-md-9" } %>
|
||||
</div>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :attribute_type,:input_html => { :class => "col-md-9" } %>
|
||||
<%= f.input :name,:input_html => { :class => "col-md-9" } %>
|
||||
<%= f.input :value,:input_html => { :class => "col-md-9" } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,39 +1,35 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@item, @settings_menu_item_instances]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<%= simple_form_for([:settings,@item, @settings_menu_item_instances]) do |f| %>
|
||||
<div class="col-md- panel">
|
||||
<div class="form-group p-l-15">
|
||||
<%= f.input :item_instance_code %>
|
||||
<%= f.input :item_instance_name %>
|
||||
<%= f.input :price %>
|
||||
|
||||
<%= f.error_notification %>
|
||||
<%= f.input :item_attributes, collection: MenuItemAttribute.collection, input_html: { multiple: true } %>
|
||||
|
||||
<div class="col-md- panel">
|
||||
<div class="form-group p-l-15">
|
||||
<%= f.input :item_instance_code %>
|
||||
<%= f.input :item_instance_name %>
|
||||
<%= f.input :price %>
|
||||
<%= f.input :is_on_promotion %>
|
||||
<%= f.input :promotion_price %>
|
||||
|
||||
<%= f.input :is_available %>
|
||||
<%= f.input :is_default %>
|
||||
|
||||
<%= f.input :item_attributes, collection: MenuItemAttribute.collection, input_html: { multiple: true } %>
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true }, :class => "form-control item_sets" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.input :is_on_promotion %>
|
||||
<%= f.input :promotion_price %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-">
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<%= f.input :is_available %>
|
||||
<%= f.input :is_default %>
|
||||
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true }, :class => "form-control item_sets" %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings, @settings_menu_item_option]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings, @settings_menu_item_option]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :option_type,:input_html=>{:class=>"col-md-10"} %>
|
||||
<%= f.input :name,:required => true,:input_html=>{:class=>"col-md-10"} %>
|
||||
<%= f.input :value,:required => true,:input_html=>{:class=>"col-md-10"} %>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :option_type,:input_html=>{:class=>"col-md-10"} %>
|
||||
<%= f.input :name,:required => true,:input_html=>{:class=>"col-md-10"} %>
|
||||
<%= f.input :value,:required => true,:input_html=>{:class=>"col-md-10"} %>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,45 +1,49 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@settings_menu]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@settings_menu]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-25">
|
||||
<%= f.input :name,:input_html=>{:class=>"col-md-9"} %>
|
||||
<%= f.input :is_active,:input_html=>{:class=>"col-md-9"} %>
|
||||
<%= f.input :valid_days,:input_html=>{:class=>"col-md-9"} %>
|
||||
<div class="col-md-9 form-group">
|
||||
<label>* Valid Time From</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@settings_menu.valid_time_from.nil?%>
|
||||
<input type="text" name="menu[valid_time_from]" value="<%= @settings_menu.valid_time_from.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% else %>
|
||||
<input type="text" name="menu[valid_time_from]" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% end %>
|
||||
<div class="form-inputs p-l-25">
|
||||
<%= f.input :name,:input_html=>{:class=>"col-md-9"} %>
|
||||
<%= f.input :is_active,:input_html=>{:class=>"col-md-9"} %>
|
||||
<%= f.input :valid_days,:input_html=>{:class=>"col-md-9"} %>
|
||||
<div class="col-md-9 form-group">
|
||||
<label>* Valid Time From</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@settings_menu.valid_time_from.nil?%>
|
||||
<input type="text" name="menu[valid_time_from]" value="<%= @settings_menu.valid_time_from.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% else %>
|
||||
<input type="text" name="menu[valid_time_from]" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 form-group">
|
||||
<label>* Valid Time To</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@settings_menu.valid_time_to.nil?%>
|
||||
<input type="text" name="menu[valid_time_to]" value="<%= @settings_menu.valid_time_to.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% else %>
|
||||
<input type="text" name="menu[valid_time_to]" class="timepicker form-control col-md-8" placeholder="End Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 form-group">
|
||||
<label>* Valid Time To</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@settings_menu.valid_time_to.nil?%>
|
||||
<input type="text" name="menu[valid_time_to]" value="<%= @settings_menu.valid_time_to.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time...">
|
||||
<% else %>
|
||||
<input type="text" name="menu[valid_time_to]" class="timepicker form-control col-md-8" placeholder="End Time...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-20">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-actions p-l-20">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -7,29 +7,33 @@ div.form-inputs span{
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@settings_order_queue_station]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@settings_order_queue_station]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :station_name %>
|
||||
<%= f.input :is_active %>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :station_name %>
|
||||
<%= f.input :is_active %>
|
||||
|
||||
<%= f.input :printer_name %>
|
||||
<!-- <%= f.input :font_size %> -->
|
||||
<%= f.input :print_copy %>
|
||||
<%= f.hidden_field :processing_items %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox'%>
|
||||
<%= f.input :cut_per_item %>
|
||||
<%= f.input :use_alternate_name %>
|
||||
<%= f.input :processing_items, as: :hidden %>
|
||||
<%= f.input :auto_print %>
|
||||
<%= f.input :printer_name %>
|
||||
<!-- <%= f.input :font_size %> -->
|
||||
<%= f.input :print_copy %>
|
||||
<%= f.hidden_field :processing_items %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox'%>
|
||||
<%= f.input :cut_per_item %>
|
||||
<%= f.input :use_alternate_name %>
|
||||
<%= f.input :processing_items, as: :hidden %>
|
||||
<%= f.input :auto_print %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings, @settings_payment_method_setting]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings, @settings_payment_method_setting]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :payment_method %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :gateway_communication_type %>
|
||||
<%= f.input :gateway_url %>
|
||||
<%= f.input :auth_token %>
|
||||
<%= f.input :merchant_account_id %>
|
||||
<%= f.input :additional_parameters %>
|
||||
</div>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :payment_method %>
|
||||
<%= f.input :is_active %>
|
||||
<%= f.input :gateway_communication_type %>
|
||||
<%= f.input :gateway_url %>
|
||||
<%= f.input :auth_token %>
|
||||
<%= f.input :merchant_account_id %>
|
||||
<%= f.input :additional_parameters %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,38 +1,42 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@settings_product]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-group p-l-15">
|
||||
<%= f.input :item_code, :input_html => { :id => 'item_code' } %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :alt_name %>
|
||||
<%= f.input :unit_price %>
|
||||
<%= f.input :description %>
|
||||
<%= f.input :information %>
|
||||
<%= f.input:taxable %>
|
||||
</div>
|
||||
|
||||
<label>Product Image</label>
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@settings_product]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-group p-l-15">
|
||||
<%= f.input :item_code, :input_html => { :id => 'item_code' } %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :alt_name %>
|
||||
<%= f.input :unit_price %>
|
||||
<%= f.input :description %>
|
||||
<%= f.input :information %>
|
||||
<%= f.input:taxable %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<label>Product Image</label>
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
|
||||
@@ -1,213 +1,217 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_nested_form_for([:settings,@promotion]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<div class="div-border">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group">
|
||||
<label>*Promo Code</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">vpn_key</i>
|
||||
</span>
|
||||
<input type="text" name="promotion[promo_code]" value="<%= @promotion.promo_code%>" class="form-control" id="promotion_promo_code">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group">
|
||||
<label>* Start Date</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_start_date.nil?%>
|
||||
<input type="text" name="promotion[promo_start_date]" value="<%= @promotion.promo_start_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_start_date]" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 form-group">
|
||||
<label>* End Date</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_end_date.nil?%>
|
||||
<input type="text" name="promotion[promo_end_date]" value="<%= @promotion.promo_end_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_end_date]" class="datepicker form-control col-md-8" placeholder="End Date...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group">
|
||||
<label class="control-label">* Start Hour</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_start_hour.nil?%>
|
||||
<input type="text" name="promotion[promo_start_hour]" value="<%= @promotion.promo_start_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time(hh:mm)...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_start_hour]" class="timepicker form-control col-md-8" placeholder="Start Time(hh:mm)...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 form-group">
|
||||
<label class="control-label">* End Hour</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_end_hour.nil?%>
|
||||
<input type="text" name="promotion[promo_end_hour]" value="<%= @promotion.promo_end_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="End Time(hh:mm)...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_end_hour]" class="timepicker form-control col-md-8" placeholder="End Time(hh:mm)...">
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- <% if !@promotion.promo_end_hour.nil?%>
|
||||
<%= f.input :promo_end_hour, as: :string, input_html: {:value => @promotion.promo_end_hour.utc.strftime('%H:%M') },:class=>"form-control timepicker" %>
|
||||
<% else %>
|
||||
<%= f.input :promo_end_hour, as: :string, input_html: {},:class=>"form-control timepicker" %>
|
||||
<% end %> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row checkboxes ">
|
||||
<div class="col-md-3">
|
||||
<label class="control-label"><abbr title="required">*</abbr> Promotion Day</label>
|
||||
</div>
|
||||
<%= f.hidden_field :promo_day, :class => "form-control", :id => "promotion_promo_day" %>
|
||||
<div class="col-md-9">
|
||||
<label><input class="selectDay" type="checkbox" name="Sunday" value="0" id="0"> Sun</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Monday" value="1" id="1">Mon</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Tuesday" value="2" id="2"> Tue</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Wednesday" value="3" id="3"> Wed</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Thursday" value="4" id="4"> Thu</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Friday" value="5" id="5"> Fri</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Saturday" value="6" id="6"> Sat</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <%= f.input :promo_type, collection: %w{Quantity Net_off Net_price Percentage},:input_html=>{:class => 'col-md-5 form-control select'} ,:label => "Promotion Type", :include_blank => 'Choose Promotion Type', :selected => '' %> -->
|
||||
<%= f.input :promo_type,input_html: { :class => 'form-control col-md-5 form-control select' },
|
||||
collection: %w{Quantity Net_off Net_price Percentage},:label => "Promotion Type" %>
|
||||
<!-- </div>
|
||||
</div>
|
||||
-->
|
||||
<div class="row">
|
||||
<% arr = MenuItem.active.order("name desc").pluck(:name,:item_code) %>
|
||||
<% Product.order("name desc").pluck(:name,:item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-3 form-group">
|
||||
<label class="control-label"><abbr title="required">*</abbr> Item</label>
|
||||
<select class="form-control item_code_place">
|
||||
<% if !@promotion.original_product.nil? %>
|
||||
<% menuiteminstance = MenuItemInstance.find_by_item_instance_code(@promotion.original_product) %>
|
||||
<% if menuiteminstance.nil?%>
|
||||
<% code = @promotion.original_product %>
|
||||
<% else %>
|
||||
<% code = menuiteminstance.menu_item.item_code %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<option value="" selected>Choose Something</option>
|
||||
<% arr.each do |a| %>
|
||||
<% if a[1] == code %>
|
||||
<option value="<%= a[1]%>" selected><%= a[0] %></option>
|
||||
<% else %>
|
||||
<option value="<%= a[1]%>"><%= a[0] %></option>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<% sample = [] %>
|
||||
<% if !@promotion.original_product.nil? %>
|
||||
<% if !MenuItemInstance.find_by_item_instance_code(@promotion.original_product).nil? %>
|
||||
<% sample = MenuItemInstance.where("item_instance_code=?",@promotion.original_product).pluck(:item_instance_name,:item_instance_code)%>
|
||||
<% else %>
|
||||
<% sample = Product.where("item_code=?",@promotion.original_product).pluck(:name,:item_code)%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="col-md-3 form-group"><%= f.input :original_product,collection: sample %></div>
|
||||
<!-- <div class="col-md-6"><%= f.input :original_product,collection: MenuItemInstance.order("item_instance_name desc").pluck(:item_instance_name,:item_instance_code),input_html: { selected: 2 } %></div> -->
|
||||
<div class="col-md-6 form-group"><%= f.input :min_qty ,label: "Qualified Qty", :input_html => {:style => 'height: 37px'} %></div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="card">
|
||||
<div class="p-l-25 p-t-10 ">
|
||||
<div class="row">
|
||||
<div class="col-md-2 p-t-10">Item Code</div>
|
||||
<div class="col-md-2 p-t-10">Item Instance</div>
|
||||
<div class="col-md-2 p-t-10">Qualified Qty</div>
|
||||
<div class="col-md-1 p-t-10">Net off</div>
|
||||
<div class="col-md-2 p-t-10">Net Price</div>
|
||||
<div class="col-md-2 p-t-10">Percentage</div>
|
||||
<div class="col-md-1 p-t-10"></div>
|
||||
</div>
|
||||
<div class="row"></div >
|
||||
<%= f.fields_for :promotion_products do |pro| %>
|
||||
<div class="row">
|
||||
<%= pro.hidden_field :item_code,:class => "promo_product" %>
|
||||
<% arr = MenuItem.active.order("name desc").pluck(:name,:item_code) %>
|
||||
<% Product.order("name desc").pluck(:name,:item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-2 menu_item_choose form-group">
|
||||
<select class="form-control item_code_place1">
|
||||
<option value="">Choose Something</option>
|
||||
<% arr.each do |a| %>
|
||||
<option value="<%= a[1 ]%>"><%= a[0] %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <% sample = [] %> -->
|
||||
|
||||
<div class="col-md-2">
|
||||
<%= pro.input :item_code, :class => 'promoproduct', collection:[],input_html: { selected: 2 }, label: false %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<%= pro.input :min_qty , label: false, :input_html => {:style => 'height: 37px'}%>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<%= pro.input :net_off , label: false, :input_html => {:style => 'height: 37px'} %>
|
||||
</div>
|
||||
<div class="col-md-2"><%= pro.input :net_price , label: false, :input_html => {:style => 'height: 37px'} %></div>
|
||||
<div class="col-md-2"><%= pro.input :percentage , label: false, :input_html => {:style => 'height: 37px'} %></div>
|
||||
<div class="col-md-1 p-t-10"><%= pro.link_to_remove "X" ,:class=>"btn-primary btn m-r-25", :style => 'width: 25px'%></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="col-md-12 align-right m-r-10">
|
||||
<%= f.link_to_add "Add Product", :promotion_products, :class => 'btn bg-teal addProduct m-r-20' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
<%= simple_nested_form_for([:settings,@promotion]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<div class="div-border">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group">
|
||||
<label>*Promo Code</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">vpn_key</i>
|
||||
</span>
|
||||
<input type="text" name="promotion[promo_code]" value="<%= @promotion.promo_code%>" class="form-control" id="promotion_promo_code">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group">
|
||||
<label>* Start Date</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_start_date.nil?%>
|
||||
<input type="text" name="promotion[promo_start_date]" value="<%= @promotion.promo_start_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_start_date]" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 form-group">
|
||||
<label>* End Date</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">date_range</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_end_date.nil?%>
|
||||
<input type="text" name="promotion[promo_end_date]" value="<%= @promotion.promo_end_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-8" placeholder="Start Date...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_end_date]" class="datepicker form-control col-md-8" placeholder="End Date...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group">
|
||||
<label class="control-label">* Start Hour</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_start_hour.nil?%>
|
||||
<input type="text" name="promotion[promo_start_hour]" value="<%= @promotion.promo_start_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="Start Time(hh:mm)...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_start_hour]" class="timepicker form-control col-md-8" placeholder="Start Time(hh:mm)...">
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 form-group">
|
||||
<label class="control-label">* End Hour</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
<i class="material-icons">access_time</i>
|
||||
</span>
|
||||
<% if !@promotion.promo_end_hour.nil?%>
|
||||
<input type="text" name="promotion[promo_end_hour]" value="<%= @promotion.promo_end_hour.utc.strftime('%H:%M') %>" class="timepicker form-control col-md-8" placeholder="End Time(hh:mm)...">
|
||||
<% else %>
|
||||
<input type="text" name="promotion[promo_end_hour]" class="timepicker form-control col-md-8" placeholder="End Time(hh:mm)...">
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- <% if !@promotion.promo_end_hour.nil?%>
|
||||
<%= f.input :promo_end_hour, as: :string, input_html: {:value => @promotion.promo_end_hour.utc.strftime('%H:%M') },:class=>"form-control timepicker" %>
|
||||
<% else %>
|
||||
<%= f.input :promo_end_hour, as: :string, input_html: {},:class=>"form-control timepicker" %>
|
||||
<% end %> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row checkboxes ">
|
||||
<div class="col-md-3">
|
||||
<label class="control-label"><abbr title="required">*</abbr> Promotion Day</label>
|
||||
</div>
|
||||
<%= f.hidden_field :promo_day, :class => "form-control", :id => "promotion_promo_day" %>
|
||||
<div class="col-md-9">
|
||||
<label><input class="selectDay" type="checkbox" name="Sunday" value="0" id="0"> Sun</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Monday" value="1" id="1">Mon</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Tuesday" value="2" id="2"> Tue</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Wednesday" value="3" id="3"> Wed</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Thursday" value="4" id="4"> Thu</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Friday" value="5" id="5"> Fri</label>
|
||||
<label><input class="selectDay" type="checkbox" name="Saturday" value="6" id="6"> Sat</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <%= f.input :promo_type, collection: %w{Quantity Net_off Net_price Percentage},:input_html=>{:class => 'col-md-5 form-control select'} ,:label => "Promotion Type", :include_blank => 'Choose Promotion Type', :selected => '' %> -->
|
||||
<%= f.input :promo_type,input_html: { :class => 'form-control col-md-5 form-control select' },
|
||||
collection: %w{Quantity Net_off Net_price Percentage},:label => "Promotion Type" %>
|
||||
<!-- </div>
|
||||
</div>
|
||||
-->
|
||||
<div class="row">
|
||||
<% arr = MenuItem.active.order("name desc").pluck(:name,:item_code) %>
|
||||
<% Product.order("name desc").pluck(:name,:item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-3 form-group">
|
||||
<label class="control-label"><abbr title="required">*</abbr> Item</label>
|
||||
<select class="form-control item_code_place">
|
||||
<% if !@promotion.original_product.nil? %>
|
||||
<% menuiteminstance = MenuItemInstance.find_by_item_instance_code(@promotion.original_product) %>
|
||||
<% if menuiteminstance.nil?%>
|
||||
<% code = @promotion.original_product %>
|
||||
<% else %>
|
||||
<% code = menuiteminstance.menu_item.item_code %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<option value="" selected>Choose Something</option>
|
||||
<% arr.each do |a| %>
|
||||
<% if a[1] == code %>
|
||||
<option value="<%= a[1]%>" selected><%= a[0] %></option>
|
||||
<% else %>
|
||||
<option value="<%= a[1]%>"><%= a[0] %></option>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<% sample = [] %>
|
||||
<% if !@promotion.original_product.nil? %>
|
||||
<% if !MenuItemInstance.find_by_item_instance_code(@promotion.original_product).nil? %>
|
||||
<% sample = MenuItemInstance.where("item_instance_code=?",@promotion.original_product).pluck(:item_instance_name,:item_instance_code)%>
|
||||
<% else %>
|
||||
<% sample = Product.where("item_code=?",@promotion.original_product).pluck(:name,:item_code)%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="col-md-3 form-group"><%= f.input :original_product,collection: sample %></div>
|
||||
<!-- <div class="col-md-6"><%= f.input :original_product,collection: MenuItemInstance.order("item_instance_name desc").pluck(:item_instance_name,:item_instance_code),input_html: { selected: 2 } %></div> -->
|
||||
<div class="col-md-6 form-group"><%= f.input :min_qty ,label: "Qualified Qty", :input_html => {:style => 'height: 37px'} %></div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="card">
|
||||
<div class="p-l-25 p-t-10 ">
|
||||
<div class="row">
|
||||
<div class="col-md-2 p-t-10">Item Code</div>
|
||||
<div class="col-md-2 p-t-10">Item Instance</div>
|
||||
<div class="col-md-2 p-t-10">Qualified Qty</div>
|
||||
<div class="col-md-1 p-t-10">Net off</div>
|
||||
<div class="col-md-2 p-t-10">Net Price</div>
|
||||
<div class="col-md-2 p-t-10">Percentage</div>
|
||||
<div class="col-md-1 p-t-10"></div>
|
||||
</div>
|
||||
<div class="row"></div >
|
||||
<%= f.fields_for :promotion_products do |pro| %>
|
||||
<div class="row">
|
||||
<%= pro.hidden_field :item_code,:class => "promo_product" %>
|
||||
<% arr = MenuItem.active.order("name desc").pluck(:name,:item_code) %>
|
||||
<% Product.order("name desc").pluck(:name,:item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-2 menu_item_choose form-group">
|
||||
<select class="form-control item_code_place1">
|
||||
<option value="">Choose Something</option>
|
||||
<% arr.each do |a| %>
|
||||
<option value="<%= a[1 ]%>"><%= a[0] %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <% sample = [] %> -->
|
||||
|
||||
<div class="col-md-2">
|
||||
<%= pro.input :item_code, :class => 'promoproduct', collection:[],input_html: { selected: 2 }, label: false %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<%= pro.input :min_qty , label: false, :input_html => {:style => 'height: 37px'}%>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<%= pro.input :net_off , label: false, :input_html => {:style => 'height: 37px'} %>
|
||||
</div>
|
||||
<div class="col-md-2"><%= pro.input :net_price , label: false, :input_html => {:style => 'height: 37px'} %></div>
|
||||
<div class="col-md-2"><%= pro.input :percentage , label: false, :input_html => {:style => 'height: 37px'} %></div>
|
||||
<div class="col-md-1"><%= pro.link_to_remove "X" ,:class=>"btn-primary btn m-r-45", :style => 'width: 25px'%></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="col-md-12 align-right m-r-10">
|
||||
<%= f.link_to_add "Add Product", :promotion_products, :class => 'btn bg-teal addProduct m-r-20' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.promotion_code") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.promotion_code_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.start_date") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.start_date_txt") %> <br>
|
||||
3) <%= t("views.right_panel.detail.end_date") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.end_date_txt") %> <br>
|
||||
@@ -226,52 +230,52 @@
|
||||
4) <%= t("views.right_panel.detail.net_price") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.net_price_txt") %> <br>
|
||||
5) <%= t("views.right_panel.detail.percentage") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.percentage_txt") %> <br>
|
||||
6) " X " - <%= t("views.right_panel.detail.remove_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.add_product") %> - <%= t("views.right_panel.detail.new_btn_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.promotion_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.promotion_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.promotion_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#promotion_promo_start_hour').on('change', function(event) {
|
||||
$('#promotion_promo_start_hour').val($('#promotion_promo_start_hour').val().split(":")[0]+":00");
|
||||
});
|
||||
$('#promotion_promo_start_hour').on('change', function(event) {
|
||||
$('#promotion_promo_start_hour').val($('#promotion_promo_start_hour').val().split(":")[0]+":00");
|
||||
});
|
||||
|
||||
$('#promotion_promo_end_hour').on('change', function(event) {
|
||||
$('#promotion_promo_end_hour').val($('#promotion_promo_end_hour').val().split(":")[0]+":00");
|
||||
});
|
||||
$('#promotion_promo_end_hour').on('change', function(event) {
|
||||
$('#promotion_promo_end_hour').val($('#promotion_promo_end_hour').val().split(":")[0]+":00");
|
||||
});
|
||||
|
||||
$('.datepicker').bootstrapMaterialDatePicker({
|
||||
$('.datepicker').bootstrapMaterialDatePicker({
|
||||
format: 'dddd DD MM YYYY',
|
||||
clearButton: true,
|
||||
weekStart: 1,
|
||||
time: false
|
||||
});
|
||||
});
|
||||
|
||||
$('.timepicker').bootstrapMaterialDatePicker({
|
||||
$('.timepicker').bootstrapMaterialDatePicker({
|
||||
format: 'HH:mm',
|
||||
clearButton: true,
|
||||
date: false
|
||||
});
|
||||
});
|
||||
|
||||
var dayy = $("#promotion_promo_day").val().replace("[","").replace("]","");
|
||||
jQuery.each( dayy.split(","), function( i, d ) {
|
||||
$("input.selectDay[value='"+d+"']").prop( "checked", true );
|
||||
});
|
||||
var dayy = $("#promotion_promo_day").val().replace("[","").replace("]","");
|
||||
jQuery.each( dayy.split(","), function( i, d ) {
|
||||
$("input.selectDay[value='"+d+"']").prop( "checked", true );
|
||||
});
|
||||
|
||||
/*var form = document.getElementById("new_promotion");
|
||||
var inputs = $("input");
|
||||
@@ -280,21 +284,21 @@ $(document).ready(function(){
|
||||
var day = "[";*/
|
||||
|
||||
|
||||
$(".selectDay").click(function() {
|
||||
$(".selectDay").click(function() {
|
||||
// debugger;
|
||||
var item_row = $('.selectDay');
|
||||
console.log(item_row);
|
||||
check = $(item_row).prop("checked");
|
||||
var attribute_arr = [];
|
||||
$(item_row).each(function(i){
|
||||
if ($(item_row[i]).prop("checked")) {
|
||||
value = $(item_row[i]).val();
|
||||
str = value;
|
||||
attribute_arr.push(str);
|
||||
}
|
||||
});
|
||||
var item_row = $('.selectDay');
|
||||
console.log(item_row);
|
||||
check = $(item_row).prop("checked");
|
||||
var attribute_arr = [];
|
||||
$(item_row).each(function(i){
|
||||
if ($(item_row[i]).prop("checked")) {
|
||||
value = $(item_row[i]).val();
|
||||
str = value;
|
||||
attribute_arr.push(str);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
/*day = "[";
|
||||
for (var j = 8; j <=15; j += 1){
|
||||
if (inputs[j].type === "checkbox" && inputs[j].checked)
|
||||
@@ -310,11 +314,11 @@ $(".selectDay").click(function() {
|
||||
{
|
||||
day = day + "]";
|
||||
}
|
||||
}*/
|
||||
|
||||
document.getElementById("promotion_promo_day").value = '';
|
||||
document.getElementById("promotion_promo_day").value = "["+attribute_arr+"]";
|
||||
});
|
||||
}*/
|
||||
|
||||
document.getElementById("promotion_promo_day").value = '';
|
||||
document.getElementById("promotion_promo_day").value = "["+attribute_arr+"]";
|
||||
});
|
||||
|
||||
// $("#promotion_original_product").select2();
|
||||
// $(".item_code_place").select2();
|
||||
@@ -323,19 +327,19 @@ $(".selectDay").click(function() {
|
||||
var ajax_url = "<%= settings_find_item_instance_path %>";
|
||||
var item_code = this.value;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: 'item_code=' + item_code,
|
||||
success: function (result) {
|
||||
$("#promotion_original_product").empty();
|
||||
var itemlist;
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
itemlist += "<option value ="+result[i][1]+">"+result[i][0]+"</option>"
|
||||
}
|
||||
$("#promotion_original_product").append(itemlist);
|
||||
//$("#promotion_original_product").select2();
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: 'item_code=' + item_code,
|
||||
success: function (result) {
|
||||
$("#promotion_original_product").empty();
|
||||
var itemlist;
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
itemlist += "<option value ="+result[i][1]+">"+result[i][0]+"</option>"
|
||||
}
|
||||
});
|
||||
$("#promotion_original_product").append(itemlist);
|
||||
//$("#promotion_original_product").select2();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//$(".promotion_promotion_products_item_code select").select2();
|
||||
@@ -346,29 +350,29 @@ $(".selectDay").click(function() {
|
||||
$(".addProduct").on('click', function(event) {
|
||||
setTimeout(function(){
|
||||
// $(".promotion_promotion_products_item_code select").select2();
|
||||
callforpromoproduct();
|
||||
}, 0);
|
||||
callforpromoproduct();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
// for promotion products data showing
|
||||
var promopdt = $(".promo_product");
|
||||
jQuery.each( promopdt, function( i, ppdt ) {
|
||||
var ajax_url = "<%= settings_find_parent_item_path %>";
|
||||
var item_code = ppdt.value;
|
||||
var select_id = ppdt.id;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: 'item_instance_code=' + item_code,
|
||||
success: function (result) {
|
||||
if(result.length > 0){
|
||||
$("select#"+select_id).empty();
|
||||
$("select#"+select_id).append("<option value='"+item_code+"'>"+result[0]+"</option>");
|
||||
$("select#"+select_id).parent().parent().siblings("div.menu_item_choose").find("select").find("option[value='"+result[1]+"']").attr("selected","true")
|
||||
var ajax_url = "<%= settings_find_parent_item_path %>";
|
||||
var item_code = ppdt.value;
|
||||
var select_id = ppdt.id;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: 'item_instance_code=' + item_code,
|
||||
success: function (result) {
|
||||
if(result.length > 0){
|
||||
$("select#"+select_id).empty();
|
||||
$("select#"+select_id).append("<option value='"+item_code+"'>"+result[0]+"</option>");
|
||||
$("select#"+select_id).parent().parent().siblings("div.menu_item_choose").find("select").find("option[value='"+result[1]+"']").attr("selected","true")
|
||||
// $("select#"+select_id).parent().parent().siblings("div.menu_item_choose").find("select").select2();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// promotion_promotion_products_attributes_0_item_code
|
||||
@@ -379,19 +383,19 @@ $(".selectDay").click(function() {
|
||||
var ajax_url = "<%= settings_find_item_instance_path %>";
|
||||
var item_code = this.value;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: 'item_code=' + item_code,
|
||||
success: function (result) {
|
||||
$("select#"+id).empty();
|
||||
var itemlist;
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
itemlist += "<option value ="+result[i][1]+">"+result[i][0]+"</option>"
|
||||
}
|
||||
$("select#"+id).append(itemlist);
|
||||
//$("select#"+id).select2();
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: 'item_code=' + item_code,
|
||||
success: function (result) {
|
||||
$("select#"+id).empty();
|
||||
var itemlist;
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
itemlist += "<option value ="+result[i][1]+">"+result[i][0]+"</option>"
|
||||
}
|
||||
});
|
||||
$("select#"+id).append(itemlist);
|
||||
//$("select#"+id).select2();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,57 +1,61 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@zone,@settings_room]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@zone,@settings_room]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :status %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.input :is_active %>
|
||||
<% if @settings_room.dining_charges.length == 0 %>
|
||||
<% if @settings_room.id != nil %>
|
||||
<div class="">
|
||||
<div class="">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_room_dining_charge_path(@zone,@settings_room),:class => 'btn bg-deep-purple' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @settings_room.dining_charges.each do |dc| %>
|
||||
|
||||
<div class="card">
|
||||
<div class="col-md-">
|
||||
<table class="table">
|
||||
<tr><td colspan="2">
|
||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-right">Item code :</td>
|
||||
<td class="align-left"><%= dc.item_code %></td>
|
||||
<td class="align-right">Unit price : </td>
|
||||
<td class="align-left"><%= dc.unit_price %></td>
|
||||
<td class="align-right">Charge type : </td>
|
||||
<td class="align-left"><%= dc.charge_type %></td>
|
||||
<td>
|
||||
<%= link_to 'Edit Charges', edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc),:class => 'btn bg-deep-purple' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc) %>">Edit Charge</button> -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :status %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.input :is_active %>
|
||||
<% if @settings_room.dining_charges.length == 0 %>
|
||||
<% if @settings_room.id != nil %>
|
||||
<div class="">
|
||||
<div class="">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_room_dining_charge_path(@zone,@settings_room),:class => 'btn bg-deep-purple' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @settings_room.dining_charges.each do |dc| %>
|
||||
|
||||
<div class="card">
|
||||
<div class="col-md-">
|
||||
<table class="table">
|
||||
<tr><td colspan="2">
|
||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-right">Item code :</td>
|
||||
<td class="align-left"><%= dc.item_code %></td>
|
||||
<td class="align-right">Unit price : </td>
|
||||
<td class="align-left"><%= dc.unit_price %></td>
|
||||
<td class="align-right">Charge type : </td>
|
||||
<td class="align-left"><%= dc.charge_type %></td>
|
||||
<td>
|
||||
<%= link_to 'Edit Charges', edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc),:class => 'btn bg-deep-purple' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc) %>">Edit Charge</button> -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="p-l-20">
|
||||
<div class="col-md-6 panel">
|
||||
<div class="form- p-l-20">
|
||||
<%= f.input :item_code,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :name,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :alt_name,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :type,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :type, :collection => ["SimpleMenuItem","SetMenuItem"], :input_html => {:class => "col-md-9"},:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :min_qty,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %>
|
||||
|
||||
@@ -28,32 +29,30 @@
|
||||
|
||||
<%= f.input :item_options, :collection => @item_options, :input_html => { :multiple => true,:class => "form-control item_options col-md-9" } %>
|
||||
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<p>Menu Item Image</p>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<p>Menu Item Image</p>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "col-md-4 img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="form-group col-md-10">
|
||||
<%= f.file_field :image_path, :class => "col-md-4 img-thumbnail" %>
|
||||
</div>
|
||||
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true }, :class => "form-control item_sets" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true, :class => "form-control item_sets col-md-9"} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 align-right m-l-100 m-t-20 m-b-20">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect', :style => "width: 200px" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<li class="breadcrumb-item"><a href="<%= settings_menu_category_set_menu_items_path(@category) %>"><%= t("en.set_menu_item") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', settings_menu_category_set_menu_items_path(@category) %>
|
||||
<%= link_to 'Back', settings_menu_category_path(@category) %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<li class="breadcrumb-item"><a href="<%= settings_menu_category_set_menu_items_path(@category) %>"><%= t("en.set_menu_item") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', settings_menu_category_set_menu_items_path(@category) %>
|
||||
<%= link_to 'Back', settings_menu_category_path(@category) %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<li class="breadcrumb-item"><a href="<%= settings_menu_category_set_menu_items_path(@category) %>">Menu Category</a></li>
|
||||
<li class="breadcrumb-item active">Details</li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', settings_menu_category_set_menu_items_path(@category) %>
|
||||
<%= link_to 'Back', settings_menu_category_path(@category) %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -119,7 +119,50 @@
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
|
||||
<h5><%= t("views.right_panel.header.menu_item") %></h5>
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.item_code") %> - <%= t("views.right_panel.detail.code_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.menu_item_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.type") %> - <%= t("views.right_panel.detail.type_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.account") %> - <%= t("views.right_panel.detail.account_type_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
|
||||
5) <%= t("views.right_panel.detail.created_at") %> - <%= t("views.right_panel.detail.created_at_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
|
||||
6) <%= t("views.right_panel.detail.actions") %> - <%= t("views.right_panel.detail.actions_txt2") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.edit") %> - <%= t("views.right_panel.detail.edit_btn_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.delete") %> - <%= t("views.right_panel.detail.delete_btn_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
|
||||
</p>
|
||||
|
||||
<h5><%= t("views.right_panel.header.menu_item_instances") %></h5>
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.instance_code") %> - <%= t("views.right_panel.detail.code_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.instance_name") %> - <%= t("views.right_panel.detail.name_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
|
||||
3) <%= t("views.right_panel.detail.item_attributes") %> - <%= t("views.right_panel.detail.item_attributes_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %><br>
|
||||
4) <%= t("views.right_panel.detail.price") %> - <%= t("views.right_panel.detail.price_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.promotion") %> - <%= t("views.right_panel.detail.promotion_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
|
||||
5) <%= t("views.right_panel.detail.actions") %> - <%= t("views.right_panel.detail.actions_txt") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.new") %> - <%= t("views.right_panel.detail.new_btn_txt") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.show") %> - <%= t("views.right_panel.detail.show_btn_txt") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
|
||||
3) <%= t("views.right_panel.button.edit") %> - <%= t("views.right_panel.detail.edit_btn_txt") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
|
||||
</p>
|
||||
-----------------------------------------------------------------
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
3) <%= t("en.accounts") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.accounts_txt") %><br>
|
||||
4) <%= t("views.right_panel.button.menu") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.menu_txt") %><br>
|
||||
5) <%= t("views.right_panel.button.menu_categories") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.menu_categories_txt") %><br>
|
||||
6) <%= t("views.right_panel.button.item_set") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.item_set_txt") %> <br>
|
||||
7) <%= t("views.right_panel.button.item_attributes") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.item_attributes_txt") %> <br>
|
||||
8) <%= t("views.right_panel.button.item_options") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.item_options_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,15 +3,14 @@
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="row">
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-6 panel">
|
||||
<div class="form- p-l-20">
|
||||
<%= f.input :item_code,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :name,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :alt_name,:input_html => {:class => "col-md-9"} %>
|
||||
<div style="display: none;">
|
||||
<%= f.input :type,:input_html => {:class => "col-md-9"} %>
|
||||
</div>
|
||||
<%= f.input :type, :collection => ["SimpleMenuItem","SetMenuItem"], :input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :min_qty,:input_html => {:class => "col-md-9"} %>
|
||||
<%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %>
|
||||
|
||||
@@ -24,28 +23,32 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<%= f.input :item_attributes, :collection => @item_attributes, :input_html => { :multiple => true,:class => "col-md-9 item_attributes" } %>
|
||||
<%= f.input :item_attributes, :collection => @item_attributes, :input_html => { :multiple => true,:class => "form-control item_attributes col-md-9" } %>
|
||||
|
||||
<%= f.input :item_options, :collection => @item_options, :input_html => { :multiple => true,:class => "col-md-9" } %>
|
||||
<%= f.input :item_options, :collection => @item_options, :input_html => { :multiple => true,:class => "form-control item_options col-md-9" } %>
|
||||
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url,:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
<% else %>
|
||||
<p>Menu Item Image</p>
|
||||
<%= image_tag "/image/menu_images/default.png",:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path,:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true,:class => "form-control item_sets col-md-9" } %>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url,:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
<% else %>
|
||||
<p>Menu Item Image</p>
|
||||
<%= image_tag "/image/menu_images/default.png",:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="form-group col-md-10">
|
||||
<%= f.file_field :image_path,:input_html => { :class => "col-md-4 img-thumbnail" } %>
|
||||
</div>
|
||||
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true,:class => "form-control item_sets col-md-9" } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 align-right m-l-100 m-t-20 m-b-20">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect', :style => "width: 200px" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<li class="breadcrumb-item"><a href="<%= settings_menu_category_simple_menu_items_path(@category) %>"><%= t("en.simple_menu_item") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', settings_menu_category_simple_menu_items_path(@category) %>
|
||||
<%= link_to 'Back', settings_menu_category_path(@category) %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<li>Menu Items</li>
|
||||
<span style="float: right">
|
||||
<%= link_to t("views.btn.new"),new_settings_menu_category_simple_menu_item_path(@category),:class => 'btn btn-primary btn-sm' %>
|
||||
<%= link_to t("views.btn.new"),settings_menu_category_path(@category),:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div> -->
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= settings_menu_category_simple_menu_items_path(@category) %>"><%= t("en.simple_menu_item") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= settings_menu_category_path(@category) %>"><%= t("en.simple_menu_item") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', settings_menu_category_simple_menu_items_path(@category) %>
|
||||
<%= link_to 'Back', settings_menu_category_path(@category) %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= settings_menu_category_simple_menu_items_path(@category) %>"><%= t("views.right_panel.header.menu_item") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= settings_menu_category_path(@category) %>"><%= t("views.right_panel.header.menu_item") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', settings_menu_category_simple_menu_items_path(@category) %>
|
||||
<%= link_to 'Back', settings_menu_category_path(@category) %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -1,50 +1,63 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<%= simple_form_for([:settings,@zone,@settings_table]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@zone,@settings_table]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :status %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.input :is_active %>
|
||||
<% if @settings_table.dining_charges.length == 0 %>
|
||||
<% if @settings_table.id != nil %>
|
||||
<div class="col-md-">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_table_dining_charge_path(@zone,@settings_table),:class => 'btn bg-deep-purple' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @settings_table.dining_charges.each do |dc| %>
|
||||
<div class="card">
|
||||
<div class="">
|
||||
<table class="table">
|
||||
<tr><td colspan="2">
|
||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-right">Item code :</td>
|
||||
<td class="align-left"><%= dc.item_code %></td>
|
||||
<td class="align-right">Unit price : </td>
|
||||
<td class="align-left"><%= dc.unit_price %></td>
|
||||
<td class="align-right">Charge type : </td>
|
||||
<td class="align-left"><%= dc.charge_type %></td>
|
||||
<td><%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn bg-deep-purple' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> --></td>
|
||||
</tr>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :status %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :order_by %>
|
||||
<%= f.input :is_active %>
|
||||
<% if @settings_table.dining_charges.length == 0 %>
|
||||
<% if @settings_table.id != nil %>
|
||||
<div class="col-md-">
|
||||
<%= link_to 'Add For Extra Charges', new_settings_zone_table_dining_charge_path(@zone,@settings_table),:class => 'btn bg-deep-purple' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @settings_table.dining_charges.each do |dc| %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<span class="card-title"><b><u>Dining Charge</u></b></span>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th>Item Code</th>
|
||||
<th>Unit Price</th>
|
||||
<th>Charge Type</th>
|
||||
<th>Free Time</th>
|
||||
<th>Charges Block</th>
|
||||
<th>Time Rounding</th>
|
||||
<th>Actions</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= dc.item_code %></td>
|
||||
<td><%= dc.unit_price %></td>
|
||||
<td><%= dc.charge_type %></td>
|
||||
<td><%= (dc.minimum_free_time).utc.strftime("%H:%M") %></td>
|
||||
<td><%= (dc.charge_block).utc.strftime("%H:%M") %></td>
|
||||
<td><%= dc.time_rounding %></td>
|
||||
<td><%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn bg-deep-purple' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
|
||||
@@ -61,23 +61,33 @@
|
||||
</table>
|
||||
<% @table.dining_charges.each do |dc| %>
|
||||
<div class="card">
|
||||
<h4 class="card-title">Dining Charge</h4>
|
||||
<div class="">
|
||||
<div class="body">
|
||||
<h4 class="card-title">Dining Charge</h4>
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<td class="align-right">Item code :</td>
|
||||
<td class="align-left"><%= dc.item_code %></td>
|
||||
<td class="align-right">Unit price : </td>
|
||||
<td class="align-left"><%= dc.unit_price %></td>
|
||||
<td class="align-right">Charge type : </td>
|
||||
<td class="align-left"><%= dc.charge_type %></td>
|
||||
<td><%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn bg-deep-purple' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> --></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<thead>
|
||||
<th>Item Code</th>
|
||||
<th>Unit Price</th>
|
||||
<th>Charge Type</th>
|
||||
<th>Free Time</th>
|
||||
<th>Charges Block</th>
|
||||
<th>Time Rounding</th>
|
||||
<th>Actions</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= dc.item_code %></td>
|
||||
<td><%= dc.unit_price %></td>
|
||||
<td><%= dc.charge_type %></td>
|
||||
<td><%= (dc.minimum_free_time).utc.strftime("%H:%M") %></td>
|
||||
<td><%= (dc.charge_block).utc.strftime("%H:%M") %></td>
|
||||
<td><%= dc.time_rounding %></td>
|
||||
<td><%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn bg-deep-purple' %>
|
||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -2,20 +2,24 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_form_for([:settings, @settings_tax_profile ]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings, @settings_tax_profile ]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :rate %>
|
||||
<%= f.input :inclusive %>
|
||||
<%= f.input :order_by %>
|
||||
</div>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :rate %>
|
||||
<%= f.input :inclusive %>
|
||||
<%= f.input :order_by %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
|
||||
<%= simple_form_for([:settings,@settings_zone]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings,@settings_zone]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :is_active %>
|
||||
<!-- <%= f.input :created_by, :collection => Employee.collection %> -->
|
||||
</div>
|
||||
<div class="form-inputs p-l-15">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :is_active %>
|
||||
<!-- <%= f.input :created_by, :collection => Employee.collection %> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="form-group p-l-15">
|
||||
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
|
||||
<div class="card">
|
||||
|
||||
Reference in New Issue
Block a user