<div class="row page-titles no-print">
    <div class="col-md-6 col-8 align-self-center">
        <h3 class="text-themecolor m-b-0 m-t-0">{{phrase.hourSalary}}</h3>
    </div>
    <div class="col-md-6 col-4 align-self-center">

    </div>
</div>

<div class="row" ng-show="views.list">
    <div class="col-12">
        <div class="card">
            <div class="card-block">
                <button ng-click="changeView('add')" class="btn pull-right btn-success card-block-input-item">{{phrase.addSalaryBase}}</button>
                <h4 class="card-title">{{phrase.lstSalaryBase}}</h4>
                <div class="table-responsive">

                    <table class="table table-hover table-bordered">
                        <tbody>
                            <tr>
                                <th>{{phrase.title}}</th>
                                <th>{{phrase.rate}}</th>
                                <th style="width:160px;">{{phrase.Operations}}</th>
                            </tr>
                            <tr ng-repeat="base in hourly_base">
                                <td>{{base.salary_title}}</td>
                                <td>{{base.hourly_cost}}</td>
                                <td>
                                    <button ng-click="edit(base.id)" type="button" class="btn btn-info btn-circle" title="{{phrase.Edit}}" tooltip><i class="fa fa-pencil"></i></button>
                                    <button ng-click="remove(base,$index)" type="button" class="btn btn-danger btn-circle" title="{{phrase.Remove}}" tooltip><i class="fa fa-trash-o"></i></button>
                                </td>
                            </tr>
                            <tr ng-show="!hourly_base.length"><td class="noTableData" colspan="3">{{phrase.noDataAvailable}}</td></tr>
                        </tbody>
                    </table>

                </div>
            </div>
        </div>
    </div>
</div>

<div class="row" ng-show="views.add">
    <div class="col-12">
        <div class="card">
            <div class="card-block">
                <button ng-click="changeView('list')" class="btn btn-danger btn-flat pull-right card-block-input-item">{{phrase.cancelAdd}}</button>
                <h4 class="card-title">{{phrase.addSalaryBase}}</h4>
                <div class="form">

                    <form class="form-horizontal" name="addPayment" role="form" ng-submit="saveAdd()" novalidate>
                        <div class="form-group row" ng-class="{'has-error': addPayment.salary_title.$invalid}">
                            <label class="col-sm-2 text-right control-label col-form-label">{{phrase.baseTitle}} * </label>
                            <div class="col-sm-10">
                                <input type="text" name="salary_title" ng-model="form.salary_title" class="form-control" required placeholder="{{phrase.baseTitle}}">
                            </div>
                        </div>
                        <div class="form-group row" ng-class="{'has-error': addPayment.hourly_cost.$invalid}">
                            <label class="col-sm-2 text-right control-label col-form-label">{{phrase.hourRate}} *</label>
                            <div class="col-sm-10">
                                <input type="text" name="hourly_cost" ng-model="form.hourly_cost" class="form-control" required placeholder="{{phrase.hourRate}}">
                            </div>
                        </div>
                        <div class="form-group m-b-0">
                            <div class="offset-sm-2 col-sm-10">
                                <button type="submit" class="btn btn-info waves-effect waves-light" ng-disabled="addPayment.$invalid">{{phrase.addSalaryBase}}</button>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>

<div class="row" ng-show="views.edit">
    <div class="col-12">
        <div class="card">
            <div class="card-block">
                <button ng-click="changeView('list')" class="btn pull-right btn-danger card-block-input-item">{{phrase.cancelEdit}}</button>
                <h4 class="card-title">{{phrase.editSalaryBase}}</h4>
                <div class="form">

                    <form class="form-horizontal" name="editPayment" role="form" ng-submit="saveEdit()" novalidate>
                        <div class="form-group row" ng-class="{'has-error': editPayment.salary_title.$invalid}">
                            <label class="col-sm-2 text-right control-label col-form-label">{{phrase.baseTitle}} * </label>
                            <div class="col-sm-10">
                                <input type="text" name="salary_title" ng-model="form.salary_title" class="form-control" required placeholder="{{phrase.baseTitle}}">
                            </div>
                        </div>
                        <div class="form-group row" ng-class="{'has-error': editPayment.hourly_cost.$invalid}">
                            <label class="col-sm-2 text-right control-label col-form-label">{{phrase.hourRate}} *</label>
                            <div class="col-sm-10">
                                <input type="text" name="hourly_cost" ng-model="form.hourly_cost" class="form-control" required placeholder="{{phrase.hourRate}}">
                            </div>
                        </div>

                        <div class="form-group m-b-0">
                            <div class="offset-sm-2 col-sm-10">
                                <button type="submit" class="btn btn-info waves-effect waves-light" ng-disabled="editPayment.$invalid">{{phrase.editSalaryBase}}</button>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>

