preparing direct loading of items

current state:
- loading of item implemented on backend
- need to post path information
- could be resolved re-using _getLocationEntities_, but that would include the full data of all items at that location, which is probably not required

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-11-17 00:37:45 +01:00
parent a4488a2fae
commit 0f7fb99eaa
4 changed files with 75 additions and 7 deletions

View File

@@ -92,6 +92,12 @@
}
}
async function loadItem(){
if (!item_id) return;
const url = api(`stock/${owner}/${owner_id}/item/${item_id}`);
const res = await get(url);
}
async function loadPath(){
if (!location_id) return;
const url = api(`stock/location/${location_id}`);
@@ -140,6 +146,7 @@
async function load(){
await loadUserLocations();
loadItem();
loadPath();
loadProperties();
}
@@ -244,4 +251,10 @@
</div>
{/if}
{/await}
</div>
<div>
<pre>
{JSON.stringify({owner,owner_id,item_id},null,2)}
</pre>
</div>