Files
dbois/application/views/modals/partials/_hours.php
T
2018-07-29 10:11:02 +02:00

102 lines
4.7 KiB
PHP

<div class="panel panel-bordered panel-primary panel-line">
<div class="panel-heading panel-heading-project">
<h3 class="">
projecturen
</h3>
</div>
<div class="panel-body panel-body-project">
<table class="table table-sm">
<thead>
<th class="table-cyanish-header" width="40%">
medewerker
</th>
<th class="table-cyanish-header" width="15%">
datum
</th>
<th class="table-cyanish-header" width="15%">
declarabel
</th>
<th class="table-cyanish-header align-right" width="15%">
uren
</th>
<th class="table-cyanish-header align-right" width="15%">
omzet
</th>
<!-- <th class="table-cyanish-header" width="8%">-->
<!-- &nbsp;-->
<!-- </th>-->
</thead>
<tbody data-bind="foreach:projecthours">
<tr>
<td>
<span data-bind="text:dbo.helpers.findArrayElement('id', 'fullname', projectemployee_id(), $root.projectEmployees()),
visible:! inEdit()"></span>
<select class="form-control form-control-sm"
data-bind="options:$root.projectEmployees,
optionsText:'fullname',
optionsValue:'id',
value:projectemployee_id,
optionsCaption:'medewerker',
visible: inEdit(),
event:{change:$root.saveProjecthour}">
</select>
</td>
<td>
<span data-bind="text:hourdate, visible:! inEdit()"></span>
<input type="text"
class="form-control form-control-sm"
placeholder="datum"
data-bind="datepicker:{dateFormat: 'dd-mm-yy' },
value:hourdate, visible:inEdit,
event:{change:$root.saveProjecthour}"/>
</td>
<td class="align-center">
<i class="icon fa-check" data-bind="visible:hourtype_id() == 1, click:$root.setHourtype.bind($data,2)"></i>
<i class="icon fa-square-o" data-bind="visible:hourtype_id() != 1, click:$root.setHourtype.bind($data, 1)"></i>
</td>
<td class="align-right">
<span data-bind=" visible: ! inEdit()">
<span data-bind="text:hours"></span>
uur
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="uren"
data-bind="textInput:hours, visible:inEdit,
event:{change:$root.saveProjecthour,keyup:$root.validateNumber.bind($data, 'hours')}"/>
</td>
<td class="align-right">
<i class="icon fa-euro"></i>
<span data-bind="text:dbo.helpers.numberWithPoints(revenue())"></span>
</td>
<!-- <td>-->
<!-- <i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editProjecthour"></i>-->
<!-- <i class="icon fa-trash redish pointer" title="verwijder"-->
<!-- data-bind="click:$root.removeProjecthour"></i>-->
<!-- </td>-->
</tr>
</tbody>
<tfoot>
<tr>
<th class="table-cyanish-header" colspan="2">Totaal</th>
<th class="table-cyanish-header">&nbsp;</th>
<th class="table-cyanish-header align-right">
<span data-bind="text:totalHours"></span> uur
</th>
<th class="table-cyanish-header align-right">
<i class="icon fa-euro"></i>
<span data-bind="text:dbo.helpers.numberWithPoints(totalRevenue())"></span>
</th>
<!-- <th class="table-cyanish-header">&nbsp;</th>-->
</tr>
<!-- <tr>-->
<!-- <td colspan="5">-->
<!-- <button class="btn btn-primary btn-round btn-sm" data-bind="click:newProjecthour">-->
<!-- nieuwe uren-->
<!-- </button>-->
<!-- </td>-->
<!-- </tr>-->
</tfoot>
</table>
</div>
</div>