<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-olive">
                        <go-back/>
                        <i class="fas fa-book"></i> Manpower Planning / Resource requirement discussions
                    </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 href="{{baseurl}}/manpowerplanningdiscussions/list">ManPowerPlanningDiscussions</a></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="card card-primary card-outline" >
                        <div class="card-header border-transparent  mb-1">
                            <h3 class="card-title">Data</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 id="myDiaryList" class="table table-bordered table-striped manPowerPlanningDiscussionsList">
                                    <thead>
                                    <tr>
                                        <th>Meeting Date</th>
                                        <th>Notes</th>
                                        <th>Attendees</th>
                                        <th>Attachment</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="d in manPowerPlanningDiscussions | orderBy:'-meeting_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(d.meeting_date) | date:'dd MMM yyyy'"></div>
                                        </td>
                                        <td>
                                            <div >{{d.meeting_notes | titlecase}}</div>
                                        </td>
                                        <td>
                                            <div class="" ng-bind-html="d.meeting_attendees"></div>
                                        </td>
                                        <td>
                                            <div ><a target="_blank" href="{{baseurl}}/app/uploads/{{d.meeting_attachment}}">Download Attachment</a></div>
                                        </td>
                                        <!--<td>
                                            <div class="">{{d.comments}}</div>
                                        </td>-->
                                        <td>
                                            <button class="btn btn-danger" ng-click="openManPowerPlanningDiscussionsDeleteModal(d)" class="dropdown-item"><i class="fas fa-trash"></i></button>
                                            <!--<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>-->
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <script type="text/ng-template" id="ManPowerPlanningDiscussionsDelete.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="delManPowerPlanningDiscussions(data)">Proceed to Delete</button>
                <button class="btn btn-primary" type="button" ng-click="cancel()">Cancel</button>
            </div>
        </div>
    </script>
</div>
<script type="text/ng-template" id="EditMyDiaryEntry.html">
    <div class="">
        <div class="modal-header bg-olive">
            <h4 class="modal-title" id="modal-title">Edit</h4>
        </div>
        <div class="modal-body" id="modal-body">
            <div class="form-group"><label>Project Name: </label> <strong class="text-olive">{{data.diary.proj_name}}</strong></div>

            <div class="form-group">
                <label>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='data.diary.date'/>
            </div>
            <div class="form-group">
                <label for="logtype">Category</label>
                <select id="logtype" class="form-control custom-select"
                        ng-model="data.diary.logtype" ng-options="lt.mydiarylogtypeid as lt.lt_name | titlecase for lt in logTypes">
                </select>
            </div>
            <div class="form-group">
                <label for="description">Work Area/Description*</label>
                <textarea id="description" class="form-control" required ng-model="data.diary.description" placeholder="Description" rows="2" maxlength="1000"></textarea>
            </div>
            <div class="form-group">
                <label for="reference">Reference</label>
                <input id="reference" class="form-control" ng-model="data.diary.reference" type="text" placeholder="Reference(Jira Issue) in 100 char" maxlength="100">
            </div>
            <div class="form-group">
                <label for="hours">Hours*</label>
                <input id="hours" class="form-control" required ng-model="data.diary.hours" type="number" placeholder="Hours" step="0.25" max="24" min="0.5">
            </div>
            <!--<div class="form-group">
                <label for="comments">Comments</label>
                <textarea id="comments" class="form-control" ng-model="data.diary.comments" placeholder="Comment/Notes" rows="2" maxlength="500"></textarea>
            </div>-->
        </div>
        <div class="modal-footer bg-olive">
            <button class="btn btn-default" type="button" ng-click="change(data)">Save Changes</button>
            <button class="btn btn-primary" type="button" ng-click="cancel()">Cancel</button>
        </div>
    </div>
</script>
