<div class="content-wrapper" class="modal-demo">
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="text-warning">
                        <go-back/>
                        <i class="fas fa-user"></i> My Teams
                    </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 active">My Team</li>
                    </ol>
                </div>
            </div>
        </div>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-sm-12 p-5 bg-white" ng-if="myHeroesProjects.length <= 0">
                <h4 class="text-center">Currently, you are not assigned to any active project at the moment.<br>
                        <!-- Please log your hours under the <br>"R&D, POC, Project Co-ordinations, Self Study, Training, Helping Others, etc..." <br>project from "My Diary." -->
                </h4>
            </div>
         

            <div data-info="My Team" class="col-md-12" ng-if="myHeroesProjects.length > 0 && mhp.proj.id != 116" ng-repeat="mhp in myHeroesProjects">
                <div class="card card-outline card-warning">
                    <div class="card-header border-transparent">
                        <h3 class="card-title"><strong>My Teams</strong> - <span class="text-blue pointer font-weight-bold" ng-click="goToSelf('projectView',{projectid:mhp.proj.id})">{{mhp.proj.name}}</span></h3>
                        <div class="card-tools">
                            <div class="btn-group">
                                <button type="button" title="Fullscreen Toggle" class="btn btn-dark toggle-fullscreen"><i class="fas fa-expand"></i></button>
                                <button type="button" class="btn btn-dark" data-widget="collapse"><i class="fas fa-minus"></i></button>
                            </div>
                        </div>
                    </div>
                    <div class="card-body p-0">
                        <div class="table-responsive">
                            <table class="myTeamList table table-bordered table-striped table-sm">
                                <thead>
                                <tr>
                                    <th>Hero</th>
                                    <th>Manager</th>
                                    <th>Project Manager</th>
                                    <th>From</th>
                                    <th ng-if="gUser.is_admin">IsBillable</th>
                                    <th data-toggle="tooltip" title="Hours Per/day">Allocation <i class="fas fa-question-circle"></i></th>
                                    <th ng-if="gUser.is_admin">Action</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr ng-repeat="hero in mhp.data">
                                    <td><span class="text-blue pointer" ng-click="goToSelf('heroView',{employeeid:hero.employeeid})">{{hero.emp_first_name +' '+hero.emp_last_name}}</span><br/><span>({{hero.emp_code}})</span></td>
                                    <td><span class="text-blue pointer" ng-click="goToSelf('heroView',{employeeid:hero.linemgr.employeeid})">{{hero.linemgr.emp_first_name +' '+hero.linemgr.emp_last_name}}</span><br/><span>({{hero.linemgr.emp_code}})</span></td>
                                    <td><span class="text-blue pointer" ng-click="goToSelf('heroView',{employeeid:hero.projmgr.employeeid})">{{hero.projmgr.emp_first_name +' '+hero.projmgr.emp_last_name}}</span><br/><span>({{hero.projmgr.emp_code}})</span></td>
                                    <td><span class="nowrap" ng-bind="formatDate(hero.fromDate) | date:'dd MMM yyyy'"></span></td>
                                    <td  ng-if="gUser.is_admin"><span class="badge badge-{{hero.isBillable ? 'success' : 'danger' }}">{{hero.isBillable ? 'Yes' : 'No'}}</span></td>
                                    <!--<td><span class="nowrap badge btn-success" ng-if="hero.partialHours>0">{{hoursToPercent(hero.partialHours)}}</span></td>-->
                                    <td><span class="nowrap font-weight-bold">{{hero.partialHours ? hero.partialHours :'-'}}</span></td>
                                    <td  ng-if="gUser.is_admin"><button type="button" class="btn btn-success btn-xs" title="View in project" ng-click="goToSelf('projectView',{projectid:hero.proj_id})">
                                            <i class="fas fa-table"></i> <span class="d-none d-lg-inline"> View in project </span></button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
