update inventory hide and cancan update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Inventory::InventoryController < BaseInventoryController
|
||||
|
||||
load_and_authorize_resource
|
||||
def index
|
||||
@products = InventoryDefinition.all.active.order('created_at desc')
|
||||
end
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class Origami::InDutiesController < BaseOrigamiController
|
||||
before_action :set_in_duty, only: %i[show edit update edit_in_duty update_for_in_duty destroy destroy_in_duty]
|
||||
|
||||
# GET /in_duties
|
||||
# GET /in_duties.json
|
||||
def index
|
||||
|
||||
@@ -25,11 +25,6 @@ class Ability
|
||||
can :manage, TaxProfile
|
||||
can :manage, PrintSetting
|
||||
can :manage, Account
|
||||
can :manage, Commission
|
||||
can :manage, Commissioner
|
||||
can :manage, Promotion
|
||||
can :manage, Product
|
||||
|
||||
|
||||
can :manage, Order
|
||||
can :manage, Booking
|
||||
@@ -79,6 +74,13 @@ class Ability
|
||||
|
||||
can :overall_void, :void
|
||||
|
||||
can :manage, Commission
|
||||
can :manage, Commissioner
|
||||
can :manage, Promotion
|
||||
can :manage, Product
|
||||
|
||||
can :manage, Inventory
|
||||
|
||||
elsif user.role == "cashier"
|
||||
|
||||
# can :overall_void, :void
|
||||
@@ -112,6 +114,11 @@ class Ability
|
||||
can :move_dining, :moveroom
|
||||
|
||||
can :manage, DiningQueue
|
||||
|
||||
can :manage, Commission
|
||||
can :manage, Commissioner
|
||||
can :manage, Promotion
|
||||
can :manage, Product
|
||||
|
||||
elsif user.role == "account"
|
||||
|
||||
@@ -148,6 +155,12 @@ class Ability
|
||||
can :show, :payment
|
||||
can :reprint, :payment
|
||||
can :rounding_adj, :payment
|
||||
|
||||
can :manage, Commission
|
||||
can :manage, Commissioner
|
||||
can :manage, Promotion
|
||||
can :manage, Product
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -65,12 +65,14 @@
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<% if can? :menage, Inventory %>
|
||||
<!-- <li>
|
||||
<a href="<%= inventory_path %>">
|
||||
<i class="material-icons">store</i>
|
||||
<span><%= t :inventory %></span>
|
||||
</a>
|
||||
</li>
|
||||
</li> -->
|
||||
<%end%>
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="menu-toggle">
|
||||
<i class="material-icons">widgets</i>
|
||||
|
||||
@@ -377,8 +377,10 @@
|
||||
<button type="button" class="btn btn-block bg-blue waves-effect" id='edit' active="<%= can? :edit, :sale_edit %>">Edit</button>
|
||||
<button type="button" id="discount" class="btn btn-block bg-blue waves-effect">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>
|
||||
|
||||
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button>
|
||||
<button type="button" id="pay" class="btn btn-block bg-blue waves-effect">Pay</button>
|
||||
<button type="button" id="void" class="btn btn-block bg-blue waves-effect" active="<%= can? :overall_void, :void %>"> Void</button>
|
||||
|
||||
@@ -348,6 +348,7 @@
|
||||
<button type="button" class="btn bg-blue btn-block" id='edit'>Edit</button>
|
||||
<button type="button" id="discount" class="btn bg-blue btn-block" >Discount</button>
|
||||
<button type="button" id="other-charges" class="btn bg-blue btn-block" >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>
|
||||
<!-- <button type="button" class="btn bg-blue btn-block" id='move' disabled="">Move</button> -->
|
||||
|
||||
Reference in New Issue
Block a user