<div class="content-wrapper" ng-if="myAccess.officeVisitBookingReport">
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="text-olive">
                        <go-back/>
                        <i class="fas fa-book"></i> {{filter.pageName}}
                    </h1>
                </div>
                <div class="col-sm-2 offset-2">
                </div>
                <div class="col-sm-8">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a ng-href="{{baseurl}}/dashboard">Home</a></li>
                        <li class="breadcrumb-item active">Hero Office Reopening Booking Report</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>
    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group row">
                        <div class="col-sm-3"><input data-toggle="tooltip" title="From Date" type=text max-date="{{filter.toDate}}" date-picker placeholder='From Date (DD-MM-YYYY)' dateformat='dd-mm-yy' maxlength="10" ng-required='true' class='form-control' ng-model='filter.fromDate'/></div>
                        <div class="col-sm-3"><input data-toggle="tooltip" title="To Date" type=text min-date="{{filter.fromDate}}" date-picker placeholder='To Date (DD-MM-YYYY)' dateformat='dd-mm-yy' maxlength="10" ng-required='true' class='form-control' min ng-model='filter.toDate'/></div>
                        <div class="col-sm-4">
                        </div>
                        <div class="col-sm-1">
                            <button class="btn btn-success" ng-click="dateChanged()"> Filter</button>
                        </div>
                        <div class="col-sm-1"><select data-toggle="tooltip" title="View Type" id="viewType" class="form-control custom-select" ng-model="filter.selType" ng-options="p.val as p.val for p in filter.type"></select></div>
                    </div>

                </div>
                <div class="col-md-12">
                    <div class="card card-primary card-outline" ng-show="filter.selType==='Default'">
                        <div class="card-header border-transparent  mb-1">
                            <h3 class="card-title">Report</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 table-responsive">
                                <table class="myDiaryDataTableView table table-bordered table-striped table-sm">
                                    <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Hero</th>
                                        <th>Hero Id</th>
                                        <th>Booking Date</th>
                                        <th>Booking Reason</th>
                                        <th>Team Members</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr ng-repeat="d in myDiary.default">
                                        <td>{{$index+1}}</td>
                                        <td><span>{{d.emp_first_name +' '+d.emp_last_name}}</span></td>
                                        <td><span>{{d.emp_code}}</span></td>
                                        <td><span>{{d.booking_date}}</span></td>
                                        <td><span>{{d.booking_info}}</span></td>
                                        <td><span>{{d.booking_team_members}}</span></td>
                                     </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>


                    <div class="card card-primary card-outline" ng-show="filter.selType==='Hero'" ng-repeat="p in myDiary.heroes">
                        <div class="card-header border-transparent  mb-1">
                            <h3 class="card-title">{{p.name}}</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 table-responsive">
                                <table class="myDiaryDataTableView table table-bordered table-striped table-sm">
                                    <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Hero</th>
                                        <th>Hero Id</th>
                                        <th>Booking Date</th>
                                        <th>Booking Reason</th>
                                        <th>Team Members</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr ng-repeat="d in p.data">
                                        <td>{{$index+1}}</td>
                                        <td><span>{{d.emp_first_name +' '+d.emp_last_name}}</span></td>
                                        <td><span>{{d.emp_code}}</span></td>
                                        <td><span>{{d.booking_date}}</span></td>
                                        <td><span>{{d.booking_info}}</span></td>
                                        <td><span>{{d.booking_team_members}}</span></td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
