|
|
|
|
@ -41,31 +41,41 @@
@@ -41,31 +41,41 @@
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<h2>{t('Stock')}</h2> |
|
|
|
|
<div class="grid3"> |
|
|
|
|
<div class="locations"> |
|
|
|
|
{#if top_level} |
|
|
|
|
{#each top_level as realm,idx} |
|
|
|
|
<h3>{realm.name}</h3> |
|
|
|
|
{#if realm.locations} |
|
|
|
|
<Locations locations={realm.locations} bind:selected={location} /> |
|
|
|
|
{/if} |
|
|
|
|
{/each} |
|
|
|
|
{/if} |
|
|
|
|
</div> |
|
|
|
|
<div class="items"> |
|
|
|
|
{#await items} |
|
|
|
|
<span>loading…</span> |
|
|
|
|
{:then data} |
|
|
|
|
{#if location} |
|
|
|
|
<h3>{location.name}</h3> |
|
|
|
|
{/if} |
|
|
|
|
<ItemList items={data?.sort((a,b) => a.code.localeCompare(b.code))} bind:selected={item} /> |
|
|
|
|
{/await} |
|
|
|
|
</div> |
|
|
|
|
<div class="properties"> |
|
|
|
|
<ItemProps {item} /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<table> |
|
|
|
|
<tbody> |
|
|
|
|
<tr> |
|
|
|
|
<td class="locations"> |
|
|
|
|
{#if top_level} |
|
|
|
|
{#each top_level as realm,idx} |
|
|
|
|
<h3>{realm.name}</h3> |
|
|
|
|
{#if realm.locations} |
|
|
|
|
<Locations locations={realm.locations} bind:selected={location} /> |
|
|
|
|
{/if} |
|
|
|
|
{/each} |
|
|
|
|
{/if} |
|
|
|
|
</td> |
|
|
|
|
<td class="items"> |
|
|
|
|
{#await items} |
|
|
|
|
<span>loading…</span> |
|
|
|
|
{:then data} |
|
|
|
|
{#if location} |
|
|
|
|
<h3>{location.name}</h3> |
|
|
|
|
{/if} |
|
|
|
|
<ItemList items={data.sort((a,b) => a.code.localeCompare(b.code))} bind:selected={item} /> |
|
|
|
|
{/await} |
|
|
|
|
|
|
|
|
|
</td> |
|
|
|
|
<td class="properties"> |
|
|
|
|
<ItemProps {item} /> |
|
|
|
|
|
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</tbody> |
|
|
|
|
|