initial commit
This commit is contained in:
16
frontend/src/components/EntityChips.vue
Normal file
16
frontend/src/components/EntityChips.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import type { NamedEntity } from '../services/api';
|
||||
|
||||
defineProps<{
|
||||
items: Array<NamedEntity & { subcategory?: string | null; quantity?: number }>;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="chips">
|
||||
<span v-for="item in items" :key="`${item.id}-${item.name}`" class="chip">
|
||||
{{ item.name }}<span v-if="item.subcategory"> · {{ item.subcategory }}</span
|
||||
><span v-if="item.quantity"> × {{ item.quantity }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user