<div class="padding">
    <div class="alert alert-danger text-center" localize="no_candiates" ng-if="settings.candidates.length == 0"></div>
</div>

<div class="item-list">
    <div class="item" style="padding: 5px;"
         ng-repeat="employee in settings.candidates | orderBy: '-creationTime' track by employee.id">
        <table class="medium">
            <tr>
                <td>
                    <div class="avatar-image"
                         style="width: 90px; height: 90px; background-image: url('3dmodels/people/{{ ::employee.avatar }}.png')"></div>
                </td>
                <td style="width: 20%;">{{ employee.name }}</td>
                <td>
                    <icon class="icon {{ employee.employeeTypeName }}"></icon>
                    <span localize="{{ employee.employeeTypeName }}"></span>
                </td>
                <td style="width: 15%;">
                    <i class="fa" ng-class="{
                        'fa-star-o': employee.level == EmployeeLevels.Beginner,
                        'fa-star-half-o': employee.level == EmployeeLevels.Intermediate,
                        'fa-star': employee.level == EmployeeLevels.Expert }"></i>
                    <span>{{ employee.speed }}%</span>
                </td>
                <td>{{ employee.salary | currency }}</td>
                <td>
                    <span
                            ng-class="{ 'color-red': candidatesCtrl.wer.total < employee.requiredWer }"
                            tooltip-append-to-body="true" uib-tooltip="{{ GetLocalized('candidates_required_wer') }}">
                    {{ employee.requiredWer}}%
                    </span>
                </td>
                <td class="text-center">
                    <button class="red small" ng-click="candidatesCtrl.remove(employee)"><i class="fa fa-times"></i>
                    </button>
                    <button class="blue small"
                            ng-click="candidatesCtrl.wer.total >= employee.requiredWer && candidatesCtrl.hire(employee)"
                            localize="hire"
                            ng-class="{ 'disabled': candidatesCtrl.wer.total < employee.requiredWer }"
                            tooltip-enable="candidatesCtrl.wer.total < employee.requiredWer"
                            tooltip-append-to-body="true" uib-tooltip="{{ GetLocalized('higher_wer_required') }}"
                    ></button>
                    <br>
                    <span class="dimmed small" ng-class="{ 'color-red text-bold': employee.hoursLeft <= 8 }"
                          localize="x_hours" localize-data-hours="{{employee.hoursLeft}}"></span>
                </td>
            </tr>
        </table>

    </div>
</div>

<div class="padding text-center dimmed" localize="tip_increase_wer"></div>