module UsersHelper
  def usertype(user)
    case user.usertype
    when "SS" then
      content_tag(:span, "Super Administrador", class: "label label-danger")
    when "A" then
      content_tag(:span, "Administrador", class: "label label-danger", style: "font-size:100%")
    when "G" then
      content_tag(:span, "Gerente", class: "label label-warning", style: "font-size:85%")
    when "C" then
      content_tag(:span, "Caja", class: "label label-info")
    when "S" then
      content_tag(:span, "Almacenista", class: "label label-info")
    end
  end

  def user_status(user)
    case user.status
    when "active" then
      content_tag(:span, "", class: "fa fa-check fa-2 font-green")
    when "inactive" then
      content_tag(:span, "", class: "fa fa-times fa-2 font-red")
    end
  end
end
