108 lines
4.8 KiB
PHP
108 lines
4.8 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%"> </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' },
|
|
enable:archive() == 'F',
|
|
value:hourdate,
|
|
event:{change:$root.saveEmployeehours}"
|
|
</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,
|
|
enable:archive() == 'F',
|
|
optionsCaption:'selecteer...',
|
|
event:{change:$root.saveEmployeehours}"></select>
|
|
</td>
|
|
<td data-bind="css:{'red-line': dirty}">
|
|
<!-- ko if: archive() == 'T' -->
|
|
<div data-bind="text:projectname" class="fake-input"></div>
|
|
<!-- /ko -->
|
|
<!-- ko if: hourType() == 'PROJECTS' && archive() == 'F' -->
|
|
<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' && archive() == 'F' -->
|
|
<select class="form-control form-control-sm"
|
|
data-bind="options:$root.offersWithoutProject,
|
|
optionsText:'fulloffer',
|
|
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 && archive() == 'F',
|
|
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>
|