<section class="section-panel todo-list">
  <div class="container-fluid">
    <div class="row section-header">
      <div class="col-lg-12 col-md-12 col-sm-12">
        <h3>
          Team info
          <a class="btn"
             ng-if="teamInfoCard.isProjectAdmin"
             ng-href="project/{{teamInfoCard.projectId}}"
             target="_blank">
            Project Management
          </a>
        </h3>
      </div>
    </div>
    <div class="row section-body">
      <div class="col-lg-12 col-md-12 col-sm-12">
        <table class="table table-striped">
          <thead>
            <th>Role</th>
            <th>Username</th>
            <th>Name</th>
            <th>Recorded time spent</th>
            <th>Status</th>
          </thead>
          <tbody>
            <tr ng-repeat="assignment in teamInfoCard.assignments">
              <td>{{assignment.role}}</td>
              <td>{{assignment.worker.username}}</td>
              <td>{{assignment.worker.first_name}} {{assignment.worker.last_name}}</td>
              <td>{{assignment.recordedTime}}</td>
              <td>
                {{assignment.status}}
                <button type="submit"
                        class="btn btn-default btn-sm"
                        ng-if="teamInfoCard.isProjectAdmin &&
                               assignment.status == 'Processing' &&
                               assignment.stepSlug != teamInfoCard.step.slug"
                        ng-click="teamInfoCard.submitTask(assignment.task_id)">
                  Submit
                </button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</section>
