Fix to always show at least one blank invoice item

This commit is contained in:
Hillel Coren 2017-09-03 18:41:44 +03:00
parent eecbb6e558
commit e47e42ddfc

View File

@ -1,4 +1,4 @@
<thead {!! $isTasks ? 'style="display:none;" data-bind="visible: $root.hasTasks"' : ($invoice->exists || ! empty($tasks) ? 'data-bind="visible: $root.hasItems"' : '') !!}> <thead {!! $isTasks ? 'style="display:none;" data-bind="visible: $root.hasTasks"' : ($invoice->has_tasks || ! empty($tasks) ? 'data-bind="visible: $root.hasItems"' : '') !!}>
@if ($isTasks) @if ($isTasks)
<tr data-bind="visible: $root.hasItems"> <tr data-bind="visible: $root.hasItems">
<td style="20px" colspan="20"></td> <td style="20px" colspan="20"></td>
@ -21,7 +21,7 @@
<th style="min-width:32px;" class="hide-border"></th> <th style="min-width:32px;" class="hide-border"></th>
</tr> </tr>
</thead> </thead>
<tbody data-bind="sortable: { data: invoice_items_{{ $isTasks ? 'with_tasks' : 'without_tasks' }}, allowDrop: false, afterMove: onDragged} {{ $isTasks ? ', visible: $root.hasTasks' : ($invoice->exists || ! empty($tasks) ? ', visible: $root.hasItems' : '') }}" <tbody data-bind="sortable: { data: invoice_items_{{ $isTasks ? 'with_tasks' : 'without_tasks' }}, allowDrop: false, afterMove: onDragged} {{ $isTasks ? ', visible: $root.hasTasks' : ($invoice->has_tasks || ! empty($tasks) ? ', visible: $root.hasItems' : '') }}"
{!! $isTasks ? 'style="display:none;border-spacing: 100px"' : '' !!}> {!! $isTasks ? 'style="display:none;border-spacing: 100px"' : '' !!}>
<tr data-bind="event: { mouseover: showActions, mouseout: hideActions }" class="sortable-row"> <tr data-bind="event: { mouseover: showActions, mouseout: hideActions }" class="sortable-row">
<td class="hide-border td-icon"> <td class="hide-border td-icon">