Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-07-11 04:00:55 +06:30
99 changed files with 2085 additions and 1781 deletions

View File

@@ -214,13 +214,15 @@
<tr>
<% if payment.payment_method == 'paypar' %>
<td>Redeem Sale : </td>
<% elsif payment.payment_method == 'paymal' %>
<td>Card Sales : </td>
<% else %>
<td><%= payment.payment_method.to_s.capitalize %> Sale : </td>
<% end %>
<td align="right">
<% @sale_data.each do |data| %>
<% pay_mth = payment.payment_method %>
<%= data[""+pay_mth+""] %>
<%= data[pay_mth] %>
<% end %>
</td>
</tr>

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
<form action="/activate" method="POST" class="row">
<%= form_tag activate_path, class: "row" do %>
<div class="col-md-6">
<div class="form-group">
<label for="exampleInputEmail1">Business Name</label>
@@ -27,11 +27,11 @@
</div>
<div class="form-group">
<label for="lblDBName">Database Schema</label>
<input type="text" class="form-control" name="db_schema" aria-describedby="db_schema" placeholder="Database Schema">
<input type="text" class="form-control" name="db_schema" aria-describedby="db_schema" placeholder="Database Schema">
</div>
<div class="form-group">
<label for="lblAdministrator">Database Username</label>
<input type="text" class="form-control" name="db_user" aria-describedby="db_user" placeholder="Database Username">
<input type="text" class="form-control" name="db_user" aria-describedby="db_user" placeholder="Database Username">
</div>
<div class="form-group">
<label for="admin_password">Database Password</label>
@@ -41,4 +41,4 @@
<div class="col-md-12 text-center">
<button type="submit" class="btn btn-primary">Activate</button>
</div>
</form>
<% end %>

View File

@@ -31,6 +31,7 @@
<p>Please wait...</p>
</div>
</div>
<%= render 'shared/license_expire_warning' if Rails.env.production? %>
<!-- #END# Page Loader -->
<!-- Overlay For Sidebars -->
<div class="overlay"></div>

View File

@@ -35,24 +35,25 @@
<p>Please wait...</p>
</div>
</div>
<%= render 'shared/license_expire_warning' if Rails.env.production? %>
<!-- #END# Page Loader -->
<!-- Overlay For Sidebars -->
<div class="overlay"></div>
<!-- #END# Overlay For Sidebars -->
<%= render 'layouts/header' %>
<section>
<%= render 'layouts/left_sidebar' %>
<%= render 'layouts/right_sidebar' %>
<section>
<%= render 'layouts/left_sidebar' %>
<%= render 'layouts/right_sidebar' %>
</section>
<!-- Main Content -->
<section class="content">
<section class="content">
<% flash.each do |type, message| %>
<div class="alert fade in">
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
<%= message %>
</div>
<% end %>
<%= yield %>
<% end %>
<%= yield %>
</section>
</body>
</body>

View File

@@ -51,8 +51,18 @@
<% end %>
<% if can? :index, :home %>
<% if current_login_employee.role != "kitchen" %>
<% if current_user.role == "cashier"
shift = ShiftSale.current_open_shift(current_user)
if !shift.nil?
path = origami_dashboard_path
else
path = new_origami_shift_path
end
else current_user.role == "administrator"
path = origami_dashboard_path
end %>
<li class="menu-up">
<a href="<%= origami_dashboard_path %>">
<a href="<%= path %>">
<i class="material-icons">monetization_on</i>
<span><%= t :origami %></span>
</a>

View File

@@ -32,6 +32,8 @@
<p>Please wait...</p>
</div>
</div>
<%= render 'shared/license_expire_warning' if Rails.env.production? %>
<!-- #END# Page Loader -->
<!-- Overlay For Sidebars -->
<div class="overlay"></div>
@@ -39,7 +41,6 @@
<%= render 'layouts/header' %>
<section>
<%= render 'layouts/left_sidebar' %>
<%= render 'layouts/right_sidebar' %>
</section>

View File

@@ -10,34 +10,34 @@
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<style>
.page {
padding-left: 0;
max-width: 80%;
margin: 2% auto;
overflow-x: hidden;
overflow-x: hidden;
background-color: #2790a5;
}
.page .box {
display: block;
width: 100%;
color: #000;
color: #000;
}
</style>
</head>
<body class="page">
<% flash.each do |type, message| %>
<% if type == "notice"
<% if type == "notice"
color = "alert-success"
elsif type == "error"
color = "alert-danger"
else
color = "bg-black"
end %>
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p>

View File

@@ -31,14 +31,15 @@
<p>Please wait...</p>
</div>
</div>
<%= render 'shared/license_expire_warning' if Rails.env.production? %>
<!-- #END# Page Loader -->
<!-- Overlay For Sidebars -->
<div class="overlay"></div>
<!-- #END# Overlay For Sidebars -->
<%= render 'layouts/header' %>
<section>
<%= render 'layouts/left_sidebar' %>
<%= render 'layouts/right_sidebar' %>
<section>
<%= render 'layouts/left_sidebar' %>
<%= render 'layouts/right_sidebar' %>
</section>
<!-- Main Content -->
@@ -54,8 +55,8 @@
<% end %>
<%= render_breadcrumb %>
<%= yield %>
<%= yield %>
</section>
</body>
</html>
</html>

View File

@@ -31,14 +31,15 @@
<p>Please wait...</p>
</div>
</div>
<%= render 'shared/license_expire_warning' if Rails.env.production? %>
<!-- #END# Page Loader -->
<!-- Overlay For Sidebars -->
<div class="overlay"></div>
<!-- #END# Overlay For Sidebars -->
<%= render 'layouts/header' %>
<section>
<%= render 'layouts/left_sidebar' %>
<%= render 'layouts/right_sidebar' %>
<section>
<%= render 'layouts/left_sidebar' %>
<%= render 'layouts/right_sidebar' %>
</section>
<!-- Notify -->
@@ -46,21 +47,20 @@
<!-- Notify -->
<!-- Main Content -->
<section class="content">
<section class="content">
<% flash.each do |type, message| %>
<% if type == "notice"
<% if type == "notice"
color = "alert-success"
elsif type == "error"
color = "alert-danger"
else
color = "bg-black"
end %>
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p>
<% end %>
<%= yield %>
<% end %>
<%= yield %>
</section>
</body>

View File

@@ -14,6 +14,7 @@
</head>
<body>
<%= render 'shared/license_expire_warning' %>
<%= render 'layouts/header' %>
<div class="container-fluid">
<% flash.each do |type, message| %>

View File

@@ -1,5 +1,5 @@
<!-- Column One -->
<div class="row clearfix" style="">
<div class="row clearfix m-top-100" style="">
<div class="col-lg-7 col-md-7 col-sm-7">
<p class="hidden filter"><%= @filter %></p>
<div class="card">

View File

@@ -4,7 +4,7 @@
<% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%>
<% modify_order = request.path_info.include?('modify_order')%>
<div class="container-fluid " style="padding:0px 3px 0px 3px; overflow-x: hidden; ">
<div class="container-fluid addorder-pages" style="padding:0px 3px 0px 3px;">
<div id="oqs_loading_wrapper" style="display:none;">
<div id="oqs_loading"></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class='row'>
<div class="col-lg-10 col-md-10 col-sm-10">
<h2> <%= t :cash_in %> </h2>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class='row'>
<div class="col-lg-10 col-md-10 col-sm-10">
<h2><%= t :cash_out %></h2>

View File

@@ -176,25 +176,40 @@
<div class="body">
<h6><%= t("views.right_panel.detail.order") %></h6>
<table class="table">
<% if !@total_order.nil? %>
<tr>
<td width="40px"><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.order") %> : </td>
<td align="right" width="60px"><%= @total_order.total_order %></td>
</tr>
<% end %>
<% if !@total_accounts.nil? %>
<% @total_accounts.each do |account| %>
<tr>
<td width="40px"><%= account.title %> (Account) : </td>
<td align="right" width="60px">
<% @account_data.each do |data| %>
<% acc = account.title %>
<%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %>
<% if !(@total_payment_methods.nil?) %>
<% @total_payment_methods.each do |payment| %>
<% if !@sale_data[0].empty? %>
<% if payment.payment_method != 'mpu' && payment.payment_method != 'visa' && payment.payment_method != 'master' && payment.payment_method != 'jcb' %>
<tr>
<% if payment.payment_method == 'paypar' %>
<td>Redeem Sales : </td>
<% elsif payment.payment_method == 'paymal' %>
<td>Card Sales : </td>
<% else %>
<td><%= payment.payment_method.to_s.capitalize %> Sales : </td>
<% end %>
<td align="right">
<% @sale_data.each do |data| %>
<% pay_mth = payment.payment_method %>
<%= data[pay_mth] %>
<% end %>
</td>
</tr>
<% end %>
<% end %>
</td>
</tr>
<% end %>
<% end %>
<% total_card = @sale_data.select { |hash| hash["card"]!=nil } %>
<% if !total_card.nil? %>
<tr>
<td><%= t("views.right_panel.detail.other_payment") %> : </td>
<td align="right">
<% total_other_amt = 0 %>
<% @sale_data.map { |k,v| k.map{|meth,amt| meth != 'cash' && meth != 'foc' && meth != 'creditnote' ? total_other_amt += amt : meth }} %>
<%= total_other_amt %>
</td>
</tr>
<% end %>
<% end %>
<% if !@top_items.nil? %>
<tr>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
@@ -300,12 +300,14 @@ var originalDiscount = totalDiscount;
switch (input_type) {
case 'num':
var input_value = $(this).attr("data-value");
if (parseFloat(original_value) == 0){
$('#discount-amount').val(input_value);
}
else{
$('#discount-amount').val(original_value + '' + input_value);
}
if (input_value == "." && original_value.includes(".")) {
break;
}
if (parseFloat(input_value) >= 0 && !original_value.includes(".") && (parseFloat(original_value) == 0)) {
$('#discount-amount').val(parseFloat(input_value));
} else {
$('#discount-amount').val(original_value + input_value);
}
break;
case 'add':
var input_value = $(this).attr("data-value");

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>

View File

@@ -1,6 +1,6 @@
<%= stylesheet_link_tag 'order_reservation', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'order_reservation', 'data-turbolinks-track': 'reload' %>
<div class="container-fluid">
<div class="container-fluid m-top-100">
<!-- start count function -->
<%
pending_count = 0

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class="row">
<!-- Column One -->
<div class="col-lg-6 col-md-6 col-sm-6">
@@ -202,7 +202,7 @@
<%else%>
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/sale/<%=@sale_data.sale_id%>/<%=@cashier_type%>/payment'"><i class="material-icons">reply</i> Back </button>
<%end%>
<button id="charge_other" class="btn bg-primary btn-block action-btn">Enter</button>
<button id="charge_other" class="btn bg-primary btn-block action-btn" style="height: 35px">Enter</button>
</div>
</div>
</div>

View File

@@ -680,8 +680,10 @@ $(document).ready(function(){
$('#pay').click(function() {
sub_total = $('#sub-total').text();
member = $('#membership_id').text();
if (payment_type && payment_type.length > 0 && !other_payments.some(x => payment_type.indexOf(x[0]) >= 0 && x[1] > 0) && sub_total != 0.0 && member) {
if (payment_type && payment_type.length > 0 && parseInt(jQuery.inArray("Credit", payment_type)) == -1 && !other_payments.some(x => payment_type.indexOf(x[0]) >= 0 && x[1] > 0) && sub_total != 0.0 && member) {
swal("Oops","Please Pay with " + payment_methods.find(x => payment_type.indexOf(x) >= 0) + " Payment","warning");
} else if (payment_type && payment_type.length > 0 && parseInt(jQuery.inArray("Credit", payment_type)) != -1 && $('#credit').text() == 0 && sub_total != 0.0 && member) {
swal("Oops","Please Pay with Credit Payment","warning");
} else {
$( "#loading_wrapper").show();
if($('#balance').text() > 0){

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class="row clearfix">
<!-- Column One -->
<div class="col-lg-10 col-md-10 col-sm-10">

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class="row">
<!-- Column One -->
<div class="col-lg-5 col-md-5 col-sm-5">

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
<div class="card">

View File

@@ -83,7 +83,7 @@
<th style='text-align:center;'><%= t("views.right_panel.detail.sr") %></th>
<th style='text-align:center;'><%= t("views.righ_panel.detail.date") %></th>
<% @payment_methods.each do |method| %>
<th style='text-align:center;' class="d-none d-sm-table-cell"><%= t("views.right_panel.detail.#{method}") %></th>
<th style='text-align:center;' class="d-none d-sm-table-cell"><%= t("views.right_panel.detail.#{method.parameterize == 'paymal' ? 'card_sales' : method.parameterize}") %></th>
<% end %>
<th style='text-align:center;'><%= t("views.right_panel.detail.cash_sales") %></th>

View File

@@ -28,7 +28,7 @@
<th style='text-align:center;'><%= t("views.right_panel.detail.date") %></th>
<% @payment_methods.each do |method| %>
<th style='text-align:center;' class="d-none d-sm-table-cell"><%= t("views.right_panel.detail.#{method}") %></th>
<th style='text-align:center;' class="d-none d-sm-table-cell"><%= t("views.right_panel.detail.#{method.parameterize == 'paymal' ? 'card_sales' : method.parameterize}") %></th>
<% end %>
<th style='text-align:center;'><%= t("views.right_panel.detail.cash_sales") %></th>
<th style='text-align:center;'><%= t("views.right_panel.detail.credit_sales") %></th>

View File

@@ -41,7 +41,7 @@
<% end %>
<tr>
<% @payment_methods.each do |method| %>
<th><%= t("views.right_panel.detail.#{method} Sales") %></th>
<th><%= t("views.right_panel.detail.#{method.parameterize == 'paymal' ? 'card_sales' : method.parameterize}") %></th>
<% end %>
<th><%= t("views.right_panel.detail.cash_sales") %></th>
<th><%= t("views.right_panel.detail.credit_sales") %></th>

View File

@@ -28,7 +28,7 @@
<% end %>
<tr>
<% @payment_methods.each do |method| %>
<th><%= t("views.right_panel.detail.#{method} Sales") %></th>
<th><%= t("views.right_panel.detail.#{method.parameterize == 'paymal' ? 'card_sales' : method.parameterize}") %></th>
<% end %>
<th><%= t("views.right_panel.detail.cash_sales") %></th>
<th><%= t("views.right_panel.detail.credit_sales") %></th>

View File

@@ -0,0 +1,78 @@
<% renewable_date = current_license.read_license("renewable_date") %>
<% date_count = (renewable_date.to_date - Date.today).to_i %>
<% day = pluralize( date_count, 'day' )%>
<% if @license_status == 0 %>
<% text = 'Your license has been expired.' %>
<% else %>
<% text = "Your license will expire in #{day}." %>
<% end %>
<style>
.centered {
position: fixed;
/*width: 850px;*/
padding: 10px;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
</style>
<div class="container-fluid">
<div class="row">
<div class="col-sm-2"></div>
<div class="card col-sm-8 centered">
<div class="card-block">
<%= link_to origami_dashboard_url do %>
<img src="/image/logo.png" class="mr-4 mt-2 float-right" style="width: 150px">
<% end %>
<h3 class="mt-4 mb-4">Review Your License</h3>
<% if flash[:message].present? %>
<p class="text-danger" style="font-weight: bold; font-size: 18px;"><%= flash[:message] %></p>
<% end %>
<br>
<% if text %>
<h6 class="mb-2"><%= text %></h6><br>
<% end %>
<h6 class="mb-2">Call Center Phone No: <a href="tel:+6494461709">+959 445 665 311</a></h6>
<br>
<h6>License Info:</h6>
<br>
<div class="container">
<div class="form-group row">
<label class="card-subtitle mb-2 col-md-4">Business Name:</label>
<label class="card-subtitle mb-2 "><strong><%= @bis_name %></strong></label>
</div>
<div class="form-group row">
<label class="card-subtitle mb-2 col-md-4">Plan:</label>
<label class="card-subtitle mb-2 "><strong><%= @plan %></strong></label>
</div>
</div>
<div class="form-group row">
<label class="card-subtitle mb-2 col-md-4 pl-4">Expired At: </label>
<label class="card-subtitle mb-2 "><strong><%= @expired_at.to_date.strftime('%B %d, %Y') %></strong></label>
</div>
</div>
<br>
<div class="col-md-12 mb-2">
<%= form_with url: review_license_url, local: true do %>
<%= submit_tag 'Review Licese', class: 'btn btn-primary btn-lg float-right m-l-10 m-r-5' %>
<%= link_to 'Go To Home', root_url, class: 'btn btn-default btn-lg float-right' %>
<% end %>
</div>
</div>
<div class="col-sm-2"></div>
</div>
</div>
<script>
$(document).ready(function() {
$('.alert-danger, .navbar').hide()
$('html, section').css('background-color', '#61B8C9')
// $('html').css('overflow-x', 'hidden')
$('section.content').css('margin', '70px 0 0 0')
})
</script>

View File

@@ -0,0 +1,70 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_item_groups_path %>">Menu Item Groups</a></li>
<li class="breadcrumb-item active">Edit</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_menu_item_groups_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<%= simple_form_for ([:settings,@settings_menu_item_group]), :url => settings_menu_item_group_path do |f| %>
<%= f.error_notification %>
<div class="form-inputs p-l-15">
<%= f.input :name, :label => "Group Name" ,input_html: {required: true }%>
<%= f.label :lookup_type, label: 'Menu Category', :class => "control-label string optional bmd-label-static" %>
<%= f.collection_select :lookup_type, @menu_category, :id, :name, {}, {:class =>"form-control"} %>
<%= f.label :value, label: 'Menu Items', :class => "control-label string optional bmd-label-static" %>
<%= f.grouped_collection_select :value, @menu_category, :menu_items, :name, :item_code, :name, {}, {:class =>"form-control", :multiple=> true} %>
</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">
<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.lookup") + " " + t("views.right_panel.detail.type_txt") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
3) <%= t("views.right_panel.detail.value") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.value_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.lookup_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.lookup_txt") %> <br>
</p>
</div>
</div>
</div>
</div>
<script>
jQuery(function() {
$( document ).ready(function() {
menu_items = $("#lookup_value").html();
menu_category = $('#lookup_lookup_type :selected').text();
options = $(menu_items).filter('optgroup[label="' + menu_category + '"]').html();
$('#lookup_value').html(options)
$('#lookup_lookup_type').change(function() {
menu_category = $('#lookup_lookup_type :selected').text();
options = $(menu_items).filter('optgroup[label="' + menu_category + '"]').html();
if (options != null)
$('#lookup_value').html(options);
else
$('#lookup_value').empty();
});
});
});
</script>

View File

@@ -0,0 +1,69 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Menu Item Group</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="m-b-10 clearfix">
<%= link_to t("views.btn.new"),new_settings_menu_item_group_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
</div>
<div class="card" id="custom-slimscroll">
<table class="table table-striped">
<thead>
<tr>
<th><%= t("views.right_panel.detail.menu_item_groups") %></th>
<th><%= t("views.right_panel.detail.group_names") %></th>
<th><%= t("views.right_panel.detail.menu_items") %></th>
<th><%= t("views.right_panel.detail.actions") %></th>
</tr>
</thead>
<tbody>
<% @menu_item_group.each do |menu_item_group| %>
<tr>
<td><%= menu_item_group.lookup_type %></td>
<td><%= menu_item_group.name %></td>
<td><%= menu_item_group.value %></td>
<td>
<%= link_to t("views.btn.edit"), edit_settings_menu_item_group_path(menu_item_group),:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.delete"), settings_menu_item_group_path(menu_item_group),:class => 'btn btn-danger btn-sm waves-effect', method: :delete, data: {confirm: 'Are you sure you want to delete this row ?'} %>
</button>
</td>
</tr>
<% end %>
</tbody>
</table>
</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.lookup") + " " + t("views.right_panel.detail.type_txt") %> - <%= t("views.right_panel.detail.type_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.name_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
3) <%= t("views.right_panel.detail.value") %> - <%= t("views.right_panel.detail.value_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
4) <%= t("views.right_panel.detail.actions") %> - <%= t("views.right_panel.detail.actions_txt") %> <%= t("views.right_panel.detail.lookup_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.lookup_txt") %> <br>
2) <%= t("views.right_panel.button.edit") %> - <%= t("views.right_panel.detail.edit_btn_txt") %> <%= t("views.right_panel.detail.lookup_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.dashboard_txt") %> <br>
</p>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,70 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_item_groups_path %>">Menu Item Group</a></li>
<li class="breadcrumb-item active">New</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_menu_item_groups_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<%= simple_form_for ([:settings,@settings_menu_item_group]), :url => settings_menu_item_groups_path do |f| %>
<%= f.error_notification %>
<div class="form-inputs p-l-15">
<%= f.input :name, :label => "Group Name" ,input_html: {required: true }%>
<%= f.label :lookup_type, label: 'Menu Category', :class => "control-label string optional bmd-label-static" %>
<%= f.collection_select :lookup_type, @menu_category, :id, :name, {}, {:class =>"form-control"} %>
<%= f.label :value, label: 'Menu Items', :class => "control-label string optional bmd-label-static" %>
<%= f.grouped_collection_select :value, @menu_category, :menu_items, :name, :item_code, :name, {}, {:class =>"form-control", :multiple=> true} %>
</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">
<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.lookup") + " " + t("views.right_panel.detail.type_txt") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
3) <%= t("views.right_panel.detail.value") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.value_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.lookup_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.lookup_txt") %> <br>
</p>
</div>
</div>
</div>
</div>
<script>
jQuery(function() {
$( document ).ready(function() {
menu_items = $("#lookup_value").html();
menu_category = $('#lookup_lookup_type :selected').text();
options = $(menu_items).filter('optgroup[label="' + menu_category + '"]').html();
$('#lookup_value').html(options)
$('#lookup_lookup_type').change(function() {
menu_category = $('#lookup_lookup_type :selected').text();
options = $(menu_items).filter('optgroup[label="' + menu_category + '"]').html();
if (options != null)
$('#lookup_value').html(options);
else
$('#lookup_value').empty();
});
});
});
</script>

View File

@@ -0,0 +1,56 @@
<% license_status = current_license.detail_with_local_file %>
<% renewable_date = current_license.read_license("renewable_date") %>
<% date_count = (renewable_date.to_date - Date.today).to_i %>
<% day = pluralize( date_count, 'day' )%>
<% if license_status == 0
text = 'Your license has expired.'
elsif license_status == 2
if date_count == 0
text = "Your license will expire in tomorrow."
else
text = "Your license will expire in #{day}."
end
end
%>
<% if license_status == 0 || license_status == 2 %>
<div id="license-alert" class="alert alert-danger fade show text-center" role="alert">
<strong style="margin-left: 40px !important"><%= text %></strong>
<%= link_to 'Review License', review_license_url, class: 'btn btn-sm btn-primary', style: "margin-left: 20px !important"%>
<button type="button" class="close btn-close" data-dismiss="alert" aria-label="Close" style="padding-top: 5px;">
<span aria-hidden="true" class="text-white">&times;</span>
</button>
</div>
<% end %>
<script>
$(document).ready(function() {
divLicnese = $('#license-alert');
navbar = $('.navbar');
leftsidebar = $('#leftsidebar');
if (<%= license_status %> == 1) {
navbar.css("top", "");
leftsidebar.css("top", "");
$('section.content').css('margin-top', '0 !important');
}
else {
navbar.css("top", divLicnese.outerHeight() + 'px');
leftsidebar.css("top", navbar.outerHeight() + divLicnese.outerHeight() + 'px');
$('.block-header, .addorder-pages').css('margin-top', '115px');
$('.page-header, .m-top-100').css('margin-top', '100px');
$('.alert-danger').css({
'top': 0,
'position': 'fixed',
'z-index': 999,
'width': '100%'
})
}
$('.btn-close').on ('click', function() {
navbar.css("top", '0')
$('.block-header, .addorder-pages').css('margin-top', '')
$('.page-header, .m-top-100').css('margin-top', '')
})
})
</script>

View File

@@ -135,7 +135,7 @@
<% @payment_methods.each do |method| %>
<tr>
<th></th>
<td style="text-align: right;"><%= method %> Payment</td>
<td style="text-align: right;"><%= method.parameterize == 'paymal' ? 'Card' : method.parameterize %> Payment</td>
<td><%= @other_payment[method.parameterize.to_sym] || 0.0 %></td>
<% total_other_amount = total_other_amount + (@other_payment[method.parameterize.to_sym] || 0.0) %>
</tr>
@@ -154,7 +154,7 @@
<tr>
<th></th>
<th style="text-align: right;">Total Payment </th>
<th><%= total_other_amount + @other_payment.foc_amount + @shift.cash_sales + @shift.credit_sales %></th>
<th><%= total_other_amount + @other_payment.foc_amount.to_d + @shift.cash_sales.to_d + @shift.credit_sales.to_d %></th>
</tr>
</table>
</td>