Diversen opmerkingen Peter (23-08-2019)

This commit is contained in:
2019-09-12 20:16:57 +02:00
parent f5b815d34d
commit b49fb957a3
17 changed files with 1194 additions and 1094 deletions
+21 -47
View File
@@ -28,87 +28,61 @@
<table class="table table-sm">
<thead>
<tr>
<th class="table-tealish-header">medewerker</th>
<th class="table-tealish-header">datum</th>
<th class="table-tealish-header">soort uren</th>
<th class="table-tealish-header">project</th>
<th class="table-tealish-header" style="min-width:100px;">uren</th>
<th class="table-tealish-header">&nbsp;</th>
<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': id() == 0}">
<span data-bind="text:dbo.helpers.findArrayElement('id', 'fullname', employee_id(), $root.employees()),
visible: ! inEdit()"></span>
<select class="form-control form-control-sm"
data-bind="options:$root.employees,
optionsText:'fullname',
optionsValue:'id',
value:employee_id,
optionsCaption: 'selecteer...',
visible:inEdit(),
enable: ! $root.selectedEmployeeID,
event:{change:$root.changeEmployee}"></select>
</td>
<td data-bind="css:{'red-line': id() == 0}">
<span data-bind="text:hourdate, visible:! inEdit()"></span>
<td data-bind="css:{'red-line': dirty}">
<input class="form-control form-control-sm"
data-bind="datepicker:{dateFormat: 'dd-mm-yy' },
value:hourdate, visible:inEdit(),
value:hourdate,
event:{change:$root.saveEmployeehour}"
</td>
<td data-bind="css:{'red-line': id() == 0}">
<span data-bind="text:dbo.helpers.findArrayElement('id', 'description', hourtype_id(), $root.hourtypes()),
visible: ! inEdit()"></span>
<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,
optionsCaptiuon:'selecteer...',
visible:inEdit(),
optionsCaption:'selecteer...',
event:{change:$root.saveEmployeehours}"></select>
</td>
<td data-bind="css:{'red-line': id() == 0}">
<td data-bind="css:{'red-line': dirty}">
<!-- ko if: hourType() == 'PROJECTS' -->
<span data-bind="text:dbo.helpers.findArrayElement('projectID', 'projectname', projectID(), projects()),
visible: ! inEdit()"></span>
<select class="form-control form-control-sm"
data-bind="options:projects,
optionsText:'projectname',
data-bind="options:$root.projects,
optionsText:'projectFull',
optionsValue:'projectID',
value:projectID,
optionsCaption:'selecteer...',
visible:inEdit(),
event:{change:$root.saveEmployeehours}"></select>
<!-- /ko -->
<!-- ko if: hourType() == 'OFFERS' -->
<span data-bind="text:dbo.helpers.findArrayElement('id', 'offername', projectID(), $root.offersWithoutProject()),
visible: ! inEdit()"></span>
<select class="form-control form-control-sm"
data-bind="options:$root.offersWithoutProject,
optionsText:'offername',
optionsValue:'id',
value:projectID,
optionsCaption:'selecteer...',
visible:inEdit(),
event:{change:$root.saveEmployeehours}"></select>
<!-- /ko -->
</td>
<td class="align-right" data-bind="css:{'red-line': id() == 0}">
<span data-bind=" visible: ! inEdit()">
<span data-bind="text:hours"></span>
uur
</span>
<input type="text"
<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, visible:inEdit,
event:{change:$root.saveEmployeehours,keyup:$root.validateNumber.bind($data, 'hours')}"/>
data-bind="textInput:hours,
enable:canFillInHours,
event:{keyup:$root.saveDelayedEmployeehours,
change: $root.saveDelayedEmployeehours}"/>
</td>
<td data-bind="css:{'red-line': id() == 0}">
<i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editEmployeehour"></i>
<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>
@@ -125,4 +99,4 @@
</tr>
</tfoot>
</table>
</table>