merge with august spring from phyo

This commit is contained in:
Yan
2017-08-09 18:10:06 +06:30
10 changed files with 180 additions and 167 deletions

View File

@@ -1,4 +1,4 @@
<div class="row">
<!-- <div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><a href="<%= crm_root_path %>">Home</a></li>
@@ -7,17 +7,17 @@
</li>
<!-- <a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right">
<i class="fa fa-plus-circle fa-lg"></i> Add Customer
</a> -->
</a>
</ol>
</div>
</div>
</div> -->
<div class="row">
<div class="col-lg-7 col-md-7 col-sm-7">
<div class="main-box-body clearfix">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
@@ -25,7 +25,7 @@
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
<div class="input-append col-md-7 form-group pull-left">
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control input-xs col-md-9">
<button type="submit" class="btn btn-primary btn-md">Search</button>
<button type="submit" class="btn btn-primary btn-md">Search</button>
<!-- <a href="modal-window" data-toggle= "modal" data-target="#modal-window" class="btn btn-primary btn-md" id="card_read" >Read Card</a> -->
<!-- <button type="button" class="btn btn-info btn-md" data-toggle="modal" data-target="#myModal">Open Modal</button> -->
@@ -48,12 +48,12 @@
<tbody>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
<td>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<%= @i += 1 %>
<% end %>
</td>
@@ -62,15 +62,15 @@
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
<td><%= link_to 'Show', crm_customer_path(crm_customer) %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= paginate @crm_customers %>
</div>
</div>
@@ -98,9 +98,9 @@ $(function() {
$('.datepicker').css('cursor','pointer');
// Read Card Reader
$("#member_acc_no").on('click', function(e){
var cardNo = "";
$("#sxModal").show();
$("#member_acc_no").on('click', function(e){
var cardNo = "";
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
@@ -120,13 +120,13 @@ $(document).on('click',".customer_tr",function(){
// var url = "/"+customer_id;
update_sale(customer_id,sale_id);
}else{
var url = "customers/"+customer_id;
}
$.ajax({
type: "GET",
url: url,
$.ajax({
type: "GET",
url: url,
data: {},
dataType: "json",
success: function(data) {
@@ -166,7 +166,7 @@ $(document).on('click',".customer_tr",function(){
}else{
$('.mdm').prop( "checked", true )
}
$('.membership_authentication_code').val(data.membership_authentication_code);
$('#update_customer').removeAttr('disabled').val('');
@@ -185,7 +185,7 @@ $(document).on('click',".customer_tr",function(){
}
});
// }else{
// }
})
@@ -194,44 +194,43 @@ $(document).on('click',".customer_tr",function(){
title: 'Confirm!',
content: 'Are You Sure to assign this customer!',
buttons: {
cancel: function () {
},
confirm: {
text: 'Confirm',
btnClass: 'btn-green',
keys: ['enter', 'shift'],
action: function(){
$.ajax({
type: "POST",
$.ajax({
type: "POST",
url: "update_sale/" ,
data: {customer_id:customer_id,sale_id:sale_id},
dataType: "json",
success: function(data) {
if(data.status == true)
{
{
window.location.href = '/origami'
}else{
alert('Record not found!');
location.reload();
}
}
}
});
}
}
}
});
}
$('#reset').click(function() {
window.location.href = '/crm/customers'
return false;
});
</script>

View File

@@ -1,4 +1,4 @@
<div class="page-header">
<!-- <div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= %>">Home</a></li>
<li>Queue</li>
@@ -6,19 +6,19 @@
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-sm' %>
</span>
</ul>
</div>
</div> -->
<div class="row">
<!-- Column One -->
<div class="col-lg-11 col-md-11 col-sm-11">
<div class="tab-content" style="max-height:670px; overflow-y:scroll">
<div class="tab-content" style="max-height:670px; overflow-y:auto">
<!--- Panel 1 - Table Orders -->
<div class="active" role="tabpanel">
<div class="tab-pane" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @dining_queues.each do |queue| %>
<% if queue.status == "Assign"
@bg_color = "assign"
@@ -27,10 +27,10 @@
else
@bg_color = "normal"
end
%>
%>
<div class="card select-queue <%= @bg_color %>" data-id="<%= queue.id %>" style="width: 21.5rem;">
<div class="card-block">
<p class="hidden queue-id"><%= queue.id %></p>
<p class="hidden queue-id"><%= queue.id %></p>
<p class="hidden queue-status"><%= queue.status %></p>
<span class="card-title"><strong> Queue No : <%= queue.queue_no %></strong></span>
<span class="card-title pull-right"><strong> Seater : <%= queue.seater %></strong></span><br>
@@ -39,7 +39,7 @@
<span class="card-title"> Remark : <%= queue.remark %></span>
</div>
</div>
<% end %>
</div>
</div>
@@ -48,8 +48,10 @@
<!-- tabs - End -->
</div>
<div class="col-lg-1 col-md-1 col-sm-1">
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-lg btn-block' %>
<hr>
<button type="button" id="assign" class="btn btn-primary btn-lg btn-block" disabled>Assign</button>
<button type="button" id="cancel" class="btn btn-warning btn-lg btn-block" disabled>Cancel</button>
<button type="button" id="cancel" class="btn btn-warning btn-lg btn-block" disabled>Cancel</button>
<a href="<%= dashboard_path %>" class="btn btn-primary btn-lg btn-block" role="button" aria-haspopup="true" aria-expanded="false"> Back </a>
</div>
</div>
@@ -71,7 +73,7 @@ $(function(){
$("#cancel").val($(this).find(".queue-id").text());
}); //End Click
});
$('#assign').click(function() {
var id = $(this).val();
@@ -90,31 +92,31 @@ function cancel_queue(id,url) {
title: 'Confirm!',
content: 'Are You Sure to cancel this Queue!',
buttons: {
cancel: function () {
cancel: function () {
},
confirm: {
text: 'Confirm',
btnClass: 'btn-green',
keys: ['enter', 'shift'],
action: function(){
$.ajax({
type: "POST",
$.ajax({
type: "POST",
url: url ,
data: {id:id},
dataType: "json",
success: function(data) {
if(data.status == true)
{
{
location.reload();
}
}
}
});
}
}
}
});
}
</script>
</script>

View File

@@ -8,22 +8,25 @@
<li class="navbar-nav mr-auto dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Settings</a>
<ul class="dropdown-menu">
<li><%= link_to "Zones (Zone,Table,Rooms)", settings_zones_path, :tabindex =>"-1" %></li>
<hr class="hr_advance" />
<li><%= link_to "Order Queue Stations",settings_order_queue_stations_path, :tabindex =>"-1" %></li>
<hr class="hr_advance" />
<li><%= link_to "Menus ", settings_menus_path, :tabindex =>"-1" %></li>
<li><%= link_to "Menu Categories", settings_menu_categories_path, :tabindex =>"-1" %></li>
<li><%= link_to "Menu Item Attributes", settings_menu_item_attributes_path, :tabindex =>"-1" %></li>
<li><%= link_to "Menu Item Options",settings_menu_item_options_path, :tabindex =>"-1" %></li>
<hr>
<li><%= link_to "Order Queue Stations",settings_order_queue_stations_path, :tabindex =>"-1" %></li>
<li><%= link_to "Zones", settings_zones_path, :tabindex =>"-1" %></li>
<hr>
<li><%= link_to "Cashier Terminals ", settings_cashier_terminals_path, :tabindex =>"-1" %></li>
<li><%= link_to "Employees", settings_employees_path, :tabindex =>"-1" %></li>
<hr class="hr_advance" />
<li><%= link_to "Cashier Terminals", settings_cashier_terminals_path, :tabindex =>"-1" %></li>
<li><%= link_to "Tax Profile", settings_tax_profiles_path, :tabindex =>"-1" %></li>
<hr class="hr_advance" />
<li><%= link_to "Membership Setting",settings_membership_settings_path, :tabindex =>"-1" %></li>
<li><%= link_to "Membership Action",settings_membership_actions_path, :tabindex =>"-1" %></li>
<li><%= link_to "Payment Method", settings_payment_method_settings_path, :tabindex =>"-1" %></li>
<li><%= link_to "Tax Profile", settings_tax_profiles_path, :tabindex =>"-1" %></li>
<li><%= link_to "Payment Methods", settings_payment_method_settings_path, :tabindex =>"-1" %></li>
<li><%= link_to "Print Setting", print_settings_path, :tabindex =>"-1" %></li>
<hr>
<hr class="hr_advance" />
<li><%= link_to "Employees", settings_employees_path, :tabindex =>"-1" %></li>
<hr class="hr_advance" />
<li><%= link_to "Accounts", settings_accounts_path, :tabindex =>"-1" %></li>
</ul>
</li>
@@ -33,7 +36,7 @@
<ul class="dropdown-menu">
<li><%= link_to "Orders ", transactions_orders_path, :tabindex =>"-1" %></li>
<li><%= link_to "Sales ", transactions_sales_path, :tabindex =>"-1" %></li>
<li><%= link_to "Credit Note ", transactions_credit_notes_path, :tabindex =>"-1" %></li>
<li><%= link_to "Credit Note ", transactions_credit_notes_path, :tabindex =>"-1" %></li>
</ul>
</li>
<li class="navbar-nav mr-auto dropdown">
@@ -42,9 +45,9 @@
<li><%= link_to "Daily Sale Report", reports_dailysale_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Sales Item Report", reports_saleitem_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Receipt Report", reports_receipt_no_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Shift Sale Report", reports_shiftsale_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Credit Sale Report", reports_credit_payment_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Void Sale Report", reports_void_sale_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Shift Sale Report", reports_shiftsale_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Credit Sale Report", reports_credit_payment_index_path, :tabindex =>"-1" %></li>
<li><%= link_to "Void Sale Report", reports_void_sale_index_path, :tabindex =>"-1" %></li>
</ul>
</li>
<li class="navbar-nav mr-auto">
@@ -57,7 +60,7 @@
<a href="<%= crm_customers_path %>" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;&nbsp;CRM</a>
</li>
</ul>
</div>
@@ -66,7 +69,7 @@
<ul class="navbar-nav mr-auto">
<%if current_login_employee.role !="waiter" %>
<li style="color: #959595"><%= current_login_employee.name %> </li>
<li style="padding-right:10px;padding-left:10px"> | </li>
<li ><%= link_to 'Logout', logout_path, method: :delete, data: { confirm: 'Are you sure?' } %>
</li>
@@ -76,3 +79,9 @@
<% end %>
</nav>
<style type="text/css">
hr.hr_advance {
margin-top: 10px !important;
margin-bottom: 10px !important;
}
</style>

View File

@@ -1,7 +1,7 @@
<div class='row'>
<div class="col-lg-11 col-md-11 col-sm-11">
<h2> Payment Credit </h2>
<h2> Cash In </h2>
<br>
<table class='table table-striped'>
<tr>

View File

@@ -2,7 +2,7 @@
<div class='row'>
<div class="col-lg-11 col-md-11 col-sm-11">
<h2>Payment Debit</h2>
<h2>Cash Out</h2>
<table class='table table-striped'>
<tr>
<td> Payment Reference

View File

@@ -2,7 +2,7 @@
<div class="col-lg-11col-md-11 col-sm-11">
<div >
<div >
<% @payment_method_setting.each do |payment_method|%>
<% @payment_method_setting.where("is_active = true").each do |payment_method|%>
<div class="purple others-payment bottom left" data-type="<%= payment_method.payment_method %>" id="<%= payment_method.payment_method %>" data-url="<%=payment_method.gateway_url%>" data-sale-id="<%= @sale_id%>"><%= payment_method.payment_method %></div>
<% end %>
</div>

View File

@@ -13,8 +13,9 @@
<table class="table table-striped">
<thead>
<tr>
<th style="width:40%">Name</th>
<th style="width:40%">Role</th>
<th style="width:20%">Name</th>
<th style="width:20%">Role</th>
<th style="width:20%">Created At</th>
<th style="width:20%">Action</th>
</tr>
</thead>
@@ -24,13 +25,14 @@
<tr>
<td><%= link_to employee.name,settings_employee_path(employee) %></td>
<td><%= employee.role %></td>
<td><%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td>
<%= link_to 'Edit', edit_settings_employee_path(employee) %>
<%= link_to 'Edit', edit_settings_employee_path(employee) %>
<%if employee.role != "administrator"%>
| <%= link_to 'Destroy', settings_employee_path(employee) , method: :delete, data: { confirm: 'Are you sure?' } %>
<%end%>
<%end%>
</td>
</tr>
<% end %>

View File

@@ -7,10 +7,10 @@
<%= f.input :gateway_communication_type %>
<%= f.input :gateway_url %>
<%= f.input :auth_token %>
<%= f.input :discount %>
<%= f.input :rebate %>
<%= f.input :bonus %>
<%= f.input :point %>
<label><%= f.check_box :discount %>Discount</label><br/>
<label><%= f.check_box :rebate %>Rebate</label><br/>
<label><%= f.check_box :bonus %>Bonus</label><br/>
<label><%= f.check_box :point %>Points</label>
</div>
<div class="form-actions">

View File

@@ -21,7 +21,7 @@
<th>Discount</th>
<th>Rebate</th>
<th>Bonus</th>
<th>Point</th>
<th>Points</th>
<th colspan="3"></th>
</tr>
</thead>