Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-09-10 10:31:07 +06:30
184 changed files with 2672 additions and 1021 deletions

View File

@@ -57,7 +57,7 @@
<div class="col-sm-12 col-md-12 col-lg-12">
<%= f.input :name, :class => "form-control name", :required => true %>
<% flash.each do |test, msg| %>
<%
<%
str="[\"#{msg['name']}\"]"
str.gsub!('["', '')
str.gsub!('"]', '') %>
@@ -94,7 +94,7 @@
<div class="form-group">
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
</div>
</div>
</div>
</div>
<div class="tab-pane" role="tabpanel" id="complete">
@@ -107,12 +107,12 @@
<% if f.object.image_path? %>
<p><%= f.object.name %></p>
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
<% else %>
<% else %>
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
<% end %>
<% end %>
</div>
<%= f.file_field :image_path, :class => "img-thumbnail" %>
</div>
</div>
</div>
</div>
<div class="form-group">
@@ -160,7 +160,7 @@
<option value="<%= ct.value %>">
<%= ct.name %></option>
<%end %>
</select>
</select>
</div>
</div>
@@ -185,7 +185,7 @@
<div class="form-group">
<div class="col-sm-12 col-md-12 col-lg-12">
<label class="control-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/>
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
</div>
@@ -201,7 +201,7 @@
<option value="<%= member.value %>">
<%= member.name %></option>
<%end %>
</select>
</select>
</div>
</div>
<div class="form-group">
@@ -212,7 +212,7 @@
<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="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
@@ -259,13 +259,10 @@
console.log(paypar_account_no);
// Read Card Reader
$("#paypar_account_no").on('focus', function(e){
$("#paypar_account_no").on('focus', function(e){
if($(this).val() == ''){
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
},100);
getCardNo();
}
});
@@ -289,6 +286,7 @@
$("#paypar_account_no").val(cardNo);
$("#search").val(cardNo);
$("#type").val("card");
$("#filter_form").submit();
}else{
if($.inArray(cardNo, paypar_account_no) !== -1){
swal({
@@ -311,9 +309,10 @@
$("#sxModal").hide();
//$("#filter_form").submit();
}
$("#sxModal").hide();
}
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
</script>
</script>

View File

@@ -1,9 +1,9 @@
<!-- <div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t :crm %></li> -->
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
<!-- <li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li> -->
<!-- <span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
@@ -161,24 +161,19 @@
$(document).ready(function () {
$("#oqs_loading_wrapper").show();
localStorage.setItem("member_card",false);
/*$('.datepicker').datepicker({
format : 'dd-mm-yyyy',
autoclose: true
});
$('.datepicker').attr('ReadOnly','true');
$('.datepicker').css('cursor','pointer');*/
// Read Card Reader
$("#member_acc_no").on('click', function(e){
localStorage.setItem("member_card",true);
var cardNo = "";
$("#sxModal").show();
<<<<<<< HEAD
setTimeout(function(){
getCardNo();
},100);
=======
getCardNo();
>>>>>>> r-1902001-01
});
// QR Code Reader
$("#qr_code").on('click', function(e){
var code = "";
@@ -238,88 +233,85 @@
/*customer UI tab btn*/
$(document).on('click',".customer_tr",function(){
// if(this.checked){
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
//$( "#checkbox_check" ).prop( "checked", true );
var sale_id = $("#sale_id").val() || 0;
var customer_id = $(this).attr('data-ref');
// if(this.checked){
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
//$( "#checkbox_check" ).prop( "checked", true );
var sale_id = $("#sale_id").val() || 0;
var customer_id = $(this).attr('data-ref');
if(sale_id != 0){
// var url = "/"+customer_id;
update_sale(customer_id,sale_id);
}else{
if(sale_id != 0){
// var url = "/"+customer_id;
update_sale(customer_id,sale_id);
}else{
var url = "customers/" + customer_id + "/edit";
}
var url = "customers/" + customer_id + "/edit";
}
$("#customer_tax_profiles").children().removeAttr("selected").css({'color':'#000','background':'none'});
$("#customer_tax_profiles").children().removeAttr("selected").css({'color':'#000','background':'none'});
$.ajax({
type: "GET",
url: url,
data: {},
dataType: "json",
success: function(data) {
// Selected for Taxes
var taxes = JSON.stringify(data.tax_profiles);
var parse_taxes = JSON.parse(taxes);
$.each(parse_taxes, function(i, value){
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected").css({'color':'#fff','background':'#215d9c'});
});
$.ajax({
type: "GET",
url: url,
data: {},
dataType: "json",
success: function(data) {
// Selected for Taxes
var taxes = JSON.stringify(data.tax_profiles);
var parse_taxes = JSON.parse(taxes);
$.each(parse_taxes, function(i, value){
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected").css({'color':'#fff','background':'#215d9c'});
});
$('#customer_id').val(data.id);
$('#customer_name').val(data.name);
$('#customer_company').val(data.company);
$('#customer_contact_no').val(data.contact_no);
$('#customer_email').val(data.email);
$('#customer_salutation').val(data.salutation);
$('#customer_nrc_no').val(data.nrc_no);
$('#customer_card_no').val(data.card_no);
$('#customer_type').val(data.customer_type);
$('#paypar_account_no').val(data.paypar_account_no);
$('#customer_address').val(data.address);
$('#customer_date_of_birth').val(data.date_of_birth);
if(data.image_path.url!=undefined && data.image_path.url!=null){
$('.menu-item-img .img-thumbnail').attr('src',data.image_path.url);
}
$('#customer_membership_type').val(data.membership_type);
$('.selectpicker > option[value="'+data.membership_type+'"]').attr('selected','selected');
if (data.gender == 'Male') {
$('.male').prop( "checked", true )
}else{
$('.female').prop( "checked", true )
}
$('#customer_id').val(data.id);
$('#customer_name').val(data.name);
$('#customer_company').val(data.company);
$('#customer_contact_no').val(data.contact_no);
$('#customer_email').val(data.email);
$('#customer_salutation').val(data.salutation);
$('#customer_nrc_no').val(data.nrc_no);
$('#customer_card_no').val(data.card_no);
$('#customer_type').val(data.customer_type);
$('#paypar_account_no').val(data.paypar_account_no);
$('#customer_address').val(data.address);
$('#customer_date_of_birth').val(data.date_of_birth);
if(data.image_path.url!=undefined && data.image_path.url!=null){
$('.menu-item-img .img-thumbnail').attr('src',data.image_path.url);
}
$('#customer_membership_type').val(data.membership_type);
$('.selectpicker > option[value="'+data.membership_type+'"]').attr('selected','selected');
if (data.gender == 'Male') {
$('.male').prop( "checked", true )
}else{
$('.female').prop( "checked", true )
}
if(data.salutation == 'Mr') {
$('.mr').prop( "checked", true )
}else if(data.salutation == 'Miss') {
$('.miss').prop( "checked", true )
}else if(data.salutation == 'Mrs'){
$('.mrs').prop( "checked", true )
}else{
$('.mdm').prop( "checked", true )
}
if(data.salutation == 'Mr') {
$('.mr').prop( "checked", true )
}else if(data.salutation == 'Miss') {
$('.miss').prop( "checked", true )
}else if(data.salutation == 'Mrs'){
$('.mrs').prop( "checked", true )
}else{
$('.mdm').prop( "checked", true )
}
$('.membership_authentication_code').val(data.membership_authentication_code);
$('.membership_authentication_code').val(data.membership_authentication_code);
$('#update_customer').removeAttr('disabled').val('');
$('#update_customer').attr('value', 'Update');
$('#submit_customer').attr('disabled','disabled');
$('#update_customer').removeAttr('disabled').val('');
$('#update_customer').attr('value', 'Update');
$('#submit_customer').attr('disabled','disabled');
$("#new_customer").attr('class', 'simple_form edit_customer');
var id = "edit_customer_"+customer_id;
$("#new_customer").attr('id', id);
$("#new_customer").attr('class', 'simple_form edit_customer');
var id = "edit_customer_"+customer_id;
$("#new_customer").attr('id', id);
$(".edit_customer").attr('id', id);
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
$(".patch_method").html('<input type="hidden" name="_method" value="patch">');
//$(".edit_customer").attr('method', 'PATCH');
}
});
// }else{
// }
$(".edit_customer").attr('id', id);
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
$(".patch_method").html('<input type="hidden" name="_method" value="patch">');
//$(".edit_customer").attr('method', 'PATCH');
}
});
})
function update_sale(customer_id,sale_id) {

View File

@@ -1,11 +1,21 @@
<% breadcrumb_add 'CRM', "", dashboard_path %>
<div class="container-fluid">
<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item active">CRM</li>
<!-- <li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li> -->
<span class="float-right">
<%= link_to 'Back', crm_customers_path %>
</span>
</ul>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<!-- Column One -->
<!-- Nav tabs -->
<ul class="nav nav-tabs tab-nav-right" role="tablist">
<li role="presentation" class="active nav-item">
<a class="nav-link" data-toggle="tab" href="#customer" ><%= t :customer_details %></a>
</li>
@@ -60,10 +70,10 @@
<%else%>
<td>-</td>
<%end%>
</tr>
<tr><th colspan="9"></th></tr>
</tbody>
</table>
</div>
@@ -79,7 +89,7 @@
<!-- <th>Balance</th> -->
<th><%= t("views.right_panel.detail.status") %></th>
<th><%= t("views.right_panel.detail.from_account") %></th>
<th><%= t("views.right_panel.detail.receipt_no") %></th>
</tr>
</thead>
@@ -94,7 +104,7 @@
<td>(<%= transaction["withdraw"] %>)</td>
<% end %>
<td><%= transaction["status"] %></td>
<td><%= transaction["account_status"] %></td>
<td><%= transaction["account_status"] %></td>
<td><%= transaction["receipt_no"] %></td>
</tr>
<% end %>
@@ -126,7 +136,7 @@
<h5><%= t :order_details %></h5>
<div class="table-responsive">
<table class="table table-striped">
<table class="table table-striped">
<thead>
<tr>
<th><%= t("views.right_panel.detail.order_id") %></th>
@@ -150,13 +160,13 @@
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="sale" role="tabpanel" style="min-height:670px; max-height:670px; ">
<h5><%= t :sale_details %></h5>
<div class="table-responsive">
<table class="table table-striped">
<table class="table table-striped">
<thead>
<tr>
<th><%= t("views.right_panel.detail.sale_id") %></th>
@@ -195,19 +205,19 @@
<th colspan="4"><%= add_grand_total %></th>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="credit" role="tabpanel" style="min-height:670px; max-height:670px; ">
<h5><%= t :credit %> <%= t :details %></h5>
<table class="table table-responsive tbl_credit_lists">
<thead>
<th><%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %></th>
<th><%= t("views.right_panel.detail.receipt_no") %></th>
<th> <%= t :cashier %></th>
<th> <%= t :cashier %></th>
<th> <%= t("views.right_panel.detail.credit_amount") %> </th>
</thead>
<tbody>
@@ -230,4 +240,3 @@
</div>
</div>

View File

@@ -1,6 +1,15 @@
<div class="container-fluid">
<% breadcrumb_add 'Queue', crm_dining_queues_path, dashboard_path, "Assign Queue #{@queue.queue_no}" %>
<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= crm_dining_queues_path %>">Queue</a></li>
<li class="breadcrumb-item active">Assign Queue <%=@queue.queue_no%></li>
<span class="float-right">
<%= link_to 'Back', root_path %>
</span>
</ul>
</div>
</div>
<div class="row">
<!-- Column One -->
<div class="col-lg-12 col-md-12 col-sm-12">

View File

@@ -1,4 +1,13 @@
<% breadcrumb_add t('queue'), "", dashboard_path %>
<div class="container-fluid">
<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("en.queue") %></li>
<span class="float-right">
<%= link_to 'Back', root_path %>
</span>
</ul>
</div>
<div class="row">
<!-- Column One -->
@@ -9,7 +18,7 @@
<div class="body">
<% if @dining_queues.count > 0 %>
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @dining_queues.each do |queue| %>
<% if queue.status == "Assign"
@bg_color = "assign"
@@ -42,7 +51,7 @@
</div>
</div>
<% end %>
</div>
<% else %>
<p>There is no queue Now !</p>
@@ -58,25 +67,25 @@
<h6><i class="material-icons md-18">view_headline QUEUE DETAILs</i> </h6>
<p>
1) Latest Queue No - <%= @complete_queue.last.queue_no rescue 0 %> <br>
2) Next Queue No - <% @next = (@complete_queue.last.queue_no.to_i rescue 0) + 1%>
2) Next Queue No - <% @next = (@complete_queue.last.queue_no.to_i rescue 0) + 1%>
<%= @next rescue 0 %> <br>
3) Today Completed Queue - <strong> <%= @complete_queue.count %> </strong><br>
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
<p>
1) <%= t("views.right_panel.button.cancel") %>
<%= t("views.right_panel.button.queue") %> -
<%= t("views.right_panel.detail.cancel_btn_txt") %>
1) <%= t("views.right_panel.button.cancel") %>
<%= t("views.right_panel.button.queue") %> -
<%= t("views.right_panel.detail.cancel_btn_txt") %>
<%= t("views.right_panel.detail.queue_txt") %> <br>
2) <%= t("views.btn.new") %>
<%= t("views.right_panel.button.queue") %> -
<%= t("views.right_panel.detail.create_btn_txt") %>
2) <%= t("views.btn.new") %>
<%= t("views.right_panel.button.queue") %> -
<%= t("views.right_panel.detail.create_btn_txt") %>
<%= t("views.right_panel.detail.queue_txt") %><br>
2) <%= t("views.btn.assign") %>
<%= t("views.right_panel.button.queue") %> -
<%= t("views.right_panel.detail.assign_txt") %>
2) <%= t("views.btn.assign") %>
<%= t("views.right_panel.button.queue") %> -
<%= t("views.right_panel.detail.assign_txt") %>
<%= t("views.right_panel.detail.queue_txt") %><br>
</p>
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
@@ -85,7 +94,7 @@
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br>
</p>
</div>
</div>
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<%= link_to t("views.btn.new"),new_crm_dining_queue_path,:class => 'btn bg-green btn-block btn-lg btn-block', 'data-no-turbolink' => true %>
@@ -157,4 +166,4 @@ function cancel_queue(id,url) {
-moz-column-count: 4;
column-count: 4;
}
</style>
</style>

View File

@@ -1,3 +1,15 @@
<div class="container-fluid">
<%= render 'form', dining_queue: @dining_queue %>
</div>
<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= crm_dining_queues_path %>"><%= t("en.queue") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">
<%= link_to 'Back', crm_dining_queues_path %>
</span>
</ul>
</div>
<%= render 'form', dining_queue: @dining_queue %>
</div>

View File

@@ -1,4 +1,12 @@
<% breadcrumb_add t('inventory'), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t :inventory %></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-lg-4 col-md-4 col-sm-4" style="padding-left: 17px;">

View File

@@ -1,4 +1,13 @@
<% breadcrumb_add t('inventory'), '', inventory_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t :inventory %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
@@ -62,4 +71,4 @@
<%= paginate @stock_journals %>
<% end %>
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= inventory_path %>"><%= t :inventory %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">

View File

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

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></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>
<span class="float-right">

View File

@@ -18,26 +18,10 @@
<div class="navbar-header">
<!-- <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> -->
<%if current_login_employee.role !="waiter" %>
<a href="javascript:void(0);" class="bars <%= display_none %>"></a>
<% if current_login_employee.role == "administrator" || current_login_employee.role == "manager" || current_login_employee.role == "account" %>
<a class="navbar-brand mbl_view" href="<%=dashboard_path%>" style="margin-left: 20px;">
<% elsif current_login_employee.role == "supervisor" %>
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
<% elsif current_login_employee.role == "cashier" || current_login_employee.role == "waiter"%>
<%if ShiftSale.current_open_shift(current_login_employee) %>
<%if current_login_employee.role == "cashier" && food_court %>
<a class="navbar-brand mbl_view" href="<%=foodcourt_food_court_path%>" style="margin-left: -10px;">
<%else%>
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
<%end%>
<%else%>
<a class="navbar-brand mbl_view" href="" style="margin-left: 20px;">
<%end%>
<%else%>
<a class="navbar-brand mbl_view" href="" style="margin-left: 20px;">
<% end %>
<a href="javascript:void(0);" class="bars"></a>
<a class="navbar-brand mbl_view" href="<%= root_path %>" style="margin-left: 20px;">
<% else %>
<a class="navbar-brand m-0 mbl_view" href="<%= origami_dashboard_path%>">
<a class="navbar-brand m-0 mbl_view" href="<%= root_path %>">
<%end%>
<img src="<%= asset_path('SX-Logo-small.png') %>" width="40" height="40" alt="Logo", class="<%= display_none.present? ? 'm-0' : '' %>" />
<span class="navbar-brand-txt">SX Restaurant</span>
@@ -55,7 +39,7 @@
<div class="mr-4">
<a class="pt-2" href="<%= settings_out_of_stock_index_path %>">
<i class="material-icons" style="margin:25%; color:white;">phonelink_erase</i>
</a>
</a>
</div>
<%end%>
<!-- End Shop Info -->
@@ -131,7 +115,7 @@
<!-- End Quick Access for Cashier -->
<!-- Start Delete confirrm text !-->
<div class="navbar-right toggle_mbl">
<a href="javascript:void(0);" class="dropdown-toggle waves-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<% if current_login_employee %>

View File

@@ -324,6 +324,9 @@
</li>
<li>
<a href="<%= reports_void_sale_index_path %>">Void Sales</a>
</li>
<li>
<a href="<%= reports_customer_index_path %>">Customer Sales</a>
</li>
<li>
<a href="<%= reports_waste_and_spoilage_index_path %>">Wastes & Spoilages</a>

View File

@@ -1,7 +1,7 @@
<!-- <div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item active">OQS</li>
<span class="float-right">
<%= link_to 'Back', oqs_root_path %>

View File

@@ -1,9 +1,9 @@
<!-- <div class="container-fluid">
<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item active">CRM</li> -->
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
<!-- <li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li> -->
<!-- <span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
@@ -82,7 +82,7 @@
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
<td>
<% if crm_customer.customer_id != "" && crm_customer.customer_id != "" %>
<% if crm_customer.customer_id != "" && crm_customer.customer_id != "" %>
<%= @i += 1 %>
<%else%>
-
@@ -354,12 +354,12 @@
</div>
</div>
</div>
</div>
</div>
<div id="sxModal">
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
</div>
@@ -368,6 +368,8 @@
var page = "<%= @page %>";
var paypar_account_no = [];
$(function() {
setHeaderBreadCrumb(_CUSTOMERS_);
paypar_account_no = JSON.parse('<%= @paypar_accountno.to_json.html_safe %>', function (key, value) {
var type;
if (value && typeof value === 'object') {
@@ -378,7 +380,7 @@
}
return value;
});
console.log(paypar_account_no);
/* check webview loaded*/
var webview = <%= @webview %>;
showHideNavbar(webview);
@@ -396,55 +398,15 @@
$("#paypar_account_no").on('focus', function(e){
if($(this).val() == ''){
$("#sxModal").show();
setTimeout(function(){
getCardNo();
},100);
getCardNo();
}
});
$(document).ready(function () {
setHeaderBreadCrumb(_CUSTOMERS_);
});
// Read Card Reader
$("#member_acc_no").on('click', function(e){
localStorage.setItem("member_card",true);
var cardNo = "";
var customer_id = '';
var customer_name = '';
var sale_id = $("#sale_id").val() || 0;
var customer_mamber_card_no = 0;
$("#sxModal").show();
setTimeout(function(){
getCardNo();
customer_mamber_card_no = $("#search").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/get_customer" ,
data: { filter : customer_mamber_card_no ,type :"card"},
dataType: "json",
success: function(data) {
if (data[0].customer_id == false) {
swal("Alert!", data[0].message, "error");
// $.alert({
// title: 'Alert!',
// content: data[0].message,
// type: 'red',
// typeAnimated: true,
// btnClass: 'btn-danger',
// });
}else{
customer_id = data[0].customer_id;
customer_name = data[0].name;
update_sale(customer_id, customer_name,sale_id);
}
}
});
}
},100);
getCardNo();
});
/*new customer UI func:*/
@@ -453,7 +415,6 @@
//Wizard
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
var $target = $(e.target);
if ($target.parent().hasClass('disabled')) {
@@ -467,6 +428,7 @@
nextTab($active);
$('.wizard .nav-tabs li.active .connecting-line').css({"border-bottom-left-radius": 0, "border-top-left-radius": 0});
});
$(".prev-step").click(function (e) {
var $active = $('.wizard .nav-tabs li a.active');
@@ -478,17 +440,19 @@
/*customer UI tab btn*/
function nextTab(elem) {
$(elem).parent().next().find('a[data-toggle="tab"]').click();
$(elem).parent().next().find('a[data-toggle="tab"]').click();
}
function prevTab(elem) {
$(elem).parent().prev().find('a[data-toggle="tab"]').click();
$(elem).parent().prev().find('a[data-toggle="tab"]').click();
}
/*customer UI tab btn*/
// Read NFC card no from java
function getCardNo(){
code2lab.readNFC();
if (typeof code2lab != 'undefined') {
code2lab.readNFC();
}
}
// get CardNo from Java
@@ -499,6 +463,7 @@
$("#paypar_account_no").val(cardNo);
$("#search").val(cardNo);
$("#type").val("card");
get_customer();
}else{
if($.inArray(cardNo, paypar_account_no) !== -1){
swal({
@@ -520,47 +485,76 @@
}
$("#sxModal").hide();
}
$("#sxModal").hide();
}
function get_customer() {
var cardNo = "";
var customer_id = '';
var customer_name = '';
var sale_id = $("#sale_id").val() || 0;
var customer_mamber_card_no = $("#search").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
$('#loading_wrapper').show();
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/get_customer" ,
data: { filter : customer_mamber_card_no ,type :"card"},
dataType: "json",
success: function(data) {
if (data[0].customer_id == false) {
swal("Alert!", data[0].message, "error");
}else{
customer_id = data[0].customer_id;
customer_name = data[0].name;
update_sale(customer_id, customer_name,sale_id);
}
$('#loading_wrapper').hide();
}
});
}
}
// QR Code Reader
$("#qr_code").on('click', function(e){
var code = "";
var customer_id = '';
var customer_name = '';
var sale_id = $("#sale_id").val() || 0;
var customer_mamber_card_no = 0;
var code = "";
var customer_id = '';
var customer_name = '';
var sale_id = $("#sale_id").val() || 0;
var customer_mamber_card_no = 0;
setTimeout(function(){
code=getQRCode();
setQRCode(code);
}, 100);
setTimeout(function(){
code=getQRCode();
setQRCode(code);
}, 100);
customer_mamber_card_no = $("#search").val();
customer_mamber_card_no = $("#search").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/get_customer" ,
data: { filter : customer_mamber_card_no ,type :"card"},
dataType: "json",
success: function(data) {
if (data[0].customer_id == false) {
swal("Alert!", data[0].message, "error");
// $.alert({
// title: 'Alert!',
// content: data[0].message,
// type: 'red',
// typeAnimated: true,
// btnClass: 'btn-danger',
// });
}else{
customer_id = data[0].customer_id;
customer_name = data[0].name;
update_sale(customer_id, customer_name,sale_id);
}
if(sale_id != 0 && customer_mamber_card_no != 0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/get_customer" ,
data: { filter : customer_mamber_card_no ,type :"card"},
dataType: "json",
success: function(data) {
if (data[0].customer_id == false) {
swal("Alert!", data[0].message, "error");
// $.alert({
// title: 'Alert!',
// content: data[0].message,
// type: 'red',
// typeAnimated: true,
// btnClass: 'btn-danger',
// });
}else{
customer_id = data[0].customer_id;
customer_name = data[0].name;
update_sale(customer_id, customer_name,sale_id);
}
});
}
}
});
}
});
// Read qrcode from java
@@ -575,81 +569,75 @@
}
$(document).on('click',".customer_tr",function(){
// if(this.checked){
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
var sale_id = $("#sale_id").val() || 0;
var customer_id = $(this).attr('data-ref');
var customer_name = $(this).children("td:nth-child(3)").text();
console.log(sale_id);
if(sale_id != 0){
// var url = "/"+customer_id;
update_sale(customer_id, customer_name,sale_id);
}else{
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
var sale_id = $("#sale_id").val() || 0;
var customer_id = $(this).attr('data-ref');
var customer_name = $(this).children("td:nth-child(3)").text();
var url = "customers/"+customer_id;
}
if(sale_id != 0){
update_sale(customer_id, customer_name,sale_id);
}else{
var url = "customers/"+customer_id;
}
// Need To Clean?
$.ajax({
type: "GET",
url: url,
data: {},
dataType: "json",
success: function(data) {
var taxes = JSON.stringify(data.tax_profiles);
var parse_taxes = JSON.parse(taxes);
$.each(parse_taxes, function(i, value){
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected");
});
// Need To Clean?
$.ajax({
type: "GET",
url: url,
data: {},
dataType: "json",
success: function(data) {
var taxes = JSON.stringify(data.tax_profiles);
var parse_taxes = JSON.parse(taxes);
$.each(parse_taxes, function(i, value){
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected");
});
$('#customer_id').val(data.id);
$('#customer_name').val(data.name);
$('#customer_company').val(data.company);
$('#customer_contact_no').val(data.contact_no);
$('#customer_email').val(data.email);
$('#customer_date_of_birth').val(data.date_of_birth);
$('#customer_membership_type').val(data.membership_type);
$('.select > option[value="'+data.membership_id+'"]').attr('selected','selected');
$('.membership_authentication_code').val(data.membership_authentication_code);
$('#customer_card_no').val(data.card_no);
$('#customer_type').val(data.customer_type);
$('#customer_salutation').val(data.salutation);
$('#customer_nrc_no').val(data.nrc_no);
$('#paypar_account_no').val(data.paypar_account_no);
$('#customer_id').val(data.id);
$('#customer_name').val(data.name);
$('#customer_company').val(data.company);
$('#customer_contact_no').val(data.contact_no);
$('#customer_email').val(data.email);
$('#customer_date_of_birth').val(data.date_of_birth);
$('#customer_membership_type').val(data.membership_type);
$('.select > option[value="'+data.membership_id+'"]').attr('selected','selected');
$('.membership_authentication_code').val(data.membership_authentication_code);
$('#customer_card_no').val(data.card_no);
$('#customer_type').val(data.customer_type);
$('#customer_salutation').val(data.salutation);
$('#customer_nrc_no').val(data.nrc_no);
$('#paypar_account_no').val(data.paypar_account_no);
if (data.gender == 'Male') {
$('.male').prop( "checked", true )
}else{
$('.female').prop( "checked", true )
}
if (data.gender == 'Male') {
$('.male').prop( "checked", true )
}else{
$('.female').prop( "checked", true )
}
if (data.salutation == 'Mr') {
$('.mr').prop( "checked", true )
} else if(data.salutation == 'Miss') {
$('.miss').prop( "checked", true )
}else if(data.salutation == 'Mrs'){
$('.mrs').prop( "checked", true )
}else{
$('.mdm').prop( "checked", true )
}
if (data.salutation == 'Mr') {
$('.mr').prop( "checked", true )
} else if(data.salutation == 'Miss') {
$('.miss').prop( "checked", true )
}else if(data.salutation == 'Mrs'){
$('.mrs').prop( "checked", true )
}else{
$('.mdm').prop( "checked", true )
}
$('#update_customer').removeAttr('disabled').val('');
$('#update_customer').attr('value', 'Update');
// $('#submit_customer').attr('disabled','disabled');
$('#update_customer').removeAttr('disabled').val('');
$('#update_customer').attr('value', 'Update');
// $('#submit_customer').attr('disabled','disabled');
$("#new_customer").attr('class', 'simple_form edit_customer');
var id = "edit_customer_"+$('#customer_id').val();
$("#new_customer").attr('id', id);
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
$(".patch_method").append('<input type="hidden" name="_method" value="patch">');
//$(".edit_customer").attr('method', 'PATCH');
}
});
// }else{
// }
})
$("#new_customer").attr('class', 'simple_form edit_customer');
var id = "edit_customer_"+$('#customer_id').val();
$("#new_customer").attr('id', id);
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
$(".patch_method").append('<input type="hidden" name="_method" value="patch">');
//$(".edit_customer").attr('method', 'PATCH');
}
});
})
function update_sale(customer_id, customer_name, sale_id) {
var customer="";

View File

@@ -106,19 +106,14 @@
<div class="col-lg-1 col-md-1 col-sm-1">
<button type="button" class="btn bg-default m-t-10 btn-lg btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/<%= @cashier_type %>/payment/others_payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
</div>
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
</div>
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
</div>
<!-- customer light box -->
@@ -145,10 +140,10 @@
<div class="modal-footer"></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var cashier_type = "<%= @cashier_type %>";
var cashier_type = "<%= @cashier_type %>";
$(document).ready(function() {
setHeaderBreadCrumb(_DINGA_);
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
@@ -251,75 +246,10 @@
});
// Read Card Reader
$(".btn_member").on('click', function(){
var cardNo = "";
var customer_id = '';
var customer_name = '';
var membership_id = '';
var membership_type = '';
var sale_id = $("#sale_id").text() || 0;
var receipt_no = $("#receipt_no").text() || 0;
var customer_mamber_card_no = 0;
$(".btn_member").on('click', function(){
$("#is_paymemberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
customer_mamber_card_no = $("#paypar_account_no").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/send_account" ,
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
dataType: "json",
success: function(data) {
console.log(data)
if (data.status == true) {
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
$("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
$.ajax({
type: "POST",
url: "<%=origami_payment_dinga_path%>",
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no :customer_mamber_card_no},
success: function(result){
console.log(result)
if(result.status == true){
swal({
title: "Information!",
text: result.message,
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
});
}else{
swal ( "Opps",result.message ,"warning" );
}
}
});
}else{
swal({
title: 'Oops',
text: data.message.toString(),
type: 'error',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/DINGA";
});
}
}
});
}
},100);
$("#sxModal").show();
getCardNo();
});
// Read NFC card no from java
@@ -331,22 +261,85 @@
function setCardNo(cardNo){
if(cardNo.length == 16){
$("#paypar_account_no").val(cardNo);
$("#sxModal").hide();
send_account();
}
$("#sxModal").hide();
}
function send_account() {
var cardNo = "";
var customer_id = '';
var customer_name = '';
var membership_id = '';
var membership_type = '';
var sale_id = $("#sale_id").text() || 0;
var receipt_no = $("#receipt_no").text() || 0;
var customer_mamber_card_no = $("#paypar_account_no").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/send_account" ,
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
dataType: "json",
success: function(data) {
console.log(data)
if (data.status == true) {
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
$("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
$.ajax({
type: "POST",
url: "<%=origami_payment_dinga_path%>",
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no :customer_mamber_card_no},
success: function(result){
console.log(result)
if(result.status == true){
swal({
title: "Information!",
text: result.message,
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
});
}else{
swal ( "Opps",result.message ,"warning" );
}
}
});
}else{
swal({
title: 'Oops',
text: data.message.toString(),
type: 'error',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/DINGA";
});
}
}
});
}
}
// QR Code Reader
$(".btn_qr_code").on('click', function(e){
$("#is_memberModal").hide();
var code = "";
var code = "";
var customer_id = '';
var customer_name = '';
var membership_id = '';
var membership_type = '';
var membership_type = '';
var receipt_no = $("#receipt_no").text() || 0;
setTimeout(function(){
code=getQRCode();
if(sale_id != 0 && code != ""){
if(sale_id != 0 && code != ""){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/send_account" ,
@@ -394,15 +387,15 @@
});
}
}
});
}
});
}
},100);
});
// Read qrcode from java
function getQRCode(){
return code2lab.readQRCode();
$("#qr_code").val(code);
$("#qr_code").val(code);
}
function update_sale(membership_id, customer_id, customer_name, sale_id) {
@@ -437,7 +430,7 @@
location.reload();
}
}
});
});
});
}

View File

@@ -110,11 +110,11 @@
</div>
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
</div>
<!-- customer light box -->
@@ -141,10 +141,10 @@
<div class="modal-footer"></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var cashier_type = "<%= @cashier_type %>";
var cashier_type = "<%= @cashier_type %>";
$(document).ready(function() {
setHeaderBreadCrumb(_PAYMAL_);
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
@@ -247,75 +247,10 @@
});
// Read Card Reader
$(".btn_member").on('click', function(){
var cardNo = "";
var sale_id = $("#sale_id").text() || 0;
var receipt_no = $("#receipt_no").val() || "";
var customer_mamber_card_no = 0;
var payment_amount = parseFloat($("#used_amount").text());
$(".btn_member").on('click', function(){
$("#is_paymemberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
customer_mamber_card_no = $("#paypar_account_no").val();
if (customer_mamber_card_no == 0) {
customer_mamber_card_no = $("#membership_id").text() || 0;
}
if(sale_id != 0 && customer_mamber_card_no !=0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/send_account" ,
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
dataType: "json",
success: function(data) {
if (data.status == true) {
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
$("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
$.ajax({
type: "POST",
url: "<%=origami_payment_paymal_path%>",
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
success: function(result){
if(result.status == true){
swal({
title: "Information!",
text: result.message,
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
});
}else{
swal ( "Opps",result.message ,"warning" );
}
}
});
}else{
swal({
title: 'Oops',
text: data.message.toString(),
type: 'error',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/PAYMAL";
});
}
}
});
}else{
swal("Opp","Please Check Member","warning")
}
},100);
$("#sxModal").show();
getCardNo();
});
// Read NFC card no from java
@@ -327,20 +262,85 @@
function setCardNo(cardNo){
if(cardNo.length == 16){
$("#paypar_account_no").val(cardNo);
$("#sxModal").hide();
$("#sxModal").hide();
}
$("#sxModal").hide();
}
function send_account() {
var cardNo = "";
var sale_id = $("#sale_id").text() || 0;
var receipt_no = $("#receipt_no").val() || "";
var payment_amount = parseFloat($("#used_amount").text());
var customer_mamber_card_no = $("#paypar_account_no").val();
if (customer_mamber_card_no == 0) {
customer_mamber_card_no = $("#membership_id").text() || 0;
}
if(sale_id != 0 && customer_mamber_card_no !=0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/send_account" ,
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
dataType: "json",
success: function(data) {
if (data.status == true) {
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
$("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
$.ajax({
type: "POST",
url: "<%=origami_payment_paymal_path%>",
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
success: function(result){
if(result.status == true){
swal({
title: "Information!",
text: result.message,
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
});
}else{
swal ( "Opps",result.message ,"warning" );
}
}
});
}else{
swal({
title: 'Oops',
text: data.message.toString(),
type: 'error',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/PAYMAL";
});
}
}
});
}else{
swal("Opp","Please Check Member","warning")
}
}
// QR Code Reader
$(".btn_qr_code").on('click', function(e){
$("#is_paymemberModal").hide();
var code = "";
var code = "";
var sale_id = $("#sale_id").text() || 0;
var receipt_no = $("#receipt_no").val() || "";
var payment_amount = parseFloat($("#used_amount").text());
setTimeout(function(){
code=getQRCode();
if(sale_id != 0 && code != ""){
code=getQRCode();
if(sale_id != 0 && code != ""){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/send_account" ,
@@ -387,15 +387,15 @@
});
}
}
});
}
});
}
},100);
});
// Read qrcode from java
function getQRCode(){
return code2lab.readQRCode();
$("#qr_code").val(code);
$("#qr_code").val(code);
}
$("#sxModal .btn_cancel").on('click',function(){

View File

@@ -1109,42 +1109,9 @@ $(document).ready(function(){
// Read Card Reader
$(".btn_member").on('click', function(){
var cardNo = "";
var customer_id = '';
var customer_name = '';
var membership_id = '';
var membership_type = '';
var sale_id = $("#sale_id").text() || 0;
var customer_mamber_card_no = 0;
$("#is_memberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
customer_mamber_card_no = $("#paypar_account_no").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/get_customer" ,
data: { filter : customer_mamber_card_no ,type :"card"},
dataType: "json",
success: function(data) {
if (data[0].customer_id == false) {
swal("Alert!", data[0].message, "error");
}else{
customer_id = data[0].customer_id;
customer_name = data[0].name;
membership_id = data[0].membership_id;
membership_type = data[0].membership_type;
update_sale(membership_id, customer_id, customer_name,sale_id);
}
}
});
}
},100);
getCardNo();
});
// Read NFC card no from java
@@ -1158,6 +1125,132 @@ $(document).ready(function(){
function setCardNo(cardNo){
if(cardNo.length == 16){
$("#paypar_account_no").val(cardNo);
if (cashier_type == "food_court") {
send_account();
} else {
get_customer();
}
}
$("#sxModal").hide();
}
function get_customer() {
var cardNo = "";
var customer_id = '';
var customer_name = '';
var membership_id = '';
var membership_type = '';
var sale_id = $("#sale_id").text() || 0;
var customer_mamber_card_no = $("#paypar_account_no").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
$('#loading_wrapper').show();
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/get_customer" ,
data: { filter : customer_mamber_card_no ,type :"card"},
dataType: "json",
success: function(data) {
if (data[0].customer_id == false) {
swal("Alert!", data[0].message, "error");
}else{
customer_id = data[0].customer_id;
customer_name = data[0].name;
membership_id = data[0].membership_id;
membership_type = data[0].membership_type;
update_sale(membership_id, customer_id, customer_name,sale_id);
}
$('#loading_wrapper').hide();
}
});
}
}
function send_account() {
var cardNo = "";
var sale_id = $("#sale_id").text() || 0;
var receipt_no = "";
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){
receipt_no = ($("#receipt_no").html()).trim();
}
var payment_amount = parseFloat($("#grand_total").text());
var customer_mamber_card_no = $("#paypar_account_no").val();
if (customer_mamber_card_no == 0) {
customer_mamber_card_no = $("#membership_id").text() || 0;
}
if(sale_id != 0 && customer_mamber_card_no !=0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/send_account" ,
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
dataType: "json",
success: function(data) {
if (data.status == true) {
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
// $("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
$.ajax({
type: "POST",
url: "<%=origami_payment_paymal_path%>",
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
success: function(result){
if(result.status == true){
swal({
title: "Information!",
text: result.message,
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
});
}else{
swal({
title: 'Oops',
text: result.message,
type: 'warning',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
});
}
}
});
}else{
swal({
title: 'Oops',
text: data.message.toString(),
type: 'error',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
});
}
}
});
}else{
swal({
title: 'Oops',
text: 'Please Check Member',
type: 'warning',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
});
}
}
@@ -1216,6 +1309,7 @@ $(document).ready(function(){
cancelButtonClass: 'btn btn-danger',
closeOnConfirm: false,
}, function () {
$('#loading_wrapper').show();
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/"+cashier_type+"/customers/update_sale" ,
@@ -1511,104 +1605,15 @@ $(document).ready(function(){
$("#customer_name").on("click",function(){
//start customer modal popup
if((cashier_type=='quick_service' || cashier_type=='food_court') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
}
});
// Read Card Reader - Paymal payment for FoodCourt
$(".btn_paymal_member").on('click', function (){
var cardNo = "";
var sale_id = $("#sale_id").text() || 0;
var receipt_no = "";
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){
receipt_no = ($("#receipt_no").html()).trim();
}
var customer_mamber_card_no = 0;
var payment_amount = parseFloat($("#grand_total").text());
$("#is_paymemberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
customer_mamber_card_no = $("#paypar_account_no").val();
if (customer_mamber_card_no == 0) {
customer_mamber_card_no = $("#membership_id").text() || 0;
}
if(sale_id != 0 && customer_mamber_card_no !=0){
$.ajax({
type: "POST",
url: "/origami/"+sale_id+"/send_account" ,
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
dataType: "json",
success: function(data) {
if (data.status == true) {
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
// $("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
$.ajax({
type: "POST",
url: "<%=origami_payment_paymal_path%>",
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
success: function(result){
if(result.status == true){
swal({
title: "Information!",
text: result.message,
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
});
}else{
swal({
title: 'Oops',
text: result.message,
type: 'warning',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
});
}
}
});
}else{
swal({
title: 'Oops',
text: data.message.toString(),
type: 'error',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
});
}
}
});
}else{
swal({
title: 'Oops',
text: 'Please Check Member',
type: 'warning',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
});
}
},100);
getCardNo();
});
// QR Code Reader

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">

View File

@@ -1,7 +1,7 @@
<!-- -->
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">

View File

@@ -1,3 +1,12 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= print_settings_path %>"><%= t("views.right_panel.header.print_settings") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
</span>
</ol>
</div>
<%= render 'form', print_setting: @print_setting %>

View File

@@ -1,9 +1,16 @@
<p id="notice"><%= notice %></p>
<% breadcrumb_add t("views.right_panel.header.print_settings"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.header.print_settings") %></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="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_print_setting_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
</div>
@@ -43,7 +50,7 @@
<!-- <td><%= print_setting.delimiter %></td> -->
<!-- <td><%= print_setting.heading_space %></td> -->
<td>
<%= link_to t("views.btn.show"), print_setting,:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.show"), print_setting,:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.edit"), edit_print_setting_path(print_setting),:class => 'btn btn-info btn-sm waves-effect' %></td>
</tr>
<% end %>
@@ -77,7 +84,6 @@
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>
</div>

View File

@@ -1,4 +1,12 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= print_settings_path %>"><%= t("views.right_panel.header.print_settings") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
</span>
</ol>
</div>
<%= render 'form', print_setting: @print_setting %>

View File

@@ -1,4 +1,13 @@
<% breadcrumb_add t("views.right_panel.header.print_settings"), print_settings_path, print_settings_path, t('details') %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= print_settings_path %>"><%= t("views.right_panel.header.print_settings") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="card">
@@ -68,7 +77,7 @@
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span>
</td>
</tr>
@@ -83,7 +92,7 @@
<div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
<p>
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.print_settings_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.print_settings_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
2) <%= t("views.right_panel.detail.unique_code") %> - <%= t("views.right_panel.detail.unique_code_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
3) <%= t("views.right_panel.detail.template") %> - <%= t("views.right_panel.detail.template_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
4) <%= t("views.right_panel.detail.printer_name") %> - <%= t("views.right_panel.detail.printer_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
@@ -104,10 +113,6 @@
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
</p>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.cb_payments") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.cb_payments") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.commission_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.commission_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<!-- <div class="container"> -->

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.credit_payment_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.credit_payment_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<!-- <div class="container"> -->
<%= render :partial=>'shift_sale_report_filter',
:locals=>{ :period_type => true, :filter_for_credit => true, :shift_name => true, :report_path =>reports_credit_payment_index_path} %>

View File

@@ -0,0 +1,144 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control m-t-3" style="height: 32px;>
<option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t :customer_name %></label>
<input type="text" placeholder="Customer name" class="form-control m-t-3" name="customer" value="<%= params[:customer] %>" id="customer_filter" style="height: 32px;">
</div>
<% if defined? @membership_type %>
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.select_member_group") %></label>
<select name="membership_type" id="membership_type" class="form-control m-t-3" style="height: 32px;">
<option value="0">--- All Group ---</option>
<% @membership_type.each do |mt| %>
<option class="<%=mt.name.downcase%>" value="<%=mt.value%>"><%=mt.name%></option>
<%end %>
</select>
</div>
<% end %>
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select m-t-3" name="shift_name" id="shift_name" style="height: 32px;">
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-style mbl-right-btn" style="margin-top: 20px;">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(function(){
$('#custom_excel').hide();
$('#custom_excel').click(function(){
var url = $('#custom_excel').attr('data-url');
$('#frm_report').attr('action',url)
$('#frm_report').submit();
// window.location = url;
});
var item = $('#item').val();
var payment_type = $('#payment_type');
if(item == 'order'){
$('#cashier').hide();
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
}
}
else if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
}
else{
$('#waiter').hide();
$('#cashier').show();
$("#item").val('sale');
}
});
<% if params[:shift_name].to_i > 0%>
shift_id = '<%= params[:shift_name] %>'
local_date = '<%= @shift_from %> - <%= @shift_to %> '
var shift = $('#shift_name');
str = '<option value="'+ shift_id +'" '+ 'selected = "selected"' +'>' + local_date + '</option>';
shift.append(str);
<% end %>
$("#from").val("<%=params[:from] rescue '-'%>");
$("#to").val("<%=params[:to] rescue '-'%>");
$("#sel_period").val(<%=params[:period] rescue '-'%>);
$("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
$(".<%=params[:payment_type]%>").attr('selected','selected')
// shift = $(".shift-id").text()
// if (shift.length>0) {
// $('.shift_name > option[value="'+shift+'"]').attr('selected','selected');
// }
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
$("#rd_period_type_1").attr("checked","checked");
<% else %>
$("#rd_period_type_0").attr("checked","checked");
<% end %>
$(".btn-group button").removeClass("active");
<% report_type = params[:report_type].blank? ? "0" : params[:report_type] %>
$("#btn_report_type_<%= report_type %>").addClass("active");
$('#item').change(function(){
var item = $('#item').val();
var payment_type = $('#payment_type');
if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
if(payment_type){
$('#payment_type').show();
}
}
else{
$('#cashier').hide();
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
}
}
});
</script>

View File

@@ -0,0 +1,286 @@
<style>
.header-label{
font-weight: 900;
}
</style>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.customer_sales_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<!-- <div class="container"> -->
<%= render :partial=>'shift_sale_report_filter',
:locals=>{ :period_type => true, :shift_name => true,:payments => true, :report_path =>reports_customer_index_path} %>
<hr />
<!-- </div> -->
<!-- <div class="container"> -->
<!-- <div class="row"> -->
<div class="text-right">
<a href="javascript:export_to('<%=reports_customer_index_path%>.xls')" class = "btn btn-info wave-effects"><%= t("views.btn.exp_to_excel") %></a>
</div>
<!-- </div> -->
<!-- </div> -->
<div class="margin-top-20 mbl-table">
<div class="card mbl-table-card">
<table class="table table-striped" border="0">
<thead>
<tr>
<th colspan="11"> <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
</tr>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<th colspan="10"><%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
<th><%= t("views.right_panel.detail.dining") %></th>
<th><%= t("views.right_panel.detail.receipt_no") %></th>
<th><%= t :customer %></th>
<th><%= t :cashier %></th>
<th><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></th>
<th><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> </th>
<% @tax_profiles.each do |tax| %>
<th><%= tax.name %></th>
<% end %>
<th><%= t("views.right_panel.detail.grand_total") %></th>
<th><%= t("views.right_panel.detail.rnd_adj_sh") %></th>
<th><%= t("views.right_panel.detail.grand_total") %> +<br/>
<%= t("views.right_panel.detail.rnd_adj_sh") %>
</th>
</tr>
</thead>
<tbody>
<% t_grand_total = 0 %>
<% t_old_grand_total = 0 %>
<% t_total_sum = 0 %>
<% t_discount_amt = 0 %>
<% t_rounding_adj = 0%>
<% if !@sale_data.nil? %>
<% @sale_data.each do |member_group| %>
<% grand_total = 0 %>
<% old_grand_total = 0 %>
<% total_tax = [] %>
<% total_sum = 0 %>
<% discount_amt = 0 %>
<% rounding_adj = 0%>
<thead>
<tr>
<%if member_group[0].nil?%>
<th colspan="10"> <span class="header-label">Group Type : Normal</span></th>
<%else%>
<th colspan="10"> <span class="header-label">Group Type : <%= Lookup.where(:lookup_type=>'membership_type', :value=>member_group[0]).last.name %></span></th>
<%end%>
</tr>
</thead>
<% member_group[1].each do |result|%>
<% grand_total += result.grand_total.to_f %>
<% t_grand_total += result.grand_total.to_f %>
<% old_grand_total += result.grand_total.to_f - result.rounding_adjustment.to_f %>
<% t_old_grand_total += result.grand_total.to_f - result.rounding_adjustment.to_f%>
<% total_sum += result.total_amount.to_f %>
<% t_total_sum += result.total_amount.to_f %>
<% discount_amt += result.total_discount.to_f %>
<% t_discount_amt += result.total_discount.to_f %>
<% rounding_adj += result.rounding_adjustment.to_f %>
<% t_rounding_adj += result.rounding_adjustment.to_f %>
<tr>
<td>
<%if result.type %>
<%= result.type %> - <%= result.name %>
<% else %>
-
<% end %>
</td>
<td><%= result.receipt_no rescue '-' %> </td>
<td><%= result.customer_name rescue '-' %></td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%= number_format(result.total_amount, precision: precision.to_i, delimiter: delimiter) %></td>
<td><%= number_format(result.total_discount, precision: precision.to_i, delimiter: delimiter) rescue '0' %></td>
<% @tax_profiles.each do |tax| %>
<%tax_value=0%>
<% if sale_tax = result.sale_taxes.find { |sale_tax| sale_tax.tax_name == tax.name } %>
<%tax_value=sale_tax.tax_payable_amount%>
<td><%= number_format(sale_tax.tax_payable_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %> </td>
<% else %>
<td><%= number_format(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
<% end %>
<%total_tax << {
tax.name => tax_value
}%>
<% end %>
<td><%= number_format(result.grand_total - result.rounding_adjustment, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
<td><%= number_format(result.rounding_adjustment.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
<td><%= number_format(result.grand_total, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
</tr>
<% end %>
<tr>
<% total_tax = total_tax.reduce {|acc, h| acc.merge(h) {|_,v1,v2| v1 + v2 }}%>
<td colspan="4">&nbsp;</td>
<td><b><%= number_format(total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<td><b><%= number_format(discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<% @tax_profiles.each do |tax| %>
<%if total_tax.has_key?(tax.name)%>
<td><b><%= number_format(total_tax[tax.name], precision: precision.to_i, delimiter: delimiter) rescue '-' %> </b></td>
<%end%>
<% end %>
<td><b><%= number_format(old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %></b></td>
<td><b><%= number_format(rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<td><b><%= number_format(grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
</tr>
<tr>
<td colspan="11">&nbsp;</td>
</tr>
<%end%>
<tr style="border-top:4px double #666;">
<td colspan="4">&nbsp;</td>
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></td>
<td><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %></td>
<% @tax_profiles.each do |tax| %>
<td><%= tax.name %></td>
<% end %>
<td><%= t("views.right_panel.detail.grand_total") %></td>
<td><%= t("views.right_panel.detail.rnd_adj_sh") %></td>
<td><%= t("views.right_panel.detail.grand_total") %> +<br/>
<%= t("views.right_panel.detail.rnd_adj_sh") %>
</td>
</tr>
<%end%>
<tr>
<td colspan="4">&nbsp;</td>
<td><b><%= number_format(t_total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<td><b><%= number_format(t_discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<% @tax_profiles.each do |tax| %>
<% if sale_tax = @sale_taxes.find { |sale_tax| sale_tax.tax_name == tax.name } %>
<td><b><%= number_format(sale_tax.st_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %> </b></td>
<% else %>
<td><b><%= number_format(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<% end %>
<% end %>
<td><b><%= number_format(t_old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %></b></td>
<td><b><%= number_format(t_rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<td><b><%= number_format(t_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$(function(){
var check_arr = [];
search_by_period();
$('#sel_period').change(function(){
search_by_period();
});
function search_by_period(){
var period = $('#sel_period').val();
var period_type = 0;
var from = "";
var to = "";
show_shift_name(period,period_type,from,to,'shift_item');
}
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
new_date = new Date(date) ;
month = parseInt(new_date.getMonth()+1)
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
$('#from').val(from)
search_by_date();
});
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
new_date = new Date(date) ;
month = parseInt(new_date.getMonth()+1)
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
$('#to').val(to)
search_by_date();
});
function search_by_date(){
from = $("#from").val();
to = $("#to").val();
var period = 0;
var period_type = 1;
if(to != '' && from != ''){
shift_name = from + ',' + to;
check_arr.push(to);
if(check_arr.length == 1){
show_shift_name(period,period_type,from,to,'shift_item');
}
if(check_arr.length == 3){
check_arr = [];
}
}
}
function show_shift_name(period,period_type,from,to,shift_item){
var shift = $('#shift_name');
shift.empty();
var str = '';
var param_shift = '';
var param_shift = '<%= params[:shift_name] rescue '-'%>';
if (from == '' && to == '') {
from = $("#from").val();
to = $("#to").val();
}
url = '<%= reports_get_shift_by_date_path %>';
$.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){
str = '<option value="0">--- All Shift ---</option>';
$(data.message).each(function(index){
var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date;
var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date;
var shift_id = data.message[index].shift_id ;
if(param_shift != ''){
if(shift_id == param_shift){
selected = 'selected = "selected"';
}
else{
selected = '';
}
}else{
selected = '';
}
str += '<option value="'+ shift_id +'" '+ selected +'>' + local_date + '</option>';
// console.log(sh_date)
})
shift.append(str);
});
}
});
</script>

View File

@@ -0,0 +1,165 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-type" content="application/vnd.ms-excel; charset=UTF-8">
</head>
<body>
<div class="row">
<div class="col-md-12">
<div class="margin-top-20">
<div class="card">
<table class="table table-striped" border="0">
<thead>
<tr>
<th colspan="11"> <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
</tr>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<th colspan="10"><%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
<th><%= t("views.right_panel.detail.dining") %></th>
<th><%= t("views.right_panel.detail.receipt_no") %></th>
<th><%= t :customer %></th>
<th><%= t :cashier %></th>
<th><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></th>
<th><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> </th>
<% @tax_profiles.each do |tax| %>
<th><%= tax.name %></th>
<% end %>
<!-- <th>Other Amount</th> -->
<th><%= t("views.right_panel.detail.grand_total") %></th>
<th><%= t("views.right_panel.detail.rnd_adj_sh") %></th>
<th><%= t("views.right_panel.detail.grand_total") %> +<br/>
<%= t("views.right_panel.detail.rnd_adj_sh") %>
</th>
</tr>
</thead>
<tbody>
<% t_grand_total = 0 %>
<% t_old_grand_total = 0 %>
<% t_total_sum = 0 %>
<% t_discount_amt = 0 %>
<% t_rounding_adj = 0%>
<% if @sale_data %>
<% @sale_data.each do |member_group| %>
<% grand_total = 0 %>
<% old_grand_total = 0 %>
<% total_tax = [] %>
<% total_sum = 0 %>
<% discount_amt = 0 %>
<% rounding_adj = 0%>
<thead>
<tr>
<%if member_group[0].nil?%>
<td colspan="10"> <b>Group Type : Normal</b></td>
<%else%>
<td colspan="10"> <b>Group Type : <%= Lookup.where(:lookup_type=>'membership_type', :value=>member_group[0]).last.name %></b></td>
<%end%>
</tr>
</thead>
<% member_group[1].each do |result|%>
<% grand_total += result.grand_total.to_f %>
<% t_grand_total += result.grand_total.to_f %>
<% old_grand_total += result.grand_total.to_f - result.rounding_adjustment.to_f %>
<% t_old_grand_total += result.grand_total.to_f - result.rounding_adjustment.to_f%>
<% total_sum += result.total_amount.to_f %>
<% t_total_sum += result.total_amount.to_f %>
<% discount_amt += result.total_discount.to_f %>
<% t_discount_amt += result.total_discount.to_f %>
<% rounding_adj += result.rounding_adjustment.to_f %>
<% t_rounding_adj += result.rounding_adjustment.to_f %>
<tr>
<td>
<%if result.type %>
<%= result.type %> - <%= result.name %>
<% else %>
-
<% end %>
</td>
<td><%= result.receipt_no rescue '-' %> </td>
<td><%= result.customer_name rescue '-' %></td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%= number_format(result.total_amount, precision: precision.to_i, delimiter: delimiter) %></td>
<td><%= number_format(result.total_discount, precision: precision.to_i, delimiter: delimiter) rescue '0' %></td>
<% @tax_profiles.each do |tax| %>
<%tax_value=0%>
<% if sale_tax = result.sale_taxes.find { |sale_tax| sale_tax.tax_name == tax.name } %>
<%tax_value=sale_tax.tax_payable_amount%>
<td><%= number_format(sale_tax.tax_payable_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %> </td>
<% else %>
<td><%= number_format(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
<% end %>
<%total_tax << {
tax.name => tax_value
}%>
<% end %>
<td><%= number_format(result.grand_total - result.rounding_adjustment, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
<td><%= number_format(result.rounding_adjustment.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
<td><%= number_format(result.grand_total, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
</tr>
<% end %>
<tr>
<% total_tax = total_tax.reduce {|acc, h| acc.merge(h) {|_,v1,v2| v1 + v2 }}%>
<td colspan="4">&nbsp;</td>
<td><b><%= number_format(total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<td><b><%= number_format(discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<% @tax_profiles.each do |tax| %>
<%if total_tax.has_key?(tax.name)%>
<td><b><%= number_format(total_tax[tax.name], precision: precision.to_i, delimiter: delimiter) rescue '-' %> </b></td>
<%end%>
<% end %>
<td><b><%= number_format(old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %></b></td>
<td><b><%= number_format(rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<td><b><%= number_format(grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
</tr>
<tr>
<td colspan="11">&nbsp;</td>
</tr>
<%end%>
<tr style="border-top:4px double #666;">
<td colspan="4">&nbsp;</td>
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></td>
<td><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %></td>
<% @tax_profiles.each do |tax| %>
<td><%= tax.name %></td>
<% end %>
<td><%= t("views.right_panel.detail.grand_total") %></td>
<td><%= t("views.right_panel.detail.rnd_adj_sh") %></td>
<td><%= t("views.right_panel.detail.grand_total") %> +<br/>
<%= t("views.right_panel.detail.rnd_adj_sh") %>
</td>
</tr>
<%end%>
<tr>
<td colspan="4">&nbsp;</td>
<td><b><%= number_format(t_total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<td><b><%= number_format(t_discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<% @tax_profiles.each do |tax| %>
<% if sale_tax = @sale_taxes.find { |sale_tax| sale_tax.tax_name == tax.name } %>
<td><b><%= number_format(sale_tax.st_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b> </td>
<% else %>
<td><b><%= number_format(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<% end %>
<% end %>
<td><b><%= number_format(t_old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %></b></td>
<td><b><%= number_format(t_rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
<td><b><%= number_format(t_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.daily_sale_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>

View File

@@ -1,7 +1,7 @@
<div class="container-fluid">
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>

View File

@@ -1,6 +1,13 @@
<div class="container-fluid">
<% breadcrumb_add t("views.right_panel.detail.hourly_saleitem_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.hourly_saleitem_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<%= render :partial=>'hourly_saleitem_report_filter',

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.induty_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.induty_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<%= render :partial=>'shift_sale_report_filter',
@@ -9,11 +16,11 @@
<div class="text-right">
<a href="javascript:export_to('<%=reports_induty_index_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a>
</div>
</div>
<div class="margin-top-20">
<div class="card">
<div class="table-responsive">
<div class="table-responsive">
<table class="table table-striped" id="items_table" border="0">
<thead>
<tr>
@@ -21,9 +28,9 @@
</tr>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<% end %>
<th colspan="7"> <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
@@ -34,7 +41,7 @@
<th><%= t :table %></th>
<th><%= t("views.right_panel.detail.in_time") %></th>
<th><%= t("views.right_panel.detail.out_time") %></th>
</tr>
</tr>
</thead>
<tbody>
<% if !@induty_data.nil? %>
@@ -69,14 +76,14 @@
if(search){
if(parseInt(search) == 0){
search_by_period();
search_by_period();
}
else{
search_by_date();
search_by_date();
}
}else{
search_by_period();
}
search_by_period();
}
$('#sel_period').change(function(){
search_by_period();
@@ -88,8 +95,8 @@
var from = "";
var to = "";
show_shift_name(period,period_type,from,to,'shift_item');
}
show_shift_name(period,period_type,from,to,'shift_item');
}
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
@@ -105,13 +112,13 @@
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
$('#to').val(to)
search_by_date();
});
});
function search_by_date(){
from = $("#from").val();
to = $("#to").val();
var period = 0;
var period_type = 1;
var period_type = 1;
if(to != '' && from != ''){
shift_name = from + ',' + to;
@@ -119,7 +126,7 @@
check_arr.push(to);
if(check_arr.length == 1){
show_shift_name(period,period_type,from,to,'shift_item');
show_shift_name(period,period_type,from,to,'shift_item');
}
if(check_arr.length == 3){
check_arr = [];
@@ -138,12 +145,12 @@
var selected = '';
var str = '';
var param_shift = '<%= params[:shift_name]%>';
url = '<%= reports_get_shift_by_induty_path %>';
$.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){
str = '<option value="0">--- All Shift ---</option>';
$(data.message).each(function(index){
$(data.message).each(function(index){
var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date;
var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date;
@@ -154,21 +161,21 @@
selected = 'selected = "selected"';
}
else{
selected = '';
}
selected = '';
}
}
else{
selected = '';
}
selected = '';
}
str += '<option value="'+ shift_id +'" '+ selected +'>' + local_date + '</option>';
// console.log(sh_date)
})
})
shift.append(str);
});
}
});
</script>
</script>

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.order_reservation_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.order_reservation_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active">Payment Method Report</li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.product_sale_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.receipt_no_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.receipt_no_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">

View File

@@ -1,6 +1,13 @@
<div class="container-fluid">
<% breadcrumb_add t("views.right_panel.detail.receipt_no_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.receipt_no_report") %> Details</li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<%= render :partial=>'shift_sale_report_filter',

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.sale_item_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.sale_item_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<%= render :partial=>'shift_sale_report_filter',

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.shift_sale_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.shift_sale_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.staff_meal_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.staff_meal_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<%= render :partial=>'staff_meal_report_filter',

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add 'Stock Check Report', "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item active">Stock Check Report</li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.void_sale_report"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.void_sale_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-md-12">
<!-- <div class="container"> -->

View File

@@ -1,7 +1,7 @@
<div class="container-fluid">
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>

View File

@@ -1,7 +1,7 @@
<div class="container-fluid">
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">

View File

@@ -1,4 +1,13 @@
<% breadcrumb_add t("views.right_panel.detail.account"), '', dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.account") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), root_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">
@@ -29,7 +38,7 @@
<td><%= account.rebate %></td>
<td>
<%= link_to t("views.btn.show"), settings_account_path(account),:class => 'btn btn-info btn-sm waves-effect' %>
<%= link_to t("views.btn.edit"), edit_settings_account_path(account),:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.edit"), edit_settings_account_path(account),:class => 'btn btn-primary btn-sm waves-effect' %>
</td>
</tr>
<% end %>
@@ -62,7 +71,6 @@
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>
</div>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">

View File

@@ -1,7 +1,7 @@
<!-- -->
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>">Commissions</a></li>
<li class="breadcrumb-item active"><%= @commission.name %></li>
<span class="float-right">

View File

@@ -1 +1,11 @@
<%= render 'form', settings_cashier_terminal: @settings_cashier_terminal %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_cashier_terminals_path %>"><%= t("views.right_panel.header.cashier_terminal") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_cashier_terminals_path %>
</span>
</ol>
</div>
<%= render 'form', settings_cashier_terminal: @settings_cashier_terminal %>

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.header.cashier_terminal"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.header.cashier_terminal") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), root_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">
@@ -69,6 +76,6 @@
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>
</div>
</div>

View File

@@ -1 +1,11 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_cashier_terminals_path %>"><%= t("views.right_panel.header.cashier_terminal") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_cashier_terminals_path %>
</span>
</ol>
</div>
<%= render 'form', settings_cashier_terminal: @settings_cashier_terminal %>

View File

@@ -1,4 +1,13 @@
<% breadcrumb_add t("views.right_panel.header.cashier_terminal"), settings_cashier_terminals_path, settings_cashier_terminals_path, t('details') %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_cashier_terminals_path %>"><%= t("views.right_panel.header.cashier_terminal") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_cashier_terminals_path %>
</span>
</ol>
</div>
<br>
<div class="row">
@@ -79,7 +88,7 @@
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span>
</td>
</tr>
@@ -93,7 +102,7 @@
<div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
<p>
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.cashier_terminal_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.cashier_terminal_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
2) <%= t("views.right_panel.detail.is_active") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.is_active_txt") %> <br>
3) <%= t("views.right_panel.detail.is_currently_login") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.is_currently_login_txt") %> <br>
4) <%= t("views.right_panel.detail.auto_print_receipt") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.auto_print_receipt_txt") %> <br>
@@ -117,7 +126,6 @@
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.cashier_terminal_txt") %> <br>
</p>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1 +1,12 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissioners_path %>"><%= t("en.commissioners") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissioners_path %>
</span>
</ol>
</div>
<%= render 'form', commissioner: @commissioner %>

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t('commissioners'), '', dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("en.commissioners") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), root_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">
@@ -64,6 +71,6 @@
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>
</div>

View File

@@ -1,2 +1,12 @@
<%= render 'form', commissioner: @commissioner %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissioners_path %>"><%= t("en.commissioners") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissioners_path %>
</span>
</ol>
</div>
<%= render 'form', commissioner: @commissioner %>

View File

@@ -1,4 +1,13 @@
<% breadcrumb_add t('commissioners'), settings_commissioners_path, settings_commissioners_path, t("details") %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissioners_path %>"><%= t("en.commissioners") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissioners_path %>
</span>
</ol>
</div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
@@ -61,13 +70,13 @@
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -1 +1,11 @@
<%= render 'form', commission: @commission %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>"><%= t("en.commissions") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissions_path %>
</span>
</ol>
</div>
<%= render 'form', commission: @commission %>

View File

@@ -1,4 +1,12 @@
<% breadcrumb_add t('commissions'), '', dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("en.commissions") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
@@ -57,6 +65,6 @@
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>
</div>

View File

@@ -1 +1,11 @@
<%= render 'form', commission: @commission %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>"><%= t("en.commissions") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissions_path %>
</span>
</ol>
</div>
<%= render 'form', commission: @commission %>

View File

@@ -2,7 +2,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<% if @table %>
<li class="breadcrumb-item"><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
<% elsif @room %>

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<% if @table %>
<li class="breadcrumb-item"><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
<% elsif @room %>

View File

@@ -1 +1,12 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_employees_path %>"><%= t("views.right_panel.detail.employees") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_employees_path %>
</span>
</ol>
</div>
<%= render 'form', employee: @employee %>

View File

@@ -1,5 +1,12 @@
<% breadcrumb_add t("views.right_panel.detail.employee"), "", dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.employee") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), root_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">
@@ -69,6 +76,6 @@
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>
</div>

View File

@@ -1 +1,11 @@
<%= render 'form', employee: @employee %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_employees_path %>"><%= t("views.right_panel.detail.employees") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_employees_path %>
</span>
</ol>
</div>
<%= render 'form', employee: @employee %>

View File

@@ -1,4 +1,13 @@
<% breadcrumb_add t("views.right_panel.detail.employee"), settings_employees_path, settings_employees_path, t('details') %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_employees_path %>"><%= t("views.right_panel.detail.employee") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_employees_path %>
</span>
</ol>
</div>
<br>
@@ -60,7 +69,7 @@
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span>
<%end%>
</td>
@@ -75,7 +84,7 @@
<div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
<p>
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.employee_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.employee_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
2) <%= t("views.right_panel.detail.role") %> - <%= t("views.right_panel.detail.role_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
3) <%= t("views.right_panel.detail.created_at") %> - <%= t("views.right_panel.detail.created_at_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
4) <%= t("views.right_panel.detail.updated_at") %> - <%= t("views.right_panel.detail.updated_at_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
@@ -93,8 +102,6 @@
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
</p>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">

View File

@@ -1,11 +1,20 @@
<% breadcrumb_add t("views.right_panel.detail.item_set"), '', dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.item_set") %></li>
<span class="float-right">
<%= link_to t("views.btn.back"), root_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to (t :accounts), settings_accounts_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
@@ -76,7 +85,6 @@
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>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">

View File

@@ -1 +1,11 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_lookups_path %>">Lookup</a></li>
<li class="breadcrumb-item active">Edit</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_lookups_path %>
</span>
</ol>
</div>
<%= render 'form', settings_lookup: @settings_lookup %>

View File

@@ -1,4 +1,12 @@
<% breadcrumb_add 'LookUp', '', dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item active">LookUp</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
@@ -24,14 +32,14 @@
<td><%= settings_lookup.value %></td>
<!-- <td><%= link_to t("views.btn.show"), settings_lookup_path(settings_lookup),:class => 'btn btn-info btn-sm waves-effect' %></td> -->
<td>
<%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
<!-- <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_lookup_path(settings_lookup)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span> -->
</td>
@@ -62,7 +70,6 @@
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>
</div>

View File

@@ -1 +1,11 @@
<%= render 'form', settings_lookup: @settings_lookup %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_lookups_path %>">Lookup</a></li>
<li class="breadcrumb-item active">New</li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), settings_lookups_path %>
</span>
</ol>
</div>
<%= render 'form', settings_lookup: @settings_lookup %>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_lookups_path %>">Lookups</a></li>
<li class="breadcrumb-item active">Details</li>
<span class="float-right">

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">

View File

@@ -1,9 +1,9 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.setting_membership_actions") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
</span>
</ol>
</div>

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_membership_settings_path %>">Membership Setting</a></li>
<li class="breadcrumb-item active">Edit</li>
<span class="float-right">

View File

@@ -1,10 +1,10 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><%= t("views.right_panel.detail.membership_setting") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
</span>
</ol>
</div>

View File

@@ -1,7 +1,7 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_membership_settings_path %>">Membership Setting</a></li>
<li class="breadcrumb-item active">New</li>
<span class="float-right">

View File

@@ -1,9 +1,9 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><%= t("views.right_panel.detail.membership_setting") %></li>
<span class="float-right">
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
</span>
</ol>
</div>

View File

@@ -1 +1,12 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_categories_path %>"><%= t("views.right_panel.detail.menu_categories") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">
<%= link_to 'Back', settings_menu_categories_path %>
</span>
</ol>
</div>
<br>
<%= render 'form', settings_menu_category: @settings_menu_category %>

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.menu_category") %></li>
<span class="float-right">
<%= link_to 'Back', settings_menus_path %>

View File

@@ -1 +1,12 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_categories_path %>"><%= t("views.right_panel.detail.menu_categories") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">
<%= link_to 'Back', settings_menu_categories_path %>
</span>
</ol>
</div>
<br>
<%= render 'form', settings_menu_category: @settings_menu_category %>

View File

@@ -1,11 +1,20 @@
<% breadcrumb_add t("views.right_panel.header.menu_category"), settings_menu_categories_path, settings_menu_categories_path, t('details') %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_categories_path %>"><%= t("views.right_panel.detail.menu_category") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">
<%= link_to 'Back', settings_menu_categories_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to (t :accounts), settings_accounts_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
@@ -40,14 +49,14 @@
<!-- <td><%= @settings_menu_category.order_by %></td> -->
<td><%= @settings_menu_category.created_at.utc.getlocal.strftime("%Y-%m-%d") %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_menu_category_path(@settings_menu_category, @settings_menu_category),:class => 'btn btn-primary btn-sm waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_menu_category_path(@settings_menu_category)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span>
</td>
</tr>
@@ -158,6 +167,6 @@
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

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_item_attributes_path %>"><%= t("views.right_panel.header.menu_item_attributes") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">

View File

@@ -1,11 +1,19 @@
<% breadcrumb_add t("views.right_panel.header.menu_item_attributes"), '', dashboard_path %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.header.menu_item_attributes") %></li>
<span class="float-right">
<%= link_to 'Back', root_path %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
<div class="card">
<ul class="list-group">
<li class="list-group-item"><%= link_to (t :accounts), settings_accounts_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
@@ -21,7 +29,7 @@
<%= link_to t("views.btn.new"),new_settings_menu_item_attribute_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
</h4>
<hr>
<table class="table table-striped">
<thead>
<tr>
@@ -40,14 +48,14 @@
<td><%= settings_menu_item_attribute.value %></td>
<td>
<%= link_to t("views.btn.edit"), edit_settings_menu_item_attribute_path(settings_menu_item_attribute),:class => 'btn btn-primary btn-sm waves-effect' %>
<!-- <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_menu_item_attribute_path(settings_menu_item_attribute)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button> -->
<!-- Start Delete confirrm text !-->
<!-- <span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span> -->
</td>
</tr>
@@ -84,6 +92,6 @@
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

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_item_attributes_path %>"><%= t("views.right_panel.header.menu_item_attributes") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">

View File

@@ -1,6 +1,6 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_item_attributes_path %>"><%= t("views.right_panel.header.menu_item_attributes") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">

View File

@@ -0,0 +1,67 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_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,67 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_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")), root_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,69 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_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

@@ -1,3 +1,15 @@
<!-- <h1>Editing Settings Menu Item</h1>-->
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_category_simple_menu_item_path(@category,@item) %>"><%= t("views.right_panel.header.menu_item_instances") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">
<%= link_to 'Back', settings_menu_category_simple_menu_item_path(@category,@item) %>
</span>
</ol>
</div>
<br>
<%= render 'form', settings_simple_menu_item_menu_item_instances: @settings_menu_item_instances, item_sets: @item_sets %>

View File

@@ -1,3 +1,14 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_category_simple_menu_item_path(@category,@item) %>"><%= t("views.right_panel.header.menu_item_instances") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
<span class="float-right">
<%= link_to 'Back', settings_menu_category_simple_menu_item_path(@category,@item) %>
</span>
</ol>
</div>
<br>
<%= render 'form', settings_simple_menu_item_menu_item_instances: @settings_menu_item_instances, item_sets: @item_sets %>
<script>

View File

@@ -1,6 +1,14 @@
<% breadcrumb_add t("views.right_panel.header.menu_item"),settings_menu_category_simple_menu_item_path(@category,@item),
settings_menu_category_simple_menu_item_path(@category,@item),
t('details') %>
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_category_simple_menu_item_path(@category,@item) %>"><%= t("views.right_panel.header.menu_item") %></a></li>
<li class="breadcrumb-item active"><%= t :details %></li>
<span class="float-right">
<%= link_to 'Back', settings_menu_category_simple_menu_item_path(@category,@item) %>
</span>
</ol>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
@@ -9,7 +17,7 @@
<h4 class="card-title"><%= t("views.right_panel.header.menu_item_instances") %></h4>
<table class="table">
<tbody>
<tr><th><%= t("views.right_panel.detail.item_instance_code") %></th>
<td><%= @settings_menu_item_instances.item_instance_code %></td>
</tr>
@@ -31,11 +39,11 @@
<tr><th><%= t("views.right_panel.detail.is_default") %></th>
<td><%= @settings_menu_item_instances.is_default %></td>
</tr>
<tr><th><%= t("views.right_panel.detail.created_at") %></th>
<tr><th><%= t("views.right_panel.detail.created_at") %></th>
<td><%= @settings_menu_item_instances.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
</tr>
</tbody>
</tbody>
</table>
<% if params[:simple_menu_item_id] %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_simple_menu_item_menu_item_instance_path(@item, @settings_menu_item_instances)%>" data-method="delete">
@@ -44,7 +52,7 @@
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span>
<% else %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_simple_menu_item_menu_item_instance_path(@item, @settings_menu_item_instances)%>" data-method="delete">
@@ -53,7 +61,7 @@
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
<h6>This action can't be undo. </h6>
</span>
<% end %>
</div>
@@ -64,7 +72,7 @@
<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.item_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>
1) <%= t("views.right_panel.detail.item_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.name") %> - <%= t("views.right_panel.detail.menu_item_instance_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
3) <%= 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.is_on_promotion") %> - <%= t("views.right_panel.detail.menu_item_instance_txt") %> <%= t("views.right_panel.detail.is_on_promotion_txt") %> <br>
@@ -83,6 +91,6 @@
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
</p>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1 +1,11 @@
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item"><a href="<%= settings_menu_item_options_path %>"><%= t("views.right_panel.header.menu_item_options") %></a></li>
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
<span class="float-right">
<%= link_to 'Back', settings_menu_item_options_path %>
</span>
</ol>
</div>
<%= render 'form', settings_menu_item_option: @settings_menu_item_option %>

Some files were not shown because too many files have changed in this diff Show More