<% @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: t("user_teams.enums.role.#{result[:user_team].role}")) %>
<% 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: t("user_teams.enums.role.#{result[:user_team].role}")) %>
<% elsif result[:status] == :user_exists_invited_to_team %>
<%= result[:email] %>
-
<%= t('invite_users.results.user_exists_invited_to_team',
team: result[:team].name,
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
<% 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: t("user_teams.enums.role.#{result[:user_team].role}")) %>
<% 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 %>