<commit_before><h2>Sent Requests </h2>

<table cellpadding="5">
  <tr>
    <th>
      Team
    </th>
    <th>
      Comments
    </th>
    <th>Status</th>
    <th>Sent at</th>
  </tr>
  <% participant = Participant.where(user_id: session[:user].id, parent_id:  assignment_id).first
  requests=JoinTeamRequest.where(participant_id: participant.id) %>
<% if requests != nil %>

  <% requests.each do |request| %>

    <tr>
      <td>
        <% if Team.exists?(request.team_id)==false  %>
          <font color="#FF0000">  This team no longer exists. </font>
        <% else %>
          <%= Team.find(request.team_id).name %>
        <% end %>
      </td>
      <td>
        <%= request.comments %>
      </td>
      <td>
        <% if request.status == 'P' %>
          <%= "Pending" %>
        <% elsif request.status == 'A' %>
          <%= "Accepted" %>
        <% else %>
          <%= "Declined"  %>
        <% end %>
      </td>
      <td>
        <%= request.created_at %>
      </td>
    </tr>
  <% end %>
<% else %>
  <tr>
    <td colspan ='4' > You didn't send any request yet</td>
  </tr>

<% end %>
  </table>

<commit_msg>Do not display sent joint team request if there is none.<commit_after><% participant = Participant.where(user_id: session[:user].id, parent_id:  assignment_id).first
   requests=JoinTeamRequest.where(participant_id: participant.id) %>
<% if !requests.empty? %>

<h2>Sent Requests </h2>

<table cellpadding="5">
  <tr>
    <th>
      Team
    </th>
    <th>
      Comments
    </th>
    <th>Status</th>
    <th>Sent at</th>
  </tr>

  <% requests.each do |request| %>

    <tr>
      <td>
        <% if Team.exists?(request.team_id)==false  %>
          <font color="#FF0000">  This team no longer exists. </font>
        <% else %>
          <%= Team.find(request.team_id).name %>
        <% end %>
      </td>
      <td>
        <%= request.comments %>
      </td>
      <td>
        <% if request.status == 'P' %>
          <%= "Pending" %>
        <% elsif request.status == 'A' %>
          <%= "Accepted" %>
        <% else %>
          <%= "Declined"  %>
        <% end %>
      </td>
      <td>
        <%= request.created_at %>
      </td>
    </tr>
  <% end %>

<% end %>
  </table>


{'fraction_non_alphanumeric': 0.1947935368043088, 'fraction_numerical': 0.006732495511669659, 'mean_word_length': 1.843112244897959, 'pattern_counts': {'":': 0, '<': 96, '<?xml version=': 0, '>': 96, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6194918', 'n_tokens_mistral': 855, 'n_tokens_neox': 778, 'n_words': 158}