current state
This commit is contained in:
45
src/frontend/manage/imports/jsonImport.eta.html
Normal file
45
src/frontend/manage/imports/jsonImport.eta.html
Normal file
@ -0,0 +1,45 @@
|
||||
<%~ E.includeFile("../../partials/head.eta.html", {"title": "Importer - JSON" }) %> <%~ E.includeFile("../../partials/controls.eta.html", {"active": "SETT_IMPORT_JSON" }) %>
|
||||
|
||||
<h1>JSON Import</h1>
|
||||
Upload a JSON file to import into the database. The JSON file must have the following columns:
|
||||
<ul>
|
||||
<li>name</li>
|
||||
<li>amount</li>
|
||||
<li>manufacturer</li>
|
||||
<li>category</li>
|
||||
</ul>
|
||||
The following columns are optional:
|
||||
<ul>
|
||||
<li>sku</li>
|
||||
<li>comment</li>
|
||||
<li>StorageLocation (import currently not supported)</li>
|
||||
</ul>
|
||||
It should be formated as a list of objects, like this:
|
||||
<pre>
|
||||
[
|
||||
{
|
||||
"name": "Item 1",
|
||||
"amount": 1,
|
||||
"manufacturer": "Manufacturer 1",
|
||||
"category": "Category 1",
|
||||
"sku": "SKU 1",
|
||||
"comment": "Comment 1"
|
||||
},
|
||||
{
|
||||
"name": "Item 2",
|
||||
"amount": 2,
|
||||
"manufacturer": "Manufacturer 2",
|
||||
"category": "Category 2",
|
||||
"sku": "SKU 2",
|
||||
"comment": "Comment 2"
|
||||
}
|
||||
]
|
||||
</pre>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<label for="formFile" class="form-label">JSON Inventory File Upload</label>
|
||||
<input class="form-control" type="file" id="formFile" name="formFile" /><br />
|
||||
|
||||
<input type="submit" value="Run import" class="btn btn-primary" />
|
||||
</form>
|
||||
|
||||
<%~ E.includeFile("../../partials/controlsFoot.eta.html") %> <%~ E.includeFile("../../partials/foot.eta.html") %>
|
Reference in New Issue
Block a user