Files
dbois/application/views/modals/partials/_reservations.php
T
2019-10-07 19:45:42 +02:00

63 lines
2.8 KiB
PHP

<div class="panel panel-bordered panel-primary panel-line">
<div class="panel-heading panel-heading-project">
<h3 class="">
budget gereserveerd (incl. btw)
</h3>
</div>
<div class="panel-body panel-body-project">
<table class="table table-sm">
<thead>
<th class="table-cyanish-header align-right" width="40%">
bedrag
</th>
<th class="table-cyanish-header" width="40%">
klant
</th>
<th class="table-cyanish-header" width="20%">&nbsp;</th>
</thead>
<tbody data-bind="foreach:reservations">
<tr>
<td class="align-right" data-bind="css:{'red-line':invalidReservation()}">
<span data-bind="visible:!inEdit()">
<i class="icon fa-euro"></i>
<span data-bind="text:dbo.helpers.numberWithPoints(reservationamount())"></span>
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="bedrag"
data-bind="textInput:reservationamount, visible:inEdit,
event:{change:$root.saveReservation,keyup:$root.validateNumber.bind($data, 'reservationamount')}"/>
</td>
<td data-bind="css:{'red-line':invalidReservation()}">
<span data-bind="text:dbo.helpers.findArrayElement('id', 'contactperson', external_id(), $root.externals()),
visible:! inEdit()"></span>
<select class="form-control"
data-bind="
options:$root.externals,
optionsText:'contactperson',
optionsValue:'id',
value:external_id,
optionsCaption:'selecteer...',
visible: inEdit(),
event:{change:$root.saveReservation}"
</td>
<td data-bind="css:{'red-line':invalidReservation()}">
<i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editReservation"></i>
<i class="icon fa-trash redish pointer" title="verwijder"
data-bind="click:$root.removeReservation"></i>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="4">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:addReservation">
nieuwe reservering
</button>
</th>
</tr>
</tfoot>
</table>
</div>
</div>