Usuarios

<% if success %>

<%= success %>

<% elsif warning %>

<%= warning %>

<% end %>
Lista de usuarios del sistema
<% if can? :create, User %> <%= link_to new_user_path, {:class=>"btn bold green pull-right filtros"} do %> Nuevo Usuario <% end %> <% end %>
<% @users.each_with_index do |user, key| %> <% end %>
# Usuario Nombre Tipo de usuario Punto de venta Almacén Status Acciones
<%= key +1 %> <%= user.userid %> <%= user.first_name + ' ' + user.last_name %> <% case user.usertype %> <% when "A" %> Administrador <% when "G" %> Gerente <% when "C" %> Caja <% when "S" %> Almacenista <% end %> <%= user.pointsale.name if user.pointsale.present?%> <%= user.warehouse.name if user.warehouse.present?%> <% if user.active? %> Activo <% elsif user.inactive? %> Inactivo <% end %> <% if can? :update, User %> <%= link_to edit_user_path(user), {:class=>"btn btn-icon-only btn-primary filtros", :title=>"Editar cliente"} do %> <% end %> <% end %> <% if user.active? %> <%= link_to user_update_status_path(user), :class=>"btn btn-icon-only default", :title=>"Desactivar usuario", data: { confirm: '¿Esta seguro de desactivar al usuario?', method: 'post'} do %> <% end %> <% elsif user.inactive? %> <%= link_to user_update_status_path(user), :class=>"btn btn-icon-only green-jungle", :title=>"Activar usuario", data: { confirm: '¿Esta seguro de activar al usuario?', method: 'post'} do %> <% end %> <% end %>