<div class="content-wrapper">
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="text-navy">
                        <go-back/>
                        <i class="fas fa-lock"></i> Assign Requisition Form
                    </h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a ng-href="{{baseurl}}/dashboard">Home</a></li>
                        <li class="breadcrumb-item"><a ng-href="{{baseurl}}/requisitions/dashboard/">Requisitions Dashboard/</a></li>
                        <li class="breadcrumb-item active">Assign Requisition Form</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>
    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-12">
                    <div class="card card-outline card-blue">
                        <div class="card-header">
                            <h3 class="card-title"><label for="selectHero">Assign Requisition To Heroes</label></h3>
                        </div>
                        <div class="card-body">
                            <div class="form-group">
                                <label for="emp_acl_profile">Requisition Form</label> <!---->
                                <select id="emp_acl_profile" class="form-control custom-select" ng-change="getOnchangeVal(hero.req_id)"
                                    ng-model="hero.req_id" disabled ng-options="acl.id as acl.desg_name for acl in requisitionList">
                                </select>
                            </div>
                            <div class="form-group">
                                    <label for="emp_acl_profile">Select Requisition Authority</label>
                                    <ui-select multiple on-select="onHeroSelect($model)" on-remove="onHeroSelect($model)" ng-model="hero.heroes" id="selectHero" theme="bootstrap" title="Select Hero" style="width: 100%">
                                        <ui-select-match placeholder="Select or search a hero in the list...">{{$item.emp_first_name +' '+$item.emp_last_name + ' ' + $item.emp_code}}</ui-select-match>
                                        <ui-select-choices repeat="hero.id as hero in heroes | filter: $select.search">
                                            <span ng-bind-html="hero.emp_first_name +' '+hero.emp_last_name + ' ' + hero.emp_code | highlight: $select.search"></span>
                                        </ui-select-choices>
                                    </ui-select>
                            </div>
                            <div class="col-sm-12">
                                <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#modal-default">Cancel</button>
                                <button type="submit" ng-click="save(hero)" class="btn btn-success float-right">
                                    <i class="fas fa-save"></i>
                                    {{btn.text}}
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
               
            </div>
        </div>
    </section>

    <div class="modal fade" id="modal-default">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <p>Are you sure to leave this page!</p>
                </div>
                <div class="modal-footer justify-content-between">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="goTo($event,'requisitionDashboard')">Proceed</button>
                </div>
            </div>
        </div>
    </div>
</div>
