Added the possibility to mark a shopping list item as "done" (closes #257)

This commit is contained in:
Bernd Bestel
2019-07-06 17:56:59 +02:00
parent e4d26bb8fd
commit b24683f954
4 changed files with 51 additions and 2 deletions

View File

@@ -85,8 +85,13 @@
</thead>
<tbody class="d-none">
@foreach($listItems as $listItem)
<tr id="shoppinglistitem-{{ $listItem->id }}-row" class="@if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $listItem->product_id) !== null) table-info @endif">
<tr id="shoppinglistitem-{{ $listItem->id }}-row" class="@if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $listItem->product_id) !== null) table-info @endif @if($listItem->done == 1) text-muted text-strike-through @endif">
<td class="fit-content border-right">
<a class="btn btn-success btn-sm order-listitem-button" href="#"
data-item-id="{{ $listItem->id }}"
data-item-done="{{ $listItem->done }}">
<i class="fas fa-check"></i>
</a>
<a class="btn btn-sm btn-info" href="{{ $U('/shoppinglistitem/') . $listItem->id . '?list=' . $selectedShoppingListId }}">
<i class="fas fa-edit"></i>
</a>