kempo-inventory 0.5.4 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/admin/index.page.html
CHANGED
|
@@ -23,6 +23,7 @@ locked: true
|
|
|
23
23
|
<script type="module" src="/inventory/components/RowAction.js"></script>
|
|
24
24
|
<script type="module" src="/inventory/components/FieldsManager.js"></script>
|
|
25
25
|
<script type="module" src="/inventory/components/ToolbarControl.js"></script>
|
|
26
|
+
<script type="module" src="/admin/components/settings/SettingsPanel.js"></script>
|
|
26
27
|
|
|
27
28
|
<h1 class="mb">Inventory</h1>
|
|
28
29
|
|
|
@@ -30,6 +31,7 @@ locked: true
|
|
|
30
31
|
<k-tab id="itemsTab" for="items">Items</k-tab>
|
|
31
32
|
<k-tab id="categoriesTab" for="categories">Categories</k-tab>
|
|
32
33
|
<k-tab id="fieldsTab" for="fields">Fields</k-tab>
|
|
34
|
+
<k-tab for="settings">Settings</k-tab>
|
|
33
35
|
|
|
34
36
|
<k-tab-content id="itemsContent" name="items">
|
|
35
37
|
<!--
|
|
@@ -108,6 +110,11 @@ locked: true
|
|
|
108
110
|
<p id="uncategorised" class="mt tc-muted"></p>
|
|
109
111
|
</k-tab-content>
|
|
110
112
|
|
|
113
|
+
<k-tab-content name="settings" class="pt">
|
|
114
|
+
<p class="tc-muted mb">How quantities and item photos behave for everyone who uses the inventory. A change applies the next time it is used.</p>
|
|
115
|
+
<k-settings-panel owner="kempo-inventory"></k-settings-panel>
|
|
116
|
+
</k-tab-content>
|
|
117
|
+
|
|
111
118
|
<k-tab-content id="fieldsContent" name="fields">
|
|
112
119
|
<k-inventory-fields></k-inventory-fields>
|
|
113
120
|
</k-tab-content>
|
package/package.json
CHANGED
|
@@ -103,7 +103,6 @@ export const createItemForm = ({ item = null, fields = [], defaults = {}, askQua
|
|
|
103
103
|
<button type="button" class="btn" id="dlg-scan" ?disabled=${locked} @click=${scan}>Scan</button>
|
|
104
104
|
</div>
|
|
105
105
|
</div>
|
|
106
|
-
${editing || !askQuantity ? '' : html`<div style="width: 9rem;"><label class="d-b mb-sm" for="dlg-qty">Starting quantity</label><input type="number" id="dlg-qty" class="full" min="0" step="1" .value=${String(defaults.quantity ?? 0)}></div>`}
|
|
107
106
|
</div>
|
|
108
107
|
<div class="mb"><label class="d-b mb-sm" for="dlg-name">Name *</label><input type="text" id="dlg-name" class="full" ?disabled=${locked} .value=${item?.name ?? defaults.name ?? ''}></div>
|
|
109
108
|
<div class="mb">
|
|
@@ -113,11 +112,14 @@ export const createItemForm = ({ item = null, fields = [], defaults = {}, askQua
|
|
|
113
112
|
@focusin=${e => offerCategories(e.currentTarget)}
|
|
114
113
|
@search=${showFields} @select=${() => setTimeout(showFields)} @change=${() => setTimeout(showFields)} @focusout=${() => setTimeout(showFields, 150)}></k-combobox>
|
|
115
114
|
</div>
|
|
116
|
-
<div class="mb">
|
|
117
|
-
<
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
<div class="d-f mb" style="align-items: flex-end; gap: var(--spacer);">
|
|
116
|
+
<div class="flex">
|
|
117
|
+
<label class="d-b mb-sm" for="dlg-unit">Unit
|
|
118
|
+
<small class="d-b tc-muted">What the quantity counts, such as oz or g. Leave empty to use the category's unit.</small>
|
|
119
|
+
</label>
|
|
120
|
+
<input type="text" id="dlg-unit" class="full" maxlength="20" .value=${item?.unit ?? defaults.unit ?? ''}>
|
|
121
|
+
</div>
|
|
122
|
+
${editing || !askQuantity ? '' : html`<div style="width: 9rem;"><label class="d-b mb-sm" for="dlg-qty">Starting quantity</label><input type="number" id="dlg-qty" class="full" min="0" step="1" .value=${String(defaults.quantity ?? 0)}></div>`}
|
|
121
123
|
</div>
|
|
122
124
|
<div class="mb"><label class="d-b mb-sm" for="dlg-tags">Tags</label><k-tags id="dlg-tags" .value=${tagsValue(item?.tags ?? defaults.tags)} .getSuggestions=${suggestTags} @input=${lowerTagInput} @change=${lowerTagChips}></k-tags></div>
|
|
123
125
|
<div class="mb"><label class="d-b mb-sm" for="dlg-description">Description</label><textarea id="dlg-description" class="full" rows="2" .value=${item?.description ?? ''}></textarea></div>
|