Files
dbois/application/views/pages/employeehours_view.php
T

103 lines
4.5 KiB
PHP

<div class="row">
<div class="col-md-2">
<select class="form-control form-control-sm"
data-bind="options:years,
optionsText:'year',
optionsValue:'year',
value:selectedYear,
event:{change:refreshEmployeehours}"></select>
</div>
<div class="col-md-2">
<select class="form-control form-control-sm"
data-bind="options:months,
optionsText:'month',
optionsValue:'monthID',
value:selectedMonth,
event:{change:refreshEmployeehours}"></select>
</div>
<div class="col-md-2">
<select class="form-control form-control-sm"
data-bind="options:employees,
optionsText:'fullname',
optionsValue:'id',
value:$root.selectedEmployeeID,
event:{change:refreshEmployeehours}"></select>
</div>
</div>
<br/>
<table class="table table-sm">
<thead>
<tr>
<th class="table-tealish-header" width="15%">datum</th>
<th class="table-tealish-header" width="35%">soort uren</th>
<th class="table-tealish-header" width="35%">project</th>
<th class="table-tealish-header" width="10%" style="min-width:100px;">uren</th>
<th class="table-tealish-header" width="5%">&nbsp;</th>
</tr>
</thead>
<tbody data-bind="foreach:employeehours">
<tr>
<td data-bind="css:{'red-line': dirty}">
<input class="form-control form-control-sm"
data-bind="datepicker:{dateFormat: 'dd-mm-yy' },
value:hourdate,
event:{change:$root.saveEmployeehour}"
</td>
<td data-bind="css:{'red-line': dirty}">
<select class="form-control form-control-sm"
data-bind="options:$root.hourtypes,
optionsText:'description',
optionsValue:'id',
value:hourtype_id,
optionsCaption:'selecteer...',
event:{change:$root.saveEmployeehours}"></select>
</td>
<td data-bind="css:{'red-line': dirty}">
<!-- ko if: hourType() == 'PROJECTS' -->
<select class="form-control form-control-sm"
data-bind="options:$root.projects,
optionsText:'projectFull',
optionsValue:'projectID',
value:projectID,
optionsCaption:'selecteer...',
event:{change:$root.saveEmployeehours}"></select>
<!-- /ko -->
<!-- ko if: hourType() == 'OFFERS' -->
<select class="form-control form-control-sm"
data-bind="options:$root.offersWithoutProject,
optionsText:'offername',
optionsValue:'id',
value:projectID,
optionsCaption:'selecteer...',
event:{change:$root.saveEmployeehours}"></select>
<!-- /ko -->
</td>
<td class="align-right" data-bind="css:{'red-line': dirty}">
<input type="number"
class="form-control form-control-sm align-right"
paceholder="uren"
data-bind="textInput:hours,
enable:canFillInHours,
event:{keyup:$root.saveDelayedEmployeehours,
change: $root.saveDelayedEmployeehours}"/>
</td>
<td data-bind="css:{'red-line': dirty}">
<!-- <i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editEmployeehour"></i>-->
<i class="icon fa-trash redish pointer" title="verwijder"
data-bind="click:$root.removeEmployeehour"></i>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newEmployeehour">
nieuwe uren
</button>
</td>
</td>
</tr>
</tfoot>
</table>