class Suppliers::Ability
  include CanCan::Ability
  def initialize(employee)
    if employee.manager?
      can :manage, :all
      #cam :mark_as_open, Supplier
    else
      can :read, :all
      can :qr_codes, Table
      can :home, Supplier
      can :current, :all
      can :close, List
      can :mark_helped, List
      can :mark_in_process, Order
      can :mark_delivered, Order
      can :cancel, Order
      can :switch_to, Supplier
    end
  end
end
