Compare commits
2 Commits
main
...
module/doc
| Author | SHA1 | Date |
|---|---|---|
|
|
6bb03f4e04 | 4 hours ago |
|
|
438d8d4aad | 8 hours ago |
6 changed files with 72 additions and 15 deletions
@ -1,9 +1,26 @@ |
|||||||
<script> |
<script> |
||||||
|
import { t } from '../translations.svelte'; |
||||||
let { item, onclick } = $props(); |
let { item, onclick } = $props(); |
||||||
</script> |
</script> |
||||||
|
|
||||||
<fieldset {onclick}> |
<fieldset {onclick}> |
||||||
<legend>{item.code} | {item.name}</legend> |
<legend>{item.code} | {item.name}</legend> |
||||||
<div>{@html item.description.rendered}</div> |
{#if item.properties} |
||||||
<span>{item.unit_price/100} {item.currency} / {item.unit}</span> |
<table> |
||||||
|
<tbody> |
||||||
|
{#if item.location.name} |
||||||
|
<tr> |
||||||
|
<th>{t('location')}</th> |
||||||
|
<td>{item.location.name}</td> |
||||||
|
</tr> |
||||||
|
{/if} |
||||||
|
{#each Object.entries(item.properties) as [idx,prop]} |
||||||
|
<tr> |
||||||
|
<th>{prop.name}</th> |
||||||
|
<td>{prop.value} {prop.unit}</td> |
||||||
|
</tr> |
||||||
|
{/each} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
{/if} |
||||||
</fieldset> |
</fieldset> |
||||||
|
|||||||
Loading…
Reference in new issue