remove conflict data in ability.rb

This commit is contained in:
phyusin
2018-02-09 14:06:16 +06:30
65 changed files with 415 additions and 57 deletions

View File

@@ -25,6 +25,13 @@
</a>
</div>
<!-- Start Shop Info -->
<div class="navbar-right">
<div class="col-lg-12 col-md-12 col-sm-12 navbar-brand">
<span class="navbar-brand-txt"><%= shop_detail.name %></span>
</div>
</div>
<!-- End Shop Info -->
<!-- Start Delete confirrm text !-->
<div class="navbar-right">
<a href="javascript:void(0);" class="dropdown-toggle waves-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
@@ -33,12 +40,24 @@
<% end %>
</a>
<ul class="dropdown-menu">
<li>
<p class="waves-effect waves-block p-l-30 m-b-5">
<a href="/settings/shops/1" style="text-decoration: none;">
<i class="material-icons font-7 logout_icon shopinfo">info</i>
<span class="font-15 shopinfo" >Shop Info</span>
</a>
</p>
</li>
<li>
<!-- <%if current_login_employee.role !="waiter" %> -->
<!-- <%end%> -->
<p class="delete waves-effect waves-block p-l-30 m-b-5" data-ref="<%=logout_path%>" data-method="delete">
<!-- <p class="delete waves-effect waves-block p-l-30 m-b-5" data-ref="<%=logout_path%>" data-method="delete">
<i class="material-icons font-10 logout_icon">exit_to_app</i>
<span class="font-18">Logout</span>
</p> -->
<p class="delete waves-effect waves-block p-l-30 m-b-5" data-ref="<%=logout_path%>" data-method="delete">
<i class="material-icons font-7 logout_icon">exit_to_app</i>
<span class="font-15">Logout</span>
</p>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to Logout ?</h6>

View File

@@ -51,22 +51,24 @@
</a>
</li>
<% end %>
<% if can? :menage, Customer %>
<li>
<a href="javascript:void(0);" class="menu-toggle">
<i class="material-icons">widgets</i>
<span><%= t :crm %></span>
</a>
<ul class="ml-menu">
<li>
<a href="<%= crm_customers_path %>"><%= t :customer %></a>
</li>
<li>
<a href="<%= crm_dining_queues_path %>"><%= t :queue %></a>
</li>
<% if can? :menage, Customer %>
<li>
<a href="<%= crm_customers_path %>"><%= t :customer %></a>
</li>
<% end %>
<% if can? :menage, DiningQueue %>
<li>
<a href="<%= crm_dining_queues_path %>"><%= t :queue %></a>
</li>
<% end %>
</ul>
</li>
<% end %>
<% if can? :menage, Inventory %>
<!-- <li>
<a href="<%= inventory_path %>">

View File

@@ -58,7 +58,7 @@
<!-- #END# Page Loader -->
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-center">
<div class="col-lg-12_ col-md-12 col-sm-12 col-xs-12 text-center">
<img src="/image/SX-logo.png" width="150px" height="150px">
<p>
<small>Version - 1.0.1</small>

View File

@@ -235,10 +235,25 @@ $('#cash_out').on('click',function(){
window.location.href = '/origami/cash_outs/new';
})
$('#close_cashier').on('click',function(){
window.location.href = '/origami/shift/close';
$('#close_cashier').on('click',function(e){
e.preventDefault(); // Prevent the href from redirecting directly
var linkURL = '/origami/shift/close';
warnBeforeRedirect(linkURL);
})
$('#back').on('click',function(){
window.location.href = '/dashboard';
})
function warnBeforeRedirect(linkURL) {
swal({
title: "Oops",
text: "Are you sure you want to Logout ?",
type: "warning",
showCancelButton: true
}, function() {
// Redirect the user
window.location.href = linkURL;
});
}
</script>

View File

@@ -444,14 +444,13 @@
<!-- <button type="button" class="btn btn-block bg-blue waves-effect" disabled> Void</button> -->
<% end %>
<% if @status_sale == 'sale' %>
<button type="button" id="commissions" class="btn btn-block bg-blue waves-effect">Commissions</button>
<button type="button" id="in_duties" class="btn btn-block bg-blue waves-effect">In Duties</button>
<button type="button" id="customer" class="btn btn-block bg-blue waves-effect">Customer</button>
<button type="button" class="btn btn-block bg-blue waves-effect" id='edit' <%= (can? :edit, :sale_edit)? ' ': 'disabled=' %> active="true">Edit</button>
<button type="button" id="void" class="btn btn-block bg-blue waves-effect" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> active="true"> Void</button>
<button type="button" id="discount" class="btn btn-block bg-blue waves-effect" <%= (can? :index, :discount)? ' ': 'disabled=' %> active="true">Discount</button>
<button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect">Charges</button>
<button type="button" id="commissions" class="btn btn-block bg-blue waves-effect">Commissions</button>
<button type="button" id="in_duties" class="btn btn-block bg-blue waves-effect">In Duties</button>
<!-- first bill not used in cloud -->
<% if ENV["SERVER_MODE"] == "cloud" %>
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button>