428 lines
25 KiB
HTML
428 lines
25 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr" id="main_html">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8" />
|
|
<title id="title">Recipes</title>
|
|
|
|
|
|
<!-- Material Icons -->
|
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
|
<!-- Material Symbols - Outlined Set -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet" />
|
|
<!-- Material Symbols - Rounded Set -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded" rel="stylesheet" />
|
|
<!-- Material Symbols - Sharp Set -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp" rel="stylesheet" />
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/uikit.min.css') }}"/>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/pantry.css') }}"/>
|
|
{% if session['user']['flags']['darkmode'] %}
|
|
<link id="dark-mode" rel="stylesheet" href="{{ url_for('static', filename='css/dark-mode.css') }}"/>
|
|
{% endif %}
|
|
|
|
<script src="{{ url_for('static', filename='js/uikit.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/uikit-icons.min.js') }}"></script>
|
|
</head>
|
|
<style>
|
|
:root {
|
|
--primary-color: {{ session['user']['flags']['styles']['primary_color']}};
|
|
}
|
|
</style>
|
|
{% if session['user']['flags']['darkmode'] %}
|
|
<body class="uk-light">
|
|
{% else %}
|
|
<body>
|
|
{% endif %}
|
|
<nav class="uk-navbar-container">
|
|
<div class="uk-container uk-container-expand">
|
|
<div class="uk-navbar uk-navbar-primary">
|
|
<!-- Application Navigation-->
|
|
<div class="uk-navbar-left">
|
|
<ul class="uk-navbar-nav">
|
|
<li>
|
|
<a href>Apps</a>
|
|
<div class="uk-navbar-dropdown" uk-drop="mode: click; multi:false">
|
|
<ul class="uk-nav uk-navbar-dropdown-nav">
|
|
<li><a href="/planner">Planner</a></li>
|
|
<li><a href="/recipes">Recipes</a></li>
|
|
<li><a href="/shopping-lists">Shopping Lists</a></li>
|
|
<li class="uk-nav-header">Logistics</li>
|
|
<li><a href="/items">Items</a></li>
|
|
<li><a href="/items/transaction">Transaction</a></li>
|
|
<li><a href="/receipts">Receipts</a></li>
|
|
<li class="uk-nav-header">Points of Ease</li>
|
|
<li><a href="/poe/scanner">Transaction Scanner</a></li>
|
|
<li><a href="/poe/receipts">Receipts Scanner</a></li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<!-- Breadcrumbs Navigation -->
|
|
<div class="uk-navbar-center uk-visible@m">
|
|
<ul class="uk-breadcrumb uk-margin-remove">
|
|
<li class="uk-disabled" style="cursor: pointer;"><span><strong>{{current_site}}</strong></span>
|
|
<div uk-dropdown="mode: hover">
|
|
<ul class="uk-nav uk-dropdown-nav">
|
|
<li class="uk-nav-header">Select Site</li>
|
|
<li class="uk-nav-divider"></li>
|
|
{% for site in sites %}
|
|
{% if site == current_site %}
|
|
<li><a class="uk-disabled" href="#">{{site}}</a></li>
|
|
{% else %}
|
|
<li><a onclick="changeSite('{{site}}')">{{site}}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
<li style="cursor: default; user-select: none;" class="uk-disabled"><span>Modules</span></li>
|
|
<li class="uk-disabled"><span>Recipes</span></li>
|
|
<li class="uk-disabled"><span>Editing Recipe</span></li>
|
|
</ul>
|
|
</div>
|
|
<!-- Profile/Management Navigation-->
|
|
<div class="uk-navbar-right">
|
|
<ul class="uk-navbar-nav">
|
|
<li>
|
|
<a href="#">
|
|
<img src="{{session['user']['profile_pic_url']}}" alt="Profile Picture" class="profile-pic uk-visible@m" style="width: 40px; height: 40px; border-radius: 50%; margin-right: 5px;">
|
|
{{username}}
|
|
</a>
|
|
<div class="uk-navbar-dropdown" uk-drop="mode: click; multi:false">
|
|
<ul class="uk-nav uk-navbar-dropdown-nav">
|
|
<li><a href="/profile">Profile</a></li>
|
|
<li><a onclick="toggleDarkMode()">Dark Mode</a></li>
|
|
<li><a href="/site-management">Site Management</a></li>
|
|
<li><a href="/administration">System Management</a></li>
|
|
<li><a href="/access/logout">Logout</a></li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="uk-container">
|
|
<div class="uk-section">
|
|
<div uk-grid>
|
|
<div class="uk-width-1-1">
|
|
<div class="uk-margin">
|
|
<label class="uk-form-label" for="recipeName">Recipe Name</label>
|
|
<input onchange="updateName()" id="recipeName" class="uk-input uk-form-large" type="text" placeholder="" aria-label="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-width-1-1">
|
|
<div class="uk-margin">
|
|
<label class="uk-form-label" for="recipeCreationDate">Recipe Creation Date</label>
|
|
<input id="recipeCreationDate" class="uk-input uk-disabled" type="text" placeholder="" aria-label="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-width-1-1">
|
|
<div class="uk-margin">
|
|
<label class="uk-form-label" for="recipeAuthor">Recipe Author</label>
|
|
<input id="recipeAuthor" class="uk-input uk-disabled" type="text" placeholder="" aria-label="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-width-1-1">
|
|
<div class="uk-margin">
|
|
<label class="uk-form-label" for="recipeDescription">Recipe Description</label>
|
|
<textarea id="recipeDescription" class="uk-textarea" rows="5" placeholder="" aria-label=""></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="uk-width-1-1">
|
|
<ul uk-tab>
|
|
<li><a href="#">Instructions</a></li>
|
|
<li><a href="#">Ingrediants</a></li>
|
|
<li><a href="">File</a></li>
|
|
</ul>
|
|
|
|
<div class="uk-switcher uk-margin">
|
|
<div>
|
|
<div uk-grid>
|
|
<div class="uk-width-1-1">
|
|
<p class="uk-text-meta">
|
|
Recipes need instructions so the end user is able to replicate them but apart of that requires work.
|
|
Below you will type each "bullet" of instructions that will be view'd by the user and to follow along with.
|
|
if this is a new recipe we have provided an example that can be cleared off for your own use.
|
|
</p>
|
|
</div>
|
|
<div class="uk-width-1-1 uk-margin-small-top">
|
|
<textarea id="addInstruction" class="uk-textarea" type="text" placeholder="" aria-label=""></textarea>
|
|
<button onclick="addInstruction()" class="uk-button uk-button-default uk-width-shrink uk-margin-small-top">Add Instruction</button>
|
|
</div>
|
|
<div class="uk-width-1-1 uk-margin-small-top">
|
|
<hr class="uk-divider-icon">
|
|
</div>
|
|
<div class="uk-width-1-1 uk-margin-small-top">
|
|
<ul id="instructions_list" class="instruction-list"></ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div uk-grid>
|
|
<div class="uk-width-1-1">
|
|
<p class="uk-text-meta">
|
|
Recipes need ingredients so the end user knows what they need to purchase to make your recipe. Below you can
|
|
add custom ingredients (which i recommend providing a link to for ease of purchase) and from your pantry. You
|
|
will need to provide a qty and unit of measurement so they also know how much they need.
|
|
</p>
|
|
</div>
|
|
<div class="uk-width-1-1 uk-margin-small-top" uk-grid>
|
|
<div class="uk-button-group class="uk-width-expand" ">
|
|
<button uk-toggle="target: #addCustomItem" type="button" id="addCustom" class="uk-button uk-button-default">Add Custom</button>
|
|
<button id="addSku" onclick="openSKUModal()" class="uk-button uk-button-default">Add SKU</button>
|
|
<button id="addSku" onclick="openNewSKUModal()" class="uk-button uk-button-default">Create SKU</button>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="uk-width-1-1 uk-margin-small-top">
|
|
<hr class="uk-divider-icon">
|
|
</div>
|
|
<div class="uk-width-1-1 uk-margin-small-top">
|
|
<table class="uk-table uk-table-striped">
|
|
<caption>Here is the table of all the ingrediants added to the recipe</caption>
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Qty</th>
|
|
<th>UOM</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="ingrediantsTableBody">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div uk-grid>
|
|
<div class="uk-width-1-1 uk-margin" uk-margin>
|
|
<div uk-form-custom="target: true">
|
|
<input type="file" aria-label="Custom controls">
|
|
<input class="uk-input" type="text" placeholder="Select file" aria-label="Custom controls" disabled>
|
|
</div>
|
|
<button onclick="updateImage()" class="uk-button uk-button-default">Submit</button>
|
|
</div>
|
|
<div id="imgDiv" class="uk-width-1-1 uk-width-1-4@m uk-flex uk-flex-center">
|
|
<img id="recipeImage" alt="" src="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button id="saveButton" onclick="postUpdate()" class="uk-button uk-button-primary floating-button"><span class="uk-flex material-icons">save</span></button>
|
|
|
|
<!-- Line Item Edit Modal-->
|
|
<div id="editLineItem" uk-modal>
|
|
<div class="uk-modal-dialog">
|
|
<button class="uk-modal-close-default" type="button" uk-close></button>
|
|
<div class="uk-modal-header">
|
|
<h2 id="lineHeader" class="uk-modal-title">Edit line item</h2>
|
|
</div>
|
|
<div class="uk-modal-body">
|
|
<div class="uk-margin-small">
|
|
<p class="uk-text-meta">You are editing a line item. In most cases your recipe will have certain ingrediants associated with them and this is where you would
|
|
do your best to use the system along with custom entered items to portray what is needed in a recipe. Take note any SKU items can be auto-issued in the
|
|
system when you select to complete a recipe in the app.
|
|
</p>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="lineType">Item Type</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input uk-disabled" id="lineType" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="lineName">Item Name</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="lineName" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="lineQty">Quantity</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="lineQty" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="lineUOM">Unit of Measure</label>
|
|
<select id="lineUOM" class="uk-select" aria-label="Select">
|
|
</select>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="lineWeblink">Weblink</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="lineWeblink" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="uk-modal-footer uk-text-right">
|
|
<button id="deleteLineItemButton" class="uk-button uk-button-default" type="button">Delete</button>
|
|
<button id="saveLineItemButton" class="uk-button uk-button-primary" type="button">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- add Custom Line Modal-->
|
|
<div id="addCustomItem" uk-modal>
|
|
<div class="uk-modal-dialog">
|
|
<button class="uk-modal-close-default" type="button" uk-close></button>
|
|
<div class="uk-modal-header">
|
|
<h2 id="lineHeader" class="uk-modal-title">Add Custom Item...</h2>
|
|
</div>
|
|
<div class="uk-modal-body">
|
|
<div class="uk-margin-small">
|
|
<p class="uk-text-meta">A Custom item can be added to a recipe but will not be tracked or auto-issued from the system on recipe completion. Even then
|
|
custom items are useful for things that are hard to track or you just dont want to track.
|
|
</p>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="customType">Item Type</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input uk-disabled" id="customType" type="text" placeholder="" value="custom">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="customName">Item Name</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="customName" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="customQty">Quantity</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="customQty" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="customUOM">Unit of Measure</label>
|
|
<select id="customUOM" class="uk-select" aria-label="Select">
|
|
{% for unit in units %}
|
|
<option value="{{unit['id']}}">{{unit['fullname']}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="customWeblink">Weblink</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="customWeblink" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="uk-modal-footer uk-text-right">
|
|
<button onclick="addCustomItem()" class="uk-button uk-button-primary" type="button">Add</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- add New SKU Line Modal-->
|
|
<div id="addNewSKUItem" uk-modal>
|
|
<div class="uk-modal-dialog">
|
|
<button class="uk-modal-close-default" type="button" uk-close></button>
|
|
<div class="uk-modal-header">
|
|
<h2 id="lineHeader" class="uk-modal-title">Add New Item...</h2>
|
|
</div>
|
|
<div class="uk-modal-body">
|
|
<div class="uk-margin-small">
|
|
<p class="uk-text-meta">Adding a new sku with both create a new item in the system with the information you provide and also add it to the recipe.
|
|
</p>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="newSKUType">Line Type</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input uk-disabled" id="newSKUType" type="text" placeholder="" value="new sku">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="newSKUName">Item Name</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="newSKUName" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="newSKUSubtype">Item Type</label>
|
|
<select id="newSKUSubtype" class="uk-select" aria-label="Select">
|
|
<option value="FOOD">Food</option>
|
|
<option value="FOOD_PLU">Food (PLU)</option>
|
|
</select>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="newSKUQty">Quantity</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="newSKUQty" type="number">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="newSKUUOM">Unit of Measure</label>
|
|
<select id="newSKUUOM" class="uk-select" aria-label="Select">
|
|
{% for unit in units %}
|
|
<option value="{{unit['id']}}">{{unit['fullname']}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="newSKUCost">Cost</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="newSKUCost" type="number">
|
|
</div>
|
|
</div>
|
|
<div class="uk-margin-small">
|
|
<label class="uk-form-label" for="newWeblink">Weblink</label>
|
|
<div class="uk-form-controls">
|
|
<input class="uk-input" id="newWeblink" type="text" placeholder="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="uk-modal-footer uk-text-right">
|
|
<button onclick="addNewSKUItem()" class="uk-button uk-button-primary" type="button">Add</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Items modal lookup -->
|
|
<div id="itemsModal" uk-modal>
|
|
<div id="itemsModalInner" class="uk-modal-dialog uk-modal-body " uk-overflow-auto>
|
|
<h2 class="uk-modal-title">Select Item</h2>
|
|
<p>Select an Item from the system...</p>
|
|
<div id="searchItemsForm" onkeydown="searchItemTable(event)" class="uk-search uk-search-default uk-align-center">
|
|
<input id="searchItemsInput" class="uk-border-pill uk-search-input" type="search" placeholder="" aria-label="">
|
|
<span class="uk-search-icon-flip" uk-search-icon></span>
|
|
</div>
|
|
<nav aria-label="Pagination">
|
|
<ul id="itemsPage" class="uk-pagination uk-flex-center" uk-margin>
|
|
<li><a href="#"><span uk-pagination-previous></span></a></li>
|
|
<li><a href="#">1</a></li>
|
|
<li class="uk-disabled"><span>…</span></li>
|
|
<li><a href="#">5</a></li>
|
|
<li><a href="#">6</a></li>
|
|
<li class="uk-active"><span aria-current="page">7</span></li>
|
|
<li><a href="#">8</a></li>
|
|
<li><a href="#"><span uk-pagination-next></span></a></li>
|
|
</ul>
|
|
</nav>
|
|
<table class="uk-table uk-table-striped uk-table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Barcode</th>
|
|
<th>Name</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="itemsTableBody">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
<script>
|
|
const session = {{session|tojson}}
|
|
const recipe_id = {{recipe_id|tojson}}
|
|
const units = {{units|tojson}}
|
|
</script>
|
|
<script src="{{ url_for('recipes_api.static', filename='js/recipeEditHandler.js') }}"></script>
|
|
</html> |