<% @invite_results.each do |result| %>
<% if result[:status] == :user_exists %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists') %>
<% elsif result[:status] == :user_exists_and_in_team %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists_and_in_team',
team: result[:team_name],
role: result[:user_role_name]) %>
<% elsif result[:status] == :user_exists_unconfirmed_invited_to_team %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists_unconfirmed_invited_to_team',
team: result[:team_name],
role: result[:user_role_name]) %>
<% elsif result[:status] == :user_exists_invited_to_team %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists_invited_to_team',
team: result[:team_name],
role: result[:user_role_name]) %>
<% elsif result[:status] == :user_created %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_created') %>
<% elsif result[:status] == :user_created_invited_to_team %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_created_invited_to_team',
team: result[:team_name],
role: result[:user_role_name]) %>
<% elsif result[:status] == :user_invalid %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_invalid') %>
<% end %>
<% end %>
<% if @too_many_emails %>
<%= t('invite_users.results.too_many_emails', nr: Constants::INVITE_USERS_LIMIT) %>
<% end %>