kempo-inventory 0.5.0 → 0.5.1
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/README.md +1 -1
- package/admin/edit/index.page.html +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -341,7 +341,7 @@ Changes to the same item are added together and one that nets to nothing is left
|
|
|
341
341
|
|
|
342
342
|
### Adding to the item page
|
|
343
343
|
|
|
344
|
-
An extension can add to the admin item page by supplying a fragment named `inventory-item-actions`, in `admin/inventory-item-actions.fragment.html` in its own package. It appears under the item form, and reads the item from `?id=` in the address. (kempo-products-inventory uses it for "Make product from this item".)
|
|
344
|
+
An extension can add to the admin item page by supplying a fragment named `inventory-item-actions`, in `admin/inventory-item-actions.fragment.html` in its own package. It appears under the item form, and reads the item from `?id=` in the address. (kempo-products-inventory uses it for "Make product from this item".) That fragment has one winner, so for a section that several extensions may each add, fill the **`inventory-item-sections` location** instead with an `admin/*.global.html` file (`<content location="inventory-item-sections" priority="10">…</content>`). Every contribution is shown, ordered by `priority`, and reads the item from `?id=` too. (kempo-inventory-barcodes uses it for an item's barcodes.)
|
|
345
345
|
|
|
346
346
|
### Hooks
|
|
347
347
|
|
|
@@ -18,6 +18,12 @@ locked: true
|
|
|
18
18
|
-->
|
|
19
19
|
<fragment name="inventory-item-actions"></fragment>
|
|
20
20
|
|
|
21
|
+
<!--
|
|
22
|
+
A place for sections from any number of extensions (barcodes, say): fill the location named
|
|
23
|
+
inventory-item-sections with an admin/*.global.html file. Each section reads the item from ?id=.
|
|
24
|
+
-->
|
|
25
|
+
<location name="inventory-item-sections" />
|
|
26
|
+
|
|
21
27
|
<script type="module">
|
|
22
28
|
import { getItem, getFields } from '/inventory/sdk.js';
|
|
23
29
|
import { getAllCurrentUserPermissions } from '/kempo/sdk.js';
|