feat(item): add brand field to items

This commit introduces an optional 'brand' field to the item model, allowing for better organization and
differentiation.

- The Add/Edit modal now includes a form field to select or create a brand.
- The item list on the main page now displays the brand next to the item name.
- Name uniqueness validation is now brand-aware. An item name must be unique within the context of its brand.
- The `addItem` logic is centralized in the `useItemsStore` to handle ID and timestamp generation.
This commit is contained in:
xiaomai
2025-10-14 21:11:59 +08:00
parent 8cc389630e
commit 070aa8ff5f
3 changed files with 87 additions and 26 deletions

View File

@@ -69,7 +69,7 @@
/>
<div>
<p class="font-medium text-highlighted">
{{ row.original.name }}
<strong>{{ row.original.brand }}</strong> {{ row.original.name }}
</p>
</div>
</div>