Merge branch 'foodcourt' of gitlab.com:code2lab/SXRestaurant into foodcourt
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
if @result
|
||||
if @result
|
||||
json.status true
|
||||
json.sent_pin true
|
||||
elsif @cus
|
||||
json.status true
|
||||
json.customer_id @cus.id
|
||||
elsif @cus
|
||||
json.status true
|
||||
json.sent_pin false
|
||||
json.customer_id @cus.id
|
||||
else
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="480">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||
<table class="table table-striped summary-items" id="order-items-table" >
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -41,21 +41,21 @@ if (menu.menu_categories)
|
||||
attr_format = []
|
||||
# Format for attributes json
|
||||
if item.item_attributes.count > 0
|
||||
item_attributes = @item_attributes.select{ |x| item.item_attributes.include?(x.id.to_s) }
|
||||
attr_format = item_attributes.group_by {|att| att.attribute_type }.map { |type, values| {type: type, values: values.map(&:name)} }
|
||||
item_attributes = item.item_attributes.map(&:to_s)
|
||||
attr_format = @item_attributes.select { |x| item_attributes.include?(x.id.to_s) }.group_by {|att| att.attribute_type.strip }.map { |type, values| {type: type, values: values.map { |x| x.name.strip } } }
|
||||
end
|
||||
|
||||
# Format for option json
|
||||
opt_format = []
|
||||
# Format for attributes json
|
||||
if item.item_options.count > 0
|
||||
item_options = @item_options.select{ |x| item.item_options.include?(x.id.to_s) }
|
||||
opt_format = item_options.group_by {|opt| opt.option_type }.map { |type, values| {type: type, values: values.map(&:name)} }
|
||||
item_options = item.item_options.map(&:to_s)
|
||||
opt_format = @item_options.select { |x| item_options.include?(x.id.to_s) }.group_by {|opt| opt.option_type.strip }.map { |type, values| {type: type, values: values.map { |x| x.name.strip } } }
|
||||
end
|
||||
|
||||
#Menu Item Information
|
||||
json.id item.id
|
||||
json.code item.item_code
|
||||
json.code item.item_code
|
||||
json.name item.name
|
||||
json.alt_name item.alt_name
|
||||
json.image item.image_path.url
|
||||
@@ -69,15 +69,14 @@ if (menu.menu_categories)
|
||||
json.unit item.unit
|
||||
|
||||
# Item Sets of Menu Item
|
||||
json.item_sets item.item_sets.map { |its|
|
||||
{ id: its.id,
|
||||
name: its.name,
|
||||
alt_name: its.alt_name,
|
||||
min_selectable_qty: its.min_selectable_qty,
|
||||
max_selectable_qty: its.max_selectable_qty,
|
||||
instances: its.menu_item_instances.map { |i| {id: i.id} }
|
||||
}
|
||||
}
|
||||
json.item_sets item.item_sets do |its|
|
||||
json.id its.id
|
||||
json.name its.name
|
||||
json.alt_name its.alt_name
|
||||
json.min_selectable_qty its.min_selectable_qty
|
||||
json.max_selectable_qty its.max_selectable_qty
|
||||
json.instances its.menu_item_instances.map { |i| {id: i.id} }
|
||||
end
|
||||
|
||||
json.attributes attr_format
|
||||
json.options opt_format
|
||||
@@ -85,7 +84,8 @@ if (menu.menu_categories)
|
||||
json.instances item.menu_item_instances do |is|
|
||||
if is.is_available
|
||||
# Convert id to name for attributes
|
||||
instance_attr = @item_attributes.select{ |x| item.item_attributes.include?(x.id) }.pluck(:name)
|
||||
item_attributes = is.item_attributes.map(&:to_s)
|
||||
instance_attr = @item_attributes.select{ |x| item_attributes.include?(x.id.to_s) }.pluck(:name)
|
||||
|
||||
json.id is.id
|
||||
json.code is.item_instance_code
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="230">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="335">
|
||||
<table class="table table-striped summary-items">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</button>
|
||||
|
||||
<div class="card-block">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="420">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||
<table class="table table-striped summary-items" id="order-items-table" >
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</button>
|
||||
<br>
|
||||
<div class="card-block">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="420">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||
<table class="table table-striped summary-items" id="order-items-table" >
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="420">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||
<table class="table table-striped summary-items" id="order-items-table" >
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 270 : 415%>">
|
||||
<div id="order-detail-slimscroll" data-height="<%= @status_sale=="sale" ? 300 : 160%>">
|
||||
<div class="card-text" >
|
||||
<table class="table table-striped" id="order-items-table">
|
||||
<thead>
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="order-detail-slimscroll" data-height="430">
|
||||
<div id="order-detail-slimscroll" data-height="140">
|
||||
<div class="card-text" style="">
|
||||
<table class="table table-striped" id="order-items-table">
|
||||
<thead>
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
<%= f.input :group_type, :collection => Lookup.collection_of("tax_profiles"),:input_html=>{:class=>"col-md-10"},:required=>true %>
|
||||
<%= f.input :name, :input_html=>{:onchange=>"checkDuplicate(this.value);"} %>
|
||||
<span id="tax_profile_nameErr" style="color:red;"></span>
|
||||
<%= f.input :tax_type,input_html: { :class => 'form-control select' },
|
||||
collection: %w{Net Percentage},:label => "Tax Type" %>
|
||||
<%= f.input :rate %>
|
||||
<%= f.input :inclusive %>
|
||||
<%= f.input :order_by %>
|
||||
@@ -44,7 +46,7 @@
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.tax_profiles_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -69,4 +71,3 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user