Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-11-22 18:39:56 +06:30
43 changed files with 1321 additions and 1166 deletions

View File

@@ -6,7 +6,8 @@ class MenuCategory < ApplicationRecord
belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true
has_many :menu_items 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') } default_scope { order('order_by asc') }
scope :active, -> {where("is_available = 1")} scope :active, -> {where("is_available = 1")}

View File

@@ -13,7 +13,8 @@ class MenuItem < ApplicationRecord
has_many :menu_item_sets has_many :menu_item_sets
has_many :item_sets, through: :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') } default_scope { order('item_code asc') }

View File

@@ -4,6 +4,8 @@ class MenuItemInstance < ApplicationRecord
has_many :menu_instance_item_sets has_many :menu_instance_item_sets
has_many :item_sets, through: :menu_instance_item_sets has_many :item_sets, through: :menu_instance_item_sets
# before_create :generate_menu_item_instance_code # before_create :generate_menu_item_instance_code
validates_presence_of :item_instance_code
# validates_uniqueness_of :item_instance_code
def self.findParentCategory(item) def self.findParentCategory(item)
if item.menu_category_id if item.menu_category_id

View File

@@ -955,7 +955,7 @@ end
# .joins("join sale_payments on sale_id = sales.sale_id") # .joins("join sale_payments on sale_id = sales.sale_id")
# .group("sales.sale_id") # .group("sales.sale_id")
query = Sale.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and sp.payment_method = "mpu" or sp.payment_method = "visa" or sp.payment_method = "master" or sp.payment_method = "jcb"',today) query = Sale.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and (sp.payment_method = "mpu" or sp.payment_method = "visa" or sp.payment_method = "master" or sp.payment_method = "jcb")',today)
.joins("JOIN sale_payments sp ON sp.sale_id = sales.sale_id") .joins("JOIN sale_payments sp ON sp.sale_id = sales.sale_id")
.sum("sp.payment_amount") .sum("sp.payment_amount")

View File

@@ -1,9 +1,9 @@
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %> <%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
<span class="patch_method"></span> <span class="patch_method"></span>
<%= f.hidden_field :id, :class => "form-control " %> <%= f.hidden_field :id, :class => "form-control " %>
<div class="form-group"> <div class="form-group">
<label> <%= t("views.right_panel.detail.salutation") %> :</label><br> <label> <%= t("views.right_panel.detail.salutation") %> :</label><br>
<label class="font-13"><%= t("views.right_panel.detail.mr") %> <label class="font-13"><%= t("views.right_panel.detail.mr") %>
<%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr", :style=>"width: 30px"%> <%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr", :style=>"width: 30px"%>
@@ -18,9 +18,9 @@
<%= t("views.right_panel.detail.mdm") %> <%= t("views.right_panel.detail.mdm") %>
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%> <%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%>
</label> </label>
</div> </div>
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %> <%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
<% flash.each do |test, msg| %> <% flash.each do |test, msg| %>
<% <%
@@ -29,21 +29,21 @@
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
<% end -%> <% end -%>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.gender") %> :</label><br> <label><%= t("views.right_panel.detail.gender") %> :</label><br>
<label><%= t("views.right_panel.detail.male") %></label> <label><%= t("views.right_panel.detail.male") %>
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%> <%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%></label>
<label><%= t("views.right_panel.detail.female") %></label> <label><%= t("views.right_panel.detail.female") %>
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%> <%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%></label>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %> <%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.input :company, :class => "form-control col-md-6 company"%> <%= f.input :company, :class => "form-control col-md-6 company"%>
<% flash.each do |name, msg| %> <% flash.each do |name, msg| %>
@@ -52,8 +52,8 @@
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
<% end -%> <% end -%>
</div> </div>
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%> <%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
<% flash.each do |name, msg| %> <% flash.each do |name, msg| %>
@@ -62,9 +62,9 @@
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
<% end %> <% end %>
</div> </div>
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%> <%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
<% flash.each do |name, msg| %> <% flash.each do |name, msg| %>
@@ -73,26 +73,25 @@
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
<% end %> <% end %>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.input :address, :class => "form-control col-md-6 address" %> <%= f.input :address, :class => "form-control col-md-6 address" %>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.sr_no") %></label> <label><%= t("views.right_panel.detail.sr_no") %></label>
<div class="form-line disabled"> <div class="form-line disabled">
<input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" > <input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" >
</div> </div>
</div>
</div> <div class="form-group">
<div class="form-group">
<label><%= t("views.right_panel.detail.date_of_birth") %></label> <label><%= t("views.right_panel.detail.date_of_birth") %></label>
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%> <%= f.text_field :date_of_birth, :value=>"01-01-1990",:class=>"datepicker form-control col-md-12"%>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.select_customer_type") %></label> <label><%= t("views.right_panel.detail.select_customer_type") %></label>
<select class="form-control col-md-12 selectpicker show-tick" id="customer_type" name="customer[customer_type]" style="height: " > <select class="form-control col-md-12 selectpicker show-tick" id="customer_type" name="customer[customer_type]" style="height: " >
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %> <% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
@@ -100,13 +99,13 @@
<%= ct.name %></option> <%= ct.name %></option>
<%end %> <%end %>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %> <%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
</div> </div>
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>"> <div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%> <%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
<% flash.each do |name, msg| %> <% flash.each do |name, msg| %>
<% str="[\"#{msg['card_no']}\"]" <% str="[\"#{msg['card_no']}\"]"
@@ -114,17 +113,17 @@
str.gsub!('"]', '') %> str.gsub!('"]', '') %>
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable> <lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
<% end %> <% end %>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.paypar_account_no") %>:</label> <label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
<div class="-group"> <div class="-group">
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/> <input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/>
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div> <div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label><%= t("views.right_panel.detail.select_membership_group") %></label> <label><%= t("views.right_panel.detail.select_membership_group") %></label>
<select class="form-control col-md-12 selectpicker show-tick" name="member_group_id" style="height: " > <select class="form-control col-md-12 selectpicker show-tick" name="member_group_id" style="height: " >
<option value=""><%= t("views.right_panel.detail.select_membership_group") %></option> <option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
@@ -134,16 +133,16 @@
<%end %> <%end %>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<!-- <%= f.submit "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %> <!-- <%= f.submit "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
<%= f.submit "Update",:class => 'btn btn-info ', :disabled =>'', :id => 'update_customer' %> --> <%= f.submit "Update",:class => 'btn btn-info ', :disabled =>'', :id => 'update_customer' %> -->
<button type="submit" class="btn btn-primary" id="submit_customer"><%= t("views.btn.submit") %></button> <button type="submit" class="btn btn-primary" id="submit_customer"><%= t("views.btn.submit") %></button>
<button type="submit" class="btn btn-info" disabled id="update_customer"><%= t("views.btn.update") %></button> <button type="submit" class="btn btn-info" disabled id="update_customer"><%= t("views.btn.update") %></button>
<button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button> <button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
</div> </div>
<%end%> <%end%>
<div id="sxModal"> <div id="sxModal">
@@ -166,7 +165,7 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
// Read Card Reader // Read Card Reader
$("#paypar_account_no").on('focus', function(e){ $("#paypar_account_no").on('focus', function(e){
if($(this).val() == ''){ if($(this).val() == ''){
$("#sxModal").show(); $("#sxModal").show();

View File

@@ -12,6 +12,8 @@
<div class="row clearfix"> <div class="row clearfix">
<div class="col-lg-9 col-md-9 col-sm-9"> <div class="col-lg-9 col-md-9 col-sm-9">
<div class="card">
<div class="body">
<!-- <div class="main-box-body clearfix"> --> <!-- <div class="main-box-body clearfix"> -->
<div class="body table-responsive"> <div class="body table-responsive">
<table class="table table-hover table-striped"> <table class="table table-hover table-striped">
@@ -83,10 +85,19 @@
</div> </div>
<!-- </div> --> <!-- </div> -->
</div> </div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3">
<div id="custom-slimscroll"> <div class="row">
<div class="col-md-12">
<div class="card">
<div class="body" id="custom-slimscroll">
<%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %> <%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %>
</div> </div>
</div>
</div>
</div>
<!-- <div class="col-lg-1 col-md-1 col-sm-1 "> <!-- <div class="col-lg-1 col-md-1 col-sm-1 ">
<br> <br>
<a href="<%= dashboard_path%>" class="btn btn-primary"> <a href="<%= dashboard_path%>" class="btn btn-primary">

View File

@@ -1,4 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="card">
<div class="row p-l-20">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<%= simple_form_for([:crm,@dining_queue]) do |f| %> <%= simple_form_for([:crm,@dining_queue]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -19,7 +22,6 @@
<!-- </div> --> <!-- </div> -->
<% end %> <% end %>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5"> <div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
@@ -77,6 +79,9 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3"> <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card"> <div class="card">
@@ -106,7 +111,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
if($('form').attr('id') == "new_dining_queue"){ if($('form').attr('id') == "new_dining_queue"){
var queue_no = $('.generate_no').text(); var queue_no = $('.generate_no').text();
@@ -176,5 +181,5 @@ $(document).ready(function(){
.append( "<a>" + item.name + "</a>" ) .append( "<a>" + item.name + "</a>" )
.appendTo( ul ); .appendTo( ul );
}; };
}); });
</script> </script>

View File

@@ -132,7 +132,7 @@
<td align="right"><%= @summ_sale.total_discount %></td> <td align="right"><%= @summ_sale.total_discount %></td>
</tr> </tr>
<tr> <tr>
<td>Tax (Services+Commercial) : </td> <td>Total Tax : </td>
<td align="right"><%= @summ_sale.total_tax %></td> <td align="right"><%= @summ_sale.total_tax %></td>
</tr> </tr>
<tr> <tr>

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<div class="p-l-10"> <div class="p-l-10">
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %> <%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -53,10 +55,12 @@
<%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %> <%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %>
</div> </div>
<% end %> <% end %>
</div> </div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> </div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i> </h5> <h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i> </h5>
@@ -77,8 +81,8 @@
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= 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.home_txt") %> <br>
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -112,4 +116,4 @@
}); });
</script> </script>

View File

@@ -3,7 +3,7 @@
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li> <li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.stock_check") %></li> <li class="breadcrumb-item active"><%= t("views.right_panel.detail.stock_check") %></li>
<span class="float-right"> <span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %> <%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -4,7 +4,7 @@
<li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a><%= t("views.right_panel.detail.stock_check") %></li> <li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a><%= t("views.right_panel.detail.stock_check") %></li>
<li class="breadcrumb-item active"><%= t :details %></li> <li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right"> <span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %> <%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -22,7 +22,7 @@
</div> </div>
<!-- Start Delete confirrm text !--> <!-- Start Delete confirrm text !-->
<div class="navbar-right"> <div class="navbar-right">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <a href="javascript:void(0);" class="dropdown-toggle waves-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<% if current_login_employee %> <% if current_login_employee %>
<span><%= current_login_employee.name %></span> <span><%= current_login_employee.name %></span>
<% end %> <% end %>
@@ -30,7 +30,9 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li> <li>
<%if current_login_employee.role !="waiter" %> <%if current_login_employee.role !="waiter" %>
<p class="delete waves-effect waves-block" style="padding:0.5rem 1rem; margin-bottom: 0rem;" data-ref="<%=logout_path%>" data-method="delete">Logout</p> <a class="delete waves-effect waves-block" style="padding:0.5rem 1rem; margin-bottom: 0rem;" data-ref="<%=logout_path%>" data-method="delete">
<i class="material-icons m-t-10">exit_to_app</i> Logout
</a>
<span class="hidden" id="delete_text"> <span class="hidden" id="delete_text">
<h6>Are you sure you want to Logout ?</h6> <h6>Are you sure you want to Logout ?</h6>
<!-- <h6>This action can't be undo. </h6> --> <!-- <h6>This action can't be undo. </h6> -->

View File

@@ -1,6 +1,8 @@
<div class="row"> <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-9 col-lg-9">
<div class="card">
<div class="body">
<%= simple_form_for(@print_setting) do |f| %> <%= simple_form_for(@print_setting) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -24,6 +26,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3"> <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -3,7 +3,7 @@
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Stock Check Report</li> <li class="breadcrumb-item active">Stock Check Report</li>
<span class="float-right"> <span class="float-right">
<%= link_to 'Back', dashboard_path %> <%= link_to 'Back', inventory_path %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@settings_account]) do |f| %> <%= simple_form_for([:settings,@settings_account]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs p-l-10"> <div class="form-inputs p-l-10">
@@ -14,6 +16,8 @@
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %> <%= simple_form_for([:settings, @settings_cashier_terminal]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -23,6 +25,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,10 +1,9 @@
<div class="row"> <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-9 col-lg-9">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6"> <div class="card">
<div class="body">
<%= simple_form_for([:settings, @commissioner]) do |f| %> <%= simple_form_for([:settings, @commissioner]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs">
<%= f.input :name %> <%= f.input :name %>
<%= f.label :emp_id, 'Employee' %> <%= f.label :emp_id, 'Employee' %>
@@ -15,7 +14,6 @@
<%= f.label :commission_id, 'Commission'%> <%= 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'} %> <%= f.select :commission_id, Commission.all.map {|l| [l.name, l.id]}, { :include_blank => 'Choose Commission Product', :selected => ''}, {class: 'form-control'} %>
<br/> <br/>
<%= f.label :joined_date %><br/> <%= f.label :joined_date %><br/>
<%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/> <%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/>
@@ -30,6 +28,7 @@
<% end %> <% end %>
</div> </div>
</div> </div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3"> <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card"> <div class="card">
<div class="body"> <div class="body">
@@ -53,5 +52,5 @@
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,7 +1,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<div class="p-l-15"> <div class="p-l-15">
<%= simple_form_for([:settings,@commission]) do |f| %> <%= simple_form_for([:settings,@commission]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -18,8 +19,10 @@
<%= f.submit 'Submit', class: 'btn btn-primary wave-effects' %> <%= f.submit 'Submit', class: 'btn btn-primary wave-effects' %>
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@employee]) do |f| %> <%= simple_form_for([:settings,@employee]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -14,7 +16,9 @@
<div class="form-actions p-l-15"> <div class="form-actions p-l-15">
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">

View File

@@ -2,6 +2,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@settings_item_set]) do |f| %> <%= simple_form_for([:settings,@settings_item_set]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -15,7 +17,9 @@
<div class="form-actions p-l-15"> <div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings, @settings_menu_category]) do |f| %> <%= simple_form_for([:settings, @settings_menu_category]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -18,6 +20,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings, @settings_menu_item_attribute]) do |f| %> <%= simple_form_for([:settings, @settings_menu_item_attribute]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -14,6 +16,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,8 +1,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <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| %> <%= simple_form_for([:settings,@item, @settings_menu_item_instances]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="col-md- panel"> <div class="col-md- panel">
@@ -15,12 +15,7 @@
<%= f.input :is_on_promotion %> <%= f.input :is_on_promotion %>
<%= f.input :promotion_price %> <%= 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_available %>
<%= f.input :is_default %> <%= f.input :is_default %>
@@ -31,9 +26,10 @@
<div class="form-actions p-l-15"> <div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
</div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings, @settings_menu_item_option]) do |f| %> <%= simple_form_for([:settings, @settings_menu_item_option]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -15,6 +17,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@settings_menu]) do |f| %> <%= simple_form_for([:settings,@settings_menu]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -41,6 +43,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -7,6 +7,8 @@ div.form-inputs span{
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@settings_order_queue_station]) do |f| %> <%= simple_form_for([:settings,@settings_order_queue_station]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -31,6 +33,8 @@ div.form-inputs span{
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,6 +1,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings, @settings_payment_method_setting]) do |f| %> <%= simple_form_for([:settings, @settings_payment_method_setting]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -19,6 +21,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,6 +1,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@settings_product]) do |f| %> <%= simple_form_for([:settings,@settings_product]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-group p-l-15"> <div class="form-group p-l-15">
@@ -33,6 +35,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,5 +1,7 @@
<div class="row"> <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-9 col-lg-9">
<div class="card">
<div class="body">
<%= simple_nested_form_for([:settings,@promotion]) do |f| %> <%= simple_nested_form_for([:settings,@promotion]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -184,7 +186,7 @@
</div> </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 :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-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 class="col-md-1"><%= pro.link_to_remove "X" ,:class=>"btn-primary btn m-r-45", :style => 'width: 25px'%></div>
</div> </div>
<% end %> <% end %>
<div class="row"> <div class="row">
@@ -201,7 +203,9 @@
<div class="form-actions"> <div class="form-actions">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3"> <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card"> <div class="card">
@@ -239,13 +243,13 @@
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$('#promotion_promo_start_hour').on('change', function(event) { $('#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').val($('#promotion_promo_start_hour').val().split(":")[0]+":00");
@@ -280,7 +284,7 @@ $(document).ready(function(){
var day = "[";*/ var day = "[";*/
$(".selectDay").click(function() { $(".selectDay").click(function() {
// debugger; // debugger;
var item_row = $('.selectDay'); var item_row = $('.selectDay');
console.log(item_row); console.log(item_row);

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@zone,@settings_room]) do |f| %> <%= simple_form_for([:settings,@zone,@settings_room]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -53,6 +55,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -3,13 +3,14 @@
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9"> <div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %> <%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="card">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6 panel">
<div class="p-l-20"> <div class="form- p-l-20">
<%= f.input :item_code,:input_html => {:class => "col-md-9"} %> <%= f.input :item_code,:input_html => {:class => "col-md-9"} %>
<%= f.input :name,: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 :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 :min_qty,:input_html => {:class => "col-md-9"} %>
<%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %> <%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %>
@@ -28,31 +29,29 @@
<%= f.input :item_options, :collection => @item_options, :input_html => { :multiple => true,:class => "form-control item_options col-md-9" } %> <%= 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"> <div class="menu-item-img">
<% if f.object.image_path? %> <% if f.object.image_path? %>
<p><%= f.object.name %></p> <p><%= f.object.name %></p>
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %> <%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
<% else %> <% else %>
<p>Menu Item Image</p> <p>Menu Item Image</p>
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %> <%= image_tag "/image/menu_images/default.png", :class => "col-md-4 img-thumbnail" %>
<% end %> <% end %>
</div> </div>
<%= f.file_field :image_path, :class => "img-thumbnail" %> <div class="form-group col-md-10">
<%= f.file_field :image_path, :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>
<div class="panel padding-10"> <div class="row">
<div class="form-group"> <div class="col-md-6 align-right m-l-100 m-t-20 m-b-20">
<%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true }, :class => "form-control item_sets" %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect', :style => "width: 200px" %>
</div> </div>
</div> </div>
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
</div>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@@ -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"><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> <li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right"> <span class="float-right">
<%= link_to 'Back', settings_menu_category_set_menu_items_path(@category) %> <%= link_to 'Back', settings_menu_category_path(@category) %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -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"><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> <li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right"> <span class="float-right">
<%= link_to 'Back', settings_menu_category_set_menu_items_path(@category) %> <%= link_to 'Back', settings_menu_category_path(@category) %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -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"><a href="<%= settings_menu_category_set_menu_items_path(@category) %>">Menu Category</a></li>
<li class="breadcrumb-item active">Details</li> <li class="breadcrumb-item active">Details</li>
<span class="float-right"> <span class="float-right">
<%= link_to 'Back', settings_menu_category_set_menu_items_path(@category) %> <%= link_to 'Back', settings_menu_category_path(@category) %>
</span> </span>
</ol> </ol>
</div> </div>
@@ -119,7 +119,50 @@
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3"> <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card"> <div class="card">
<div class="body"> <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> </div>
</div> </div>

View File

@@ -3,15 +3,14 @@
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9"> <div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %> <%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="card">
<div class="row"> <div class="row">
<div class="col-md-6 panel"> <div class="col-md-6 panel">
<div class="form- p-l-20"> <div class="form- p-l-20">
<%= f.input :item_code,:input_html => {:class => "col-md-9"} %> <%= f.input :item_code,:input_html => {:class => "col-md-9"} %>
<%= f.input :name,: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 :alt_name,:input_html => {:class => "col-md-9"} %>
<div style="display: none;"> <%= f.input :type, :collection => ["SimpleMenuItem","SetMenuItem"], :input_html => {:class => "col-md-9"} %>
<%= f.input :type,:input_html => {:class => "col-md-9"} %>
</div>
<%= f.input :min_qty,: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"} %> <%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %>
@@ -24,9 +23,9 @@
</div> </div>
<div class="col-md-6"> <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"> <div class="menu-item-img">
<% if f.object.image_path? %> <% if f.object.image_path? %>
@@ -37,12 +36,16 @@
<%= image_tag "/image/menu_images/default.png",:input_html => { :class => "col-md-4 img-thumbnail" } %> <%= image_tag "/image/menu_images/default.png",:input_html => { :class => "col-md-4 img-thumbnail" } %>
<% end %> <% end %>
</div> </div>
<div class="form-group col-md-10">
<%= f.file_field :image_path,:input_html => { :class => "col-md-4 img-thumbnail" } %> <%= 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" } %> <%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true,:class => "form-control item_sets col-md-9" } %>
</div>
</div>
<div class="form-actions"> <div class="row">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <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> </div>
</div> </div>

View File

@@ -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"><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> <li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right"> <span class="float-right">
<%= link_to 'Back', settings_menu_category_simple_menu_items_path(@category) %> <%= link_to 'Back', settings_menu_category_path(@category) %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -5,7 +5,7 @@
<li>Menu Items</li> <li>Menu Items</li>
<span style="float: right"> <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> </span>
</ul> </ul>
</div> --> </div> -->

View File

@@ -20,10 +20,10 @@
<div class="page-header"> <div class="page-header">
<ol class="breadcrumb"> <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="<%= 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> <li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right"> <span class="float-right">
<%= link_to 'Back', settings_menu_category_simple_menu_items_path(@category) %> <%= link_to 'Back', settings_menu_category_path(@category) %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -1,10 +1,10 @@
<div class="page-header"> <div class="page-header">
<ol class="breadcrumb"> <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="<%= 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> <li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right"> <span class="float-right">
<%= link_to 'Back', settings_menu_category_simple_menu_items_path(@category) %> <%= link_to 'Back', settings_menu_category_path(@category) %>
</span> </span>
</ol> </ol>
</div> </div>

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8"> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@zone,@settings_table]) do |f| %> <%= simple_form_for([:settings,@zone,@settings_table]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -18,22 +20,31 @@
<% else %> <% else %>
<% @settings_table.dining_charges.each do |dc| %> <% @settings_table.dining_charges.each do |dc| %>
<div class="card"> <div class="card">
<div class=""> <div class="body">
<span class="card-title"><b><u>Dining Charge</u></b></span>
<table class="table"> <table class="table">
<tr><td colspan="2"> <thead>
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td> <th>Item Code</th>
</tr> <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> <tr>
<td class="align-right">Item code :</td> <td><%= dc.item_code %></td>
<td class="align-left"><%= dc.item_code %></td> <td><%= dc.unit_price %></td>
<td class="align-right">Unit price : </td> <td><%= dc.charge_type %></td>
<td class="align-left"><%= dc.unit_price %></td> <td><%= (dc.minimum_free_time).utc.strftime("%H:%M") %></td>
<td class="align-right">Charge type : </td> <td><%= (dc.charge_block).utc.strftime("%H:%M") %></td>
<td class="align-left"><%= dc.charge_type %></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' %> <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> <!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> -->
</td>
</tr> </tr>
</tbody>
</table> </table>
</div> </div>
</div> </div>
@@ -46,6 +57,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -61,21 +61,31 @@
</table> </table>
<% @table.dining_charges.each do |dc| %> <% @table.dining_charges.each do |dc| %>
<div class="card"> <div class="card">
<div class="body">
<h4 class="card-title">Dining Charge</h4> <h4 class="card-title">Dining Charge</h4>
<div class="">
<table class="table"> <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> <tr>
<td class="align-right">Item code :</td> <td><%= dc.item_code %></td>
<td class="align-left"><%= dc.item_code %></td> <td><%= dc.unit_price %></td>
<td class="align-right">Unit price : </td> <td><%= dc.charge_type %></td>
<td class="align-left"><%= dc.unit_price %></td> <td><%= (dc.minimum_free_time).utc.strftime("%H:%M") %></td>
<td class="align-right">Charge type : </td> <td><%= (dc.charge_block).utc.strftime("%H:%M") %></td>
<td class="align-left"><%= dc.charge_type %></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' %> <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> <!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> -->
</td>
</tr> </tr>
</tbody>
</table> </table>
</div> </div>
</div> </div>

View File

@@ -2,6 +2,8 @@
<div class="row"> <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-9 col-lg-9">
<div class="card">
<div class="body">
<%= simple_form_for([:settings, @settings_tax_profile ]) do |f| %> <%= simple_form_for([:settings, @settings_tax_profile ]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -17,6 +19,8 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3"> <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card"> <div class="card">
<div class="body"> <div class="body">

View File

@@ -1,5 +1,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7"> <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
<div class="card">
<div class="body">
<%= simple_form_for([:settings,@settings_zone]) do |f| %> <%= simple_form_for([:settings,@settings_zone]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
@@ -12,7 +14,9 @@
<div class="form-group p-l-15"> <div class="form-group p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5"> <div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
<div class="card"> <div class="card">