Compare commits
2 Commits
main
...
module/doc
| Author | SHA1 | Date |
|---|---|---|
|
|
6bb03f4e04 | 2 hours ago |
|
|
438d8d4aad | 6 hours ago |
6 changed files with 72 additions and 15 deletions
@ -1,9 +1,26 @@
@@ -1,9 +1,26 @@
|
||||
<script> |
||||
import { t } from '../translations.svelte'; |
||||
let { item, onclick } = $props(); |
||||
</script> |
||||
|
||||
<fieldset {onclick}> |
||||
<legend>{item.code} | {item.name}</legend> |
||||
<div>{@html item.description.rendered}</div> |
||||
<span>{item.unit_price/100} {item.currency} / {item.unit}</span> |
||||
{#if item.properties} |
||||
<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> |
||||
|
||||
Loading…
Reference in new issue