<div class="content-wrapper" ng-if="!myAccess.heroAdd && !myAccess.heroEdit">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-6 offset-sm-1 offset-md-2 offset-lg-3 mt-5">
                <div class="alert alert-warning alert-dismissible">
                    <h5><i class="icon fas fa-ban"></i> Warning!</h5>
                    Unauthorised Access.
                </div>
            </div>
        </div>
    </div>
</div>

<!--<div class="content-wrapper" ng-if="myAccess.heroAdd || myAccess.heroEdit">-->
<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-warning">
                        <go-back/>
                        <i class="fas fa-comments "></i> Feedback for {{hero.emp_first_name+ ' ' +hero.emp_last_name}} ({{hero.emp_code}})
                    </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"><a ng-href="{{baseurl}}/heroes/list">Heroes</a></li>
                        <li class="breadcrumb-item active">Hero Feedback</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
                <!---Hero Taglist-->
        <div class="col-md-12">
            <div class="card card-warning card-outline">
			<div class="card-header border-transparent">
                    <h3 class="card-title">Hero WatchlistTag</h3>
                    <div class="card-tools">
                        <div class="btn-group">
                            <button type="button" class="btn btn-dark" data-widget="collapse"><i class="fas fa-minus"></i></button>
                        </div>
                    </div>
                </div>
				<div class="col-md-12"> 
                <div class="row mt-1">
                    <div class="col-md-2 offset-md-2">
                        <label for="name">WatchList Tag</label>
                                <select id="wtl_id" class="form-control custom-select"
                                            ng-model="heroWatchlist.wtl_id" ng-options="l.wtl_id as (l.tag | capitalize) for l in tagOptions" >
                                 </select>
					</div>
                    <div class="col-sm-4"> <label for="name">Comment</label>
                                <textarea type="text" id="comment" class="form-control" ng-model="heroWatchlist.comment" placeholder="Comment" ></textarea></div>
                    <div class="col-sm-2">
                        <button type="submit" ng-click="SaveWatchlistComment()" class="btn btn-success mt-4">
                            <i class="fas {{createButton.icon}}"></i> {{createButton.text}}
                        </button>
                    </div>
                </div>
            </div>
                
                <div class="card-body p-0">
                    <div class="table table-responsive">
                        <table id="heroTagList" class="table table-bordered table-striped manPowerPlanningDiscussionsList">
                <thead>
                <tr>
                    <th>Tag Name</th>
                    <th>Comment</th>
					<th>Date</th>

                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="hf in heroTagList | orderBy:'-comment_datetime'">
                    <td><div>{{hf.tag}}</div></td>
                    <td><div>{{hf.comment}}</div></td>
                    <td><div>{{hf.comment_datetime | datetz:'DD-MMM-YY'}}</div></td>
					
                </tr>
                </tbody>
            </table>
        </div>
        </div>
        </div>
        </div>
        <!---Hero Taglist-->
       
    </section>
    <section class="content">
        <div class="row">
            
            <div class="col-md-12">
                <div class="card card-warning card-outline">
				  <div class="card-header border-transparent">
                        <h3 class="card-title">Hero Feedback</h3>
                        <div class="card-tools">
                            <div class="btn-group">
                                <button type="button" class="toggle-vis btn btn-{{colOptions.email ? 'dark' : 'default'}}" data-column="3" ng-click="colOptions.email = !colOptions.email">Email <i class="fas fa-{{colOptions.email ? 'eye' : 'eye-slash'}}"></i></button>
                                <button type="button" class="toggle-vis btn btn-{{colOptions.mobile ? 'dark' : 'default'}}" data-column="4" ng-click="colOptions.mobile = !colOptions.mobile">Mobile <i class="fas fa-{{colOptions.mobile ? 'eye' : 'eye-slash'}}"></i></button>
                                <button type="button" class="toggle-vis btn btn-{{colOptions.code ? 'dark' : 'default'}}" data-column="2" ng-click="colOptions.code = !colOptions.code">Code <i class="fas fa-{{colOptions.code ? 'eye' : 'eye-slash'}}"></i></button>
                            </div>
                            <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="col-md-12">
                <div class="row mt-1">
                    <div class="col-md-2 offset-md-2">
                        <label>Feedback Date </label>
                        <input type=text date-picker
                               placeholder='Date (DD-MM-YYYY)'
                               dateformat='dd-mm-yy'
                               maxlength="10"
                               ng-required='true'
                               class='form-control'
                               ng-model='heroFeedback.feedback_date'/></div>
                    <div class="col-sm-4"><label>Feedback</label><textarea class="form-control" required ng-model="heroFeedback.feedback" placeholder="Hero Feedback" rows="2"></textarea></div>
                    <div class="col-sm-2">
                        <button type="submit" ng-click="Save()" class="btn btn-success mt-4">
                            <i class="fas {{createButton.icon}}"></i> {{createButton.text}}
                        </button>
                    </div>
                </div>
            </div>
                  
                    <div class="card-body p-0">
                        <div class="table table-responsive">
                            <table id="heroFeedbackList" class="table table-bordered table-striped manPowerPlanningDiscussionsList">
                                <thead>
                                <tr>
                                    <th>Feedback Date</th>
                                    <th>Feedback</th>
                                    <!--<th>Comments</th>-->
                                    <th>Action</th>
                                    <!--<th data-toggle="tooltip" title="Hours Per/day" ><small>Billable / Non Billable</small> <i class="fas fa-question-circle"></i></th>-->
                                </tr>
                                </thead>
                                <tbody>
                                <tr ng-repeat="hf in heroFeedbackList | orderBy:'-feedback_date'">
                                    <!--<td><span>{"mydiaryid":"3","proj_id":"91","emp_id":"22","date":"2006-02-22 00:00:00+05:30","reference":"Dolor illum quos ea","description":"Eu quia dicta fugiat","logtype":"1","hours":82,"comments":"Accusamus non placea","status":"active"}	</span></td>-->
                                    <td>
                                        <div ng-bind="formatDate(hf.feedback_date) | date:'dd MMM yyyy'"></div>
                                    </td>
                                    <td>
                                        <div>{{hf.feedback | titlecase}}</div>
                                    </td>
                                    <td>
                                        <button class="btn btn-danger" ng-click="openheroFeedbackDeleteDeleteModal(hf)" class="dropdown-item"><i class="fas fa-trash"></i></button>
                                    </td>
                                    <!--                            <td>-->
                                    <!--                                <button class="btn btn-danger" ng-click="openManPowerPlanningDiscussionsDeleteModal(d)" class="dropdown-item"><i class="fas fa-trash"></i></button>-->
                                    <!--                                &lt;!&ndash;<button ng-if="!d.isLocked" class="btn btn-success" ng-click="openEditMyDiaryEntry(d)"><i class="fas fa-pen"></i>Edit</button>-->
                                    <!--                                <button ng-if="myAccess.repeatDiary" class="btn btn-warning" ng-click="repeatDiaryCurrentWeek(d)" class="dropdown-item"><i class="fas fa-redo"></i> Repeat For Current Week</button>&ndash;&gt;-->
                                    <!--                            </td>-->
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="card card-warning card-outline">
                    <div class="card-header border-transparent">
                        <h3 class="card-title">Hero Project Release Feedback</h3>
                        <div class="card-tools">
                            <div class="btn-group">
                                <button type="button" class="toggle-vis btn btn-{{colOptions.email ? 'dark' : 'default'}}" data-column="3" ng-click="colOptions.email = !colOptions.email">Email <i class="fas fa-{{colOptions.email ? 'eye' : 'eye-slash'}}"></i></button>
                                <button type="button" class="toggle-vis btn btn-{{colOptions.mobile ? 'dark' : 'default'}}" data-column="4" ng-click="colOptions.mobile = !colOptions.mobile">Mobile <i class="fas fa-{{colOptions.mobile ? 'eye' : 'eye-slash'}}"></i></button>
                                <button type="button" class="toggle-vis btn btn-{{colOptions.code ? 'dark' : 'default'}}" data-column="2" ng-click="colOptions.code = !colOptions.code">Code <i class="fas fa-{{colOptions.code ? 'eye' : 'eye-slash'}}"></i></button>
                            </div>
                            <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 id="heroProjectReleaseFeedbackList" class="table table-bordered table-striped manPowerPlanningDiscussionsList">
                                <thead>
                                <tr>
                                    <th>Account</th>
                                    <!--<th class="d-none d-lg-table-cell">Account Details</th>-->
                                    <th>Project</th>
                                    <th data-toggle="tooltip" title="Hours Per/day">Allocation <i class="fas fa-question-circle"></i></th>
                                    <th>From Date
                                        <small data-toggle="tooltip" title="Date of Allocation start"><i class="fas fa-question-circle"></i></small>
                                    </th>
                                    <th>To Date
                                        <small data-toggle="tooltip" title="End of Allocation start"><i class="fas fa-question-circle"></i></small>
                                    </th>
                                    <th>Overall Feedback</th>
                                    <th>Release Comment</th>
                                    <th>Feedback Date</th>
                                    <!--<th>Comments</th>-->
                                    <!--<th>Action</th>-->
                                    <!--<th data-toggle="tooltip" title="Hours Per/day" ><small>Billable / Non Billable</small> <i class="fas fa-question-circle"></i></th>-->
                                </tr>
                                </thead>
                                <tbody>
                                <tr ng-repeat="hf in heroProjectReleaseFeedbackList | orderBy:'-feedback_date'">
                                    <td><a href="" ng-click="goToSelf('accountView',{accountid:hf.accountid})">{{hf.acc_company_name}}</a></td>
                                    <!--<td  class="d-none d-lg-table-cell">
                                        <span class="nowrap"><a href="mailto:{{project.acc_email}}" target="_blank">{{project.acc_email}}</a></span><br>
                                        <span class="nowrap"><a href="tel:{{project.acc_primany_contact}}" target="_blank">{{project.acc_primany_contact}}</a></span>
                                    </td>-->
                                    <td><a ng-href="#" ng-click="goToSelf('projectView',{projectid:hf.projectid})">{{hf.proj_name}}</a></td>
                                    <td>{{hf.partialHours}}{{hf.status}}</td>
                                    <td><span class="nowrap" ng-bind="formatDate(hf.fromDate) | date:'dd MMM yyyy'"></span></td>
                                    <td>
                                        <span class="nowrap" ng-bind="formatDate(hf.toDate) | date:'dd MMM yyyy'"></span>
                                        <!-- <span class="nowrap text-success font-weight-bold" ng-if="project.isOngoing"> On Going</span>-->
                                    </td>
                                    <td>{{hf.hero_feedback}}</td>
                                    <td>{{hf.allocation_release_comment}}</td>
                                    <td><span class="nowrap" ng-bind="formatDate(hf.updatedAt) | date:'dd MMM yyyy'"></span></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
<script type="text/ng-template" id="heroFeedbackDelete.html">
    <div class="">
        <div class="modal-header bg-gradient-gray-dark">
            <h4 class="modal-title" id="modal-titlee">Are you sure you want to to delete this row/entry?</strong></h4>
        </div>
        <div class="modal-footer bg-gradient-gray-dark">
            <button class="btn btn-default" type="button" ng-click="delHeroFeedback(data)">Proceed to Delete</button>
            <button class="btn btn-primary" type="button" ng-click="cancel()">Cancel</button>
        </div>
</script>
</div>
