get_my/client/MenuItems/menuItemsTbl.html
Brian McGonagill 88fa7c1d22 Updated menus to work better with list item linking
Lots of changes made (almost a refactor <--- four letter word to me...
- Menu Items collection is now the "permanent" storage location for menu item for any day.  So, if i set Green Chile Chicken Enchiladas, Beans, and Rice as an item for a day, it will be stored as a Menu Item for later use.
- Linking menu items to items that can be added to a shopping list - This has been updated to be more reusable. So as you re-choose a menu item that's already got list items linked, it just shows up for you to use to build a shopping list as needed.
- Deleting menu items from a menu - changed to delete them only from the menu, and not from the database.
- Dashboard updated to pull today's menu item from the menu, and not the menu item list.
2024-08-14 11:38:13 -05:00

42 lines
2 KiB
HTML

<template name="menuItemsTbl">
<div class="row">
<div class="col s12">
<table>
<thead>
<tr>
<th>Menu Item</th>
<th>Date to Serve</th>
<th>Has Product Links</th>
<th>Actions</th>
</tr>
</thead>
{{#each thisMenuItems}}
{{#each menuItems}}
<tr>
<td>
<span>
{{menuItemName}}
</span>
</td>
<td>
{{serveDate}}
</td>
<td>
{{#if $eq isLinked true}}<a class="waves-effect waves-light blue darken-3 white-text btn addProdsToList modal-trigger" href="#addProdToList">+ Shopping List</a>{{/if}}
</td>
<td>
<i class="material-icons tooltipped modal-trigger deleteMenuItem clickable" href="#modalDelete" data-position="top" data-tooltip-id="deleteMenuTip">delete</i>
<i class="material-icons tooltipped modal-trigger linkToProducts clickable" href="#modalLinkProducts" data-position="top" data-tooltip-id="linkMenuTip">link</i>
</td>
</tr>
{{/each}}
{{/each}}
</table>
<div class="tooltip-content" style="display: none;" id="deleteMenuTip">Delete this menu item</div>
<div class="tooltip-content" style="display: none;" id="linkMenuTip">Link Products that make up this menu item</div>
</div>
</div>
{{> deleteConfirmationModal}}
{{> modalLinkProducts}}
{{> addProdToListModal}}
</template>