<div class="alert alert-danger" role="alert" ng-if="user.roles.manager.department.length == 0">
    <span translate>To supervise collaborators, a department with members must be associated to user first</span>
</div>

<div class="row" ng-if="user.roles.manager.department.length > 0">
    <h3  class="col-xs-12" translate>Collaborators to supervise with request approvals</h3>

    <table class="table">
        <thead>
        <tr>
            <th translate>Department name</th>
            <th class="hidden-xs" translate>Collaborators</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="department in user.roles.manager.department">
            <td>
                <a ng-href="#/admin/departments/{{department._id}}">
                    {{department.name}}
                </a>
            </td>
            <td class="hidden-xs">{{department.members}}</td>
        </tr>
        </tbody>

    </table>

    <div class="alert alert-danger" role="alert" ng-if="0 === roles.manager.department.length">
        <span translate>This manager has no departments configured for approval</span>
    </div>
</div>
